9 Replies Latest reply on Mar 8, 2011 3:02 PM by Fahrettin Mehmet Öztürk

    Call startService twice

    Fahrettin Mehmet Öztürk Newbie

      Service Interface:

       

      package service;

       

      public interface MyServiceMBean extends org.jboss.system.ServiceMBean {

      }

       

      Service Class:

       

      package service;

       

      public class MyService extends org.jboss.system.ServiceMBeanSupport implements MyServiceMBean {

        public void startService() throws Exception {

          log.info("startService()");

        }

       

        public void stopService() throws Exception {

          log.info("stopService()");

        }

      }

       

      Service XML:

       

      <?xml version="1.0" encoding="UTF-8"?>

      <server>

        <mbean code="service.MyService" name="mydomain:service=test-service">

          <depends>jboss:service=Naming</depends>

        </mbean>

      </server>

       

      Jboss 6.0.0.Final run on Windows XP.

       

      When I deploy upper service for the first time, startService() method called just once as expected. After I undeploy service stopService() called and everything is OK.

      But each time when I deploy service after undeploying for first time, startService() called. After exactly 5 seconds later, stopService() called and after that startService() called again.

       

      I did not have this situation on Linux for the same configuration.