Creating New JPA Project - Configuration Options [message #534948] |
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 #534952 is a reply to message #534948] |
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.
|
|
|
Re: Creating New JPA Project - Configuration Options [message #534955 is a reply to message #534952] |
Thu, 20 May 2010 15:00  |
Eclipse User |
|
|
|
I should add that the differences between the configurations may not be apparent in this wizard, but "Minimal configuration" is always just the very minimum set up by the wizard, and "Default configuration for <server>" depends on how the runtime extenders choose to preselect facets. Some preselect the JavaScript facet, for instance. If you're using a repackaged eclipse, there'll generally be more facets selected here as well.
|
|
|
Powered by
FUDForum. Page generated in 0.04647 seconds