Hi

I got xdoclet working with ant. I have under
com/xxx/yyy/server/ 2 beans CommandServerBean.java    and  PolicyBean.java 
when I run "ant xdoclet-generate"
It is generating 4 files for each bean 
CommandServerBean CommandServerBeanHome CommandServerBeanLocal
CommandServerBeanLocalHome
PolicyBean PolicyBeanHome PolicyBeanLocal PolicyBeanLocalHome

"=======Intresting thing is both my Bean and RemoteInterface has same
name.====="
and when i try to compile I am getting 3 types of errors

================ I get this for each of the 8 generated
files==================
compile:
    [mkdir] Created dir: C:\fnol\build\classes
    [javac] Compiling 25 source files to C:\fnol\build\classes
    [javac] C:\fnol\com\xxx\yyy\server\CommandServerBean.java:21: duplicate
cl
ass: com.ccmc.cure.server.CommandServerBean
    [javac] public class CommandServerBean implements SessionBean {
======================================================================

========================= For Both my CommandServer and
Policy=================
    [javac]
C:\fnol\build\generate\com\xxx\yyy\server\CommandServerBeanHome.ja
va:13: modifier public static not allowed here
    [javac]    public static final String
JNDI_NAME="server/CommandServerBean";
    [javac]                               ^
    [javac]
C:\fnol\build\generate\com\xxx\yyy\server\CommandServerBeanLocalHo
me.java:12: modifier public static not allowed here
    [javac]    public static final String
COMP_NAME="java:comp/env/ejb/server/Co
mmandServerBeanLocal";
    [javac]                               ^
    [javac]
C:\fnol\build\generate\com\xxx\yyy\server\CommandServerBeanLocalHo
me.java:13: modifier public static not allowed here
    [javac]    public static final String
JNDI_NAME="CommandServerLocalHome";
    [javac]                               ^
    [javac]
C:\fnol\build\generate\com\xxx\yyy\server\PolicyBeanHome.java:12:
modifier public static not allowed here
    [javac]    public static final String
COMP_NAME="java:comp/env/ejb/server/Po
licyBean";
============================================================================
===========


My build file tasks

<target name="xdoclet-generate" depends="init"> 
        <mkdir dir="${build.generate.dir}" /> 
        <ejbdoclet 
                destdir="${build.generate.dir}" 
                excludedtags="@version,@author" 
                ejbspec="${ejb.version}" 
                mergedir="${src.resources.dir}/xdoclet" 
                force="${xdoclet.force}" 
        > 
                <fileset dir="${src.main.dir}"> 
                        <include name="**/*Bean.java"/> 
                </fileset> 
                <remoteinterface/> 
                <localinterface/> 
                <homeinterface/> 
                <localhomeinterface/> 
                <entitypk/> 
                <entitycmp/> 
                <deploymentdescriptor destdir="${build.meta-inf.dir}"/> 
        </ejbdoclet> 
</target> 

<target name="compile" depends="xdoclet-generate"> 
        <mkdir dir="${build.classes.dir}"/> 
        <javac srcdir="${src.dir}" 
                destdir="${build.classes.dir}" 
                debug="on" 
                deprecation="on" 
                classpathref="build.path" 
                optimize="off" 
                includes="**/*.java"> 
                <src path="${src.dir}"/> 
                <src path="${build.generate.dir}"/> 
        </javac> 
</target> 

======================================
and in the bean I have put
====================================
/**
 * CommandServerBean is a CommandServer which accepts Command Beans from the
Client
 * call their execute method and returns back the result.
 *
 * @ejb:bean
 *     type="Stateless"
 *     name="server/CommandServerBean"
 *     local-jndi-name="CommandServerLocalHome"
 *     view-type="both"
 *
 */


=========================================
on the method i want to be in remote interface

/**
   *  The method that executes command bean.
   *
   *  @param Command inCommingCommand
   *
   *  @throws CommandException
   *  @ejb:interface-method view-type="remote"
*/

What could be the problem.
Thanks for any input.



-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to