|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Transactions with Java Compute Node |
« View previous topic :: View next topic » |
Author |
Message
|
ed |
Posted: Fri Jan 16, 2015 8:37 am Post subject: Transactions with Java Compute Node |
|
|
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 |
|
 |
Gaya3 |
Posted: Fri Jan 16, 2015 11:24 am Post subject: |
|
|
 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 |
|
 |
ed |
Posted: Sun Jan 18, 2015 1:55 pm Post subject: |
|
|
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 |
|
 |
martinb |
Posted: Mon Jan 19, 2015 2:25 pm Post subject: |
|
|
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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|