Package de.zib.scalaris

Examples of de.zib.scalaris.Connection


     *             if the connection to Scalaris fails
     */
    private void init(ConnectionFactory cFactory) throws RuntimeException {
        try {
            for (int i = 0; i < MAX_SCALARIS_CONNECTIONS; ++i) {
                Connection connection = cFactory.createConnection(
                        "wiki_import", true);
                scalaris_single.put(new TransactionSingleOp(connection));
                connection = cFactory.createConnection(
                        "wiki_import", true);
                scalaris_tx.put(new Transaction(connection));
View Full Code Here


            throw new RuntimeException(e);
        }

        try {
            for (int i = 0; i < MAX_SCALARIS_CONNECTIONS; ++i) {
                Connection connection = cFactory.createConnection(
                        "wiki_import", true);
                scalaris_single.put(new TransactionSingleOp(connection));
            }
        } catch (ConnectionException e) {
            System.err.println("Connection to Scalaris failed");
View Full Code Here

     */
    @Override
    protected synchronized boolean loadSiteInfo() {
        TransactionSingleOp scalaris_single;
        try {
            Connection conn = cPool.getConnection(MAX_WAIT_FOR_CONNECTION);
            if (conn == null) {
                System.err.println("Could not get a connection to Scalaris for siteinfo, waited " + MAX_WAIT_FOR_CONNECTION + "ms");
                return false;
            }
            scalaris_single = new TransactionSingleOp(conn);
View Full Code Here

     *            the request to the servlet
     */
    @Override
    protected Connection getConnection(HttpServletRequest request) {
        try {
            Connection conn = cPool.getConnection(MAX_WAIT_FOR_CONNECTION);
            if (conn == null) {
                System.err.println("Could not get a connection to Scalaris, waited " + MAX_WAIT_FOR_CONNECTION + "ms");
                if (request != null) {
                    setParam_error(request, "ERROR: DB unavailable");
                    addToParam_notice(request, "error: <pre>Could not get a connection to Scalaris, waited " + MAX_WAIT_FOR_CONNECTION + "ms</pre>");
View Full Code Here

TOP

Related Classes of de.zib.scalaris.Connection

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.