-
1. Re: enlist of resource failed with Oracle
marklittle Dec 1, 2006 6:04 AM (in response to vassilidzuba)As you'll see on page 29 of the JTA Programmers Guide, we no longer recommend the dyanmicClass way of accessing JDBC drivers outside of the application server. You should be using JNDI.
-
2. Re: enlist of resource failed with Oracle
vassilidzuba Dec 1, 2006 8:22 AM (in response to vassilidzuba)OK, i'll try that.
BTW, by putting the user/password in the URL, it works :Connection conn = arjunaJdbcDriver.connect("jdbc:arjuna:jdbc:oracle:thin:foo/bar@xxxx:521:yyyy", dbProps1);
-
3. Re: enlist of resource failed with Oracle
vassilidzuba Dec 1, 2006 10:08 AM (in response to vassilidzuba)I recoded the program to use JNDI with a JNP provider
and it works.
Thanks for the tip.
Vassili -
4. Re: enlist of resource failed with Oracle
marklittle Dec 1, 2006 10:11 AM (in response to vassilidzuba)Glad to know. The other way is pretty much deprecated and only guaranteed to work with much older drivers.
-
5. Re: enlist of resource failed with Oracle
vassilidzuba Dec 1, 2006 10:40 AM (in response to vassilidzuba)well, i was too optimistic...
i had left the user/password in the URL when building the datasource.
When i remove them or do not specify explicitely the url, the program
fails the same way as before.
as far as i understand it, the problem lies in
function TxInfo.isNewRM. The call to x.isSameRM(xaRes)
at line 1453 returns true while it probably should return false.
x and xaRes are instances of T4CXAResource, which is a class private to the Oracle JDBC driver
it seems that the function compares the URL, while ignoring the user name. -
6. Re: enlist of resource failed with Oracle
marklittle Dec 1, 2006 10:47 AM (in response to vassilidzuba)Whatever the isSameRM does is up to the implementation to decide. The TM has to rely upon it returning the correct value. If you think the isSameRM is wrong, then it may be worth checking the Oracle bug system.
-
7. Re: enlist of resource failed with Oracle
marklittle Dec 1, 2006 10:51 AM (in response to vassilidzuba)"vassilidzuba" wrote:
well, i was too optimistic...
i had left the user/password in the URL when building the datasource.
When i remove them or do not specify explicitely the url, the program
fails the same way as before.
What is the failure message this time? Fairly obviously you will need to provide a username/password valid for the DB you are trying to connect to. -
8. Re: enlist of resource failed with Oracle
jhalliday Dec 1, 2006 11:21 AM (in response to vassilidzuba)isSameRM in Oracle drivers is basically 'return conn1.getURL() == conn2.getURL()'
Hence where the username/pass are part of the URL you get different behavior to the situation where they are properties. I suspect weird things will also happen if you have the hostname in one URL but an equiv IP address in the other. How we should handle this Oracle oddity is a subject for debate. By and large we can't go around second guessing a database's own drivers. For now, just put the username at least into the URL.
Jonathan. -
9. Re: enlist of resource failed with Oracle
weston.price Dec 1, 2006 1:05 PM (in response to vassilidzuba)We actually have to workaround this issue in JBossAS both for Oracle and WebSphereMQ. There is an override flag to accomodate this.