1 Reply Latest reply on Jul 13, 2007 9:45 AM by Tim Fox

    Service lifecycle is broken for JBoss Messaging

    Adrian Brock Master

      If I touch hqsldb-ds.xml in jboss-head, JMS does not redeploy.

      15:32:53,633 ERROR [AbstractKernelController] Error installing to Start: name=jboss.messaging:service=PersistenceManager state=Create mode=Manual requiredState=Installed
      org.jboss.util.NestedSQLException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.; - nested throwable: (javax.resource.ResourceException: You are trying to use a connection factory that has been shut down: ManagedConnectionFactory is null.)
       at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94)
       at org.jboss.messaging.core.plugin.JDBCSupport.createSchema(JDBCSupport.java:218)
       at org.jboss.messaging.core.plugin.JDBCSupport.start(JDBCSupport.java:156)
       at org.jboss.messaging.core.plugin.JDBCPersistenceManager.start(JDBCPersistenceManager.java:123)
       at org.jboss.messaging.core.plugin.JDBCPersistenceManagerService.startService(JDBCPersistenceManagerService.java:88)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
       at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:196)
      


      The reason is that the start() method is not retrieving the new datasource,
      it is caching the old one.

       protected void startService() throws Exception
       {
       try
       {
       if (ds == null)
       {
       InitialContext ic = new InitialContext();
       ds = (DataSource)ic.lookup(dataSourceJNDIName);
       ic.close();
       }
      


      This is just broken. What's the point of a service lifecycle and dependencies
      if you ignore it?