on 06-27-2007 2:41 AM
Hi Guys, I got a question regarding JDBC adapter auto commit. Hopefully you guys can help me :). Until now, when my XI calling a storedprocedure in ORACLE using JDBC adapter, it will automatically commit the calling. When i see my configuration for the JDBC adapter receiver, the checkbox for Enable Autocommit is thicked. My question is, is there anyway that we handle the commit or rollback ourself. How we can handle that? Is it from the BPM or just from the Configuration.
Thank you very much in advance for all replies, advices and answer. Cheers guys..
Hi
Try this out
You can programmatically set auto commit to true as in follows
// Load the Oracle JDBC driver
DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
// Connect to the database
// You can put a database hostname after the @ sign in the connection URL.
Connection conn =
DriverManager.getConnection ("jdbc:oracle:oci:@", "scott", "tiger");
// It's faster when auto commit is off
<b>conn.setAutoCommit (true); </b>
// Create a Statement
Statement stmt = conn.createStatement ();
regards
krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well not so sure abt this but only 2 wayz that a transaction auto commit can be handled can be:
1) As you have done. Thatz through Adapter Configuration
2) By the DBA.
If there is some other way to do this Please keep on posting.
cheers
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks guys for all the help. So am i correct to state this: (Correct me if I'm wrong)
a. If I unthick the Auto Commit checkbox, therefore there are no other ways to commit / rollback a storedprocedure that called by XI (manually commit/rollback from XI) except i have to put the commit/rollback in the storedprocedure itself.
the use of autocommit is mainly inteded for single queries (DML) ...most probably for a stored procedure the transactions are handled inside it say by having multiple savepoints and then rollbacks / commits as per requirement.
so ...check with your stored procedure developers and confirm about the transaction handling inside the SP and in that case the autocommit flag state wont make much difference..:)
HTH
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Wardana,
If you see SAP help it says that we should not set this indicator if the JDBC driver supports transactions. Check this SAP help for more information on this:
http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.