Package com.arjuna.common.util.propertyservice

Examples of com.arjuna.common.util.propertyservice.PropertyManager


    }
  }

  protected final void tearDown()
  {
    final PropertyManager propertyManager = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE) ;
    if (propertyManager != null)
    {
      if (redeliverDlsServiceOn == null)
      {
        propertyManager.removeProperty(Environment.REDELIVER_DLS_SERVICE_ON) ;
      }
      else
      {
        propertyManager.setProperty(Environment.REDELIVER_DLS_SERVICE_ON, redeliverDlsServiceOn) ;
      }
    }
    MockRegistry.uninstall();
    MockCourierFactory.uninstall() ;
  }
View Full Code Here


  public void testPropertyManager ()
  {
    System.setProperty("com.arjuna.common.util.propertyservice.verbosePropertyManager", "ON");
   
    PropertyManager corepm = PropertyManagerFactory.getPropertyManager("test.core", "core");
   
    try
        {
            corepm.load(XMLFilePlugin.class.getName(), "jbossesb-test-properties.xml");
        }
        catch (Exception e)
        {
          log.error(e);
         
            fail(e.toString());
        }
       
    assertEquals(corepm.getProperty(Environment.JNDI_SERVER_CONTEXT_FACTORY), "foobar");   
    assertEquals(corepm.getProperty(Environment.OBJECT_STORE_CONFIG_FILE), "file:config.xml");
   
    try
    {
      assertEquals(corepm.getProperty(Environment.SMTP_HOST), "thishost");
     
      fail();
    }
    catch (ComparisonFailure ex)
    {
    }
    catch (Exception ex)
    {
      fail(ex.toString());
    }
   
    PropertyManager transportpm = PropertyManagerFactory.getPropertyManager("test.transports", "transports");
   
    try
        {
            transportpm.load(XMLFilePlugin.class.getName(), "jbossesb-test-properties.xml");
        }
        catch (Exception e)
        {
          log.error(e);
         
            fail(e.toString());
        }
       
        assertEquals(transportpm.getProperty(Environment.JNDI_SERVER_CONTEXT_FACTORY), "foobar");
        assertEquals(transportpm.getProperty(Environment.SMTP_HOST), "thishost");
  }
View Full Code Here

public class GatewayFilterUnitTest
{
    @BeforeClass
    public static void setUp () throws Exception
    {
  PropertyManager pm = ModulePropertyManager
    .getPropertyManager(ModulePropertyManager.FILTER_MODULE);
  pm.setProperty("org.jboss.soa.esb.filter.0",
    "org.jboss.internal.soa.esb.message.filter.MetaDataFilter");
  pm.setProperty("org.jboss.soa.esb.filter.1",
    "org.jboss.internal.soa.esb.message.filter.GatewayFilter");
    }
View Full Code Here

     * Get the EPR manager.
     * @return The EPR manager.
     */
    public static EPRManager getEprManager()
    {
        final PropertyManager manager = ModulePropertyManager.getPropertyManager(ModulePropertyManager.CORE_MODULE) ;
        final String dir = manager.getProperty(Environment.REGISTRY_FILE_HELPER_DIR, ".") ;
        return EPRManager.getInstance(dir) ;
    }
View Full Code Here

    private boolean isRecoveryManagerRunning() throws Exception
    {
        boolean active = false;
        int port = 0;
        PropertyManager pm = PropertyManagerFactory.getPropertyManager("com.arjuna.ats.propertymanager", "recoverymanager");

        if ( pm != null )
        {
            String portStr = pm.getProperty(com.arjuna.ats.arjuna.common.Environment.RECOVERY_MANAGER_PORT);

            if (portStr != null)
            {
                try
                {
View Full Code Here

    private boolean isRecoveryManagerRunning() throws Exception
    {
        boolean active = false;
        int port = 0;
        PropertyManager pm = PropertyManagerFactory.getPropertyManager("com.arjuna.ats.propertymanager", "recoverymanager");

        if ( pm != null )
        {
            String portStr = pm.getProperty(com.arjuna.ats.arjuna.common.Environment.RECOVERY_MANAGER_PORT);

            if (portStr != null)
            {
                try
                {
View Full Code Here


    private boolean isRecoveryManagerRunning() throws Exception
    {
        boolean active = false;
        PropertyManager pm = PropertyManagerFactory.getPropertyManager("com.arjuna.ats.propertymanager", "recoverymanager");

        if ( pm != null )
        {
            BufferedReader in = null;
            PrintStream out = null;
View Full Code Here

    // would be overridden by those in the config files when the properties are loaded from file. Fortunatly the static
    // block for the logging has the nice side effect of loading the config too, so it works out ok.

    public InetAddress getTransactionStatusManagerInetAddress()
    {
        PropertyManager pm = PropertyManagerFactory.getPropertyManager("com.arjuna.ats.propertymanager", "recoverymanager");
        try {
            return Utility.hostNameToInetAddress(pm.getProperty(com.arjuna.ats.arjuna.common.Environment.TRANSACTION_STATUS_MANAGER_ADDRESS), "");
        } catch(UnknownHostException e) {
            log.warn("UnknownHostException from getTransactionStatusManagerInetAddress, input was: "+pm.getProperty(com.arjuna.ats.arjuna.common.Environment.TRANSACTION_STATUS_MANAGER_ADDRESS));
            return null;
        }
    }
View Full Code Here

                    throw new IllegalStateException("Cannot set transactionStatusManagerInetAddress once the MBean has configured");
                }
            }
            else
            {
                PropertyManager pm = PropertyManagerFactory.getPropertyManager("com.arjuna.ats.propertymanager", "recoverymanager");
                pm.setProperty(com.arjuna.ats.arjuna.common.Environment.TRANSACTION_STATUS_MANAGER_ADDRESS, tsmInetAddress.getHostAddress());
                isTransactionStatusManagerBindAddressSet = true;
            }
        }
    }
View Full Code Here

        }
    }

    public int getTransactionStatusManagerPort()
    {
        PropertyManager pm = PropertyManagerFactory.getPropertyManager("com.arjuna.ats.propertymanager", "recoverymanager");
        return Integer.parseInt(pm.getProperty(com.arjuna.ats.arjuna.common.Environment.TRANSACTION_STATUS_MANAGER_PORT));
    }
View Full Code Here

TOP

Related Classes of com.arjuna.common.util.propertyservice.PropertyManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.