[jboss-user] [Management, JMX/JBoss] - hot deploy problem...

robert-trudel do-not-reply at jboss.com
Tue Jan 22 10:15:08 EST 2008


hi

this code provided by jboss work fine to wait tomcat...

<server>
  |   <!--
  |     In this example we have the BarrierController controlling a Barrier
  |     that is started when we receive the "jboss.tomcat.connectors.started"
  |     notification from the Tomcat mbean, and stopped when we receive the
  |     "org.jboss.system.server.stopped" notification from the server mbean.
  |     
  |     The dependent services need only define a dependency on the Barrier mbean!
  |   -->
  |   <mbean code="org.jboss.system.BarrierController"
  |          name="jboss:service=BarrierController">
  |     
  |     <!-- Whether to have the Barrier initially started or not -->
  |     <attribute name="BarrierEnabledOnStartup">false</attribute>
  |     
  |     <!-- Whether to subscribe for notifications after startup -->
  |     <attribute name="DynamicSubscriptions">true</attribute>
  |     
  |     <!-- Dependent services will depend on this mbean -->
  |     <attribute name="BarrierObjectName">jboss:name=TomcatConnector,type=Barrier</attribute>
  |     
  |     <!-- The notification subscription handback that starts the barrier -->
  |     <attribute name="StartBarrierHandback">start</attribute>
  |     
  |     <!-- The notification subscription handback that stops the barrier -->
  |     <attribute name="StopBarrierHandback">stop</attribute>
  |     
  |     <!-- The notifications to subscribe for, along with their handbacks -->
  |     <attribute name="SubscriptionList">
  |       <subscription-list>
  |         <mbean name="jboss.web:service=WebServer" handback="start">
  |           <filter factory="NotificationFilterSupportFactory">
  |             <enable type="jboss.tomcat.connectors.started"/>
  |           </filter>
  |         </mbean>
  |         <mbean name="jboss.system:type=Server" handback="stop">
  |           <filter factory="NotificationFilterSupportFactory">
  |             <enable type="org.jboss.system.server.stopped"/>
  |           </filter>
  |         </mbean>        
  |       </subscription-list>
  |     </attribute>
  |   </mbean>
  | 
  |   <!--
  |     An example service that depends on the Barrier we declared above.
  |     This services creates a background thread and monitors the memory
  |     usage. When it exceeds the defined thresholds it emits notifications
  |   -->
  |   <mbean code="org.jboss.monitor.services.MemoryMonitor"
  |          name="jboss.monitor:service=MemoryMonitor">
  | 
  |     <attribute name="FreeMemoryWarningThreshold">20m</attribute>
  |     <attribute name="FreeMemoryCriticalThreshold">15m</attribute>
  |     
  |     <!-- The BarrierObjectName configured in the BarrierController -->
  |     <depends>jboss:name=TomcatConnector,type=Barrier</depends>
  |   </mbean>
  |   
  | </server>


like they said on this page: http://docs.jboss.org/jbossas/jboss4guide/r4/html/ch10.html

"f you hot-deploy this on a running server the Barrier will be stopped because by the time the barrier controller is deployed the starting notification is already seen. (There are ways to overcome this.)"

how to overcome this?

thanks

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

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



More information about the jboss-user mailing list