Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Info

Not all the questions on this page are directly related to Canvas deployment, e.g. questions on Oracle database. Some of these questions were asked by participants during the Canvas training sessions. We have answered those here for the larger benefit of the Canvas Developer community.

...

title
Expand
titleWhat are the changes to be done when context root of the application is changed?

Let’s assume that the context root of the application is dliteweb.

In the JBoss EAP 7.x Installed folder 

following are the details of the application: 

  • DATA_SOURCE_NAME : DliteCTDS
  • SCHEMA_NAME : CT_MIG
  • SCHEMA_NAME_PWD : CT_MIG
  • CONTEXT_ROOT : dliteweb
  • WAR_NAME : dliteweb
  • WORK_FOLDER : D:/Canvas19/dliteweb

The following steps indicate the changes that are to be applied for the JBoss app server and Oracle database environments. For other app server and database combinations, changes need to be appropriately applied to the relevant files in accordance with the modified changes. 
Context Root changes

1. In the application WAR JBoss folder (e.g. '

D:\Canvas\JBoss EAP 7.x Installed folder\standalone\deployments\ctmodelhouse.war \

WEB-INF\jboss-web.xml’), specify the context root in the jboss-web.xml file, as shown in the following code snippet:

Code Block
languagexml
<context-root> 
<dliteweb>
dliteweb </context-root>
Note
NoteThis step is applicable only for the JBoss application server. If you use Tomcat or any other app server, proceed to step

2.

 

In the CTResources.jar folder (e.g.

‘D:\Canvas\ JBoss EAP 7.x Installed folder\CTWeb\

‘Ctweb\Dependencies\Canvas\CTResources.jar\CanvasApplicationContext.json’), specify the context root in CanvasApplicationContext.json file, as shown in the following code snippet:

Code Block
languagebash
{
	"contextRoot": "
<dliteweb>
dliteweb",
	"applicationId": "MODELHOUSE",
	"displayName": "CTWEB",
	"isService": "Y"
}

3. In the application Resource.jar folder (e.g.

D:

Ctweb\

Canvas\ JBoss EAP 7.x Installed folder\CTWeb\CTWebResources\

CtwebResources\src\main\resource\

securityconfig

Ctwebsecurityconfig.properties), specify the default context root in

securityconfig

Ctwebsecurityconfig.properties file, as shown in the following code snippet: 

Code Block
languagexml
DEFAULT_CONTEXT_ROOT=
/<dliteweb>
dliteweb
ALL_CONTEXT_ROOTS=
<dliteweb>
dliteweb

4. In the application Resource.jar folder (e.g.

D:\Canvas\ JBoss EAP 7.x Installed folder\CTWeb

Ctweb\CTWebResources\src\main\resource\

exportconfig

ctwebexportconfig.properties), specify the context root as the context path in Ctwebexportconfig.properties file, as shown in the following code snippet:

Code Block
languagexml
SESSION_TIMEOUT_URL=dliteweb/
<dliteweb>/
index.jsp 
CONTEXT_PATH=
/<dliteweb>
dliteweb
For


JNDI

data sources, the data

Data source name

should be specified. Let's assume that the JNDI data source name is DliteCTDS.

change

1. In the application Resource.jar folder (e.g.

D:\Canvas\ JBoss EAP 7.x Installed folder\CTWeb\CTWebResources\

CtwebResources\src\main\resource\databaseconfig.properties), specify the JNDI data source name in

databaseconfig

ctwebdatabaseconfig.properties file, as shown in the following code snippet:

Code Block
languagexml
CT_FW_DATASOURCE =java:/
<DliteCTDS>
DliteCTDS 
CT_FW_FILEIMPORT_DATASOURCE=java:/
<DliteCTDS>
DliteCTDS

2. In the

JBoss EAP 7.x Installed folder 

 (e.g. '

D:\Canvas\JBoss EAP 7.x Installed folder\

standalone\configuration\standalone.xml’), specify the JNDI data source name in standalone.xml file, as shown in the following code snippet:

Code Block
languagexml
<datasource jndi-name="java:jboss/datasources/
<DliteCTDS>
DliteCTDS" pool-name="
<DliteCTDS>
DliteCTDS" enabled="true">
            <connection-url>jdbc:oracle:thin:@10.12.25.28:1521:SIR13714</connection-url>
            <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
            <driver>OracleJDBCDriver</driver>
            <security>
                <user-name><SCHEMA_NAME></user-name>
                <password><SCHEMA_NAME_PWD></password>
            </security>
</datasource>
Note
titleNote

Steps 6 and 7 are applicable only for the JBoss application server. If you use Tomcat or any other app server, proceed to step 8. 

In the JBoss EAP 7.x Installed folder 

3. In the the application WAR JBoss folder (e.g. '

D:\Canvas\JBoss EAP 7.x Installed folder\

standalone\deployments\ctmodelhouse.war \WEB-INF\jboss-web.xml’), specify the JNDI data source name in the jboss-web.xml file, as shown in the following code snippet:

Code Block
languagexml
<resource-ref>
            <res-ref-name>jdbc/CTwebCanvasDataSource</res-ref-name>
            <jndi-name>java:jboss/datasources/
<DliteCTDS><
DliteCTDS</jndi-name>
</resource-ref>
It is essential to specify the work folder path. Let's assume that the work folder path is D:/Canvas19/dliteweb


Work Folder Changes

1. In the application Resource.jar folder (e.g.

D:\Canvas\ JBoss EAP 7.x Installed folder\CTWeb\CTWebResources\

CtwebResources\src\main\resource\MyImplementation.properties), specify the work folder and centralized work folder paths in

MyImplementation

CtwebImplementation.properties file, as shown in the following code snippet:

Code Block
languagexml
CT_WORK_FOLDER_PATH=D:/Canvas19/dliteweb                
CT_WORK_CENTRALIZED_FOLDER_PATH=D:/Canvas19/dliteweb   
It is essential to specify the WAR file name. Let's assume that the WAR file name is dliteweb

2. Specify the Web Application Resource (WAR) file name in build.xml file, as shown in the following code snippet: 

Code Block
languagexml
<property name="dliteweb" value="${DIST_ROOT}/
<dliteweb>
dliteweb.war" />