[Carbon-dev] Write some native code to restart the server?

Afkham Azeez azeez at wso2.com
Tue Apr 5 10:27:29 PDT 2011


No
On Apr 5, 2011 10:30 PM, "Indika Kumara" <indika at wso2.com> wrote:
> Would this affect the graceful shutdown of HTTP listeners, etc.?
>
> ~ Indika
>
> On Tue, Apr 5, 2011 at 2:48 PM, Afkham Azeez <azeez at wso2.com> wrote:
>
>> We can do something like the following. Anybody interested can run this
>> code and see what happens :)
>>
>> import java.io.File;
>>
>> import java.io.IOException;
>>
>> import java.lang.management.ManagementFactory;
>>
>>
>> public class Main {
>>
>>
>> public static void main(String[] args) throws IOException,
InterruptedException {
>>
>>
>> StringBuilder cmd = new StringBuilder();
>>
>>
>> cmd.append(System.getProperty("java.home") + File.separator + "bin" +
File.separator + "java ");
>>
>>
>> for (String jvmArg :
ManagementFactory.getRuntimeMXBean().getInputArguments()) {
>>
>>
>> cmd.append(jvmArg + " ");
>>
>>
>> }
>>
>>
>> cmd.append("-cp
").append(ManagementFactory.getRuntimeMXBean().getClassPath()).append(" ");
>>
>>
>> cmd.append(Main.class.getName()).append(" ");
>>
>>
>> for (String arg : args) {
>>
>> ...
>>
>> [Message clipped]
>> _______________________________________________
>> Carbon-dev mailing list
>> Carbon-dev at wso2.org
>> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.wso2.org/pipermail/carbon-dev/attachments/20110405/42bc3fd7/attachment.htm>


More information about the Carbon-dev mailing list