build.xml 84.9 KB
Newer Older
Nicolas Tachker's avatar
Nicolas Tachker committed
1
<project default="compile" basedir="." xmlns:m2="urn:maven-artifact-ant">
joram's avatar
joram committed
2
3
4

  <!-- Initializes the environment paths and properties -->
  <target name="init">
maistrfr's avatar
maistrfr committed
5
    <!-- Initializes the directory structure properties -->
joram's avatar
joram committed
6
    <property name="src.dir" location="."/>
7
    <property name="ship.dir" location="../../../ship"/>
fmaistre's avatar
fmaistre committed
8
    <property name="obj.dir" location="../../classes"/>
Nicolas Tachker's avatar
Nicolas Tachker committed
9
    <property name="lib.dir" location="${ship.dir}/lib"/>
fmaistre's avatar
fmaistre committed
10
    <property name="run.dir" location="../../run"/>
11
    <property name="conf.dir" location="../../config"/>
12
    <property name="felix.dir" location="${ship.dir}/bin/"/>
Nicolas Tachker's avatar
Nicolas Tachker committed
13
    <property name="bundle.dir" location="${ship.dir}/bundle" />
Andre Freyssinet's avatar
Andre Freyssinet committed
14

Nicolas Tachker's avatar
Nicolas Tachker committed
15
  	<!-- Project classpath needed for execution -->
joram's avatar
joram committed
16
17
18
19
20
    <path id="project.class.path">
      <pathelement path="${java.class.path}/"/>
      <fileset dir="${lib.dir}">
         <include name="*.jar"/>
      </fileset>
21
22
23
      <fileset dir="${bundle.dir}">
         <include name="*.jar"/>
      </fileset>
fmaistre's avatar
fmaistre committed
24
      <pathelement path="${obj.dir}/joram"/>
afreyssin's avatar
afreyssin committed
25
      <pathelement path="${run.dir}"/>
joram's avatar
joram committed
26
27
    </path>
    <property name="project.class.path" refid="project.class.path"/>
28
29
30
    
    <path id="felix.class.path">
      <pathelement path="${java.class.path}/"/>
31
      <fileset file="${felix.dir}/felix.jar"/>
32
      <pathelement path="${run.dir}"/>
33
    </path>
Nicolas Tachker's avatar
Nicolas Tachker committed
34
    <property name="felix.class.path" refid="felix.class.path"/>  	
joram's avatar
joram committed
35
  </target>
36
37
38
39
40
41

  <!-- Cleans run directory -->
  <target name="reset" depends="init"
          description="--> Cleans run directory">
    <delete quiet="true" dir="${run.dir}"/>
  </target>
Nicolas Tachker's avatar
Nicolas Tachker committed
42
	
maistrfr's avatar
maistrfr committed
43
  <!-- Cleans samples - deletes generated files -->
44
  <target name="clean" depends="init,reset"
fmaistre's avatar
fmaistre committed
45
          description="--> Deletes generated files">
joram's avatar
joram committed
46
47
48
    <delete quiet="true" dir="${obj.dir}"/>
  </target>

