else if(methodName.equals("getEJBMetaData"))
{
Class<?> remote = null;
Class<?> home = null;
Class<?> pkClass = Object.class;
HomeHandleImpl homeHandle = null;
Class<?>[] remotes = ProxyFactoryHelper.getRemoteInterfaces(this);
if (remotes != null && remotes.length > 0)
{
remote = remotes[0];
}
RemoteHome homeAnnotation = this.getAnnotation(RemoteHome.class);
if (homeAnnotation != null)
home = homeAnnotation.value();
RemoteHomeBinding remoteHomeBinding = this.getAnnotation(RemoteHomeBinding.class);
assert remoteHomeBinding != null : "remoteHomeBinding is null";
homeHandle = new HomeHandleImpl(remoteHomeBinding.jndiBinding());
EJBMetaDataImpl metadata = new EJBMetaDataImpl(remote, home, pkClass,
true, false, homeHandle);
return metadata;
}
// TODO: should be handled locally
else if(methodName.equals("getHomeHandle"))
{
RemoteHomeBinding remoteHomeBinding = this.getAnnotation(RemoteHomeBinding.class);
assert remoteHomeBinding != null : "remoteHomeBinding is null";
return new HomeHandleImpl(remoteHomeBinding.jndiBinding());
}
else
{
// remove
return null;