root/trunk/build/quickstart/windows/startjboss.bat

Revision 3556 (checked in by bleibson, 1 year ago)

o covert to DOS line termintation to keep batch processor happy.

Line 
1 @ECHO off
2 SETLOCAL
3
4 :: Script to start jboss with properties defined
5 :: This currently needs to be executed out of the quickstart directory
6 :: (via a source)
7
8 SET BASE_DIR=%CD%
9 SET PRG=%0
10
11 :: Set defaults
12 SET heap=600M
13 SET newsize=200M
14 SET permsize=256M
15
16 SET activemquri=vm://localhost
17
18 SET portoffset=0
19
20 GOTO branch
21
22 :heap
23   SHIFT
24   SET heap=%1
25   SHIFT
26   GOTO branch
27
28 :newsize
29   SHIFT
30   SET newsize=%1
31   SHIFT
32   GOTO branch
33
34 :permsize
35   SHIFT
36   SET permsize=%1
37   SHIFT
38   GOTO branch
39
40 :portoffset
41   SHIFT
42   SET portoffset=%1
43   SHIFT
44   GOTO branch
45
46 :activemquri
47   SHIFT
48   SET activemquri=%1
49   SHIFT
50   GOTO branch
51
52 :doneWithArgs
53
54 SET JBOSS_VERSION=jboss-5.1.0.GA
55 SET JBOSS_CONFIG=default
56 SET JBOSS_SERVER_DIR=%BASE_DIR%\%JBOSS_VERSION%\server\%JBOSS_CONFIG%
57 SET JBOSS_DATA_DIR=%JBOSS_SERVER_DIR%\data
58
59 :: If this is empty only localhost will be available.
60 :: With this address anybody can access the consoles if they are not locked down.
61 SET JBOSS_BIND=-b 0.0.0.0
62
63 ::
64 :: Port shifting
65 ::
66
67 :: standard ports
68 SET JBOSS_PORTS=-Dorg.bedework.system.ports.offset=%portoffset%
69
70 :: standard ports + defined value
71 ::JBOSS_PORTS=-Dorg.bedework.system.ports.offset=505 -Djboss.service.binding.set=ports-syspar
72
73 SET ACTIVEMQ_DIRPREFIX=-Dorg.apache.activemq.default.directory.prefix=%JBOSS_DATA_DIR%\
74 SET ACTIVEMQ_URI=-Dorg.bedework.activemq.uri=%activemquri%
75
76 SET LOG_THRESHOLD=-Djboss.server.log.threshold=DEBUG
77
78 SET BW_DATA_DIR=%JBOSS_DATA_DIR%\bedework
79 SET BW_DATA_DIR_DEF=-Dorg.bedework.data.dir=%BW_DATA_DIR%\
80
81 SET JAVA_OPTS=%JAVA_OPTS% -Xms%heap% -Xmx%heap%
82 :: Don't do this SET JAVA_OPTS=%JAVA_OPTS% -XX:NewSize=%newsize% -XX:MaxNewSize=%newsize%
83 SET JAVA_OPTS=%JAVA_OPTS% -XX:PermSize=%permsize% -XX:MaxPermSize=%permsize%
84
85 SET RUN_CMD=.\%JBOSS_VERSION%\bin\run.bat -c %JBOSS_CONFIG% %JBOSS_BIND% %JBOSS_PORTS% %LOG_THRESHOLD% %ACTIVEMQ_DIRPREFIX% %ACTIVEMQ_URI% %BW_DATA_DIR_DEF%
86
87 ECHO.
88 ECHO Starting Bedework JBoss:
89 ECHO %RUN_CMD%
90 ECHO.
91 ECHO.
92
93 %RUN_CMD%
94 GOTO:EOF
95
96
97 :: Iterate over the command line arguments;
98 :: DOS Batch labels can't contain hyphens, so convert them
99 :: (otherwise, we could just "GOTO %1")
100 :branch
101 IF "%1" == "-usage" GOTO usage
102 IF "%1" == "-heap" GOTO heap
103 IF "%1" == "-newsize" GOTO newsize
104 IF "%1" == "-permsize" GOTO permsize
105 IF "%1" == "-portoffset" GOTO portoffset
106 IF "%1" == "-activemquri" GOTO activemquri
107 GOTO doneWithArgs
108  
109 :usage
110 ECHO.
111 ECHO.
112 ECHO.
113 ECHO startjboss.bat [-heap size] [-newsize size] [-permsize size]
114 ECHO                [-portoffset n] [-activemquri uri]
115 ECHO.
116 ECHO Where:
117 ECHO.
118 ECHO -heap sets the heap size and should be n for bytes
119 ECHO                                        nK for kilo-bytes (e.g. 2560000K)
120 ECHO                                        nM for mega-bytes (e.g. 256oM)
121 ECHO                                        nG for giga-bytes (e.g. 1G)
122 ECHO. Default: %heap%
123 ECHO.
124 ECHO -permsize sets the permgen size and has the same form as -heap
125 ECHO   The value should probably not be less than 256M
126 ECHO. Default: %permsize%
127 ECHO.
128 ECHO. -activemquri sets the uri used by the activemq broker for bedework
129 ECHO.  Some possibilities: vm://localhost tcp://localhost:61616
130 ECHO.  Default: %activemquriDefault%
131 ECHO.
132 ECHO. -portoffset sets the offset for the standard jboss ports allowing
133 ECHO.  multiple instances to be run on the same machine. The activemquri
134 ECHO.  value may need to be set explicitly if it uses a port.
135 ECHO.  Default: %portoffset%
136 ECHO.
Note: See TracBrowser for help on using the browser.