public class BeanFactory
extends java.lang.Object
implements javax.naming.spi.ObjectFactory
This factory can be configured in a <Context>
element
in your conf/server.xml
configuration file. An example of factory configuration is:
<Resource name="jdbc/myDataSource" auth="SERVLET" type="oracle.jdbc.pool.OracleConnectionCacheImpl"/> <ResourceParams name="jdbc/myDataSource"> <parameter> <name>factory</name> <value>org.apache.naming.factory.BeanFactory</value> </parameter> <parameter> <name>driverType</name> <value>thin</value> </parameter> <parameter> <name>serverName</name> <value>hue</value> </parameter> <parameter> <name>networkProtocol</name> <value>tcp</value> </parameter> <parameter> <name>databaseName</name> <value>XXXX</value> </parameter> <parameter> <name>portNumber</name> <value>NNNN</value> </parameter> <parameter> <name>user</name> <value>XXXX</value> </parameter> <parameter> <name>password</name> <value>XXXX</value> </parameter> <parameter> <name>maxLimit</name> <value>5</value> </parameter> </ResourceParams>
Constructor and Description |
---|
BeanFactory() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getObjectInstance(java.lang.Object obj,
javax.naming.Name name,
javax.naming.Context nameCtx,
java.util.Hashtable<?,?> environment)
Create a new Bean instance.
|
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
obj
- The reference object describing the Beanjavax.naming.NamingException
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.