Examples of SandeshaStorageException


Examples of org.apache.sandesha2.storage.SandeshaStorageException

      ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
      pstmt.setBinaryStream(2, bais, bais.available());
      pstmt.execute();
      pstmt.close();
    } catch (Exception ex) {
      throw new SandeshaStorageException(ex);
    }
  }
View Full Code Here

Examples of org.apache.sandesha2.storage.SandeshaStorageException

      ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
      pstmt.setBinaryStream(1, bais, bais.available());
      pstmt.executeQuery();
      pstmt.close();
    } catch (Exception ex) {
      throw new SandeshaStorageException("Exception in updateMessageContext", ex);
    }
  }
View Full Code Here

Examples of org.apache.sandesha2.storage.SandeshaStorageException

      MessageContext messageInCache = (MessageContext) storageMap.get(key);
      if (messageInCache != null) storageMap.remove(key);
      stmt.executeUpdate("delete from wsrm_msgctx where ctx_key='" + key + "'");
      stmt.close();
    } catch (Exception ex) {
      throw new SandeshaStorageException("Exception in removeMessageContext", ex);
    }
  }
View Full Code Here

Examples of org.apache.sandesha2.storage.SandeshaStorageException

        } else {
          String message = SandeshaMessageHelper.getMessage(
              SandeshaMessageKeys.nonUniqueResult,
              result.toString(),
              candidate.toString());
          SandeshaStorageException e = new SandeshaStorageException(message);
          log.error(message, e);
          throw e;
        }
      }
    }
View Full Code Here

Examples of org.apache.sandesha2.storage.SandeshaStorageException

  }


  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);
    if(bean.getSequenceID()!=null && bean.getMessageNumber()>0){
      sequenceIdandMessNum2MessageId.put(bean.getSequenceID()+":"+bean.getMessageNumber(), bean.getMessageID());
    }   
View Full Code Here

Examples of org.apache.sandesha2.storage.SandeshaStorageException

  private class DummyTransaction extends ReentrantLock implements Transaction {

    private static final long serialVersionUID = -8095723965216941864L;

    public void commit() throws SandeshaStorageException {
      throw new SandeshaStorageException("Not supported");
    }
View Full Code Here

Examples of org.apache.sandesha2.storage.SandeshaStorageException

    public boolean isActive() {
      return false;
    }

    public void rollback() throws SandeshaStorageException {
      throw new SandeshaStorageException("Not supported");
    }
View Full Code Here

Examples of org.apache.sandesha2.storage.SandeshaStorageException

  void enlistBean(RMBean bean) throws SandeshaStorageException {
    InMemoryTransaction t = (InMemoryTransaction) transactions.get(Thread.currentThread());
    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(LoggingControl.isAnyTracingEnabled() && 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(LoggingControl.isAnyTracingEnabled() && log.isDebugEnabled()) log.debug(message);
      throw new SandeshaStorageException(message, e);
    }

    if(LoggingControl.isAnyTracingEnabled() && 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(LoggingControl.isAnyTracingEnabled() && log.isDebugEnabled()) log.debug(message);
      throw new SandeshaStorageException(message, e);
    }
   
    if(LoggingControl.isAnyTracingEnabled() && log.isDebugEnabled()) log.debug("Exit: InMemoryStorageManager::storeMessageContext, key: " + key);
  }
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.