Project

General

Profile

client_appcds.patch

Teodor Gorghe, 05/11/2026 07:25 AM

Download (9.63 KB)

View differences:

new/build.xml 2026-05-11 10:47:51 +0000
610 610
         <fileset dir="ddl" />
611 611
      </copy>
612 612
   </target>
613

  
614
   <target name="deploy.appcds" depends="deploy.prepare, clean.appcds"
615
           description="Generate the list of classes to include in the AppCDS archive." >
616
      <!-- Server AppCDS -->
617
      
618
      <!-- Client AppCDS -->
619
      <tempfile
620
         property="appcds.tmpfile.client.base"
621
         destDir="${java.io.tmpdir}"
622
         prefix="appcds_"
623
         suffix=".lst"
624
         deleteonexit="true"
625
      />
626
      <tempfile
627
         property="appcds.tmpfile.client.runtime.base"
628
         destDir="${java.io.tmpdir}"
629
         prefix="appcds_"
630
         suffix=".lst"
631
         deleteonexit="true"
632
      />
633

  
634
      <java
635
         classname="com.goldencode.util.LstExporter"
636
         fork="true"
637
         failonerror="true"
638
         dir="${deploy.home}/lib" >
639
         <classpath>
640
            <fileset dir="${deploy.home}/lib" includes="p2j.jar"/>
641
         </classpath>
642
         <arg value="p2j.jar"/>
643
         <arg value="com.goldencode.p2j.main.ClientDriver"/>
644
         <arg value="com.goldencode.p2j.ui.client"/>
645
         <arg value="-com.goldencode.p2j.persist"/>
646
         <arg value="-com.goldencode.p2j.main.StandardServer"/>
647
         <arg value="!com.goldencode.p2j.util"/>
648
         <arg value="-o"/>
649
         <arg value="${appcds.tmpfile.client.base}"/>
650
      </java>
651

  
652
      <java
653
         classname="com.goldencode.p2j.main.ClientDriver"
654
         fork="true"
655
         failonerror="false"
656
         dir="${java.io.tmpdir}" >
657
         <classpath>
658
            <fileset dir="${deploy.home}/lib" includes="p2j.jar"/>
659
         </classpath>
660
         <sysproperty key="java.library.path" value="${deploy.home}/lib"/>
661
         <jvmarg value="-XX:DumpLoadedClassList=${appcds.tmpfile.client.runtime.base}"/>
662
      </java>
663

  
664
      <mkdir dir="${deploy.home}/client/appcds" />
665

  
666
      <!-- Concatenate the client base and runtime class lists -->
667
      <concat destfile="${deploy.home}/client/appcds/appcds.lst" fixlastline="yes">
668
         <fileset file="${appcds.tmpfile.client.base}"/>
669
         <fileset file="${appcds.tmpfile.client.runtime.base}"/>
670
      </concat>
671

  
672
      <!-- Build JSA archive for local use -->
673
      <java
674
         classname="com.goldencode.p2j.main.ClientDriver"
675
         fork="true"
676
         failonerror="true"
677
         dir="${deploy.home}/client" >
678
         <classpath>
679
            <fileset dir="${deploy.home}/lib" includes="p2j.jar"/>
680
         </classpath>
681
         <sysproperty key="java.library.path" value="${deploy.home}/lib"/>
682
         <jvmarg value="-Xshare:dump"/>
683
         <jvmarg value="-XX:SharedClassListFile=appcds/appcds.lst"/>
684
         <jvmarg value="-XX:SharedArchiveFile=appcds/appcds.jsa"/>
685
         <jvmarg value="-Xmx512m" />
686
         <jvmarg value="-Djava.awt.headless=true"/>
687
      </java>
688

  
689
   </target>
613 690
   
614 691
   <!-- ==================== Jar Targets ==================================== -->
615 692

  
......
810 887
   
811 888
   <!-- deploy the application jars, but NOT database -->
812 889
   <target name="deploy"
813
           depends="clean, convert, jar, deploy.prepare"
890
           depends="clean, convert, jar, deploy.prepare, deploy.appcds"
814 891
           description="Convert, compile the converted Java sources, create jars, deploys the jars.  Does NOT create/import the database." >
815 892
   </target>
816 893
   
......
918 995

  
919 996
   <!-- ==================== Clean Targets ==================================== -->
920 997

  
921
   <target name="clean" depends="clean.convert, clean.build, clean.dist" description="Remove all clean.build, clean.convert, clean.dist files." />
998
   <target name="clean" depends="clean.convert, clean.build, clean.dist, clean.appcds"
