Package javax.naming

Examples of javax.naming.Context.unbind()


    if (name!=null) {
      log.info("Unbinding factory from JNDI name: " + name);

      try {
        Context ctx = NamingHelper.getInitialContext(properties);
        ctx.unbind(name);
        log.info("Unbound factory from JNDI name: " + name);
      }
      catch (InvalidNameException ine) {
        log.error("Invalid JNDI name: " + name, ine);
      }
View Full Code Here


    if (name!=null) {
      log.info("Unbinding factory from JNDI name: " + name);

      try {
        Context ctx = NamingHelper.getInitialContext(properties);
        ctx.unbind(name);
        log.info("Unbound factory from JNDI name: " + name);
      }
      catch (InvalidNameException ine) {
        log.error("Invalid JNDI name: " + name, ine);
      }
View Full Code Here

   @AfterMethod(alwaysRun = true)
   public void tearDown() throws Exception
   {
      Context ctx = new InitialContext();
      ctx.unbind(JNDI_NAME);
      /*
      if (old_factory != null)
      {
         System.setProperty(Context.INITIAL_CONTEXT_FACTORY, old_factory);
      }
View Full Code Here

    if (name!=null) {
      log.info("Unbinding factory from JNDI name: " + name);

      try {
        Context ctx = NamingHelper.getInitialContext(properties);
        ctx.unbind(name);
        log.info("Unbound factory from JNDI name: " + name);
      }
      catch (InvalidNameException ine) {
        log.error("Invalid JNDI name: " + name, ine);
      }
View Full Code Here

    if (name!=null) {
      log.info("Unbinding factory from JNDI name: " + name);

      try {
        Context ctx = NamingHelper.getInitialContext(properties);
        ctx.unbind(name);
        log.info("Unbound factory from JNDI name: " + name);
      }
      catch (InvalidNameException ine) {
        log.error("Invalid JNDI name: " + name, ine);
      }
View Full Code Here

         Thread.dumpStack();
        
         Properties p = new Properties();
         p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.cache.transaction.DummyContextFactory");
         Context ctx = new InitialContext(p);
         ctx.unbind("java:/TransactionManager");
         ctx.unbind("UserTransaction");
      }
      catch (NamingException e)
      {
         log.error("unbinding 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.unbind("java:/TransactionManager");
         ctx.unbind("UserTransaction");
      }
      catch (NamingException e)
      {
         log.error("unbinding of DummyTransactionManager failed", e);
      }
View Full Code Here

      Context context = null;
      try
      {
         context = new InitialContext();

         context.unbind(VALIDATOR);
         context.unbind(VALIDATOR_FACTORY);
      }
      finally
      {
         try
View Full Code Here

      try
      {
         context = new InitialContext();

         context.unbind(VALIDATOR);
         context.unbind(VALIDATOR_FACTORY);
      }
      finally
      {
         try
         {
View Full Code Here

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

      context.unbind(JNDI_NAME);

      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.