Package fr.dyade.aaa.jndi2.distributed

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


                                                  csr.getName(),
                                                  getId());
    }

    sendTo(owner,
           new JndiScriptRequestNot(
                                    new JndiRequest[]{request}, true));
    RequestContextList list =
      (RequestContextList)writeRequestContextLists.get(owner);
    if (list == null) {
      list = new RequestContextList();
View Full Code Here


                       "ReplicationManager[" +
                       getId() + "].onReply(" +
                       from + ',' + reply + ')');
    RequestContextList ctxList =
      (RequestContextList)writeRequestContextLists.get(from);
    RequestContext ctx = ctxList.get();
    ctxList.pop();
    if (ctxList.getSize() == 0) {
      writeRequestContextLists.remove(from);
    }   
    if (ctx != null) {
      ctx.reply(reply);
      saveWriteRequestTable();
    } else {
      Trace.logger.log(BasicLevel.ERROR,
                       "Reply context not found: " +
                       from + ", " + reply);
View Full Code Here

          (CompositeName)retryNames.elementAt(i);
        RequestContextList ctxList =
          (RequestContextList)retryLists.elementAt(i);
        initRequestContextLists.remove(name);
        while (ctxList.getSize() > 0) {
          RequestContext reqCtx = ctxList.get();
          JndiReply reply = invoke(reqCtx);
          if (reply != null) {
            reqCtx.reply(reply);
          }
          ctxList.pop();
        }
      }
      saveInitRequestTable();
View Full Code Here

    sendTo(from, new SyncReplyNot());
  }

  void doReact(AgentId from, SyncReplyNot not) {
    RequestContextList ctxList = (RequestContextList)syncRequestContextLists.get(from);
    RequestContext ctx = ctxList.get();
    ctxList.pop();
    if (ctxList.getSize() == 0) {
      syncRequestContextLists.remove(from);
    }   
    if (ctx != null) {
      JndiReply reply = invoke(ctx);
      if (reply != null) {
        ctx.reply(reply);
        saveSyncRequestTable();
      }
    }
  }
View Full Code Here

      3,
      getDefault());
    tcpServer.start();

    if (firstTime) {
      RequestManager manager = new RequestManager();
     
      HARequestManager haManager = new HARequestManager();
      haManager.setRequestManager(manager);

      AgentEntryPoint agentEP = new AgentEntryPoint();   
      agentEP.setRequestManager(manager);
     
      HAEntryPoint haEP = new HAEntryPoint();
      haEP.setHARequestManager(haManager);

      Container container = new Container();   
      container.addEntryPoint(agentEP);
      container.addEntryPoint(haEP);
      container.setLifeCycleListener(haManager);
      container.setBagSerializer(haManager);
      manager.setContainer(container);
      container.deploy();
    }
  }
View Full Code Here

    if (firstTime) {
      ReplicationManager manager = new ReplicationManager(serverIds);
      AgentEntryPoint agentEP = new AgentEntryPoint();   
      agentEP.setRequestManager(manager);
      TcpEntryPoint tcpEP = new TcpEntryPoint();
      tcpEP.setRequestManager(manager);
      ReplicationEntryPoint replicationEP = new ReplicationEntryPoint();   
      replicationEP.setRequestManager(manager);

      Container container = new Container();   
      container.addEntryPoint(agentEP);
View Full Code Here

                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;
              default:
                Channel.sendTo(
                               tcpServer.getServerId(),
                               new TcpRequestNot(new HARequestContext(
                                                                      ioCtrl, rid)));
              }
            } catch (Exception exc) {
              Trace.logger.log(
                               BasicLevel.ERROR,
View Full Code Here

    int poolSize = AgentServer.getInteger(JndiServer.POOL_SIZE_PROP, JndiServer.DEFAULT_POOL_SIZE).intValue();

    int timeout = AgentServer.getInteger(JndiServer.SO_TIMEOUT_PROP, JndiServer.DEFAULT_SO_TIMEOUT).intValue();

    tcpServer = new TcpServer(serverSocket, poolSize, timeout, getDefault());

    if (firstTime) {
      ReplicationManager manager = new ReplicationManager(serverIds);
      AgentEntryPoint agentEP = new AgentEntryPoint();   
      agentEP.setRequestManager(manager);
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.