On 6/8/11 4:06 PM, Scott Stark wrote:
This is not a pull request, just a review request. I'll be
testing stuff
out on my own branch as part of the openshift testing before creating
anything to merge. The DomainServletApi and /domain-api context are not
added by default in this set of changes for review.
So, I ran into at first choosing the wrong service name for the source
of the ModelController being
org.jboss.as.domain.controller.DomainController.SERVICE_NAME vs
org.jboss.as.server.Services.JBOSS_SERVER_CONTROLLER. Is it correct that
the former is only available when running in domain mode and the lack of
a Services.JBOSS_SERVER_CONTROLLER indicates that standalone mode is not
active?
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.
On 6/8/11 1:39 PM, Brian Stansberry wrote:
>
> I'll defer to Darran on the security aspects of this; i.e. how to ensure
> that this webapp integrates with management layer's security configuration.
>
> If we do this, it shouldn't be enabled by default for the reasons Darran
> mentioned. But the patch doesn't seem to have it on by default.
>
> We'll need to disable this capability for a server running in domain
> mode, as a domain mode server is not meant to expose a
> directly-accessible-to-the-end-user management interface. The host
> controller exposes that.
>
_______________________________________________
jboss-as7-dev mailing list
jboss-as7-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
--
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat