Package org.apache.openjpa.lib.log

Examples of org.apache.openjpa.lib.log.Log.trace()


                    ds = (DataSource) obj;
                else {
                    Log log = getLog(LOG_JDBC);
                    if (log.isTraceEnabled()) {
                        Localizer loc = Localizer.forPackage(JDBCConfigurationImpl.class);
                        log.trace(loc.get("unknown-datasource", getConnectionFactory2Name(),
                            obj.getClass().getName()));
                    }
                }
            }
               
View Full Code Here


    public DecoratingDataSource createConnectionFactory() {
        DataSource ds = (DataSource) connectionFactory.get();
        Log log = getLog(LOG_JDBC);
        if (ds != null) {
            if (log.isTraceEnabled())
                log.trace("createConnectionFactory: DataSource:" + ds);

            return setupConnectionFactory(ds, false);
        }
               
        if (log.isTraceEnabled())
View Full Code Here

            return setupConnectionFactory(ds, false);
        }
               
        if (log.isTraceEnabled())
            log.trace("createConnectionFactory: connectionFactory not created yet, attempt JNDI lookup...");
        
        ds = (DataSource) super.getConnectionFactory(); // JNDI lookup
        if (ds == null) {
            if (log.isTraceEnabled())
                log.trace("createConnectionFactory: JNDI lookup failed, attempt DataSource properties...");
View Full Code Here

            log.trace("createConnectionFactory: connectionFactory not created yet, attempt JNDI lookup...");
        
        ds = (DataSource) super.getConnectionFactory(); // JNDI lookup
        if (ds == null) {
            if (log.isTraceEnabled())
                log.trace("createConnectionFactory: JNDI lookup failed, attempt DataSource properties...");
            ds = DataSourceFactory.newDataSource(this, false);
        }

        if (log.isTraceEnabled())
            log.trace("createConnectionFactory: DataSource="+ds);
View Full Code Here

                log.trace("createConnectionFactory: JNDI lookup failed, attempt DataSource properties...");
            ds = DataSourceFactory.newDataSource(this, false);
        }

        if (log.isTraceEnabled())
            log.trace("createConnectionFactory: DataSource="+ds);

        return setupConnectionFactory(ds, false);
    }

    public DataSource getDataSource(StoreContext ctx) {      
View Full Code Here

            }
            if(! (ds instanceof DecoratingDataSource)) {
                ds = DataSourceFactory.decorateDataSource(ds, this, false);
            }
            if (log.isTraceEnabled()) {
                log.trace("Found datasource1: " + ds + " from StoreContext using jndiName: "
                    + ctx.getConnectionFactory2Name());
            }
            return ds;
        }
        else {
View Full Code Here

            return ds;
        }
        else {
            ds = getDataSource(ctx, (DataSource) getConnectionFactory());
            if (log.isTraceEnabled()) {
                log.trace("Found datasource1: " + ds + " from configuration. StoreContext: " + ctx );
            }
            return ds;
        }
    }
View Full Code Here

            }
            if(! (ds instanceof DecoratingDataSource)) {
                ds = DataSourceFactory.decorateDataSource(ds, this, false);
            }
            if (log.isTraceEnabled()) {
                log.trace("Found datasource2: " + ds + " from StoreContext using jndiName: "
                    + ctx.getConnectionFactory2Name());
            }
            return ds;
        }
View Full Code Here

        // If not set on context or value from context is not available try cf2 from config
        else{
            ds = (DataSource) getConnectionFactory2();
            if (log.isTraceEnabled()) {
                log.trace("Found datasource 2: "+ ds + " from config. StoreContext: " + ctx);
            }
        }
       
        // fallback to cf1 / datasource1
        if (ds == null) {
View Full Code Here

        }
       
        // fallback to cf1 / datasource1
        if (ds == null) {
            if(log.isTraceEnabled()) {
                log.trace("Trying datasource1");
            }
            return getDataSource(ctx);
        }

        // prefer the global connection 2 auth info if given
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.