开发者

Looking for Simplified Overview of EJB3 [closed]

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 7 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? Sho开发者_如何学编程uld 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