Class ActiveMQRaUtils

java.lang.Object
org.apache.activemq.artemis.ra.ActiveMQRaUtils

public final class ActiveMQRaUtils extends Object
Various utility functions
  • Method Details

    • compare

      public static boolean compare(String me, String you)
      Compare two strings.
      Parameters:
      me - First value
      you - Second value
      Returns:
      true if object equals else false
    • compare

      public static boolean compare(Integer me, Integer you)
      Compare two integers.
      Parameters:
      me - First value
      you - Second value
      Returns:
      true if object equals else false
    • compare

      public static boolean compare(Long me, Long you)
      Compare two longs.
      Parameters:
      me - First value
      you - Second value
      Returns:
      true if object equals else false
    • compare

      public static boolean compare(Double me, Double you)
      Compare two doubles.
      Parameters:
      me - First value
      you - Second value
      Returns:
      true if object equals else false
    • compare

      public static boolean compare(Boolean me, Boolean you)
      Compare two booleans.
      Parameters:
      me - First value
      you - Second value
      Returns:
      true if object equals else false
    • lookup

      public static Object lookup(Context context, String name, Class<?> clazz) throws Exception
      Lookup an object in the default initial context
      Parameters:
      context - The context to use
      name - the name to lookup
      clazz - the expected type
      Returns:
      the object
      Throws:
      Exception - for any error
    • parseHashtableConfig

      public static Hashtable<String,String> parseHashtableConfig(String config)
      Used on parsing JNDI Configuration
      Returns:
      hash-table with configuration option pairs
    • parseConfig

      public static List<Map<String,Object>> parseConfig(String config)
    • parseConnectorConnectorConfig

      public static List<String> parseConnectorConnectorConfig(String config)
    • locateJGroupsChannel

      public static org.jgroups.JChannel locateJGroupsChannel(String locatorClass, String name)
      Within AS7 the RA is loaded by JCA. properties can only be passed in String form. However if RA is configured using jgroups stack, we need to pass a Channel object. As is impossible with JCA, we use this method to allow a JChannel object to be located.