build.xml 79 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">
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 14 15
    <property name="bundle.dir" location="${ship.dir}/bundle" />
  	
  	<!-- 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"/>
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
	
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 49
    <delete quiet="true" dir="${obj.dir}"/>
  </target>

  <!-- Compiles -->
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"
55
           source="1.7" target="1.7" debug="true"
joram's avatar
joram committed
56 57 58
           deprecation="${deprecation}"
           optimize="${optimize}"
           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"/-->
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"/ -->
77
  </target>
joram's avatar
joram committed
78 79

  <target name="simple_init" depends="init">
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}"/>
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 136 137 138 139 140 141 142 143 144 145 146
    </antcall>
  </target>

  <!-- 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>
147

148
  <!-- Start a single server in NullTransaction mode with all extension bundles -->
149
  <target name="extended_server" depends="init"
150
          description="--> Starts a single server in non-persistent mode">
151
    <antcall target="server">
152
      <param name="sid" value="0"/>
153 154
      <param name="a3.conf" value="${conf.dir}/centralized_a3servers.xml"/>
      <param name="osgi.conf" value="${conf.dir}/config_all.properties"/>    	
155 156
    </antcall>
  </target>
joram's avatar
joram committed
157

158 159 160 161 162 163 164 165 166 167
  <!-- 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>

168 169 170 171 172 173 174 175 176
  <!-- 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
177 178 179 180 181 182 183 184 185 186
  
  <!-- 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>
187

188 189 190
  <!-- 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
191 192
    <antcall target="server">
      <param name="sid" value="0"/>
193
      <param name="a3.conf" value="${conf.dir}/distributed_a3servers.xml"/>
194 195
      <param name="osgi.conf" value="${conf.dir}/config_min.properties"/>   
    	<param name="monit.conf" value="${conf.dir}/MonitoringConfig_0.xml"/>
196 197 198 199 200 201 202 203
    </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"/>
204 205
      <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
206 207
    </antcall>
  </target>
208 209 210 211 212 213
	
  <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"/>
214 215
      <param name="osgi.conf" value="${conf.dir}/config_min.properties"/>  
    	<param name="monit.conf" value="${conf.dir}/MonitoringConfig_2.xml"/>
216 217 218 219 220 221 222 223 224 225 226
    </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
227

228 229 230 231 232 233
  <!-- 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}">
234
      <jvmarg line="-Dcom.sun.management.jmxremote"/>
235 236 237
      <classpath path="${project.class.path}"/>
    </java>
  </target>
Nicolas Tachker's avatar
Nicolas Tachker committed
238

239
  <!-- **************************************************
240
       * Bridge tests based on real client configuration #1
241 242 243 244
       ************************************************** -->
  
  <!-- EF Bridge server -->
  <target name="efbridge_server" depends="simple_init"
245
          description="--> Starts the EF bridge server">
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291
    <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>
292

293 294 295 296 297 298 299 300 301
  <!-- **************************************************
       * Bridge tests based on real client configuration #2
       ************************************************** -->
  
  <!-- SEIP Bridge server, /!\ the configuration file is inherited from efbridge -->
  <target name="seipbridge_server" depends="simple_init"
          description="--> Starts the SEIP bridge server">
    <antcall target="server">
      <param name="sid" value="1"/>
302
      <param name="a3.conf" value="${conf.dir}/seipbridge_a3servers.xml"/>
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334
      <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>

335 336 337
  <!-- **************************************************
       * Rest samples
       ************************************************** -->
338
  
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372
  <!-- 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}"/>
373 374
5      <jvmarg line="-DNbClient=2 -DNbMsgPerRound=1000 -DRound=50 -DMsgSize=1000 -DMsgTransient=false -Dmps=1000" />
      <!-- jvmarg line="-DNbClient=1 -DNbMsgPerRound=100 -DRound=200 -DMsgSize=1000 -DMsgTransient=false -Dmps=120" / -->
375 376 377 378 379 380 381 382 383
    </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}"/>
384
      <jvmarg line="-DNbClient=5 -DNbMsgPerRound=1000 -DRound=20" />
385 386 387
    </java>
  </target>

388 389 390 391 392
  <!-- **************************************************
       * Rest bridge Sample
       ************************************************** -->

  <!-- Rest Bridge server -->
afreyssin's avatar
afreyssin committed
393 394 395 396 397 398 399 400
  <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>
401
    
402
  <!-- Setup the bridge server configuration -->
afreyssin's avatar
afreyssin committed
403 404 405 406 407 408 409 410
  <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>
411

afreyssin's avatar
afreyssin committed
412
  <!-- Setup the bridge configuration -->
413 414
  <target name="restbridge_adminxml" depends="simple_init"
          description="--> Runs XML administration script for rest bridge sample">
afreyssin's avatar
afreyssin committed
415 416 417 418 419 420 421
    <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>
422
  </target>
423

afreyssin's avatar
afreyssin committed
424 425 426 427 428 429
  <!-- 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}"/>
430
      <jvmarg line="-Dqueue=queueDist"/>
