[jboss-user] [JBoss Seam] - Re: How to gather Hibernate Statistic when using seam manage

2007-04-26 Thread elikyip
Thanks Christian. There is a method call in Session to get its SessionFactory...i have to look at the api more careful :-) ... I was not expecting a Session to be aware of the factory that creates itlittle (pleasant) surprise. View the original post : http://www.jboss.com/index.html?module

[jboss-user] [JBoss Seam] - Re: How to gather Hibernate Statistic when using seam manage

2007-04-26 Thread [EMAIL PROTECTED]
Oh I am wrong, you can get the SF from a Session. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4040969#4040969 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4040969 ___ jboss

[jboss-user] [JBoss Seam] - Re: How to gather Hibernate Statistic when using seam manage

2007-04-26 Thread [EMAIL PROTECTED]
I think it is a better idea to access the statistics via the Hibernate JMX statistics MBean. I don't see an easy way to get access to the SessionFactory programmatically if you are working with JPA. You can't get it from the Session/EntityManager. View the original post : http://www.jboss.com

[jboss-user] [JBoss Seam] - Re: How to gather Hibernate Statistic when using seam manage

2007-04-26 Thread petemuir
Session session = (Session) entityManager.getDelegate() View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4040963#4040963 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4040963 ___

[jboss-user] [JBoss Seam] - Re: How to gather Hibernate Statistic when using seam manage

2007-04-26 Thread spambob
I might be wrong but you are probably able to cast the injected entitymanager to org.hibernate.ejb.HibernateEntityManager, and then do castedEntityManager.getSession().getSessionFactory() / getStatistics() View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4040962#