[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1674) HibernateSessionFactory creates a Factory on every DB operation
Ralph Schaer (JIRA)
jira-events at lists.jboss.org
Mon Jul 16 00:21:03 EDT 2007
HibernateSessionFactory creates a Factory on every DB operation
---------------------------------------------------------------
Key: JBSEAM-1674
URL: http://jira.jboss.com/jira/browse/JBSEAM-1674
Project: JBoss Seam
Issue Type: Bug
Components: Framework
Affects Versions: 2.0.0.BETA1
Environment: JavaBeans, Hibernate, Tomcat 6.0.13, Java 6, Windows XP
Reporter: Ralph Schaer
Priority: Blocker
Reproduce with the Hibernate2 Example
Deploying to tomcat works. The browser shows the login form.
But everytime a new request is started for example with "Register New User" or "Register" in the New User form, the seam application creates a new HibernateSessionFactory and the SchemaExport tool is running. It drops and creates the tables in the database every time. So it's for example not possible to register a new user.
The problem could be that org.jboss.seam.persistence.HibernateSessionFactory has a @Unwrap and a @Create method and both doing the
same thing, call "return createSessionFactory();". If I understand the @Unwrap correctly the method will be called everytime the bean is referenced. This results in a new SessionFactory every time. I think the @Unwrap method schould only return the sessionFactory.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list