Boolean aggressiveClose = (Boolean)m_conf.getParameter("aggressiveConnectionClose");
Boolean aggressiveClose = (Boolean)m_conf.getParameter(AGGRESSIVE_CONNECTION_CLOSE);
    public void startup() {        s_log.warn("Persistence initializer is starting");        // Set the utilities        if (com.arsdigita.db.Initializer.getDatabase() == com.arsdigita.db.Initializer.POSTGRES) {            Session.setSQLUtilities(new PostgresSQLUtilities());        } else {            Session.setSQLUtilities(new OracleSQLUtilities());        }        ObjectType.setOptimizeDefault(            m_conf.getParameter("optimizeByDefault").equals(Boolean.TRUE)            );        try {            MDSQLGeneratorFactory.setMDSQLGenerator(                (String)m_conf.getParameter("mdsqlGenerator"));        } catch (Exception e) {            throw new InitializationException(                "Error instantiating MDSQLGenerator");        }        String pdlDir = (String)m_conf.getParameter("pdlDirectory");        if ((m_conf.getParameter("metadataXmlFileNames") != null) &&             (pdlDir == null)) {            throw new InitializationException(                "Invalid persistence configuration.  Please replace " +                "metadataXmlFileNames with pdlDirectory.");        }        /*Boolean aggressiveClose =           Boolean.valueOf(((String)m_conf.getParameter("aggressiveConnectionClose")));*/        Boolean aggressiveClose =                 (Boolean)m_conf.getParameter("aggressiveConnectionClose");        if (aggressiveClose != null && aggressiveClose.booleanValue()) {            s_log.info("Using aggressive connection closing");            TransactionContext.setAggressiveClose(true);        } else {            s_log.info("Not using aggressive connection closing " +                        "[aggressiveConnectionClose parameter]");        }        SessionManager.setSchemaConnectionInfo( "",  "", "", "");        ResourceManager rm = ResourceManager.getInstance();        File webAppRoot = rm.getWebappRoot();        File dir;                // If we're not running inside a webapp, we don't want the wrong        // thing to happen.        if ( webAppRoot == null ) {            dir = new File(pdlDir);        } else {            dir = new File(webAppRoot + pdlDir);        }        List files = new ArrayList();        findPDLFiles(dir, files);        s_log.warn("Found " + files.size() + " files in the " + dir.toString() + " directory.");        try {            PDL.compilePDL(files);        } catch (PDLException e) {                throw new InitializationException                    ("Persistence Initialization error while trying to " +                     "compile the PDL files: " + e.getMessage());        }        // now we load the files out of the database        try {            Session session = SessionManager.getSession();            TransactionContext txn = session.getTransactionContext();            txn.beginTxn();            MetadataRoot root = MetadataRoot.getMetadataRoot();            PDL pdl = new PDL();            DataCollection collection = SessionManager.getSession()                .retrieve("com.arsdigita.persistence.DynamicObjectType");            while (collection.next()) {                String currentFile = (String)collection.get("dynamicType");                if (s_log.isInfoEnabled()) {                    s_log.info("loading... " + currentFile.toString());                }                if (root.getObjectType(currentFile) != null) {                    // this means that there is a type in the database                    // that has already been defined so we write an error                    s_log.warn                        ("The Object Type [" + currentFile + "] has already " +                         "been defined in the static files.  Ignoring " +                          "object type definition from the database");                    continue;                }                String pdlFile = (String)collection.get("pdlFile");                pdl.load(new StringReader(pdlFile),                         "DATABASE: " + currentFile);            }            collection = SessionManager.getSession()                .retrieve("com.arsdigita.persistence.DynamicAssociation");            while (collection.next()) {                String currentFile = "Association from " +                     collection.get("objectType1") + " to " +                    collection.get("objectType2");                // XXX: I'm going to ignore the possibility of this error for                // now.                //s_log.warn("An association from " + currentFile + " has " +                //"already been defined.  Ignoring version in " +                //"the database");                if (s_log.isInfoEnabled()) {                    s_log.info("loading " + currentFile);                }                String pdlFile = (String)collection.get("pdlFile");                pdl.load(new StringReader(pdlFile),                         "DATABASE: " + currentFile);            }            pdl.generateMetadata(root);            //try {            // Future use -- Patrick            //PDLOutputter.writePDL(root, new java.io.File("/tmp/pdl"));            //} catch (java.io.IOException e) {            //System.out.println(e.getMessage());            //}            txn.commitTxn();        } catch (PDLException e) {                throw new InitializationException                    ("Persistence Initialization error while trying to " +                     "compile the PDL files: " + e.getMessage());        }    }