public Object getObjectInstance(Object object, Name name, Context context, Hashtable environment) throws Exception { Reference reference = ((Reference) object); if (reference.getClassName().equals("java.net.URL")) { String resourceId = getProperty(reference, RESOURCE_ID); return new URL(resourceId); } return super.getObjectInstance(object, name, context, environment); }
public Object getObjectInstance(Object object, Name name, Context context, Hashtable environment) throws Exception { // ignore non ejb-refs if (!(object instanceof EjbRef)) { return null; } // lookup the value Object value = super.getObjectInstance(object, name, context, environment); // if this is an external reference, copy it into the local class loader if (isPropertyTrue((Reference) object, EXTERNAL)) { value = copy(value); } // done return value; }
public Object getObjectInstance(Object object, Name name, Context context, Hashtable environment) throws Exception { // ignore non resource-refs if (!(object instanceof ResourceRef)) { return null; } Reference ref = (Reference) object; Object value; if (getProperty(ref, JNDI_NAME) != null) { // lookup the value in JNDI value = super.getObjectInstance(object, name, context, environment); } else { // value is hard hard coded in the properties value = getStaticValue(ref); } return value; }
public Object getObjectInstance(Object object, Name name, Context context, Hashtable environment) throws Exception { // ignore non resource-refs if (!(object instanceof ResourceRef)) { return null; } Reference ref = (Reference) object; Object value; if (getProperty(ref, JNDI_NAME) != null) { // lookup the value in JNDI value = super.getObjectInstance(object, name, context, environment); } else { // value is hard hard coded in the properties value = getStaticValue(ref); } return value; }
if (getProperty(ref, JNDI_NAME) != null) { value = super.getObjectInstance(object, name, context, environment); } else {