afreyssin's avatar
afreyssin committed
431 432
    </java>
  </target>
433

afreyssin's avatar
afreyssin committed
434 435 436 437 438 439
	<!-- 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}"/>
440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486
      <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
487 488 489
    </java>
  </target>
 
490 491
	<!-- TODO (AF): cleans unused or duplicate targets below -->
	
492
  <!-- Runs the rest bridge receiver -->
afreyssin's avatar
afreyssin committed
493 494 495 496 497 498 499
  <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>
500
  
afreyssin's avatar
afreyssin committed
501
  <!-- Runs the performance producer: send X messages on queue -->
502
      <target name="perfs_prod" depends="simple_init"
503 504 505 506 507 508 509 510 511
        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>
  
512
  <!-- Runs the performance sample consumer on queue -->
afreyssin's avatar
afreyssin committed
513 514 515 516 517 518 519 520 521
  <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>
522

523
  <!-- **************************************************
524
       * Classic Sample
525 526
       ************************************************** -->

527 528 529 530 531 532 533 534 535 536
  <!-- 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>

537 538 539 540 541 542 543 544 545 546 547 548 549
  <!-- 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>

550
  <!-- Setup the classic configuration -->
551 552
  <target name="classic_admin" depends="simple_init"
          description="--> Runs administration code for classic sample (centralized architecture)">
553 554 555 556
    <java classname="classic.ClassicAdmin"
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
557
      <!-- jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y" / -->
558
    </java>
joram's avatar
joram committed
559 560
  </target>

Nicolas Tachker's avatar
Nicolas Tachker committed
561
  <!-- Setup the classic configuration -->
562 563
  <target name="classic_adminxml" depends="simple_init"
          description="-->  Runs XML administration script for classic sample (centralized architecture)">
Nicolas Tachker's avatar
Nicolas Tachker committed
564
    <copy file="${src.dir}/classic/joramAdmin.xml" overwrite="true" todir="${run.dir}"/>
565
    <java classname="org.objectweb.joram.client.jms.admin.AdminModule"
Nicolas Tachker's avatar
Nicolas Tachker committed
566 567 568
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
569
      <arg line="./joramAdmin.xml"/>
Nicolas Tachker's avatar
Nicolas Tachker committed
570 571 572
    </java>
  </target>

573 574 575 576
  <!-- 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"
577
          dir="${run.dir}">
joram's avatar
joram committed
578
      <classpath path="${project.class.path}"/>
579
    	<arg line="queue"/>
joram's avatar
joram committed
580 581 582
    </java>
  </target>

583 584 585 586
  <!-- 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"
587
          dir="${run.dir}">
joram's avatar
joram committed
588
      <classpath path="${project.class.path}"/>
589
    	<arg line="queue"/>
joram's avatar
joram committed
590 591 592
    </java>
  </target>

593 594 595 596
  <!-- 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"
597
          dir="${run.dir}">
joram's avatar
joram committed
598
      <classpath path="${project.class.path}"/>
599
    	<arg line="topic"/>
joram's avatar
joram committed
600 601 602
    </java>
  </target>

603 604 605 606
  <!-- 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"
607 608
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
609
    	<arg line="topic"/>
610 611
    </java>
  </target>
612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651
	
  <!-- 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>
652

653 654 655 656
  <!-- Runs the classic browser client -->
  <target name="browser" depends="simple_init"
    description="--> Starts a Browser client">
    <java classname="classic.Browser" failonerror="no" fork="yes"
657
          dir="${run.dir}">
joram's avatar
joram committed
658 659 660 661
      <classpath path="${project.class.path}"/>
    </java>
  </target>

662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681
  <!-- 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>

682 683 684 685 686
  <!-- 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
687 688 689 690 691
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

692 693 694 695 696 697
  <!-- 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
698 699 700 701 702
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

703 704 705 706
  <!-- Runs the classic receiver client -->
  <target name="receiver" depends="simple_init"
    description="--> Starts a Receiver client">
    <java classname="classic.Receiver" failonerror="no" fork="yes"
707
          dir="${run.dir}">
708 709 710 711
      <classpath path="${project.class.path}"/>
    </java>
  </target>

712 713 714 715
  <!-- Runs the classic subscriber client -->
  <target name="subscriber" depends="simple_init"
    description="--> Starts a subscriber client">
    <java classname="classic.Subscriber" failonerror="no" fork="yes"
716
          dir="${run.dir}">
717
      <classpath path="${project.class.path}"/>
afreyssin's avatar
afreyssin committed
718 719
    </java>
  </target>
720 721 722 723 724 725 726 727 728
	
  <!-- 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
729

730 731 732 733
  <!-- 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
734 735 736 737 738
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

739 740 741
  <!-- Runs the classic publisher client -->
  <target name="publisher" depends="simple_init"
    description="--> Starts a Publisher client">
afreyssin's avatar
afreyssin committed
742 743 744
    <java classname="classic.Publisher" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
745 746 747
    </java>
  </target>

748 749 750
  <!-- **************************************************
       * Distributed Sample
       ************************************************** -->
afreyssin's avatar
afreyssin committed
751

752 753 754 755
	<!-- 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"
756
          dir="${run.dir}">
joram's avatar
joram committed
757
      <classpath path="${project.class.path}"/>
758
      <!-- jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y"/ -->
joram's avatar
joram committed
759 760 761
    </java>
  </target>

762 763 764 765 766
  <!-- 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
767 768 769 770
      <classpath path="${project.class.path}"/>
    </java>
  </target>

771 772 773 774 775
  <!-- 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
776 777 778 779
      <classpath path="${project.class.path}"/>
    </java>
  </target>

780 781 782 783
  <!-- 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
784 785 786 787 788
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

789 790 791 792
  <!-- 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
793 794 795 796 797
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

798 799
  <!-- **************************************************
       * Mail queue and topic Samples
800
       * This sample needs joram-mom-extensions-mail bundle in server
801 802
       ************************************************** -->

803 804
  <!-- Setup the configuration for Mail samples-->
  <target name="mail_admin" depends="simple_init"
805 806 807 808 809 810 811 812 813 814
          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>

815 816
  <!-- Runs the consumer client for mail sample, get mail through a queue -->
  <target name="mail_consumer" depends="simple_init"
817 818 819 820 821 822 823
    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>

824 825
  <!-- Runs the producer client for mail samples, send mail through a topic -->
  <target name="mail_producer" depends="simple_init"
826 827 828 829 830 831 832 833
    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>

  <!-- **************************************************
834
       * Chat Sample
835 836
       ************************************************** -->

837
  <!-- Setup the chat administration -->
838
  <target name="chat_admin" depends="simple_init"
fmaistre's avatar
fmaistre committed
839
          description="--> Runs chat administration">
840 841 842
    <java classname="chat.ChatAdmin"
      failonerror="no" fork="yes"
      dir="${run.dir}">
843
      <classpath path="${project.class.path}"/> 
844
    </java>
joram's avatar
joram committed
845 846 847
  </target>

  <!-- Runs a chat client -->
848
  <target name="chat1" depends="simple_init"
fmaistre's avatar
fmaistre committed
849
    description="--> Runs chat client as user1">
850
    <java classname="chat.SimpleChat" failonerror="no" fork="yes">
joram's avatar
joram committed
851 852 853 854 855 856
      <classpath path="${project.class.path}"/>
      <arg line="user1"/>
    </java>
  </target>

  <!-- Runs an other chat client -->
857
  <target name="chat2" depends="simple_init"
fmaistre's avatar
fmaistre committed
858
    description="--> Runs chat client as user2">
859
    <java classname="chat.SimpleChat" failonerror="no" fork="yes">
joram's avatar
joram committed
860 861 862 863 864
      <classpath path="${project.class.path}"/>
      <arg line="user2"/>
    </java>
  </target>

865 866 867
  <!-- **************************************************
       * DotCom Sample
       ************************************************** -->
joram's avatar
joram committed
868
  
869
  <!-- Setup the dotcom administration -->
870
  <target name="dotcom_admin" depends="simple_init"
fmaistre's avatar
fmaistre committed
871
          description="--> Runs dotcom administration">
872
      <java classname="dotcom.DotcomAdmin" 
joram's avatar
joram committed
873 874 875 876 877 878 879
          failonerror="no" fork="yes"
          dir="${run.dir}">
        <classpath path="${project.class.path}"/>
      </java>
  </target>

  <!-- Runs the dotcom servers -->
880
  <target name="webServers" depends="simple_init"
fmaistre's avatar
fmaistre committed
881
    description="--> Runs all dotcom servers">
joram's avatar
joram committed
882
    <parallel>
883 884
      <java classname="dotcom.BillingServer" failonerror="no" fork="yes"
          dir="${run.dir}">
joram's avatar
joram committed
885 886
        <classpath path="${project.class.path}"/>
      </java>
887 888
      <java classname="dotcom.InventoryServer" failonerror="no" fork="yes"
          dir="${run.dir}">
joram's avatar
joram committed
889 890
        <classpath path="${project.class.path}"/>
      </java>
891 892
      <java classname="dotcom.CustomerServer" failonerror="no" fork="yes"
          dir="${run.dir}">
joram's avatar
joram committed
893 894
        <classpath path="${project.class.path}"/>
      </java>
895 896
      <java classname="dotcom.ControlServer" failonerror="no" fork="yes"
          dir="${run.dir}">
joram's avatar
joram committed
897 898
        <classpath path="${project.class.path}"/>
      </java>
899 900
      <java classname="dotcom.DeliveryServer" failonerror="no" fork="yes"
          dir="${run.dir}">
joram's avatar
joram committed
901 902 903 904 905 906
        <classpath path="${project.class.path}"/>
      </java>
    </parallel>
  </target>

  <!-- Runs the dotcom client -->
907
  <target name="webClient" depends="simple_init"
fmaistre's avatar
fmaistre committed
908
    description="--> Runs dotcom client">
909 910
    <java classname="dotcom.WebServer" failonerror="no" fork="yes"
          dir="${run.dir}">
