[
https://jira.jboss.org/jira/browse/JBSEAM-3844?page=com.atlassian.jira.pl...
]
Bernard Labno updated JBSEAM-3844:
----------------------------------
Attachment: stacktrace.txt
Provided patch is wrong !!! I overlooked the fact that EntityManagerFactory component
would be recreated on every page load, so no data will get into database. There is a need
to check if it is connected to the right datasource instance (an open one). It is not
enough to check with isOpen() method for it returns true and the stacktrace says "You
are trying to use a connection factory that has been shut down: ManagedConnectionFactory
is null." .
And I don't know how to get to the ManagedConnectionFactory. My workaround for now is
to create copy of "explode" ant task but remove "datasource" task from
depends attribute.
Hot deployment : You are trying to use a connection factory that has
been shut down
-----------------------------------------------------------------------------------
Key: JBSEAM-3844
URL:
https://jira.jboss.org/jira/browse/JBSEAM-3844
Project: Seam
Issue Type: Bug
Components: Hot Deploy
Affects Versions: 2.1.1.CR2
Reporter: Bernard Labno
Fix For: 2.1.2.CR1
Attachments: Initialization.java.patch, stacktrace.txt
When using war exploded deployment and invoke "explode" ant target to hot
deploy components (even if there is no changes) I get this error :
Caused by: javax.resource.ResourceException: You are trying to use a connection factory
that has been shut down: ManagedConnectionFactory is null.
As I've inspected the problem is that javax.persistence.EntityManagerFactory changes
and org.jboss.seam.persistence.EntityManagerFactory does not get reinitiated on hot
deployment.
2008-12-15 13:53:18,326 INFO ConnectionFactoryBindingService - Unbound ConnectionManager
'jboss.jca:service=DataSourceBinding,name=seamcourseDatasource' from JNDI name
'java:seamcourseDatasource'
2008-12-15 13:53:18,412 INFO ConnectionFactoryBindingService - Bound ConnectionManager
'jboss.jca:service=DataSourceBinding,name=seamcourseDatasource' to JNDI name
'java:seamcourseDatasource'
I think that Initialization.redeploy method needs to be updated to reinitialize all
EntityManagerFactory instances but I'm not sure and need confirmation from experienced
seam dev.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira