Hi,
do you eally nead two different Datasource, or do you want to access two
different Tables of the same database? In the second case you dont need a
second DS. However if you need to have to diffeerent DBs accessed you need
to set the <mbean .... name=Poolname1"> and I would recoment to set
<attribute name="PoolName">Poolname1</attribute> for Pool1 and <mbean ....
name=Poolname2"> and <attribute name="PoolName">Poolname2</attribute> for
Pool2.
These Pools should be mapped to jdbc/Pool1 and jdbc/Pool2 in jboss.xml and
can then be looked up as Object obj = new
InitialContext().lookup("java:/comp/env/jdbc/Pool1");
Hope this helps..
Burkhard
----- Original Message -----
From: "still" <[EMAIL PROTECTED]>
To: "jboss-user" <[EMAIL PROTECTED]>
Sent: Sunday, July 01, 2001 6:15 PM
Subject: [JBoss-user] how to configure mutiple datasource in jboss.jcml


who could tell me how the jboss.jcml should be like if i want to use 2
jdbc:odbc datasource in jboss?
how will the mbean look like?
The 2 datasource use the same database driver: jdbc:odbc
suggest there is 2 entitybean .each one presents  a table in its datasource.

entitybeanA :  jdbc:odbc:test1  ,tablename: testtable1
entitybeanB:   jdbc:odbc:test2  ,tablename: testtable2

i had thought the following code will be ok:
<mbean code="org.jboss.jdbc.XADataSourceLoader" name=
DefaultDomain:service=XADataSource,name=JetEngineDB">
 <attribute name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper
XADataSourceImpl</attribute>
 <attribute name="PoolName">InterBaseDS</attribute>
 <attribute name="URL">jdbc:odbc:ejbdatasouce11</attribute>
  <attribute name="JDBCUser"></attribute>
 <attribute name="Password"></attribute>
 </mbean>

<mbean code="org.jboss.jdbc.XADataSourceLoader" name=
DefaultDomain:service=XADataSource,name=JetEngineDB">
 <attribute name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper
XADataSourceImpl</attribute>
 <attribute name="PoolName">InterBaseDS</attribute>
 <attribute name="URL">jdbc:odbc:ejbdatasouce22</attribute>
  <attribute name="JDBCUser"></attribute>
 <attribute name="Password"></attribute>
 </mbean>

but however it doesn't work.
how can i configure the jbss.jcml file .
thx in advance

reply to [EMAIL PROTECTED]


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to