joram's avatar
joram committed
911 912 913
      <classpath path="${project.class.path}"/>
    </java>
  </target>
914 915 916 917
	
  <!-- **************************************************
       * Cluster Sample (Topic)
       ************************************************** -->
joram's avatar
joram committed
918

919
  <!-- Runs the cluster topic administration -->
920
  <target name="topic_cluster_admin" depends="simple_init"
921
    description="--> Runs the cluster topic administration">
922 923
    <java classname="cluster.topic.ClusterAdmin" failonerror="no" fork="yes"
          dir="${run.dir}">
joram's avatar
joram committed
924 925 926 927
      <classpath path="${project.class.path}"/>
    </java>
  </target>

928 929
  <target name="topic_cluster_adminxml" depends="simple_init"
    description="--> Runs the cluster topic administration XML script">
Nicolas Tachker's avatar
Nicolas Tachker committed
930
    <copy file="${src.dir}/cluster/topic/joramAdmin.xml" overwrite="true" todir="${run.dir}"/>
931 932
    <java classname="org.objectweb.joram.client.jms.admin.AdminModule"
          failonerror="no" fork="yes"
Nicolas Tachker's avatar
Nicolas Tachker committed
933 934
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
935
      <arg line="./joramAdmin.xml"/>
936
      <!-- jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y"/ -->
Nicolas Tachker's avatar
Nicolas Tachker committed
937 938 939
    </java>
  </target>

940
  <!-- Runs a cluster topic subscriber -->
941
  <target name="topic_cluster_subscriber" depends="simple_init"
942 943 944
    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"
945
          dir="${run.dir}">
joram's avatar
joram committed
946
      <classpath path="${project.class.path}"/>
947
      <arg value="${sid}"/>
joram's avatar
joram committed
948 949 950
    </java>
  </target>

951
  <!-- Runs a cluster topic publisher -->
952
  <target name="topic_cluster_publisher" depends="simple_init"
953 954
    description="--> Runs a cluster topic publisher">
    <input message="server=" addProperty="sid" validargs="-,0,1,2" defaultvalue=""/>
955 956 957
    <java classname="cluster.topic.Publisher" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
958
      <arg value="${sid}"/>
959 960 961
    </java>
  </target>

962 963 964 965
  <!-- **************************************************
       * Cluster Sample (Queue)
       ************************************************** -->

966
  <!-- Runs the cluster queue administration -->
967
  <target name="queue_cluster_admin" depends="simple_init"
968
    description="--> Runs the cluster queue administration">
969 970 971 972 973 974
    <java classname="cluster.queue.ClusterAdmin" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

975
  <target name="queue_cluster_adminxml" depends="simple_init"
976
    description="--> Runs the cluster queue administration xml">
Nicolas Tachker's avatar
Nicolas Tachker committed
977
    <copy file="${src.dir}/cluster/queue/joramAdmin.xml" overwrite="true" todir="${run.dir}"/>
978 979
    <java classname="org.objectweb.joram.client.jms.admin.AdminModule"
          failonerror="no" fork="yes"
980 981
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
982 983
      <arg line="./joramAdmin.xml"/>
      <!-- jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y"/ -->
984 985 986
    </java>
  </target>

987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071
  <!-- 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>

1072
  <!-- Runs a queue cluster consumer -->
1073
  <target name="queue_cluster_consumer" depends="simple_init">
1074
    <input message="server=" addProperty="sid" validargs="-,0,1,2"/>
1075 1076 1077
    <java classname="cluster.queue.Consumer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
afreyssin's avatar
afreyssin committed
1078
      <jvmarg line="-Dsleep=10 -DnbMsgSleep=1000"/>
1079
      <arg value="${sid}"/>
joram's avatar
joram committed
1080 1081
    </java>
  </target>
1082

1083
  <!-- Runs a queue cluster producer -->
1084
  <target name="queue_cluster_producer" depends="simple_init">
1085
    <input message="server=" addProperty="sid" validargs="-,0,1,2"/>
1086 1087 1088
    <java classname="cluster.queue.Producer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
afreyssin's avatar
afreyssin committed
1089 1090
      <jvmarg line="-Dsleep=500 -DnbMsgSleep=1000"/>
      <arg line="${sid} 50000"/>
1091 1092 1093
    </java>
  </target>

1094 1095 1096 1097
  <!-- **************************************************
       * Topic tree Sample
       ************************************************** -->
	
1098
  <!-- Setup topic tree configuration -->
1099
  <target name="tree_admin" depends="simple_init"
1100
    description="--> Runs the topic tree administration">
1101 1102
    <java classname="topicTree.TreeAdmin" failonerror="no" fork="yes"
          dir="${run.dir}">
1103 1104 1105 1106 1107
      <classpath path="${project.class.path}"/>
    </java>
  </target>

  <!-- Runs the tree consumer client -->
1108
  <target name="tree_consumer" depends="simple_init"
1109
    description="--> Starts a tree Consumer client">
1110 1111
    <java classname="topicTree.Consumer" failonerror="no" fork="yes"
          dir="${run.dir}">
