org.ckkloverdos.db.proxy
Class DriverInvocationHandler
java.lang.Object
org.ckkloverdos.db.proxy.DriverInvocationHandler
- All Implemented Interfaces:
- java.lang.reflect.InvocationHandler
public final class DriverInvocationHandler
- extends java.lang.Object
- implements java.lang.reflect.InvocationHandler
An InvocationHandler
wrapping a JDBC driver
instance. We use this when registering
a driver that has been dynamically loaded into the VM, i.e. that is was not
defined in the CLASSPATH
, in order to make sure that the wrapping instance
is created from the application's class loader. This constraint is imposed by the
DriverManager
in order for the driver to be usable.
- Author:
- Christos KK Loverdos
- See Also:
DriverManager
Method Summary |
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DriverInvocationHandler
public DriverInvocationHandler(java.sql.Driver driver)
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
Copyright © 1999-2007 Christos KK Loverdos. All Rights Reserved.