Versions Compared

Key

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

...

Step 6. Copy the context.xml file from the backup folder (step 4) into <FlexDeploy Home>/apache-tomcat-flexdeploy/conf

  • Using UCP for Oracle Database connections is now required, if you were not previously using it follow these steps.
  • Download the latest Oracle JDBC driver from https://www.oracle.com/database/technologies/appdev/jdbc-ucp-19c-downloads.html. For example, ojdbc8-full.tar.gz.
  • Remove ojdbc jar files like ojdbc*.jar or ojdbc*dms.jar from <FlexDeploy Home>/apache-tomcat-flexdeploy/lib.
  • Copy ojdbc8.jar, ons.jar anducp.jar from download archive to <FlexDeploy Home>/apache-tomcat-flexdeploy/lib.
  • Update <FlexDeploy Home>/apache-tomcat-flexdeploy/conf/context.xml as shown below.
Code Block
languagexml
themeRDark
titleOracle
<Resource name="jdbc/flexdbDS" auth="Container"
    type="oracle.ucp.jdbc.PoolDataSource"
    factory="oracle.ucp.jdbc.PoolDataSourceImpl"

    connectionFactoryClassName="oracle.jdbc.pool.OracleDataSource"
    minPoolSize="0"
    maxPoolSize="100"
    initialPoolSize="0"
    autoCommit="false"

    url="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=**HOSTNAME**)(PORT=**PORT**)))(CONNECT_DATA=(SERVICE_NAME=**SERVICE_NAME**)))"
    user="fd_admin"
    password="**FD_ADMIN_PASSWORD**"

    fastConnectionFailoverEnabled="true"

    validationQuery="select 1 from dual"
    testOnBorrow="true"

    useLocalSessionState="true"
    defaultAutoCommit="false"/>
  • URL must be in the format listed in the example, the JDBC short format of host:sid:port should not be used.
  • If RAC is used for the database, multiple nodes can be listed in the address list of the URL or it can point to the scan listener for the cluster.
  • Sample URL for a RAC implementation that has a primary and secondary scan listener connecting to to a service name GOLD-CLOUD. This includes connection timeout, retry, and retry delay settings.
Code Block
themeRDark
titleSample RAC URL
url="jdbc:oracle:thin:@(DESCRIPTION = CONNECT_TIMEOUT=120) (RETRY_COUNT=20) (RETRY_DELAY=3) (TRANSPORT_CONNECT_TIMEOUT=3) (ADDRESS_LIST =(LOAD_BALANCE=on) (ADDRESS = (PROTOCOL = TCP) (HOST=primary-scan) (PORT=1521))) (ADDRESS_LIST =(LOAD_BALANCE=on) (ADDRESS = (PROTOCOL = TCP) (HOST=secondary-scan) (PORT=1521))) (CONNECT_DATA=(SERVICE_NAME = gold-cloud)))"
  • For more info about using UCP please check here.

Step 7. Edit the server.xml and modify the HTTP/HTTPS ports to match that of the original file which was backed up in step 4. This file is located in the<FlexDeploy Home>/apache-tomcat-flexdeploy/conf folder.  DO NOT simply copy over the backup file as there are other changes which must be preserved.

...