1112 1113 1114 1115 1116
      <classpath path="${project.class.path}"/>
    </java>
  </target>

  <!-- Runs the tree producer client -->
1117
  <target name="tree_producer" depends="simple_init"
1118
    description="--> Starts a tree Producer client">
1119 1120
    <java classname="topicTree.Producer" failonerror="no" fork="yes"
          dir="${run.dir}">
1121 1122 1123 1124
      <classpath path="${project.class.path}"/>
    </java>
  </target>

1125 1126 1127 1128
  <!-- **************************************************
       * Dead Message Queue Sample
       ************************************************** -->

1129
  <!-- Setup the dead message queue configuration -->
1130
  <target name="dmq_admin" depends="simple_init"
1131 1132 1133
          description="--> Runs a dead message queue administration (for a centralized architecture)">
    <java classname="deadMQueue.DMQAdmin" failonerror="no" fork="yes"
          dir="${run.dir}">
1134 1135
      <classpath path="${project.class.path}"/>
    </java>
Nicolas Tachker's avatar
Nicolas Tachker committed
1136 1137
  </target>

1138
  <target name="dmq_adminxml" depends="simple_init"
Nicolas Tachker's avatar
Nicolas Tachker committed
1139 1140
          description="--> Runs a dead message queue administration xml (for a centralized architecture)">
    <copy file="${src.dir}/deadMQueue/joramAdmin.xml" overwrite="true" todir="${run.dir}"/>
1141 1142
    <java classname="org.objectweb.joram.client.jms.admin.AdminModule"
          failonerror="no" fork="yes"
Nicolas Tachker's avatar
Nicolas Tachker committed
1143 1144
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
1145
      <arg line="./joramAdmin.xml"/>
Nicolas Tachker's avatar
Nicolas Tachker committed
1146
    </java>
1147 1148 1149
  </target>

  <!-- Runs the dead message queue watcher client -->
1150
  <target name="dmq_watcher" depends="simple_init"
1151
    description="--> Starts a dead message queue watcher client">
1152 1153
    <java classname="deadMQueue.DMQWatcher" failonerror="no" fork="yes"
          dir="${run.dir}">
1154 1155 1156 1157
      <classpath path="${project.class.path}"/>
    </java>
  </target>

1158 1159 1160 1161
  <!-- 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"
1162 1163 1164 1165 1166
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198
	<!-- ***************************************************************** -->
	<!-- *                       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
1199 1200 1201
<!-- ***************************************************************** -->
<!-- *                            SSL                                * -->
<!-- ***************************************************************** -->
1202
  <target name="sslinit" depends="simple_init">
afreyssin's avatar
afreyssin committed
1203
    <property name="keystore" location="${run.dir}/joram_ks"/>
1204
    <property name="keystore_pass" value="jorampass"/>
afreyssin's avatar
afreyssin committed
1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219
  </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>

1220
  <!-- Start a SSL server in NullTransaction mode -->
afreyssin's avatar
afreyssin committed
1221 1222 1223 1224 1225
  <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}"/>
1226
      <jvmarg line="-Dcom.sun.management.jmxremote -Dorg.objectweb.joram.keystore=${keystore} -Dorg.objectweb.joram.keystorepass=${keystore_pass}"/>
afreyssin's avatar
afreyssin committed
1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237
      <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}"/>
1238
      <jvmarg line="-Dorg.objectweb.joram.keystore=${keystore} -Dorg.objectweb.joram.keystorepass=${keystore_pass}"/>
afreyssin's avatar
afreyssin committed
1239 1240 1241 1242 1243 1244 1245 1246 1247
    </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}"/>
1248
      <jvmarg line="-Dorg.objectweb.joram.keystore=${keystore} -Dorg.objectweb.joram.keystorepass=${keystore_pass}"/>
afreyssin's avatar
afreyssin committed
1249 1250 1251 1252 1253 1254 1255 1256 1257
    </java>
  </target>

  <!-- Runs the sslClassic receiver client -->
  <target name="sslreceiver" depends="sslinit"
    description="--> Starts a Receiver client">
    <java classname="classic.Receiver" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
1258
      <jvmarg line="-Dorg.objectweb.joram.keystore=${keystore} -Dorg.objectweb.joram.keystorepass=${keystore_pass}"/>
afreyssin's avatar
afreyssin committed
1259 1260 1261 1262 1263 1264 1265 1266 1267
    </java>
  </target>

  <!-- Runs the sslClassic subscriber client -->
  <target name="sslsubscriber" depends="sslinit"
    description="--> Starts a Subscriber client">
    <java classname="classic.Subscriber" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
1268
      <jvmarg line="-Dorg.objectweb.joram.keystore=${keystore} -Dorg.objectweb.joram.keystorepass=${keystore_pass}"/>
afreyssin's avatar
afreyssin committed
1269 1270 1271 1272 1273 1274 1275 1276 1277
    </java>
  </target>

  <!-- Runs the sslClassic publisher client -->
  <target name="sslpublisher" depends="sslinit"
    description="--> Starts a Publisher client">
    <java classname="classic.Publisher" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
