ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » WMB 7 - turning transaction mode off in JCN

Post new topic  Reply to topic
 WMB 7 - turning transaction mode off in JCN « View previous topic :: View next topic » 
Author Message
zpat
PostPosted: Tue Aug 30, 2011 1:48 am    Post subject: WMB 7 - turning transaction mode off in JCN Reply with quote

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
View user's profile Send private message
smdavies99
PostPosted: Tue Aug 30, 2011 2:33 am    Post subject: Reply with quote

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
View user's profile Send private message
zpat
PostPosted: Tue Aug 30, 2011 2:41 am    Post subject: Reply with quote

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
View user's profile Send private message
lancelotlinc
PostPosted: Tue Aug 30, 2011 4:30 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
zpat
PostPosted: Tue Aug 30, 2011 4:45 am    Post subject: Reply with quote

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
View user's profile Send private message
smdavies99
PostPosted: Tue Aug 30, 2011 5:07 am    Post subject: Reply with quote

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
View user's profile Send private message
zpat
PostPosted: Tue Aug 30, 2011 5:47 am    Post subject: Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Tue Aug 30, 2011 5:51 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

a quick google found this: not necessarily up to date, but a place to start.
http://community.ingres.com/forum/ingres-database-contributions/966-jdbc-default-locking.html
Back to top
View user's profile Send private message
francoisvdm
PostPosted: Thu Sep 29, 2011 9:19 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Thu Sep 29, 2011 9:49 am    Post subject: Reply with quote

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
View user's profile Send private message
francoisvdm
PostPosted: Fri Sep 30, 2011 2:04 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Fri Sep 30, 2011 3:55 am    Post subject: Reply with quote

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
View user's profile Send private message
rrydziu
PostPosted: Wed Dec 21, 2011 6:25 am    Post subject: Reply with quote

Newbie

Joined: 21 Dec 2011
Posts: 8

copying message from
http://www.mqseries.net/phpBB2/viewtopic.php?p=320252 , it may fix problems for Oracle error code = 24756 :

this exception occurs with Oracle Driver version = 10.2.0.4.0, with 11.1.0.7.0 I haven't noticed any problems.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » WMB 7 - turning transaction mode off in JCN
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.