Package fr.dyade.aaa.jndi2.distributed

Examples of fr.dyade.aaa.jndi2.distributed.DistributedJndiServer


      return new ListBindingsReply((Binding[])obj);
    } else if (request instanceof ListRequest) {
      Object obj = list((ListRequest)request);
      return new ListReply((NameClassPair[])obj);
    } else {
      return new JndiError(
        new NamingException("Unknown operation"));
    }
  }
View Full Code Here


        return new JndiReply();
      } else if (request instanceof DestroySubcontextRequest) {
        destroySubcontext((DestroySubcontextRequest)request);
        return new JndiReply();
      } else {
        return new JndiError(new NamingException("Unknown operation"));
      }
    } catch (NotOwnerException noexc) {
      if (Trace.logger.isLoggable(BasicLevel.DEBUG))
        Trace.logger.log(BasicLevel.DEBUG, "", noexc);
      return invokeOwner(
View Full Code Here

    if (request instanceof ChangeOwnerRequest) {
      changeOwner((ChangeOwnerRequest)request);
      return new JndiReply();
    }
   
    return new JndiError(new NamingException("Unknown admin operation"));
  }
View Full Code Here

  protected JndiReply invokeOwner(AgentId owner,
                                  RequestContext reqCtx) {
    if (Trace.logger.isLoggable(BasicLevel.DEBUG))
      Trace.logger.log(BasicLevel.DEBUG, "RequestManager.invokeOwner(" +
                       owner + ',' + reqCtx + ')');
    return new JndiError(new NamingException("Not owner"));
  }
View Full Code Here

  protected JndiReply onMissingRecord(MissingRecordException mre,
                                      RequestContext reqCtx) {
    if (Trace.logger.isLoggable(BasicLevel.DEBUG))
      Trace.logger.log(BasicLevel.DEBUG, "RequestManager.onMissingRecord(" +
                       mre + ',' + reqCtx + ')');
    return new JndiError(mre.getNameNotFoundException());
  }
View Full Code Here

    CompositeName resolvedName =
      (CompositeName)mre.getNameNotFoundException().getResolvedName();
    if (mre.getOwnerId().equals(getId()) ||
        resolvedName.equals(reqCtx.getResolvedName())) {
      // The resolved context has already been updated.
      return new JndiError(mre.getNameNotFoundException());
    }

    reqCtx.setResolvedName(resolvedName);
    synchronizeRequest((AgentId)mre.getOwnerId(), reqCtx);
    return null;
View Full Code Here

      (HARequestContext)not.getRequestContext();
    if (Trace.logger.isLoggable(BasicLevel.DEBUG))
      Trace.logger.log(BasicLevel.DEBUG,
                       " -> request id = " + reqCtx.getId());
    if (reqCtx.getId() == IDEMPOTENT) {
      JndiReply reply = manager.invoke(reqCtx);
      reqCtx.reply(reply);
    } else {
      Integer reqId = new Integer(reqCtx.getId());
      HARequestContext recoveredReqCtx =
        (HARequestContext)requests.get(reqId);
      if (recoveredReqCtx == null) {       
        requests.put(new Integer(requestCounter), reqCtx);
        JndiReply reply = manager.invoke(reqCtx);
        reqCtx.reply(reply);
      } else {
        JndiReply reply = recoveredReqCtx.getReply();
        if (reply == null) {
          recoveredReqCtx.recover(
            reqCtx);
        } else {
          reqCtx.reply(reply);
View Full Code Here

      Trace.logger.log(BasicLevel.DEBUG, "NamingContextImpl.bind(" +
                       name + ',' + obj + ')');
    if (obj instanceof Referenceable) {
      obj = ((Referenceable)obj).getReference();
    }
    JndiReply reply = connection.invoke(
      new BindRequest(merge(contextPath, name), obj));
    if (reply instanceof JndiError) {
      NamingException exc = ((JndiError)reply).getException();
      exc.fillInStackTrace();
      throw exc;
View Full Code Here

      Trace.logger.log(BasicLevel.DEBUG, "NamingContextImpl.rebind(" +
                       name + ',' + obj + ')');
    if (obj instanceof Referenceable) {
      obj = ((Referenceable)obj).getReference();
    }
    JndiReply reply = connection.invoke(
      new BindRequest(merge(contextPath, name), obj, true));
    if (reply instanceof JndiError) {
      NamingException exc = ((JndiError)reply).getException();
      exc.fillInStackTrace();
      throw exc;
View Full Code Here

  public Object lookup(String name) throws NamingException {
    if (Trace.logger.isLoggable(BasicLevel.DEBUG))
      Trace.logger.log(BasicLevel.DEBUG, "NamingContextImpl.lookup(" +
                       name + ')');
    CompositeName path = merge(contextPath, name);
    JndiReply reply = connection.invoke(new LookupRequest(path));
    if (reply instanceof JndiError) {
      NamingException exc = ((JndiError)reply).getException();
      exc.fillInStackTrace();
      throw exc;
    } else if (reply instanceof LookupReply) {
View Full Code Here

TOP

Related Classes of fr.dyade.aaa.jndi2.distributed.DistributedJndiServer

Copyright © 2018 www.massapicom. 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.