Reference ref = (Reference) obj;
String factoryName = (String) ref.get(FACTORY).getContent();
try
{
ProxyFactory factory = (ProxyFactory) nameCtx.lookup(factoryName);
Object proxy = factory.createProxy();
MarshalledValuePair marshalledProxy = new MarshalledValuePair(proxy);
return marshalledProxy.get();
}
catch (EJBException e)
{
throw e;
}
catch (ClassCastException e)
{
throw new EJBException("Invalid invocation of local interface", e);
}