1278
      <jvmarg line="-Dorg.objectweb.joram.keystore=${keystore} -Dorg.objectweb.joram.keystorepass=${keystore_pass}"/>
afreyssin's avatar
afreyssin committed
1279 1280 1281 1282 1283 1284 1285 1286 1287
    </java>
  </target>

  <!-- Runs the sslClassic consumer client -->
  <target name="sslconsumer" depends="sslinit"
    description="--> Starts a Consumer client">
    <java classname="classic.Consumer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
1288
      <jvmarg line="-Dorg.objectweb.joram.keystore=${keystore} -Dorg.objectweb.joram.keystorepass=${keystore_pass}"/>
afreyssin's avatar
afreyssin committed
1289 1290 1291 1292 1293 1294 1295 1296 1297
    </java>
  </target>

  <!-- Runs the sslClassic producer client -->
  <target name="sslproducer" depends="sslinit"
    description="--> Starts a Producer client">
    <java classname="classic.Producer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
1298
      <jvmarg line="-Dorg.objectweb.joram.keystore=${keystore} -Dorg.objectweb.joram.keystorepass=${keystore_pass}"/>
afreyssin's avatar
afreyssin committed
1299 1300 1301 1302 1303 1304 1305 1306 1307
    </java>
  </target>

  <!-- Runs the sslClassic browser client -->
  <target name="sslbrowser" depends="sslinit"
    description="--> Starts a Browser client">
    <java classname="classic.Browser" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
1308
      <jvmarg line="-Dorg.objectweb.joram.keystore=${keystore} -Dorg.objectweb.joram.keystorepass=${keystore_pass}"/>
afreyssin's avatar
afreyssin committed
1309 1310 1311
    </java>
  </target>

1312 1313 1314 1315 1316 1317 1318 1319
  <!-- ***************************************************************** -->
  <!-- *                            BRIDGE                             * -->
  <!-- ***************************************************************** -->

  <!-- BRIDGE TESTS -->
	
  <!-- Initializes the bridge configuration -->
  <target name="bridge_init" depends="init">
Nicolas Tachker's avatar
Nicolas Tachker committed
1320
    <mkdir dir="${run.dir}"/>
1321 1322 1323 1324
    <copy file="${conf.dir}/a3config.dtd" todir="${run.dir}"/>
    <copy file="${conf.dir}/a3debug.cfg" todir="${run.dir}"/>
    <copy file="${conf.dir}/bridge_a3servers.xml"
          tofile="${run.dir}/a3servers.xml"
Nicolas Tachker's avatar
Nicolas Tachker committed
1325 1326 1327
          overwrite="true"/>
  </target>

1328 1329 1330 1331
  <!-- Start the bridge server -->
  <target name="bridge_server" depends="init"
          description="--> Starts the bridge server">
    <copy file="${conf.dir}/jndi.properties" todir="${run.dir}"/>
1332 1333
    <antcall target="server">
      <param name="sid" value="1"/>
1334 1335
      <param name="a3.conf" value="${conf.dir}/bridge_a3servers.xml"/>
      <param name="osgi.conf" value="${conf.dir}/config_bridge.properties"/>    	
Nicolas Tachker's avatar
Nicolas Tachker committed
1336 1337
    </antcall>
  </target>
1338 1339 1340 1341 1342 1343 1344 1345
	
  <!-- Runs the bridge administration -->
  <target name="bridge_admin" depends="init"
    description="--> Runs the BRIDGE sample administration">
    <java classname="bridge.BridgeAdmin" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
Nicolas Tachker's avatar
Nicolas Tachker committed
1346 1347
  </target>

1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359
  <!-- Setup the bridge configuration -->
  <target name="bridge_adminxml" depends="simple_init"
          description="-->  Runs XML administration script for bridge sample">
    <copy file="${src.dir}/bridge/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>

1360
  <!-- Runs the bridge producer -->
1361 1362 1363
  <target name="bridge_producer" depends="init"
    description="--> Runs the BRIDGE sample producer">
    <java classname="bridge.BridgeProducer" failonerror="no" fork="yes"
Nicolas Tachker's avatar
Nicolas Tachker committed
1364 1365 1366 1367 1368
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

1369 1370 1371 1372
  <!-- Runs the bridge consumer -->
  <target name="bridge_consumer" depends="init"
    description="--> Runs the BRIDGE sample consumer">
    <java classname="bridge.BridgeConsumer" failonerror="no" fork="yes"
Nicolas Tachker's avatar
Nicolas Tachker committed
1373 1374 1375 1376
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>
1377 1378 1379 1380
  
  <!-- **************************************************
       * JCA sample
       ************************************************** -->
1381 1382 1383 1384 1385 1386 1387 1388

 <target name="jca" depends="init"
    description="--> Runs the JCA connector">
    <java classname="connector.Connector" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>
1389 1390 1391 1392
  
  <!-- **************************************************
       * Monitoring sample
       ************************************************** -->
1393
	
1394
  <!-- Setup the monitoring configuration -->
1395
  <target name="monitoring_admin" depends="simple_init"
