>> Hi,
>> 
>> I'm interested in generating session facade beans
>> for my entity beans. I am 
>> using @ejb.facade in my entity bean. Xdoclet
>> generates a new bean that ends 
>> with *FacadeEJB.java in my generated code area.
>> 
>> This generated bean is also supposed to be parsed
>> with xdoclet (in a second 
>> pass), along with all of the other entity beans.
>> What I did was add another 
>> Ant target for a second xdoclet pass. However, it
>> never seems to see the 
>> *FacadeEJB.java files, even though I have them
>> specified in my build.xml.  
>> 
>> Does anyone have an example of how to do this?Not at hand ( at home ).
> 
> But basically you need to do following:
> first invocation parses just entity ebans ( with just
> one subtask ) into some directory off your source
> tree.
> Second invocation shall have referece to generated
> sources.
> 
> Can you post your build.xml?
> 
> regards,
> 
> =====
> Konstantin Priblouda ( ko5tik )    Freelance Software developer

I got this to work with the following build.xml targets. Note that my first 
pass is only the facade generation, then the second pass processes all of the 
beans, including the new facade bean. 

For some reason I had to place the generated facade bean with my other 
non-generated beans (I have ant clean it out later), and I couldn't allow the 
addedtags on it, like on my other generated classes.  Here it is:

<target name="ejbdocletfacade" depends="prepare">
                <ejbdoclet destdir="${src.dir}"
                        ejbspec="2.0"
                >
                        <fileset dir="${src.dir}">
                                <include name="**/*Bean.java"/>
                                <exclude name="**/EntityAdapterBean.java"/>
                                <exclude name="**/SessionAdapterBean.java"/>
                        </fileset>

                        <entityfacade/>
                </ejbdoclet>
        </target>

        <target name="ejbdoclet" depends="ejbdocletfacade">
                <ejbdoclet destdir="${src.generated}/java"
                        excludedtags="@version,@author"
                        addedtags="@xdoclet-generated at ${TODAY}"
                        ejbspec="2.0"
                >
                        <fileset dir="${src.dir}">
                                <include name="**/*Bean.java"/>
                                <include name="**/*EJB.java"/>
                                <exclude name="**/EntityAdapterBean.java"/>
                                <exclude name="**/SessionAdapterBean.java"/>
                        </fileset>

                        <remoteinterface/>
                        <localinterface/>
                        <homeinterface />
                        <localhomeinterface/>

                        <dataobject/>
                        <valueobject/>

                        <entitypk/>
                        <entitycmp/>
                        <entitybmp/>

                        <session/>

                        <utilobject cacheHomes="true" includeGUID="true"/>

                        <deploymentdescriptor
                                destdir="${src.generated}/ejb-jar/META-INF"/>
                </ejbdoclet>
        </target>


-- 
So far as I can remember, there is not one word in the Gospels in
praise of intelligence.
                -- Bertrand Russell



-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to