[
http://jira.jboss.com/jira/browse/JBSEAM-1674?page=all ]
Gavin King closed JBSEAM-1674.
------------------------------
Fix Version/s: 2.0.0.CR1
Resolution: Done
Assignee: Gavin King
Ooops! Bad, thanks!
Fixed in CVS, please test.
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
Assigned To: Gavin King
Priority: Blocker
Fix For: 2.0.0.CR1
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