0 Replies Latest reply on Dec 30, 2002 5:05 PM by Corby Page

    Problem with ServiceController.install( ObjectName, Collecti

    Corby Page Newbie


      SHORT VERSION: If I set my user MBeans to be dependent on the LocalTxConnectionManager, I can no longer successfully recycle my connection pool.

      LONG VERSION: (I am running JBoss 3.0.4, JDK 1.4.1_01, Win2K)

      I am using an MBean configuration file, sybase-service.xml, which is laid out almost identically to the hsqldb-service.xml file. It contains a LocalTxCM MBean, which is dependent on a LocalTxDS MBean and a LocalTXPool MBean.

      Normally, if I touch sybase-service.xml everything works great. ServiceController.install() is called with LocalTxCM, LocalTxDS, and LocalTxPool. ServiceController.create() is called with LocalTxCM, but it waits because the iDependOn beans haven't been created yet. After LocalTxPool is created, we iterate through the dependsOnMe mbeans and the LocalTxCM MBean is created. All is good.

      But if I introduce my own MBeans that are dependent on the database connection pool, then the ServiceController.create() method behaves differently. I use the following tag in my user MBeans:


      Now I can start the JBoss server just fine. But if I recycle the connection pool, here is what happens:

      ServiceController.install() is called just as before. The ServiceContexts for all three MBeans look fine. In particular, the iDependOn and the dependsOnMe lists are correct, and my userMBeans have been added to the dependsOnMe list for LocalTxCM.

      When ServiceController.create() method is called on LocalTxCM, it defers again. When ServiceController.create() is called on the other two MBeans, it seems to succeed. The create() methods are successfully executed on these MBeans.

      Thanks to dependsOnMe, ServiceController.create() is called on LocalTxCM again. But now when we get the ServiceContexts in the iDependOn list for LocalTxCM, they are all defined as state: NOTYETINSTALLED. So LocalTxCM still fails to create because it believes its dependent MBeans have not yet been created.

      This leads to the predictable log message:

      ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
      Cause: Incomplete Deployment listing:
      Packages waiting for a deployer:

      Incompletely deployed packages:

      MBeans waiting for classes:

      MBeans waiting for other MBeans:
      ObjectName: jboss.jca:service=LocalTxCM,name=sybaseDS
      state: CONFIGURED
      I Depend On: jboss.jca:service=LocalTxDS,name=sybaseDS

      Depends On Me: (My User MBeans)

      Should I submit this as a bug? Is there any other way to get my MBeans to depend on the database connection pool?