1396 1397 1398 1399 1400 1401 1402
          description="--> Runs administration stuff for monitoring sample">
    <java classname="monitoring.MonitoringAdmin"
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>
1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415
	
  <!-- Setup the classic configuration -->
  <target name="monitoring_adminxml" depends="simple_init"
          description="-->  Runs XML administration script for monitoring sample">
    <copy file="${src.dir}/monitoring/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>

1416
  <!-- Runs the monitoring -->
1417
  <target name="monitoring_monitor" depends="simple_init"
1418 1419 1420 1421 1422
    description="--> Starts a monitoring client">
    <java classname="monitoring.Monitor" failonerror="no" fork="yes" dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>
1423

afreyssin's avatar
afreyssin committed
1424 1425
  
  <!-- Runs the monitoring -->
1426
  <target name="monitoring_diagnose" depends="simple_init"
afreyssin's avatar
afreyssin committed
1427 1428 1429 1430 1431 1432
    description="--> Starts a monitoring client">
    <java classname="monitoring.Diagnose" failonerror="no" fork="yes" dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

Nicolas Tachker's avatar
Nicolas Tachker committed
1433 1434 1435
  <!-- **************************************************
       * Collector sample
       ************************************************** -->
1436 1437 1438

	<!-- Setup the collector configuration -->
  <target name="collector_admin" depends="simple_init"
Nicolas Tachker's avatar
Nicolas Tachker committed
1439 1440 1441 1442 1443 1444 1445
          description="--> Runs administration stuff for collector sample">
    <java classname="collector.CollectorAdmin"
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>
1446 1447 1448 1449 1450 1451 1452 1453
	
  <!-- Setup the classic configuration -->
  <target name="collector_adminxml" depends="simple_init"
          description="-->  Runs XML administration script for collector sample">
    <copy file="${src.dir}/collector/joramAdmin.xml" overwrite="true" todir="${run.dir}"/>
    <java classname="org.objectweb.joram.client.jms.admin.AdminModule"
      failonerror="no" fork="yes"
      dir="${run.dir}">
Nicolas Tachker's avatar
Nicolas Tachker committed
1454
      <classpath path="${project.class.path}"/>
1455
      <arg line="./joramAdmin.xml"/>
Nicolas Tachker's avatar
Nicolas Tachker committed
1456 1457
    </java>
  </target>
1458 1459 1460 1461 1462
	
  <!-- Runs the trigger client -->
  <target name="collector_trigger" depends="simple_init"
    description="--> Starts a collector trigger client">
    <java classname="collector.Trigger" failonerror="no" fork="yes" dir="${run.dir}">
Nicolas Tachker's avatar
Nicolas Tachker committed
1463 1464 1465
      <classpath path="${project.class.path}"/>
    </java>
  </target>
1466
  
Nicolas Tachker's avatar
Nicolas Tachker committed
1467 1468 1469
  <!-- **************************************************
       * FTP sample
       ************************************************** -->
1470
	
Nicolas Tachker's avatar
Nicolas Tachker committed
1471
  <!-- Setup the FTP configuration -->
1472
  <target name="ftp_admin" depends="simple_init"
Nicolas Tachker's avatar
Nicolas Tachker committed
1473 1474 1475 1476 1477 1478 1479 1480 1481 1482
          description="--> Runs administration stuff for FTP sample">
    <java classname="ftp.FtpAdmin"
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <arg line="anonymous anonymous"/>
    </java>
  </target>
  
  <!-- Runs the producer client -->
1483
  <target name="ftp_producer" depends="simple_init"
Nicolas Tachker's avatar
Nicolas Tachker committed
1484 1485 1486 1487 1488 1489 1490 1491
    description="--> Starts a FTP Producer client">
    <java classname="ftp.Producer" failonerror="no" fork="yes" dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <arg line="ftp.kernel.org welcome.msg"/>
    </java>
  </target>

  <!-- Runs the consumer client -->
1492
  <target name="ftp_receiver" depends="simple_init"
Nicolas Tachker's avatar
Nicolas Tachker committed
1493 1494 1495 1496 1497
    description="--> Starts a FTP Receiver client">
    <java classname="ftp.Receiver" failonerror="no" fork="yes" dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>
1498 1499 1500 1501 1502 1503 1504 1505 1506
	
  
  <!-- **************************************************
       * JAAS sample
       ************************************************** -->

  <!-- Initializes the jaas configuration -->
  <target name="jaas_init" depends="init">
    <mkdir dir="${run.dir}"/>
afreyssin's avatar
afreyssin committed
1507 1508 1509 1510
    <mkdir dir="${run.dir}/server0"/>
    <copy file="${conf.dir}/config.properties" tofile="${run.dir}/server0/config.properties"/>
    <copy file="${conf.dir}/a3config.dtd" todir="${run.dir}/server0"/>
    <copy file="${conf.dir}/a3debug.cfg" todir="${run.dir}/server0"/>
1511
    <copy file="${conf.dir}/jndi.properties"
afreyssin's avatar
afreyssin committed
1512
          tofile="${run.dir}/server0/jndi.properties"
