Package fr.dyade.aaa.jndi2.distributed

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


    return ownerId.toString();
  }

  public void setStrOwnerId(String strOwnerId) {
    if (!strOwnerId.equals(ownerId.toString()))
      sendTo(new ChangeOwnerRequest((CompositeName) contextName.clone(), strOwnerId));
  }
View Full Code Here


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

    CompositeName cn = (CompositeName) contextName.clone();
    if (contextName != null)
      cn.add(ctxName);
    else
      cn = getCompositeName(ctxName);
    sendTo(new CreateSubcontextRequest(cn));
  }
View Full Code Here

      Trace.logger.log(BasicLevel.DEBUG,
                       "ReplicationManager.invokeOwner(" +
                       owner + ',' + reqCtx + ')');
    JndiRequest request = reqCtx.getRequest();   
    if (request instanceof CreateSubcontextRequest) {
      CreateSubcontextRequest csr =
        (CreateSubcontextRequest)request;
      request = new CreateRemoteSubcontextRequest(
                                                  csr.getName(),
                                                  getId());
    }

    sendTo(owner,
           new JndiScriptRequestNot(
View Full Code Here

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

      cn = getCompositeName(ctxName);
    sendTo(new CreateSubcontextRequest(cn));
  }

  public void destroySubcontext() throws NamingException {
    sendTo(new DestroySubcontextRequest(contextName));
  }
View Full Code Here

                               socket.getInetAddress() + ':' +
                               socket.getPort());
            }

            try {
              IOControl ioCtrl = new IOControl(socket);
              int rid = ioCtrl.readInt();
              if (Trace.logger.isLoggable(BasicLevel.DEBUG))
                Trace.logger.log(BasicLevel.DEBUG, " -> request id = " + rid);
              switch (rid) {
              case HARequestManager.IDEMPOTENT:
                Channel.sendTo(
                               tcpServer.getServerId(),
                               new TcpRequestNot(new HARequestContext(
                                                                      ioCtrl, HARequestManager.IDEMPOTENT)));
                break;
              case HARequestManager.NOT_IDEMPOTENT:
                GetRequestIdNot gri =
                  new GetRequestIdNot();
                gri.invoke(tcpServer.getServerId());
                int newRid = gri.getId();
                ioCtrl.writeInt(newRid);
                Channel.sendTo(
                               tcpServer.getServerId(),
                               new TcpRequestNot(new HARequestContext(
                                                                      ioCtrl, newRid)));
                break;
View Full Code Here

      Trace.logger.log(BasicLevel.DEBUG,
                       "SimpleNamingConnection.open()");
    try {
      InetAddress addr = InetAddress.getByName(hostName);
      Socket socket = socketFactory.createSocket(addr, port, connectTimeout);
      ioCtrl = new IOControl(socket);
    } catch (IOException exc) {
      if (Trace.logger.isLoggable(BasicLevel.DEBUG))
        Trace.logger.log(BasicLevel.DEBUG,
                         "SimpleNamingConnection.open()", exc);
      NamingException exc2 = new NamingException(exc.getMessage());
View Full Code Here

      if (Trace.logger.isLoggable(BasicLevel.DEBUG))
        Trace.logger.log(BasicLevel.DEBUG,
                         " -> try connection " + sa);
      try {
        Socket socket = new Socket(sa.hostName, sa.port);
        ioCtrl = new IOControl(socket);
        return;
      } catch (IOException exc) {
        if (Trace.logger.isLoggable(BasicLevel.WARN))
          Trace.logger.log(BasicLevel.WARN, "NamingConnection.open()", exc);
        // Put the faulty address at the end of the list
View Full Code Here

        Trace.logger.log(BasicLevel.DEBUG, "", nnfe);
      return onMissingRecord(nnfe, reqCtx);
    } catch (NamingException nexc) {
      if (Trace.logger.isLoggable(BasicLevel.DEBUG))
        Trace.logger.log(BasicLevel.DEBUG, "", nexc);
      return new JndiError(nexc);
    }
  }
View Full Code Here

TOP

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

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.