[jboss-user] [jBPM] - Re: Get hibernate session for own query
Heiko Tappe
do-not-reply at jboss.com
Thu May 19 05:27:03 EDT 2011
Heiko Tappe [http://community.jboss.org/people/tdtappe] created the discussion
"Re: Get hibernate session for own query"
To view the discussion, visit: http://community.jboss.org/message/606010#606010
--------------------------------------------------------------
The following code seems to work for me:
EnvironmentImpl environment = EnvironmentImpl.getCurrent();
if (environment == null) {
environment = ((EnvironmentFactory) processEngine).openEnvironment();
}
Session session = environment.get(Session.class);
But is this the way to go? If so, do I have to care about "closing" the environment?
--Heiko
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/606010#606010]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110519/6321f678/attachment.html
More information about the jboss-user
mailing list