// Name of the EJB2.x Interface Class expected
String ejb2xInterface = method.getReturnType().getName();
// Get Metadata
JBossSessionBeanMetaData smd = this.getMetaData();
/*
* Determine if the expected type is found in metadata as a EJB2.x Interface
*/
// Is this a Remote Interface ?
boolean isLocal = false;
String ejb2xRemoteInterface = smd.getRemote();
if (ejb2xInterface.equals(ejb2xRemoteInterface))
{
// We've found it, it's false
foundInterface = true;
jndiName = smd.getJndiName();
}
// Is this a local interface?
if (!foundInterface)
{
String ejb2xLocalInterface = smd.getLocal();
if (ejb2xInterface.equals(ejb2xLocalInterface))
{
// Mark as found
foundInterface = true;
isLocal = true;
jndiName = smd.getLocalJndiName();
}
}
// If we haven't yet found the interface
if (!foundInterface)