{
// Encountered, return
return bindings.value()[0].jndiBinding();
}
// Check for declared @RemoteBinding
RemoteBinding binding = ((EJBContainer) container).getAnnotation(RemoteBinding.class);
if (binding != null)
{
// Encountered, return
return binding.jndiBinding();
}
}
}
// Determine if remote home
Class<?> remoteHome = getRemoteHomeInterface(container);
if (remoteHome != null)
{
if (businessInterface.getName().equals(remoteHome.getName()))
{
// Check for declared @RemoteHomeBinding
RemoteHomeBinding binding = ((EJBContainer) container).getAnnotation(RemoteHomeBinding.class);
if (binding != null)
{
// Encountered, return
return binding.jndiBinding();
}
// Set home for policy
isHome = true;
}
}
// Determine if local and home
Class<?> localHome = getLocalHomeInterface(container);
if (localHome != null)
{
if (businessInterface.getName().equals(localHome.getName()))
{
// Check for declared @LocalHomeBinding
LocalHomeBinding binding = ((EJBContainer) container).getAnnotation(LocalHomeBinding.class);
if (binding != null)
{
// Encountered, return
return binding.jndiBinding();
}
// Set local and home for policy
isHome = true;
isLocal = true;
}
}
// Determine if local
Class<?>[] locals = getLocalAndBusinessLocalInterfaces(container);
for (Class<?> clazz : locals)
{
if (clazz.getName().equals(businessInterface.getName()))
{
// Check for declared @LocalBinding
LocalBinding binding = ((EJBContainer) container).getAnnotation(LocalBinding.class);
if (binding != null)
{
// Encountered, return
return binding.jndiBinding();
}
// Set local for policy
isLocal = true;
}