I want to create a project in Eclipse which uses Session and Entity beans (EJB3) using Glassfish v3 prelude. However, I can't seem to find a way of fusing the two - there seems to be no way of adding a JPA facet to an EJB project, or and EJB context to a JPA project.
....or do you advise instead to have two separate projects which are dependent on each other, and run inside the same container?
JPA is part of the EJB3 spec, although JPA is also also available for non-EJB environments like Hibernate. So if your EJB facet includes EJB3 support, you shouldn't need to additionally request an explicit JPA facet.
Customer surveys are for companies who didn't pay proper attention to begin with.
Matt Morten
Greenhorn
Joined: Jul 08, 2009
Posts: 7
posted
0
Hmmm, no good. OK, so my steps are:
1) Create new EJB project (specifying EJB v3)
3) Name it GlassFishBeans
2) Right click on project, New Entity
3) When asked which project to add the new entity, no projects are in the list.
When you create the EJB project, on the New EJB Project dialog, click the Modify button next to Configuration. Then select Java Peristence on the Project Facets dialog.
Or, go to the project properties, click on Project Facets and then click Java Persistence.