The moose likes Ant, Maven and Other Build Tools and the fly likes ejbdoclet working correctly? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Reply Bookmark "ejbdoclet working correctly?" Watch "ejbdoclet working correctly?" New topic
Author

ejbdoclet working correctly?

albert holn
Greenhorn

Joined: Jul 05, 2004
Posts: 1
ejbdoclet is not working totally correct. It generates the remote interface, but it will not generate any of the associated methods.
Anyone know why arent the methods being generated as well?

I have included a cut and paste of the build.xml file and the bean .java file below:

<?xml version="1.0" ?>
<project name="structured" default="archive">

<property file="build.properties" />

<target name="init">
<path id="xdoclet.classpath">
<fileset dir="${lib.dir}">
<include name="*.jar" />
</fileset>
</path>
<taskdef
name="ejbdoclet"
classname="xdoclet.modules.ejb.EjbDocletTask"
classpathref="xdoclet.classpath"
/>
<mkdir dir="${classes.dir}" />
<mkdir dir="${dist.dir}" />
</target>

<target name="ejbdoclet" depends="init" >

<ejbdoclet
destdir="${source.dir}"
excludedtags="@version,@author,@see"
ejbspec="2.0">

<fileset dir="${source.dir}">
<include name="**/*Bean.java" />
</fileset>
<remoteinterface/>
<homeinterface/>
<deploymentdescriptor destdir="${source.dir}/ejb/META-INF" />
<jboss/>
</ejbdoclet>
</target>

<target name="compile" depends="ejbdoclet">
<javac srcdir="${source.dir}" destdir="${classes.dir}">
<classpath>
<fileset dir="${lib.dir}">
<include name="weblogic.jar"/>
</fileset>
</classpath>
</javac>

</target>

<target name="archive" depends="compile" >
<jar destfile="${dist.dir}/project.jar" basedir="${classes.dir}" />
</target>

<target name="clean" depends="init">
<delete dir="${classes.dir}" />
<delete dir="${dist.dir}" />
</target>
</project>

-----------
DistanceConversionBean.java
----------------------------
/*
* Created on Jul 2, 2004
*/
package albert;

import java.rmi.RemoteException;
import javax.ejb.EJBException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;

/**
* @author Albert Hoenigmann
* DistanceConversionBean
* Jul 2, 2004
* @ejb:bean type="Stateless"
* name="DistanceConversion"
* jndi-name="albert.DistanceConversion"
*
*
*
*/
public class DistanceConversionBean implements SessionBean {
/*
* @ejb:interface-method view-type="remote"
*/
public double feetToMeters(double feet) throws RemoteException {
System.out.println("in feetToMeters");
Distance distance = new Distance(feet, DistanceType.FEET);
return distance.meters();
}

/* (non-Javadoc)
* @see javax.ejb.SessionBean#setSessionContext(javax.ejb.SessionContext)
*/
public void setSessionContext(SessionContext ctx) throws EJBException,
RemoteException {
System.out.println("setSessionContext");

}

/* (non-Javadoc)
* @see javax.ejb.SessionBean#ejbRemove()
* @ejb:transaction type="Supports"
*/
public void ejbRemove() throws EJBException, RemoteException {
System.out.println("ejbRemove");
}

/* (non-Javadoc)
* @see javax.ejb.SessionBean#ejbActivate()
*/
public void ejbActivate() throws EJBException, RemoteException {
System.out.println("ejbActivate");

}

/* (non-Javadoc)
* @see javax.ejb.SessionBean#ejbPassivate()
*/
public void ejbPassivate() throws EJBException, RemoteException {
System.out.println("ejbPassivate");

}

/*
* @ejb:create-method
*/
public void ejbCreate() {
System.out.println("ejbCreate");

}


}
Bear Bibeault
Author and opinionated walrus
Marshal

Joined: Jan 10, 2002
Posts: 50674

"albert albert",

We're pleased to have you here with us on the Ranch, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
 
subject: ejbdoclet working correctly?
 
Threads others viewed
SAXParseException: The content of element type "enterprise-beans" is incomplete, it m
why is xdoclet erroring out?
SAXParseException: The content of element type "enterprise-beans" is incomplete, it m
Getting a SocketOrChannelConnectionImpl in Weblogic
Why I can't create remote and home interface?
developer file tools