999
           description="Remove all clean.build, clean.convert, clean.dist files."
1000
   />
922 1001

  
923 1002
   <target name="clean.build" description="Remove all built files from the conversion process." >
924 1003
      <delete includeemptydirs="true" failonerror="false">
......
1024 1103
   <target name="create.db" depends="create.db.h2, create.db.pg, create.db.mariadb, create.db.sqlserver"
1025 1104
           description="Create empty database instance for all enabled database types." />
1026 1105
   
1106
   <target name="clean.appcds"
1107
           description="Remove any generated AppCDS archives and related files." >
1108
      <delete dir="${deploy.home}/client/appcds" />
1109
   </target>
1110
   
1027 1111
   <target name="import.db" depends="import.db.h2, import.db.pg, import.db.mariadb, import.db.sqlserver"
1028 1112
           description="Create empty database instance and import data for all enabled database types." />
1029 1113

  
new/deploy/server/directory.xml.template 2026-05-11 10:21:38 +0000
1187 1187
            <node-attribute name="value" value="{spawner_path}"/>
1188 1188
          </node>
1189 1189
          <node class="string" name="jvmArgs">
1190
            <node-attribute name="value" value="-Xmx512m -Djava.awt.headless=true"/>
1190
            <node-attribute name="value" value="-Xshare:on -XX:SharedArchiveFile=appcds/appcds.jsa -Xmx512m -Djava.awt.headless=true"/>
1191 1191
          </node>
1192 1192
          <node class="string" name="workingDir">
1193 1193
            <node-attribute name="value" value="{client_start_dir}"/>
new/docker/fwd_4.0_ubuntu_pg_server_Dockerfile 2026-05-11 11:18:13 +0000
1
# Step 1/25
1
# Step 1/26
2 2
ARG FROM_IMAGE=goldencode/fwd_4.0_ubuntu_22.04_pg14:latest
3 3
FROM ${FROM_IMAGE}
4 4

  
......
14 14
ARG INCREMENTAL_ZIP=${APPNAME}_incremental.zip
15 15
ARG TZDATA_AREA=America
16 16
ARG TZDATA_ZONE=New_York
17
ARG APPCDS_CLASSPATH=/opt/fwd/build/lib/p2j.jar
18
ARG APPCDS_JVM_OPTS="-Djava.library.path=/opt/${PROJECT}/lib -Xmx512m -Djava.awt.headless=true"
19
ARG APPCDS_LST_FILE=/opt/${PROJECT}/client/appcds/appcds.lst
20
ARG APPCDS_ARCHIVE=/opt/${PROJECT}/client/appcds/appcds.jsa
17 21
ENV LANG=${LANGUAGE_VALUE}.${ENCODING_VALUE}
18 22
ENV LANGUAGE=${LANGUAGE_VALUE}
19 23

  
20 24
USER root
21 25

  
22
# Step 2/25
26
# Step 2/26
23 27
# If the LANGUAGE_VALUE is different from the base image locale, update locale settings
24 28
RUN if [ "$LANGUAGE_VALUE" != "$(locale | grep LANG= | cut -d= -f2)" ]; then \
25 29
       localedef --no-archive -f $ENCODING_VALUE -i $LANGUAGE_VALUE ${LANGUAGE_VALUE}.${ENCODING_VALUE} && \
......
36 40
       echo "${TZDATA_AREA}/${TZDATA_ZONE}" > /etc/timezone; \
37 41
    fi
