container/common/src/main/java/org/mobicents/slee/container/security/Utility.java
public static Object makeSafeProxyCall(final Object proxy,final String methodToCallname,final  Class[] signature,final  Object[] values) throws PrivilegedActionException
	{
		//Here we execute in sbb/profile or any other slee component domain
		// so no security calls can be made
		try {
			
			//AccessControlContext acc = new AccessControlContext(new ProtectionDomain[]{proxy.getClass().getProtectionDomain()});
			
			return AccessController.doPrivileged(new PrivilegedExceptionAction(){

				public Object run() throws Exception {
					final Method m = proxy.getClass().getMethod(methodToCallname, signature);
					//Here we cross to org.mobicents domain, with all perms, once m.invoke is called, we go into proxy object domain, effective rightsd are cross section of All + proxy object domain permissions
					//This is used when isolate security permissions is set to true;
					
					return m.invoke(proxy, values);
				//}},acc);
				}});
		} catch (SecurityException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}catch(PrivilegedActionException e)
		{
			e.printStackTrace();
		}
		return null;
		
	}
public static Object makeSafeProxyCall(final Object proxy,final String methodToCallname,final  Class[] signature,final  Object[] values) throws PrivilegedActionException
	{
		//Here we execute in sbb/profile or any other slee component domain
		// so no security calls can be made
		try {
			
			//AccessControlContext acc = new AccessControlContext(new ProtectionDomain[]{proxy.getClass().getProtectionDomain()});
			
			return AccessController.doPrivileged(new PrivilegedExceptionAction(){

				public Object run() throws Exception {
					final Method m = proxy.getClass().getMethod(methodToCallname, signature);
					//Here we cross to org.mobicents domain, with all perms, once m.invoke is called, we go into proxy object domain, effective rightsd are cross section of All + proxy object domain permissions
					//This is used when isolate security permissions is set to true;
					
					return m.invoke(proxy, values);
				//}},acc);
				}});
		} catch (SecurityException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}catch(PrivilegedActionException e)
		{
			e.printStackTrace();
		}
		return null;
		
	}
Its used to embed calls in AccessController in case of insturmented code, cause javassist does not support anonmous inner class.
@param proxy
@param methodToCallname
@param signature
@param values
@return