Lucee 6 getOpenConnections method misses

Method getOpenConnections in Class DatasourceManagerImpl does not work in Lucee 6. With Lucee 5 works fine. Was this method deprecated on a version higher than 5? Any alternative in Lucee 6?

I call this function by

con=getPageContext().getDataSourceManager().getOpenConnections(getPageContext(),“dsn”,null,null);

The error:
“No matching method for lucee.runtime.db.DatasourceManagerImpl.getOpenConnections(lucee.runtime.PageContextImpl, string, string, string) found.”
When dump:

writeDump(var=getPageContext().getDataSourceManager());

I see the class DatasourceManagerImpl with getOpenConnections method inside:

Lucee 6 switches to apache commons pool2 for managing the datasource connections

The method error is because it’s expecting an object lucee.runtime.db.datasource, not just the datasource name (string)

try the hidden GetSystemMetrics() function as used in the admin

Thanks @Zackster! GetSystemMetrics() made the trick.