// Obtain @Local
Local localAnnotation = ((EJBContainer) container).getAnnotation(Local.class);
// Obtain @LocalHome
LocalHome localHomeAnnotation = ((EJBContainer) container).getAnnotation(LocalHome.class);
// Obtain @Remote
Remote remoteAnnotation = ((EJBContainer) container).getAnnotation(Remote.class);
// Obtain Remote and Business Remote interfaces
Class<?>[] remoteAndBusinessRemoteInterfaces = ProxyFactoryHelper.getRemoteAndBusinessRemoteInterfaces(container);
// Obtain all business interfaces from the bean class
Set<Class<?>> businessInterfacesImplementedByBeanClass = ProxyFactoryHelper.getBusinessInterfaces(beanClass);
// Obtain all business interfaces directly implemented by the bean class (not including supers)
Set<Class<?>> businessInterfacesDirectlyImplementedByBeanClass = ProxyFactoryHelper.getBusinessInterfaces(
beanClass, false);
// Determine whether Stateful or Stateless
boolean isStateless = (container instanceof StatelessContainer) ? true : false;
// EJBTHREE-1127
// Determine local interface from return value of "create" in Local Home
if (localHomeAnnotation != null)
{
localAndBusinessLocalInterfaces.addAll(ProxyFactoryHelper.getReturnTypesFromCreateMethods(localHomeAnnotation
.value(), isStateless));
}
// For each of the business interfaces implemented by the bean class
for (Class<?> clazz : businessInterfacesImplementedByBeanClass)