[jboss-user] [JBoss Seam] - Hibernate session in stateful bean?

MSchmidke do-not-reply at jboss.com
Wed Oct 31 10:21:41 EDT 2007


Hello all,

today I'm wondering about a really simple question:

I have a stateful session bean with @Name and Application- at Scope.

May I have a @PersistenceContext Hibernate session in this class?

What happens to such a Hibernate session? Will it be open all the time?

Of course, it is not desired to have it open all the time, but when I wrote the code, I simply didn't think about this question. Today I accidentally had a look at this code and was wondering what will happen ...

The SFSB prepares and caches some lists of entities which make up the configuration of the application.

Which is the right way to do this?


Marcus.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100669#4100669

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100669



More information about the jboss-user mailing list