Package org.jboss.fresh.registry

Examples of org.jboss.fresh.registry.RegistryContext.lookup()


        con.setAutoCommit(false);
      }
    } else {
      if (dts == null) {
        RegistryContext ctx = new RegistryContext();
        dts = (DataSource) ctx.lookup(ds);
      }

      con = dts.getConnection();
      log.info("Got connection from pool: " + con + " (autocommit:" + con.getAutoCommit() + ')');
      con.setAutoCommit(false);
View Full Code Here


      // take parameter 1
      // look up the name through InitialContext
      RegistryContext ctx = new RegistryContext();
      Object obj = null;
      try {
        obj = (Context) ctx.lookup(tmp);
      } catch (Exception ex) {
        if (canThrowEx()) {
          throw new Exception("No object found in JNDI for name: " + tmp);
        } else {
          err.println("No object found in JNDI for name: " + tmp);
View Full Code Here

      shell.getContext().put("AppContext", ctx0);

      Context gctx = null;
      try {
        tmp = "java:/FRESH/GlobalContext";
        gctx = (Context) ctx.lookup(tmp);
      } catch (Exception ex) {
        if (canThrowEx()) {
          throw new Exception("No object found in JNDI for name: " + tmp);
        } else {
          err.println("No object found in JNDI for name: " + tmp);
View Full Code Here

    Name n = ctx.getNameParser("").parse(m_bindName);
    while (n.size() > 1) {
      String ctxName = n.get(0);
      try {
        ctx = (Context) ctx.lookup(ctxName);
      } catch (NameNotFoundException e) {
        ctx = ctx.createSubcontext(ctxName);
      }
      n = n.getSuffix(1);
    }
View Full Code Here

            Object o = map.get(key);
            if (o == null) return null;

            RegistryContext ctx = new RegistryContext();
            return ctx.lookup((String) o);

        } catch (Exception ex) {
            throw new RuntimeException(ex.toString(), ex);
        }
    }
View Full Code Here

          try {

                if (eUseLocal) {
                    RegistryContext ctx = new RegistryContext();
                    SystemShell sysshell = (SystemShell) ctx.lookup(eSvcname);
                    Shell shell = sysshell.startSession(null, false);

                    try {
                        // now line by line
                        // And put all exceptions to log too.
View Full Code Here

                        }
                    }
                } else {
                    // we get RemoteShell
                    InitialContext ctx = new InitialContext();
                    RemoteShellHome home = (RemoteShellHome) ctx.lookup(eSvcname);
                    RemoteShell shell = home.create();

                    try {
                        // now line by line
                        // And put all exceptions to log too.
View Full Code Here

            while (it.hasNext()) {
                Map.Entry ent = (Map.Entry) it.next();
                String path = (String) ent.getKey();
                String jndi = (String) ent.getValue();

                VFS mvfs = (VFS) ctx.lookup(jndi);
                vfs.mount(path, mvfs);
            }
        }
    }
View Full Code Here

    EventCentral ec = null;

    if (name != null) {
      RegistryContext ctx = new RegistryContext();
      try {
         ec = (EventCentral) ctx.lookup(name);
      } catch(ClassCastException ex) {
        error("Object bound in registry under " + name + " is not a valid EventCentral object: " + ctx.lookup(name));
        return;
      } catch(NamingException ex) {
        log.error("Failed to retrieve EventCentral: ", ex);
View Full Code Here

    if (name != null) {
      RegistryContext ctx = new RegistryContext();
      try {
         ec = (EventCentral) ctx.lookup(name);
      } catch(ClassCastException ex) {
        error("Object bound in registry under " + name + " is not a valid EventCentral object: " + ctx.lookup(name));
        return;
      } catch(NamingException ex) {
        log.error("Failed to retrieve EventCentral: ", ex);
        error("Failed to find EventCentral with registry name: " + name);
        return;
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.