...
- Open Eclipse and create a new Java project.
- Delete the default src folder.
- Right-click on the project, click Build Path > Link Source > click Browse and select the the generated application project lib\src folder. For example, D:\SmartbankSVN\Smartbank\SmartbankLib\src.
- Right-click on the selected src folder, click Build Path > Remove from Build Path, choose Keep the linked folder option and click Yes.
- Right-click on src\main\java, click Build Path > Use as Source Folder.
- Right-click on the project, click Build Path > Configure Build Path > Libraries tab > Add External JARs and add the following dependencies that were provided as part of the generated application project (e.g. D:\SmartbankSVN\Smartbank\Dependencies):
- ..\Dependencies\canvas
- CTFull.jar
- CTLogging-Log4j-1x.jar
- CTLogging-Log4j-2x.jar
- CTResources.jar
- ..\Dependencies\SupportingJars\Javaee_Jars\ee6u3
- javax.servlet.jar
- ..\Dependencies\SupportingJars\Rest_Jars
- All JARs
- ..\Dependencies\SupportingJars\Third_Party_Jars
- All JARs
- All JARs
- ..\Dependencies\canvas
Execute DB Scripts
Build the empty project template from the application source folder using the command Ant for creating the application WAR file. On executing the Ant command, the CT folder gets automatically created in the same path, as part of the project generation.
Perform the following steps to generate the database scripts for the new application project (e.g. Smartbank):
- Access the path of the zipped database folders, e.g. D:\CT\dist\database.
- Extract the files of the target database from the zip folder, e.g. canvasSetup_MYSQL.
- Open the extracted folder of canvasSetup_MYSQL.
- Open the extracted folder of canvasSetup_MYSQL.
- Open the bin folder in canvasSetup_MYSQL.
- Open the config.txt file in bin folder.
Multi App Schema enables you to use a single config schema for different applications, in this case, SmartBank and another application. This is similar to a functional application (e.g. Modelhouse) and Sigma, using the same config (metadata) schema instead of using two different schemas.
Note title Note If you want to use multi app schema, then perform step 5 or else proceed to step 6.
- Only when you use a multi-app schema, it is required for you to replace the existing name of the MULTI_APP_SCHEMA, with a new one, e.g. MULTI_14260 and then you must proceed to save the config.txt file.
- Double-click the run windows batch file to generate the DB scripts.
The DB scripts get generated. After the DB scripts get generated successfully, open server.xml file in the app server’s configuration folder to change the schema name, e.g. D:\Canvas\ apache tomcat 8.5.9\ conf\server.xml.
Note title Note The same schema name, which was provided in the config.txt file, should be used in the server.xml file.
The following sample code snippets serve as ideal references of server.xml file for the sample application, Sigma and Canvas Studio.Code Block Sample Application: <!-- <Resource auth="Container" driverClassName="com.mysql.cj.jdbc.Driver" factory="org.objectweb.jotm.datasource.DataSourceFactory" maxactive="10" maxidle="10" maxwait="-1" name="jdbc/ModelHouseCT" password="<SCHEMA PASSWORD>" type="javax.sql.DataSource" url="<APPLICATION URL>" username="<SCHEMA USERNAME>"/> <Resource auth="Container" driverClassName="com.mysql.cj.jdbc.Driver" factory="org.objectweb.jotm.datasource.DataSourceFactory" maxactive="10" maxidle="10" maxwait="-1" name="jdbc/ModelHouse" password="<SCHEMA PASSWORD>" type="javax.sql.DataSource" url="<APPLICATION URL>" username="<SCHEMA USERNAME>"/> --> Sigma: <!-- <Resource auth="Container" driverClassName="com.mysql.cj.jdbc.Driver" factory="org.objectweb.jotm.datasource.DataSourceFactory" maxactive="10" maxidle="10" maxwait="-1" name="jdbc/SigmaCanvasDataSource" password="<SCHEMA PASSWORD>" type="javax.sql.DataSource" url="<APPLICATION URL>" username="<SCHEMA USERNAME>"/> <Resource auth="Container" driverClassName="com.mysql.cj.jdbc.Driver" factory="org.objectweb.jotm.datasource.DataSourceFactory" maxactive="10" maxidle="10" maxwait="-1" name="jdbc/SigmaAppDataSource" password="<SCHEMA PASSWORD>" type="javax.sql.DataSource" url="<APPLICATION URL>" username="<SCHEMA USERNAME>"/> --> Canvas Studio: <!-- <Resource auth="Container" driverClassName="com.mysql.cj.jdbc.Driver" factory="org.objectweb.jotm.datasource.DataSourceFactory" maxactive="10" maxidle="10" maxwait="-1" name="jdbc/ExpertStudio" password="<SCHEMA PASSWORD>" type="javax.sql.DataSource" url="<APPLICATION URL>" username="<SCHEMA USERNAME>"/> <Resource auth="Container" driverClassName="com.mysql.cj.jdbc.Driver" factory="org.objectweb.jotm.datasource.DataSourceFactory" maxactive="10" maxidle="10" maxwait="-1" name="jdbc/ExpertStudioTarget" password="<SCHEMA PASSWORD>" type="javax.sql.DataSource" url="<APPLICATION URL>" username="<SCHEMA USERNAME>"/> -->
Develop the Application and Build the Application WAR
...