Examples of NodeConfig


Examples of com.proofpoint.node.NodeConfig

        System.setProperty(JAVAX_NET_SSL_TRUST_STORE, getResource("localhost.keystore").getPath());
        tempDir = Files.createTempDir().getCanonicalFile(); // getCanonicalFile needed to get around Issue 365 (http://code.google.com/p/guava-libraries/issues/detail?id=365)
        config = new HttpServerConfig()
                .setHttpPort(0)
                .setLogPath(new File(tempDir, "http-request.log").getAbsolutePath());
        nodeInfo = new NodeInfo("test-application", new NodeConfig()
                .setEnvironment("test")
                .setNodeInternalIp(InetAddresses.forString("127.0.0.1"))
                .setNodeBindIp(InetAddresses.forString("127.0.0.1"))
                .setNodeExternalAddress("localhost")
                .setNodeInternalHostname("localhost")
View Full Code Here

Examples of com.proofpoint.node.NodeConfig

    @BeforeMethod
    protected void setUp()
            throws Exception
    {
        nodeInfo = new NodeInfo("test-application", new NodeConfig().setEnvironment("test").setPool("pool"));
        discoveryClient = new InMemoryDiscoveryClient(nodeInfo, MAX_AGE);
        serviceAnnouncement = ServiceAnnouncement.serviceAnnouncement(serviceType.value()).addProperty("a", "apple").build();
        announcer = new Announcer(discoveryClient, ImmutableSet.of(serviceAnnouncement));
    }
View Full Code Here

Examples of com.proofpoint.node.NodeConfig

    @Override
    public void configure(Binder binder)
    {
        binder.bind(NodeInfo.class).in(Scopes.SINGLETON);
        NodeConfig nodeConfig = new NodeConfig()
                .setEnvironment(environment)
                .setNodeInternalIp(getV4Localhost())
                .setNodeBindIp(getV4Localhost());

        if (pool.isPresent()) {
            nodeConfig.setPool(pool.get());
        }

        binder.bind(NodeConfig.class).toInstance(nodeConfig);

        newExporter(binder).export(NodeInfo.class).withGeneratedName();
View Full Code Here

Examples of com.proofpoint.node.NodeConfig

    @BeforeMethod
    public void setup()
            throws MalformedObjectNameException
    {
        nodeInfo = new NodeInfo("test-application", new NodeConfig()
                .setEnvironment("test_environment")
                .setNodeInternalHostname("test.hostname")
                .setPool("test_pool")
        );
View Full Code Here

Examples of com.proofpoint.node.NodeConfig

    }

    @Test
    public void testBuilderNodeInfo()
    {
        NodeInfo nodeInfo = new NodeInfo("test-application", new NodeConfig().setEnvironment("test").setPool("pool"));

        ServiceDescriptor expected = new ServiceDescriptor(
                UUID.fromString("12345678-1234-1234-1234-123456789012"),
                nodeInfo.getNodeId(),
                "type",
View Full Code Here

Examples of com.proofpoint.node.NodeConfig

    @Test
    public void testDefaultToNodePool()
    {
        serviceSelector = new CachingServiceSelector("apple",
                new ServiceSelectorConfig(),
                new NodeInfo("test-application", new NodeConfig().setEnvironment("environment").setPool("nodepool")));
        assertEquals(serviceSelector.getType(), "apple");
        assertEquals(serviceSelector.getPool(), "nodepool");
    }
View Full Code Here

Examples of com.proofpoint.node.NodeConfig

        discoveryClient.addDiscoveredService(DIFFERENT_TYPE);
        discoveryClient.addDiscoveredService(DIFFERENT_POOL);

        updater = new ServiceDescriptorsUpdater(serviceSelector, "apple",
                new ServiceSelectorConfig(),
                new NodeInfo("test-application", new NodeConfig().setEnvironment("environment").setPool("pool")),
                discoveryClient,
                executor);
        updater.start();

        Thread.sleep(100);
View Full Code Here

Examples of de.mhus.lib.config.NodeConfig

    {
        return new TestSuite( DbPoolTest.class );
    }

    public DbPoolBundle createPool() throws Exception {
      NodeConfig cdb = new NodeConfig();
      NodeConfig cconfig = new NodeConfig();
      NodeConfig ccon = new NodeConfig();
     
      boolean mysql = false;
     
      if (mysql) {
        ccon.setProperty("driver", "com.mysql.jdbc.Driver");
        ccon.setProperty("url", "jdbc:mysql://localhost:3306/test");
        ccon.setProperty("user", "test");
        ccon.setProperty("pass", "test");
      } else {
        ccon.setProperty("driver", "org.hsqldb.jdbcDriver");
        ccon.setProperty("url", "jdbc:hsqldb:mem:aname");
        ccon.setProperty("user", "sa");
        ccon.setProperty("pass", "");
      }
     
      cdb.setConfig("connection", ccon);
     
      cconfig.setConfig("test", cdb);
      DbPoolBundle pool = new DbPoolBundle(cconfig,null);
      Dialect dialect = pool.getPool("test").getDialect();
     
      NodeConfig cqueries = new NodeConfig();
      cqueries.setProperty("create", "create table test (a_text varchar(100))");
      cqueries.setProperty("select", "select * from test");
      cqueries.setProperty("cleanup", "delete from test");
      cqueries.setProperty("insert", "insert into test (a_text) values ($text,text$)");
      cqueries.setProperty("dropblub", "drop table if exists blub_");

      cqueries.setProperty("create2", "create table test2 ("+
          " a_text "   +dialect.getDbType(Dialect.TYPE.STRING.name(), "100") +
          ",a_date "   +dialect.getDbType(Dialect.TYPE.DATETIME.name(), null) +
          ",a_int "    +dialect.getDbType(Dialect.TYPE.INT.name(), null) +
          ",a_bool "   +dialect.getDbType(Dialect.TYPE.BOOL.name(), null) +
          ",a_blob "   +dialect.getDbType(Dialect.TYPE.BLOB.name(), null) +
          ",a_float "  +dialect.getDbType(Dialect.TYPE.FLOAT.name(), null) +
          ",a_double " +dialect.getDbType(Dialect.TYPE.DOUBLE.name(), null) +
          ",a_long "   +dialect.getDbType(Dialect.TYPE.LONG.name(), null) +
          ")");
      cqueries.setProperty("insert2", "insert into test2 (a_text,a_date,a_int,a_bool,a_blob,a_float,a_double,a_long) values ($text$,$date$,$int$,$bool$,$blob$,$float$,$double$,$long$)");
      cqueries.setProperty("cleanup2", "delete from test2");

      cdb.setConfig("queries", cqueries);
     
     
     
View Full Code Here

Examples of de.mhus.lib.config.NodeConfig

    {
        return new TestSuite( AdbTest.class );
    }

    public DbPoolBundle createPool() {
      NodeConfig cdb = new NodeConfig();
      NodeConfig cconfig = new NodeConfig();
      NodeConfig ccon = new NodeConfig();
     
//      ccon.setProperty("driver", "com.mysql.jdbc.Driver");
//      ccon.setProperty("url", "jdbc:mysql://localhost:3306/test");
//      ccon.setProperty("user", "test");
//      ccon.setProperty("pass", "test");

      ccon.setProperty("driver", "org.hsqldb.jdbcDriver");
      ccon.setProperty("url", "jdbc:hsqldb:mem:aname");
      ccon.setProperty("user", "sa");
      ccon.setProperty("pass", "");
     
     
      cdb.setConfig("connection", ccon);
     
//      NodeConfig cqueries = new NodeConfig();
View Full Code Here

Examples of de.mhus.lib.config.NodeConfig

  public void testDb() throws Exception {

    MSingleton.instance().getConfig().setBoolean("TRACE", true);

      NodeConfig config = new NodeConfig();
      NodeConfig cdb = new NodeConfig();
      NodeConfig ccon = new NodeConfig();
      ccon.setProperty("driver", "org.hsqldb.jdbcDriver");
      ccon.setProperty("url", "jdbc:hsqldb:mem:aname");
      ccon.setProperty("user", "sa");
      ccon.setProperty("pass", "");
      cdb.setConfig("connection", ccon);
      config.setConfig("database", cdb);
           
      XmlConfig cdef = new XmlConfig(MXml.loadXml(
      "<applications><application name='content'>"
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.