7 Replies Latest reply on Jul 20, 2012 1:37 AM by 653697

    JMS Bridge status


      I am trying to find out the bridge status using the below wlst script. But failed to execute it.

      Please help me.

      servers = domainRuntimeService.getServerRuntimes();
      if (len(servers) > 0):
           for server in servers:
           messagingBridgeRuntime = server.getMessagingBridgeRuntime;
                messageBridges = messageBrigdeRuntime.getMessageBridges();
                for messageBridge in messageBridges:
                     destinations = messageBridges.getDestinations();
                     for destination in destinations:
                          print ' BridgeName          ' , destination.getName()
                          print ' State ' , destination.getState()
        • 1. Re: JMS Bridge status

          The weblogic version is 9.2 MP3.
          • 2. Re: JMS Bridge status
            Can you post the error that you got?
            As far as I know the state of a bridge instance is on the bridge runtime not the destination.
            • 3. Re: JMS Bridge status
              Hi Dongbo,

              Thanks for your response. As you said the state of a bridge instance is on the bridge runtime not the destination. I agreed with that and change the script as follows.

              rt = cmo.getMessagingBridgeRuntime();
              print rt.getName()
              print rt.getState();

              When i execute the above script got the error message as

              Connecting to t3://localhost:7001 with userid system ...
              Successfully connected to Admin Server 'router_server' that belongs to domain 'r

              Warning: An insecure protocol was used to connect to the
              server. To ensure on-the-wire security, the SSL port or
              Admin port should be used instead.

              Location changed to serverRuntime tree. This is a read-only tree with ServerRunt
              imeMBean as the root.
              For more help, use help(serverRuntime)

              Problem invoking WLST - Traceback (innermost last):
              File "D:\scripts\abc.py", line 8, in ?
              AttributeError: getMessagingBridgeRuntime

              Still i am unable to get the bridge status. please let me know is there any problem with the script.

              Edited by: Siva Praasd Reddy G on Jul 17, 2012 8:27 PM

              Edited by: Siva Praasd Reddy G on Jul 17, 2012 8:36 PM
              • 4. Re: JMS Bridge status
                I am able to view the state of a messaging bridge using online WLST.
                connect() -> serverRuntime()->cd('MessagingBridgeRuntime')->cd(Bridge-instance-name)->ls().

                But I am also having problem doing the same via WLST script yet. It seems to me that the runtime mbean tree hierarchy is incorrect for messaging bridges, and as a result, it is not easy (if possible at all) to access messaging bridge runtime mbean instances from serverRuntime. You may have to file a service request to get this fixed.
                • 5. Re: JMS Bridge status
                  Here is an old discussion on getting the state of a messaging bridge programmatically, which may contain some helpful information. Re: Getting runtime "state" of a messagingbridge using MBeans in weblogic10..

                  • 6. Re: JMS Bridge status
                    Hi Dongbo,

                    Even i am also facing the same issue. when i checked the serverRuntime(), i am unable to find the MessagingBridgeRuntime. Please find the below serverRuntime() when i executed it.

                    wls:/sampledomain/serverConfig> serverRuntime()
                    Location changed to serverRuntime tree. This is a read-only tree with ServerRuntimeMBean as the root.
                    For more help, use help(serverRuntime)

                    wls:/sampledomain/serverRuntime> ls()
                    dr-- ApplicationRuntimes
                    dr-- ClusterRuntime
                    dr-- ConnectorServiceRuntime
                    dr-- DefaultExecuteQueueRuntime
                    dr-- EntityCacheCumulativeRuntime
                    dr-- EntityCacheCurrentStateRuntime
                    dr-- EntityCacheHistoricalRuntime
                    dr-- ExecuteQueueRuntimes
                    dr-- JDBCServiceRuntime
                    dr-- JMSRuntime
                    dr-- JTARuntime
                    dr-- JVMRuntime
                    dr-- JoltRuntime
                    dr-- LibraryRuntimes
                    dr-- LogBroadcasterRuntime
                    dr-- LogRuntime
                    dr-- MANReplicationRuntime
                    dr-- MailSessionRuntimes
                    dr-- MaxThreadsConstraintRuntimes
                    dr-- MinThreadsConstraintRuntimes
                    dr-- PathServiceRuntime
                    dr-- PersistentStoreRuntimes
                    dr-- RequestClassRuntimes
                    dr-- SAFRuntime
                    dr-- ServerChannelRuntimes
                    dr-- ServerSecurityRuntime
                    dr-- ServerServices
                    dr-- ThreadPoolRuntime
                    dr-- TimerRuntime
                    dr-- WANReplicationRuntime
                    dr-- WLDFRuntime
                    dr-- WLECConnectionServiceRuntime
                    dr-- WTCRuntime
                    dr-- WebServerRuntimes
                    dr-- WorkManagerRuntimes

                    But in serverConfig(), i found the MessageBridges. Please find the below serverConfig() when i executed it.

                    wls:/sampledomain/serverConfig> ls()
                    dr-- AppDeployments
                    dr-- BridgeDestinations
                    dr-- Clusters
                    dr-- CustomResources
                    dr-- DeploymentConfiguration
                    dr-- Deployments
                    dr-- EmbeddedLDAP
                    dr-- ErrorHandlings
                    dr-- FileStores
                    dr-- InternalAppDeployments
                    dr-- InternalLibraries
                    dr-- JDBCDataSourceFactories
                    dr-- JDBCStores
                    dr-- JDBCSystemResources
                    dr-- JMSBridgeDestinations
                    dr-- JMSInteropModules
                    dr-- JMSServers
                    dr-- JMSSystemResources
                    dr-- JMX
                    dr-- JTA
                    dr-- JoltConnectionPools
                    dr-- Libraries
                    dr-- Log
                    dr-- LogFilters
                    dr-- Machines
                    dr-- MailSessions
                    dr--   MessagingBridges
                    dr-- RemoteSAFContexts
                    dr-- SAFAgents
                    dr-- SNMPAgent
                    dr-- Security
                    dr-- SecurityConfiguration
                    dr-- SelfTuning
                    dr-- Servers
                    dr-- ShutdownClasses
                    dr-- SingletonServices
                    dr-- StartupClasses
                    dr-- SystemResources
                    dr-- Targets
                    dr-- VirtualHosts
                    dr-- WLDFSystemResources
                    dr-- WLECConnectionPools
                    dr-- WSReliableDeliveryPolicies
                    dr-- WTCServers
                    dr-- WebAppContainer
                    dr-- WebserviceSecurities
                    dr-- XMLEntityCaches
                    dr-- XMLRegistries

                    wls:/sampledomain/serverConfig> cd('MessagingBridges')
                    wls:/sampledomain/serverConfig/MessagingBridges> ls()
                    dr--   com.jms.bridge.sample.in

                    wls:/sampledomain/serverConfig/MessagingBridges> cd('com.jms.bridge.sample.in')
                    wls:/sampledomain/serverConfig/MessagingBridges/com.jms.bridge.sample.in> ls()
                    dr-- SourceDestination
                    dr-- TargetDestination
                    dr-- Targets

                    -r-- AsyncEnabled true
                    -r-- BatchInterval -1
                    -r-- BatchSize 10
                    -r-- DeploymentOrder 1000
                    -r-- DurabilityEnabled true
                    -r-- IdleTimeMaximum 60
                    -r-- Name com.jms.bridge.sample.in
                    -r-- Notes null
                    -r-- PreserveMsgProperty true
                    -r-- QOSDegradationAllowed true
                    -r-- QualityOfService Exactly-once
                    -r-- ReconnectDelayIncrease 5
                    -r-- ReconnectDelayMaximum 60
                    -r-- ReconnectDelayMinimum 15
                    -r-- Selector
                    -r-- Started true
                    -r-- TransactionTimeout 30
                    -r-- Type MessagingBridge

                    -r-x freezeCurrentValue Void : String(attributeName)
                    -r-x isSet Boolean : String(propertyName)
                    -r-x unSet Void : String(propertyName)

                    wls:/sampledomain/serverConfig/MessagingBridges/com.jms.bridge.sample.in> cmo.getName()
                    wls:/sampledomain/serverConfig/MessagingBridges/com.jms.bridge.sample.in> cmo.getType()
                    wls:/sampledomain/serverConfig/MessagingBridges/com.jms.bridge.sample.in> cmo.getState()
                    Traceback (innermost last):
                    File "<console>", line 1, in ?
                    AttributeError: getState

                    Using the MessagingBridges i am able to find the name of the bridge and its type except the state as shown above.
                    I need to find the bridge status through the WLST script only. Let me know is there any possibility in this.

                    Siva Prasad Reddy
                    +91 9550887963
                    • 7. Re: JMS Bridge status
                      The "state" of a bridge instance is on the runtime mbean not the config mbean.
                      I am able to access a messaging bridge instance (and its state) using WLST. Here is the output.

                      wls:/mydomain/serverRuntime> cd('MessagingBridgeRuntime')
                      wls:/mydomain/serverRuntime/MessagingBridgeRuntime> ls()
                      dr-- Bridge-0

                      wls:/mydomain/serverRuntime/MessagingBridgeRuntime> cd('Bridge-0')
                      wls:/mydomain/serverRuntime/MessagingBridgeRuntime/Bridge-0> ls()

                      -r-- Description Stopped by the administrator.
                      -r-- Name Bridge-0
                      -r-- State Inactive
                      -r-- Type MessagingBridgeRuntime

                      -r-x preDeregister Void :
                      -r-x start Void :
                      -r-x stop Void :

                      But I am using a recent WebLogic release (10.3.5). You may want to contact Oracle Support to get a patch for this on 9.2.3 if you are not able to upgrade to 10.3.5 or later release.