public interface ResourceFactory
JNDI_NAME
and CREATES_OBJECT_CLASS
properties.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CREATES_OBJECT_CLASS
The service registry property that specifies the String class (or
String[] classes) that the factory supports creating.
|
static java.lang.String |
JNDI_NAME
The service registry property that specifies the JNDI lookup name of the
factory.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
createResource(ResourceInfo info)
Creates a resource handle of the specified type that respects the
specified resource information.
|
static final java.lang.String JNDI_NAME
static final java.lang.String CREATES_OBJECT_CLASS
java.lang.Object createResource(ResourceInfo info) throws java.lang.Exception
ResourceInfo.getType()
must
match the CREATES_OBJECT_CLASS
property. If the caller does not
provide resource information, the implementation can use ResourceConfigFactory.createResourceConfig(java.lang.String)
to create a default.info
- the resource information, or null if unavailablejava.lang.Exception
- a resource-specific exceptionResourceConfigFactory.createResourceConfig(java.lang.String)