cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Gabriel-Willem" <>
Subject Multiple queries using the same DB session !
Date Mon, 06 Oct 2008 10:03:55 GMT


We are using Apache Cayenne as ORM in our new applications.

We would like to migrate a large existing one on Cayenne 2.0.x also,
without modifying the current DB schema if possible.


Currently, the application is accessing database through a JDBC
connection pool and performs wanted query.

Prior to execute queries, we have to set some context variables (so
bound variables to database session) 

(these values are used later on in the queries. Queries = views or
stored procedures)


In SQL Server, it can be done via a query doing a "set context_info

In Oracle, it can be done via the "dbms_session.set_context" method.


We have seen that as long as connection pool context is not released we
use the same database session, so this mechanism works well.


How can we do the same with Cayenne? 

How being sure we do consecutive queries on the same DB session?



Thanks & regards





Java Consultant

EastNets(tm) LU

Route des Trois Cantons, 11




Skype: eneumwillem


Fax: +32 (0)2 6560070 <> 




CONFIDENTIALITY: This e-mail and any files transmitted with it are
confidential and intended solely for the use of the recipient(s) only.
Any review, retransmission, dissemination or other use of, or taking any
action in reliance upon this information by persons or entities other
than the intended recipient(s) is prohibited. If you have received this
e-mail in error please notify the sender immediately and destroy the
material whether stored on a computer or otherwise.

DISCLAIMER: Any views or opinions presented within this e-mail are
solely those of the author and do not necessarily represent those of
Eastern Networks ltd., unless otherwise specifically stated. 


Please consider the environment before deciding to print this email. 


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message