7 Replies Latest reply on Apr 15, 2003 11:48 AM by cptnkirk

    startService Problems

      I am having trouble getting my code to run in the startService and stopService routines. When my MBean starts it will not log or run routines in the startService but after the server starts I can run these routines successfully by getting the MBean from the MBean server and then running them but I can't seem to figure out why my startServcie won't run them or even why the log.info() doesn't write to the server log.

        • 1. Re: startService Problems

          Do you extend ServiceMBeanSupport?
          start() invokes startService()

          Does your interface extend Service or expose
          void start();
          void stop();

          start/stop are the real methods invoked by
          the service controller.

          Regards,
          Adrian

          • 2. Re: startService Problems

            Yes. I do the following "public class MobileWebUpdateQuery extends org.jboss.system.ServiceMBeanSupport implements MobileWebUpdateQueryMBean
            and my startService starts with " public void startService() throws Exception". My interface files starts with "public interface MobileWebUpdateQueryMBean extends org.jboss.system.ServiceMBean" and I do not define start() or stop(). I am running jboss 3.0.6 under Linux 2.4.18. I have tried changing startService() to start() without any change.

            • 3. Re: startService Problems

              Just for the record. The problem seemed to be that my jboss-service.xml had a depends on a Message bean. When I took out the depends the system runs the startService(). The message bean works fine in both configurations so I am not sure what is not starting.

              • 4. Re: startService Problems

                I too am having this problem.

                I'm implementing Service and extending ServiceMBeanSupport.

                The MBean get's configured and is visible via the JMX Web Agent.

                The problem is that create(), start(), createService(), startService() methods are never called.

                Could anyone start me in the right direction of tracking this problem down?

                • 5. Re: startService Problems

                  BTW: I'm registering the MBean via the following in user-service.xml.

                  No, depends or anything, so I don't think I'm getting hung up there.


                  • 6. Re: startService Problems

                    You have not exposed create/start
                    on TestMBean (the management interface)
                    Add extends ServiceMBean to it.

                    Regards,
                    Adrian

                    • 7. Re: startService Problems

                      That does indeed fix the problem. Thank you for the quick response.