This factory reconstructs a Derby data source object when it is retrieved
from JNDI. References are needed since many naming services don't have the
ability to store Java objects in their serialized form. When a data source
object is bound in this type of naming service the
javax. for that object is actually stored by the
JNDI implementation, not the data source object itself.
A JNDI administrator is responsible for making sure that both the object factory and data source implementation classes provided by a JDBC driver vendor are accessible to the JNDI service provider at runtime.
An object factory implements the javax.
interface. This interface contains a single method, getObjectInstance
which is called by a JNDI service provider to reconstruct an object when that
object is retrieved from JNDI. A JDBC driver vendor should provide an object
factory as part of their JDBC product.
org.apache.derby.jdbc.EmbeddedDataSource , org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource , org.apache.derby.jdbc.EmbeddedXADataSource
| Modifier and Type | Field and Description |
|---|---|
| private static final Class | |
| private static final Class | |
| private static final long | |
| private static final Class | |
| private static final Class |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | Returns: Object created, ornull if no attempt to create the
object is made.the possibly refObj, Name null object containing location or
reference information that can be used in creating an objectthe name of this object relative to name, Context nameContext, or
null if no name is specifiedcontext relative to which the name parameter is
specified, or nameContext, Hashtable<?, ?> null if name is relative to the default
initial context.possibly environment)null environment that is used in
creating the object.Implements javax. |
| private static void |
| BOOLEAN_ARG | back to summary |
|---|---|
| private static final Class<?>[] BOOLEAN_ARG | |
| INT_ARG | back to summary |
|---|---|
| private static final Class<?>[] INT_ARG | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides org. | |
| SHORT_ARG | back to summary |
|---|---|
| private static final Class<?>[] SHORT_ARG | |
| STRING_ARG | back to summary |
|---|---|
| private static final Class<?>[] STRING_ARG | |
| ReferenceableDataSource | back to summary |
|---|---|
| public ReferenceableDataSource() | |
| getObjectInstance | back to summary |
|---|---|
| public Object getObjectInstance(Object refObj, Name name, Context nameContext, Hashtable<?, ?> environment) throws Exception Implements javax. Reconstructs a Derby embedded-driver data source object from a JNDI data source reference.
The
| |
| setBeanProperties | back to summary |
|---|---|
| private static void setBeanProperties(Object ds, Reference ref) throws Exception | |