Hi everyone,

Thanks Lawrence for the reply. Lawrence's general concept works since I had
tried a little bit different variation. What I did was to create two
separate jar files with same ejbs in it but with different orion-ejb-jar.xml
files and mapping to different URLs. I think that his idea is better since
it involves less work.

Even though it works, the issues I see:
1. Maintainability as servers are added/removed
2. Overhead in the run-time environment

I did some research and somewhere saw that there is a possibility to change
the datasource object. This solution can only work if there are separate
datasource objects for each client. From whatever I have been able to gather
so far, it seems that there is one datasource object for each home object.
It also seems that there is only one home instance regardless of the number
of beans. Please correct me if this is not the case and there is a
possbility that this will work.

Other option I thought about was to use JNDI and map
java:comp/env/jdbc/DSName to a datasource and specify this in
orion-ejb-jar.xml. The question here is that is this for each client/session
or only once for each EJB type. If it is for each client, I could change
this in the InitialContext before I called lookup(home).

Lastly, I had also seen that there is a possibility to write your own
DataSource implementation. Does anybody have any examples for how to do
this? Also, is it possible for a datasource implementation to look at
session values.

I'll appreciate any help.

TIA,
Deepak

-----Original Message-----
From: Lawrence Fry [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 21, 2000 11:28 PM
To: Orion-Interest
Subject: RE: Deploying same set of EJBs on single Orion Server but
multiple data servers


Deepak,

I believe you can create a separate data-source for each server, and put
this in the data-source.xml. Then use a 1-1 mapping between each entity bean
and the data-source. If you already have your entity bean(s) (I would use
some kindof simple naming convention for your entity bean(s) to reflect
their the server mybean1, mybean2, mybean3, etc. the only difference between
them is their reference to each separate data-source), you can use your
session bean to select which of the entity bean's to grab. Of course, you
would then have to properly describe each of these in your ejb-jar.xml and
application.xml.

Its brute force, but its gotta work.

Regards,

Lawrence




-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Goel, Deepak
Sent: Thursday, September 21, 2000 6:39 PM
To: Orion-Interest
Subject: Deploying same set of EJBs on single Orion Server but multiple
data servers


Hello everyone,

I have a set of EJBs which I have finally managed to run on Orion. Now, I
want that the database server to which these EJBs talk be changed
dynamically at run-time.

For example, I have about 10-15 servers all having exactly the same database
schema. Now depending on the client request, when I want to instantiate an
EJB I may have to look up at any of these 10-15 servers.

I know that this is not specific to Orion but I'll appreciate any help on
how to do this with Orion.

TIA,
Deepak Goel


Reply via email to