Werner, I've seen you on this list for a while, so I hope that I'm not
being set up with a question you already know the answer
to :-)
I'm
not an ejb guru, but it seems that a transaction manager will wrap a transaction
around the call to get the objects passed back by castor, but not the
other way around.
An object is formed by castor, when the JDO
creates a Database instance that's initialized for a given db. So it looks like
a Database object would have to be initialized for two different physical
databases if we were to query both at the same time. I don't see support for
that in the API.
I'm
guessing that you could utilize a transaction manager to have two JDOs
get the data from two Databases and mappings, and then assemble them, but that
seems like a lot of work.
Is
there a better way that you're aware of?
-richard
-----Original Message-----
From: Werner Guttmann [mailto:[EMAIL PROTECTED]
Sent: September 15, 2003 12:09 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Can Castor map objects across different db servers?
From: Werner Guttmann [mailto:[EMAIL PROTECTED]
Sent: September 15, 2003 12:09 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Can Castor map objects across different db servers?
Richard,
If that's the case, how about the following scenario.
Let's assume that one is to deploy a web app/an ejb to an app server with transactions managed by either the
container or bean-managed. In such a scenario, where the app server is fully j2ee 1.3 compliant and provides a
transaction manager, would Castor support such an enviroment where the data resides in multiple databases?
Regards
Werner
On Mon, 15 Sep 2003 10:17:35 -0700, Richard Lawson wrote:
>Castor will try to get the parent and all the child objects defined in your
>mapping within a BEGIN TRAN ... COMMIT TRAN block. So this isn't possible.
>However, if your db supports distributed transactions, then you can create a
>view to the other db to get the child table you want. That works just fine.
>-richard
>
>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: September 15, 2003 7:36 AM
>To: [EMAIL PROTECTED]
>Subject: [castor-dev] Can Castor map objects across different db
>servers?
>
>
>Hi. I have a simple question. Can I have an object whose table resides on
>database server 1 be associated with an object whose table resides on
>database server 2? Has anyone done this? If yes, would it be possible to
>explain how or show me an example?
>
>Much appreciated.
>
>Isaac
>
>-----------------------------------------------------------
>If you wish to unsubscribe from this mailing, send mail to
>[EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev
>
>-----------------------------------------------------------
>If you wish to unsubscribe from this mailing, send mail to
>[EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev
>
