7 Replies Latest reply on Aug 22, 2016 4:00 PM by Sarah Qu

    Start / Stop Wildfly over GUI -> org.wildfly.bootstrap -> Performance Issue

    Sarah Qu Newbie

      Dear all,

       

      A couple of month I found a code from James R. Perkins which start and stop the wildfly server from JAVA method (currently I can´t find anymore the project on GitHub).

      ->I´ve implemented a GUI with two Buttons start() and stop(). Over this two buttons I can start or stop the server.

       

      I´m using this code also to start and stop the WildFly Server 10.0.0 Final from a Main() - Method.

      This code is working but now I found an issue:

      If I start my WildFly Server 10.0.0 over the command console my Memory is round about 800 MB.

      If I start the WIldfly Server 10.0.0. (same directory) from the GUI which use the code from the project the Memory is round about 1400 MB.

       

      I compared the log files and found at the first line this line is missing in the Log file from start the Wildfly Server over the GUI:

      17:51:08,421 INFO  [org.wildfly.extension.io] (ServerService Thread Pool -- 37) WFLYIO001: Worker 'default' has auto-configured to 8 core threads with 64 task threads based on your 4 available processors

       

      How can I solve this issue?

      Here is the pom.xml

       

      <?xml version="1.0" encoding="UTF-8"?>
      <!-- ~ JBoss, Home of Professional Open Source. ~ Copyright 2014, Red Hat, 
          Inc., and individual contributors ~ as indicated by the @author tags. See 
          the copyright.txt file in the ~ distribution for a full listing of individual 
          contributors. ~ ~ This is free software; you can redistribute it and/or modify 
          it ~ under the terms of the GNU Lesser General Public License as ~ published 
          by the Free Software Foundation; either version 2.1 of ~ the License, or 
          (at your option) any later version. ~ ~ This software is distributed in the 
          hope that it will be useful, ~ but WITHOUT ANY WARRANTY; without even the 
          implied warranty of ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
          See the GNU ~ Lesser General Public License for more details. ~ ~ You should 
          have received a copy of the GNU Lesser General Public ~ License along with 
          this software; if not, write to the Free ~ Software Foundation, Inc., 51 
          Franklin St, Fifth Floor, Boston, MA ~ 02110-1301 USA, or see the FSF site: 
          http://www.fsf.org. -->
      
      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
          <modelVersion>4.0.0</modelVersion>
      
          <groupId>org.wildfly.bootstrap</groupId>
          <artifactId>bootstrap</artifactId>
          <version>1.0.0.Alpha1-SNAPSHOT</version>
      
          <name>WildFly Bootstrap</name>
      
          <description>A simple API to boot WildFly Application Server.</description>
          <url>http://www.wildfly.org</url>
      
          <parent>
              <artifactId>jboss-parent</artifactId>
              <groupId>org.jboss</groupId>
              <version>14</version>
          </parent>
      
      
          <licenses>
              <license>
                  <name>lgpl</name>
                  <url>http://repository.jboss.org/licenses/lgpl-2.1.txt</url>
                  <distribution>repo</distribution>
              </license>
          </licenses>
      
      
          <properties>
              <!-- WildFly/JBoss dependencies -->
              <version.org.wildfly>8.2.1.Final</version.org.wildfly>
              <version.org.wildfly.dist>${version.org.wildfly}</version.org.wildfly.dist>
      
              <version.org.jboss.jdf.stacks-client>1.0.2.Final</version.org.jboss.jdf.stacks-client>
      
              <version.org.eclipse.aether>0.9.0.M4</version.org.eclipse.aether>
      
              <!-- other dependencies -->
              <version.junit.junit>4.11</version.junit.junit>
              <version.org.apache.commons.compress>1.5</version.org.apache.commons.compress>
      
              <jboss.home>${project.build.directory}${file.separator}wildfly-${version.org.wildfly.dist}</jboss.home>
      
              <!-- plugin versions -->
              <version.enforcer.plugin>1.3</version.enforcer.plugin>
      
              <!-- checkstyle configuration -->
              <linkXRef>false</linkXRef>
          </properties>
      
          <build>
              <plugins>
      
                  <plugin>
                      <artifactId>maven-dependency-plugin</artifactId>
                      <executions>
                          <execution>
                              <id>unpack-wildfly</id>
                              <phase>generate-test-resources</phase>
                              <goals>
                                  <goal>unpack</goal>
                              </goals>
                              <configuration>
                                  <artifactItems>
                                      <artifactItem>
                                          <groupId>org.wildfly</groupId>
                                          <artifactId>wildfly-dist</artifactId>
                                          <version>${version.org.wildfly.dist}</version>
                                          <type>zip</type>
                                          <!-- overwrite to clean any previous deployments -->
                                          <overWrite>true</overWrite>
                                          <outputDirectory>${project.build.directory}</outputDirectory>
                                      </artifactItem>
                                  </artifactItems>
                              </configuration>
                          </execution>
                      </executions>
                  </plugin>
      
                  <plugin>
                      <artifactId>maven-checkstyle-plugin</artifactId>
                      <configuration>
                          <configLocation>checkstyle.xml</configLocation>
                          <consoleOutput>true</consoleOutput>
                          <failsOnError>true</failsOnError>
                          <useFile />
                      </configuration>
                      <executions>
                          <execution>
                              <id>check-style</id>
                              <phase>compile</phase>
                              <goals>
                                  <goal>checkstyle</goal>
                              </goals>
                          </execution>
                      </executions>
                  </plugin>
      
                  <plugin>
                      <artifactId>maven-surefire-plugin</artifactId>
                      <configuration>
                          <redirectTestOutputToFile>true</redirectTestOutputToFile>
                          <systemPropertyVariables>
                              <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
                              <jboss.home>${jboss.home}</jboss.home>
                              <wildfly.test.config.dir>
                                  ${project.build.testOutputDirectory}${file.separator}unit${file.separator}common
                              </wildfly.test.config.dir>
                          </systemPropertyVariables>
                      </configuration>
                  </plugin>
              </plugins>
          </build>
      
          <dependencies>
      
              <dependency>
                  <groupId>mysql</groupId>
                  <artifactId>mysql-connector-java</artifactId>
                  <version>5.1.6</version>
              </dependency>
      
              <dependency>
                  <groupId>log4j</groupId>
                  <artifactId>log4j</artifactId>
                  <version>1.2.17</version>
              </dependency>
      
              <!-- https://mvnrepository.com/artifact/org.jboss.resteasy/resteasy-client 
              <dependency>
                  <groupId>org.jboss.resteasy</groupId>
                  <artifactId>resteasy-client</artifactId>
                  <version>3.0.19.Final</version>
              </dependency>
      
          
              <dependency>
                  <groupId>org.apache.httpcomponents</groupId>
                  <artifactId>httpclient</artifactId>
                  <version>4.3.4</version>
              </dependency>
      
              
              <dependency>
                  <groupId>javax.ws.rs</groupId>
                  <artifactId>javax.ws.rs-api</artifactId>
                  <version>2.0.1</version>
              </dependency>
      
      -->
      
      
      
      
              <dependency>
                  <groupId>org.apache.commons</groupId>
                  <artifactId>commons-compress</artifactId>
                  <version>${version.org.apache.commons.compress}</version>
              </dependency>
      
              <dependency>
                  <groupId>org.jboss.jdf</groupId>
                  <artifactId>stacks-client</artifactId>
                  <version>${version.org.jboss.jdf.stacks-client}</version>
              </dependency>
      
              <dependency>
                  <groupId>org.wildfly</groupId>
                  <artifactId>wildfly-cli</artifactId>
                  <version>${version.org.wildfly}</version>
                  <exclusions>
                      <exclusion>
                          <groupId>org.jboss.logging</groupId>
                          <artifactId>jboss-logging-processor</artifactId>
                      </exclusion>
                      <exclusion>
                          <groupId>org.jboss.logmanager</groupId>
                          <artifactId>jboss-logmanager</artifactId>
                      </exclusion>
                  </exclusions>
              </dependency>
      
              <dependency>
                  <groupId>org.wildfly</groupId>
                  <artifactId>wildfly-controller-client</artifactId>
                  <version>${version.org.wildfly}</version>
              </dependency>
              <!-- Seems to be needed as the controller client is transitively bringing 
                  it in -->
      
              <dependency>
                  <groupId>org.wildfly</groupId>
                  <artifactId>wildfly-protocol</artifactId>
                  <version>${version.org.wildfly}</version>
              </dependency>
      
              <!-- Used only if the server needs to be downloaded from maven -->
              <dependency>
                  <groupId>org.eclipse.aether</groupId>
                  <artifactId>aether-api</artifactId>
                  <version>${version.org.eclipse.aether}</version>
                  <scope>provided</scope>
                  <optional>true</optional>
              </dependency>
      
              <!-- Test dependencies -->
              <dependency>
                  <groupId>junit</groupId>
                  <artifactId>junit</artifactId>
                  <version>${version.junit.junit}</version>
                  <scope>test</scope>
              </dependency>
      
      
      
              <dependency>
                  <groupId>org.wildfly</groupId>
                  <artifactId>wildfly-controller-client</artifactId>
                  <version>8.2.0.Final</version>
                  <scope>provided</scope>
                  <exclusions>
                      <exclusion>
                          <groupId>sun.jdk</groupId>
                          <artifactId>jconsole-jdk</artifactId>
                      </exclusion>
                  </exclusions>
              </dependency>
      
          </dependencies>
      
      
      
      
      
      </project>