1513 1514
          overwrite="true"/>
    <copy file="${conf.dir}/jaas_a3servers.xml"
afreyssin's avatar
afreyssin committed
1515
          tofile="${run.dir}/server0/a3servers.xml"
1516 1517
          overwrite="true"/>
    <copy file="${src.dir}/jaas/jaas.config"
afreyssin's avatar
afreyssin committed
1518
          tofile="${run.dir}/server0/jaas.config"
1519 1520
          overwrite="true"/>
    <copy file="${src.dir}/jaas/keystore"
afreyssin's avatar
afreyssin committed
1521
          tofile="${run.dir}/server0/keystore"
1522 1523
          overwrite="true"/>
    <copy file="${src.dir}/jaas/carol.properties"
afreyssin's avatar
afreyssin committed
1524
          tofile="${run.dir}/server0/carol.properties"
1525 1526 1527 1528 1529 1530
          overwrite="true"/>
  </target>

  <!-- Start a jaas server -->
  <target name="jaas_server" depends="jaas_init"
          description="--> Starts a JAAS server.">
afreyssin's avatar
afreyssin committed
1531 1532 1533 1534 1535 1536 1537
    <java classname="org.apache.felix.main.Main"
          failonerror="no" fork="yes"
          dir="${run.dir}/server0">
      <classpath path="${felix.class.path}"/>
      <jvmarg line="-Dfelix.config.properties=file:config.properties -Dfr.dyade.aaa.agent.AgentServer.id=0 -Dcom.sun.management.jmxremote"/>
      <!-- jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y"/ -->
    </java>
1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584
  </target>

  <!-- Setup the classic configuration -->
  <target name="jaas_admin" depends="init"
          description="--> Runs a jaas administration">
    <java classname="jaas.ClassicAdmin"
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <jvmarg line="-Djava.security.auth.login.config=${run.dir}/jaas.config -Djava.naming.factory.initial=org.objectweb.carol.jndi.spi.MultiOrbInitialContextFactory" />
    </java>
  </target>

  <!-- Setup the classic configuration -->
  <target name="jaas_adminxml" depends="init"
          description="--> Runs a jaas administration XML">
    <copy file="${src.dir}/jaas/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"/>
      <jvmarg line="-Djava.security.auth.login.config=${run.dir}/jaas.config -Djava.naming.factory.initial=org.objectweb.carol.jndi.spi.MultiOrbInitialContextFactory" />
    </java>
  </target>

  <!-- Runs the classic sender client -->
  <target name="jaas_sender" depends="init"
    description="--> Starts a jaas Sender client">
    <java classname="jaas.Sender" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <jvmarg line="-Djava.security.auth.login.config=${run.dir}/jaas.config -Djava.naming.factory.initial=org.objectweb.carol.jndi.spi.MultiOrbInitialContextFactory" />
    </java>
  </target>

  <!-- Runs the classic receiver client -->
  <target name="jaas_receiver" depends="init"
    description="--> Starts a jaas Receiver client">
    <java classname="jaas.Receiver" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <jvmarg line="-Djava.security.auth.login.config=${run.dir}/jaas.config -Djava.naming.factory.initial=org.objectweb.carol.jndi.spi.MultiOrbInitialContextFactory" />
    </java>
  </target>

  <!-- **************************************************
1585
       * Performance Sample
1586 1587
       ************************************************** -->

1588
  <!-- Runs the performance sample administration code -->
1589 1590 1591 1592 1593 1594 1595
  <target name="perfs_admin" depends="simple_init"
    description="--> Starts the PERFS admin">
    <java classname="perfs.PerfsAdmin" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>
1596

1597 1598 1599 1600 1601 1602
  <!-- Runs the performance sample producer: send 50.000 transient messages on queue -->
  <target name="perfs_prod_q1" depends="simple_init"
    description="--> Starts the PERFS producer">
    <java classname="perfs.Producer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
1603
      <jvmarg line="-DRound=50 -DasyncSend=true -DMsgSize=500 -DMsgTransient=true -Dmps=150000" />
1604 1605 1606 1607 1608 1609 1610 1611 1612 1613
      <arg line="queue"/>
    </java>
  </target>
	
  <!-- Runs the performance sample producer: send 50.000 persistent messages on queue -->
  <target name="perfs_prod_q2" depends="simple_init"
    description="--> Starts the PERFS producer">
    <java classname="perfs.Producer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
1614
      <jvmarg line="-DRound=50 -DMsgSize=500 -DMsgTransient=false" />
1615 1616 1617
      <arg line="queue"/>
    </java>
  </target>
1618

1619 1620 1621 1622
  <!-- Runs the performance sample consumer on queue -->
  <target name="perfs_cons_q" depends="simple_init"
    description="--> Starts the PERFS consumer">
    <java classname="perfs.Consumer" failonerror="no" fork="yes"
1623 1624
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
1625
      <jvmarg line=" -DTransacted=false" />
1626
      <arg line="queue"/>
1627 1628 1629
    </java>
  </target>

afreyssin's avatar
afreyssin committed
1630