Methods Summary |
---|
public java.lang.Class | getInjectionClass()
return property.getType();
|
public void | inject(org.jboss.ejb3.BeanContext bctx)
inject(bctx, bctx.getInstance());
|
public void | inject(org.jboss.ejb3.BeanContext bctx, java.lang.Object instance)
inject(instance);
|
public void | inject(java.lang.Object instance)
Object value = lookup(jndiName);
property.set(instance, value);
|
protected java.lang.Object | lookup(java.lang.String jndiName)
Object dependency = null;
try
{
dependency = ctx.lookup(jndiName);
}
catch (NamingException e)
{
Throwable cause = e;
while(cause.getCause() != null)
cause = cause.getCause();
throw new RuntimeException("Unable to inject jndi dependency: " + jndiName + " into property " + property + ": " + cause.getMessage(), e);
}
return dependency;
|