Getting a Statistics from a BoneCPDataSource?

Ask around here!

Getting a Statistics from a BoneCPDataSource?

Postby Mikkel » Mon Sep 19, 2011 12:46 pm

Hi,

I have a (Spring injected) com.jolbox.bonecp.BoneCPDataSource.

I need a com.jolbox.bonecp.Statistics.

I can has? By the way, all your example links from the front page 404. Might want to look at that too.

Kind regards,
Mikkel Løkke
Mikkel
 
Posts: 1
Joined: Mon Sep 19, 2011 12:36 pm

Re: Getting a Statistics from a BoneCPDataSource?

Postby miaou » Tue Sep 27, 2011 7:56 am

Hi Mikkel,
I am looking for the same feature.
Did you successfully get statistics information from your dataSource ?

I should admit I am a bit confused about how to get those information.
Thanks by advance,
Nicolas.
miaou
 
Posts: 1
Joined: Tue Sep 27, 2011 7:23 am

Re: Getting a Statistics from a BoneCPDataSource?

Postby wwadge » Wed Sep 28, 2011 7:05 am

The way to that is datasource.getPool().getStatistics()

unfortunately getPool() isn't there yet (open a bug report pls!) but ypu can access the pool field in your datasource via reflection :-(

Wallace
wwadge
Site Admin
 
Posts: 713
Joined: Mon Oct 19, 2009 7:50 pm

Re: Getting a Statistics from a BoneCPDataSource?

Postby shahamit » Tue Dec 27, 2011 11:41 am

Is there a bug logged for this? I couldn't find any. I can log one if not already logged.
shahamit
 
Posts: 14
Joined: Tue Dec 27, 2011 11:23 am

Re: Getting a Statistics from a BoneCPDataSource?

Postby wwadge » Tue Dec 27, 2011 3:43 pm

It's not necessary - I've done the code changes already.
wwadge
Site Admin
 
Posts: 713
Joined: Mon Oct 19, 2009 7:50 pm

Re: Getting a Statistics from a BoneCPDataSource?

Postby arpitmittal » Mon Jun 11, 2012 5:15 pm

I am using latest version 0.7.1, but the feature still not available.

datasource.getPool().getStatistics()
arpitmittal
 
Posts: 4
Joined: Sun Jun 10, 2012 6:03 pm

Re: Getting a Statistics from a BoneCPDataSource?

Postby wwadge » Mon Jun 11, 2012 7:36 pm

That was fixed in the 0.8.x line.

If you want to stick to 0.7.x, you may use reflection to get access to the pool handle (it was marked as private)
wwadge
Site Admin
 
Posts: 713
Joined: Mon Oct 19, 2009 7:50 pm

Re: Getting a Statistics from a BoneCPDataSource?

Postby arpitmittal » Wed Jun 13, 2012 6:46 pm

Cool, from where can I get this new fixed version.
arpitmittal
 
Posts: 4
Joined: Sun Jun 10, 2012 6:03 pm


Return to BoneCP - Help, Q&A, Whatever!

Who is online

Users browsing this forum: Google [Bot] and 4 guests