[jboss-jira] [JBoss JIRA] (WFLY-7354) Custom NameService by sun.net.spi.nameservice.provider.n doesn't work on WildFly
Osamu Nagano (JIRA)
issues at jboss.org
Wed Nov 16 00:32:00 EST 2016
[ https://issues.jboss.org/browse/WFLY-7354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13323338#comment-13323338 ]
Osamu Nagano commented on WFLY-7354:
------------------------------------
I found the TCCL is ModuleClassLoader of "org.jboss.as.server:main". The name service class is loaded at boot time in an MSC thread. So jboss-deployment-structure.xml is not required but these 2 modules need to be modified.
{code:title=$JBOSS_HOME/modules/**/org/jboss/as/server/main/module.xml}
<module name="sun.jdk" services="export" export="true"/>
{code}
{code:title=$JBOSS_HOME/modules/**/sun/jdk/main/module.xml}
<resource-root path="your_impl.jar"/>
...
<path name="sun/net/spi/nameservice"/>
<path name="sun/net/spi/nameservice/dns"/>
{code}
> Custom NameService by sun.net.spi.nameservice.provider.n doesn't work on WildFly
> --------------------------------------------------------------------------------
>
> Key: WFLY-7354
> URL: https://issues.jboss.org/browse/WFLY-7354
> Project: WildFly
> Issue Type: Bug
> Components: Class Loading
> Affects Versions: 10.1.0.Final
> Reporter: Osamu Nagano
> Attachments: nameserviceProviderTest.zip
>
>
> System property {{sun.net.spi.nameservice.provider.<n>}} allows a user to customize a NameService. It works on a standalone java, which is using JBoss Modules, if {{services="import"}} is added on sun.jdk module dependency and the sun.jdk module has the following additional dependencies.
> {code}
> <path name="sun/net/spi/nameservice"/>
> <path name="sun/net/spi/nameservice/dns"/>
> {code}
> Though it doesn't work as a web application which has the same module path and the same dependency in jboss-deployment-structure.xml.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the jboss-jira
mailing list