views:

188

answers:

1

We want to evaluate OpenEJB for our application. We have already performed some tests and now we need to start a pilot project.

While I've seen how to use OpenEJB for testing purposes (mainly for JUnit tests), I have not seen how to set up an EJB 3.X project inside Netbeans for deployment in OpenEJB.

The way we did for testing purposes was to create a new JEE project, select JBOSS as the Application Server and then manually copy the JARs to OpenEJB. However, we want to be able to debug the code in Netbeans. If I try to do that, NB launches JBOSS or other application servers. I couldn't figure out how to install OpenEJB as a server in Netbeans, I didn't find anything enlightening in Java forums and there were no answers from stackoverflow.

We know we can use an embedded version of OpenEJB, but that is not what we are looking for. So:

  1. What is the suggested project structure for an EJB application for Netbeans + OpenEJB?
  2. Is it possible to use Netbeans' JEE knowledge (wizards, build system, client applications) with OpenEJB?
  3. If we need to use OpenEJB just as libraries in the classpath, what is the correct approach to generate EJBs and client applications that can work with other EJB containers later (stay JEE compatible)?

Thanks

A: 

Unfortunately, the folks behind the OpenEJB project have not contributed a server integration plugin for OpenEJB to the NetBeans project... It looks like they haven't published one on the NetBean Plugin Portal, either.

That means that you will need to be creative with your development and debugging.

I guess you could...

  1. register GlassFish Server 3
  2. create an ejb project that targets that server.
  3. code, code, code.
  4. build the project archive (dot-jar file)
  5. start the openejb server in debug mode
  6. copy the jar file created in step 4 to the appropriate location.
  7. Use the 'Attach debugger...' item of the Debug menu to attach to the openejb server that you started in step 5.

If starting openejb requires that you start multiple processes (one for Tomcat and one for the ejb container), you can attach NB to multiple processes at the same time.

vkraemer
We haven't seen any demand for it since the embedded support eliminates the need for tooling to manage the external process. But we do have a JSR-88 compliant deployer, so theoretically something like that could be done pretty easily. Most the developers are users who tend to hack on things they need. If anyone out there needs this, hit the list and I'll do what I can to point you in the right direction. I don't mind skyping with people who contribute. We're a small project, any help is good :)
David Blevins
@vkraemer - that's what we are doing right now, but I thought that could be some workaround to avoiding the need to use another server and streamlining this process.@David - Thanks. I'll try to take a look. It would be really helpfull, however, if you guys could place another option for server configuration which would allow the user to define its server instead of just choosing from a pre-defined list. Maybe a user could then fill in just paths, classes, scripts and the minimal things necessary to work with a JEE project.
Luis Soeiro
@David. Sorry, I've mistakenly thought you are a NetBeans contributor. What I meant is that it would be helpfull if the Netbeans team could provide a general JEE server configuration.
Luis Soeiro
@Luis Soeiro : The best way to get what you want from an open source project is to engage with that project. A good first step would be to file an RFE with the NetBeans project and explain what capability you are looking for. Here is the link to get started: http://netbeans.org/community/issues.html
vkraemer
@vkraemer : Good advice, I've just created that RFE.
Luis Soeiro