There was some issue with the IGNORE_OPERATION, which I fixed in the
InsertEvent.
There should be an else clause to do the following. I am not sure whether I
should create a new DataSourceFactory, just to close it OR is there any
easier way?
else
{
// It has to close the connection.
DataSourceFactory qry = new DataSourceFactory(con, table);
qry.close();
}
I think ROLLBACK_OPERATION is a very good idea. It would help a lot to do a
rollback at the end in a more controllable manner.
Thanks
______________________________________________
Sunil Mishra, Manager, ADP Wilco (India) Private Limited
* +91-40-2340 8600 x-8202 ---- * +91-98490-61241
-----Original Message-----
From: Henner Kollmann [mailto:[EMAIL PROTECTED]
Sent: Saturday, October 25, 2003 1:43 AM
To: [EMAIL PROTECTED]
Cc: 'Shawn'; Sunil Mishra; [EMAIL PROTECTED]
Subject: AW: [dbforms] Connection.setAutoCommit(false) in the Interceptor
OK, i checked the code:
If DENY_OPERATION is given back by the interceptor a SQL exception is raised
and the transaction is rolled back if set to autoCommit = false
If IGNORE_OPERATION or GRANT_OPERATION is given back by the interceptor the
transaction is committed if autoCommit is false. In case of IGNORE_OPERATION
the following update of the event is not done.
If the Interceptor raises a ValidationException the transaction is rolled
back too.
So if you have an exception inside your interceptor you have two
possibilities:
Return DENY_OPERATION which generates SQLException with an NOGRANT message
or throw a validation exeception whith your own error text.
Maybe we need a fourth flag: ROLLBACK_OPERATION wich will not raise an
execption an just rollback the database? Is it missing?
Regards,
Henner
_
This message and any attachments are intended only for the use of the
addressee and may contain information that is privileged and confidential.
If the reader of the
message is not the intended recipient or an authorized representative of the
intended recipient, you are hereby notified that any dissemination of this
communication is strictly prohibited. If you have received this
communication in error, please notify us immediately by e-mail and delete
the message and any attachments from your system.
This message is confidential and may also be legally privileged. If you are not the
intended recipient, please notify [EMAIL PROTECTED] immediately. You should not copy
it or use it for any purpose, nor disclose its contents to any other person. The views
and opinions expressed in this e-mail message are the author's own and may not reflect
the views and opinions of ADP Wilco.
-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community? Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
DbForms Mailing List
http://www.wap-force.net/dbforms