Examples of StorageManager


Examples of com.commsen.stopwatch.storages.StorageManager

      if (isDebug()) {
        getLogger().debug("engine will now attempt to initialize its storage ... ");
      }
     
     
      storageManager = new StorageManager(getStorage(), getPersistenceMode());
      storageManager.start();

    if (getLogger().isInfoEnabled()) {
      getLogger().info("Engine started in " + (System.currentTimeMillis() - t1) + "ms. ");
    }
View Full Code Here

Examples of com.dp.nebula.wormhole.engine.storage.StorageManager

      if (storageConfList == null || storageConfList.isEmpty()) {
        s_logger.error("No writer is defined in job configuration or there are some errors in writer configuration");
        return JobStatus.FAILED.getStatus();
      }
      int writerNum = jobConf.getWriterNum();
      StorageManager storageManager = new StorageManager(storageConfList);
      monitorManager = new MonitorManager(writerNum);
      monitorManager.setStorageManager(storageManager);

      // get job conf and start reader & writer
      JobPluginConf readerConf = jobConf.getReaderConf();
View Full Code Here

Examples of com.forgeessentials.data.StorageManager

        configManager = new ConfigManager(FEDIR, "main");
        configManager.registerLoader(configManager.getMainConfigName(), this);
        configManager.registerLoader(configManager.getMainConfigName(), new OutputHandler());

        // Initialize data-API
        StorageManager storageManager = new StorageManager(configManager.getConfig("DataStorage"));
        DataStorageManager.manager = storageManager;
        DataStorageManager.registerDriver("ForgeConfig", ForgeConfigDataDriver.class);
        DataStorageManager.registerDriver("NBT", NBTDataDriver.class);
        DataStorageManager.registerDriver("SQL_DB", SQLDataDriver.class);
        registerDataTypes();
        storageManager.setupManager();

        // Load network packages
        FunctionHelper.netHandler = NetworkRegistry.INSTANCE.newSimpleChannel("forgeessentials");
        FunctionHelper.netHandler.registerMessage(S0PacketHandshake.class, S0PacketHandshake.class, 0, Side.SERVER);
        FunctionHelper.netHandler.registerMessage(S1PacketSelectionUpdate.class, S1PacketSelectionUpdate.class, 1, Side.CLIENT);
View Full Code Here

Examples of org.apache.myfaces.extensions.validator.core.storage.StorageManager

                new DefaultCrossValidationStorageManager();
        crossValidationStorageManager.register(new CrossValidationStorageNameMapper());
        storageManagerHolder.setStorageManager(CrossValidationStorage.class, crossValidationStorageManager, false);

        //group-validation light
        StorageManager storageManager = storageManagerHolder.getStorageManager(GroupStorage.class);

        if(storageManager instanceof AbstractNameMapperAwareFactory)
        {
            ((AbstractNameMapperAwareFactory<String>)storageManager)
                    .register(new PropertyValidationGroupStorageNameMapper());
View Full Code Here

Examples of org.apache.myfaces.extensions.validator.core.storage.StorageManager

    }

    @SuppressWarnings({"unchecked"})
    protected void registerGroupStorageNameMapper()
    {
        StorageManager storageManager = getStorageManagerHolder().getStorageManager(GroupStorage.class);

        if (storageManager instanceof AbstractNameMapperAwareFactory)
        {
            ((AbstractNameMapperAwareFactory<String>) storageManager)
                    .register(new BeanValidationGroupStorageNameMapper());
        }
        else
        {
            this.logger.warning(storageManager.getClass().getName() +
                    " has to implement AbstractNameMapperAwareFactory " + getClass().getName() +
                    " couldn't register " + BeanValidationGroupStorageNameMapper.class.getName());
        }
    }
View Full Code Here

Examples of org.apache.sandesha2.storage.StorageManager

    // Open a connection to the endpoint
    HttpURLConnection connection =
      FaultTestUtils.getHttpURLConnection("http://127.0.0.1:" + serverPort + "/axis2/services/RMSampleService",
          pingAction);

    StorageManager storageManager =
      SandeshaUtil.getSandeshaStorageManager(serverConfigContext, serverConfigContext.getAxisConfiguration());
   
    RMDBeanMgr rmdBeanMgr = storageManager.getRMDBeanMgr();
   
    String seqID = SandeshaUtil.getUUID();
   
    // Mockup an RMDBean
    RMDBean rmdBean = new RMDBean();
    rmdBean.setSequenceID(seqID);
    rmdBean.setToEPR(AddressingConstants.Final.WSA_ANONYMOUS_URL);
    rmdBean.setAcksToEPR(AddressingConstants.Final.WSA_ANONYMOUS_URL);
    rmdBean.setReplyToEPR(AddressingConstants.Final.WSA_ANONYMOUS_URL);
    rmdBean.setRMVersion(Sandesha2Constants.SPEC_VERSIONS.v1_1);
    rmdBean.setServerCompletedMessages(new RangeString());
    // Flag that the sequence is closed.
    rmdBean.setClosed(true);
   
    // Create a transaction and insert the RMSBean
    Transaction tran = storageManager.getTransaction();
   
    rmdBeanMgr.insert(rmdBean);
   
    tran.commit();
View Full Code Here

Examples of org.apache.sandesha2.storage.StorageManager

    MessageContext msgCtx = rmMsgCtx.getMessageContext();

    String sequenceId = closeSequence.getIdentifier().getIdentifier();
   
    StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(configCtx, configCtx
        .getAxisConfiguration());

    RMDBean rmdBean = SandeshaUtil.getRMDBeanFromSequenceId(storageManager, sequenceId);

    // Check that the sender of this CloseSequence holds the correct token
    if(rmdBean != null && rmdBean.getSecurityTokenData() != null) {
      SecurityManager secManager = SandeshaUtil.getSecurityManager(msgCtx.getConfigurationContext());
      OMElement body = msgCtx.getEnvelope().getBody();
      SecurityToken token = secManager.recoverSecurityToken(rmdBean.getSecurityTokenData());
      secManager.checkProofOfPossession(token, body, msgCtx);
    }

    if (FaultManager.checkForUnknownSequence(rmMsgCtx, sequenceId, storageManager, false)) {
      if (log.isDebugEnabled())
        log.debug("Exit: CloseSequenceProcessor::processInMessage, Unknown sequence " + sequenceId);
      return false;
    }
   
    // throwing a fault if the sequence is terminated
    if (FaultManager.checkForSequenceTerminated(rmMsgCtx, sequenceId, rmdBean, false)) {
      if (log.isDebugEnabled())
        log.debug("Exit: CloseSequenceProcessor::processInMessage, Sequence terminated");
      return false;
    }

    rmdBean.setClosed(true);
    storageManager.getRMDBeanMgr().update(rmdBean);

    RMMsgContext ackRMMsgCtx = AcknowledgementManager.generateAckMessage(rmMsgCtx, rmdBean, sequenceId, storageManager, true);
    // adding the ack part(s) to the envelope.
    Iterator sequenceAckIter = ackRMMsgCtx
        .getMessageParts(Sandesha2Constants.MessageParts.SEQ_ACKNOWLEDGEMENT);
View Full Code Here

