Apache Tomcat 7.0.28

org.apache.tomcat.jdbc.naming
Class GenericNamingResourcesFactory

java.lang.Object
  extended by org.apache.tomcat.jdbc.naming.GenericNamingResourcesFactory
All Implemented Interfaces:
ObjectFactory

public class GenericNamingResourcesFactory
extends Object
implements ObjectFactory

Simple way of configuring generic resources by using reflection. Example usage:


 <Resource factory="org.apache.tomcat.jdbc.naming.GenericNamingResourcesFactory"
              name="jdbc/test"
              type="org.apache.derby.jdbc.ClientXADataSource"
              databaseName="sample"
              createDatabase="create"
              serverName="localhost"
              port="1527"/>
 


Constructor Summary
GenericNamingResourcesFactory()
           
 
Method Summary
static String capitalize(String name)
           
 Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment)
           
static boolean setProperty(Object o, String name, String value, boolean invokeSetProperty)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericNamingResourcesFactory

public GenericNamingResourcesFactory()
Method Detail

getObjectInstance

public Object getObjectInstance(Object obj,
                                Name name,
                                Context nameCtx,
                                Hashtable<?,?> environment)
                         throws Exception
Specified by:
getObjectInstance in interface ObjectFactory
Throws:
Exception

setProperty

public static boolean setProperty(Object o,
                                  String name,
                                  String value,
                                  boolean invokeSetProperty)

capitalize

public static String capitalize(String name)

Apache Tomcat 7.0.28

Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.