Allow transactions to work against an externally provided connection
--------------------------------------------------------------------
Key: GEOT-2335
URL: http://jira.codehaus.org/browse/GEOT-2335
Project: GeoTools
Issue Type: Improvement
Components: data jdbc-ng
Affects Versions: 2.5.3
Reporter: Andrea Aime
Assignee: Andrea Aime
Fix For: 2.5.4
When the jdbc datastore are integrated with a larger application working
against a database we have the case in which the external app is in control of
the connection pool and the transaction is controlled outside.
The current jdbc-ng code already avoids grabbing a connection and closing it
provided the current transaction already has a connection associated to it.
In the case of external control it would be nice to have a method like
createJ2eeTransaction(Connection cx) that has the following features:
- builds a transaction with a user provided connection
- never tries to grab another connection for methods that do get the
transaction as a param, and from all the methods in FeatureSource/FeatureStore
provided the connection is set
- never closes the connection manually (this is already happening provided the
transaction is not AUTO_COMMIT)
- never calls directly commit/rollback
The latter can be achieved if we build a special transaction that never
actually calls commit/rollback on the connection. Actually, it would be
sufficient that the user never manually calls commit/rollback on the
transaction, but let's try to be extra sure about it.
>From what I see this would be sufficient to perform an integration into a J2EE
>enviroment where the pool and transaction lifecycles are controlled by a
>container (provided there is a way to get the current transactions's
>connection, something that can be done with Spring, not sure with standard
>J2EE).
Of course it would also be good for any app that has its own (eventually
manual) transaction demarcation and connection pool handling
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel