container/profiles/src/main/java/org/mobicents/slee/container/profile/ProfileLocalObjectImpl.java
public void remove() throws TransactionRequiredLocalException, TransactionRolledbackLocalException, SLEEException {

		if (logger.isDebugEnabled()) {
			logger.debug("removing profile with name " + getProfileName() + " from table with name " + getProfileTableName());
		}

		sleeContainer.getTransactionManager().mandateTransaction();

		try {
			ProfileEntity profileEntity = profileObject.getProfileEntity();
			if (profileEntity != null) {
				// confirm it is still the same tx
				checkTransaction();
				// remove
				profileEntity.remove();
			}
			else {
				// there is no profile assigned to the object
				if(getProfileTable().find(getProfileName()) == null) {
					// this exception has priority
					throw new NoSuchObjectLocalException("the profile with name "+getProfileName()+" was not found on table with name "+getProfileTableName());
				}
				else {
					throw new IllegalStateException("the profile object is no longer valid");
				}
			}								
		}
		catch (RuntimeException e) {
			try {
				profileObject.invalidateObject();
				sleeContainer.getTransactionManager().setRollbackOnly();
			} catch (SystemException e1) { 
				throw new SLEEException(e1.getMessage(),e1); 
			};
			throw new TransactionRolledbackLocalException(e.getMessage(),e);
		}
	}
public void remove() throws TransactionRequiredLocalException, TransactionRolledbackLocalException, SLEEException {

		if (logger.isDebugEnabled()) {
			logger.debug("removing profile with name " + getProfileName() + " from table with name " + getProfileTableName());
		}

		sleeContainer.getTransactionManager().mandateTransaction();

		try {
			ProfileEntity profileEntity = profileObject.getProfileEntity();
			if (profileEntity != null) {
				// confirm it is still the same tx
				checkTransaction();
				// remove
				profileEntity.remove();
			}
			else {
				// there is no profile assigned to the object
				if(getProfileTable().find(getProfileName()) == null) {
					// this exception has priority
					throw new NoSuchObjectLocalException("the profile with name "+getProfileName()+" was not found on table with name "+getProfileTableName());
				}
				else {
					throw new IllegalStateException("the profile object is no longer valid");
				}
			}								
		}
		catch (RuntimeException e) {
			try {
				profileObject.invalidateObject();
				sleeContainer.getTransactionManager().setRollbackOnly();
			} catch (SystemException e1) { 
				throw new SLEEException(e1.getMessage(),e1); 
			};
			throw new TransactionRolledbackLocalException(e.getMessage(),e);
		}
	}
public void remove ( ) throws TransactionRequiredLocalException , TransactionRolledbackLocalException , SLEEException { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "removing profile with name " + getProfileName ( ) + " from table with name " + getProfileTableName ( ) ) ; } sleeContainer . getTransactionManager ( ) . mandateTransaction ( ) ; try { ProfileEntity profileEntity = profileObject . getProfileEntity ( ) ; if ( profileEntity != null ) { // confirm it is still the same tx
 checkTransaction ( ) ; // remove
 profileEntity . remove ( ) ; } else { // there is no profile assigned to the object
 if ( getProfileTable ( ) . find ( getProfileName ( ) ) == null ) { // this exception has priority
 throw new NoSuchObjectLocalException ( "the profile with name " + getProfileName ( ) + " was not found on table with name " + getProfileTableName ( ) ) ; } else { throw new IllegalStateException ( "the profile object is no longer valid" ) ; } } } catch ( RuntimeException e ) { try { profileObject . invalidateObject ( ) ; sleeContainer . getTransactionManager ( ) . setRollbackOnly ( ) ; } catch ( SystemException e1 ) { throw new SLEEException ( e1 . getMessage ( ) , e1 ) ; } ; throw new TransactionRolledbackLocalException ( e . getMessage ( ) , e ) ; } }
/*
(non-Javadoc)

@see javax.slee.profile.ProfileLocalObject#remove()
/ * ( non - Javadoc )