Examples of SandeshaPolicyBean


Examples of org.apache.sandesha2.policy.SandeshaPolicyBean

  }

  public void engageNotify(AxisDescription axisDescription) throws AxisFault {
    if(log.isDebugEnabled()) log.debug("Entry: SandeshaModule::engageNotify, " + axisDescription);
   
    SandeshaPolicyBean parentPropertyBean = SandeshaUtil.getPropertyBean(axisDescription.getParent());
   
    SandeshaPolicyBean axisDescPropertyBean = PropertyManager.loadPropertiesFromAxisDescription(axisDescription,parentPropertyBean);
   
    if (axisDescPropertyBean!=null) {
      Parameter parameter = new Parameter ();
      parameter.setName(Sandesha2Constants.SANDESHA_PROPERTY_BEAN);
      parameter.setValue(axisDescPropertyBean);
View Full Code Here

Examples of org.apache.sandesha2.policy.SandeshaPolicyBean

  public InMemoryStorageManager(ConfigurationContext context)
  throws SandeshaException
  {
    super(context);
   
    SandeshaPolicyBean policy = SandeshaUtil.getPropertyBean(context.getAxisConfiguration());
    useSerialization = policy.isUseMessageSerialization();
   
    // Note that while inOrder is a global property we can decide if we need the
    // invoker thread at this point. If we change this to be a sequence-level
    // property then we'll need to revisit this.
    boolean inOrder = policy.isInOrder();
    boolean polling = policy.isEnableMakeConnection();
   
    this.rMSBeanMgr = new InMemoryRMSBeanMgr (this, context);
    this.rMDBeanMgr = new InMemoryRMDBeanMgr (this, context);
    this.senderBeanMgr = new InMemorySenderBeanMgr (this, context);
    this.invokerBeanMgr = new InMemoryInvokerBeanMgr (this, context);
View Full Code Here

Examples of org.apache.sandesha2.policy.SandeshaPolicyBean

    rmsBean.setSequenceID(newOutSequenceId);

    // We should poll for any reply-to that uses the anonymous URI, when MakeConnection
    // is enabled.
    if (Sandesha2Constants.SPEC_VERSIONS.v1_1.equals(createSeqResponseRMMsgCtx.getRMSpecVersion())) {
      SandeshaPolicyBean policy = SandeshaUtil.getPropertyBean(configCtx.getAxisConfiguration());
      if(policy.isEnableMakeConnection()) {
        String acksTo = rmsBean.getAcksToEPR();
        EndpointReference reference = new EndpointReference(acksTo);
        if(acksTo == null || reference.hasAnonymousAddress()) {
          rmsBean.setPollingMode(true);
        }
View Full Code Here

Examples of org.apache.sandesha2.policy.SandeshaPolicyBean

    if(Sandesha2Constants.SPEC_2005_02.NS_URI.equals(rmNamespaceValue)) {
      autoOffer = twoWayService;
    } else {
      // We also do some checking at this point to see if MakeConection is required to
      // enable WS-RM 1.1, and write a warning to the log if it has been disabled.
      SandeshaPolicyBean policy = SandeshaUtil.getPropertyBean(context.getAxisConfiguration());
      if(twoWayService && !policy.isEnableMakeConnection()) {
        String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.makeConnectionWarning);
        log.warn(message);
      }
    }
View Full Code Here

Examples of org.apache.sandesha2.policy.SandeshaPolicyBean

      // the internalSequenceId value of the retransmitter Table for the
      // messages related to an incoming
      // sequence is the actual sequence ID

      // operation is the lowest level, Sandesha2 can be engaged.
      SandeshaPolicyBean propertyBean = SandeshaUtil.getPropertyBean(msgContext.getAxisOperation());

      long ackInterval = propertyBean.getAcknowledgementInterval();

      // Ack will be sent as stand alone, only after the retransmitter
      // interval.
      long timeToSend = System.currentTimeMillis() + ackInterval;
View Full Code Here

Examples of org.apache.sandesha2.policy.SandeshaPolicyBean

  }

  public static boolean hasSequenceTimedOut(RMSBean rmsBean, String internalSequenceId, StorageManager storageManager)
      throws SandeshaException {

    SandeshaPolicyBean propertyBean =
      SandeshaUtil.getPropertyBean(storageManager.getContext().getAxisConfiguration());

    if (propertyBean.getInactivityTimeoutInterval() <= 0)
      return false;

    boolean sequenceTimedOut = false;
   
    long lastActivatedTime = rmsBean.getLastActivatedTime();
    long timeNow = System.currentTimeMillis();
    if (lastActivatedTime > 0 && (lastActivatedTime + propertyBean.getInactivityTimeoutInterval() < timeNow))
      sequenceTimedOut = true;

    return sequenceTimedOut;
  }
View Full Code Here

Examples of org.apache.sandesha2.policy.SandeshaPolicyBean

        super(name);
    }

    public void setUp() throws Exception {
        AxisConfiguration axisConfig = new AxisConfiguration();
        SandeshaPolicyBean propertyBean = PropertyManager.loadPropertiesFromDefaultValues();
        Parameter parameter = new Parameter ();
        parameter.setName(Sandesha2Constants.SANDESHA_PROPERTY_BEAN);
        parameter.setValue(propertyBean);
        axisConfig.addParameter(parameter);
       
View Full Code Here

Examples of org.apache.sandesha2.policy.SandeshaPolicyBean

    Parameter parameter = axisConfiguration.getParameter(Sandesha2Constants.SANDESHA_PROPERTY_BEAN);
    if (parameter==null)
      throw new SandeshaException (SandeshaMessageHelper.getMessage(
          SandeshaMessageKeys.defaultPropertyBeanNotSet));
   
    SandeshaPolicyBean sandeshaPropertyBean = (SandeshaPolicyBean) parameter.getValue();
    return sandeshaPropertyBean;
  }
View Full Code Here

Examples of org.apache.sandesha2.policy.SandeshaPolicyBean

    Parameter parameter = axisDescription.getParameter(Sandesha2Constants.SANDESHA_PROPERTY_BEAN);
    if (parameter==null)
      throw new SandeshaException (SandeshaMessageHelper.getMessage(
          SandeshaMessageKeys.propertyBeanNotSet));
   
    SandeshaPolicyBean propertyBean = (SandeshaPolicyBean) parameter.getValue();
    return propertyBean;
  }
View Full Code Here

Examples of org.apache.sandesha2.policy.SandeshaPolicyBean

      // the internalSequenceId value of the retransmitter Table for the
      // messages related to an incoming
      // sequence is the actual sequence ID

      // operation is the lowest level, Sandesha2 can be engaged.
      SandeshaPolicyBean propertyBean = SandeshaUtil.getPropertyBean(msgContext.getAxisOperation());

      long ackInterval = propertyBean.getAcknowledgementInterval();

      // Ack will be sent as stand alone, only after the retransmitter
      // interval.
      long timeToSend = System.currentTimeMillis() + ackInterval;
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.