Examples of RMBean


Examples of org.apache.sandesha2.storage.beans.RMBean

    return beans;
  }

  protected RMBean findUnique (RMBean matchInfo) throws SandeshaException {
    RMBean result = null;
    synchronized (table) {
      Iterator i = table.values().iterator();
      while(i.hasNext()) {
        RMBean candidate = (RMBean)i.next();
        if(candidate.match(matchInfo)) {
          if(result == null) {
            result = candidate;
          } else {
            String message = SandeshaMessageHelper.getMessage(
                SandeshaMessageKeys.nonUniqueResult,
                result.toString(),
                candidate.toString());
            log.error(message);
            throw new SandeshaException (message);
          }
        }
      }
View Full Code Here

Examples of org.apache.sandesha2.storage.beans.RMBean

   * @throws SandeshaStorageException
   */
  protected void checkKeys (List findBeanList) throws SandeshaStorageException {
   
    for (Iterator iter = findBeanList.iterator(); iter.hasNext();) {
      RMBean rmBean = (RMBean) iter.next();
     
      List conflicts = find(rmBean);
      if (conflicts.size()>0) {
        //we only report the first conflict here.
        throw new SandeshaStorageException ("Key conflict occured with the bean " + conflicts.get(0));
View Full Code Here

Examples of org.apache.sandesha2.storage.beans.RMBean

    if(log.isDebugEnabled()) log.debug("Entry: InMemoryTransaction::releaseLocks, " + this);
    manager.removeTransaction(this);

    Iterator beans = enlistedBeans.iterator();
    while(beans.hasNext()) {
      RMBean bean = (RMBean) beans.next();
      synchronized (bean) {
        bean.setTransaction(null);
        bean.notifyAll();
      }
    }
    enlistedBeans.clear();
   
    if(log.isDebugEnabled()) log.debug("Exit: InMemoryTransaction::releaseLocks");
View Full Code Here

Examples of org.apache.sandesha2.storage.beans.RMBean

  }

  protected boolean update(String key, T bean) throws SandeshaStorageException {
    if(LoggingControl.isAnyTracingEnabled() && log.isDebugEnabled()) log.debug("Entry: InMemoryBeanMgr " + this.getClass() + " update " + key + ", " + bean);
    mgr.enlistBean(bean);
    RMBean oldBean = (RMBean) table.put(key, bean);
    if(oldBean == null) return false;
    mgr.enlistBean(oldBean);
    if(LoggingControl.isAnyTracingEnabled() && log.isDebugEnabled()) log.debug("Exit: InMemoryBeanMgr " + this.getClass() + " update " + true);
    return true;
  }
View Full Code Here

Examples of org.apache.sandesha2.storage.beans.RMBean

    if(LoggingControl.isAnyTracingEnabled() && log.isDebugEnabled()) log.debug("Entry: InMemoryTransaction::releaseLocks, " + this);
    manager.removeTransaction(this);

    Iterator beans = enlistedBeans.iterator();
    while(beans.hasNext()) {
      RMBean bean = (RMBean) beans.next();
      DummyTransaction tran = (DummyTransaction) bean.getTransaction();
      tran.unlock();
    }
    enlistedBeans=new ArrayList<RMBean>();
   
    if(LoggingControl.isAnyTracingEnabled() && log.isDebugEnabled()) log.debug("Exit: InMemoryTransaction::releaseLocks");
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.