Andre Freyssinet's avatar
Andre Freyssinet committed
49
  <!-- Compiles (be careful, deprecation, nowarn and verbose properties are not defined -->
50
  <target name="compile" depends="init,clean"
joram's avatar
joram committed
51
    description="--> Compile all samples">
52
    <mkdir dir="${obj.dir}/joram"/>
joram's avatar
joram committed
53
    <javac srcdir="${src.dir}"
fmaistre's avatar
fmaistre committed
54
           destdir="${obj.dir}/joram"
Andre Freyssinet's avatar
Andre Freyssinet committed
55
56
           debug="true"
           optimize="false"
joram's avatar
joram committed
57
58
           deprecation="${deprecation}"
           nowarn="${nowarn}"
59
60
           verbose="${verbose}"
           includeantruntime="false">
joram's avatar
joram committed
61
      <classpath refid="project.class.path"/>
joram's avatar
joram committed
62
      <include name="**/*.java"/>
joram's avatar
joram committed
63
64
    </javac>
  </target>
65
	
66
67
68
69
70
71
72
  <!-- Initializes a centralized configuration -->
  <target name="server_init" depends="init">
    <mkdir dir="${run.dir}/server${sid}"/>
    <copy file="${conf.dir}/a3config.dtd" todir="${run.dir}/server${sid}"/>
    <copy file="${conf.dir}/a3debug.cfg" todir="${run.dir}/server${sid}"/>
    <copy file="${a3.conf}" tofile="${run.dir}/server${sid}/a3servers.xml"/>
    <copy file="${osgi.conf}" tofile="${run.dir}/server${sid}/config.properties"/>
73
    <!--copy file="${monit.conf}" tofile="${run.dir}/server${sid}/MonitoringConfig.xml"/-->
afreyssin's avatar
afreyssin committed
74
75
76
  	<!-- copy file="${conf.dir}/fileMonitoring.props" tofile="${run.dir}/server${sid}/fileMonitoring.props"/ -->
    <!-- copy file="${conf.dir}/fileMonitoring.props" tofile="${run.dir}/server${sid}/logMonitoring.props"/ -->
    <!-- copy file="${conf.dir}/fileMonitoring.props" tofile="${run.dir}/server${sid}/windowMonitoring.props"/ -->
afreyssin's avatar
afreyssin committed
77
  </target>
joram's avatar
joram committed
78
79

  <target name="simple_init" depends="init">
afreyssin's avatar
afreyssin committed
80
    <copy file="${conf.dir}/a3debug.cfg" todir="${run.dir}"/>
81
    <copy file="${conf.dir}/jndi.properties" todir="${run.dir}"/>
82
83
  </target>

84
  <target name="server" depends="server_init">
85
86
    <java classname="org.apache.felix.main.Main"
          failonerror="no" fork="yes"
87
          dir="${run.dir}/server${sid}">
88
      <classpath path="${felix.class.path}"/>
afreyssin's avatar
afreyssin committed
89
      <!-- jvmarg line="-Dfelix.config.properties=file:config.properties -Dfr.dyade.aaa.agent.AgentServer.id=${sid} -Dcom.sun.management.jmxremote.port=9191 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -DTransaction.SyncOnWrite=false"/ -->
90
91
      <!-- jvmarg line="-server -Xmx2G -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,address=5000,suspend=n -Dfelix.config.properties=file:config.properties -Dfr.dyade.aaa.agent.AgentServer.id=${sid} -Dcom.sun.management.jmxremote -DTransaction.SyncOnWrite=false"/ -->
      <jvmarg line="-server -Xmx2G -Xdebug -Xnoagent -Djava.compiler=NONE -Dfelix.config.properties=file:config.properties -Dfr.dyade.aaa.agent.AgentServer.id=${sid} -Dcom.sun.management.jmxremote -DTransaction.SyncOnWrite=false"/>
92
      <!-- jvmarg line="-server -Xmx1500m -Xincgc -Dfelix.config.properties=file:config.properties -Dfr.dyade.aaa.agent.AgentServer.id=${sid} -Dcom.sun.management.jmxremote"/ -->
93
94
95
      <!-- jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y"/ -->
    </java>
  </target>
96
97
98
99
100
101
102
103
104
105

  <target name="server_nofork" depends="server_init">
    <java classname="org.apache.felix.main.Main"
          failonerror="no" fork="no"
          dir="${run.dir}/server${sid}">
      <classpath path="${felix.class.path}"/>
      <jvmarg line="-Dfelix.config.properties=file:config.properties -Dfr.dyade.aaa.agent.AgentServer.id=${sid} -Dcom.sun.management.jmxremote"/>
      <!-- jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y"/ -->
    </java>
  </target>
106
107
108
  
  <!-- Start a single server in NullTransaction mode -->
  <target name="single_server" depends="init"
fmaistre's avatar
fmaistre committed
109
          description="--> Starts a single server in non-persistent mode">
110
111
    <antcall target="server">
      <param name="sid" value="0"/>
112
      <param name="a3.conf" value="${conf.dir}/centralized_a3servers.xml"/>
113
      <param name="osgi.conf" value="${conf.dir}/config.properties"/>
114
115
    </antcall>
  </target>
116
117
118
119
	
  <!-- Start a single server with the shell commands -->
  <target name="shell_server" depends="init"
          description="--> Starts a single server with the shell commands">
afreyssin's avatar
afreyssin committed
120
    <antcall target="server">
121
122
123
124
125
      <param name="sid" value="0"/>
      <param name="a3.conf" value="${conf.dir}/centralized_a3servers.xml"/>
      <param name="osgi.conf" value="${conf.dir}/config_shell.properties"/>     
    </antcall>
  </target>
126
127
128
129
130
131
132
  
  <!-- Start a single server with NGTransaction component -->
  <target name="ngt_server" depends="init"
          description="--> Starts a single server with NGTransaction component">
    <antcall target="server">
      <param name="sid" value="0"/>
      <param name="a3.conf" value="${conf.dir}/ngt_a3servers.xml"/>
133
      <param name="osgi.conf" value="${conf.dir}/config.properties"/>
134
135
    </antcall>
  </target>
136
137
138
139
140
141
142
143
144
145
146

  <!-- Start a single server with NGTransaction and JMS Healthcheck component -->
  <target name="jmscheck_server" depends="init"
          description="--> Starts a single server with NGTransaction and JMS Healthcheck component">
    <antcall target="server">
      <param name="sid" value="0"/>
      <param name="a3.conf" value="${conf.dir}/ngt_a3servers.xml"/>
      <param name="osgi.conf" value="${conf.dir}/config_jmscheck.properties"/>
    </antcall>
  </target>

147
	
148
149
150
151
152
153
154
155
156
157
  <!-- Start a single server with DerbyTransaction   -->
  <!-- Be careful: Needs the derby.jar bundle        -->
  <target name="derby_server" depends="init"
          description="--> Starts a single server in persistent mode with a Derby repository">
    <antcall target="server">
      <param name="sid" value="0"/>
      <param name="a3.conf" value="${conf.dir}/derby_a3servers.xml"/>
      <param name="osgi.conf" value="${conf.dir}/config_derby.properties"/>
    </antcall>
  </target>
158

159
160
161
  <!-- Start a single server with JDBCTransaction and Derby data store -->
  <!-- Be careful: Needs the derby.jar bundle        -->

162
  <target name="derbyxserver" depends="server_init">
163
164
165
166
167
168
169
170
171
172
173
    <java classname="org.apache.felix.main.Main"
          failonerror="no" fork="yes"
          dir="${run.dir}/server${sid}">
      <classpath path="${felix.class.path}"/>
      <jvmarg line="-server -Xmx2G -Xdebug -Xnoagent -Djava.compiler=NONE -Dfelix.config.properties=file:config.properties -Dfr.dyade.aaa.agent.AgentServer.id=${sid} -Dcom.sun.management.jmxremote"/>
	  <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.driver=org.apache.derby.jdbc.EmbeddedDriver"/>
      <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.url=jdbc:derby:MyJoramDB;create=true"/>
      <jvmarg value="-Dorg.ow2.joram.dbtransaction.dbtable=MyTable"/>
      <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.dbname=MyJoramDB"/>
      <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.user=user1"/>
      <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.password=pass1"/>
174
175
176
      <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.connect_retry_count=10"/>
      <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.connect_retry_max_period=120000"/>
      <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.connect_retry_min_delay=5000"/>
177
178
179
180
      <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.dbinit=CREATE TABLE MyTable (name VARCHAR(256), content BLOB(16M), PRIMARY KEY(name))"/>
    </java>
  </target>

181
  <target name="jdbc_derby_server" depends="init"
182
          description="--> Starts a single server in persistent mode with a Derby repository">
183
    <antcall target="derbyxserver">
184
185
186
      <param name="sid" value="0"/>
      <param name="a3.conf" value="${conf.dir}/jdbc_a3servers.xml"/>
      <param name="osgi.conf" value="${conf.dir}/config_derby.properties"/>
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
    </antcall>
  </target>

  <target name="mysqlxserver" depends="server_init">
    <java classname="org.apache.felix.main.Main"
          failonerror="no" fork="yes"
          dir="${run.dir}/server${sid}">
      <classpath path="${felix.class.path}"/>
      <jvmarg line="-server -Xmx2G -Xdebug -Xnoagent -Djava.compiler=NONE -Dfelix.config.properties=file:config.properties -Dfr.dyade.aaa.agent.AgentServer.id=${sid} -Dcom.sun.management.jmxremote"/>
    <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.driver=com.mysql.jdbc.Driver"/>
      <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.url=jdbc:mysql://192.168.1.133:3306/joramdb0?useUnicode=true&amp;useJDBCCompliantTimezoneShift=true&amp;useLegacyDatetimeCode=false&amp;serverTimezone=UTC"/>
      <jvmarg value="-Dorg.ow2.joram.dbtransaction.dbtable=MyTable"/>
      <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.dbname=joramdb0"/>
      <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.user=joram"/>
      <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.password=Jor@m#516@"/>
      <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.dbinit=CREATE TABLE MyTable (name VARCHAR(255), content LONGBLOB, PRIMARY KEY(name))"/>
      <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.connect_retry_count=0"/>
        <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.connect_retry_delay=0"/>
    </java>
  </target>

  <target name="jdbc_mysql_server" depends="init"
          description="--> Starts a single server in persistent mode with a Derby repository">
    <antcall target="mysqlxserver">
      <param name="sid" value="0"/>
      <param name="a3.conf" value="${conf.dir}/jdbc_a3servers.xml"/>
      <param name="osgi.conf" value="${conf.dir}/config_mysql.properties"/>
214
215
    </antcall>
  </target>
216

afreyssin's avatar
afreyssin committed
217
  <!-- Start a single server in NullTransaction mode with all extension bundles -->
218
  <target name="extended_server" depends="init"
219
          description="--> Starts a single server in non-persistent mode">
220
    <antcall target="server">
221
      <param name="sid" value="0"/>
222
223
      <param name="a3.conf" value="${conf.dir}/centralized_a3servers.xml"/>
      <param name="osgi.conf" value="${conf.dir}/config_all.properties"/>    	
224
225
    </antcall>
  </target>
joram's avatar
joram committed
226

afreyssin's avatar
afreyssin committed
227
228
229
230
231
232
233
234
235
236
  <!-- Start a single server in NullTransaction mode with extension bundles needed for JASP-->
  <target name="stomp_server" depends="init"
          description="--> Starts a single server in non-persistent mode">
    <antcall target="server">
      <param name="sid" value="0"/>
      <param name="a3.conf" value="${conf.dir}/centralized_a3servers.xml"/>
      <param name="osgi.conf" value="${conf.dir}/config_stomp.properties"/>    	
    </antcall>
  </target>

237
238
239
240
241
242
243
244
245
  <!-- Start a single server in NullTransaction mode with extension bundles needed for the WEB console -->
  <target name="console_server" depends="init"
          description="--> Starts a single server in non-persistent mode">
    <antcall target="server">
      <param name="sid" value="0"/>
      <param name="a3.conf" value="${conf.dir}/centralized_a3servers.xml"/>
      <param name="osgi.conf" value="${conf.dir}/config_console.properties"/>    	
    </antcall>
  </target>
afreyssin's avatar
afreyssin committed
246
247
248
249
250
251
252
253
254
255
  
  <!-- Start a single AMQP server -->
  <target name="amqp_server" depends="init"
          description="--> Starts a single AMQP server in persistent mode">
    <antcall target="server">
      <param name="sid" value="0"/>
      <param name="a3.conf" value="${conf.dir}/amqp_a3servers.xml"/>
      <param name="osgi.conf" value="${conf.dir}/config_amqp.properties"/>
    </antcall>
  </target>
256

257
258
259
  <!-- Setup a distributed architecture with 3 servers -->
  <target name="server0" depends="init"
          description="--> Starts a server for a distributed architecture (w/ id 0)">
Nicolas Tachker's avatar
Nicolas Tachker committed
260
261
    <antcall target="server">
      <param name="sid" value="0"/>
262
      <param name="a3.conf" value="${conf.dir}/distributed_a3servers.xml"/>
263
264
      <param name="osgi.conf" value="${conf.dir}/config_min.properties"/>   
    	<param name="monit.conf" value="${conf.dir}/MonitoringConfig_0.xml"/>
265
266
267
268
269
270
271
272
    </antcall>
  </target>
	
  <target name="server1" depends="init"
          description="--> Starts a server for a distributed architecture (w/ id 1)">
    <antcall target="server">
      <param name="sid" value="1"/>
      <param name="a3.conf" value="${conf.dir}/distributed_a3servers.xml"/>
273
274
      <param name="osgi.conf" value="${conf.dir}/config_min.properties"/>   
    	<param name="monit.conf" value="${conf.dir}/MonitoringConfig_1.xml"/>
Nicolas Tachker's avatar
Nicolas Tachker committed
275
276
    </antcall>
  </target>
277
278
279
280
281
282
	
  <target name="server2" depends="init"
          description="--> Starts a server for a distributed architecture (w/ id 2)">
    <antcall target="server">
      <param name="sid" value="2"/>
      <param name="a3.conf" value="${conf.dir}/distributed_a3servers.xml"/>
283
284
      <param name="osgi.conf" value="${conf.dir}/config_min.properties"/>  
    	<param name="monit.conf" value="${conf.dir}/MonitoringConfig_2.xml"/>
285
286
287
288
289
290
291
292
293
294
295
    </antcall>
  </target>
	
  <target name="servers"
          description="--> Starts 3 servers in a distributed configuration">
    <parallel>
      <antcall target="server0"/>
      <antcall target="server1"/>
      <antcall target="server2"/>
    </parallel>
  </target>
Nicolas Tachker's avatar
Nicolas Tachker committed
296

297
298
299
300
301
302
  <!-- Runs the Admin Mbean adapter for client JMX console -->
  <target name="admin_jmx" depends="simple_init"
    description="--> Starts an admin MBean adapter client">
    <java classname="org.objectweb.joram.client.jms.admin.JoramAdminConnect"
          failonerror="no" fork="yes"
          dir="${run.dir}">
303
      <jvmarg line="-Dcom.sun.management.jmxremote"/>
304
305
306
      <classpath path="${project.class.path}"/>
    </java>
  </target>
Nicolas Tachker's avatar
Nicolas Tachker committed
307

308
  <!-- **************************************************
309
       * Bridge tests based on real client configuration #1
310
311
312
313
       ************************************************** -->
  
  <!-- EF Bridge server -->
  <target name="efbridge_server" depends="simple_init"
314
          description="--> Starts the EF bridge server">
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
    <antcall target="server">
      <param name="sid" value="1"/>
      <param name="a3.conf" value="${conf.dir}/efbridge_a3servers.xml"/>
      <param name="osgi.conf" value="${conf.dir}/config_bridge.properties"/>    	
    </antcall>
  </target>
	
  <!-- Setup the central server configuration -->
  <target name="efbridge_admin" depends="simple_init"
          description="--> Runs the EF bridge sample administration">
    <java classname="efbridge.Admin"
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

  <!-- Setup the bridge configuration -->
  <target name="efbridge_adminxml" depends="simple_init"
          description="-->  Runs XML administration script for EF bridge sample">
    <copy file="${src.dir}/efbridge/joramAdmin.xml" overwrite="true" todir="${run.dir}"/>
    <java classname="org.objectweb.joram.client.jms.admin.AdminModule"
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <arg line="./joramAdmin.xml"/>
    </java>
  </target>

  <!-- Runs the efbridge producer -->
  <target name="efbridge_producer" depends="init"
    description="--> Runs the EF bridge sample producer">
    <java classname="efbridge.Producer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

  <!-- Runs the efbridge consumer -->
  <target name="efbridge_consumer" depends="init"
    description="--> Runs the EF bridge sample consumer">
    <java classname="efbridge.Consumer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>
361

362
363
364
365
366
  <!-- **************************************************
       * Bridge tests based on real client configuration #2
       ************************************************** -->
  
  <!-- SEIP Bridge server, /!\ the configuration file is inherited from efbridge -->
367
  <!-- Needs to run a ngt_server -->
368
369
370
371
  <target name="seipbridge_server" depends="simple_init"
          description="--> Starts the SEIP bridge server">
    <antcall target="server">
      <param name="sid" value="1"/>
372
      <param name="a3.conf" value="${conf.dir}/seipbridge_a3servers.xml"/>
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
      <param name="osgi.conf" value="${conf.dir}/config_bridge.properties"/>    	
    </antcall>
  </target>
	
  <!-- Setup the central server configuration -->
  <target name="seipbridge_admin" depends="simple_init"
          description="--> Runs the SEIP bridge sample administration">
    <java classname="seipbridge.Admin"
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

  <!-- Runs the efbridge producer -->
  <target name="seipbridge_producer" depends="init"
    description="--> Runs the SEIP bridge sample producer">
    <java classname="seipbridge.Producer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

  <!-- Runs the efbridge consumer -->
  <target name="seipbridge_consumer" depends="init"
    description="--> Runs the SEIP bridge sample consumer">
    <java classname="seipbridge.Consumer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

405
406
407
  <!-- **************************************************
       * Rest samples
       ************************************************** -->
408
  
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
  <!-- Start REST and a single server in NullTransaction mode -->
  <target name="rest_server" depends="init"
          description="--> Starts a single server with REST/JMS API">
    <antcall target="server">
      <param name="sid" value="0"/>
      <param name="a3.conf" value="${conf.dir}/ngt_a3servers.xml"/>
      <param name="osgi.conf" value="${conf.dir}/config_rest.properties"/>
    </antcall>
  </target>

  <!-- Runs the rest producer -->
  <target name="rest.producer" depends="init"
    description="--> Runs the rest sample producer">
    <java classname="rest.Producer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

  <!-- Runs the rest consumer -->
  <target name="rest.consumer" depends="init"
    description="--> Runs the rest sample consumer">
    <java classname="rest.Consumer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>
	
  <!-- Runs the Rest PERFS producer -->
  <target name="rest_perfs_prod_q" depends="simple_init"
    description="--> Starts the Rest PERFS producer">
    <java classname="rest.PerfProducer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
443
      <jvmarg line="-DNbClient=2 -DNbMsgPerRound=1000 -DRound=50 -DMsgSize=1000 -DMsgTransient=false -Dmps=1000" />
444
      <!-- jvmarg line="-DNbClient=1 -DNbMsgPerRound=100 -DRound=200 -DMsgSize=1000 -DMsgTransient=false -Dmps=120" / -->
445
446
447
448
449
450
451
452
453
    </java>
  </target>
	
  <!-- Runs the Rest PERFS consumer -->
  <target name="rest_perfs_cons_q" depends="simple_init"
    description="--> Starts the Rest PERFS consumer">
    <java classname="rest.PerfConsumer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
454
      <jvmarg line="-DNbClient=5 -DNbMsgPerRound=1000 -DRound=20" />
455
456
457
    </java>
  </target>

458
459
460
461
462
  <!-- **************************************************
       * Rest bridge Sample
       ************************************************** -->

  <!-- Rest Bridge server -->
afreyssin's avatar
afreyssin committed
463
464
465
466
467
468
469
470
  <target name="restbridge_server" depends="simple_init"
          description="--> Starts the rest bridge server">
    <antcall target="server">
      <param name="sid" value="1"/>
      <param name="a3.conf" value="${conf.dir}/restbridge_a3servers.xml"/>
      <param name="osgi.conf" value="${conf.dir}/config_restbridge.properties"/>      
    </antcall>
  </target>
471
    
472
  <!-- Setup the bridge server configuration -->
afreyssin's avatar
afreyssin committed
473
474
475
476
477
478
479
480
  <target name="restbridge_admin" depends="simple_init"
          description="--> Runs the rest bridge sample administration">
    <java classname="restbridge.Admin"
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>
481

afreyssin's avatar
afreyssin committed
482
  <!-- Setup the bridge configuration -->
483
484
  <target name="restbridge_adminxml" depends="simple_init"
          description="--> Runs XML administration script for rest bridge sample">
afreyssin's avatar
afreyssin committed
485
486
487
488
489
490
491
    <copy file="${src.dir}/restbridge/joramAdmin.xml" overwrite="true" todir="${run.dir}"/>
    <java classname="org.objectweb.joram.client.jms.admin.AdminModule"
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <arg line="./joramAdmin.xml"/>
    </java>
492
  </target>
493

afreyssin's avatar
afreyssin committed
494
495
496
497
498
499
  <!-- Runs the rest bridge producer -->
  <target name="restbridge_producer" depends="init"
          description="--> Runs the rest bridge sample producer">
    <java classname="restbridge.Producer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
500
      <jvmarg line="-Dqueue=queueDist"/>
afreyssin's avatar
afreyssin committed
501
502
    </java>
  </target>
503

afreyssin's avatar
afreyssin committed
504
505
506
507
508
509
	<!-- Runs the rest bridge consumer -->
  <target name="restbridge_consumer" depends="init"
          description="--> Runs the rest bridge sample consumer">
    <java classname="restbridge.Consumer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
      <jvmarg line="-Dqueue=queueAcq"/>
    </java>
  </target>
	
  <!-- Setup the bridge server configuration -->
  <target name="restbridge_perfs_admin" depends="simple_init"
          description="--> Runs the rest bridge sample administration">
    <java classname="restbridge.PerfAdmin"
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

  <!-- Runs the rest performance producer: send X messages on queue -->
  <target name="restbridge_perfs_prod_q1" depends="simple_init"
          description="-> Starts the Rest PERFS producer">
    <java classname="restbridge.PerfProducer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <jvmarg line="-Dqueue=queueDist1 -DNbMsgPerRound=10 -DRound=1000 -DasyncSend=false -DTransacted=false -DMsgSize=10000 -DMsgTransient=false -Dmps=70" />
    </java>
  </target>
    <target name="restbridge_perfs_prod_q2" depends="simple_init"
          description="-> Starts the Rest PERFS producer">
    <java classname="restbridge.PerfProducer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <jvmarg line="-Dqueue=queueDist2 -DNbMsgPerRound=10 -DRound=1000 -DasyncSend=false -DTransacted=false -DMsgSize=10000 -DMsgTransient=false -Dmps=70" />
    </java>
  </target>
	
  <!-- Runs the rest performance consumer on queue -->
  <target name="restbridge_perfs_cons_q1" depends="simple_init"
          description="-> Starts the Rest PERFS consumer">
    <java classname="restbridge.PerfConsumer" failonerror="no" fork="yes"
           dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <jvmarg line="-Dqueue=queueAcq1 -DNbMsgPerRound=1000 -DTransacted=false -DimplicitAck=false" />
    </java>
  </target>
  <target name="restbridge_perfs_cons_q2" depends="simple_init"
          description="-> Starts the Rest PERFS consumer">
    <java classname="restbridge.PerfConsumer" failonerror="no" fork="yes"
           dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <jvmarg line="-Dqueue=queueAcq2 -DNbMsgPerRound=1000 -DTransacted=false -DimplicitAck=false" />
afreyssin's avatar
afreyssin committed
557
558
559
    </java>
  </target>
 
560
561
	<!-- TODO (AF): cleans unused or duplicate targets below -->
	
562
  <!-- Runs the rest bridge receiver -->
afreyssin's avatar
afreyssin committed
563
564
565
566
567
568
569
  <target name="restbridge_receiver" depends="init"
          description="--> Runs the rest bridge sample receiver">
    <java classname="restbridge.Receiver" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>
570
  
afreyssin's avatar
afreyssin committed
571
  <!-- Runs the performance producer: send X messages on queue -->
572
      <target name="perfs_prod" depends="simple_init"
573
574
575
576
577
578
579
580
581
        description="--> Starts the PERFS producer">
        <java classname="perfs.Producer" failonerror="no" fork="yes"
              dir="${run.dir}">
          <classpath path="${project.class.path}"/>
          <jvmarg line="-DNbMsgPerRound=1000 -DRound=10 -DasyncSend=false -DTransacted=false -DMsgSize=10000 -DMsgTransient=false -Dmps=150000" />
          <arg line="queue"/>
        </java>
      </target>
  
582
  <!-- Runs the performance sample consumer on queue -->
afreyssin's avatar
afreyssin committed
583
584
585
586
587
588
589
590
591
  <target name="perfs_cons" depends="simple_init"
          description="--> Starts the PERFS consumer">
    <java classname="perfs.Consumer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <jvmarg line="-DNbMsgPerRound=1000 -DTransacted=false -DimplicitAck=false" />
      <arg line="queue"/>
    </java>
  </target>
592

afreyssin's avatar
afreyssin committed
593
  <!-- **************************************************
594
       * Classic Sample
afreyssin's avatar
afreyssin committed
595
596
       ************************************************** -->

597
598
599
600
601
602
603
604
605
606
  <!-- Setup the classic configuration -->
  <target name="test" depends="simple_init"
          description="--> ">
    <java classname="classic.test"
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

afreyssin's avatar
afreyssin committed
607
608
609
610
611
612
613
614
615
616
617
618
619
  <!-- Runs the JoramAdmin class -->
  <target name="joram_admin" depends="simple_init"
          description="--> Runs the JoramAdmin with shutdown command">
    <java classname="classic.JoramAdmin"
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <arg value="localhost"/>
      <arg value="6666"/>
      <arg value="shutdown"/>
    </java>
  </target>

620
  <!-- Setup the classic configuration -->
621
622
  <target name="classic_admin" depends="simple_init"
          description="--> Runs administration code for classic sample (centralized architecture)">
623
624
625
626
    <java classname="classic.ClassicAdmin"
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
627
      <!-- jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y" / -->
628
    </java>
joram's avatar
joram committed
629
630
  </target>

631
632
633
634
635
636
637
638
639
640
641
  <!-- Monitor the classic configuration -->
  <target name="classic_monitor" depends="simple_init"
          description="--> Runs Monitoring code for classic sample (centralized architecture)">
    <java classname="classic.Monitor"
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <!-- jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y" / -->
    </java>
  </target>

Nicolas Tachker's avatar
Nicolas Tachker committed
642
  <!-- Setup the classic configuration -->
643
644
  <target name="classic_adminxml" depends="simple_init"
          description="-->  Runs XML administration script for classic sample (centralized architecture)">
Nicolas Tachker's avatar
Nicolas Tachker committed
645
    <copy file="${src.dir}/classic/joramAdmin.xml" overwrite="true" todir="${run.dir}"/>
646
    <java classname="org.objectweb.joram.client.jms.admin.AdminModule"
Nicolas Tachker's avatar
Nicolas Tachker committed
647
648
649
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
650
      <arg line="./joramAdmin.xml"/>
Nicolas Tachker's avatar
Nicolas Tachker committed
651
652
653
    </java>
  </target>

654
655
656
657
  <!-- Runs the classic consumer client for queue -->
  <target name="consumer_queue" depends="simple_init"
    description="--> Starts a Consumer client">
    <java classname="classic.Consumer" failonerror="no" fork="yes"
afreyssin's avatar
afreyssin committed
658
          dir="${run.dir}">
joram's avatar
joram committed
659
      <classpath path="${project.class.path}"/>
660
    	<arg line="queue"/>
joram's avatar
joram committed
661
662
663
    </java>
  </target>

664
665
666
667
  <!-- Runs the classic producer client for queue -->
  <target name="producer_queue" depends="simple_init"
    description="--> Starts a Producer client">
    <java classname="classic.Producer" failonerror="no" fork="yes"
afreyssin's avatar
afreyssin committed
668
          dir="${run.dir}">
joram's avatar
joram committed
669
      <classpath path="${project.class.path}"/>
670
    	<arg line="queue"/>
joram's avatar
joram committed
671
672
673
    </java>
  </target>

674
675
676
677
  <!-- Runs the classic consumer client for topic -->
  <target name="consumer_topic" depends="simple_init"
    description="--> Starts a Consumer client">
    <java classname="classic.Consumer" failonerror="no" fork="yes"
afreyssin's avatar
afreyssin committed
678
          dir="${run.dir}">
joram's avatar
joram committed
679
      <classpath path="${project.class.path}"/>
680
    	<arg line="topic"/>
joram's avatar
joram committed
681
682
683
    </java>
  </target>

684
685
686
687
  <!-- Runs the classic producer client for topic -->
  <target name="producer_topic" depends="simple_init"
    description="--> Starts a Producer client">
    <java classname="classic.Producer" failonerror="no" fork="yes"
688
689
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
690
    	<arg line="topic"/>
691
692
    </java>
  </target>
afreyssin's avatar
afreyssin committed
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
	
  <!-- Runs the JMS2 consumer client for queue -->
  <target name="jms2_consumer_queue" depends="simple_init"
    description="--> Starts a Consumer client">
    <java classname="jms2.Consumer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <arg line="queue"/>
    </java>
  </target>

  <!-- Runs the JMS2 producer client for queue -->
  <target name="jms2_producer_queue" depends="simple_init"
    description="--> Starts a Producer client">
    <java classname="jms2.Producer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <arg line="queue"/>
    </java>
  </target>

  <!-- Runs the JMS2 consumer client for topic -->
  <target name="jms2_consumer_topic" depends="simple_init"
    description="--> Starts a Consumer client">
    <java classname="jms2.Consumer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <arg line="topic"/>
    </java>
  </target>

  <!-- Runs the JMS2 producer client for topic -->
  <target name="jms2_producer_topic" depends="simple_init"
    description="--> Starts a Producer client">
    <java classname="jms2.Producer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <arg line="topic"/>
    </java>
  </target>
733

734
735
736
737
  <!-- Runs the classic browser client -->
  <target name="browser" depends="simple_init"
    description="--> Starts a Browser client">
    <java classname="classic.Browser" failonerror="no" fork="yes"
afreyssin's avatar
afreyssin committed
738
          dir="${run.dir}">
joram's avatar
joram committed
739
740
741
742
      <classpath path="${project.class.path}"/>
    </java>
  </target>

743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
  <!-- Runs the classic consumer client for queue -->
  <target name="aconsumer" depends="simple_init"
    description="--> Starts a Consumer client">
    <java classname="classic.AConsumer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    	<arg line="queue"/>
    </java>
  </target>

  <!-- Runs the classic producer client for queue -->
  <target name="aproducer" depends="simple_init"
    description="--> Starts a Producer client">
    <java classname="classic.AProducer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    	<arg line="queue"/>
    </java>
  </target>

763
764
765
766
767
  <!-- Starts a STOMP client for testing the bridge -->
  <!-- Be careful, it needs the JASP bundle -->
  <target name="stomp" depends="simple_init"
    description="--> Starts a STOMP client for testing the bridge">
    <java classname="stomp.StompTest" failonerror="no" fork="yes"
afreyssin's avatar
afreyssin committed
768
769
770
771
772
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

773
774
775
776
777
778
  <!-- Code using old JMS 1.0 API - PTP and P/S domains -->

  <!-- Runs the classic sender client -->
  <target name="sender" depends="simple_init"
    description="--> Starts a Sender client">
    <java classname="classic.Sender" failonerror="no" fork="yes"
afreyssin's avatar
afreyssin committed
779
780
781
782
783
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

784
785
786
787
  <!-- Runs the classic receiver client -->
  <target name="receiver" depends="simple_init"
    description="--> Starts a Receiver client">
    <java classname="classic.Receiver" failonerror="no" fork="yes"
afreyssin's avatar
afreyssin committed
788
          dir="${run.dir}">
789
790
791
792
      <classpath path="${project.class.path}"/>
    </java>
  </target>

793
794
795
796
  <!-- Runs the classic subscriber client -->
  <target name="subscriber" depends="simple_init"
    description="--> Starts a subscriber client">
    <java classname="classic.Subscriber" failonerror="no" fork="yes"
afreyssin's avatar
afreyssin committed
797
          dir="${run.dir}">
798
      <classpath path="${project.class.path}"/>
afreyssin's avatar
afreyssin committed
799
800
    </java>
  </target>
801
802
803
804
805
806
807
808
809
	
  <!-- Runs the classic subscriber client -->
  <target name="waiting_subscriber" depends="simple_init"
    description="--> Starts a subscriber client, waiting for instruction to read a new message">
    <java classname="classic.WaitingSubscriber" failonerror="no" fork="no"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>
afreyssin's avatar
afreyssin committed
810

811
812
813
814
  <!-- Runs the classic durable subscriber client -->
  <target name="durable" depends="simple_init"
    description="--> Starts a durable subscriber client">
    <java classname="classic.Durable" failonerror="no" fork="yes"
afreyssin's avatar
afreyssin committed
815
816
817
818
819
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

820
821
822
  <!-- Runs the classic publisher client -->
  <target name="publisher" depends="simple_init"
    description="--> Starts a Publisher client">
afreyssin's avatar
afreyssin committed
823
824
825
    <java classname="classic.Publisher" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
826
827
828
    </java>
  </target>

829
830
831
  <!-- **************************************************
       * Distributed Sample
       ************************************************** -->
afreyssin's avatar
afreyssin committed
832

833
834
835
836
	<!-- Runs the archi administration -->
  <target name="archi_admin" depends="simple_init"
    description="--> Runs the distributed architecture administration">
    <java classname="archi.ArchiAdmin" failonerror="no" fork="yes"
afreyssin's avatar
afreyssin committed
837
          dir="${run.dir}">
joram's avatar
joram committed
838
      <classpath path="${project.class.path}"/>
839
      <!-- jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y"/ -->
joram's avatar
joram committed
840
841
842
    </java>
  </target>

843
844
845
846
847
  <!-- Runs the archi sender client -->
  <target name="archi_sender" depends="simple_init"
    description="--> Runs the distributed architecture Sender client">
    <java classname="archi.Sender" failonerror="no" fork="yes"
          dir="${run.dir}">
Nicolas Tachker's avatar
Nicolas Tachker committed
848
849
850
851
      <classpath path="${project.class.path}"/>
    </java>
  </target>

852
853
854
855
856
  <!-- Runs the archi receiver client -->
  <target name="archi_receiver" depends="simple_init"
    description="--> Runs the distributed architecture Receiver client">
    <java classname="archi.Receiver" failonerror="no" fork="yes"
          dir="${run.dir}">
Nicolas Tachker's avatar
Nicolas Tachker committed
857
858
859
860
      <classpath path="${project.class.path}"/>
    </java>
  </target>

861
862
863
864
  <!-- Runs the archi durable subscriber client -->
  <target name="archi_sub" depends="simple_init"
    description="--> Runs the distributed architecture Subscriber client">
    <java classname="archi.DSubscriber" failonerror="no" fork="yes"
Nicolas Tachker's avatar
Nicolas Tachker committed
865
866
867
868
869
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

870
871
872
873
  <!-- Runs the archi publisher client -->
  <target name="archi_pub" depends="simple_init"
    description="--> Runs the distributed architecture Publisher client">
    <java classname="archi.Publisher" failonerror="no" fork="yes"
Nicolas Tachker's avatar
Nicolas Tachker committed
874
875
876
877
878
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

afreyssin's avatar
afreyssin committed
879
880
  <!-- **************************************************
       * Mail queue and topic Samples
881
       * This sample needs joram-mom-extensions-mail bundle in server
afreyssin's avatar
afreyssin committed
882
883
       ************************************************** -->

884
885
  <!-- Setup the configuration for Mail samples-->
  <target name="mail_admin" depends="simple_init"
afreyssin's avatar
afreyssin committed
886
887
888
889
890
891
892
893
894
895
          description="--> Runs administration stuff for incoming mail">
    <copy file="${src.dir}/mail/smtp.properties" todir="${run.dir}"/>
    <copy file="${src.dir}/mail/pop.properties" todir="${run.dir}"/>
    <java classname="mail.MailAdmin"
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

896
897
  <!-- Runs the consumer client for mail sample, get mail through a queue -->
  <target name="mail_consumer" depends="simple_init"
afreyssin's avatar
afreyssin committed
898
899
900
901
902
903
904
    description="--> Starts a Consumer client for mail samples">
    <java classname="mail.Consumer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

905
906
  <!-- Runs the producer client for mail samples, send mail through a topic -->
  <target name="mail_producer" depends="simple_init"
afreyssin's avatar
afreyssin committed
907
908
909
910
911
912
913
914
    description="--> Starts a Producer client for mail samples">
    <java classname="mail.Producer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

  <!-- **************************************************
915
       * Chat Sample
afreyssin's avatar
afreyssin committed
916
917
       ************************************************** -->

918
  <!-- Setup the chat administration -->
919
  <target name="chat_admin" depends="simple_init"
fmaistre's avatar
fmaistre committed
920
          description="--> Runs chat administration">
921
922
923
    <java classname="chat.ChatAdmin"
      failonerror="no" fork="yes"
      dir="${run.dir}">
afreyssin's avatar
afreyssin committed
924
      <classpath path="${project.class.path}"/> 
925
    </java>
joram's avatar
joram committed
926
927
928
  </target>

  <!-- Runs a chat client -->
929
  <target name="chat1" depends="simple_init"
fmaistre's avatar
fmaistre committed
930
    description="--> Runs chat client as user1">
931
    <java classname="chat.SimpleChat" failonerror="no" fork="yes">
joram's avatar
joram committed
932
933
934
935
936
937
      <classpath path="${project.class.path}"/>
      <arg line="user1"/>
    </java>
  </target>

  <!-- Runs an other chat client -->
938
  <target name="chat2" depends="simple_init"
fmaistre's avatar
fmaistre committed
939
    description="--> Runs chat client as user2">
940
    <java classname="chat.SimpleChat" failonerror="no" fork="yes">
joram's avatar
joram committed
941
942
943
944
945
      <classpath path="${project.class.path}"/>
      <arg line="user2"/>
    </java>
  </target>

946
947
948
  <!-- **************************************************
       * DotCom Sample
       ************************************************** -->
joram's avatar
joram committed
949
  
950
  <!-- Setup the dotcom administration -->
951
  <target name="dotcom_admin" depends="simple_init"
fmaistre's avatar
fmaistre committed
952
          description="--> Runs dotcom administration">
afreyssin's avatar
afreyssin committed
953
      <java classname="dotcom.DotcomAdmin" 
joram's avatar
joram committed
954
955
956
957
958
959
960
          failonerror="no" fork="yes"
          dir="${run.dir}">
        <classpath path="${project.class.path}"/>
      </java>
  </target>

  <!-- Runs the dotcom servers -->
961
  <target name="webServers" depends="simple_init"
fmaistre's avatar
fmaistre committed
962
    description="--> Runs all dotcom servers">
joram's avatar
joram committed
963
    <parallel>
afreyssin's avatar
afreyssin committed
964
965
      <java classname="dotcom.BillingServer" failonerror="no" fork="yes"
          dir="${run.dir}">
joram's avatar
joram committed
966
967
        <classpath path="${project.class.path}"/>
      </java>
afreyssin's avatar
afreyssin committed
968
969
      <java classname="dotcom.InventoryServer" failonerror="no" fork="yes"
          dir="${run.dir}">
joram's avatar
joram committed
970
971
        <classpath path="${project.class.path}"/>
      </java>
afreyssin's avatar
afreyssin committed
972
973
      <java classname="dotcom.CustomerServer" failonerror="no" fork="yes"
          dir="${run.dir}">
joram's avatar
joram committed
974
975
        <classpath path="${project.class.path}"/>
      </java>
afreyssin's avatar
afreyssin committed
976
977
      <java classname="dotcom.ControlServer" failonerror="no" fork="yes"
          dir="${run.dir}">
joram's avatar
joram committed
978
979
        <classpath path="${project.class.path}"/>
      </java>
afreyssin's avatar
afreyssin committed
980
981
      <java classname="dotcom.DeliveryServer" failonerror="no" fork="yes"
          dir="${run.dir}">
joram's avatar
joram committed
982
983
984
985
986
987
        <classpath path="${project.class.path}"/>
      </java>
    </parallel>
  </target>

  <!-- Runs the dotcom client -->
988
  <target name="webClient" depends="simple_init"
fmaistre's avatar
fmaistre committed
989
    description="--> Runs dotcom client">
afreyssin's avatar
afreyssin committed
990
991
    <java classname="dotcom.WebServer" failonerror="no" fork="yes"
          dir="${run.dir}">
joram's avatar
joram committed
992
993
994
      <classpath path="${project.class.path}"/>
    </java>
  </target>
995
996
997
998
	
  <!-- **************************************************
       * Cluster Sample (Topic)
       ************************************************** -->
joram's avatar
joram committed
999

1000
  <!-- Runs the cluster topic administration -->
1001
  <target name="topic_cluster_admin" depends="simple_init"
1002
    description="--> Runs the cluster topic administration">
afreyssin's avatar
afreyssin committed
1003
1004
    <java classname="cluster.topic.ClusterAdmin" failonerror="no" fork="yes"
          dir="${run.dir}">
joram's avatar
joram committed
1005
1006
1007
1008
      <classpath path="${project.class.path}"/>
    </java>
  </target>

1009
1010
  <target name="topic_cluster_adminxml" depends="simple_init"
    description="--> Runs the cluster topic administration XML script">
Nicolas Tachker's avatar
Nicolas Tachker committed
1011
    <copy file="${src.dir}/cluster/topic/joramAdmin.xml" overwrite="true" todir="${run.dir}"/>
1012
1013
    <java classname="org.objectweb.joram.client.jms.admin.AdminModule"
          failonerror="no" fork="yes"
Nicolas Tachker's avatar
Nicolas Tachker committed
1014
1015
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
1016
      <arg line="./joramAdmin.xml"/>
1017
      <!-- jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y"/ -->
Nicolas Tachker's avatar
Nicolas Tachker committed
1018
1019
1020
    </java>
  </target>

1021
  <!-- Runs a cluster topic subscriber -->
1022
  <target name="topic_cluster_subscriber" depends="simple_init"
1023
1024
1025
    description="--> Runs a cluster topic subscriber">
    <input message="server=" addProperty="sid" validargs="-,0,1,2" defaultvalue=""/>
    <java classname="cluster.topic.Subscriber" failonerror="no" fork="yes"
afreyssin's avatar
afreyssin committed
1026
          dir="${run.dir}">
joram's avatar
joram committed
1027
      <classpath path="${project.class.path}"/>
1028
      <arg value="${sid}"/>
joram's avatar
joram committed
1029
1030
1031
    </java>
  </target>

1032
  <!-- Runs a cluster topic publisher -->
1033
  <target name="topic_cluster_publisher" depends="simple_init"
1034
1035
    description="--> Runs a cluster topic publisher">
    <input message="server=" addProperty="sid" validargs="-,0,1,2" defaultvalue=""/>
afreyssin's avatar
afreyssin committed
1036
1037
1038
    <java classname="cluster.topic.Publisher" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
1039
      <arg value="${sid}"/>
afreyssin's avatar
afreyssin committed
1040
1041
1042
    </java>
  </target>

1043
1044
1045
1046
  <!-- **************************************************
       * Cluster Sample (Queue)
       ************************************************** -->

1047
  <!-- Runs the cluster queue administration -->
1048
  <target name="queue_cluster_admin" depends="simple_init"
1049
    description="--> Runs the cluster queue administration">
afreyssin's avatar
afreyssin committed
1050
1051
1052
1053
1054
1055
    <java classname="cluster.queue.ClusterAdmin" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

1056
  <target name="queue_cluster_adminxml" depends="simple_init"
1057
    description="--> Runs the cluster queue administration xml">
Nicolas Tachker's avatar
Nicolas Tachker committed
1058
    <copy file="${src.dir}/cluster/queue/joramAdmin.xml" overwrite="true" todir="${run.dir}"/>
1059
1060
    <java classname="org.objectweb.joram.client.jms.admin.AdminModule"
          failonerror="no" fork="yes"
afreyssin's avatar
afreyssin committed
1061
1062
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
1063
1064
      <arg line="./joramAdmin.xml"/>
      <!-- jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y"/ -->
afreyssin's avatar
afreyssin committed
1065
1066
1067
    </java>
  </target>

1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
  <!-- Runs the queue cluster consumers -->
  <target name="cluster_xcons" depends="simple_init">
  	<parallel>
      <java classname="cluster.queue.XConsumer" failonerror="no" fork="yes"
            dir="${run.dir}">
        <classpath path="${project.class.path}"/>
        <jvmarg line="-Dmps=140"/>
        <arg value="0"/>
      </java>
      <java classname="cluster.queue.XConsumer" failonerror="no" fork="yes"
            dir="${run.dir}">
        <classpath path="${project.class.path}"/>
        <jvmarg line="-Dmps=60"/>
        <arg value="1"/>
      </java>
  	</parallel>
  </target>

  <!-- Runs the queue cluster producers -->
  <target name="cluster_xprod" depends="simple_init">
  	<parallel>
    	<java classname="cluster.queue.XProducer" failonerror="no" fork="yes"
     	     dir="${run.dir}">
     	 <classpath path="${project.class.path}"/>
    	  <jvmarg line="-DRound=1280 -DNbMsgPerRound=30 -Dmps=60"/>
   	   <arg line="0"/>
  	  </java>
    	<java classname="cluster.queue.XProducer" failonerror="no" fork="yes"
     	     dir="${run.dir}">
     	 <classpath path="${project.class.path}"/>
    	  <jvmarg line="-DRound=3000 -DNbMsgPerRound=30 -Dmps=140"/>
   	   <arg line="1"/>
  	  </java>
    </parallel>
  </target>


  <!-- Runs the queue cluster consumers -->
  <target name="cluster_consumers" depends="simple_init">
  	<parallel>
      <java classname="cluster.queue.Consumer" failonerror="no" fork="yes"
            dir="${run.dir}">
        <classpath path="${project.class.path}"/>
        <jvmarg line="-Dsleep=10 -DnbMsgSleep=5"/>
        <arg value="0"/>
      </java>
      <java classname="cluster.queue.Consumer" failonerror="no" fork="yes"
            dir="${run.dir}">
        <classpath path="${project.class.path}"/>
        <jvmarg line="-Dsleep=30 -DnbMsgSleep=5"/>
        <arg value="1"/>
      </java>
      <java classname="cluster.queue.Consumer" failonerror="no" fork="yes"
            dir="${run.dir}">
        <classpath path="${project.class.path}"/>
        <jvmarg line="-Dsleep=10 -DnbMsgSleep=5"/>
        <arg value="2"/>
      </java>
  	</parallel>
  </target>

  <!-- Runs the queue cluster producers -->
  <target name="cluster_producers" depends="simple_init">
  	<parallel>
    	<java classname="cluster.queue.Producer" failonerror="no" fork="yes"
     	     dir="${run.dir}">
     	 <classpath path="${project.class.path}"/>
    	  <jvmarg line="-Dsleep=30 -DnbMsgSleep=5"/>
   	   <arg line="0 50000"/>
  	  </java>
    	<java classname="cluster.queue.Producer" failonerror="no" fork="yes"
     	     dir="${run.dir}">
     	 <classpath path="${project.class.path}"/>
    	  <jvmarg line="-Dsleep=10 -DnbMsgSleep=5"/>
   	   <arg line="1 50000"/>
  	  </java>
      	<java classname="cluster.queue.Producer" failonerror="no" fork="yes"
       	     dir="${run.dir}">
       	 <classpath path="${project.class.path}"/>
      	  <jvmarg line="-Dsleep=30 -DnbMsgSleep=5"/>
     	   <arg line="2 50000"/>
    	  </java>
    </parallel>
  </target>

1153
  <!-- Runs a queue cluster consumer -->
1154
  <target name="queue_cluster_consumer" depends="simple_init">
1155
    <input message="server=" addProperty="sid" validargs="-,0,1,2"/>
afreyssin's avatar
afreyssin committed
1156
1157
1158
    <java classname="cluster.queue.Consumer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
afreyssin's avatar
afreyssin committed
1159
      <jvmarg line="-Dsleep=10 -DnbMsgSleep=1000"/>
1160
      <arg value="${sid}"/>
joram's avatar
joram committed
1161
1162
    </java>
  </target>
maistrfr's avatar
maistrfr committed
1163

1164
  <!-- Runs a queue cluster producer -->
1165
  <target name="queue_cluster_producer" depends="simple_init">
1166
    <input message="server=" addProperty="sid" validargs="-,0,1,2"/>
afreyssin's avatar
afreyssin committed
1167
1168
1169
    <java classname="cluster.queue.Producer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
afreyssin's avatar
afreyssin committed
1170
1171
      <jvmarg line="-Dsleep=500 -DnbMsgSleep=1000"/>
      <arg line="${sid} 50000"/>
afreyssin's avatar
afreyssin committed
1172
1173
1174
    </java>
  </target>

1175
1176
1177
1178
  <!-- **************************************************
       * Topic tree Sample
       ************************************************** -->
	
afreyssin's avatar
afreyssin committed
1179
  <!-- Setup topic tree configuration -->
1180
  <target name="tree_admin" depends="simple_init"
maistrfr's avatar
maistrfr committed
1181
    description="--> Runs the topic tree administration">
afreyssin's avatar
afreyssin committed
1182
1183
    <java classname="topicTree.TreeAdmin" failonerror="no" fork="yes"
          dir="${run.dir}">
maistrfr's avatar
maistrfr committed
1184
1185
1186
1187
1188
      <classpath path="${project.class.path}"/>
    </java>
  </target>

  <!-- Runs the tree consumer client -->
1189
  <target name="tree_consumer" depends="simple_init"
maistrfr's avatar
maistrfr committed
1190
    description="--> Starts a tree Consumer client">
afreyssin's avatar
afreyssin committed
1191
1192
    <java classname="topicTree.Consumer" failonerror="no" fork="yes"
          dir="${run.dir}">
maistrfr's avatar
maistrfr committed
1193
1194
1195
1196
1197
      <classpath path="${project.class.path}"/>
    </java>
  </target>

  <!-- Runs the tree producer client -->
1198
  <target name="tree_producer" depends="simple_init"
maistrfr's avatar
maistrfr committed
1199
    description="--> Starts a tree Producer client">
afreyssin's avatar
afreyssin committed
1200
1201
    <java classname="topicTree.Producer" failonerror="no" fork="yes"
          dir="${run.dir}">
maistrfr's avatar
maistrfr committed
1202
1203
1204
1205
      <classpath path="${project.class.path}"/>
    </java>
  </target>

1206
1207
1208
1209
  <!-- **************************************************
       * Dead Message Queue Sample
       ************************************************** -->

maistrfr's avatar
maistrfr committed
1210
  <!-- Setup the dead message queue configuration -->
1211
  <target name="dmq_admin" depends="simple_init"
afreyssin's avatar
afreyssin committed
1212
1213
1214
          description="--> Runs a dead message queue administration (for a centralized architecture)">
    <java classname="deadMQueue.DMQAdmin" failonerror="no" fork="yes"
          dir="${run.dir}">
maistrfr's avatar
maistrfr committed
1215
1216
      <classpath path="${project.class.path}"/>
    </java>
Nicolas Tachker's avatar
Nicolas Tachker committed
1217
1218
  </target>

1219
  <target name="dmq_adminxml" depends="simple_init"
Nicolas Tachker's avatar
Nicolas Tachker committed
1220
1221
          description="--> Runs a dead message queue administration xml (for a centralized architecture)">
    <copy file="${src.dir}/deadMQueue/joramAdmin.xml" overwrite="true" todir="${run.dir}"/>
1222
1223
    <java classname="org.objectweb.joram.client.jms.admin.AdminModule"
          failonerror="no" fork="yes"
Nicolas Tachker's avatar
Nicolas Tachker committed
1224
1225
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
1226
      <arg line="./joramAdmin.xml"/>
Nicolas Tachker's avatar
Nicolas Tachker committed
1227
    </java>
maistrfr's avatar
maistrfr committed
1228
1229
1230
  </target>

  <!-- Runs the dead message queue watcher client -->
1231
  <target name="dmq_watcher" depends="simple_init"
maistrfr's avatar
maistrfr committed
1232
    description="--> Starts a dead message queue watcher client">
afreyssin's avatar
afreyssin committed
1233
1234
    <java classname="deadMQueue.DMQWatcher" failonerror="no" fork="yes"
          dir="${run.dir}">
maistrfr's avatar
maistrfr committed
1235
1236
1237
1238
      <classpath path="${project.class.path}"/>
    </java>
  </target>

1239
1240
1241
1242
  <!-- Runs the dead message queue client -->
  <target name="dmq_client" depends="simple_init"
    description="--> Starts a dead message queue client">
    <java classname="deadMQueue.DMQClient" failonerror="no" fork="yes"
badolle fabien's avatar
badolle fabien committed
1243
1244
1245
1246
1247
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
	<!-- ***************************************************************** -->
	<!-- *                       HTTP Network                            * -->
	<!-- ***************************************************************** -->

	<!-- Setup a distributed architecture with 2 Http servers -->
  <target name="http_server0" depends="init"
          description="--> Starts a server for a distributed hhtp architecture (w/ id 0)">
    <antcall target="server">
      <param name="sid" value="0"/>
      <param name="a3.conf" value="${conf.dir}/http_a3servers.xml"/>
      <param name="osgi.conf" value="${conf.dir}/config_min.properties"/>    	
    </antcall>
  </target>
	
  <target name="http_server1" depends="init"
          description="--> Starts a server for a distributed http architecture (w/ id 1)">
    <antcall target="server">
      <param name="sid" value="1"/>
      <param name="a3.conf" value="${conf.dir}/http_a3servers.xml"/>
      <param name="osgi.conf" value="${conf.dir}/config_min.properties"/>    	
    </antcall>
  </target>
	
  <!-- Setup the classic configuration -->
  <target name="http_admin" depends="simple_init"
          description="--> Runs a clasic administration (for a distributed hhtp architecture)">
    <java classname="httpnet.HttpAdmin" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

afreyssin's avatar
afreyssin committed
1280
1281
1282
<!-- ***************************************************************** -->
<!-- *                            SSL                                * -->
<!-- ***************************************************************** -->
1283
  <target name="sslinit" depends="simple_init">
afreyssin's avatar
afreyssin committed
1284
    <property name="keystore" location="${run.dir}/joram_ks"/>
afreyssin's avatar
afreyssin committed
1285
    <property name="keystore_pass" value="jorampass"/>
afreyssin's avatar
afreyssin committed
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
  </target>

  <!-- Initializes the ssl centralized configuration -->
  <target name="sslsimple_init" depends="sslinit">
    <mkdir dir="${run.dir}"/>
    <copy file="${conf.dir}/a3config.dtd" todir="${run.dir}"/>
    <copy file="${conf.dir}/a3debug.cfg" todir="${run.dir}"/>
    <copy file="${conf.dir}/jndi.properties"
          tofile="${run.dir}/jndi.properties"/>
    <copy file="${conf.dir}/sslcentralized_a3servers.xml"
          tofile="${run.dir}/a3servers.xml"
          overwrite="true"/>
    <copy file="${conf.dir}/joram_ks" todir="${run.dir}"/>
  </target>

1301
  <!-- Start a SSL server in NullTransaction mode -->
afreyssin's avatar
afreyssin committed
1302
1303
1304
1305
1306
  <target name="sslsingle_server" depends="sslsimple_init">
    <java classname="fr.dyade.aaa.agent.AgentServer"
          failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
1307
      <jvmarg line="-Dcom.sun.management.jmxremote -Dorg.objectweb.joram.keystore=${keystore} -Dorg.objectweb.joram.keystorepass=${keystore_pass}"/>
afreyssin's avatar
afreyssin committed
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
      <arg line="0 s0"/>
    </java>
  </target>

  <!-- Setup the sslClassic configuration -->
  <target name="sslclassic_admin" depends="sslinit"
          description="--> Runs a ssl classic administration (for a centralized architecture)">
    <java classname="classic.SSLClassicAdmin"
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
1319
      <jvmarg line="-Dorg.objectweb.joram.keystore=${keystore} -Dorg.objectweb.joram.keystorepass=${keystore_pass}"/>
afreyssin's avatar
afreyssin committed
1320
1321
1322
1323
1324
1325
1326
1327
1328
    </java>
  </target>

  <!-- Runs the sslClassic sender client -->
  <target name="sslsender" depends="sslinit"
    description="--> Starts a Sender client">
    <java classname="classic.Sender" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
1329
      <jvmarg line="-Dorg.objectweb.joram.keystore=${keystore} -Dorg.objectweb.joram.keystorepass=${keystore_pass}"/>