Package javax.naming

Examples of javax.naming.InitialContext.bind()


      cache.getConfiguration().setCacheLoaderConfig(getCacheLoaderConfig(props));
      cache.create();


      MockDataSource ds = new MockDataSource(props);
      context.bind(JNDI_NAME, ds);
      assertNotNull(JNDI_NAME + " bound", context.lookup(JNDI_NAME));
      cache.start();

      assertNotNull("Cache has a cache loader", cache.getCacheLoaderManager().getCacheLoader());
   }
View Full Code Here


         ds = new jdbcDataSource();
         ds.setDatabase(prop.getProperty("cache.jdbc.url"));
         ds.setUser("sa");

         context.bind(JNDI_NAME, ds);
         assertNotNull(JNDI_NAME + " bound", context.lookup(JNDI_NAME));
      }
      Properties p = new Properties();
      p.setProperty("cache.jdbc.datasource", JNDI_NAME);
      p.setProperty("cache.jdbc.node.type", prop.getProperty("cache.jdbc.node.type"));
View Full Code Here

         }
        
         InitialContext context = new InitialContext(properties);
         if (fillNames) {
            context.bind("first", new String("first"));
            context.bind("second", new String("first"));
            context.bind("third", new String("first"));
            context.createSubcontext("dir1");
            context.createSubcontext("dir2");
            context.createSubcontext("dir3");
            context.bind("dir1/first", new String("first"));
View Full Code Here

        
         InitialContext context = new InitialContext(properties);
         if (fillNames) {
            context.bind("first", new String("first"));
            context.bind("second", new String("first"));
            context.bind("third", new String("first"));
            context.createSubcontext("dir1");
            context.createSubcontext("dir2");
            context.createSubcontext("dir3");
            context.bind("dir1/first", new String("first"));
            context.bind("dir1/second", new String("first"));
View Full Code Here

            context.bind("second", new String("first"));
            context.bind("third", new String("first"));
            context.createSubcontext("dir1");
            context.createSubcontext("dir2");
            context.createSubcontext("dir3");
            context.bind("dir1/first", new String("first"));
            context.bind("dir1/second", new String("first"));
            context.bind("dir1/third", new String("first"));
                    
            Context ctx = (Context)context.lookup("dir2");
            ctx.bind("first", new String("first"));
View Full Code Here

            context.bind("third", new String("first"));
            context.createSubcontext("dir1");
            context.createSubcontext("dir2");
            context.createSubcontext("dir3");
            context.bind("dir1/first", new String("first"));
            context.bind("dir1/second", new String("first"));
            context.bind("dir1/third", new String("first"));
                    
            Context ctx = (Context)context.lookup("dir2");
            ctx.bind("first", new String("first"));
            ctx.bind("second", new String("first"));
View Full Code Here

            context.createSubcontext("dir1");
            context.createSubcontext("dir2");
            context.createSubcontext("dir3");
            context.bind("dir1/first", new String("first"));
            context.bind("dir1/second", new String("first"));
            context.bind("dir1/third", new String("first"));
                    
            Context ctx = (Context)context.lookup("dir2");
            ctx.bind("first", new String("first"));
            ctx.bind("second", new String("first"));
            ctx.bind("third", new String("first"));
View Full Code Here

   protected void adminJmsStart() {
      try {
         // System.setProperty("java.naming.factory.initial", "org.apache.naming.modules.memory.MemoryURLContextFactory");
         // System.setProperty("java.naming.factory.url.pkgs", "org.apache.naming.modules");
         InitialContext ctx = new InitialContext(this.env);
         ctx.bind(CONNECTION_FACTORY, new XBConnectionFactory(null, this.args, false));           
         ctx.bind(TOPIC, new XBDestination(TOPIC, null, false));
      }
      catch (NamingException ex) {
         ex.printStackTrace();
         assertTrue("exception occured in testJndi", false);
View Full Code Here

      try {
         // System.setProperty("java.naming.factory.initial", "org.apache.naming.modules.memory.MemoryURLContextFactory");
         // System.setProperty("java.naming.factory.url.pkgs", "org.apache.naming.modules");
         InitialContext ctx = new InitialContext(this.env);
         ctx.bind(CONNECTION_FACTORY, new XBConnectionFactory(null, this.args, false));           
         ctx.bind(TOPIC, new XBDestination(TOPIC, null, false));
      }
      catch (NamingException ex) {
         ex.printStackTrace();
         assertTrue("exception occured in testJndi", false);
      }
View Full Code Here

         InitialContext ctx = new InitialContext();
         String connQosTxt = null;
         boolean forQueues = false;
         this.factory = new XBConnectionFactory(connQosTxt, this.args, forQueues);
         this.topic = new XBDestination(TOPIC, null, false);
         ctx.bind(CONNECTION_FACTORY, this.factory);           
         ctx.bind(TOPIC, this.topic);
      }
      catch (NamingException ex) {
         ex.printStackTrace();
         assertTrue("exception occured in testJndi", false);
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.