What a strange request! ejb-jar.xml is generated by ejb_jar-xml.j
template file (and also some other template files it merges in). There
we do <XDtClass:forAllClasses type="javax.ejb.SessionBean"> for session
beans to generate <session/> elements and so on for other beans like
that. So if you want to change this template to work in a per class
manner then you should change it and remove those lines and assume
always one current class exists. You should also change the template
invoker to let it know that it should operate in per class mode rather
than for all. By convention Xdoclet assumes you want per class if you
set the destinationFile parameter to something like "{0}Home" like you
see for <homeinterface/> subtask. {0} is substituted by symbolic class
name of that bean (ejb name). I think you don't want to see something
like MyBean-ejb-jar.xml but rather ejb-jar.xml put into different
folders. So instead of changing destinationFile to contain a {0} to put
in into per-class mode create your own subtask derived from
Xdoclet.ejb.EjbDotXmlSubTask and just override isGenerationPerClass()
method to return always true and modify EjbDocletTask to create your
derived subtask instead of the original EjbDotXmlSubTask instance. But
if you can accept MyBean-ejb-jar.xml output then no need for
overriding/etc (a <copy/> in Ant will handle the renaming part), just
make a copy of ejb-jar_xml.j and modify it, remove forAllClasses lines,
set destinationFile param of <deploymentdescriptor/> subtask to
{0}-ejb-jar.xml and inform this subtask to use your template instead of
the original one by templateFile parameter.Hope it was helpful. Ara. > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:xdoclet-user- > [EMAIL PROTECTED]] On Behalf Of [EMAIL PROTECTED] > Sent: Monday, December 10, 2001 6:00 PM > To: [EMAIL PROTECTED] > Subject: [Xdoclet-user] unique deployment descriptors for each bean? > > > > Hi, > > I'm hoping to generated single deployment descriptors for each bean that I > use > XDoclet to build. > > At the moment I can only see how to use XDoclet to generate aggregated dds > - ie > deployment descriptors that deal with all my beans. > > Thus instead of : > project/meta-inf/ejb-jar.xml > project/beanA > project/beanB > > I'd like to generate: > project/beanA/meta-inf/ejb-jar.xml > project/beanB/meta-inf/ejb-jar.xml > > > This way I can deploy beans atomically rather than as part of a bag of > beans. > > I thought about extending EjbDocletTask to get this functionality - > perhaps I > don't need to? > > Any one solved this? > > Many thanks, > > Miles > > > > > > *******************Internet Email Confidentiality > Footer******************* > > > Privileged/Confidential Information may be contained in this message. If > you > are not the addressee indicated in this message (or responsible for > delivery of > the message to such person), you may not copy or deliver this message to > anyone. > In such case, you should destroy this message and kindly notify the sender > by > reply email. Please advise immediately if you or your employer does not > consent > to Internet email for messages of this kind. Opinions, conclusions and > other > information in this message that do not relate to the official business of > my > firm shall be understood as neither given nor endorsed by it. > > > > _______________________________________________ > Xdoclet-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/xdoclet-user _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com _______________________________________________ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
