container/services/src/main/java/org/mobicents/slee/runtime/sbbentity/SbbEntityImpl.java
public void passivateAndReleaseSbbObject() {
		this.sbbObject.sbbStore();
		this.sbbObject.sbbPassivate();
		this.sbbObject.setState(SbbObjectState.POOLED);
		this.sbbObject.setSbbEntity(null);
		try {
			getObjectPool().returnObject(this.sbbObject);
		} catch (Exception e) {
			log.error("failed to return sbb object "+sbbObject+" to pool",e);
		}
		this.sbbObject = null;
		if (childsWithSbbObjects != null) {
			for (Iterator<SbbEntity> i = childsWithSbbObjects.iterator(); i
			.hasNext();) {
				SbbEntity childSbbEntity = i.next();
				if (childSbbEntity.getSbbObject() != null) {
					Thread t = Thread.currentThread();
			    	ClassLoader cl = t.getContextClassLoader();
			        t.setContextClassLoader(childSbbEntity.getSbbComponent().getClassLoader());
					try {
						childSbbEntity.passivateAndReleaseSbbObject();
					}
					finally {
						t.setContextClassLoader(cl);
					}
				}
				i.remove();
			}
		}
	}
public void passivateAndReleaseSbbObject() {
		this.sbbObject.sbbStore();
		this.sbbObject.sbbPassivate();
		this.sbbObject.setState(SbbObjectState.POOLED);
		this.sbbObject.setSbbEntity(null);
		try {
			getObjectPool().returnObject(this.sbbObject);
		} catch (Exception e) {
			log.error("failed to return sbb object "+sbbObject+" to pool",e);
		}
		this.sbbObject = null;
		if (childsWithSbbObjects != null) {
			for (Iterator<SbbEntity> i = childsWithSbbObjects.iterator(); i
			.hasNext();) {
				SbbEntity childSbbEntity = i.next();
				if (childSbbEntity.getSbbObject() != null) {
					Thread t = Thread.currentThread();
			    	ClassLoader cl = t.getContextClassLoader();
			        t.setContextClassLoader(childSbbEntity.getSbbComponent().getClassLoader());
					try {
						childSbbEntity.passivateAndReleaseSbbObject();
					}
					finally {
						t.setContextClassLoader(cl);
					}
				}
				i.remove();
			}
		}
	}
/*
(non-Javadoc)
@see org.mobicents.slee.runtime.sbbentity.SbbEntity#passivateAndReleaseSbbObject()