[jboss-as7-dev] Request for review of DomainServletApi bridge

Brian Stansberry brian.stansberry at redhat.com
Thu Jun 9 17:52:37 EDT 2011


On 6/9/11 3:59 PM, Scott Stark wrote:
> I think I'll do this as a new module that depends on the domain-api-http
> and web modules rather than make it part of the jbossweb piece and treat
> it as another interface under managment-interfaces in the standalone
> domain model. If that is the case, then the domain controller does not
> apply, correct?
>

That's correct; the host.xml parser should just barf if that element 
were present.

Having a service that's part of the core AS depend on a subsystem makes 
me queasy. Mostly because I sense a slippery slope. But there's no 
reason it shouldn't work.

> On 6/8/11 2:24 PM, Brian Stansberry wrote:
>> No, org.jboss.as.domain.controller.DomainController.SERVICE_NAME is for
>> a service that only runs in the DC process. A server process will have
>> org.jboss.as.server.Services.JBOSS_SERVER_CONTROLLER whether it's in
>> domain mode or standalone mode.
>>
>> A quick solution is inject the o.j.a.server.ServerEnvironment (under
>> name org.jboss.as.server.ServerEnvironmentService.SERVICE_NAME) and in
>> your start() method check the getLaunchType() property. It will return
>> one of:
>>
>> public static enum LaunchType {
>>        DOMAIN,
>>        STANADALONE,
>>        EMBEDDED
>> }
>>
>> If DOMAIN, don't install the servlet.
>>
>> (I'll fix the typo in the enum!)
>>
>> Better would be to catch this on the domain controller when it processes
>> the profile. With some stuff I'm doing on a branch that will be easy
>> enough to do; if you assign a JIRA to me to do that, I can add it when I
>> merge your stuff into the branch. Or tell you how to do it if my branch
>> is merged before you're ready.
>>
>
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev


-- 
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat


More information about the jboss-as7-dev mailing list