Hi there again!
Ok.Ok. A clear case of RTFM:
If somebody is interested in: That's the way it works:
file1:
<database name="test1" engine="oracle">
<driver class-name="com.codestudio.sql.PoolMan"
url="jdbc:poolman://poolman-db-name1"/>
<mapping href="test1.xml"/>
<mapping href="test2.xml"/>
<mapping href="test3.xml"/>
</database>
file2:
<database name="test2" engine="oracle">
<driver class-name="com.codestudio.sql.PoolMan"
url="jdbc:poolman://poolman-db-name2"/>
<mapping href="test1.xml"/>
<mapping href="test2.xml"/>
<mapping href="test3.xml"/>
</database>
best regards
have fun
ChrisC
-----Original Message-----
From: Cerny Christian [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 25, 2002 5:40 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] multiple poolman datasources and
castor-database s
Hi Bruce !
Thanks for your answer !
I took a look in the code and found out exactly, what you telling me.
I found some config files similar to the following on the list regarding
castor and poolman before:
<database name="test1" engine="oracle">
<data-source class-name="com.codestudio.sql.PoolManDataSource">
<params database-name="test1"/>
</data-source>
<mapping href="....file1.xml"/>
<mapping href="....file2.xml"/>
</database>
This made my thinking the dbname to use could be specified ->
But in real life the nested <params ...> section is completely obsolet and
ignored in any case !
If I got it right PoolManDataSource (and any other data-source class) is
instanciated with it's empty constructor in ...jdo.conf.DataSource.java.
In this case (I guess) PoolManDataSource uses the first entry in the
poolman.xml.
Does anybody know wether it's possible to configure poolman like a "normal"
jdbc Driver with Castor ?
If this is possible, the poolman-db-name could be passed over in the
jdbc-url .... ? Could it ?
best regards
ChrisC
-----Original Message-----
From: Bruce Snyder [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 25, 2002 5:20 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] multiple poolman datasources and
castor-databases
This one time, at band camp, Cerny Christian said:
CC>I have 2 different Oracle DBs which i want to connect thru 2 different
CC>poolman Datasources with castor.
CC>For achiving this i have an poolman.xml file defining the two pools and
CC>there names.
CC>Futhermore I'm generating two jdo-conf files on the fly and pass it to
JDO.
CC>The problem now is that castor always uses the same poolman pool.
CC>Castor does use the right jdo-conf for the database-name (tries to map on
CC>wrong tables cause of the wrong mapping files read ...),
CC>but it always uses the first pool in poolman.xml !
CC>If I do tests with poolman standalone, I'am able to lookup and use
different
CC>pools in the poolman config.
CC>How does castor lookup the datasource ? Do I have any configuration
issues ?
CC>Wrong params in the DataSource Config ?
CC>
CC>Any ideas ? thanks for your help !
Christian,
Castor simply uses the DataSource that is specified in the database
descriptor. As for looking up the correct dbname in the PoolMan
descriptor, that should be the job of PoolMan. I've used PoolMan
quite a bit, but not in this manner. I'll bet that there are accessor
and mutator methods on PoolMan's metadata for the dbname. However,
because Castor does not provide a facility for passing arguments
down to PoolMan describing which dbname to utilize, it seems like
PoolMan would simply make use of the first one in its descriptor.
I'm only guessing but I'll bet that the problem lies here.
As for a solution, if you're so inclined, dig into the code to see
if you can design a nonintrusive fix. However, I can tell you that
Castor can currently only make use of one database in the space of
a single transaction.
Bruce
--
perl -e 'print
unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
-----------------------------------------------------------
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
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev