Package javax.naming

Examples of javax.naming.Context.unbind()


        }

        for (PersistenceUnitInfo unitInfo : appInfo.persistenceUnits) {
            try {
                Object object = globalContext.lookup("openejb/PersistenceUnit/" + unitInfo.id);
                globalContext.unbind("openejb/PersistenceUnit/"+unitInfo.id);

                // close EMF so all resources are released
                ((EntityManagerFactory) object).close();
                persistenceClassLoaderHandler.destroy(unitInfo.id);
            } catch (Throwable t) {
View Full Code Here


        deployments.clear();

        for (String clientId : clientIds) {
            try {
                globalContext.unbind("/openejb/client/" + clientId);
            } catch (Throwable t) {
                undeployException.getCauses().add(new Exception("client: " + clientId + ": " + t.getMessage(), t));
            }
        }
View Full Code Here

        }

        // Attempt to delete an existing binding
        try {
            if (ok) {
                envContext.unbind("byteEntry");
                sb.append("  Allowed unbind().");
                value = envContext.lookup("byteEntry");
                if (value == null)
                    sb.append("  Allowed unbind of deleted entry.");
            }
View Full Code Here

  private void shutdown0() {
    // Unbind.
    if (!Boolean.getBoolean(DISABLE_BINDING)) try {
      binder.stopBinding();
      Context objectContext = configuration.getObjectContext();
      objectContext.unbind(getName());
      objectContext.close();
    } catch (NamingException ignore) {}

    // Kill the ORB.  YEAH!  KILL IT, KILL IT, KIIIIIIIIIIIIIIL IIIIIIIIT!!!!!!!1
    try {
View Full Code Here

    boolean unbound = false;
    for (Iterator i = contexts.iterator(); i.hasNext();) {
      Context c = (Context) i.next();
      try {
        c.unbind(name);
        unbound = true;
      } catch (NamingException ignore) {}
    }
    if (!unbound) throw new InvalidNameException("Name \"" + name + "\" not compatible with any managed subcontext");
  }
View Full Code Here

            return;
        }

        // unbind userId binding in /sessions
        try {
            topSessionsContext.unbind(sessionId);
        }
        catch (NamingException ne) {
            this.logger.warn("Problems unbinding '/sessions/" + sessionId + "', continuing with cleanup.", ne);
        }
View Full Code Here

                       
                        try {
                            final Context layoutSessionsContext = (Context) layoutIdContext.lookup("sessions");
                           
                            // unbind sessionId
                            layoutSessionsContext.unbind(sessionId);
                            if (this.logger.isDebugEnabled()) {
                                this.logger.debug("Destroyed Context '/users/" + userId + "/layouts/" + layoutId + "/sessions/" + sessionId + "'");
                            }

                            // see if the lsessionsContext is empty
View Full Code Here

            bindingAttrs.remove(atom);
    }
    else if( (binding instanceof Context) )
    {
      Context context = (Context) binding;
      context.unbind(name.getSuffix(1));
    }
    else
    {
      NotContextException e = new NotContextException(atom + " does not name a directory context that supports attributes");
      e.setRemainingName(name);
View Full Code Here

      server.setAttribute(namingService, callByValue);
      System.out.println("NamingService.CallByValue restored to: "+origCallByValue);

      InitialContext ctx = new InitialContext();
      Context testCtx = (Context) ctx.lookup("shared-context");
      testCtx.unbind("KeyCount");
      System.out.println("Unbound KeyCount");
      for(int n = 0; n < names.length; n ++)
      {
         String key = "Key#" + n;
         testCtx.unbind(key);
View Full Code Here

      testCtx.unbind("KeyCount");
      System.out.println("Unbound KeyCount");
      for(int n = 0; n < names.length; n ++)
      {
         String key = "Key#" + n;
         testCtx.unbind(key);
         System.out.println("Unbound "+key);
      }
      ctx.unbind("shared-context");
      System.out.println("Destroyed shared-context");
   }
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.