Package org.apache.sandesha2.storage

Examples of org.apache.sandesha2.storage.SandeshaStorageException


    try {
      Class.forName(dbDriver);
      return DriverManager.getConnection(dbConnectionString, dbUser, dbPassword);
    } catch (Exception ex) {
      log.error("Unable to create DB connection ", ex);
      throw new SandeshaStorageException(ex);
    }
  }
View Full Code Here


      stmt.close();
      log.debug("RetrieveMessageContext get from DB");
      return msgCtx;
    } catch (Exception ex) {
      log.error("RetrieveMessageContext exception " + ex);
      throw new SandeshaStorageException(ex);
    }
  }
View Full Code Here

      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

      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

      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

        } 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

  }


  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

  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

    public boolean isActive() {
      return false;
    }

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

  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

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.