Re: Ejb Deployment with different datasource

Juan Pablo Lorandi <[email protected]>
Newsgroups gmane.comp.java.sun.ejb.general
Organization CodeFoundry LTD
Message-ID <002301c35c46$ed576660$0a00a8c0@rifle>
I guess it depends a lot on how the CMP engine manages relationships;
You could just spawn a lot of app server instances and deploy your app
in each. It's the most dirty way to go about it, but probably the
quickest.

Of course with a lot of app servers this isn't feasible unless you've
got a Cray computer. It's likely to work with 100% Java servers(Orion,
JBoss, Pramati, Weblogic).

My 2c,

Juan Pablo Lorandi
Chief Software Architect
Code Foundry Ltd.
[email protected]

Barberstown, Straffan, Co. Kildare, Ireland.
Tel: +353-1-6012050  Fax: +353-1-6012051
Mobile: +353-86-2157900
www.codefoundry.com


> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[email protected]] On Behalf Of Alex Paransky
> Sent: Tuesday, August 05, 2003 5:20 AM
> To: [email protected]
> Subject: Re: Ejb Deployment with different datasource
>
>
> This is the only way that I know of doing this in EJB.  There
> are some negative implications with this:
>
> 1. You really have to deploy another bean with a different
> JNDI name for each datasource 2. Your code, in your client
> application will have to resolve/use different EJB beans. 3.
> If you are using Container Managed Relationships, they would
> have to be re-stated for each bean you deploy
>      a. Any bean which relates to this bean, would have to
> have different relationships specified
>      b. If you relating from this bean to other beans, you
> will need to restate relationships for each bean deployed
> with a different data source
>
> If you are using BMP, then you could encode the datasource in
> the key. Then using the key, you can get the proper resource
> and read from the right database.  Implementing finders,
> however, would be interesting, since you would need to query
> all the datasources.  This might be what you want, or not.
>
> In general, I don't believe there is a nice way to deal with
> this issue in J2EE.
>
> Perhaps you could re-think this requirement and find a
> different method of implementing this task.
>
> Good luck.
>
> --
> -AP_
> http://www.myprofiles.com/member/profile/apara_personal
> http://www.myprofiles.com/member/profile/apara_business
>
>
> Vikram Naik wrote:
>
> > Hello People,
> >
> >     We have a requirement for deploying same ejb multiple
> times with
> > different datasources. I think we can achieve this by deploying the
> > same bean with different datasources with different JNDI
> names. Please
> > suggest your views or implications for doing so .
> >
> > Regards,
> > Vikram Naik
> >
> ======================================================================
> > =====
> > To unsubscribe, send email to [email protected] and
> include in the
> > body of the message "signoff EJB-INTEREST". For general help, send
> > email to [email protected] and include in the body of
> the message
> > "help".
> >
>
> ==============================================================
> =============
> To unsubscribe, send email to [email protected] and
> include in the body of the message "signoff EJB-INTEREST".
> For general help, send email to [email protected] and
> include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[email protected] and include in the body of the message "help".
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.