Daniel Straub [
https://community.jboss.org/people/dastraub] created the discussion
"Re: URL-Protocol Handler doesn't work"
To view the discussion, visit:
https://community.jboss.org/message/715180#715180
--------------------------------------------------------------
Hi David
now I came back to this thread (because we're porting a large application to AS 7),
and I use the following solution :
In a self developed extension we do some stuff during the deployment, and here also we add
our URLStreamHandlerFactory :
@Override
public void deploy(DeploymentPhaseContext phaseContext) throws
DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
final Module module = deploymentUnit.getAttachment(Attachments.MODULE);
URL url =
module.getExportedResource("META-INF/services/java.net.URLStreamHandlerFactory");
if (url != null) {
log.info("registerURLStreamHandlerFactoryModule " + module.getIdentifier());
Module.registerURLStreamHandlerFactoryModule(module);
}
}
Ok, thar solves the half part.
Unfortunatly, there is no method for unregister this module during undeploy.
Is it possible to add this method to the Module ?
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/715180#715180]
Start a new discussion in JBoss AS 7 Development at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]