Examples of SandeshaStorageException


Examples of org.apache.sandesha2.storage.SandeshaStorageException

    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

Examples of org.apache.sandesha2.storage.SandeshaStorageException

            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

Examples of org.apache.sandesha2.storage.SandeshaStorageException

      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

Examples of org.apache.sandesha2.storage.SandeshaStorageException

      }
    } 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

Examples of org.apache.sandesha2.storage.SandeshaStorageException

      }
    } 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

Examples of org.apache.sandesha2.storage.SandeshaStorageException

  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

Examples of org.apache.sandesha2.storage.SandeshaStorageException

    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

Examples of org.apache.sandesha2.storage.SandeshaStorageException

      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

Examples of org.apache.sandesha2.storage.SandeshaStorageException

  public void updateMessageContext(String key,MessageContext msgContext) throws SandeshaStorageException {
    HashMap storageMap = (HashMap) getContext().getProperty(MESSAGE_MAP_KEY);
   
    if (storageMap==null) {
      throw new SandeshaStorageException (SandeshaMessageHelper.getMessage(
          SandeshaMessageKeys.storageMapNotPresent));
    }
   
    Object oldEntry = storageMap.get(key);
    if (oldEntry==null)
      throw new SandeshaStorageException (SandeshaMessageHelper.getMessage(
          SandeshaMessageKeys.entryNotPresentForUpdating));
   
    HashMap envMap = (HashMap) getContext().getProperty(ENVELOPE_MAP_KEY);

    storageMap.remove(key);
View Full Code Here

Examples of org.apache.sandesha2.storage.SandeshaStorageException

      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
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.