Package org.jboss.fresh.registry

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


        String device = (String) info.getAttributes().get("file-handler");
        if(device != null) {
          try {
            RegistryContext ctx = new RegistryContext();
            VFSFileHandlerFactory f = (VFSFileHandlerFactory) ctx.lookup(device);
            delegate = f.getInputStream(info);
          } catch(IOException ex) {
            throw ex;
          } catch(Exception ex) {
            IOException exout = new IOException("File handler initialization failed: ");
View Full Code Here


    public VFS getVFS() {
        VFS vfs = null;
        try {
            RegistryContext ctx = new RegistryContext();
            vfs = (VFS) ctx.lookup(vfsName);
        } catch (NamingException ex) {
            log.error(ex.getMessage(), ex);
            throw new RuntimeException("org.jboss.fresh.shell.impl.SystemShellImpl: startSession: " + vfsName + " not bound.");
        }
View Full Code Here

    RootVFS rootfs = null;

    RegistryContext ctx = new RegistryContext();
    try {
      rootfs = (RootVFS) ctx.lookup("java:/CP2/VFS");
    } catch(ClassCastException ex) {
      error("VFS bound at java:/CP2/VFS is not RootVFS");
      return;
    } catch(NameNotFoundException ex) {
      error("Root VFS not bound (should be at: java:/CP2/VFS)");
View Full Code Here

    String path = params[0];
    String jndi = params[1];
    VFS vfs = null;

    try {
      vfs = (VFS) ctx.lookup(jndi);
    } catch(NameNotFoundException ex) {
      error("No VFS bound at: " + jndi);
      return;
    }
View Full Code Here

    if (g) {
      BufferObjectWriter oout = new BufferObjectWriter(getStdOut());
      Object o = null;

      try {
        o = ctx.lookup(name);
      } catch (NamingException ex) {
        if (tex)
          throw new RuntimeException(ex);
        else
          out.print("Name not bound: " + name);
View Full Code Here

      return;
    }

    if (l) {
      BufferObjectWriter oout = new BufferObjectWriter(getStdOut());
      Object o = ctx.lookup(name);
      if (!(o instanceof Context)) {
        if (tex)
          throw new RuntimeException("Object is not instance of Context. Can't list it. : " + name);
        else
          out.print("Object is not instance of Context. Can't list it. : " + name);
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.