Package net.sf.farrago.defimpl

Examples of net.sf.farrago.defimpl.FarragoDefaultSessionPersonality


        // hijack necessary internals
        FarragoJdbcEngineConnection farragoConnection =
            (FarragoJdbcEngineConnection) connection;
        FarragoDbSession session =
            (FarragoDbSession) farragoConnection.getSession();
        final FarragoDefaultSessionPersonality personality =
            (FarragoDefaultSessionPersonality) session.getPersonality();

        // guarantee release of any resources we allocate on the way
        FarragoCompoundAllocation allocations = new FarragoCompoundAllocation();
        FarragoReposTxnContext reposTxn = repos.newTxnContext(true);
        try {
            reposTxn.beginReadTxn();

            // create a private code cache: don't pollute the real
            // database code cache
            FarragoObjectCache objCache =
                new FarragoObjectCache(
                    allocations,
                    0,
                    new FarragoLruVictimPolicy());

            // FarragoPreparingStmt does most of the work for us
            FarragoSessionStmtValidator stmtValidator =
                session.newStmtValidator(
                    objCache, objCache);
            allocations.addAllocation(stmtValidator);
            FarragoPreparingStmt stmt =
                (FarragoPreparingStmt) personality.newPreparingStmtForTesting(
                    explainQuery, stmtValidator);

            initPlanner(stmt);

            // add any additional rules needed in the planner
View Full Code Here

TOP

Related Classes of net.sf.farrago.defimpl.FarragoDefaultSessionPersonality

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.