Examples of org.apache.sandesha2.storage.StorageManager

    String sequenceId = ackRequested.getIdentifier().getIdentifier();

    MessageContext msgContext = rmMsgCtx.getMessageContext();
    ConfigurationContext configurationContext = msgContext.getConfigurationContext();

    StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(configurationContext,
        configurationContext.getAxisConfiguration());
   
    // Check that the sender of this AckRequest holds the correct token
    RMDBean rmdBean = SandeshaUtil.getRMDBeanFromSequenceId(storageManager, sequenceId);

    if(rmdBean != null && rmdBean.getSecurityTokenData() != null) {
      SecurityManager secManager = SandeshaUtil.getSecurityManager(configurationContext);
      SecurityToken token = secManager.recoverSecurityToken(rmdBean.getSecurityTokenData());
     
      secManager.checkProofOfPossession(token, soapHeader, msgContext);
    }

    // Check that the sequence requested exists
    if (FaultManager.checkForUnknownSequence(rmMsgCtx, sequenceId, storageManager, piggybackedAckRequest)) {
      if (log.isDebugEnabled())
        log.debug("Exit: AckRequestedProcessor::processAckRequestedHeader, Unknown sequence ");
      return false;
    }

    // throwing a fault if the sequence is terminated
    if (FaultManager.checkForSequenceTerminated(rmMsgCtx, sequenceId, rmdBean, piggybackedAckRequest)) {
      if (log.isDebugEnabled())
        log.debug("Exit: AckRequestedProcessor::processAckRequestedHeader, Sequence terminated");
      return false;
    }

    // Setting the ack depending on AcksTo.
    EndpointReference acksTo = new EndpointReference(rmdBean.getAcksToEPR());
    String acksToStr = acksTo.getAddress();

    if (acksToStr == null)
      throw new SandeshaException(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.acksToStrNotSet));

    //Getting the operation for ack messages.
    AxisOperation ackOperation = SpecSpecificConstants.getWSRMOperation(
        Sandesha2Constants.MessageTypes.ACK,
        rmdBean.getRMVersion(),
        msgContext.getAxisService());
   
    MessageContext ackMsgCtx = SandeshaUtil.createNewRelatedMessageContext(rmMsgCtx, ackOperation);
   
    //setting up the RMMsgContext
    RMMsgContext ackRMMsgCtx = MsgInitializer.initializeMessage(ackMsgCtx);
    ackRMMsgCtx.setRMNamespaceValue(rmMsgCtx.getRMNamespaceValue());
       
    ackMsgCtx.setTo(acksTo);
       
    ackRMMsgCtx.setRMNamespaceValue(rmMsgCtx.getRMNamespaceValue());
   
    if (ackMsgCtx.getMessageID()==null)
      ackMsgCtx.setMessageID(SandeshaUtil.getUUID());
   
    //adding the SOAP Envelope
    SOAPFactory factory = SOAPAbstractFactory.getSOAPFactory(SandeshaUtil.getSOAPVersion(msgContext.getEnvelope()));
    SOAPEnvelope envelope = factory.getDefaultEnvelope();
    try {
      ackMsgCtx.setEnvelope(envelope);
    } catch (AxisFault e3) {
      throw new SandeshaException(e3.getMessage());
    }

    ackMsgCtx.setReplyTo(msgContext.getTo());
    RMMsgCreator.addAckMessage(ackRMMsgCtx, sequenceId, rmdBean);
   
    //this is not a client generated message. So set serverSide to true.
    ackMsgCtx.setServerSide(true);

    if (acksTo.hasAnonymousAddress()) {
      //If acksTo is anonymous we will be sending the ack here it self. Transport will use what ever mechanism to send the
      //message. (for e.g. HTTP will use the back channel)

      // setting "response written" since acksto is anonymous
     
      //adding an OperationContext if one is not available. (for e.g. If we are in the SandeshaGlobalInHandler)
      if (rmMsgCtx.getMessageContext().getOperationContext() == null) {
        // operation context will be null when doing in a GLOBAL
        // handler.
       
        ServiceContext serviceCtx = msgContext.getServiceContext();
        OperationContext opCtx =  OperationContextFactory.createOperationContext(ackOperation.getAxisSpecificMEPConstant(), ackOperation, serviceCtx);

        rmMsgCtx.getMessageContext().setOperationContext(opCtx);
      }
     
      try {
        AxisEngine.send(ackMsgCtx);
        TransportUtils.setResponseWritten(ackMsgCtx, true);
      } catch (AxisFault e1) {
        throw new SandeshaException(e1.getMessage());
      }

    } else {
      //If AcksTo is non-anonymous we will be adding a senderBean entry here. The sender is responsible
      //for sending it out.
     
      SenderBeanMgr senderBeanMgr = storageManager.getSenderBeanMgr();

      String key = SandeshaUtil.getUUID();

      // dumping to the storage will be done be Sandesha2 Transport Sender
      // storageManager.storeMessageContext(key,ackMsgCtx);
View Full Code Here

Examples of org.apache.sandesha2.storage.StorageManager

      boolean pending = messagePending.isPending();
      if (pending) {
        SequenceEntry entry = (SequenceEntry) message.getProperty(Sandesha2Constants.MessageContextProperties.MAKECONNECTION_ENTRY);
        if(entry != null) {
          ConfigurationContext context = message.getConfigurationContext();
          StorageManager storage = SandeshaUtil.getSandeshaStorageManager(context, context.getAxisConfiguration());
          PollingManager pollingManager = storage.getPollingManager();
          if(pollingManager != null) pollingManager.schedulePollingRequest(entry.getSequenceId(), entry.isRmSource());
        }
      }
    }
     
View Full Code Here

Examples of org.apache.sandesha2.storage.StorageManager

    MakeConnection makeConnection = (MakeConnection) rmMsgCtx.getMessagePart(Sandesha2Constants.MessageParts.MAKE_CONNECTION);
    Address address = makeConnection.getAddress();
    Identifier identifier = makeConnection.getIdentifier();
   
    ConfigurationContext configurationContext = rmMsgCtx.getConfigurationContext();
    StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(configurationContext,configurationContext.getAxisConfiguration());
   
    SenderBeanMgr senderBeanMgr = storageManager.getSenderBeanMgr();
   
    //selecting the set of SenderBeans that suit the given criteria.
    SenderBean findSenderBean = new SenderBean ();
    findSenderBean.setSend(true);
    findSenderBean.setTransportAvailable(false);
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.