Class DriverManagerAdapterProcessor
- java.lang.Object
-
- org.jboss.as.connector.deployers.ds.processors.DriverManagerAdapterProcessor
-
- All Implemented Interfaces:
org.jboss.as.server.deployment.DeploymentUnitProcessor
public class DriverManagerAdapterProcessor extends Object implements org.jboss.as.server.deployment.DeploymentUnitProcessor
- Author:
- Tomasz Adamski
https://issues.redhat.com/browse/WFLY-14114
This is a hack that allows us to get access to
Driverregistered by the driver code. Those objects are created by the driver code and registered inDriverManager. Driver objects are not guaranteed to be deregistered which leads to leaks.DriverManagerallows for obtaining the list of drivers, and deregistering a driver but only in a give classloading context. As a result, connector module can not neither list or deregister drivers from a deployed driver module.To work this around, this hack modifies driver's module by injecting
DriverManagerAdapterclass to it. Because @DriverManagerAdapteris loaded by driver module it allows to obtain and deregister the drivers.
-
-
Constructor Summary
Constructors Constructor Description DriverManagerAdapterProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeploy(org.jboss.as.server.deployment.DeploymentPhaseContext phaseContext)
-
-
-
Method Detail
-
deploy
public void deploy(org.jboss.as.server.deployment.DeploymentPhaseContext phaseContext) throws org.jboss.as.server.deployment.DeploymentUnitProcessingException- Specified by:
deployin interfaceorg.jboss.as.server.deployment.DeploymentUnitProcessor- Throws:
org.jboss.as.server.deployment.DeploymentUnitProcessingException
-
-