public class DriverManagerAdapterProcessor extends Object implements org.jboss.as.server.deployment.DeploymentUnitProcessor
https://issues.redhat.com/browse/WFLY-14114
This is a hack that allows us to get access to Driver registered by the driver code. Those objects are created by the
driver code and registered in DriverManager. Driver objects are not guaranteed to be deregistered which leads to leaks.
DriverManager allows 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 DriverManagerAdapter class to it. Because @DriverManagerAdapter
is loaded by driver module it allows to obtain and deregister the drivers.
| Constructor and Description |
|---|
DriverManagerAdapterProcessor() |
| Modifier and Type | Method and Description |
|---|---|
void |
deploy(org.jboss.as.server.deployment.DeploymentPhaseContext phaseContext) |
public void deploy(org.jboss.as.server.deployment.DeploymentPhaseContext phaseContext)
throws org.jboss.as.server.deployment.DeploymentUnitProcessingException
deploy in interface org.jboss.as.server.deployment.DeploymentUnitProcessororg.jboss.as.server.deployment.DeploymentUnitProcessingExceptionCopyright © 2021 JBoss by Red Hat. All rights reserved.