• Topic
  • Discussion
  • UdaWikiWeb.JDBCAppServerColdfusionLinux(Last) -- Owiki? , 2016-08-19 15:00:29 Edit owiki 2016-08-19 10:00:29

    Using UDA with Macromedia ColdFusion MX 7 (Linux)

    Required components

    You will need to download the following components

    • Macromedia ColdFusion MX 7 (Developer Edition) - download
    • OpenLink jar file - one of these, appropriate to the selected JDK/JRE/JVM -
      JDK/JRE/JVM OpenLink JDBC Driver Filename OpenLink JDBC Driver Classname
      1.1 opljdbc.jar openlink.jdbc.Driver
      1.2 or 1.3 opljdbc2.jar openlink.jdbc2.Driver
      1.4 or 1.5 opljdbc3.jar openlink.jdbc3.Driver
      1.6 opljdbc4.jar openlink.jdbc4.Driver
      1.7 opljdbc4_1.jar openlink.jdbc4.Driver
      1.8 opljdbc4_2.jar openlink.jdbc4.Driver

    Note: You should only have one of the above JDBC Drivers in the CLASSPATH at any time. It is usually best to use the latest driver supported by the active JVM.

    Install Macromedia ColdFusion MX 7 (Developer Edition)

    1. Execute the downloaded *.bin file -


      ./coldfusion-701-lin.bin

      NOTE: You may need to set the execute permission on the *.bin file before it can be executed.
    2. Accept the license agreement.
    3. When prompted, select Install type -> 3 - Developer edition
    4. What kind of installation do you want? 1 - Server configuration
    5. Is there already a server configuration of Macromedia ColdFusion MX 7 installed? 2 - No
    6. Sub-component installation choose 4 - Continue with installation
    7. Select all default options from this point onwards.
    8. Enter administrator password.
    9. Enable RDS (required for Report Builder and DW Extensions) (Y/N) N
    10. The installation will now complete.

    NOTE: This may take several minutes.

    Start Macromedia ColdFusion MX 7 (Developer Edition)

    1. Start Macromedia ColdFusion MX 7 (Developer Edition) using the command --


      /opt/coldfusionmx7/bin/coldfusion start

    2. Browse to the following url to verify the Administrator application is running --


      http://coldfusion_server:8500/CFIDE/administrator

    Install OpenLink jar files

    1. Copy the .jar file chosen for your JDK/JVM/JRE into the directory --


      /opt/coldfusionmx7/openlink/jars

      NOTE: You will need to create this directory if it does not already exist.
    2. Open the Administrator --


      http://coldfusion_server:8500/CFIDE/administrator

    3. Select Server Settings -> Java and JVM
    4. In the ColdFusion Class Path field enter --


      /opt/coldfusionmx7/openlink/jars

    5. Select Submit Changes
    6. You will be prompted to restart the server.
    7. Restart ColdFusion --


      /opt/coldfusionmx7/bin/coldfusion restart

    Configure Data Sources

    1. Open the Administrator --


      http://coldfusion_server:8500/CFIDE/administrator

    2. Select Server Settings -> Data & Services
    3. Select Data Sources
    4. Enter a name for the Data Source - o32opljdbc1
    5. In the Driver drop down list box select - other
    6. Select Add
    7. Enter the JDBC URL --


      jdbc:openlink://192.168.0.150:5000/SVT=Odbc/Database=sqlserver/UID=sa/PWD=sa

    8. Enter the Driver Class --


      openlink.jdbc.Driver

    9. Select Submit
    10. The Datasources page will display showing the new data source.
    11. Select the Verify icon to the left of the datasource name.
    12. If the data source was created successfully then the Status field will display OK.


    Repeat the above process for each datasource, editing the URLs as appropriate for your environment --

    Data Source Name Driver Class URL
    o32opljdbc1 openlink.jdbc.Driver jdbc:openlink://192.168.0.150:5000/SVT=Odbc/Database=sqlserver/UID=sa/PWD=sa
    m32opljdbc1 openlink.jdbc.Driver jdbc:openlink://192.168.0.150:5000/SVT=SQLServer 2000/Database=Northwind/options=-H 192.168.0.150/UID=sa/PWD=sa
    o32opljdbc2 openlink.jdbc2.Driver jdbc:openlink://192.168.0.150:5000/SVT=Odbc/Database=sqlserver/UID=sa/PWD=sa
    m32opljdbc2 openlink.jdbc2.Driver jdbc:openlink://192.168.0.150:5000/SVT=SQLServer 2000/Database=Northwind/options=-H 192.168.0.150/UID=sa/PWD=sa
    o32opljdbc3 openlink.jdbc3.Driver jdbc:openlink://192.168.0.150:5000/SVT=Odbc/Database=sqlserver/UID=sa/PWD=sa
    m32opljdbc3 openlink.jdbc3.Driver jdbc:openlink://192.168.0.150:5000/SVT=SQLServer 2000/Database=Northwind/options=-H 192.168.0.150/UID=sa/PWD=sa

    Prepare the ColdFusion test page

    1. Create the following file --


      /opt/coldfusionmx7/wwwroot/opltest.cfm

      to read --


      <html> <head> <title>Hello World!!</title> </head> <body> <cfquery name = "query_o32opljdbc1" dataSource = "o32opljdbc1" dbtype = "query"> select EmployeeID, FirstName, LastName, Title from Employees </cfquery> <cfquery name = "query_m32opljdbc1" dataSource = "m32opljdbc1" dbtype = "query"> select EmployeeID, FirstName, LastName, Title from Employees </cfquery> <cfquery name = "query_o32opljdbc2" dataSource = "o32opljdbc2" dbtype = "query"> select EmployeeID, FirstName, LastName, Title from Employees </cfquery> <cfquery name = "query_m32opljdbc2" dataSource = "m32opljdbc2" dbtype = "query"> select EmployeeID, FirstName, LastName, Title from Employees </cfquery> <cfquery name = "query_o32opljdbc3" dataSource = "o32opljdbc3" dbtype = "query"> select EmployeeID, FirstName, LastName, Title from Employees </cfquery> <cfquery name = "query_m32opljdbc3" dataSource = "m32opljdbc3" dbtype = "query"> select EmployeeID, FirstName, LastName, Title from Employees </cfquery> <h1>OpenLink - ColdFusion MX 7 test</h1> <h2>Using: o32opljdbc1 - openlink.jdbc.Driver</h2> <table> <cfoutput query="query_o32opljdbc1"> <tr> <td>#EmployeeID#</td> <td>#FirstName#</td> <td>#LastName#</td> <td>#Title#</td> </tr> </cfoutput> </table> <h2>Using: m32opljdbc1 - openlink.jdbc.Driver</h2> <table> <cfoutput query="query_m32opljdbc1"> <tr> <td>#EmployeeID#</td> <td>#FirstName#</td> <td>#LastName#</td> <td>#Title#</td> </tr> </cfoutput> </table> <h2>Using: o32opljdbc2 - openlink.jdb2.Driver</h2> <table> <cfoutput query="query_o32opljdbc2"> <tr> <td>#EmployeeID#</td> <td>#FirstName#</td> <td>#LastName#</td> <td>#Title#</td> </tr> </cfoutput> </table> <h2>Using: m32opljdbc2 - openlink.jdbc2.Driver</h2> <table> <cfoutput query="query_m32opljdbc2"> <tr> <td>#EmployeeID#</td> <td>#FirstName#</td> <td>#LastName#</td> <td>#Title#</td> </tr> </cfoutput> </table> <h2>Using: o32opljdbc3 - openlink.jdbc3.Driver</h2> <table> <cfoutput query="query_o32opljdbc3"> <tr> <td>#EmployeeID#</td> <td>#FirstName#</td> <td>#LastName#</td> <td>#Title#</td> </tr> </cfoutput> </table> <h2>Using: m32opljdbc3 - openlink.jdbc3.Driver</h2> <table> <cfoutput query="query_m32opljdbc3"> <tr> <td>#EmployeeID#</td> <td>#FirstName#</td> <td>#LastName#</td> <td>#Title#</td> </tr> </cfoutput> </table> </body> </html>

    2. View the test page at the following URL --


      http://coldfusion_server:8500/CFIDE/opltest.cfm



    Referenced by...