The fact that you're seeing the ejb name entry in the generated files
suggests that you've got the classpath entries and fileset set up
correctly, and that it's recognising your bean class as an ejb.  The
jndi-name bit in the template is guarded by a
<XDtClass:ifHasClassTag tagName="ejb.bean" paramName="jndi-name">
tag, but I don't know why it's not seeing it, as the tag in your bean
looks okay to me.

I don't know where you got that
@sunone.bean iiop="true"
tag from, though, it's not mentioned in the docs or the template.

What's your environment? i.e. What versions of XDoclet, Ant & JDK are
you using, and under what OS?  Are the other generated files okay?  Does
the hello method appear in the remote interface, and the transaction
type in the standard DD?  Also, does it make any difference if you move
the bean class into a package below ${src.dir}? (don't change the
fileset, and make sure the subdirectory you use matches the package
declaration in the source file)


Andrew.

On Mon, 2004-03-22 at 21:11, Curry, Jim wrote:
> I have not been able to get the sunone support of the ejbdoclet task
> to work correctly. It generates a sun-ejb-jar.xml, but the only thing
> in it is the ejb-name. It is missing the jndi-name and all of the
> bean-pool elements that I have specified in the .java file.  I have
> come to the conclusion that I am either missing something very basic
> or the sunone stuff doesn't work very well. I would really appreciate
> it if someone could help me out.  Below is The class file and
> applicable section of the build file.
> 
>   <target name="genBeans">
>     <taskdef name="ejbdoclet"
> classname="xdoclet.modules.ejb.EjbDocletTask">
>       <classpath >
>         <fileset dir="${xdoclet.lib.dir}" includes="*.jar"/>
>         <fileset dir="${lib.dir}" includes="*.jar"/>
>       </classpath>
>     </taskdef>
>     
>     <ejbdoclet destdir="${src.dir}" ejbspec="2.0">
>       <fileset dir="${src.dir}">
>         <include name="**/*Bean.java"/>
>       </fileset>
>       
>       <localinterface/>
>       <localhomeinterface/>
>       <remoteinterface/>
>       <homeinterface/>
>       
>       <deploymentdescriptor destdir="${bin.dir}/META-INF" />
>       <sunone version="7.0" destdir="${bin.dir}/META-INF" />
>     </ejbdoclet>   
>   </target>  
> 
> import javax.ejb.*;
> import java.rmi.RemoteException;
> 
> /**
>  * Test Session Bean
>  * 
>  * @ejb.bean   type="Stateless" 
>  *             jndi-name="Hello"
>  *             transaction-type="Container"
>  *
>  * @sunone.bean iiop="true"
>  *              
>  * @sunone.bean-pool steady-pool-size="1"
>  *                   resize-quantity="1"
>  *                   max-pool-size="20"
>  *                   pool-idle-timeout="600"
>  */
> public class HelloBean
>   implements SessionBean {
>   private SessionContext _ctx = null;
> 
>   /**
>    * Says Hello
>    * 
>    * @ejb.interface-method
>    * @ejb.transaction type="Supports"
>    *
>    * @return a hello message
>    */
>   public String hello() {
>     return "Hello, World!";
>   }
> 
>   public void ejbCreate() {}
>   public void ejbActivate() throws EJBException, RemoteException {}
>   public void ejbPassivate() throws EJBException, RemoteException {}
>   public void ejbRemove() throws EJBException, RemoteException {}
>   public void setSessionContext(SessionContext ctx)
>                          throws EJBException, RemoteException {
>     _ctx = ctx;
>   }
> }
> 


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to