|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ora.jsp.sql.DataSourceFactory
This class is an implementation of the ObjectFactory interface, used by a container to create instances of resources accessible through JNDI. It's intended to be used to create an instance of the DataSource class and configure it as defined by the parameters passed through the JNDI implementation.
Constructor Summary | |
DataSourceFactory()
|
Method Summary | |
private java.lang.Object[] |
buildArgs(java.lang.String value,
java.lang.reflect.Method setter)
Converts the specified String value to the setter methods parameter type, if possible, and returns it as an Object array suitable as the argument to the Method.invoke() method. |
private java.lang.Object |
coerceValue(java.lang.String value,
java.lang.Class type)
Converts the specified String value to the specified type, if possible, and returns the converted value. |
java.lang.Object |
getObjectInstance(java.lang.Object obj,
javax.naming.Name name,
javax.naming.Context nameCtx,
java.util.Hashtable environment)
Creates an instance of the DataSource based on the configuration info. |
private java.lang.reflect.Method |
getSetter(java.lang.String prop,
java.lang.Object ds)
Returns the setter method corresponding to the property name in the specified object, or null if no matching setter method is found. |
private void |
setProperty(java.lang.String prop,
java.lang.String value,
java.lang.Object ds)
Sets the specified property to the specified value in the specified object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DataSourceFactory()
Method Detail |
public java.lang.Object getObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable environment) throws javax.naming.NamingException
getObjectInstance
in interface javax.naming.spi.ObjectFactory
javax.naming.NamingException
private void setProperty(java.lang.String prop, java.lang.String value, java.lang.Object ds)
private java.lang.reflect.Method getSetter(java.lang.String prop, java.lang.Object ds)
private java.lang.Object[] buildArgs(java.lang.String value, java.lang.reflect.Method setter)
private java.lang.Object coerceValue(java.lang.String value, java.lang.Class type)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |