Package javax.naming

Examples of javax.naming.InitialContext.bind()


    ds.setUser("gis");
    ds.setPassword("gis");
    ds.setDefaultAutoCommit(true);
    System.setProperty(Context.INITIAL_CONTEXT_FACTORY, MockIntialContextFactory.class.getName());
    InitialContext ic = new InitialContext();
    ic.bind("TAMTDataSource", ds);
  }
 
  @BeforeClass
  public static void runBeforeTests() throws Exception
  {
View Full Code Here


    ds.setUser("gis");
    ds.setPassword("gis");
    ds.setDefaultAutoCommit(true);
    System.setProperty(Context.INITIAL_CONTEXT_FACTORY, MockIntialContextFactory.class.getName());
    InitialContext ic = new InitialContext();
    ic.bind("TAMTDataSource", ds);
  }
 
  @BeforeClass
  public static void runBeforeTests() throws Exception
  {
View Full Code Here

      deployer.deploy();

      new SingletonNamingServer();

      InitialContext ctx = new InitialContext();
      ctx.bind("java:policyRegistration", new SimplePolicyRegistration());

      JBossSecurityContext context = new JBossSecurityContext("TestApp");
      JBossAuthenticationManager authenticationManager = (JBossAuthenticationManager) context.getAuthenticationManager();
      TimedCachePolicy domainCache = new TimedCachePolicy();
      domainCache.create();
View Full Code Here

      new EJBContextBinder().start();
     
      DummyTransactionManager tm = new DummyTransactionManager();
      InitialContext ic = new InitialContext(ctxProperties);
      ic.bind("java:/TransactionManager", tm);
     
      EmbeddedTestMcBootstrap bootstrap = EmbeddedTestMcBootstrap.createEmbeddedMcBootstrap();
      Ejb3RegistrarLocator.bindRegistrar(new Ejb3McRegistrar(bootstrap.getKernel()));
     
      ClassLoader cl = Thread.currentThread().getContextClassLoader();
View Full Code Here

      cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
      cache.getConfiguration().setCacheLoaderConfig(getCacheLoaderConfig(JNDI_NAME));
      cache.create();


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

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

      for (BindReferencePlugin plugin : bindReferencesPlugins)
      {
         try
         {
            InitialContext ic = getInitialContext();
            ic.bind(plugin.getBindName(), plugin.getReference());
            LOG.info("Reference bound (by recall()): " + plugin.getBindName());
         }
         catch (NameAlreadyBoundException e)
         {
            LOG.debug("Name already bound: " + plugin.getBindName());
View Full Code Here

         try
         {
            Properties p = new Properties();
            p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.cache.transaction.DummyContextFactory");
            Context ctx = new InitialContext(p);
            ctx.bind("java:/TransactionManager", instance);
            ctx.bind("UserTransaction", utx);
         }
         catch (NamingException e)
         {
            log.error("binding of DummyTransactionManager failed", e);
View Full Code Here

         {
            Properties p = new Properties();
            p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.cache.transaction.DummyContextFactory");
            Context ctx = new InitialContext(p);
            ctx.bind("java:/TransactionManager", instance);
            ctx.bind("UserTransaction", utx);
         }
         catch (NamingException e)
         {
            log.error("binding of DummyTransactionManager failed", e);
         }
View Full Code Here

    */
   public void start() throws Throwable
   {
      Context context = new InitialContext();

      context.bind(JNDI_NAME, this);

      context.close();
   }

   /**
 
View Full Code Here

    */
   public void start() throws Throwable
   {
      Context context = new InitialContext();

      context.bind(JNDI_NAME, this);

      context.close();
   }

   /**
 
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.