ARTEMIS-1449 Remove deprecated -XX:+UseFastAccessorMethods JVM option

This option was removed in JRE 10 and its presence causes error on startup.

Artemis still does not compile on JDK 9 and up, so what I tried was
to compile on JDK 1.8 and then start Artemis on 1.8 and 10.
That now works for me.
This commit is contained in:
Jiri Danek 2018-05-01 08:27:20 +02:00 committed by Clebert Suconic
parent 94c34b7ed9
commit 67ee34d4d9
7 changed files with 6 additions and 7 deletions

View File

@ -36,7 +36,6 @@
<argument>-Xbootclasspath/a:%ARTEMIS_HOME%\lib\${logmanager}</argument> <argument>-Xbootclasspath/a:%ARTEMIS_HOME%\lib\${logmanager}</argument>
<argument>-XX:+UseParallelGC</argument> <argument>-XX:+UseParallelGC</argument>
<argument>-XX:+AggressiveOpts</argument> <argument>-XX:+AggressiveOpts</argument>
<argument>-XX:+UseFastAccessorMethods</argument>
<argument>-Xms512M</argument> <argument>-Xms512M</argument>
<argument>-Xmx1024M</argument> <argument>-Xmx1024M</argument>

View File

@ -30,7 +30,7 @@ ARTEMIS_INSTANCE_ETC_URI='${artemis.instance.etc.uri}'
# Java Opts # Java Opts
JAVA_ARGS="${java-opts} -XX:+PrintClassHistogram -XX:+UseG1GC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Xms512M -Xmx2G -Dhawtio.realm=activemq -Dhawtio.offline="true" -Dhawtio.role=${role} -Dhawtio.rolePrincipalClasses=org.apache.activemq.artemis.spi.core.security.jaas.RolePrincipal -Djolokia.policyLocation=${ARTEMIS_INSTANCE_ETC_URI}jolokia-access.xml" JAVA_ARGS="${java-opts} -XX:+PrintClassHistogram -XX:+UseG1GC -XX:+AggressiveOpts -Xms512M -Xmx2G -Dhawtio.realm=activemq -Dhawtio.offline="true" -Dhawtio.role=${role} -Dhawtio.rolePrincipalClasses=org.apache.activemq.artemis.spi.core.security.jaas.RolePrincipal -Djolokia.policyLocation=${ARTEMIS_INSTANCE_ETC_URI}jolokia-access.xml"
# #
# There might be options that you only want to enable on specifc commands, like setting a JMX port # There might be options that you only want to enable on specifc commands, like setting a JMX port

View File

@ -32,7 +32,7 @@ rem Cluster Properties: Used to pass arguments to ActiveMQ Artemis which can be
rem set ARTEMIS_CLUSTER_PROPS=-Dactivemq.remoting.default.port=61617 -Dactivemq.remoting.amqp.port=5673 -Dactivemq.remoting.stomp.port=61614 -Dactivemq.remoting.hornetq.port=5446 rem set ARTEMIS_CLUSTER_PROPS=-Dactivemq.remoting.default.port=61617 -Dactivemq.remoting.amqp.port=5673 -Dactivemq.remoting.stomp.port=61614 -Dactivemq.remoting.hornetq.port=5446
rem Java Opts rem Java Opts
set JAVA_ARGS=${java-opts} -XX:+PrintClassHistogram -XX:+UseG1GC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Xms512M -Xmx1024M -Xbootclasspath/a:%ARTEMIS_HOME%\lib\${logmanager} -Djava.security.auth.login.config=%ARTEMIS_INSTANCE_ETC%\login.config -Dhawtio.offline="true" -Dhawtio.realm=activemq -Dhawtio.role=${role} -Dhawtio.rolePrincipalClasses=org.apache.activemq.artemis.spi.core.security.jaas.RolePrincipal -Djolokia.policyLocation=%ARTEMIS_INSTANCE_ETC_URI%\jolokia-access.xml -Dartemis.instance=%ARTEMIS_INSTANCE% set JAVA_ARGS=${java-opts} -XX:+PrintClassHistogram -XX:+UseG1GC -XX:+AggressiveOpts -Xms512M -Xmx1024M -Xbootclasspath/a:%ARTEMIS_HOME%\lib\${logmanager} -Djava.security.auth.login.config=%ARTEMIS_INSTANCE_ETC%\login.config -Dhawtio.offline="true" -Dhawtio.realm=activemq -Dhawtio.role=${role} -Dhawtio.rolePrincipalClasses=org.apache.activemq.artemis.spi.core.security.jaas.RolePrincipal -Djolokia.policyLocation=%ARTEMIS_INSTANCE_ETC_URI%\jolokia-access.xml -Dartemis.instance=%ARTEMIS_INSTANCE%
rem There might be options that you only want to enable on specifc commands, like setting a JMX port rem There might be options that you only want to enable on specifc commands, like setting a JMX port
rem See https://issues.apache.org/jira/browse/ARTEMIS-318 rem See https://issues.apache.org/jira/browse/ARTEMIS-318

View File

@ -45,7 +45,7 @@ if [ -z "$ARTEMIS_HOME" ] ; then
fi fi
# Set Defaults Properties # Set Defaults Properties
JAVA_ARGS="-XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Xms512M -Xmx1024M" JAVA_ARGS="-XX:+UseParallelGC -XX:+AggressiveOpts -Xms512M -Xmx1024M"
CLASSPATH="$ARTEMIS_HOME/lib/artemis-boot.jar" CLASSPATH="$ARTEMIS_HOME/lib/artemis-boot.jar"
# OS specific support. # OS specific support.

View File

@ -45,7 +45,7 @@ echo.
:RUN_JAVA :RUN_JAVA
rem "Set Defaults." rem "Set Defaults."
set JAVA_ARGS=-XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Xms512M -Xmx1024M set JAVA_ARGS=-XX:+UseParallelGC -XX:+AggressiveOpts -Xms512M -Xmx1024M
rem "Create full JVM Args" rem "Create full JVM Args"
set JVM_ARGS=%JAVA_ARGS% set JVM_ARGS=%JAVA_ARGS%

View File

@ -224,7 +224,7 @@ tunings won't apply to JDKs from other providers (e.g. IBM or JRockit)
tuning parameters, for the Sun Hotspot JVM the full list of options tuning parameters, for the Sun Hotspot JVM the full list of options
is available is available
[here](http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html). [here](http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html).
We recommend at least using `-XX:+AggressiveOpts` and `-XX:+UseFastAccessorMethods`. We recommend at least using `-XX:+AggressiveOpts`.
You may get some mileage with the other tuning parameters depending You may get some mileage with the other tuning parameters depending
on your OS platform and application usage patterns. on your OS platform and application usage patterns.

View File

@ -15,4 +15,4 @@
# specific language governing permissions and limitations # specific language governing permissions and limitations
# under the License. # under the License.
server.args=-XX:+UseParallelGC -Xms256M -Xmx256M -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Dcom.sun.management.jmxremote -Djava.util.logging.config.file=${imported.basedir}/config/logging.properties -Djava.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory server.args=-XX:+UseParallelGC -Xms256M -Xmx256M -XX:+AggressiveOpts -Dcom.sun.management.jmxremote -Djava.util.logging.config.file=${imported.basedir}/config/logging.properties -Djava.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory