* @param pu
* @param adaptor
*/
private static void addManagementConsole(final DeploymentUnit deploymentUnit, final PersistenceUnitMetadata pu,
final PersistenceProviderAdaptor adaptor) {
ManagementAdaptor managementAdaptor = adaptor.getManagementAdaptor();
// workaround for AS7-4441, if a custom hibernate.cache.region_prefix is specified, don't show the persistence
// unit in management console.
if (managementAdaptor != null &&
adaptor.doesScopedPersistenceUnitNameIdentifyCacheRegionName(pu)) {
final String providerLabel = managementAdaptor.getIdentificationLabel();
final String scopedPersistenceUnitName = pu.getScopedPersistenceUnitName();
Resource providerResource = JPAService.createManagementStatisticsResource(managementAdaptor, scopedPersistenceUnitName, deploymentUnit);
// Resource providerResource = managementAdaptor.createPersistenceUnitResource(scopedPersistenceUnitName, providerLabel);
ModelNode perPuNode = providerResource.getModel();