3 Replies Latest reply on Feb 1, 2005 11:13 AM by acxsjones

    Catching JkCoyoteHandler startup with Listener

    acxsjones

      I am trying to catch the startup of the Coyote Handler. I have followed instruction on how to apply a listner but can not get a notification to just catch the startup of JkCoyoteHandler. Below is a print out of the Notifications that are caught with a subscription list also listed below.

      <subscription-list>



      </subscription-list>

      10:25:59,478 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-9080
      10:25:59,558 INFO [NotificationBroadcaster] Got notification: javax.management.MBeanServerNotification: notificationType=JMX.mbean.registered source=JMImplementation:type=MBeanServerDelegate seq-no=486 time=1107188759558 message=null objectName=jboss.web:type=Mapper userData=null, handback: null
      10:25:59,639 INFO [NotificationBroadcaster] Got notification: javax.management.MBeanServerNotification: notificationType=JMX.mbean.registered source=JMImplementation:type=MBeanServerDelegate seq-no=487 time=1107188759639 message=null objectName=jboss.web:type=JkWorkerEnv userData=null, handback: null
      10:25:59,639 INFO [NotificationBroadcaster] Got notification: javax.management.MBeanServerNotification: notificationType=JMX.mbean.registered source=JMImplementation:type=MBeanServerDelegate seq-no=488 time=1107188759639 message=null objectName=jboss.web:type=protocolHandler,className=org.apache.jk.server.JkCoyoteHandler userData=null, handback: null
      10:25:59,639 INFO [NotificationBroadcaster] Got notification: javax.management.MBeanServerNotification: notificationType=JMX.mbean.registered source=JMImplementation:type=MBeanServerDelegate seq-no=489 time=1107188759639 message=null objectName=jboss.web:type=JkMain userData=null, handback: null
      10:25:59,669 INFO [NotificationBroadcaster] Got notification: javax.management.MBeanServerNotification: notificationType=JMX.mbean.registered source=JMImplementation:type=MBeanServerDelegate seq-no=490 time=1107188759669 message=null objectName=jboss.web:type=JkHandler,name=request userData=null, handback: null
      10:25:59,689 INFO [NotificationBroadcaster] Got notification: javax.management.MBeanServerNotification: notificationType=JMX.mbean.registered source=JMImplementation:type=MBeanServerDelegate seq-no=491 time=1107188759689 message=null objectName=jboss.web:type=JkHandler,name=channelSocket userData=null, handback: null
      10:25:59,709 INFO [ChannelSocket] JK2: ajp13 listening on /0.0.0.0:9093

        • 1. Re: Catching JkCoyoteHandler startup with Listener
          acxsjones

          I found out a little more.

          In the handleNotification2 event

          I change change from a Notification object that is passed to me to a MBeanServerNotification object.

          Off of this object I can find the actual mBeanName by calling getMBeanName()

          This will be equal to jboss.web:type=protocolHandler,className=org.apache.jk.server.JkCoyoteHandler

          It would be great if there were some way of appling this to the subscription-list

          • 2. Re: Catching JkCoyoteHandler startup with Listener
            dimitris

            So you mean, since jboss.web:type=protocolHandler,className=org.apache.jk.server.JkCoyoteHandler doesn't emit any notification on its own to which you could subscribe to, you want to monitor for its registration to the MBean server.

            That would require a filter that doesn't filter by type, but by content.

            You can't do that now, but it's a nice idea, e.g:

             <subscription-list>
             <mbean name="JMImplementation:type=MBeanServerDelegate">
             <filter factory="MBeanServerNotificationFilterFactory">
             <objectname>bla bla </objectname>
             </filter>
             </mbean>
             </subscription-list>
            


            I made a feature request for that: http://jira.jboss.com/jira/browse/JBAS-1365

            Cheers!


            • 3. Re: Catching JkCoyoteHandler startup with Listener
              acxsjones

              I vote for the enhancement. It more what I would expect