1 Reply Latest reply on Feb 11, 2009 5:41 PM by Cody Lerum

    Hot Deploy on 2.1.1GA

    Cody Lerum Apprentice

      I'm having a little bit of an issue with a seam-gen project and hot deploy.


      The project is an ear and I don't have any classes in src/hot and I'm not trying to hot deploy those.


      What I'm seeing is that when I edit a view (.xhtml) file and save in eclipse I get the following output from the build.xml file and server.log.


      It appears that my datasource is being redepolyed which causes all my session beans to get blown away. Is there a way to stop the datasource from being redeployed?


      Buildfile: V:\active-projects\sirius\build.xml
      
      init:
      
      groovy.compile:
      
      groovy.copy:
      
      compile:
      
      copyclasses:
      
      jar:
              [copy] Copying 1 file to V:\active-projects\sirius\exploded-archives\sirius.ear\sirius.jar\META-INF
              [copy] Copying 1 file to V:\active-projects\sirius\exploded-archives\sirius.ear\sirius.jar
      
      war:
              [copy] Copying 1 file to V:\active-projects\sirius\exploded-archives\sirius.ear\sirius.war
              [copy] Copying 1 file to V:\active-projects\sirius\exploded-archives\sirius.ear\sirius.war\WEB-INF\classes
      
      ear:
      
      stage:
      
      datasource:
              [copy] Copying 1 file to V:\servers\jboss-4.2.3.GA\server\default\deploy
      
      explode:
              [copy] Copying 4 files to V:\servers\jboss-4.2.3.GA\server\default\deploy\sirius.ear
      
      init:
      
      groovy.compiletest:
      
      compiletest:
      
      copytestclasses:
      
      buildtest:
              [copy] Copying 1 file to V:\active-projects\sirius\test-build
              [copy] Copying 1 file to V:\active-projects\sirius\test-build\META-INF
              [copy] Copying 1 file to V:\active-projects\sirius\test-build
              [copy] Copying 1 file to V:\active-projects\sirius\test-build
      BUILD SUCCESSFUL
      Total time: 580 milliseconds



      From server.log


      009-02-10 14:20:47,832 DEBUG [org.jboss.deployment.MainDeployer] Undeploying file:/V:/servers/jboss-4.2.3.GA/server/default/deploy/sirius-ds.xml, isShutdown=false
      2009-02-10 14:20:47,833 DEBUG [org.jboss.deployment.SARDeployer] undeploying document file:/V:/servers/jboss-4.2.3.GA/server/default/deploy/sirius-ds.xml
      2009-02-10 14:20:47,833 DEBUG [org.jboss.deployment.SARDeployer] stopping mbean jboss.jca:service=DataSourceBinding,name=siriusDatasource
      2009-02-10 14:20:47,833 DEBUG [org.jboss.system.ServiceController] stopping service: jboss.jca:service=DataSourceBinding,name=siriusDatasource
      2009-02-10 14:20:47,833 DEBUG [org.jboss.system.ServiceController] stopping dependent services for: jboss.jca:service=DataSourceBinding,name=siriusDatasource dependent services are: [ObjectName: persistence.units:ear=sirius.ear,jar=sirius.jar,unitName=sirius
        State: RUNNING
        I Depend On:
          jboss.jca:service=DataSourceBinding,name=siriusDatasource
        Depends On Me:
          jboss.j2ee:ear=sirius.ear,jar=sirius.jar,name=ActiveUserBean,service=EJB3
      ]
      2009-02-10 14:20:47,833 DEBUG [org.jboss.system.ServiceController] stopping service: persistence.units:ear=sirius.ear,jar=sirius.jar,unitName=sirius
      2009-02-10 14:20:47,833 DEBUG [org.jboss.system.ServiceController] stopping dependent services for: persistence.units:ear=sirius.ear,jar=sirius.jar,unitName=sirius dependent services are: [ObjectName: jboss.j2ee:ear=sirius.ear,jar=sirius.jar,name=ActiveUserBean,service=EJB3
        State: RUNNING
        I Depend On:
          persistence.units:ear=sirius.ear,jar=sirius.jar,unitName=sirius
      ]
      2009-02-10 14:20:47,833 DEBUG [org.jboss.system.ServiceController] stopping service: jboss.j2ee:ear=sirius.ear,jar=sirius.jar,name=ActiveUserBean,service=EJB3
      2009-02-10 14:20:47,833 DEBUG [org.jboss.system.ServiceController] stopping dependent services for: jboss.j2ee:ear=sirius.ear,jar=sirius.jar,name=ActiveUserBean,service=EJB3 dependent services are: []
      2009-02-10 14:20:47,833 DEBUG [org.jboss.ejb3.stateful.StatefulDelegateWrapper] Stopping jboss.j2ee:ear=sirius.ear,jar=sirius.jar,name=ActiveUserBean,service=EJB3
      2009-02-10 14:20:47,833 DEBUG [org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager] Purging all session data in: V:\servers\jboss-4.2.3.GA\server\default\tmp\sessions\ActiveUserBean-fr12fwv2-f
      2009-02-10 14:20:47,833 DEBUG [org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager] Removed stale session state: V:\servers\jboss-4.2.3.GA\server\default\tmp\sessions\ActiveUserBean-fr12fwv2-f\aa1e2s-xdkpib-fr12ejh8-1-fr12g2sk-h.ser
      2009-02-10 14:20:47,834 DEBUG [org.jboss.seam.contexts.Lifecycle] >>> Begin call
      2009-02-10 14:20:47,834 DEBUG [org.jboss.seam.contexts.Contexts] destroying business process context
      2009-02-10 14:20:47,834 DEBUG [org.jboss.seam.contexts.Contexts] destroying conversation context
      2009-02-10 14:20:47,834 DEBUG [org.jboss.seam.contexts.Contexts] flushing server-side conversation context
      2009-02-10 14:20:47,834 DEBUG [org.jboss.seam.contexts.Contexts] flushing session context
      2009-02-10 14:20:47,834 DEBUG [org.jboss.seam.contexts.Contexts] destroying event context
      2009-02-10 14:20:47,834 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.transaction.transaction
      2009-02-10 14:20:47,834 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.core.manager
      2009-02-10 14:20:47,834 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.core.events
      2009-02-10 14:20:47,834 DEBUG [org.jboss.seam.contexts.Lifecycle] <<< End call
      2009-02-10 14:20:47,834 INFO  [org.jboss.ejb3.EJBContainer] STOPPED EJB: net.domain.sirius.ActiveUserBean ejbName: ActiveUserBean
      2009-02-10 14:20:47,834 DEBUG [org.jboss.ejb3.stateful.StatefulDelegateWrapper] Stopped jboss.j2ee:ear=sirius.ear,jar=sirius.jar,name=ActiveUserBean,service=EJB3
      2009-02-10 14:20:47,834 DEBUG [org.jboss.ejb3.ServiceDelegateWrapper] Stopping persistence.units:ear=sirius.ear,jar=sirius.jar,unitName=sirius
      2009-02-10 14:20:47,835 INFO  [org.jboss.ejb3.entity.PersistenceUnitDeployment] Stopping persistence unit persistence.units:ear=sirius.ear,jar=sirius.jar,unitName=sirius
      2009-02-10 14:20:47,835 INFO  [org.hibernate.impl.SessionFactoryImpl] closing
      2009-02-10 14:20:47,835 INFO  [org.hibernate.impl.SessionFactoryObjectFactory] Unbinding factory from JNDI name: persistence.units:ear=sirius.ear,jar=sirius.jar,unitName=sirius
      2009-02-10 14:20:47,835 INFO  [org.hibernate.util.NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2009-02-10 14:20:47,836 INFO  [org.hibernate.impl.SessionFactoryObjectFactory] Unbound factory from JNDI name: persistence.units:ear=sirius.ear,jar=sirius.jar,unitName=sirius
      2009-02-10 14:20:47,836 DEBUG [org.jboss.ejb3.ServiceDelegateWrapper] Stopped persistence.units:ear=sirius.ear,jar=sirius.jar,unitName=sirius
      2009-02-10 14:20:47,836 DEBUG [org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService] Stopping jboss.jca:service=DataSourceBinding,name=siriusDatasource
      2009-02-10 14:20:47,836 INFO  [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] Unbound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=siriusDatasource' from JNDI name 'java:siriusDatasource'
      2009-02-10 14:20:47,836 DEBUG [org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService] Stopped jboss.jca:service=DataSourceBinding,name=siriusDatasource
      2009-02-10 14:20:47,836 DEBUG [org.jboss.deployment.SARDeployer] stopping mbean jboss.jca:service=ManagedConnectionFactory,name=siriusDatasource
      2009-02-10 14:20:47,836 DEBUG [org.jboss.system.ServiceController] stopping service: jboss.jca:service=ManagedConnectionFactory,name=siriusDatasource
      2009-02-10 14:20:47,836 DEBUG [org.jboss.system.ServiceController] stopping dependent services for: jboss.jca:service=ManagedConnectionFactory,name=siriusDatasource dependent services are: [ObjectName: jboss.jca:service=ManagedConnectionPool,name=siriusDatasource
        State: RUNNING
        I Depend On:
          jboss.jca:service=ManagedConnectionFactory,name=siriusDatasource
        Depends On Me:
          jboss.jca:service=LocalTxCM,name=siriusDatasource
      ]
      2009-02-10 14:20:47,836 DEBUG [org.jboss.system.ServiceController] stopping service: jboss.jca:service=ManagedConnectionPool,name=siriusDatasource
      2009-02-10 14:20:47,836 DEBUG [org.jboss.system.ServiceController] stopping dependent services for: jboss.jca:service=ManagedConnectionPool,name=siriusDatasource dependent services are: [ObjectName: jboss.jca:service=LocalTxCM,name=siriusDatasource
        State: RUNNING
        I Depend On:
          jboss.jca:service=ManagedConnectionPool,name=siriusDatasource
          jboss.jca:service=CachedConnectionManager
          jboss:service=TransactionManager
        Depends On Me:
          jboss.jca:service=DataSourceBinding,name=siriusDatasource
      ]
      2009-02-10 14:20:47,836 DEBUG [org.jboss.system.ServiceController] stopping service: jboss.jca:service=LocalTxCM,name=siriusDatasource
      2009-02-10 14:20:47,836 DEBUG [org.jboss.system.ServiceController] stopping dependent services for: jboss.jca:service=LocalTxCM,name=siriusDatasource dependent services are: [ObjectName: jboss.jca:service=DataSourceBinding,name=siriusDatasource
        State: STOPPED
        I Depend On:
          jboss.jca:service=LocalTxCM,name=siriusDatasource
        Depends On Me:
          persistence.units:ear=sirius.ear,jar=sirius.jar,unitName=sirius
      ]
      2009-02-10 14:20:47,836 DEBUG [org.jboss.system.ServiceController] stopping service: jboss.jca:service=DataSourceBinding,name=siriusDatasource
      2009-02-10 14:20:47,836 DEBUG [org.jboss.resource.connectionmanager.TxConnectionManager] Stopping jboss.jca:service=LocalTxCM,name=siriusDatasource
      2009-02-10 14:20:47,836 DEBUG [org.jboss.resource.connectionmanager.TxConnectionManager] Stopped jboss.jca:service=LocalTxCM,name=siriusDatasource
      2009-02-10 14:20:47,836 DEBUG [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Stopping jboss.jca:service=ManagedConnectionPool,name=siriusDatasource
      2009-02-10 14:20:47,836 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] internalUnregisterPool: setting interval to Long.MAX_VALUE
      2009-02-10 14:20:47,836 DEBUG [org.jboss.resource.connectionmanager.ConnectionValidator] internalUnregisterPool: setting interval to Long.MAX_VALUE
      2009-02-10 14:20:47,839 DEBUG [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Stopped jboss.jca:service=ManagedConnectionPool,name=siriusDatasource
      2009-02-10 14:20:47,839 DEBUG [org.jboss.resource.connectionmanager.RARDeployment] Stopping jboss.jca:service=ManagedConnectionFactory,name=siriusDatasource
      2009-02-10 14:20:47,839 DEBUG [org.jboss.resource.connectionmanager.RARDeployment] Stopped jboss.jca:service=ManagedConnectionFactory,name=siriusDatasource
      2009-02-10 14:20:47,839 DEBUG [org.jboss.deployment.SARDeployer] stopping mbean jboss.jca:service=ManagedConnectionPool,name=siriusDatasource
      2009-02-10 14:20:47,839 DEBUG [org.jboss.system.ServiceController] stopping service: jboss.jca:service=ManagedConnectionPool,name=siriusDatasource
      2009-02-10 14:20:47,839 DEBUG [org.jboss.deployment.SARDeployer] stopping mbean jboss.jca:service=LocalTxCM,name=siriusDatasource
      2009-02-10 14:20:47,839 DEBUG [org.jboss.system.ServiceController] stopping service: jboss.jca:service=LocalTxCM,name=siriusDatasource
      2009-02-10 14:20:47,839 DEBUG [org.jboss.deployment.SARDeployer] destroying mbean jboss.jca:service=DataSourceBinding,name=siriusDatasource
      2009-02-10 14:20:47,839 DEBUG [org.jboss.system.ServiceController] destroying service: jboss.jca:service=DataSourceBinding,name=siriusDatasource
      2009-02-10 14:20:47,839 DEBUG [org.jboss.system.ServiceController] destroying dependent services for: jboss.jca:service=DataSourceBinding,name=siriusDatasource dependent services are: [ObjectName: persistence.units:ear=sirius.ear,jar=sirius.jar,unitName=sirius
        State: STOPPED
        I Depend On:
          jboss.jca:service=DataSourceBinding,name=siriusDatasource
        Depends On Me:
          jboss.j2ee:ear=sirius.ear,jar=sirius.jar,name=ActiveUserBean,service=EJB3
      ]
      2009-02-10 14:20:47,839 DEBUG [org.jboss.system.ServiceController] destroying service: persistence.units:ear=sirius.ear,jar=sirius.jar,unitName=sirius
      2009-02-10 14:20:47,839 DEBUG [org.jboss.system.ServiceController] destroying dependent services for: persistence.units:ear=sirius.ear,jar=sirius.jar,unitName=sirius dependent services are: [ObjectName: jboss.j2ee:ear=sirius.ear,jar=sirius.jar,name=ActiveUserBean,service=EJB3
        State: STOPPED
        I Depend On:
          persistence.units:ear=sirius.ear,jar=sirius.jar,unitName=sirius
      ]
      2009-02-10 14:20:47,839 DEBUG [org.jboss.system.ServiceController] destroying service: jboss.j2ee:ear=sirius.ear,jar=sirius.jar,name=ActiveUserBean,service=EJB3
      2009-02-10 14:20:47,839 DEBUG [org.jboss.system.ServiceController] destroying dependent services for: jboss.j2ee:ear=sirius.ear,jar=sirius.jar,name=ActiveUserBean,service=EJB3 dependent services are: []
      2009-02-10 14:20:47,839 DEBUG [org.jboss.ejb3.stateful.StatefulDelegateWrapper] Destroying jboss.j2ee:ear=sirius.ear,jar=sirius.jar,name=ActiveUserBean,service=EJB3
      2009-02-10 14:20:47,839 DEBUG [org.jboss.ejb3.stateful.StatefulDelegateWrapper] Destroyed jboss.j2ee:ear=sirius.ear,jar=sirius.jar,name=ActiveUserBean,service=EJB3
      2009-02-10 14:20:47,839 DEBUG [org.jboss.ejb3.ServiceDelegateWrapper] Destroying persistence.units:ear=sirius.ear,jar=sirius.jar,unitName=sirius
      2009-02-10 14:20:47,839 DEBUG [org.jboss.ejb3.ServiceDelegateWrapper] Destroyed persistence.units:ear=sirius.ear,jar=sirius.jar,unitName=sirius
      2009-02-10 14:20:47,839 DEBUG [org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService] Destroying jboss.jca:service=DataSourceBinding,name=siriusDatasource
      2009-02-10 14:20:47,839 DEBUG [org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService] Destroyed jboss.jca:service=DataSourceBinding,name=siriusDatasource
      2009-02-10 14:20:47,839 DEBUG [org.jboss.deployment.SARDeployer] destroying mbean jboss.jca:service=ManagedConnectionFactory,name=siriusDatasource
      2009-02-10 14:20:47,839 DEBUG [org.jboss.system.ServiceController] destroying service: jboss.jca:service=ManagedConnectionFactory,name=siriusDatasource
      2009-02-10 14:20:47,839 DEBUG [org.jboss.system.ServiceController] destroying dependent services for: jboss.jca:service=ManagedConnectionFactory,name=siriusDatasource dependent services are: [ObjectName: jboss.jca:service=ManagedConnectionPool,name=siriusDatasource
        State: STOPPED
        I Depend On:
          jboss.jca:service=ManagedConnectionFactory,name=siriusDatasource
        Depends On Me:
          jboss.jca:service=LocalTxCM,name=siriusDatasource
      ]
      2009-02-10 14:20:47,839 DEBUG [org.jboss.system.ServiceController] destroying service: jboss.jca:service=ManagedConnectionPool,name=siriusDatasource
      2009-02-10 14:20:47,839 DEBUG [org.jboss.system.ServiceController] destroying dependent services for: jboss.jca:service=ManagedConnectionPool,name=siriusDatasource dependent services are: [ObjectName: jboss.jca:service=LocalTxCM,name=siriusDatasource
        State: STOPPED
        I Depend On:
          jboss.jca:service=ManagedConnectionPool,name=siriusDatasource
          jboss.jca:service=CachedConnectionManager
          jboss:service=TransactionManager
        Depends On Me:
          jboss.jca:service=DataSourceBinding,name=siriusDatasource
      ]
      2009-02-10 14:20:47,839 DEBUG [org.jboss.system.ServiceController] destroying service: jboss.jca:service=LocalTxCM,name=siriusDatasource
      2009-02-10 14:20:47,839 DEBUG [org.jboss.system.ServiceController] destroying dependent services for: jboss.jca:service=LocalTxCM,name=siriusDatasource dependent services are: [ObjectName: jboss.jca:service=DataSourceBinding,name=siriusDatasource
        State: DESTROYED
        I Depend On:
          jboss.jca:service=LocalTxCM,name=siriusDatasource
        Depends On Me:
          persistence.units:ear=sirius.ear,jar=sirius.jar,unitName=sirius
      ]
      2009-02-10 14:20:47,839 DEBUG [org.jboss.system.ServiceController] destroying service: jboss.jca:service=DataSourceBinding,name=siriusDatasource
      2009-02-10 14:20:47,839 DEBUG [org.jboss.resource.connectionmanager.TxConnectionManager] Destroying jboss.jca:service=LocalTxCM,name=siriusDatasource
      2009-02-10 14:20:47,839 DEBUG [org.jboss.resource.connectionmanager.TxConnectionManager] Destroyed jboss.jca:service=LocalTxCM,name=siriusDatasource
      2009-02-10 14:20:47,839 DEBUG [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Destroying jboss.jca:service=ManagedConnectionPool,name=siriusDatasource
      2009-02-10 14:20:47,839 DEBUG [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Destroyed jboss.jca:service=ManagedConnectionPool,name=siriusDatasource
      2009-02-10 14:20:47,839 DEBUG [org.jboss.resource.connectionmanager.RARDeployment] Destroying jboss.jca:service=ManagedConnectionFactory,name=siriusDatasource
      2009-02-10 14:20:47,839 DEBUG [org.jboss.resource.connectionmanager.RARDeployment] Destroyed jboss.jca:service=ManagedConnectionFactory,name=siriusDatasource
      2009-02-10 14:20:47,840 DEBUG [org.jboss.deployment.SARDeployer] destroying mbean jboss.jca:service=ManagedConnectionPool,name=siriusDatasource
      2009-02-10 14:20:47,840 DEBUG [org.jboss.system.ServiceController] destroying service: jboss.jca:service=ManagedConnectionPool,name=siriusDatasource
      2009-02-10 14:20:47,840 DEBUG [org.jboss.deployment.SARDeployer] destroying mbean jboss.jca:service=LocalTxCM,name=siriusDatasource
      2009-02-10 14:20:47,840 DEBUG [org.jboss.system.ServiceController] destroying service: jboss.jca:service=LocalTxCM,name=siriusDatasource
      2009-02-10 14:20:47,840 DEBUG [org.jboss.deployment.SARDeployer] removing mbean jboss.jca:service=DataSourceBinding,name=siriusDatasource
      2009-02-10 14:20:47,840 DEBUG [org.jboss.system.ServiceController] removing service: jboss.jca:service=DataSourceBinding,name=siriusDatasource
      2009-02-10 14:20:47,840 DEBUG [org.jboss.system.ServiceController] removing jboss.jca:service=DataSourceBinding,name=siriusDatasource from server
      2009-02-10 14:20:47,840 DEBUG [org.jboss.system.ServiceController] Context not removed, it is recording dependencies: ObjectName: jboss.jca:service=DataSourceBinding,name=siriusDatasource
        State: DESTROYED
        Depends On Me:
          persistence.units:ear=sirius.ear,jar=sirius.jar,unitName=sirius
      
      2009-02-10 14:20:47,840 DEBUG [org.jboss.system.ServiceController] removing service: jboss.jca:service=DataSourceBinding,name=siriusDatasource
      2009-02-10 14:20:47,840 DEBUG [org.jboss.system.ServiceController] no need to remove jboss.jca:service=DataSourceBinding,name=siriusDatasource from server
      2009-02-10 14:20:47,840 DEBUG [org.jboss.deployment.SARDeployer] removing mbean jboss.jca:service=ManagedConnectionFactory,name=siriusDatasource
      2009-02-10 14:20:47,840 DEBUG [org.jboss.system.ServiceController] removing service: jboss.jca:service=ManagedConnectionFactory,name=siriusDatasource
      2009-02-10 14:20:47,840 DEBUG [org.jboss.system.ServiceController] removing jboss.jca:service=ManagedConnectionFactory,name=siriusDatasource from server
      2009-02-10 14:20:47,840 DEBUG [org.jboss.system.ServiceController] Context not removed, it is recording dependencies: ObjectName: jboss.jca:service=ManagedConnectionFactory,name=siriusDatasource
        State: DESTROYED
        Depends On Me:
          jboss.jca:service=ManagedConnectionPool,name=siriusDatasource
      
      2009-02-10 14:20:47,840 DEBUG [org.jboss.system.ServiceController] removing service: jboss.jca:service=ManagedConnectionFactory,name=siriusDatasource
      2009-02-10 14:20:47,840 DEBUG [org.jboss.system.ServiceController] no need to remove jboss.jca:service=ManagedConnectionFactory,name=siriusDatasource from server
      2009-02-10 14:20:47,840 DEBUG [org.jboss.deployment.SARDeployer] removing mbean jboss.jca:service=ManagedConnectionPool,name=siriusDatasource
      2009-02-10 14:20:47,840 DEBUG [org.jboss.system.ServiceController] removing service: jboss.jca:service=ManagedConnectionPool,name=siriusDatasource
      2009-02-10 14:20:47,840 DEBUG [org.jboss.system.ServiceController] Removing context for nonexistent service it is no longer recording dependencies: ObjectName: jboss.jca:service=ManagedConnectionFactory,name=siriusDatasource
        State: NOTYETINSTALLED
      
      2009-02-10 14:20:47,840 DEBUG [org.jboss.system.ServiceController] removing jboss.jca:service=ManagedConnectionPool,name=siriusDatasource from server
      2009-02-10 14:20:47,840 DEBUG [org.jboss.system.ServiceController] Context not removed, it is recording dependencies: ObjectName: jboss.jca:service=ManagedConnectionPool,name=siriusDatasource
        State: DESTROYED
        Depends On Me:
          jboss.jca:service=LocalTxCM,name=siriusDatasource

        • 1. Re: Hot Deploy on 2.1.1GA
          Cody Lerum Apprentice

          I got this working.


          My issue was that I was using a @PersistenceContext(type=PersistenceContextType.EXTENDED) on my ActiveUserBean so that the entity would be attached thorughout the session so that users could edit their profile without  having to log and log out.


          I changed my code to use a @In EntityManager


          which basically meant I needed to reattach the entity with user = em.merge(user) and then em.flush()


          The SQL query in the method is to protect against a user changing their username to one that already exists.


          public void save()
              {
                   List existing = em.createQuery("select username from User where username = :username and id != :id")
                                            .setParameter("username", user.getUsername())
                                            .setParameter("id", user.getId())
                                            .getResultList();
                    
                    if(existing.size()==0)
                    {
                         user = em.merge(user);
                         em.flush(); 
                         addLog("profile", "User Profile Changed");
                    }
                    else
                    {     
                         user = em.merge(user);
                         em.refresh(user);
                         FacesMessages.instance().add("Username already exists");
                    }     
              }