Hi all,

I am sure someone can help with this!

I am just want to get a real simlpe "hello world" EJB session bean going I have 
written the bean code:



package testXdoc;

import javax.ejb.SessionBean;
import javax.ejb.SessionContext;

/**
 * @ejb.bean type="Stateless"
 *                              view-type="both"
 */
public class HelloBean implements SessionBean
{


        private SessionContext ctx;

        //
        // EJB-required methords
        //
        
        /**
         * @ejb.create-method
         */
        public void ejbCreate() {
                System.out.println("ejbCreate");
        }

        public void ejbRemove() {
                System.out.println("ejbRemove");
        }

        public void ejbActivate() {
                System.out.println("ejbActivate");
        }

        public void ejbPassivate() {
                System.out.println("ejbPassivate");
        }

        public void setSessionContext(SessionContext ctx) {
                this.ctx = ctx;
        }

        //
        // Business methods
        // 
        
        /**
         * @ejb.interface-method
         */
        public String hello() {
                System.out.println("hello()");
                return "Hello World!";
        }

}


And the build.xml 

<?xml version="1.0"?>

<project name="thirdGo" default="ejbdoclet" basedir=".">

        <property environment="env"/>
        <property name="src" value="${basedir}/testXdoc"/>
        <property name="xdoclet.lib.dir" value="/usr/local/xdoclet-1.2b3/lib"/>
        <property name="build" value="${basedir}/build"/>
        <property name="j2ee.home" value="${env.J2EE_HOME}"/>
        <property name="libs" value="../libs" />
        
        <target name="inti">
                <echo>Source Set To: ${src}</echo>
        </target>
        
        <target name="ejbdoclet" depends="inti">
        
                <taskdef name="ejbdoclet" 
classname="xdoclet.modules.ejb.EjbDocletTask">
                        <classpath>
                        <fileset dir="${xdoclet.lib.dir}" includes="*.jar"/>
                        <fileset dir="${j2ee.home}/lib" includes="j2ee.jar"/>
                        <fileset dir="${libs}" includes="*.jar"/>
                </classpath>
        </taskdef> 
        
        <ejbdoclet destDir="${src}" ejbspec="2.0">
                <fileset dir="${src}">
                        <include name="**/*.java" />
                </fileset>
  
                        <remoteinterface/>
                <homeinterface/>
                <localinterface/>
                <localhomeinterface/>
                
        </ejbdoclet>
    </target> 
</project>

when I run ant I get the following:
Buildfile: build.xml

inti:
     [echo] Source Set To: /home/tc8/examplesAndHelp/wileyBook/thridGo/src/testXdoc

ejbdoclet:
[ejbdoclet] 0 [main] INFO XDocletMain.start  - Running <remoteinterface/>
[ejbdoclet] 215 [main] INFO XDocletMain.start  - Running <homeinterface/>
[ejbdoclet] 267 [main] INFO XDocletMain.start  - Running <localinterface/>
[ejbdoclet] 290 [main] INFO XDocletMain.start  - Running <localhomeinterface/>

BUILD SUCCESSFUL
Total time: 3 seconds

BUT!!!!!

The interface files are not generated!

So what am I missing? any ideas?

Cheers,

Tim



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to