Skip to main content

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

At 11:28 PM 2/14/2005, John Lanuti wrote:

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:

John,

-This check adds the path /lib/zz.jar to the home you have selected in the dialog (i.e c:/xdoclet1.2.2).  Are you sure you have chosen the right folder?




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.

- Are you testing in a development workspace?  If so JET emitter has a defect for setting classpaths (It can only use real jars!).  To work around, you need to build the plugin jars for the  j2ee, annotation.model annotation.emitter plugins in your workspace.  This lets the JET emitter to add the plugins to its classpath via variables.

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

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.

Agreed


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.

Builder should be similar but needs a few changes (i.e. recognize annotated java needs a few more cases).  Also, xdoclet ant scripts for web projects is slightly different.

We will look into it once the code base stabilizes


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.

Same as above


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?

Very little.  All we need to do is transfer version info from modules to xdoclet scripts


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..

As I pointed this earlier.  They both have pros and cons.  My current view is it is nice to keep both and make the builders optional but active as default.


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

See above

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

I can test it without JBoss server plugin.  JBoss comitters are presumably fixing it. However, you can use the generic server support.  We already tested with JBoss 3.2.3, Jonas 4 and WebLogic 8.1


John Lanuti
Software Engineer, IBM Rational
jlanuti@xxxxxxxxxx
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

To
wtp-dev@xxxxxxxxxxx
cc
Subject
[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:
org.eclipse.jst.common.launcher.ant

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

org.eclipse.jst.j2ee.ejb.annotation.model

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

org.eclipse.jst.j2ee.ejb.annotations.emitter

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

org.eclipse.jst.j2ee.ejb.annotations.ui

EJB Wizards

org.eclipse.jst.j2ee.ejb.annotations.xdoclet

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)
http://www.eteration.com

mailto:nacidai@xxxxxxx
mailto:naci@xxxxxxxxxxxxx



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)
http://www.eteration.com
mailto:nacidai@xxxxxxx
mailto:naci@xxxxxxxxxxxxx


Back to the top