// ------------------------------------------------------------------------
protected void processDriver(DeploymentPhaseContext phaseContext, Adapter adapter, String applicationDir) throws DeploymentUnitProcessingException {
DeploymentUnit unit = phaseContext.getDeploymentUnit();
DriverService driverService = new DriverService( applicationDir, adapter );
ServiceName name = DataSourceServices.driverName( unit, adapter.getId() );
phaseContext.getServiceTarget().addService( name, driverService )
.addDependency( ConnectorServices.JDBC_DRIVER_REGISTRY_SERVICE, DriverRegistry.class, driverService.getDriverRegistryInjector() )
.addDependency( DataSourceServices.jdbcDriverLoadingRuntimeName( unit ), Ruby.class, driverService.getRuntimeInjector() )
.setInitialMode( ServiceController.Mode.ACTIVE ).install();
}