log out properties of jboss.messaging:service=Connector,transport=bisocket

Version 1

    Hi,

    I really need help on how to solve this problem! Our application monitors critical values using log4j. We want to extend our monitor to log jboss properties of jboss.messaging:service=Connector,transport=bisocket.

     

    Here is a sample:

       <mbean code="org.jboss.remoting.transport.Connector"
              name="jboss.messaging:service=Connector,transport=bisocket"
              display-name="Bisocket Transport Connector">
          <attribute name="Configuration">
             <config>
                <invoker transport="bisocket">
               
                   <!-- There should be no reason to change these parameters - warning!
                        Changing them may stop JBoss Messaging working correctly -->           
                   <attribute name="marshaller" isParam="true">org.jboss.jms.wireformat.JMSWireFormat</attribute>
                   <attribute name="unmarshaller" isParam="true">org.jboss.jms.wireformat.JMSWireFormat</attribute>
                   <attribute name="dataType" isParam="true">jms</attribute>
                   <attribute name="socket.check_connection" isParam="true">false</attribute>              
                   <attribute name="serverBindAddress">${jboss.bind.address}</attribute>
                   <attribute name="serverBindPort">${jboss.messaging.connector.bisocket.port:@pm-server.jms.primary@}</attribute>
                   <attribute name="clientSocketClass" isParam="true">org.jboss.jms.client.remoting.ClientSocketWrapper</attribute>
                   <attribute name="serverSocketClass">org.jboss.jms.server.remoting.ServerSocketWrapper</attribute>
                   <attribute name="onewayThreadPool">org.jboss.jms.server.remoting.DirectThreadPool</attribute>

     

                   <!-- the following parameters are useful when there is a firewall between client and server. Uncomment them if so.-->
                   <!--
                        Das Auskommentieren folgender Paramter bewirkt keine Deaktivierung dieser Einstellung, sondern die
                        die Verwendung der Default-Einstellungen. Das würde nach JBossRemotingGuide folgendes heißen:
                        numberOfCallRetries=3, pingFrequency=5000, pingWindowFactor=2, generalizeSocketException=false
                       
                        Das würde bedeuten, dass wir mit Einführung dieser Einstellung in JBM 1.4.5 alle 5! Sekunden, alle
                        verbundenen Clients vom Server gepingt werden würden. In JBM 1.4.4 war die Einstellung auf 214748364ms,
                        also ca. 60 Stunden.
                       
                        Generell könnte man sagen, dass das Pingen alles Clients nicht notwendig ist, weil wir hier eine
                        direkte Verbindung zum Server ohne Firewall haben.
                       
                        In Bezug auf den Fehler JBMESSAGING-1733 (https://jira.jboss.org/jira/browse/JBMESSAGING-1733) kann
                        das aber auch bedeuten, dass gewisse veraltete Sockets am Server (evtl. WorkerThreads) ohne einen
                        Ping nicht richtig aufgeräumt werden.
                       
                        Um diesen Szenario entgegen zu wirken, pingen wir jede Stunde (pingFrequency=3600000) alle Clients an.
                        Die Clients erwarten in einem doppelten Zeitfenster den Ping vom Server (pingWindowFactor=2)
                   -->     
                   <attribute name="numberOfCallRetries" isParam="true">5</attribute>
                   <attribute name="pingFrequency" isParam="true">30000</attribute>
                   <attribute name="pingWindowFactor" isParam="true">71582</attribute>
                   <attribute name="generalizeSocketException" isParam="true">true</attribute>

     

                   <!-- Now remoting supports socket write timeout configuration. Uncomment this if you need it. -->
                   <attribute name="writeTimeout" isParam="true">30000</attribute>

     

                   <!-- End immutable parameters -->
                  
                   <attribute name="stopLeaseOnFailure" isParam="true">true</attribute>
                  
                   <!-- Periodicity of client pings. Server window by default is twice this figure -->                              
                   <!--
                        Mit clientLeasePeriod=60000 wird das zulässige max. Alter eines Ping vom Client an den Server festgelegt.
                        Hier gilt ein typisches Lease-Verhalten am Server, dass die Lease regelmäßig aktualisiert werden muss.
                       
                        Um dieses Lease-Verhalten zu gewährleisten werden Pings vom Client in halben Abständen validatorPingPeriod=30000
                        an der Server geschickt. Hier müssen wir erwarten, dass unter Lastsituationen bzw. wegen writeTimeout=30000
                        sich die Rückantwort des Servers verzögern kann. Mit der validatorPingTimeout=60000 bestimmen wir die
                        max. Zeit für die Rückantwort des Servers auf den Client Ping.
                   -->   
                   <attribute name="clientLeasePeriod" isParam="true">60000</attribute>
                   <attribute name="validatorPingPeriod" isParam="true">30000</attribute>
                   <attribute name="validatorPingTimeout" isParam="true">60000</attribute>

     

                   <attribute name="failureDisconnectTimeout" isParam="true">0</attribute>
                   <attribute name="callbackErrorsAllowed">1</attribute>
                   <attribute name="registerCallbackListener">false</attribute>
                   <attribute name="useClientConnectionIdentity" isParam="true">true</attribute>
                         
                    <attribute name="timeout" isParam="true">0</attribute>

     

                   <!-- Max Number of connections in client pool. This should be significantly higher than
                        the max number of sessions/consumers you expect -->
                   <attribute name="JBM_clientMaxPoolSize" isParam="true">500</attribute>
                  
                   <!-- The maximum time to wait before timing out on trying to write a message to socket for delivery -->
                   <attribute name="callbackTimeout">10000</attribute>
                  
                   <!-- Use these parameters to specify values for binding and connecting control connections to
                        work with your firewall/NAT configuration
                   <attribute name="secondaryBindPort">@pm-server.jms.secondary@</attribute>                          
                   <attribute name="secondaryConnectPort">abc</attribute>              
                   -->
                             
                </invoker>
                <handlers>
                   <handler subsystem="JMS">org.jboss.jms.server.remoting.JMSServerInvocationHandler</handler>
                </handlers>
             </config>
          </attribute>
       </mbean>

     

    Especially I'm interested in the following value:

                   <!-- Max Number of connections in client pool. This should be significantly higher than
                        the max number of sessions/consumers you expect -->
                   <attribute name="JBM_clientMaxPoolSize" isParam="true">500</attribute>

     

    The idea ist to use a JMX-Server to get a reference of the configuration value. The problem is to find out how I navigate through the JMX model and to associate classes with XML content.

     

    Can anybody provide a code snippet for that purpose?

     

    Thanx in advance

     

    robert