-
1. Re: Configuration for accessing two Oracle databases
earlgrey Mar 6, 2002 1:20 PM (in response to colm_daly)
Colm,
I currently use multiple dbs/datasources and I do use similar configuration in jboss.jcml.
You might not have declared your datasources in the entities jaws.xml (instead the default DS is used):
java:/MYDB1
<type-mapping>Oracle8</type-mapping>
...
Lars -
2. Re: Configuration for accessing two Oracle databases
colm_daly Mar 6, 2002 2:28 PM (in response to colm_daly)Lars,
They were not defined in jaws.xml. However it still does not work. Maybe I am doing it wrong in jaws.xml. I now have:
<!-- Original
java:/DefaultDS
<type-mapping>Hypersonic SQL</type-mapping>
false
-->
java:/MYDB1
<type-mapping>Oracle8</type-mapping>
java:/MYDB2
<type-mapping>Oracle8</type-mapping>
<default-entity>
<create-table>true</create-table>
<remove-table>false</remove-table>
<tuned-updates>false</tuned-updates>
<read-only>false</read-only>
<time-out>300</time-out>
<select-for-update>false</select-for-update>
</default-entity>
<type-mappings>
.... as before
(I also tried testdb1ds and testdb2ds instead of MYDB1 and MYDB2 above)
Colm -
3. Re: Configuration for accessing two Oracle databases
earlgrey Mar 6, 2002 3:12 PM (in response to colm_daly)Hmm,
it looks like you use multiple DS in a single ejb app?
I have several apps, however, each one uses a single (different) DS (that is declared in jaws.xml, NOT standardjaws.xml).
I have no experience with declaring multiple datasources in a single application. I do not think it will work this way:
java:/MYDB1
<type-mapping>Oracle8</type-mapping>
java:/MYDB2
<type-mapping>Oracle8</type-mapping>
Anyone else?
Lars -
4. Re: Configuration for accessing two Oracle databases
davidjencks Mar 6, 2002 7:55 PM (in response to colm_daly)I'm about 80% sure you can't do this in 2.2.2. Theres a good chance you can in 2.4.4, although you would have to declare the datasource with the ejb you want it to use. It is definitely possible with jboss 3 cmp2 -- see jbosscmp-jdbc.dtd for how.