Ah, I thought you meant separate applications.  For the same application,
I don't think it is directly possible deploy the same bean twice using
xdoclet, but I could be wrong.

I am a little unclear as to why you would want to do this in the same
application, I have a feeling you are trying to solve a different problem
by having two beans deployed, but that is the wrong solution.

Regardless, I would approach this with inheritance, so have an AnimalBean
with the methods and then an AntBean/BearBean which extends AnimalBean.
AntBean/BearBean would define the jndi name and whatever customized
properties you want.  AntBean/BearBean would probably not have any
methods, but it will accomplish what you want.

I did not verify that this works but I think this is the way to go.

Ben


On Thu, 26 Aug 2004, Sean Radford wrote:

> Ben Litchfield wrote:
>
> >In your EJB declare your jndi like this
> >
> >@ejb.bean type="Stateless"
> >  jndi-name="${jndi-prefix}/UserController"
> >
> >Then in your build.xml have a property like
> >
> ><property name="jndi-prefix" value="myfirstApp" />
> >
> >xdoclet will do a replacement on that value.
> >You would need to set the jndi-prefix value depending on what you wanted
> >the jndi name to be.
> >
> >Ben
> >
> >
> But if I need my Animal EJB to be deploy at:
>
> com/acme/zoo/AntEJB with an environment entry of java:/com/env/who =
> i-am-an-ant
>
> and also at:
>
> com/acme/zoo/BearEJB with an environment entry of java:/com/env/ =
> i-am-a-bear
>
> within the same application?
>
>
>
>
> >On Thu, 26 Aug 2004, Sean Radford wrote:
> >
> >
> >
> >>Hi,
> >>
> >>How can I (of just can I) tell xdoclet that I want one of my ejb's is to
> >>be deployed to 2 (or more) different JNDI locations (each with their own
> >>environment entries)?
> >>
> >>Or do I have to resort to merge-files, and if so can I tell xdoclet to
> >>create my ejb's classes but not worry about its deployment descriptor
> >>(and leave that just to the merge file)?
> >>
> >>Thanks in advance,
> >>
> >>Sean
> >>
> >>--
> >>Dr. Sean Radford, MBBS, MSc
> >>[EMAIL PROTECTED]
> >>http://bladesys.demon.co.uk/
> >>
> >>
> >>
> >>-------------------------------------------------------
> >>SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
> >>100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
> >>Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
> >>http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> >>_______________________________________________
> >>xdoclet-user mailing list
> >>[EMAIL PROTECTED]
> >>https://lists.sourceforge.net/lists/listinfo/xdoclet-user
> >>
> >>
> >>
> >
> >
> >-------------------------------------------------------
> >SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
> >100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
> >Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
> >http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> >_______________________________________________
> >xdoclet-user mailing list
> >[EMAIL PROTECTED]
> >https://lists.sourceforge.net/lists/listinfo/xdoclet-user
> >
> >
> >
>
>
> --
> Dr. Sean Radford, MBBS, MSc
> [EMAIL PROTECTED]
> http://bladesys.demon.co.uk/
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
> Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> _______________________________________________
> xdoclet-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/xdoclet-user
>


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to