On behalf of Dmitri, pls c below
-----Original Message-----
From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
Sent: August 22, 2001 3:23 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [Xdoclet-user] ref-name for ejb-external-ref
this got bounced from the list... Chris if it gets bounced again (if you
dont see it on the list) could you post it for me please?
cheesr
dim
On Thu, 23 Aug 2001, Dmitri Colebatch wrote:
> Chris,
>
> ok - that makes it easy... right, I'm about to cut'n'paste from
> ejb-jar_xml.j but the lines will no doubt be wrapped a lot, so excuse the
> appearance!
>
> <EJBDoclet:forAllEJBRefs>
> <ejb-ref>
> <ejb-ref-name><EJBDoclet:ifHasClassTag
> tagName="ejb:ejb-ref" paramName="ref-name"
paramNum="1">ejb/<EJBDoclet:classTagValue
> tagName="ejb:ejb-ref" paramName="ref-name"
paramNum="1"/></EJBDoclet:ifHasClassTag><EJBDoclet:ifDoesntHaveClassTag
> tagName="ejb:ejb-ref" paramName="ref-name"
paramNum="1">ejb/<EJBDoclet:classTagValue
> tagName="ejb:ejb-ref" paramName="ejb-name"
paramNum="0"/></EJBDoclet:ifDoesntHaveClassTag></ejb-ref-name>
> <ejb-ref-type><EJBDoclet:beanType/></ejb-ref-type>
> <home><EJBDoclet:homeClass/></home>
> <remote><EJBDoclet:remoteClass/></remote>
> <ejb-link><EJBDoclet:classTagValue
> tagName="ejb:ejb-ref" paramName="ejb-name" paramNum="0"/></ejb-link>
> </ejb-ref>
> </EJBDoclet:forAllEJBRefs>
> <EJBDoclet:forAllClassTags tagName="ejb:ejb-external-ref">
> <ejb-ref>
> <ejb-ref-name>ejb/<EJBDoclet:classTagValue
> tagName="ejb:ejb-external-ref" paramName="ejb-name"
paramNum="0"/></ejb-ref-name>
> <ejb-ref-type><EJBDoclet:classTagValue
> tagName="ejb:ejb-external-ref" paramName="type"
paramNum="1"/></ejb-ref-type>
> <home><EJBDoclet:classTagValue
> tagName="ejb:ejb-external-ref" paramName="home" paramNum="2"/></home>
> <remote><EJBDoclet:classTagValue
> tagName="ejb:ejb-external-ref" paramName="remote" paramNum="3"/></remote>
> </ejb-ref>
> </EJBDoclet:forAllClassTags>
>
>
> thats the bit where the ejb-refs are put in. now the first bit is what
> happens when you use a normal ref, and the second bit for an external
> ref. as you can see, for a normal ref, the ejb-ref-name comes from
>
> ejb/<EJBDoclet:classTag
> tagName="ejb:ejb-ref" paramName="ref-name" paramNum="1"/>
>
> however, for ejb-external-ref it comes from
>
> <EJBDoclet:classTagValue
> tagName="ejb:ejb-external-ref" paramName="ejb-name" paramNum="0"/>
>
> so the template needs to be fixed to take into account the case where
> ejb-name _is_ specified... If you replace the template code inside
> ejb-ref-name for the external ref with the code inside ejb-name for the
> local case, then you should have fixed your problem - and a bug (o:
>
> I will have a look to check if that is the same in the current XDoclet
> template so that when we release 1.0 it works fine.
>
> cheers
> dim
>
>
> On Wed, 22 Aug 2001 [EMAIL PROTECTED] wrote:
>
> > Hi Dmitri,
> >
> > Thanks for your reply! Actually, I already tried to specify ref-name
with
> > the prefix value. However, it seems that I got different results for
tag
> > @ejb:ejb-external-ref and @ejb:ejb-ref as follows. Any ideas about this
> > discrepancy? Am I missing sth?
> >
> > Thanks in advance!
> >
> > ===========
> > doclet-tag:
> > ===========
> > * @ejb:ejb-external-ref ejb-name="CounterEJB"
ref-name="global/Counter"
> > type="Entity" home="com.evermind.ejb.CounterHome"
> > remote="com.evermind.ejb.Counter"
> >
> > ==============================
> > generated code in ejb-jar.xml:
> > ==============================
> > <ejb-ref>
> > <ejb-ref-name>ejb/CounterEJB</ejb-ref-name>
> > <ejb-ref-type>Entity</ejb-ref-type>
> > <home>com.evermind.ejb.CounterHome</home>
> > <remote>com.evermind.ejb.Counter</remote>
> > </ejb-ref>
> >
> > however, for non-external ref, it works!
> > ^^^^^^^^^^^^
> >
> > ===========
> > doclet-tag:
> > ===========
> > * @ejb:ejb-ref ejb-name="Commodity" ref-name="global/Commodity"
> > ==============================
> > generated code in ejb-jar.xml:
> > ==============================
> > <ejb-ref>
> > <ejb-ref-name>ejb/global/Commodity</ejb-ref-name>
> > <ejb-ref-type>Entity</ejb-ref-type>
> > <home>com.abc.global.ejb.entity.CommodityHome</home>
> > <remote>com.abc.global.ejb.entity.Commodity</remote>
> > <ejb-link>Commodity</ejb-link>
> > </ejb-ref>
> >
> > -----Original Message-----
> > From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
> > Sent: August 20, 2001 8:30 AM
> > To: [EMAIL PROTECTED]
> > Cc: [EMAIL PROTECTED]
> > Subject: RE: [Xdoclet-user] ref-name for ejb-external-ref
> >
> >
> > Chris,
> >
> > ejb-body.j is new to XDoclet, but you can find the same code in
> > ejb-jar_xml.j in EJBDoclet 1.2 - its just a way of breaking the
templates
> > into smaller chunks.
> >
> > Ok - I'm not 100% about this as its been a while since I've used 1.2,
> > but... I think if you add ref-name="global/Foo" to your @ejb:ejb-ref tag
> > then you will be able to reference it by
> > "java:comp/env/ejb/global/Foo". As I said, not 100% sure about
> > that... but give it a burl... probably also worth sticking your head in
> > the template files... look in src/ejbdoclet/ejb-jar_xml.j and search for
> > ejb/ and you'll see the relevant part of the ejb-jar.xml.
> >
> > hth,
> > cheesr
> > dim
> >
> > On Mon, 20 Aug 2001 [EMAIL PROTECTED] wrote:
> >
> > > Hi Dmitri and Ara,
> > >
> > > Thanks for your replies! Actually, we have several modules of ejb.
Thus,
> > > we would like to have sth like this for the ejb-name prefix - i.e.
> > > ejb/[module name] (e.g. ejb/global, ejb/inventory, etc.). Sorry about
my
> > > previous misleading explanation 8(
> > >
> > > P.S.
> > > I'm still using ejbDoclet 1.2, is ejb-body.j included in xdoclet only?
> > >
> > > Thanks again 8)
> > >
> > > Chris
> > >
> > > -----Original Message-----
> > > From: Ara Abrahamian [mailto:[EMAIL PROTECTED]]
> > > Sent: August 17, 2001 10:05 PM
> > > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > > Subject: RE: [Xdoclet-user] ref-name for ejb-external-ref
> > >
> > >
> > > > I know how to setup the [ref-name: String] for tag @ejb:ejb-ref.
> > > However,
> > > > anyway that I can setup the same thing for @ejb:ejb-external-ref
> > > (instead
> > > > of
> > > > using the default ejb-name prefixed by a ejb/)?
> > >
> > > You mean you want to get rid of the ejb/ which is automatically
> > > prefixed?
> > >
> > > If using XDoclet:
> > > Modify xdoclet/core/resources/xdoclet/ejb/ejb-body.j and delete ejb/
> > > from line 198. Then build and create xdoclet.jar. If you do not want
to
> > > build xdoclet, you can make a copy of it, modify it, and then specify
it
> > > as the template (<deploymentdescriptor templatedir="mytemplate"
.../>).
> > >
> > > Ara.
> > >
> > >
> > > _________________________________________________________
> > > Do You Yahoo!?
> > > Get your free @yahoo.com address at http://mail.yahoo.com
> > >
> > > _______________________________________________
> > > Xdoclet-user mailing list
> > > [EMAIL PROTECTED]
> > > http://lists.sourceforge.net/lists/listinfo/xdoclet-user
> > >
> >
> > _______________________________________________
> > Xdoclet-user mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/xdoclet-user
> >
>
>
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/xdoclet-user