*/
@SuppressWarnings("unchecked")
public static <T> T getProxy(final Factory<?, ?> factory, final Class<T> interfaceClass, final boolean isLocalProxy) {
// Get elements used to create a proxy
EZBContainer container = factory.getContainer();
EZBServer server = container.getConfiguration().getEZBServer();
String containerID = container.getId();
String factoryName = factory.getBeanInfo().getName();
// If factory is a stateful factory, add the stateful flag
boolean isStateful = false;
if (factory instanceof StatefulSessionFactory) {