Examples of unbind()


Examples of javax.naming.Context.unbind()

      redeployNaming();
     
      Context ctx2 = new InitialContext(env);
      try
      {
         ctx2.unbind(ObjectBinder.NAME);
      }
      catch (NamingException e)
      {
         log.error("Caught NamingException", e);
         fail(e.getMessage());
View Full Code Here

Examples of javax.naming.Context.unbind()

     
      // Unbind so we can rebind if restarted
      try
      {
         Context ctx = new InitialContext();
         ctx.unbind(this._sessionStateName);
         org.jboss.util.naming.NonSerializableFactory.unbind(this._sessionStateName);
      }
      catch (NamingException e)
      {
         // Ignore
View Full Code Here

Examples of javax.naming.Context.unbind()

    * @exception Exception if an error occurs
    */
   private void teardownEnvironment() throws Exception
   {
      Context ctx = (Context)new InitialContext().lookup("java:comp");
      ctx.unbind("env");
      log.debug("Removed bindings from java:comp/env for EJB: " + getBeanMetaData().getEjbName());
      ctx.unbind("TransactionSynchronizationRegistry");
      log.debug("Unbound java:comp/TransactionSynchronizationRegistry for EJB: " + getBeanMetaData().getEjbName());
      try
      {
View Full Code Here

Examples of javax.naming.Context.unbind()

   private void teardownEnvironment() throws Exception
   {
      Context ctx = (Context)new InitialContext().lookup("java:comp");
      ctx.unbind("env");
      log.debug("Removed bindings from java:comp/env for EJB: " + getBeanMetaData().getEjbName());
      ctx.unbind("TransactionSynchronizationRegistry");
      log.debug("Unbound java:comp/TransactionSynchronizationRegistry for EJB: " + getBeanMetaData().getEjbName());
      try
      {
         NonSerializableFactory.unbind("ORB");
         log.debug("Unbound java:comp/ORB for EJB: " + getBeanMetaData().getEjbName());
View Full Code Here

Examples of javax.naming.Context.unbind()

      // lookup binding - should return new value
      value = (String)lookup(naming, JNDI_KEY, true);
      assertEquals("lookup after HA-JNDI rebind operation", JNDI_VALUE2, value);
     
      // unbind it
      naming.unbind(JNDI_KEY)
     
      // lookup binding - should fail with NamingException
      value = (String)lookup(naming, JNDI_KEY, false);
      assertNull("lookup after HA-JNDI unbind operation", value);
     
View Full Code Here

Examples of javax.naming.InitialContext.unbind()

   @AfterMethod(alwaysRun = true)
   public void tearDown() throws Exception
   {
      Context ctx = new InitialContext();
      ctx.unbind(JNDI_NAME);
      if (cache != null)
      {
         TestingUtil.killCaches(cache);
         UnitTestDatabaseManager.shutdownInMemoryDatabase(props);
         cache = null;
View Full Code Here

Examples of javax.naming.InitialContext.unbind()

  /** Unbinds an object from the JNDI context. */
  void unbind(String name) {
    try {
      Context ctx = new InitialContext();
      ctx.unbind(name);
      boundNames.remove(name);
    } catch (Exception exc) {}
  }

  /**
 
View Full Code Here

Examples of javax.naming.InitialContext.unbind()

   }

   protected void tearDown() {
      try {
         InitialContext ctx = new InitialContext(this.env);
         ctx.unbind(CONNECTION_FACTORY);
         ctx.unbind(TOPIC);
      }
      catch (NamingException ex) {
         ex.printStackTrace();
         assertTrue("exception when unbinding", false);
View Full Code Here

Examples of javax.naming.InitialContext.unbind()

   protected void tearDown() {
      try {
         InitialContext ctx = new InitialContext(this.env);
         ctx.unbind(CONNECTION_FACTORY);
         ctx.unbind(TOPIC);
      }
      catch (NamingException ex) {
         ex.printStackTrace();
         assertTrue("exception when unbinding", false);
      }
View Full Code Here

Examples of javax.naming.InitialContext.unbind()

   protected void tearDown() {
      try {
         this.connection.close();
         InitialContext ctx = new InitialContext();
         ctx.unbind(CONNECTION_FACTORY);
         ctx.unbind(TOPIC);
         this.connection = null;
      }
      catch (JMSException ex) {
         ex.printStackTrace();
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.