[wildfly-dev] trying to run subsystem extension in host controller

Brian Stansberry brian.stansberry at redhat.com
Mon Apr 25 15:34:08 EDT 2016


On 4/25/16 2:29 PM, John Mazzitelli wrote:
> Thanks, Kabir! Some comments inline:
>
> ----- Original Message -----
> [chomp]
>>> But now the problems - my subsystem registers itself with a few service
>>> dependencies that do not exist at the time my service is initialized -
>>> specifically:
>>>
>>> jboss.naming.context.java
>>> (o.j.a.naming.deployment.ContextNames.JAVA_CONTEXT_SERVICE_NAME)
>>
>> This would be installed by the naming subsystem, which is not a host capable
>> subsystem. So there cannot be any jndi on a HC at the moment.
>
>
> I'm pretty sure I won't need this as my later comment mentioned. So don't worry about this for now.
>
>
> [chomp]
>>> jboss.server.environment
>>> (o.j.a.server.ServerEnvironmentService.SERVICE_NAME)
>> This would only be available in a server. However, there is no corresponding
>> service in a host controller to get the HostControllerEnvironment. Perhaps
>> we should add one https://issues.jboss.org/browse/WFCORE-1506.
>>>
>>> jboss.as.server-controller (o.j.a.server.Services.JBOSS_SERVER_CONTROLLER)
>>
>> In a HC you need to depend on the DomainModelControllerService instead, it's
>> name is in DomainModelControllerService.SERVICE_NAME.
>> Both services contain a ModelController, you will need to choose the name to
>> depend on according to the process type.
>
>
> This brings up another question. How does my subsystem know what the process type is? Is there an API or other way to know if it is deployed in a Host Controller versus a Standalone server

When you Extension is registering your subsystem it can call 
ExtensionContext.getProcessType().

When you subsystem's OperationStepHandlers are executing they can call 
OperationContext.getProcessType().

> (and I suppose you'd need to know if its in a Domain Controller, too)?

You hopefully don't need to know that. It's not exposed via any simple 
API like the above.

>
>
> [chomp]
>>> jboss.outbound-socket-binding - my subsystem needs to talk to an external
>>> server and this defines what host/port that server is on
>> I'll look at adding this to WildFly. If this needs backporting to EAP 7.0.x,
>> please let us know so we can put it into the process.
>
>
> I will let you know about backporting. Not sure yet if we need it.
> _______________________________________________
> wildfly-dev mailing list
> wildfly-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>


-- 
Brian Stansberry
Senior Principal Software Engineer
JBoss by Red Hat


More information about the wildfly-dev mailing list