4 Replies Latest reply on Aug 30, 2006 8:39 PM by jimmatts2

    Using JRUN Datasource from CF

    jimmatts2
      I am running CF 6.1 on top of JRUN4. I've also have some java code that is packaged in a jar and available for invocation from CF. I would like to use a JRUN datasource from that Java code. Is this possible?

        • 1. Re: Using JRUN Datasource from CF
          <newbie /> Level 1

          I don't see why not.

          I have never actually done this but I imagine you would need to do something
          like this...

          Create (JNDI) dsn using JRun Admin.
          Create CF dsn in CF Admin specifying Driver as J2EE Datasource (JNDI).

          You should now be able to do a JNDI lookup in your java code and/or use the
          CF dsn in your coldfusion code.


          Good luck!
          • 2. Re: Using JRUN Datasource from CF
            jimmatts2 Level 1
            I've tried what you are suggesting but I don't believe it is available.

            I've used the "hidden" APIs and I am only seeing the data source set up in ColdFusion, not JRUN.

            <cfscript>
            factory = createObject("java", "coldfusion.server.ServiceFactory");
            </cfscript>

            <cfset ds=factory.getDataSourceService()>

            <cfdump var="#ds.getNames()#">
            • 3. Re: Using JRUN Datasource from CF
              ksmith Level 1
              Datasources created in the JRun admin under cfusion's server instance should then be visible in the CFAdmin. There should be no special steps required.
              • 4. Re: Using JRUN Datasource from CF
                jimmatts2 Level 1
                Hmmm ... I have a datasource on the "default" JRUN server instanced called: "DAwactlg"
                -----------------------------------------------
                JDBC Data Sources
                Actions Data Source Name Database Driver

                Edit Verify Delete DAwactlg macromedia.jdbc.MacromediaDriver
                -----------------------------------------------

                I also have a different ColdFusion data source in the ColdFusion app running in the "default" server.

                --------------------------
                Connected Data Sources
                Actions Data Source Name Driver Status
                W09ORD Oracle
                ---------------------------

                The JRUN configured DSN called "DAwactlg" is not showing in the CF Admin.

                Thoughts?