Skip to content

DataSources don't show BoneCPDatasource (BoneCP 0.8.0.RELEASE) #405

Description

@padcom

From w...@albamoda.de on April 24, 2014 13:58:07

Hi,

The BoneCPDatasourceAccessor doesn't work with the newest BoneCP Release (0.8.0-RELEASE). There is a new Wrapper class (FinalWrapper) in BoneCPDataSource, so the cast to BoneCP is broken:

final Field poolField = BoneCPDataSource.class.getDeclaredField("pool");
poolField.setAccessible(true);
final BoneCP pool = (BoneCP) poolField.get(source);

The Exception is: java.lang.ClassCastException: com.jolbox.bonecp.BoneCPDataSource$FinalWrapper cannot be cast to com.jolbox.bonecp.BoneCP

There is a new getter in BoneCPDataSource to get the Pool directly, so

final BoneCP pool = source.getPool();

should do the work know.

I'm using probe version 2.3.3 on Tomcat 7.0.42 with jdk 1.7.0_25

Kind regards
Jan-Hendrik

Original issue: http://code.google.com/p/psi-probe/issues/detail?id=405

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions