[jboss-as7-dev] start/stop as7 server?

Brian Stansberry brian.stansberry at redhat.com
Mon Apr 18 09:49:11 EDT 2011


You can't start a standalone AS process via the management API. The API 
will not support making native OS calls . You can't start a 
DomainController/HostController either. That has to be done via some 
external action.

https://github.com/jbossas/jboss-as/blob/master/arquillian/container-managed/src/main/java/org/jboss/as/arquillian/container/managed/JBossAsManagedContainer.java 
is a class that launches a separate standalone AS instance from within a 
test client. So that's an example of how to do this. It uses 
java.lang.Process, so it's up to the parent process to manage the 
lifecycle of the child, consume its streams etc.

You can shut down a standalone server via the "shutdown" operation (no 
params) on the root resource. You can cause a full reload of all 
services (very similiar effect to a restart) via the "reload" operation 
(no params) on the root resource.

On 4/18/11 7:54 AM, André Dietisheim wrote:
> Hi
>
> I try to start and stop as7 programmatically by using the management
> API. I unfortunately could not find any snippets that worked so far. The
> ServerDeploymentManager has a TODO and indicates that shutdown has not
> yet been implemented. DomainClient has a #stopServer method, but it
> looks like it only works for as7 in domain mode. Do I miss something?
>
> I'd highly appreciate any pointes.
>
> Thanks
> André
> _______________________________________________
> 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