[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-3844) Hot deployment : You are trying to use a connection factory that has been shut down

Dan Allen (JIRA) jira-events at lists.jboss.org
Sun May 24 19:13:56 EDT 2009

    [ https://jira.jboss.org/jira/browse/JBSEAM-3844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12468972#action_12468972 ] 

Dan Allen commented on JBSEAM-3844:

This was a problem in seam-gen. In the generated project, the datasource Ant target was copying the -ds.xml file with overwrite="true". That would cause the database connection pool to be restarted and therefore leave the EntityManagerFactory dead in the water. The correct approach is to not allow the datasource to be swapped.

Granted, if you are running in production and you want to swap the datasource, then Seam needs to accomodate that. So for cases when you really do intend to reset the connection pool, I think Seam should detect this situation and rebuild the EntityManagerFactory.

> 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.2.0.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


More information about the seam-issues mailing list