[
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
|
John,
Thanks for the help and comments. Long live the open process
:-)
Naci,
I was able to get the xdoclet set up in the preferences, but
the only way I saw it working was if the jars were in a "lib"
directory. Nothing led me to
believe that when I extracted the xdoclet jars as they
came,
This is odd, the xdoclet 1.2.2 distribution that I have downloaded has
all the jars under a "lib" folder.
it goes
xdoclet-1.2.2
docs/
samples/
lib/
*.jar
And you should be selecting <xdoclet-1.2.2>. You should not
need to move any jars. Our goal should be to support a
runtime as is with its default directory layout.
and they were
not in a lib directory, that I would need to create one. This is
either
something we should not force the user or something that
needs to be explicitly called out.
This sounds like a problem with your downloaded xdoclet
distribution.
I did switch your
use of the JETEmitter in EJBEmitter to use the more custom WTPJetEmitter
which allowed me to generate session beans
in a development environment. This change was released
to head.
I will look at it today. If it is more felxible with classpath
settings great. It saves development time
But even then I was
unable to get the xdoclet engine to generate my ejb classes and
artifacts. The generated ant task does not sufficiently set
up the classpath so that the server target jars are added to
the ant classpath.
Ahhh, your project must have J2EE libraries or you must have a server
runtime set that has EJB support jars. We think the best way to do
this was to use the classpath of the project in the xdoclet script.
Therefore, if your project compiles so should the script. If it is
not working it is a bug that we need to look at. Probably we did
not transfer the project classpath to the script
This causes the
generation to fail. I was able to get around this by
manually adding the j2ee.jar to the xdoclet home lib
directory.
This is not what we intended. Se the comments above.
After adding the
j2ee.jar, I was able to get the artifacts and deployment descriptors
generated. However, the ejb-jar.xml would not parse and
could not be loaded. I haven't had a chance to
look into this, but maybe you could. Are you seeing the same
results?
if all works fine ejb-jar.xml is usually a validone, I'll
check.
Also, we should not
be adding the xdoclet builder in the create bean operation. We will
need to discuss ways where the builder can be added
optionally, ways that are extendable and
configurable. This can be done in M4
Agreed. The best place is probably an EJB preference
page.
We will also need
to discuss ways we can make the creation wizards configurable. We
can't force our implementation of how to create a bean on
every user of an open framework. This can
be done in M4 too.
If only I could understand how the IBM wizard framework worked :-)
I think I am getting a hang of the "Operations". They are
indeed very useful. I am sur ethe wizard framework is also very
flexible but needs a bit o fdescription. Learning by example is a
long process.
M4 sounds right
The base should be
stable now. It would be great if you could get the web builder
going so we can test the output of the servlet creation wizard.
I am going to be working on a tutorial on how to set up and
create an annotated servlet. Do you want to do the same for a
session bean, or if you provide me with any detailed
steps I may be missing, I could work on that as well. These
tutorials are great ways to get the community educated and in
testing the function provided.
An EJB tutorial is in the works.
Thanks,
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/15/2005 04:02 AM
Please respond to
wtp-dev
To
wtp-dev@xxxxxxxxxxx
cc
Subject
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
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