Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
Hi I'm looking for a simplified overview of EJB3 components.
I seem to understand most of the pieces of the puzzle, but can't quite get them to fit together in my brain as a full picture. I've developed numerous web applications (wars) that have been deployed on Tomcat before, but not a full-fledged EE application (ear).
I would like the overview to be as generic as possible. I'm not looking for a tutorial on how to set up EJB3 on Glassfish built in NetBeans or some other vendor specific tutorial that's more about the IDE than the technology.
I keep reading about Java, ejb-jar, web and ear modules but am not clear on what these different modules contain and how to use them to put together my app.
In my case, I want to write a simple database CRUD web application.
The first step is simple; create entity classes that model the database tables my app will be using. I plan on using annotations. Should I create a jar that contains just these enity classes? Is this the ejb-jar module (sometimes referred to as the Java module)?
Next, I'll need some business logic classes that make use of the entity classes. These are the session beans (stateless or stateful) correct? Should these be packaged in the same jar as the entity classes or a separate jar?
Finally, I'll need some sort of web interface (I'll be creating a JSF portlet) application that makes use of the both the session and entity beans. Together with the above jar(s), this will be my war?
Assuming the above to be correct, what is involved in creating an ear?
Forgive me if this post is vague, but I'm having a hard time defining what it is I don't understand.
Thanks for any help!
Packaging EJB 3 Applications by Debu Panda (author of EJB3 In Action) is a very good resource and will give you a good overview of the components that compose an enteprise application and how to package them.
PS: I don't want to make things more confusing but note that you can now package your EJBs directly in a WAR in Java EE 6. If you don't have strong modularization requirements, this simplifies things.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I have a smaller project to organize my finance and several dates and TODOs. Know I need to create different Screens and must often connect to databases to get data. I saw that the spring framework supports some stuff for jdbc and dependency injection. The last point is very important, because I want that my Classes, which creates the screen should be loosely coupled and the code should be more clear.
Is it profitable to use Spring by small projects? I may use 3 components of the whole framework and because of that I'm not sure if it is "good" style to use a big framework like these for such a small project.
Thanks for every comment.
Whether you are going to use Spring Framework or not, that's completely your choice. But I am trying to explain you where your conception about Spring Framework is completely wrong.
You have said-
Is it profitable to use Spring by small projects? I may use 3 components of the whole framework and because of that i'm not sure if it is "good" sytle to use a big framework like these for such a small project.
From Spring reference doc
The Spring Framework is a lightweight solution and a potential one-stop-shop for building your enterprise-ready applications. However, Spring is modular, allowing you to use only those parts that you need, without having to bring in the rest. You can use the IoC container, with any web framework on top, but you can also use only the Hibernate integration code or the JDBC abstraction layer.
It is clear that, you can only use those modules of Spring, which are required for your project without having to bring in the rest.
Spring Modules
The Spring Framework consists of features organized into about 20 modules. These modules are grouped into Core Container, Data Access/Integration, Web, AOP (Aspect Oriented Programming), Instrumentation, Messaging, and Test, as shown in the following diagram.
Any way, although Spring Framework provides comprehensive infrastructure support for developing applications but for the novice user, it is tougher to use the framework quickly as it has complex abstraction and user has to spend more time in assessing the concept, function and it's uses in developing the application.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
Might be my question is abstract or out of context, but i am asking here since i have little idea how this happens.
I am wondering how big application/ platform break down there application in to multiple module and how they able to manage modules dependencies.
For example in some E-commerce application they tend to break down it in various modules like pricing,promotions,shipping.import/export and many more.
when we develop those application we hardly think about the underlying modules and how they have been designed to provides functionalists.
Most of those module are not web-applications but are standalone module and not deployed in the web-app as jar files.
can any one help me to understand how they break up things or is there any standard way to do this.any help/resources to get insight will really be helpful
E-commerce application [...] tend to break down [the application] in various modules
like pricing,promotions,shipping.import/export and many more.
[...]
Can any one help me to understand how they break up things or is there
any standard way to do this.
There are various ways from the technology point of view to modularize applications. Large systems are split into modules that must communicate with each others, and there are various technologies to do so: EJB, web service, libraries, database, file system, message queues, etc. It's way to vague to be answered.
In practice applications ten to be modularized according to the social structure of the company. This is Conway's law. Since pricing, promotions, shipping are usually different teams within the organizations, chances are that each team will have an engineering group, and the system will be modularized according to the organizational teams.
Try looking at the various maven archetypes available out there.
for example: http://appfuse.org/display/APF/Home
You can package many EJB jar archives within an EAR archive.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
What are the open source java based frameworks that can be used to build a dynamic websites?
The dynamic website should allow users to change content in the site. I am not looking for a portal solution, but something lightweight and customizable.
I would recommend Play! Framework. I have worked with it before and it is pretty easy to learn. Extensive tutorials and documentation are on their website.
Because of Play's extensibility, there are many modules for it, one of which is a lightweight CMS module. I have not used this module, but it sounds like what you might be looking for.
Search about Spring MVC or JSF.
Really every Java web framework can be used to create dynamic sites. That's pretty much the entire point of using Java and such frameworks.
If you only needed to serve static content just Apache would be all you need,
There is a bewildering choice of web frameworks in Java. Everyone will tell you theirs is best and all others are bad.
My 2 cents; JSF is one of the most popular choices, rather easy and has lots of support and resources available for it. It's already part of the standard Java EE library, so in most cases you don't have to download or install anything to get started. Any Java EE implementation (JBoss, Glassfish, Resin, Geronimo, etc etc) will do. The only exception is Tomcat.
While there are other choices that also work, it's hard to go wrong with JSF.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
We want to make our current Java Swing application as module based so that it can be loaded from configuration files.
Is there any framework/tool that helps in making our application as module based? I mean big components like JTextPane, JTable we can make as a module and load them wheneven required.
The Spring Framework may help. The following article has details: Spring: How to Create Decoupled Swing Components
You can also check out the spring-richclient project.
Modules is a design term. Create well designed application and call groups of classes "modules". You can pack your modules in separate jar file and then put them into classpath as your wish. This will give you some flexibility.
You can use injection framework like Spring or Guice. This allow you to decouple your components.
You can make use of JGoodies along with Google Guice.
Google Guice will give you the ability to break up your application in modules.
I like using JGoodies as it is easy to use and doesn't have a big dependancy list.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I am currently working on a pretty large Java 6 application where we are looking to split some of our functionality out into a service oriented architecture.
It seems that the primary SOA framework for the application space is OSGi and I have been looking into Felix and Knopplerfish but I wanted to make sure that this isn't my only option.
Does it make sense to use an actual web service protocol for our application like SOAP, even though we are not building a web app? Is this even acceptable?
Have any of you used an implementation of OSGi (Felix, etc.) with your desktop application? if so, how did it go? Do you know of anything better?
We're all pretty new to SOA here so any help would be greatly appreciated.
My company uses OSGi extensively, and it works well for us, in that we can version various components and have greater control over what gets exposed from each component.
If you envision ever wanting to run different components on separate hardware, then writing using web services (REST/SOAP/etc) makes sense. But there's a performance penalty in both sending bits from one process or network to another,and serializing/marshalling that data so it can be sent, and doing the opposite on the other side. If you don't ever think that will happen, then don't use web services.
We use Eclipse RCP as our application platform, which is OSGi based (Equinox). Our application makes usage of both the Eclipse plugins as well as pure OSGi bundles. In our case we have services that are both local to the application as well as remote (via Spring Remoting) to Java EE servers.
In your case, OSGi may make sense for your app, but remote service protocols don't.
Also, a desktop application on its own is not considered SOA. You are simply componentizing your application, which is a good thing.