[jboss-user] [Clustering/JBoss] - Avoid service to start at startup

rotula do-not-reply at jboss.com
Tue Jan 22 09:12:31 EST 2008


I am running a clustered instance of jboss 4.2.1 GA and deploying a service app.
MyClusterService - which extends ServiceMBeanSupport - is triggered via the scheduler to run periodically. 
Here is the jboss-service.xml:

  | <server>
  |    <mbean code="org.jboss.varia.scheduler.ScheduleManager"
  | 	    name="jboss:service=ScheduleManagerJSFDemo">
  | 	<attribute name="StartAtStartup">false</attribute>
  |    </mbean>
  |    
  |    <mbean code="com.jsfdemo.mbean.MyClusterService"
  | 	    name="com.jsfdemo:service=MyClusterService">
  |    </mbean>
  |    
  |    <mbean code="org.jboss.varia.scheduler.SingleScheduleProvider"
  | 	    name="jboss:service=HAImportScheduleProviderJSFDemo">
  | 		 
  | 	<depends>jboss:service=ScheduleManagerJSFDemo</depends>
  | 	<depends>com.jsfdemo:service=ImportManager</depends>
  |       
  | 	<attribute name="ScheduleManagerName">jboss:service=ScheduleManagerJSFDemo</attribute>
  | 	<attribute name="TargetName">com.jsfdemo:service=MyClusterService</attribute>
  | 	<attribute name="TargetMethod">perform( DATE, REPETITIONS )</attribute>
  | 	<attribute name="DateFormat" />
  | 	<attribute name="StartDate">NOW</attribute>
  | 	<attribute name="Period">10000</attribute>
  | 	<attribute name="Repetitions">-1</attribute>
  |    </mbean>
  | </server>
  | 

According documentation, if attribute "StartAtStartup" of ScheduleManager is set to false, the service should not trigger, which happends regardless the state of the element.
Is this anyway to avoid the service to start at startup in this case?

thank you.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4122213#4122213

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4122213



More information about the jboss-user mailing list