4 Replies Latest reply on Oct 19, 2011 3:13 AM by Amos Feng

    how to do custom start() in bean

    Amos Feng Apprentice

      Hi,

       

      I want do something when bean startup. I added start() in bean interface, such like;

       

      public interface XTSServiceTestRunner {

          public void start() throws Exception;

          public void stop();

          public void runTest(String testName) throws Exception;

      }

      and implement start()

       

      public class XTSServiceTestRunnerBean implements XTSServiceTestRunner {

           ...

           public void start() throws Exception {

                do_some_startup();

           }

      }

      but this does not work as I expect.

      do I mssing something in configuration, such as bean.xml or anything else ?

       

      Thanks,

      Amos