0 Replies Latest reply on Jan 22, 2008 10:15 AM by robert trudel

    hot deploy problem...

    robert trudel Newbie


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

       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"
       <!-- 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">
       <mbean name="jboss.web:service=WebServer" handback="start">
       <filter factory="NotificationFilterSupportFactory">
       <enable type="jboss.tomcat.connectors.started"/>
       <mbean name="jboss.system:type=Server" handback="stop">
       <filter factory="NotificationFilterSupportFactory">
       <enable type="org.jboss.system.server.stopped"/>
       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"
       <attribute name="FreeMemoryWarningThreshold">20m</attribute>
       <attribute name="FreeMemoryCriticalThreshold">15m</attribute>
       <!-- The BarrierObjectName configured in the BarrierController -->

      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?