Skip to content

Commit

Permalink
Increase the application's heap memory when running inside embedded c…
Browse files Browse the repository at this point in the history
…ontainer.
  • Loading branch information
Reginald Cole committed May 24, 2016
1 parent 4eea25e commit a057df4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions admin/startadmin.bat
Expand Up @@ -3,7 +3,7 @@ REM ## Startup script variables that you can/should change:
REM # JREBEL_PATH - local path to your jrebel dylib to be passed as -agentpath
REM # example - /Users/you/jrebel/lib/libjrebel64.dylib
REM # DEBUG_PORT - defaults to 8001
REM # TOMCAT_MEMORY - Defaults to -Xmx1536
REM # TOMCAT_MEMORY - Defaults to -Xmx1536M -XX:MaxPermSize=512M

set cwd=%cd%

Expand All @@ -20,15 +20,18 @@ call mvn dependency:copy@copy-agent
REM # Start up the embedded HSQLDB database in the background. If it's already started this won't do anything
call mvn antrun:run@hsqldb-start

setlocal
REM # grab the path to the JRebel agent and set up a JREBEL_AGENT variable to pass to the JVM
IF "%JREBEL_PATH%"=="" (SET JREBEL_AGENT=) ELSE (SET JREBEL_AGENT=-agentpath:%JREBEL_PATH%)

REM # Figure out a debug port
IF "%DEBUG_PORT%"=="" SET DEBUG_PORT=8001

IF "%TOMCAT_MEMORY%"=="" SET TOMCAT_MEMORY=-Xmx1536
IF "%TOMCAT_MEMORY%"=="" SET TOMCAT_MEMORY=-Xmx1536M -XX:MaxPermSize=512M

SET BROADLEAF_OPTS=%TOMCAT_MEMORY% -Xdebug -Xrunjdwp:transport=dt_socket,address=%DEBUG_PORT%,server=y,suspend=n -javaagent:target/agents/spring-instrument.jar %JREBEL_AGENT%

SET MAVEN_OPTS=%MAVEN_OPTS% %BROADLEAF_OPTS%

call mvn tomcat7:run-war
endlocal
7 changes: 5 additions & 2 deletions site/startsite.bat
Expand Up @@ -3,7 +3,7 @@ REM ## Startup script variables that you can/should change:
REM # JREBEL_PATH - local path to your jrebel dylib to be passed as -agentpath
REM # example - /Users/you/jrebel/lib/libjrebel64.dylib
REM # DEBUG_PORT - defaults to 8000
REM # TOMCAT_MEMORY - Defaults to -Xmx1536
REM # TOMCAT_MEMORY - Defaults to -Xmx1536M -XX:MaxPermSize=512M

set cwd=%cd%

Expand All @@ -20,15 +20,18 @@ call mvn dependency:copy@copy-agent
REM # Start up the embedded HSQLDB database in the background. If it's already started this won't do anything
call mvn antrun:run@hsqldb-start

setlocal
REM # grab the path to the JRebel agent and set up a JREBEL_AGENT variable to pass to the JVM
IF "%JREBEL_PATH%"=="" (SET JREBEL_AGENT=) ELSE (SET JREBEL_AGENT=-agentpath:%JREBEL_PATH%)

REM # Figure out a debug port
IF "%DEBUG_PORT%"=="" SET DEBUG_PORT=8000

IF "%TOMCAT_MEMORY%"=="" SET TOMCAT_MEMORY=-Xmx1536
IF "%TOMCAT_MEMORY%"=="" SET TOMCAT_MEMORY=-Xmx1536M -XX:MaxPermSize=512M

SET BROADLEAF_OPTS=%TOMCAT_MEMORY% -Xdebug -Xrunjdwp:transport=dt_socket,address=%DEBUG_PORT%,server=y,suspend=n -javaagent:target/agents/spring-instrument.jar %JREBEL_AGENT%

SET MAVEN_OPTS=%MAVEN_OPTS% %BROADLEAF_OPTS%

call mvn tomcat7:run-war
endlocal

0 comments on commit a057df4

Please sign in to comment.