Skip to content

ConnectionFactory createConnection with automatic recovery returns Connection type #34

Closed
@beeftornado

Description

@beeftornado

Creating a connection through the connection factory with automatic recovery enabled returns the correct object (AutorecoveringConnection), but since the return type of the function is Connection, the methods in AutorecoveringConnection are unavailable without casting the return value, which isn't natural. In fact, most users are probably unaware that such a class even exists since it doesn't appear in website's API guide anywhere.

I don't know exactly how many differences there are, but I was specifically looking for the addRecoveryListener method. To not complicate things too much, a simple solution could be to expose the method in the Connection interface, but only implement it in AutorecoveringConnection.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions