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 -
Method Summary
Modifier and TypeMethodDescriptionvoiddeploy(org.jboss.as.server.deployment.DeploymentPhaseContext phaseContext) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jboss.as.server.deployment.DeploymentUnitProcessor
undeploy
-
Constructor Details
-
DriverManagerAdapterProcessor
public DriverManagerAdapterProcessor()
-
-
Method Details
-
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
-