views:

282

answers:

1

I'm starting to learn EJB3 and I'm a bit lost when it comes to setting up Eclipse. I've got Glassfish v3 prelude downloaded and set up in Eclipse, but when I attempt to publish my EJB project to the server, I'm told that the server is incompatible with the EJB3 facet of the project.

What would the proper steps be to create a new EJB3 project with a JSP/Servlet-based client?

+1  A: 
  • Download and install GlassFish v3 (which is out since december), not the prelude version
  • Install the GlassFish v3 server adapter (right-click the Server view, then New > Server, click on Download additional server adapters and install the GlassFish v3 adapter)
  • Define a new GlassFish v3 Server
  • Create a new Enterprise Application Project (from File > New > Other... > Java EE > Enterprise Apllication Project)
  • Write some code, deploy the project, do some changes and save them (changes get deployed by the plugin on save) and test again. Note that GlassFish v3 preserves session state across redeployments which is awesome for productivity. Check this screencast illustrating these features.
Pascal Thivent
Apparently I had Glassfish v3 final, but I didn't have the right server adapter in Eclipse, so I've managed to resolve that problem. Thanks. One thing I still don't understand is when, creating an EJB project, it puts the implementation classes for session beans in a separate client project. The book I'm reading (Enterprise JavaBeans 3.0) gives me the impression that they should be stored together.
bshacklett