container/services/src/main/java/org/mobicents/slee/runtime/sbb/SbbLocalObjectImpl.java
public void remove() throws TransactionRequiredLocalException,
            NoSuchObjectLocalException, SLEEException {
    	if(trace)
    		logger.trace("remove()");
    	        
       validateInvocation();
       
       if (!sbbEntity.isReentrant()
				&& sleeContainer.getTransactionManager().getTransactionContext()
						.getInvokedNonReentrantSbbEntities().contains(sbbEntity.getSbbEntityId()))
			throw new SLEEException(" re-entrancy not allowed ");             
        
		if (logger.isDebugEnabled()) {
            logger.debug("nonSleeInitiatedCascadingRemoval : " + sbbEntity.getSbbId()
                    + " entityID = " + sbbEntity.getSbbEntityId());
        }
        
        try {
        	sleeContainer.getSbbEntityFactory().removeSbbEntity(sbbEntity,false);
        } catch (Throwable e) {
            throw new SLEEException("Removal of the sbb entity failed",e);
        }
        
        try {
            if (sleeContainer.getTransactionManager().getRollbackOnly()) {
            	final TransactionContext txContext = sleeContainer.getTransactionManager().getTransactionContext();
            	EventRoutingTransactionData ertd = txContext.getEventRoutingTransactionData();
				txContext.getAfterRollbackActions()
						.add(
								new RolledBackAction(sbbEntity.getSbbEntityId(),ertd.getEventBeingDelivered().getEvent(),ertd.getAciReceivingEvent(), true));
			}
		} catch (Exception e) {
            throw new SLEEException("Failed to check and possibly set rollback context of entity "+sbbEntity.getSbbEntityId(),e);
        }

        // I Think this should set isRemoved only to true but then test 323
        // will fail.
        // :-(
        // Ralf: see above
        this.rollbackOnly = true;
        this.isRemoved = true;

    }
public void remove() throws TransactionRequiredLocalException,
            NoSuchObjectLocalException, SLEEException {
    	if(trace)
    		logger.trace("remove()");
    	        
       validateInvocation();
       
       if (!sbbEntity.isReentrant()
				&& sleeContainer.getTransactionManager().getTransactionContext()
						.getInvokedNonReentrantSbbEntities().contains(sbbEntity.getSbbEntityId()))
			throw new SLEEException(" re-entrancy not allowed ");             
        
		if (logger.isDebugEnabled()) {
            logger.debug("nonSleeInitiatedCascadingRemoval : " + sbbEntity.getSbbId()
                    + " entityID = " + sbbEntity.getSbbEntityId());
        }
        
        try {
        	sleeContainer.getSbbEntityFactory().removeSbbEntity(sbbEntity,false);
        } catch (Throwable e) {
            throw new SLEEException("Removal of the sbb entity failed",e);
        }
        
        try {
            if (sleeContainer.getTransactionManager().getRollbackOnly()) {
            	final TransactionContext txContext = sleeContainer.getTransactionManager().getTransactionContext();
            	EventRoutingTransactionData ertd = txContext.getEventRoutingTransactionData();
				txContext.getAfterRollbackActions()
						.add(
								new RolledBackAction(sbbEntity.getSbbEntityId(),ertd.getEventBeingDelivered().getEvent(),ertd.getAciReceivingEvent(), true));
			}
		} catch (Exception e) {
            throw new SLEEException("Failed to check and possibly set rollback context of entity "+sbbEntity.getSbbEntityId(),e);
        }

        // I Think this should set isRemoved only to true but then test 323
        // will fail.
        // :-(
        // Ralf: see above
        this.rollbackOnly = true;
        this.isRemoved = true;

    }
public void remove ( ) throws TransactionRequiredLocalException , NoSuchObjectLocalException , SLEEException { if ( trace ) logger . trace ( "remove()" ) ; validateInvocation ( ) ; if ( ! sbbEntity . isReentrant ( ) && sleeContainer . getTransactionManager ( ) . getTransactionContext ( ) . getInvokedNonReentrantSbbEntities ( ) . contains ( sbbEntity . getSbbEntityId ( ) ) ) throw new SLEEException ( " re-entrancy not allowed " ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "nonSleeInitiatedCascadingRemoval : " + sbbEntity . getSbbId ( ) + " entityID = " + sbbEntity . getSbbEntityId ( ) ) ; } try { sleeContainer . getSbbEntityFactory ( ) . removeSbbEntity ( sbbEntity , false ) ; } catch ( Throwable e ) { throw new SLEEException ( "Removal of the sbb entity failed" , e ) ; } try { if ( sleeContainer . getTransactionManager ( ) . getRollbackOnly ( ) ) { final TransactionContext txContext = sleeContainer . getTransactionManager ( ) . getTransactionContext ( ) ; EventRoutingTransactionData ertd = txContext . getEventRoutingTransactionData ( ) ; txContext . getAfterRollbackActions ( ) . add ( new RolledBackAction ( sbbEntity . getSbbEntityId ( ) , ertd . getEventBeingDelivered ( ) . getEvent ( ) , ertd . getAciReceivingEvent ( ) , true ) ) ; } } catch ( Exception e ) { throw new SLEEException ( "Failed to check and possibly set rollback context of entity " + sbbEntity . getSbbEntityId ( ) , e ) ; } // I Think this should set isRemoved only to true but then test 323 // will fail. // :-( // Ralf: see above this . rollbackOnly = true ; this . isRemoved = true ; }
/*
(non-Javadoc)
@see javax.slee.SbbLocalObject#remove()
/ * ( non - Javadoc )