Hi,
I have an unusual Hibernate usage scenario (client-side) in which it would be advantagous to create more than one Hibernate Session attached the same JDBC connection. The architecture I have will guarantee that these Sessions are never used concurrently from different threads - i.e. I will never have concurrent transactions in progress. I have very good reasons for needing to do this, but won't go into the details of design here.
In the Hibernate documentation it says:
"Never create more than one concurrent Session or Transaction instance per database connection".
It is unclear to me whether this means you cannot [i]instantiate[/i] more than one Session on the same JDBC connection, or whether this is merely talking about concurrent usage, which is obviously not going to work.
Since JDBC connections are basically stateless, I am hoping that I can try this usage pattern out.
Is this possible, or is there code in SessionImpl etc... that depends on there only being one Session attached to a given JDBC connection?
Tom.
|