cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "JD Daniels">
Subject Flow Database stuff ( The new FOM? )
Date Thu, 10 Jul 2003 07:37:35 GMT
ok, I am confused on what is happening to the Datbase.js file. but instead
of a request for the long explanation, I will settle for a quick yes or no.

I am a java newbie... so bear with me...

>From the petstore:

        // temporary hack to avoid requiring datasource config in
        var jdbc = java.sql.DriverManager.getConnection("jdbc:hsqldb:.",
"sa", "")
        var conn = new Database(jdbc);
        if (this.hsql == null) {
            // keep hsql in-memory database alive
            this.hsql =
java.sql.DriverManager.getConnection("jdbc:hsqldb:.", "sa", "");
        return conn;
    } else {
        // lookup datasource in cocoon.xconf
        return Database.getConnection(id);

Is what has been talked about here on the list mean the "Best Practice" way
to get a database connection in flow is the way that is commented here as a
"temporary hack" ie. use java.lang.whatever and code as if we were writing
the app in pure java?

Is there a wiki somewhere on this type of thing? (I have been building apps
in PHP and PERL for a few years, and its gets frustrating KNOWING way better
tools are RIGHT HERE in front of me :)

Sorry if this is a pain  in the *** question, bu tthe idea of flow has me
giddy. But I am stuck on the "cannot convert null to an object issue"

JD Daniels

View raw message