-
Notifications
You must be signed in to change notification settings - Fork 102
/
s1as.xml
1543 lines (1315 loc) · 62.4 KB
/
s1as.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
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
292
293
294
295
296
297
298
299
300
301
302
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
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
361
362
363
364
365
366
367
368
369
370
371
372
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
405
406
407
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
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
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
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
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
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
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
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
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0"?>
<!--
Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
<project name="CTS Glassfish AppServer configuration" basedir="." default="usage">
<import file="./common.xml"/>
<import file="./deploy.xml"/>
<property name="admin.user" value="${s1as.admin.user}"/>
<property name="admin.password" value="${s1as.admin.passwd}" />
<property name="server.host" value="${s1as.admin.host}"/>
<property name="server.port" value="${s1as.admin.port}"/>
<property name="server.orb.port" value="${orb.port}"/>
<property name="cli.path" value="${s1as.admin}"/>
<property name="imqbin.loc" value="${s1as.imqbin.loc}"/>
<property name="server.domain.name" value="${s1as.domain.name}"/>
<property name="server.domain" value="${s1as.domain}"/>
<property name="server.instance" value="${s1as.server}"/>
<property name="server.config.dir" value="config"/>
<property name="server.home" value="${javaee.home}"/>
<property name="drive" value="${s1as.applicationRoot}"/>
<property name="ext.dir.prop" value="-Djava.ext.dirs="/>
<property name="start.index" value="16"/>
<property name="custom.resource.jndi.name" value="custom/dog"/>
<var name="use.derby.dbName" value="${derby.dbName}"/>
<var name="use.derby.server" value="${derby.server}"/>
<var name="use.derby.port" value="${derby.port}"/>
<var name="use.derby.user" value="${derby.user}"/>
<var name="use.derby.passwd" value="${derby.passwd}"/>
<var name="use.derby.url" value="${derby.url}"/>
<var name="use.derby.driver" value="${derby.driver}"/>
<var name="use.derby.system.home" value="${derby.system.home}"/>
<var name="use.derby.classpath" value="${derby.classpath}"/>
<var name="use.derby.classes" value="${derby.classes}"/>
<var name="use.derby.poolName" value="${derby.poolName}"/>
<var name="use.derby.dataSource" value="${derby.dataSource}"/>
<var name="use.derby.properties" value="${derby.properties}"/>
<var name="use.derby.startup.delay" value="${derby.startup.delay}"/>
<var name="use.jdbc.poolName" value="${jdbc.poolName}"/>
<var name="use.jdbc.maxpoolsize" value="${jdbc.maxpoolsize}"/>
<var name="use.jdbc.steadypoolsize" value="${jdbc.steadypoolsize}"/>
<property name="deploy.dir" value="${impl.vi.deploy.dir}/"/>
<!--
Install the EE 6.0 RI also known as GlassFish V3.
-->
<property name="v3.version" value="nightly"/>
<property name="remove.v3.bundle" value="false"/>
<target name="install.v3">
<if>
<istrue value="${remove.v3.bundle}"/>
<then>
<ant antfile="${common.bin.dir}/xml/install_sjsas.xml" target="remove.v3.bundle"/>
</then>
</if>
<if>
<equals arg1="${v3.version}" arg2="nightly"/>
<then>
<ant antfile="${common.bin.dir}/xml/install_sjsas.xml" target="install.v3.nightly"/>
</then>
<else>
<ant antfile="${common.bin.dir}/xml/install_sjsas.xml" target="install.v3.promoted"/>
</else>
</if>
</target>
<!--
For Java EE 5, PE 9.0 = GlassFish = Java EE RI. This is why the install.ri.*
targets simply invoke the install.pe.* targets.
-->
<target name="install.ri.nightly">
<antcall target="install.pe.nightly"/>
</target>
<target name="install.ri.promoted">
<antcall target="install.pe.promoted"/>
</target>
<target name="install.ri.bundle">
<antcall target="install.pe.bundle"/>
</target>
<target name="install.ri">
<antcall target="install.pe"/>
</target>
<target name="install.pe.nightly">
<property name="sjsas.platform" value="SJSAS_PE"/>
<property name="begin.done.tag" value="Sun GlassFish Enterprise Server"/>
<ant antfile="${common.bin.dir}/xml/install_sjsas.xml" target="nightly"/>
</target>
<target name="install.pe.promoted">
<property name="sjsas.platform" value="SJSAS_PE"/>
<property name="begin.done.tag" value="Sun GlassFish Enterprise Server"/>
<ant antfile="${common.bin.dir}/xml/install_sjsas.xml" target="promoted"/>
</target>
<target name="install.pe.bundle">
<property name="sjsas.platform" value="SJSAS_PE"/>
<property name="begin.done.tag" value="Sun GlassFish Enterprise Server"/>
<ant antfile="${common.bin.dir}/xml/install_sjsas.xml" target="bundle"/>
</target>
<target name="install.pe">
<property name="sjsas.platform" value="SJSAS_PE"/>
<property name="begin.done.tag" value="Sun GlassFish Enterprise Server"/>
<ant antfile="${common.bin.dir}/xml/install_sjsas.xml" target="install"/>
</target>
<target name="install.ee.nightly">
<property name="sjsas.platform" value="SJSAS_EE"/>
<property name="filter.value" value="pe"/>
<ant antfile="${common.bin.dir}/xml/install_sjsas.xml" target="nightly"/>
</target>
<target name="install.ee.promoted">
<property name="sjsas.platform" value="SJSAS_EE"/>
<property name="filter.value" value="pe"/>
<ant antfile="${common.bin.dir}/xml/install_sjsas.xml" target="promoted"/>
</target>
<target name="install.ee.bundle">
<property name="sjsas.platform" value="SJSAS_EE"/>
<property name="filter.value" value="pe"/>
<ant antfile="${common.bin.dir}/xml/install_sjsas.xml" target="bundle"/>
</target>
<target name="install.ee">
<property name="sjsas.platform" value="SJSAS_EE"/>
<property name="filter.value" value="pe"/>
<ant antfile="${common.bin.dir}/xml/install_sjsas.xml" target="install"/>
</target>
<target name="usage">
<echo message="The following ant task are available to configure Glassfish Appserver for CTS:"/>
<echo message="ant -f s1as.xml task"/>
<echo message=""/>
<echo message="The primary tasks are:"/>
<echo message=""/>
<echo message="clean.s1as (except JMS resources)" />
<echo message="cleanall.s1as" />
<echo message="config.s1as(except JMS resources)" />
<echo message="configall.s1as" />
<echo message="enable.security" />
<echo message="disable.security" />
<echo message="enable.jms" />
<echo message="disable.jms" />
<echo message="install.jdbc.drivers" />
<echo message=""/>
<echo message="Additional tasks are:"/>
<echo message=""/>
<echo message="concat.security" />
<echo message="copy.cts.jars" />
<echo message="add.cts.users" />
<echo message="drop.cts.users" />
<echo message="add.javamail.resources" />
<echo message="drop.javamail.resources" />
<echo message="add.custom.resource" />
<echo message="drop.custom.resource" />
<echo message="add.jvm.options" />
<echo message="drop.jvm.options" />
<echo message="add.jdbc.pools" />
<echo message="drop.jdbc.pools" />
<echo message="list.jdbc.pools" />
<echo message="add.jdbc.resources" />
<echo message="drop.jdbc.resources" />
<echo message="modify.jdbc.resources" />
<echo message="add.classpathsuffix" />
<echo message="drop.classpathsuffix" />
<echo message="add.ssl.client.config" />
<echo message="drop.ssl.client.config" />
<echo message="set.http.ports" />
<echo message="set.orbport" />
<echo message="enable.tx.interop" />
<echo message="disable.tx.interop" />
<echo message="delete.tx.interop" />
<echo message="enable.jacc" />
<echo message="disable.jacc" />
<echo message="enable.wss.providers" />
<echo message="disable.wss.providers" />
</target>
<!-- Configure the OS specific properties based on the OS
is being utilized.
-->
<target name="configPlatform"
depends="checkPlatform, configUnix, configWindows, convertPaths">
<!-- Check if we need to set jvm options -->
<condition property="jvm.args.set">
<not>
<equals arg1="" arg2="${s1as.jvm.options}" casesensitive="true" trim="true"/>
</not>
</condition>
<!-- Check if we need to set ext.dirs -->
<condition property="s1as.db.ext.dirs.set">
<not>
<equals arg1="" arg2="${s1as.db.ext.dirs}" casesensitive="true" trim="true"/>
</not>
</condition>
<!-- Check to see if we are using DB2 -->
<condition property="using.db2.type2">
<contains string="${use.jdbc.poolName}" substring="db2" casesensitive="false"/>
</condition>
<condition property="db2.props.set">
<and>
<isset property="using.db2.type2"/>
<isset property="s1as.db.ext.dirs.set"/>
</and>
</condition>
<!-- Check to see if we are using Oracle, will be needed in the future -->
<!--
<condition property="using.oracle.type2">
<contains arg1="${jdbc.poolName}" arg2="XXX" casesensitive="false" trim="true"/>
</condition>
-->
<!-- The datasource and properties to be used for the non-tx
database pool. See the jdbc.db property in the ts.jte for
more details.
-->
<propertycopy name="jdbc.dataSource" from="${jdbc.db}.dataSource" silent="true"/>
<propertycopy name="jdbc.properties" from="${jdbc.db}.properties" silent="true"/>
</target>
<!-- Convert the paths to dos/unix as needed -->
<target name="convertPaths" >
<translatepath escape="no" propname="s1as.asenv.loc"/>
<path id="foo3">
<pathelement location="${server.domain}" />
</path>
<pathconvert targetos="${os}" property="domain.path"
refid="foo3"
dirsep="${dir.sep}" >
</pathconvert>
</target>
<!--
clean.s1as removes all of the configuration settings required by
cts. Note this does not remove the JMS resources.
-->
<target name="clean.s1as"
depends= "drop.cts.users, drop.javamail.resources, drop.jdbc.resources, drop.jdbc.pools,
drop.jvm.options, drop.classpathsuffix, drop.certs,
drop.ssl.client.config, unconfig.jpa, delete.provider.jar, drop.custom.resource" />
<!--
cleanall.s1as removes all of the configuration settings required by
cts. Note this does not remove the JMS resources.
-->
<target name="cleanall.s1as"
depends= "clean.s1as, disable.jms" />
<!--
config.s1as configures all of the S1AS settings required by
cts. Note this does not configure the JMS and security resources.
-->
<target name="config.s1as"
depends= "start.appserver, change.applicationRoot, copy.provider.jar, config.jpa,
add.cts.users, add.javamail.resources, add.jdbc.pools,
add.jdbc.resources, drop.jvm.options, add.jvm.options, add.classpathsuffix,
set.http.ports, set.orbport, create.asadmin.bat, concat.security, add.cert,
add.custom.resource, enable.trace" />
<!--
configall.s1as configures all of the S1AS settings required by
cts.
-->
<target name="configall.s1as"
depends= "config.s1as, enable.jms" />
<!--
copy.provider.jar copies the provider jar files to the instance lib directory.
-->
<target name="copy.provider.jar">
<copy file="${ts.home}/lib/tsprovider.jar" tofile="${javaee.home}/lib/tsprovider.jar" overwrite="yes" />
</target>
<target name="delete.provider.jar">
<delete file="${javaee.home}/lib/tsprovider.jar" quiet="true"/>
</target>
<!--
add.jvm.options installs the jvm options defined in the build.properties
file.
-->
<target name="add.jvm.options" depends="configPlatform" if="jvm.args.set">
<antcall target="create-jvm-options" >
<param name="jvm.options" value="${s1as.jvm.options}"/>
</antcall>
<!-- add call to set jvm option for use by interop-csiv2 loggerServlet -->
<antcall target="create-one-jvm-option" >
<param name="jvm.options" value=" -Dri.log.file.location=${ri.log.file.location}"/>
</antcall>
</target>
<!--
drop.jvm.options removes the jvm options that have been previously set.
-->
<target name="drop.jvm.options" depends="configPlatform" if="jvm.args.set">
<antcall target="delete-jvm-options" >
<param name="jvm.options" value=" ${s1as.jvm.options.remove}"/>
</antcall>
<antcall target="delete-one-jvm-option" >
<param name="jvm.options" value=" -Dri.log.file.location=${ri.log.file.location}"/>
</antcall>
<antcall target="delete.tx.interop"/>
</target>
<!--
add.classpathsuffix adds the classpath settings as defined in
build.properties.
The path is converted to correctly reflect the OS that ant is being
executed on.
-->
<target name="add.classpathsuffix" depends="configPlatform" >
<antcall target="set" >
<param name="set.value" value=" ${server.instance}-config.java-config.classpath_suffix=${s1as.classpathsuffix}"/>
</antcall>
</target>
<!--
add.cts.users configures the users required by cts.
-->
<target name="add.cts.users" depends="configPlatform, determine.jmsServer">
<antcall target="create-file-user" >
<param name="userpassword" value="j2ee"/>
<param name="usergroups" value="staff:mgr:asadmin"/>
<param name="userName" value="j2ee"/>
</antcall>
<antcall target="create-file-user" >
<param name="userpassword" value="javajoe"/>
<param name="usergroups" value="guest"/>
<param name="userName" value="javajoe"/>
</antcall>
<antcall target="create-file-user" >
<param name="userpassword" value="j2ee_vi"/>
<param name="usergroups" value="staff"/>
<param name="userName" value="j2ee_vi"/>
</antcall>
<!--
There is no MQ in the web bundle so skip adding the JMS users unless
we are running against a full EE impl.
-->
<if>
<contains string="${javaee.level}" substring="full"/>
<then>
<antcall target="create-jms-user" >
<param name="jmsServer" value="${jmsServer}"/>
<param name="userName" value="j2ee"/>
<param name="userPassword" value="j2ee"/>
<param name="userGroup" value="admin"/>
</antcall>
<antcall target="create-jms-user" >
<param name="jmsServer" value="${jmsServer}"/>
<param name="userName" value="javajoe"/>
<param name="userPassword" value="javajoe"/>
<param name="userGroup" value="admin"/>
</antcall>
</then>
<else>
<echo>******************************************</echo>
<echo>WEB PROFILE in use, JMS Users NOT Created.</echo>
<echo>******************************************</echo>
</else>
</if>
</target>
<!--
drop.cts.users removes the users required by cts.
-->
<target name="drop.cts.users" depends="configPlatform,determine.jmsServer">
<antcall target="delete-file-user" >
<param name="userName" value="j2ee"/>
</antcall>
<antcall target="delete-file-user" >
<param name="userName" value="javajoe"/>
</antcall>
<antcall target="delete-file-user" >
<param name="userName" value="j2ee_vi"/>
</antcall>
<if>
<contains string="${javaee.level}" substring="full"/>
<then>
<antcall target="delete-jms-user" >
<param name="jmsServer" value="${jmsServer}"/>
<param name="userName" value="j2ee"/>
<param name="userPassword" value="j2ee"/>
<param name="userGroup" value="admin"/>
</antcall>
<antcall target="delete-jms-user" >
<param name="jmsServer" value="${jmsServer}"/>
<param name="userName" value="javajoe"/>
<param name="userPassword" value="javajoe"/>
<param name="userGroup" value="admin"/>
</antcall>
</then>
<else>
<echo>******************************************</echo>
<echo>WEB PROFILE in use, JMS Users NOT Deleted.</echo>
<echo>******************************************</echo>
</else>
</if>
</target>
<!--
add.jdbc.pools configures the connection pools defined in the
build.properties files.
-->
<target name="add.jdbc.pools" depends="configPlatform" if="create.jdbc.pools.prop">
<antcall target="create-jdbc-connection-pool" >
<param name="restype" value="javax.sql.DataSource"/>
<param name="datasourceclassname" value="${use.derby.dataSource}"/>
<param name="pool.properties" value="${use.derby.properties}"/>
<param name="poolName" value="${use.derby.poolName}"/>
</antcall>
<antcall target="create-jdbc-connection-pool" >
<param name="restype" value="javax.sql.DataSource"/>
<param name="datasourceclassname" value="${derbyEmbedded.dataSource}"/>
<param name="pool.properties" value="${derbyEmbedded.properties}"/>
<param name="poolName" value="${derbyEmbedded.poolName}"/>
</antcall>
<antcall target="create-jdbc-connection-pool" >
<param name="restype" value="javax.sql.DataSource"/>
<param name="datasourceclassname" value="${pointbase.dataSource}"/>
<param name="pool.properties" value="${pointbase.properties}"/>
<param name="poolName" value="${pointbase.poolName}"/>
</antcall>
<antcall target="create-jdbc-connection-pool" >
<param name="restype" value="javax.sql.XADataSource"/>
<param name="datasourceclassname" value="org.apache.derby.jdbc.EmbeddedXADataSource"/>
<param name="pool.properties" value="${derbyEmbedded.properties}"/>
<param name="poolName" value="${timer.poolName}"/>
</antcall>
<antcall target="create-jdbc-connection-pool" >
<param name="restype" value="javax.sql.DataSource"/>
<param name="datasourceclassname" value="${mssqlserver.dataSource}"/>
<param name="pool.properties" value="${mssqlserver.properties}"/>
<param name="poolName" value="${mssqlserver.poolName}"/>
</antcall>
<antcall target="create-jdbc-connection-pool" >
<param name="restype" value="javax.sql.DataSource"/>
<param name="datasourceclassname" value="${mssqlserverDD.dataSource}"/>
<param name="pool.properties" value="${mssqlserverDD.properties}"/>
<param name="poolName" value="${mssqlserverDD.poolName}"/>
</antcall>
<antcall target="create-jdbc-connection-pool" >
<param name="restype" value="javax.sql.DataSource"/>
<param name="datasourceclassname" value="${mssqlserverSun.dataSource}"/>
<param name="pool.properties" value="${mssqlserverSun.properties}"/>
<param name="poolName" value="${mssqlserverSun.poolName}"/>
</antcall>
<antcall target="create-jdbc-connection-pool" >
<param name="restype" value="javax.sql.DataSource"/>
<param name="datasourceclassname" value="${mssqlserverInet.dataSource}"/>
<param name="pool.properties" value="${mssqlserverInet.properties}"/>
<param name="poolName" value="${mssqlserverInet.poolName}"/>
</antcall>
<antcall target="create-jdbc-connection-pool" >
<param name="restype" value="javax.sql.DataSource"/>
<param name="datasourceclassname" value="${oracleDD.dataSource}"/>
<param name="pool.properties" value="${oracleDD.properties}"/>
<param name="poolName" value="${oracleDD.poolName}"/>
</antcall>
<antcall target="create-jdbc-connection-pool" >
<param name="restype" value="javax.sql.DataSource"/>
<param name="datasourceclassname" value="${oracleSun.dataSource}"/>
<param name="pool.properties" value="${oracleSun.properties}"/>
<param name="poolName" value="${oracleSun.poolName}"/>
</antcall>
<antcall target="create-jdbc-connection-pool" >
<param name="restype" value="javax.sql.DataSource"/>
<param name="datasourceclassname" value="${oracle.dataSource}"/>
<param name="pool.properties" value="${oracle.properties}"/>
<param name="poolName" value="${oracle.poolName}"/>
</antcall>
<antcall target="create-jdbc-connection-pool" >
<param name="restype" value="javax.sql.DataSource"/>
<param name="datasourceclassname" value="${oracleOCI.dataSource}"/>
<param name="pool.properties" value="${oracleOCI.properties}"/>
<param name="poolName" value="${oracleOCI.poolName}"/>
</antcall>
<antcall target="create-jdbc-connection-pool" >
<param name="restype" value="javax.sql.DataSource"/>
<param name="datasourceclassname" value="${oracleInet.dataSource}"/>
<param name="pool.properties" value="${oracleInet.properties}"/>
<param name="poolName" value="${oracleInet.poolName}"/>
</antcall>
<antcall target="create-jdbc-connection-pool" >
<param name="restype" value="javax.sql.DataSource"/>
<param name="datasourceclassname" value="${sybase.dataSource}"/>
<param name="pool.properties" value="${sybase.properties}"/>
<param name="poolName" value="${sybase.poolName}"/>
</antcall>
<antcall target="create-jdbc-connection-pool" >
<param name="restype" value="javax.sql.DataSource"/>
<param name="datasourceclassname" value="${sybaseInet.dataSource}"/>
<param name="pool.properties" value="${sybaseInet.properties}"/>
<param name="poolName" value="${sybaseInet.poolName}"/>
</antcall>
<antcall target="create-jdbc-connection-pool" >
<param name="restype" value="javax.sql.DataSource"/>
<param name="datasourceclassname" value="${sybaseDD.dataSource}"/>
<param name="pool.properties" value="${sybaseDD.properties}"/>
<param name="poolName" value="${sybaseDD.poolName}"/>
</antcall>
<antcall target="create-jdbc-connection-pool" >
<param name="restype" value="javax.sql.DataSource"/>
<param name="datasourceclassname" value="${sybaseSun.dataSource}"/>
<param name="pool.properties" value="${sybaseSun.properties}"/>
<param name="poolName" value="${sybaseSun.poolName}"/>
</antcall>
<antcall target="create-jdbc-connection-pool" >
<param name="restype" value="javax.sql.DataSource"/>
<param name="datasourceclassname" value="${db2.dataSource}"/>
<param name="pool.properties" value="${db2.properties}"/>
<param name="poolName" value="${db2.poolName}"/>
</antcall>
<antcall target="create-jdbc-connection-pool" >
<param name="restype" value="javax.sql.DataSource"/>
<param name="datasourceclassname" value="${db2DD.dataSource}"/>
<param name="pool.properties" value="${db2DD.properties}"/>
<param name="poolName" value="${db2DD.poolName}"/>
</antcall>
<antcall target="create-jdbc-connection-pool" >
<param name="restype" value="javax.sql.DataSource"/>
<param name="datasourceclassname" value="${db2Sun.dataSource}"/>
<param name="pool.properties" value="${db2Sun.properties}"/>
<param name="poolName" value="${db2Sun.poolName}"/>
</antcall>
<antcall target="create-jdbc-connection-pool" >
<param name="restype" value="javax.sql.DataSource"/>
<param name="datasourceclassname" value="${mysql.dataSource}"/>
<param name="pool.properties" value="${mysql.properties}"/>
<param name="poolName" value="${mysql.poolName}"/>
</antcall>
<antcall target="create-jdbc-connection-pool" >
<param name="restype" value="javax.sql.DataSource"/>
<param name="datasourceclassname" value="${postgresql.dataSource}"/>
<param name="pool.properties" value="${postgresql.properties}"/>
<param name="poolName" value="${postgresql.poolName}"/>
</antcall>
</target>
<!--
drop.jdbc.pools remove the connection pools defined in the
build.properties files.
-->
<target name="drop.jdbc.pools" depends="configPlatform" if="create.jdbc.pools.prop">
<antcall target="delete-jdbc-connection-pool" >
<param name="poolName" value="${use.derby.poolName}"/>
</antcall>
<antcall target="delete-jdbc-connection-pool" >
<param name="poolName" value="${derbyEmbedded.poolName}"/>
</antcall>
<antcall target="delete-jdbc-connection-pool" >
<param name="poolName" value="${pointbase.poolName}"/>
</antcall>
<antcall target="delete-jdbc-connection-pool" >
<param name="poolName" value="${timer.poolName}"/>
</antcall>
<antcall target="delete-jdbc-connection-pool" >
<param name="poolName" value="${mssqlserver.poolName}"/>
</antcall>
<antcall target="delete-jdbc-connection-pool" >
<param name="poolName" value="${mssqlserverDD.poolName}"/>
</antcall>
<antcall target="delete-jdbc-connection-pool" >
<param name="poolName" value="${mssqlserverSun.poolName}"/>
</antcall>
<antcall target="delete-jdbc-connection-pool" >
<param name="poolName" value="${mssqlserverInet.poolName}"/>
</antcall>
<antcall target="delete-jdbc-connection-pool" >
<param name="poolName" value="${oracle.poolName}"/>
</antcall>
<antcall target="delete-jdbc-connection-pool" >
<param name="poolName" value="${oracleOCI.poolName}"/>
</antcall>
<antcall target="delete-jdbc-connection-pool" >
<param name="poolName" value="${oracleDD.poolName}"/>
</antcall>
<antcall target="delete-jdbc-connection-pool" >
<param name="poolName" value="${oracleSun.poolName}"/>
</antcall>
<antcall target="delete-jdbc-connection-pool" >
<param name="poolName" value="${oracleInet.poolName}"/>
</antcall>
<antcall target="delete-jdbc-connection-pool" >
<param name="poolName" value="${sybase.poolName}"/>
</antcall>
<antcall target="delete-jdbc-connection-pool" >
<param name="poolName" value="${sybaseInet.poolName}"/>
</antcall>
<antcall target="delete-jdbc-connection-pool" >
<param name="poolName" value="${sybaseDD.poolName}"/>
</antcall>
<antcall target="delete-jdbc-connection-pool" >
<param name="poolName" value="${sybaseSun.poolName}"/>
</antcall>
<antcall target="delete-jdbc-connection-pool" >
<param name="poolName" value="${db2.poolName}"/>
</antcall>
<antcall target="delete-jdbc-connection-pool" >
<param name="poolName" value="${db2DD.poolName}"/>
</antcall>
<antcall target="delete-jdbc-connection-pool" >
<param name="poolName" value="${db2Sun.poolName}"/>
</antcall>
<antcall target="delete-jdbc-connection-pool" >
<param name="poolName" value="${mysql.poolName}"/>
</antcall>
<antcall target="delete-jdbc-connection-pool" >
<param name="poolName" value="${postgresql.poolName}"/>
</antcall>
</target>
<!--
Change the JNDI entries for jdo/pmf, jdbc/DB1, jdbc/DBTimer
Modify the classpathsuffix to include the new jdbc drivers.
-->
<target name= "modify.jdbc.resources" depends="drop.jdbc.resources, add.jdbc.resources, restart.server"/>
<target name="copy.db2.jars" if="using.db2.type2">
<copy todir="${server.domain}/lib/ext" overwrite="yes">
<fileset dir="${jdbc.lib.class.path}">
<include name="db2*"/>
</fileset>
</copy>
</target>
<target name="delete.db2.jars" unless="using.db2.type2">
<delete quiet="true">
<fileset dir="${server.domain}/lib/ext">
<include name="db2*"/>
</fileset>
</delete>
</target>
<!--
add.jdbc.resources configures the JNDI resources used by cts to
the correct connection pool as defined in the build.properties file.
Also set the maxPoolSize and steadyPoolSize for the connection pool
under test.
-->
<target name="add.jdbc.resources" depends="configPlatform" if="create.jdbc.pools.prop">
<antcall target="copy.db2.jars"/>
<antcall target="delete.db2.jars"/>
<!--
Since the get command is broken (issue tracker bug id 7151) we need to use
our regular expression hack to set the extension directories while the server
is down. If we modify the domain.xml disk file while the server is up, the
server process can overwrite our changes to the domain.xml file. See
set.ext.dirs target below to see the hack. We now call these two targets from
javaee_vi.xml's config.vi target before the server is started. Seems to do
the trick. This code can be reverted once they fix bug ID 7151. We can go
back to using the get command.
<antcall target="reset.ext.dirs"/>
<antcall target="add.ext.dirs"/>
-->
<antcall target="set" >
<param name="set.value" value=" ${resources.dottedname.prefix}.jdbc-connection-pool.${use.jdbc.poolName}.max_pool_size=${use.jdbc.maxpoolsize}"/>
</antcall>
<antcall target="set" >
<param name="set.value" value=" ${resources.dottedname.prefix}.jdbc-connection-pool.${use.jdbc.poolName}.steady_pool_size=${use.jdbc.steadypoolsize}"/>
</antcall>
<antcall target="create-jdbc-resource" >
<param name="connectionpoolid" value="${use.jdbc.poolName}"/>
<param name="jndiName" value="jdbc/DB1"/>
</antcall>
<antcall target="create-jdbc-resource" >
<param name="connectionpoolid" value="${timer.poolName}"/>
<param name="jndiName" value="jdbc/DBTimer"/>
</antcall>
<!-- Start XA Specific Resources. -->
<antcall target="create-jdbc-resource" >
<param name="connectionpoolid" value="cts-derby-XA-pool"/>
<param name="jndiName" value="eis/JDBCwhitebox-xa"/>
</antcall>
<antcall target="create-jdbc-resource" >
<param name="connectionpoolid" value="cts-derby-XA-pool"/>
<param name="jndiName" value="eis/JDBCwhitebox-tx"/>
</antcall>
<antcall target="create-jdbc-resource" >
<param name="connectionpoolid" value="cts-derby-XA-pool"/>
<param name="jndiName" value="eis/JDBCwhitebox-notx"/>
</antcall>
<!-- End XA Specific Resources. -->
<antcall target="create-jdbc-connection-pool" >
<param name="restype" value="javax.sql.DataSource"/>
<param name="datasourceclassname" value="${jdbc.dataSource}"/>
<param name="pool.properties" value="${jdbc.properties}"/>
<param name="poolName" value="${use.jdbc.poolName}_no_tx"/>
</antcall>
<antcall target="set" >
<param name="set.value" value=" ${resources.dottedname.prefix}.jdbc-connection-pool.${use.jdbc.poolName}_no_tx.non-transactional-connections=true"/>
</antcall>
<antcall target="create-jdbc-resource" >
<param name="connectionpoolid" value="${use.jdbc.poolName}_no_tx"/>
<param name="jndiName" value="jdbc/DB_no_tx"/>
</antcall>
<antcall target="create-jdbc-resource" >
<param name="connectionpoolid" value="${use.jdbc.poolName}"/>
<param name="jndiName" value="jdbc/securityAPIDB"/>
</antcall>
</target>
<!--
drop.jdbc.resources removes the JNDI resources used by cts.
-->
<target name="drop.jdbc.resources" depends="configPlatform" if="create.jdbc.pools.prop">
<antcall target="delete-jdbc-resource" >
<param name="jndiName" value="jdbc/orderDB"/>
</antcall>
<antcall target="delete-jdbc-resource" >
<param name="jndiName" value="jdbc/DB1"/>
</antcall>
<antcall target="delete-jdbc-resource" >
<param name="jndiName" value="jdbc/DBTimer"/>
</antcall>
<antcall target="delete-jdbc-resource" >
<param name="jndiName" value="jdbc/DB_no_tx"/>
</antcall>
<antcall target="delete-jdbc-connection-pool" >
<param name="poolName" value="${use.jdbc.poolName}_no_tx"/>
</antcall>
<!-- Start XA Specific Resources. -->
<antcall target="delete-jdbc-resource" >
<param name="jndiName" value="eis/JDBCwhitebox-xa"/>
</antcall>
<antcall target="delete-jdbc-resource" >
<param name="jndiName" value="eis/JDBCwhitebox-tx"/>
</antcall>
<antcall target="delete-jdbc-resource" >
<param name="jndiName" value="eis/JDBCwhitebox-notx"/>
</antcall>
<!-- End XA Specific Resources. -->
</target>
<target name="config.connector" >
<if>
<and>
<available file="${ts.home}/src/com/sun/ts/tests/common/connector"/>
</and>
<then>
<ant antfile="${common.bin.dir}/xml/impl/glassfish/connector.xml" target="config.connector"/>
</then>
</if>
</target>
<!--
Convenience method to support configuring connector rars, resources, and pools.
-->
<target name="setup.all.rars.and.pools" depends="configPlatform">
<ant antfile="${common.bin.dir}/xml/impl/glassfish/connector.xml" target="setup.all.rars.and.pools">
</ant>
</target>
<target name="undeploy.all.rars.and.pools" >
<ant antfile="${common.bin.dir}/xml/impl/glassfish/connector.xml" target="undeploy.all.rars.and.pools">
</ant>
</target>
<!--
Enable all of the required JMS resources used by cts.
-->
<target name="enable.jms" depends="configPlatform ">
<if>
<contains string="${javaee.level}" substring="full"/>
<then>
<echo message="****server.instance: ${server.instance}"/>
<if>
<equals arg1="${test.sa.jmsra}" arg2="true"/>
<then>
<ant antfile="${bin.dir}/xml/impl/glassfish/jmsra.xml" target="doJMSRAConfig"/>
</then>
<else>
<exec executable="${exec.asadmin}" >
<env key="AS_ADMIN_USER" value="${s1as.admin.user}"/>
<env key="AS_ADMIN_PASSWORDFILE" value="${password.file}"/>
<env key="AS_ADMIN_HOST" value="${s1as.admin.host}"/>
<env key="AS_ADMIN_PORT" value="${s1as.admin.port}"/>
<env key="AS_ADMIN_TARGET" value="${server.instance}"/>
<arg line="${exec.asadmin.part2}" />
<arg line=" --echo=true "/>
<arg line="multimode " />
<arg line="--file ${bin.dir}/xml/impl/glassfish/templates/create.jms.template " />
</exec>
</else>
</if>
</then>
<else>
<echo>**********************************************</echo>
<echo>WEB PROFILE in use, JMS Resources NOT Created.</echo>
<echo>**********************************************</echo>
</else>
</if>
</target>
<!--
Disable all of the required JMS resources used by cts.
-->
<target name="disable.jms" depends="configPlatform">
<if>
<contains string="${javaee.level}" substring="full"/>
<then>
<echo message="****server.instance: ${server.instance}"/>
<if>
<equals arg1="${test.sa.jmsra}" arg2="true"/>
<then>
<ant antfile="${bin.dir}/xml/impl/glassfish/jmsra.xml" target="doJMSRAUnconfig"/>
</then>
<else>
<exec executable="${exec.asadmin}" >
<env key="AS_ADMIN_USER" value="${s1as.admin.user}"/>
<env key="AS_ADMIN_PASSWORDFILE" value="${password.file}"/>
<env key="AS_ADMIN_HOST" value="${s1as.admin.host}"/>
<env key="AS_ADMIN_PORT" value="${s1as.admin.port}"/>
<env key="AS_ADMIN_TARGET" value="${server.instance}"/>
<arg line="${exec.asadmin.part2}" />
<arg line=" --echo=true "/>
<arg line="multimode " />
<arg line="--file ${bin.dir}/xml/impl/glassfish/templates/delete.jms.template " />
</exec>
</else>
</if>
</then>
<else>
<echo>**********************************************</echo>
<echo>WEB PROFILE in use, JMS Resources NOT Deleted.</echo>
<echo>**********************************************</echo>
</else>
</if>
</target>
<!--
add.javamail.resources configures the javamail JNDI resources
required by cts.
-->
<target name="add.javamail.resources" depends="configPlatform">
<antcall target="create-mail-resource" >
<param name="jndiName" value=" mail/Session"/>
</antcall>
</target>
<target name="populateMailbox">
<ant antfile="${src.dir}/com/sun/ts/tests/javamail/ee/util/build.xml" target="populateMailbox"/>
</target>
<!--
drop.javamail.resources removes the javamail JNDI resources
required by cts.
-->
<target name="drop.javamail.resources" depends="configPlatform">
<antcall target="delete-mail-resource" >
<param name="jndiName" value=" mail/Session"/>
</antcall>
</target>
<target name="clearMailbox">
<ant antfile="${src.dir}/com/sun/ts/tests/javamail/ee/util/build.xml" target="clearMailbox"/>
</target>
<!--
Remove the custom resources
-->
<target name="drop.custom.resource" depends="configPlatform">
<exec executable="${exec.asadmin}" >
<arg line="${exec.asadmin.part2}" />
<arg line=" --user ${admin.user}"/>
<arg line=" --passwordfile ${password.file}"/>
<arg line=" --host ${server.host}"/>
<arg line=" --port ${server.port}"/>
<arg line=" delete-custom-resource"/>
<arg line=" ${custom.resource.jndi.name}"/>
</exec>
</target>
<!--
Add the custom resources
-->
<target name="add.custom.resource" depends="configPlatform">
<exec executable="${exec.asadmin}" >
<arg line="${exec.asadmin.part2}" />
<arg line=" --user ${admin.user}"/>
<arg line=" --passwordfile ${password.file}"/>
<arg line=" --host ${server.host}"/>
<arg line=" --port ${server.port}"/>
<arg line=" create-custom-resource"/>
<arg line=" --restype com.sun.ts.lib.deliverable.cts.resource.Dog"/>
<arg line=" --factoryclass com.sun.ts.lib.deliverable.cts.resource.DogFactory"/>
<arg line=" ${custom.resource.jndi.name}"/>
</exec>
</target>
<!--
Set the ORB port by calling the correct target based on whether
we are configuring PE or EE.
-->
<target name="set.orbport">
<antcall target="set.orbport.pe"/>
<antcall target="set.orbport.ee"/>
</target>
<!--
Set the HTTP ports by calling the correct target based on whether
we are configuring PE or EE.
-->
<target name="set.http.ports">
<antcall target="set.http.ports.pe"/>