Class<?> remote = null;
Class<?> home = null;
Class<?> pkClass = Object.class;
HomeHandleImpl homeHandle = null;
EJBContainer ejbContainer = (EJBContainer)container;
Class<?>[] remotes = ProxyFactoryHelper.getRemoteInterfaces(this.getContainer());
if (remotes != null && remotes.length > 0)
{
remote = remotes[0];
}
RemoteHome homeAnnotation = ejbContainer.getAnnotation(RemoteHome.class);
if (homeAnnotation != null)
home = homeAnnotation.value();
RemoteBinding remoteBindingAnnotation = ejbContainer.getAnnotation(RemoteBinding.class);
if (remoteBindingAnnotation != null)
homeHandle = new HomeHandleImpl(remoteBindingAnnotation.jndiBinding());
EJBMetaDataImpl metadata = new EJBMetaDataImpl(remote, home, pkClass, true, false, homeHandle);