Package org.apache.naming.factory
Class DataSourceLinkFactory.DataSourceHandler
- java.lang.Object
-
- 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 whenDataSource.getConnection()
is called, it will invokeDataSource.getConnection(String, String)
with the preconfigured username and password.
-
-
Constructor Summary
Constructors Constructor Description DataSourceHandler(javax.sql.DataSource ds, java.lang.String username, java.lang.String password)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
-
-
-
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 interfacejava.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
-
-