container/services/src/main/java/org/mobicents/slee/runtime/sbb/SbbObjectPoolFactory.java
public Object makeObject() {
        
        SbbObject retval;
        if (doTraceLogs) {
        	logger.trace("makeObject() for "+serviceID+" and "+sbbComponent);
        }

        final ClassLoader oldClassLoader = SleeContainerUtils
                .getCurrentThreadClassLoader();

        try {
            final ClassLoader cl = sbbComponent.getClassLoader();
            if (System.getSecurityManager()!=null)
                AccessController.doPrivileged(new PrivilegedAction<Object>() {
                    public Object run() {
                        Thread.currentThread().setContextClassLoader(cl);
                        return null;

                    }
                });
            else
                Thread.currentThread().setContextClassLoader(cl);
            
            retval = new SbbObjectImpl(serviceID,sbbComponent);
        
        } finally {
            if (System.getSecurityManager()!=null)
                AccessController.doPrivileged(new PrivilegedAction<Object>() {
                    public Object run() {
                        Thread.currentThread().setContextClassLoader(
                                oldClassLoader);
                        return null;
                    }
                });
            else
                Thread.currentThread().setContextClassLoader(oldClassLoader);
        }

        retval.setState(SbbObjectState.POOLED);
        
        return retval;
    }
public Object makeObject() {
        
        SbbObject retval;
        if (doTraceLogs) {
        	logger.trace("makeObject() for "+serviceID+" and "+sbbComponent);
        }

        final ClassLoader oldClassLoader = SleeContainerUtils
                .getCurrentThreadClassLoader();

        try {
            final ClassLoader cl = sbbComponent.getClassLoader();
            if (System.getSecurityManager()!=null)
                AccessController.doPrivileged(new PrivilegedAction<Object>() {
                    public Object run() {
                        Thread.currentThread().setContextClassLoader(cl);
                        return null;

                    }
                });
            else
                Thread.currentThread().setContextClassLoader(cl);
            
            retval = new SbbObjectImpl(serviceID,sbbComponent);
        
        } finally {
            if (System.getSecurityManager()!=null)
                AccessController.doPrivileged(new PrivilegedAction<Object>() {
                    public Object run() {
                        Thread.currentThread().setContextClassLoader(
                                oldClassLoader);
                        return null;
                    }
                });
            else
                Thread.currentThread().setContextClassLoader(oldClassLoader);
        }

        retval.setState(SbbObjectState.POOLED);
        
        return retval;
    }
public Object makeObject ( ) { SbbObject retval ; if ( doTraceLogs ) { logger . trace ( "makeObject() for " + serviceID + " and " + sbbComponent ) ; } final ClassLoader oldClassLoader = SleeContainerUtils . getCurrentThreadClassLoader ( ) ; try { final ClassLoader cl = sbbComponent . getClassLoader ( ) ; if ( System . getSecurityManager ( ) != null ) AccessController . doPrivileged ( new PrivilegedAction < Object > ( ) { public Object run ( ) { Thread . currentThread ( ) . setContextClassLoader ( cl ) ; return null ; } } ) ; else Thread . currentThread ( ) . setContextClassLoader ( cl ) ; retval = new SbbObjectImpl ( serviceID , sbbComponent ) ; } finally { if ( System . getSecurityManager ( ) != null ) AccessController . doPrivileged ( new PrivilegedAction < Object > ( ) { public Object run ( ) { Thread . currentThread ( ) . setContextClassLoader ( oldClassLoader ) ; return null ; } } ) ; else Thread . currentThread ( ) . setContextClassLoader ( oldClassLoader ) ; } retval . setState ( SbbObjectState . POOLED ) ; return retval ; }
Create a new instance of this object and set the SbbContext This places
it into the object pool.
Create a new instance of this object and set the SbbContext This places it into the object pool .