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 » Transactions with Java Compute Node

Post new topic  Reply to topic
 Transactions with Java Compute Node « View previous topic :: View next topic » 
Author Message
ed
PostPosted: Fri Jan 16, 2015 8:37 am    Post subject: Transactions with Java Compute Node Reply with quote

Newbie

Joined: 16 Jan 2015
Posts: 2

Hi,
I have a problem with the managed transaction in Java Compute Node, I hope that you can help with that issue.

I am using IBM Integration Bus v9.

I have a java compute node that has multiple operation in an Oracle database, but i when the node ends i can't see the result of those operations in the database. I can only see these results when the message flow ends.

What i want to know is if i can configure the message flow so that those changes are commited java compute node ends its execution, and not only when the message flow ends.

The flow has MQInput, JavaCompute and a MQOutput nodes.
Both MQInput and MQOutput nodes have transaction mode set to No.
The Java compute node is using a JDBC type 4 connection using getJDBCType4Connection method to do the operations in the Oracle database.

Are you able to assist me with this.

If you need any aditional information, let me know and i will reply ASAP.

Thanks.
Back to top
View user's profile Send private message
Gaya3
PostPosted: Fri Jan 16, 2015 11:24 am    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

commit after each transactions with DB
or use Stored procedure to get it done,

there are some more ways....
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
ed
PostPosted: Sun Jan 18, 2015 1:55 pm    Post subject: Reply with quote

Newbie

Joined: 16 Jan 2015
Posts: 2

Gaya3 wrote:
commit after each transactions with DB
or use Stored procedure to get it done,

there are some more ways....


"When you write Java classes for a JavaCompute node or a user-defined node, your code must comply with the following restrictions:

Do not include any code that performs a COMMIT or a ROLLBACK function.
Do not close the connection to the database. The broker manages all connections, and closes a connection if it is idle for approximately one minute, or if the message flow completes." - http://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/ah61300_.htm?lang=en

I can't do an explicite commit on JavaCompute nodes, is there another way?
Back to top
View user's profile Send private message
martinb
PostPosted: Mon Jan 19, 2015 2:25 pm    Post subject: Reply with quote

Master

Joined: 09 Nov 2006
Posts: 210
Location: UK

The key point here is I believe you are using the Broker managed JDBC connections in your Java Compute Node. That is you create the connection via the Broker provided API getJDBCType4Connection().

This enables the configuration of a JDBC providers configurable service to configure the actual database server the runtime will connect to and provides the security credentials.

However as you note with your Info center ref this API only offers "JDBC_TransactionType.MB_TRANSACTION_AUTO" which means the commit / rollback is done internally by the Broker when the overall flow transaction completes, control is passed back to the input node.

So when using this approach you can only "see" the updates in the Database system when the flow completes. There is currently no other option your can configure.

Note that there is an open RFE in relation to providing a local commit capability.

[/url]
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 » Transactions with Java Compute Node
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.