38 42

  
39
# Step 3/25
43
# Step 3/26
40 44
COPY *.zip /tmp/
41 45

  
42
# Step 4/25
46
# Step 4/26
43 47
RUN unzip -oq /tmp/deploy.zip deploy/* -d /tmp/${PROJECT}/
44 48

  
45
# Step 5/25
49
# Step 5/26
46 50
RUN mkdir -p /opt/${PROJECT}/ && \
47 51
    cp -r /tmp/${PROJECT}/deploy/client /opt/${PROJECT}/ && \
48 52
    cp -r /tmp/${PROJECT}/deploy/server /opt/${PROJECT}/ && \
49 53
    cp /tmp/${PROJECT}/deploy/*.sh /opt/${PROJECT}/
50 54

  
51
# Step 6/25
55
# Step 6/26
52 56
RUN unzip -oj /tmp/deploy.zip build/lib/* -d /opt/${PROJECT}/lib/
53 57

  
54
# Step 7/25
58
# Step 7/26
55 59
RUN cp ${FWD_LIB}/build/lib/fwdspi.jar /opt/${PROJECT}/lib
56 60

  
57
# Step 8/25
61
# Step 8/26
58 62
RUN ${SPAWNER_DEPLOY}/postbuild.sh /opt/spawner ${SPAWNER_DEPLOY}/spawn /tmp/${PROJECT}/deploy/server/srv-certs.store /opt/fwd/build/lib/p2j.jar
59 63

  
60
# Step 9/25
64
# Step 9/26
61 65
RUN chown -R fwd:fwd /opt/${PROJECT}
62 66

  
63
# Step 10/25
67
# Step 10/26
64 68
COPY --chown=root:root scripts/monitor_files.sh /root
65 69

  
66
# Step 11/25
70
# Step 11/26
67 71
RUN mkdir /docker-entrypoint.d/
68 72

  
69
# Step 12/25
73
# Step 12/26
70 74
COPY --chown=fwd:fwd entrypoint/docker-entrypoint_server.sh /docker-entrypoint.d/
71 75

  
72
# Step 13/25
76
# Step 13/26
73 77
COPY --chown=fwd:fwd entrypoint/docker-entrypoint_import.sh /docker-entrypoint.d/
74 78

  
75
# Step 14/25
79
# Step 14/26
76 80
COPY --chown=fwd:fwd entrypoint/docker-entrypoint_prepare.sh /docker-entrypoint.d/
77 81

  
78
# Step 15/25
82
# Step 15/26
79 83
COPY --chown=fwd:fwd entrypoint/launch_monitor.sh /docker-entrypoint.d/
80 84

  
81
# Step 16/25
85
# Step 16/26
82 86
COPY --chown=root:root scripts/startssh /usr/local/bin/
83 87

  
84
# Step 17/25
88
# Step 17/26
85 89
COPY --chown=root:root scripts/${PROJECT}_admin /etc/sudoers.d/
86 90

  
87
# Step 18/25
91
# Step 18/26
88 92
RUN if [ -f "/tmp/${PROJECT_ZIP}" ]; then \
89 93
       cp /tmp/${PROJECT_ZIP} /home/fwd/repo/dist/ && \
90 94
       chown fwd:fwd /home/fwd/repo/dist/${PROJECT_ZIP} && \
91 95
       chmod 755 /home/fwd/repo/dist/${PROJECT_ZIP}; \
92 96
    fi
93 97

  
94
# Step 19/25
98
# Step 19/26
95 99
RUN if [ -f "/tmp/${DUMPS_ZIP}" ]; then \
96 100
       cp /tmp/${DUMPS_ZIP} /home/fwd/repo/dist/ && \
97 101
       chown fwd:fwd /home/fwd/repo/dist/${DUMPS_ZIP} && \
98 102
       chmod 755 /home/fwd/repo/dist/${DUMPS_ZIP}; \
99 103
    fi
100 104

  
101
# Step 20/25
105
# Step 20/26
102 106
RUN if [ -f "/tmp/${INCREMENTAL_ZIP}" ]; then \
103 107
       cp /tmp/${INCREMENTAL_ZIP} /home/fwd/repo/dist/ && \
104 108
       chown fwd:fwd /home/fwd/repo/dist/${INCREMENTAL_ZIP} && \
105 109
       chmod 755 /home/fwd/repo/dist/${INCREMENTAL_ZIP}; \
106 110
    fi
107 111

  
108
# Step 21/25
112
# Step 21/26
109 113
ADD ./tools/GenerateDemoData*.class /tmp/
110
# Step 22/25
114
# Step 22/26
111 115
ADD --chown=fwd:fwd ./data/ /opt/${PROJECT}/data/
112
# Step 23/25
116
# Step 23/26
113 117
RUN (cd /opt/${PROJECT}; java -classpath ${FWD_LIB}/build/lib/p2j.jar:/tmp: GenerateDemoData)
114 118

  
115
# Step 24/25
119
# Step 24/26
120
RUN (cd /opt/${PROJECT}/client; java -Xshare:dump -XX:SharedClassListFile=${APPCDS_LST_FILE} -XX:SharedArchiveFile=${APPCDS_ARCHIVE} ${APPCDS_JVM_OPTS} -classpath ${APPCDS_CLASSPATH} com.goldencode.p2j.main.ClientDriver)
121

  
122
# Step 25/26
116 123
RUN rm -fr /tmp/${PROJECT} && \
117 124
    rm /tmp/*.zip
118 125

  
119 126
USER fwd
120 127

  
121
# Step 25/25
128
# Step 26/26
122 129
WORKDIR /opt/${PROJECT}
123 130

  
124 131
# End of this Dockerfile