Class DefaultConnectionFinder

  • All Implemented Interfaces:
    Serializable, ConnectionFinder

    public class DefaultConnectionFinder
    extends Object
    implements ConnectionFinder
    Default ConnectionFinder implementation.

    This implementation attempts to retrieve the OracleConnection by recursive reflection: it searches for methods that return Connection objects, executes these methods and checks the result. If the result is of type OracleConnection the object is returned, otherwise it recurses on it.

    Author:
    Karel Maesen
    See Also:
    Serialized Form
    • Constructor Detail

      • DefaultConnectionFinder

        public DefaultConnectionFinder()
    • Method Detail

      • find

        public Connection find​(Connection con)
        Description copied from interface: ConnectionFinder
        Find an instance of Connection that can be cast to an OracleConnection instance.
        Specified by:
        find in interface ConnectionFinder
        Parameters:
        con - the object that is being searched for an OracleConnection
        Returns:
        the object sought