Apache Tomcat 6.0.53

org.apache.naming.factory
Class DataSourceLinkFactory.DataSourceHandler

java.lang.Object
  extended by org.apache.naming.factory.DataSourceLinkFactory.DataSourceHandler
All Implemented Interfaces:
java.lang.reflect.InvocationHandler
Enclosing class:
DataSourceLinkFactory

public static class DataSourceLinkFactory.DataSourceHandler
extends java.lang.Object
implements java.lang.reflect.InvocationHandler

Simple wrapper class that will allow a user to configure a ResourceLink for a data source so that when DataSource.getConnection() is called, it will invoke DataSource.getConnection(String, String) with the preconfigured username and password.


Constructor Summary
DataSourceLinkFactory.DataSourceHandler(javax.sql.DataSource ds, java.lang.String username, java.lang.String password)
           
 
Method Summary
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
           
 java.lang.Object unwrap(java.lang.Class<?> iface)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSourceLinkFactory.DataSourceHandler

public DataSourceLinkFactory.DataSourceHandler(javax.sql.DataSource ds,
                                               java.lang.String username,
                                               java.lang.String password)
                                        throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Throws:
java.lang.Throwable

unwrap

public java.lang.Object unwrap(java.lang.Class<?> iface)
                        throws java.sql.SQLException
Throws:
java.sql.SQLException

Apache Tomcat 6.0.53

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