Package org.apache.sandesha2.storage

Examples of org.apache.sandesha2.storage.SandeshaStorageException


            // if a WS-RM policy is specified, use it
            if (wsRMPolicyKey != null) {
                Object property = synapseOutMessageContext.getEntry(wsRMPolicyKey);
                if (property instanceof OMElement) {
                    OMElement policyOMElement = (OMElement) property;
                    RMAssertionBuilder builder = new RMAssertionBuilder();
                    SandeshaPolicyBean sandeshaPolicyBean = (SandeshaPolicyBean) builder.build(policyOMElement, null);
                    Parameter policyParam = new Parameter(Sandesha2Constants.SANDESHA_PROPERTY_BEAN, sandeshaPolicyBean);
                    anoymousService.addParameter(policyParam);
                }
            }
        }
View Full Code Here


            // if a WS-RM policy is specified, use it
            if (wsRMPolicyKey != null) {
                Object property = synapseOutMessageContext.getEntry(wsRMPolicyKey);
                if (property instanceof OMElement) {
                    OMElement policyOMElement = (OMElement) property;
                    RMAssertionBuilder builder = new RMAssertionBuilder();
                    SandeshaPolicyBean sandeshaPolicyBean = (SandeshaPolicyBean) builder.build(policyOMElement, null);
                    Parameter policyParam = new Parameter(Sandesha2Constants.SANDESHA_PROPERTY_BEAN, sandeshaPolicyBean);
                    anoymousService.addParameter(policyParam);
                }
            }
        }
View Full Code Here

    return (SenderBean) super.retrieve(MessageId);
  }

  public boolean insert(SenderBean bean) throws SandeshaStorageException {
    if (bean.getMessageID() == null)
      throw new SandeshaStorageException(SandeshaMessageHelper.getMessage(
          SandeshaMessageKeys.nullMsgId));
    boolean result = super.insert(bean.getMessageID(), bean);
    mgr.getInMemoryTransaction().setSentMessages(true);
    return result;
  }
View Full Code Here

            HashSet set = new HashSet();
            set.add(this);
            while(other != null) {
              if(set.contains(other)) {
                String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.deadlock, this.toString(), bean.toString());
                SandeshaStorageException e = new SandeshaStorageException(message);
               
                // Do our best to get out of the way of the other work in the system
                waitingForTran = null;
                releaseLocks();
               
View Full Code Here

      Thread key = Thread.currentThread();
      t = (InMemoryTransaction) transactions.get(key);
      if(t == null) {
        // We attempted to do some work without a transaction in scope
        String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.noTransaction);
        SandeshaStorageException e = new SandeshaStorageException(message);
        if(log.isDebugEnabled()) log.debug(message, e);
        throw e;
      }
    }
    t.enlist(bean);
View Full Code Here

      }
    } catch (Exception e) {
      String message = SandeshaMessageHelper.getMessage(
          SandeshaMessageKeys.failedToLoadMessage, e.toString());
      if(log.isDebugEnabled()) log.debug(message);
      throw new SandeshaStorageException(message, e);
    }

    if(log.isDebugEnabled()) log.debug("Exit: InMemoryStorageManager::retrieveMessageContext, " + messageContext);
    return messageContext;
  }
View Full Code Here

      }
    } catch(Exception e) {
      String message = SandeshaMessageHelper.getMessage(
          SandeshaMessageKeys.failedToStoreMessage, e.toString());
      if(log.isDebugEnabled()) log.debug(message);
      throw new SandeshaStorageException(message, e);
    }
   
    if(log.isDebugEnabled()) log.debug("Exit: InMemoryStorageManager::storeMessageContext, key: " + key);
  }
View Full Code Here

  public void updateMessageContext(String key,MessageContext msgContext) throws SandeshaStorageException {
    if(log.isDebugEnabled()) log.debug("Enter: InMemoryStorageManager::updateMessageContext, key: " + key);

    Object oldEntry = storageMap.remove(key);
    if (oldEntry==null)
      throw new SandeshaStorageException (SandeshaMessageHelper.getMessage(
          SandeshaMessageKeys.entryNotPresentForUpdating));
   
    storeMessageContext(key,msgContext);

    if(log.isDebugEnabled()) log.debug("Exit: InMemoryStorageManager::updateMessageContext, key: " + key);
View Full Code Here

    return (SenderBean) table.get(MessageId);
  }

  public synchronized boolean insert(SenderBean bean) throws SandeshaStorageException {
    if (bean.getMessageID() == null)
      throw new SandeshaStorageException(SandeshaMessageHelper.getMessage(
          SandeshaMessageKeys.nullMsgId));
    table.put(bean.getMessageID(), bean);
    return true;
  }
View Full Code Here

      XMLStreamReader streamReader = envelope.cloneOMElement().getXMLStreamReader();
      SOAPEnvelope clonedEnvelope = new StAXSOAPModelBuilder(streamReader, null).getSOAPEnvelope();
      try {
        messageContext.setEnvelope(clonedEnvelope);
      } catch (AxisFault e) {
        throw new SandeshaStorageException (e);
      }
    }
   
    return messageContext;
  }
View Full Code Here

TOP

Related Classes of org.apache.sandesha2.storage.SandeshaStorageException

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.