- This topic has 4 replies, 3 voices, and was last updated 13 years, 10 months ago by dason.
-
AuthorPosts
-
dasonMemberI can create a web project that supports JSF, ICEfaces and other features. In addition, I can right click on the project, go to the MyEclipse menu and select “Add JPA Capabilities…” if I wish to create JPA/entity beans.
I can create an EJB project that will let me create stateful and stateless EJB 3.0 session beans.
However, I can’t seem to create a web project that will let me add EJB 3.0 session beans. Unless I am missing something, session beans and web projects seem to be mutually exclusive.
My question: what if I wish to add EJB 3.0 session beans to a web project? How would I do it?
Was this something deliberately left out, or am I missing something?
If it was deliberately left out, why? If you are trying to separate different application components into different projects, I get that, but why allow JPA in a web project then?
Thanks for the help,
Daveinstallation details below —>
*** Date:
Tuesday, January 11, 2011 5:18:20 PM EST** System properties:
OS=WindowsVista
OS version=6.1.0
Java version=1.6.0_13*** MyEclipse details:
MyEclipse Enterprise Workbench
Version: 8.6.1
Build id: 8.6.1-20101117*** Eclipse details:
MyEclipse Enterprise WorkbenchVersion: 8.6.1
Build id: 8.6.1-20101117
dasonMemberTech Support,
I would really appreciate an answer to this question.
Thank you,
Dave
support-swapnaModeratordason,
I will have a dev team member answer this question for you.
Brian FernandesModeratorDason,
Sorry for the delayed response. Yes, the experience you described is by design.A simple way of looking at it is that EJB projects are quite different from standard web projects; most importantly in how they are deployed and how they are loaded. You will notice different structures and different configuration files are required – i.e. ejb-jar.xml in an EJB project which corresponds to the web.xml file in a Web project. I’m not aware of any Java EE servers which would handle both these sorts of files in a single deployable unit, though I can’t say I have tried.
As far as JPA is concerned, while EJB 3.x does use JPA for persistence, JPA does stand alone as well. JPA projects do not need special deployment nor do they need a full Java EE 5 server to work – they could work even in Tomcat without any modifications.
In short, the division is present not because we at MyEclipse want you to separate different layers of your application, but because this separation is warrted by the Java EE spec and deployment constraints.
Hope this helps.
dasonMemberYour explanation makes sense.
Thank you.
Dave
-
AuthorPosts