container/resource/src/main/java/org/mobicents/slee/resource/ResourceAdaptorEntityImpl.java
public void activityEnded(final ActivityHandle handle, int activityFlags) {
		logger.trace("activityEnded( handle = " + handle + " )");
		ActivityHandle ah = null;
		if (handle instanceof ActivityHandleReference) {
			// handle is a ref, derrefer and remove the ref
			ah = resourceManagement.getHandleReferenceFactory().removeActivityHandleReference((ActivityHandleReference) handle);			
		}
		else {
			// handle is not a reference
			ah = handle;
		}
		if (ah != null && ActivityFlags.hasRequestEndedCallback(activityFlags)) {
			object.activityEnded(ah);
		}
		if (object.getState() == ResourceAdaptorObjectState.STOPPING) {
			synchronized (this) {
				// the ra object is stopping, check if the timer task is still
				// needed
				if (!hasActivities()) {
					if (timerTask != null) {
						timerTask.cancel();
					}
					allActivitiesEnded();				
				}
			}			
		}
	}
public void activityEnded(final ActivityHandle handle, int activityFlags) {
		logger.trace("activityEnded( handle = " + handle + " )");
		ActivityHandle ah = null;
		if (handle instanceof ActivityHandleReference) {
			// handle is a ref, derrefer and remove the ref
			ah = resourceManagement.getHandleReferenceFactory().removeActivityHandleReference((ActivityHandleReference) handle);			
		}
		else {
			// handle is not a reference
			ah = handle;
		}
		if (ah != null && ActivityFlags.hasRequestEndedCallback(activityFlags)) {
			object.activityEnded(ah);
		}
		if (object.getState() == ResourceAdaptorObjectState.STOPPING) {
			synchronized (this) {
				// the ra object is stopping, check if the timer task is still
				// needed
				if (!hasActivities()) {
					if (timerTask != null) {
						timerTask.cancel();
					}
					allActivitiesEnded();				
				}
			}			
		}
	}
public void activityEnded ( final ActivityHandle handle , int activityFlags ) { logger . trace ( "activityEnded( handle = " + handle + " )" ) ; ActivityHandle ah = null ; if ( handle instanceof ActivityHandleReference ) { // handle is a ref, derrefer and remove the ref
 ah = resourceManagement . getHandleReferenceFactory ( ) . removeActivityHandleReference ( ( ActivityHandleReference ) handle ) ; } else { // handle is not a reference
 ah = handle ; } if ( ah != null && ActivityFlags . hasRequestEndedCallback ( activityFlags ) ) { object . activityEnded ( ah ) ; } if ( object . getState ( ) == ResourceAdaptorObjectState . STOPPING ) { synchronized ( this ) { // the ra object is stopping, check if the timer task is still
 // needed
 if ( ! hasActivities ( ) ) { if ( timerTask != null ) { timerTask . cancel ( ) ; } allActivitiesEnded ( ) ; } } } }
Callback to notify the entity and possibly the ra object, informing activity handled ended.
@param handle
@param activityFlags
Callback to notify the entity and possibly the ra object informing activity handled ended .