Class StoreManagerProxy


  • public class StoreManagerProxy
    extends java.lang.Object
    Miscellaneous methods for obtaining remote proxies to the JBossTS Recovery and Participant stores
    • Field Detail

      • RECOVERY_BEAN_NAME

        public static final java.lang.String RECOVERY_BEAN_NAME
        See Also:
        Constant Field Values
      • PARTICIPANT_BEAN_NAME

        public static final java.lang.String PARTICIPANT_BEAN_NAME
        See Also:
        Constant Field Values
    • Method Detail

      • startServerConnector

        public static void startServerConnector​(java.lang.String serviceUrl)
                                         throws java.io.IOException
        Helper method for remote clients to connect to an MBean Server
        Parameters:
        serviceUrl - the url on which the target MBean Server resides
        Throws:
        java.io.IOException - if the serviceUrl is invalid or if the connection cannot be started
      • stopServerConnector

        public static void stopServerConnector()
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • registerBean

        public static boolean registerBean​(javax.management.ObjectName name,
                                           java.lang.Object bean,
                                           boolean register)
        MBean registration helper method
        Parameters:
        name - MBean object name
        bean - MBean implementation
        register - whether to register or unregister the MBean
        Returns:
        true if the bean was successfully registered or unregistered
      • releaseProxy

        public static void releaseProxy()
                                 throws javax.management.JMException,
                                        java.io.IOException
        release proxies to the object stores
        Throws:
        javax.management.JMException - if there are errors removing listeners
        java.io.IOException - if there are errors removing listeners or closing the JMX connection
      • releaseProxy

        public static void releaseProxy​(java.lang.String serviceUrl)
                                 throws javax.management.JMException,
                                        java.io.IOException
        release proxies to the object stores
        Parameters:
        serviceUrl - the service url of the MBean Server where the proxies are located
        Throws:
        javax.management.JMException - if there are errors removing listeners
        java.io.IOException - if there are errors removing listeners or closing the JMX connection
      • getRecoveryStore

        public static RecoveryStoreProxy getRecoveryStore()
                                                   throws java.io.IOException,
                                                          javax.management.JMException
        Get a recovery store proxy from the local MBeanServer
        Returns:
        a proxy for the target RecoveryStore
        Throws:
        javax.management.JMException - if there are JMX errors during registration of MBeans
        java.io.IOException - if there are errors on the connection to the MBean Server
      • getRecoveryStore

        public static RecoveryStoreProxy getRecoveryStore​(javax.management.NotificationListener listener)
                                                   throws java.io.IOException,
                                                          javax.management.JMException
        Get a recovery store proxy from the local MBeanServer
        Parameters:
        listener - listener an optional notification listener (use null if one is not required)
        Returns:
        a proxy for the target RecoveryStore
        Throws:
        javax.management.JMException - if there are JMX errors during registration of MBeans and notification listeners
        java.io.IOException - if there are errors on the connection to the MBean Server
      • getRecoveryStore

        public static RecoveryStoreProxy getRecoveryStore​(java.lang.String serviceUrl,
                                                          javax.management.NotificationListener listener)
                                                   throws java.io.IOException,
                                                          javax.management.JMException
        Get a RecoveryStore proxy.
        Parameters:
        serviceUrl - the location of the MBean Server
        listener - an optional notification listener (use null if one is not required)
        Returns:
        a proxy for the target RecoveryStore
        Throws:
        javax.management.JMException - if there are JMX errors during registration of MBeans and notification listeners
        java.io.IOException - if there are errors on the connection to the MBean Server
      • getParticipantStore

        public static ParticipantStoreProxy getParticipantStore()
                                                         throws java.io.IOException,
                                                                javax.management.JMException
        Get a participant store proxy from the local MBeanServer
        Returns:
        a proxy for the target ParticipantStore
        Throws:
        javax.management.JMException - if there are JMX errors during registration of MBeans
        java.io.IOException - if there are errors on the connection to the MBean Server
      • getParticipantStore

        public static ParticipantStoreProxy getParticipantStore​(javax.management.NotificationListener listener)
                                                         throws java.io.IOException,
                                                                javax.management.JMException
        Get a participant store proxy from the local MBeanServer
        Parameters:
        listener - listener an optional notification listener (use null if one is not required)
        Returns:
        a proxy for the target ParticipantStore
        Throws:
        javax.management.JMException - if there are JMX errors during registration of MBeans and notification listeners
        java.io.IOException - if there are errors on the connection to the MBean Server
      • getParticipantStore

        public static ParticipantStoreProxy getParticipantStore​(java.lang.String serviceUrl,
                                                                javax.management.NotificationListener listener)
                                                         throws java.io.IOException,
                                                                javax.management.JMException
        Get a participant store proxy.
        Parameters:
        serviceUrl - the location of the MBean Server
        listener - an optional notification listener (use null if one is not required)
        Returns:
        a proxy for the target ParticipantStore
        Throws:
        javax.management.JMException - if there are JMX errors during registration of MBeans and notification listeners
        java.io.IOException - if there are errors on the connection to the MBean Server