String baseJndiName = getMappedName();
if (baseJndiName == null)
baseJndiName = determineJndiName();
// Obtain the Deployment Summary
DeploymentSummary dsummary = getJBossMetaData().getDeploymentSummary();
// Initialize the Default JNDI Binding Policy
DefaultJndiBindingPolicy policy = null;
try
{
// Initialize a CL
ClassLoader loader = null;
// Fall back on TCL if there's no DeploymentSummary
if (loader == null)
{
loader = Thread.currentThread().getContextClassLoader();
}
// Create Policy, falling back on the default policy if specified
policy = this.createPolicy(loader, defaultPolicy == null ? null : defaultPolicy.getClass());
}
catch (Exception e)
{
throw new RuntimeException("Error in creating " + DefaultJndiBindingPolicy.class.getSimpleName(),e);
}
// If there's still no policy
if (policy == null)
{
// Use the metadata default binding policy
policy = new BasicJndiBindingPolicy();
}
if(dsummary==null)
{
dsummary = new DeploymentSummary();
}
// Derive the summary info from this metadata and deployment summary
EjbDeploymentSummary ejbSummary = new EjbDeploymentSummary(this, dsummary);
KnownInterfaceType ifaceType = KnownInterfaces.classifyInterface(iface);