container/resource/src/main/java/org/mobicents/slee/resource/ResourceAdaptorEntityImpl.java
private boolean hasActivities() {
		try {	
			for (ActivityContextHandle handle : sleeContainer
					.getActivityContextFactory()
					.getAllActivityContextsHandles()) {
				if (handle.getActivityType() == ActivityType.RA) {
					ResourceAdaptorActivityContextHandle raHandle = (ResourceAdaptorActivityContextHandle) handle;
					if (raHandle.getResourceAdaptorEntity().equals(this)) {

						logger.debug("**** AllActivityContextsHandles: "+sleeContainer
								.getActivityContextFactory()
								.getAllActivityContextsHandles());

						if (logger.isDebugEnabled()) {
							logger.debug("RA entity "+name+" has (at least) activity "+handle.getActivityHandle());
						}

						//return true;

						logger.warn("WORKAROUND USAGE: ENDING RESOURCE ADAPTOR ACTIVITIES");
						sleeContainer.getActivityContextFactory().WAremove("RA");
						return false;
					}
				}
			}			
		} catch (Throwable e) {
			logger.error(e.getMessage(), e);
		} 
		
		return false;
	}
private boolean hasActivities() {
		try {	
			for (ActivityContextHandle handle : sleeContainer
					.getActivityContextFactory()
					.getAllActivityContextsHandles()) {
				if (handle.getActivityType() == ActivityType.RA) {
					ResourceAdaptorActivityContextHandle raHandle = (ResourceAdaptorActivityContextHandle) handle;
					if (raHandle.getResourceAdaptorEntity().equals(this)) {

						logger.debug("**** AllActivityContextsHandles: "+sleeContainer
								.getActivityContextFactory()
								.getAllActivityContextsHandles());

						if (logger.isDebugEnabled()) {
							logger.debug("RA entity "+name+" has (at least) activity "+handle.getActivityHandle());
						}

						//return true;

						logger.warn("WORKAROUND USAGE: ENDING RESOURCE ADAPTOR ACTIVITIES");
						sleeContainer.getActivityContextFactory().WAremove("RA");
						return false;
					}
				}
			}			
		} catch (Throwable e) {
			logger.error(e.getMessage(), e);
		} 
		
		return false;
	}
Checks if the entity has activities besides the one passed as parameter (if not null).
@param exceptHandle
@return