Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[wtp-dev] status and issues with annotated EJB and servlet support in M3

Hey Naci,

The J2EE team has been making some pretty large changes today with respect to edit models and the j2ee core models.  We have
been updating your code as necessary to fix compile issues.  With that in mind, and the recent upgrade to eclipse M5, I figured now was
a good time to level set where we are at for the annotated servlet and ejb creation line item for M3.  

First of all, code assist seems to be working well and all the tags for the ejb and servlet xdoc are showing up.

XDoc Preferences

Issue #1 - Window>Preferences - Go to XDoclet tag and choose a XDoclet runtime.  From this page, I am not able to specify an xdoclet home.
I downloaded the xdoclet runtime jars for 1.2.2, but I always get this error:

EJB Creation
I do see the xdoclet builder being added to EJB projects and the menu option to create the session bean.  The wizard does come up as well.

Issue #2 - Hitting finish on create session bean throws the following stack trace for me.

 Caused by: java.lang.NullPointerException
            at org.eclipse.core.internal.runtime.InternalPlatform.asLocalURL(
            at org.eclipse.core.runtime.Platform.asLocalURL(
            at org.eclipse.emf.codegen.jet.JETEmitter.addVariable(
            at org.eclipse.jst.j2ee.ejb.annotations.internal.emitter.EjbEmitter.createJetEmitter(

Issue #3 - We really need to make this wizard more accessible.  The menu should show up on the session bean group in the project explorer, on the ejb jar, and
on the ejb project.  We will eventually want a generic ejb creation wizard which embeds each type of bean creation wizard.  This ejb creation wizard should
have an icon on the toolbar.

Servlet Creation

The servlet wizard does come up and it creates a valid annotated xdoclet servlet upon finish.  I tried to use the code from the ejb operation to add the xdoclet
builder to the web project, just like for the ejb project.  I'm not sure if this is valid or not.

Issue #4 - Web projects and servlet creation need to be set up to use the xdoclet builder.  The operation is there, NewServletClassOperation.  You just need
to hook in the xdoclet builder, so on a build we will have the deployment descriptor artifacts generated.

General Thoughts

Issue #5 - The xdoc specification now supports J2EE 1.4.  Do we want to go ahead and add the tags for the content assist for J2EE 1.4?  If I added the tags, would that
imply any more work on your part?

Issue #6  - Do we really want to keep the xdoc generation as part of a build?  We'll have to dive deeper into all the pro's and con's of action vs. builder..

Issue #7 - We cannot use hardcoded spec versions, we should definately get this info from the module or from the wizard.

Issue #8 - What's the deal again with a JBoss runtime to test these beans we will be creating?

We've made really good progress and I think we are a close to a working solution for M3.  We just need to clear some of these remaining issues up...


John Lanuti
Software Engineer, IBM Rational
t/l 441-7861

"Well, in the end, my friend, we will all be together again."  -Of A Revolution
"I'll be awful sometimes, weakened to my knees, but I'll learn to get by on the little victories."  - Matt Nathanson

Naci Dai <naci.dai@xxxxxxxxxxxxx>
Sent by: wtp-dev-admin@xxxxxxxxxxx

02/06/2005 09:27 AM

Please respond to

[wtp-dev] EJB Support

Our EJB contribution is committed to CVS. The initial EJB/Xdoclet components support the following use cases:

0) Use Case-0:  Edit/Setup Preferences:  Window>Preferences - Go to XDoclet tag and choose a XDoclet runtime (1.2.2/1.2.1 are supported).  visit the ejbdoclet page, choose the servers that you would like to auto-generate deployment-descriptors.  Apply.

1) Use case-I:  
- Project Wizard:  New > Ejb > Create EJB Project >Create an EJB Project, choose a J2EE Runtime.  Currently you can only choose J2EE Library o compile against.  (Server Team should probably look into getting this work with a real server.)

- Create A Session EJB:  New > Ejb > Create Session Bean, enter Session bean config parameters, click next choose a package, modify the class parameters. Click Finish.

    - A Session Bean is created including a sample business method.
    - EJB Builder is added to the project
    - Builder generates all EJB classes for the beans in the module and adds them to the ejb-jar.xml

The support for other types of EJBs are also in place but we would like to get some feedback on the current work before we go further.

2) Use Case-II:  Open and edit your Session Bean ( the class with the Bean suffix).  Add a method or modify other things.  You will get code assist for XDoclet tags.  Save.
    - Builder kicks in and generates all EJB classes for the beans in the module and adds them to the ejb-jar.xml

There are a few experimental features/issues for consideration:
       - We use a builder to generate derived artifacts.  We need to asses the performance issues.  Alternative is using manual actions
       - The derived code is generated in to the same source folder.  Eventually we would like to separate it.
       - Multiple modules in the same project should work, NOT tested
       - There are a few hard coded things such as EJB spec version.  We will change it to get it from the EJBModule

Have not been tested on a server runtime due to lack of a server runtime that supports EJB modules.

The related plugins are:


Provides ant script execution support.  Used by the XDoclet builder to run ejbdoclet tasks


Provides command objects and operations used by the Wizards and JET Emitters


Extensible framework to support different annotation technologies and builders.  Provides API for annotation emitters and builder and support for template (JET) based code generation


EJB Wizards


Extension of the annotations.emitter to support XDoclet.  Contains emitter extensions, XDoclet builder and XDoclet preferences


Naci Dai,
Managing Director

eteration a.s.

Inonu cad. Sumer sok. Zitas D1-15
Kozyatagi, Istanbul 81090
+90 (532) 573 7783 (cell)
+90 (216) 361 5434 (phone)
+90 (216) 361 2034 (fax)

Back to the top