Author |
Message
|
zpat |
Posted: Tue Aug 30, 2011 1:48 am Post subject: WMB 7 - turning transaction mode off in JCN |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
WMB 7002, AIX, Oracle 10
In a compute node, there is a propery of transaction mode, which can be auto or commit.
In a Java Compute Node there is no such property.
This JCN needs to use a type 4 JDBC connection, how can I make it use it outside of syncpoint?
I don't want it to inherit the flow transaction mode. I want to access the data source non-transactionally. |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Aug 30, 2011 2:33 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Section 3 of this http://www.precisejava.com/javaperf/j2ee/JDBC.htm might prove useful. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
zpat |
Posted: Tue Aug 30, 2011 2:41 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Thanks
The java code does this:
Code: |
conn = (OracleConnection)getJDBCType4Connection("ZZZZZZ",
JDBC_TransactionType.MB_TRANSACTION_AUTO); |
Which is apparently the only option. The BAR file has "coordinated transaction mode" not set.
Not only it is trying to run transactionally, but it looks like it is trying to do a XA transaction as well.
This is the error
Quote: |
Aug 26 10:31:39 xxxx user:info WebSphere Broker v7002[741426]:
(XXX.yyy)[4887]BIP4362E: Java node error: Caught unexpected
XAException. Message: null Error code: -7 Oracle ErrorCode: 24756. :
XXX.9aea4013-2e01-0000-0080-89230894d52c:
/build/S700_P/src/DataFlowEngine/NativeTrace/ImbNativeTrace.cpp: 698:
JDBCType4SinglePhaseTrxnhandlerErrors::logXAException(): :
Aug 26 10:31:39 xxxx user:info WebSphere Broker v7002[741426]:
(XXXX.yyy)[4887]BIP4362E: Java node error: Error Committing
Transaction for JDBC DataSourceName ZZZZZZ. : XXX.9aea4013-2e01-
0000-0080-89230894d52c:
/build/S700_P/src/DataFlowEngine/NativeTrace/ImbNativeTrace.cpp: 698:
JDBCType4SinglePhaseTrxnTable::commit: :
|
And here is the JDBC service set up
Quote: |
export BROKER=XXX
export DSN=ZZZZZZ
export UID=UUU
export PWD=PPP
mqsideleteconfigurableservice $BROKER -c JDBCProviders -o $DSN
mqsicreateconfigurableservice $BROKER -c JDBCProviders -o $DSN
mqsichangeproperties $BROKER -c JDBCProviders -o $DSN -n databaseType -v "Oracle"
mqsichangeproperties $BROKER -c JDBCProviders -o $DSN -n databaseName -v "ZZZZZZ"
mqsichangeproperties $BROKER -c JDBCProviders -o $DSN -n databaseVersion -v "10.2"
mqsichangeproperties $BROKER -c JDBCProviders -o $DSN -n connectionUrlFormatAttr1 -v "TTTT"
mqsichangeproperties $BROKER -c JDBCProviders -o $DSN -n serverName -v "hostname.domain.com"
mqsichangeproperties $BROKER -c JDBCProviders -o $DSN -n securityIdentity -v "Ora_Security"
mqsichangeproperties $BROKER -c JDBCProviders -o $DSN -n portNumber -v "1523"
mqsichangeproperties $BROKER -c JDBCProviders -o $DSN -n jarsURL -v "/home/xxx/yyy"
mqsichangeproperties $BROKER -c JDBCProviders -o $DSN -n type4DatasourceClassName -v "oracle.jdbc.xa.client.OracleXADataSource"
mqsichangeproperties $BROKER -c JDBCProviders -o $DSN -n type4DriverClassName -v "oracle.jdbc.OracleDriver"
mqsichangeproperties $BROKER -c JDBCProviders -o $DSN -n connectionUrlFormat -v "jdbc:oracle:thin:[user]/[password]@[serverName]:[portNumber]:[connectionUrlFormatAttr1]"
mqsisetdbparms $BROKER -n jdbc::Ora_Security -u $UID -p $PWD |
|
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Aug 30, 2011 4:30 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
In general, you have to perform your own compensating transactions in the event of a rollback. Once the execution focus moves past the JCN to other nodes, if you need to rollback, you need to manually code compensation in your error handler. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
zpat |
Posted: Tue Aug 30, 2011 4:45 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
I don't want a rollback (this is actually read only), I just want the JCN to work!
I don't want or need any transactionality. I can't find how to stop it trying. |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Aug 30, 2011 5:07 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Hmmm...
As this is READONLY, are you sure you don't want just to stop ROW/Table locking?
AFAIK, the only transactionality in a DB Read is to release the inherrent locks. So if you deliberately code the SQL to read without locking won't that do the same job for you? _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
zpat |
Posted: Tue Aug 30, 2011 5:47 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
It's calling a stored procedure. It's not my code - I just get asked to make it work! |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Aug 30, 2011 5:51 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
|
Back to top |
|
 |
francoisvdm |
Posted: Thu Sep 29, 2011 9:19 am Post subject: |
|
|
Partisan
Joined: 09 Aug 2001 Posts: 332
|
I'm seeing the same now in some of our code, also stored procedure involved. Is there a solution? _________________ If you do not know the answer or you get the urge to answer with "RTFM" or "Search better in this forum", please refrain from doing so, just move on to the next question. Much appreciated.
Francois van der Merwe |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Sep 29, 2011 9:49 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Speak to your DBA's. The stored proc may well benefit from some TLC especially wrt read locks. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
francoisvdm |
Posted: Fri Sep 30, 2011 2:04 am Post subject: |
|
|
Partisan
Joined: 09 Aug 2001 Posts: 332
|
Current applications using the stored proc works fine, so DBAs say "problem in message broker" _________________ If you do not know the answer or you get the urge to answer with "RTFM" or "Search better in this forum", please refrain from doing so, just move on to the next question. Much appreciated.
Francois van der Merwe |
|
Back to top |
|
 |
smdavies99 |
Posted: Fri Sep 30, 2011 3:55 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
francoisvdm wrote: |
Current applications using the stored proc works fine, so DBAs say "problem in message broker" |
They would say that wouldn't they??????
Time to turn on ODBC tracing. I've used this to find DB locks in the past. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
rrydziu |
Posted: Wed Dec 21, 2011 6:25 am Post subject: |
|
|
Newbie
Joined: 21 Dec 2011 Posts: 8
|
|
Back to top |
|
 |
|