[EMAIL PROTECTED] wrote:
> I'm sorry, I really don't understand.  can you provide a working
> example please?

When you generate your remote/local interfaces, homes and deployment
descriptors, you use the <ejbdoclet> task to process a <fileset> that
includes your beans. If you want to generate session facades for your
entity beans, you must *first* use <ejbdoclet> to process a <fileset>
containing only the beans, and you should only have the <sessionfacade>
subtask under <ejbdoclet> for that first pass. Then you go through your
normal task that generates the other stuff from that and your other
beans.

Here's a snippet from my build.xml:

    <!-- Generate entity bean facade session beans -->
    <target name="gen-facades" 
            depends="init" 
            description="Generate EJB interfaces, homes and
descriptors">
        
        <ejbdoclet destdir="${gen.dir}"
                   excludedtags="@author,@todo"
                   addedtags="@xdoclet-generated at ${TODAY}"
                   ejbspec="2.0"
        >
            <fileset dir="${src.dir}">
                <!-- No point in pulling in session and message-driven
beans -->
                <include name="dd/ejb/entity/**/*EJB.java"/>
            </fileset>
            <entityfacade/>
        </ejbdoclet>
    </target>

    <!-- Generate EJB interfaces, homes and descriptors -->
    <target name="ejbdoclet" 
            depends="init" 
            description="Generate EJB interfaces, homes and
descriptors">
        
        <ejbdoclet destdir="${gen.dir}"
                   excludedtags="@author,@todo"
                   addedtags="@xdoclet-generated at ${TODAY}"
                   ejbspec="2.0"
        >
            <fileset dir="${src.dir}">
                <include name="dd/ejb/**/*EJB.java"/>
            </fileset>
            
            <remoteinterface pattern="{0}"/>
            <localinterface pattern="{0}Local"/>
            
            <homeinterface pattern="{0}Home"/>
            <localhomeinterface pattern="{0}LocalHome"/>
            
            <utilobject cachehomes="true" kind="physical"/>
            
            <deploymentdescriptor destdir="${gen.meta.dir}"
validateXML="true"/>
            <weblogic version="7.0"
                      destdir="${gen.meta.dir}"
                      validateXML="true"
                      datasource="@identity_app.db.datasource@"
                      persistence="weblogic"
            />
        </ejbdoclet>
    </target>

To do both passes, use a target like this:

    <!-- Generate all EJB stuff via XDoclet -->
    <target "gen-all" depends="gen-facades, ejbdoclet">
        <!-- All done through depends -->
    </target>

David Harkness
Sr. Software Engineer
Sony Pictures Digital Networks
(310) 482-4756


-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to