Creating New JPA Project - Configuration Options [message #618875] |
Thu, 20 May 2010 14:37  |
Eclipse User |
|
|
|
I want to create a project that produces an EJB jar that can be used in various applications to access/update a database. '
When I choose to create a new JPA Project, one of the the settings is "Configuraiton". The options are:
Default Configuration for GlassFishy v3 Java EE 6
Minimal Configuraion
Utility JPA project with Jva 5.0
Of the three pre-configured choices, there doesn't appear to be any difference in them looking at the facets chosen when clicking on the "Modify..." button for each. They all have Java (5 or 6), Java Persisitence 1.0 and Utility Module chosen.
What is the difference between the options? Which should I choose for my purpose?
|
|
|
Re: Creating New JPA Project - Configuration Options [message #619269 is a reply to message #618875] |
Thu, 20 May 2010 14:57  |
Eclipse User |
|
|
|
There are two paths (at least) to creating an EJB/JPA project like that.
The first is the way you've selected, but you need to dive down into the configuration a bit more. If you select the "Modify ..." button beside the configuration drowdown, you'll see all of the facets associated with the project and a list of configurations above. As you select each configuration, you'll see different facets checked. You definitely want both the JPA facet and the EJB facet (and the prerequisite Java 1.5+ facet). If you're starting with the JPA Project wizard, you'll need to right-click the Utility module facet and unlock it, uncheck it, and then check the EJB facet (and select the version you want). You'll need to do this whichever configuration you select in this wizard.
The second way is to choose the EJB project wizard. You'll have to hit the "Modify ..." button again, but this time, you'll only need to add the JPA facet. You can do this starting from whichever standard configuration you choose.
You can also choose to add the JPA facet to an existing EJB project, and this is done from the "Project Facets" node in the project's properties.
|
|
|
Powered by
FUDForum. Page generated in 0.03279 seconds