On Dec 8, 2007, at 6:35 AM, Jacek Laskowski wrote:

Hi,

I had a EJB3 presentation on a Poznan University yesterday. I had done
it with Glassfish as it's nicely integrated with NetBeans IDE 6 which
provides features for Java EE development beyond those I could find in
Eclipse (I'm not talking about RAD7.5 though that's around the
corner). I'm alone missing tools for openejb I could use for ejb3
development. The Geronimo plugin for NetBeans I'm working on takes
ages to be finished even for a basic use cases.

I wonder what people use for their EJB3 developments. I keep thinking
about a m2 plugin for developing ejb3 and running unit tests without
much trouble. I can't say what exactly I have in my mind as it's just
an idea I had for a long time. I miss a tool, but can't say exactly
what it should be. I like the way the jetty-maven-plugin works where I
could run a webapp on jetty with just mvn jetty:run or similar. I wish
I could have something similar for openejb3, but can't figure out how
it should work. Should openejb (or the plugin itself) provide a http
connector that would allow people execute tests? NetBeans/Glassfish
have a nice interface for web services testing when ejb3 annotated
with @WebService can be deployed to Glassfish and a special URL points
to the Tester web application that allows to execute @WebMethod's.

Can anyone point me into a right direction? What pieces I miss to
finish the puzzle? I seem puzzled.

:)

I understand what you mean about IDE tools beyond running applications that extend into assisting in writing the code itself. We have that tool Jonathan is working on that will take an ejb 2.1 app or lower and add the required annotations to your source code so that you won't need the xml anymore -- a reverse XDoclet. No one else is doing anything like that and when they see it they'll all rush to copy it.

I don't understand what you mean by "a m2 plugin for developing ejb3 and running unit tests without much trouble." Unit testing EJBs in an embedded EJB container that runs without much trouble is our claim to fame. We've been doing it since EJB 1.1 and do it so well we don't need tools. There's a whole directory of examples that run in m2 or ant with no plugin at all. Running the same tests from your IDE is just as easy and can be done with the same setup. Meaning you don't need an OpenEJB-Maven plugin to run the unit tests in your build and another OpenEJB-Netbeans plugin to run the same unit test in your IDE.

You can develop an EJB3 application the exact same way you would develop a normal application, without any tools at all. Write a couple lines in your IDE, run your unit test. Rinse and repeat. No need to click start/stop buttons, deploy/undeploy buttons or anything. Just write code, run test, write code, run test, etc. etc..

Regarding testing WebServices, the same approach can be used. You can boot the http server and webservices support in your test case as well. Though that sounds "heavy" it's not. Here's an example of that:
 http://openejb.apache.org/embedded-and-remotable.html

We do so much out of the box and hassle-free that other guys need tools to do. The fact that they need tools isn't something to brag about but something to be embarrassed about. EJB3 was designed to be a tool-free API and with OpenEJB3 it truly is.

We even support other vendors' deployment descriptors, like Glassfish, so the pleasure of truly simple EJB3 development isn't restricted to people who use OpenEJB in production.

-David

Reply via email to