private Object createResource ( String refName , String className , String bindingName , ResourceInfo resourceRefInfo ) throws Exception { String nameFilter = FilterUtils . createPropertyFilter ( ResourceFactory . JNDI_NAME , bindingName ) ; String createsFilter = className == null ? null : FilterUtils . createPropertyFilter ( ResourceFactory . CREATES_OBJECT_CLASS , className ) ; String filter = createsFilter == null ? nameFilter : "(&" + nameFilter + createsFilter + ")" ; ResourceInfo resInfo = resourceRefInfo != null ? resourceRefInfo : className != null ? new ResourceEnvRefInfo ( refName , className ) : null ; return createResourceWithFilter ( filter , resInfo ) ; }
Try to obtain an object instance by creating a resource using a ResourceFactory .