[jboss-user] [JBoss Seam] - Hibernate SessionFactory in Seam App?

PatrickMadden do-not-reply at jboss.com
Wed Dec 20 11:35:59 EST 2006


Hello,

I'm in the process of porting a Tomcat w/JSP website to JBoss Seam. I have need to create a custom servlet and deploy in JBoss w/ Seam. I would like to know the proper way of accessing a the Hibernate Session Factory within the seam app

In my old code I used the following code to access the SessionFactory


  | SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();
  | 

However, in my Stateless session beans I use the following:
    @PersistenceContext
  |     private EntityManager em;

So, before I go forward I just would like to know if it is legal or valid to access the hibernate session using the Configuration method. Hope this makes sense and thank you in advance.

PVM

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

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



More information about the jboss-user mailing list