Be happy...EJB3 is on its way. In this case is normal that XDoclet requires
both home and interface tags, since it exposes as beans <XDt...> only the
tags' content. If the tag is not there, the template won't have the required
data.
----- Original Message -----
From: "Lewis, Grant" <[EMAIL PROTECTED]>
To: <xdoclet-user@lists.sourceforge.net>
Sent: Tuesday, April 25, 2006 10:02 PM
Subject: RE: [Xdoclet-user] Generation problems
For what it's worth, after some trial and error, I finally discovered the
right combination of tags to do the trick. I had to add all the tags and
attributes below before xdoclet would generate the classes and deployment
descriptor correctly. I tried adding view-type = "both" to the ejb.bean tag
but could never get the combination to work without adding the ejb.home and
ejb.interface tags.
Grant
/**
* Person EJB that uses BMP to store its state
* to a local database using JDBC and sync a remote
* database using a web services API.
*
* @ejb.bean
* name = "Person"
* type = "BMP"
* local-jndi-name = "ejb/PersonLocalHome"
* jndi-name = "ejb/PersonHome"
*
* @ejb.home
* local-class = "gov.seahawk.investigations.person.PersonLocalHome"
* local-extends = "javax.ejb.EJBLocalHome"
* remote-class = "gov.seahawk.investigations.person.PersonHome"
* extends = "javax.ejb.EJBHome"
* generate = "local,remote"
*
* @ejb.interface
* local-class = "gov.seahawk.investigations.person.PersonLocal"
* local-extends = "javax.ejb.EJBLocalObject"
* remote-class = "gov.seahawk.investigations.person.Person"
* extends = "javax.ejb.EJBObject"
* generate = "local,remote"
*
* @ejb.pk
* class = "java.lang.String"
*
*/
________________________________
From: [EMAIL PROTECTED] on behalf of Lewis, Grant
Sent: Tue 4/25/2006 11:18 AM
To: xdoclet-user@lists.sourceforge.net
Subject: [Xdoclet-user] Generation problems
I have no idea why xdoclet will not generate code for my concrete EJBs while
it does generate code for the abstract EJB all the concrete EJBs extend.
Here is the javadoc header of my abstract EJB:
/**
* @ejb.bean
* name = "WebServiceEntity"
* generate = false
*/
abstract public class WebServiceBean
extends GenericEntityBean implements EntityBean {
Here is the header for my PersonBean:
/**
* @ejb.bean
* name = "Person"
* type = "BMP"
* local-jndi-name = "gov.seahawk.investigations.person.PersonHome"
* jndi-name = "gov.seahawk.investigations.person.PersonRemoteHome"
*
* @ejb.pk
* class = "java.lang.String"
*/
I have a sneaky suspicion this is related to the fact I'm generating code
for a BMP bean. When I run xdoclet no code is generated for PersonBean. The
abstract EJB has local and remote (business and home) interfaces generated.
My ant task:
<target name="ejbdoclet" depends="prepare">
<ejbdoclet
destdir="${build.gen-src.dir}"
ejbspec="2.0"
verbose="false">
<fileset dir="${project.dir}">
<include name="**/*Bean.java"/>
</fileset>
<remoteinterface/>
<localinterface/>
<homeinterface/>
<localhomeinterface/>
<deploymentdescriptor
destdir="${build.meta-inf.dir}"
validatexml="true">
</deploymentdescriptor>
</ejbdoclet>
</target>
Do I have something missing that's required?
Grant
---
[This E-mail has been scanned for viruses but it is your responsibility
to maintain up to date anti virus software on the device that you are
currently using to read this email. ]
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
xdoclet-user mailing list
xdoclet-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-user