Package org.apache.openjpa.lib.log

Examples of org.apache.openjpa.lib.log.LogFactory


        cp.setInto(this);
        setDiagnosticContext(this);
    }
   
    private void setDiagnosticContext(OpenJPAConfiguration conf) {
        LogFactory logFactory = conf.getLogFactory();
        try {
            Method setter = AccessController.doPrivileged(J2DoPrivHelper.
                    getDeclaredMethodAction(logFactory.getClass(),
                    "setDiagnosticContext", new Class[]{String.class}));
            setter.invoke(logFactory, conf.getId());
        } catch (Throwable t) {
            // no contextual logging
        }
View Full Code Here


        cp.setInto(this);
        setDiagnosticContext(this);
    }
   
    private void setDiagnosticContext(OpenJPAConfiguration conf) {
        LogFactory logFactory = conf.getLogFactory();
        try {
            Method setter = AccessController.doPrivileged(J2DoPrivHelper.
                    getDeclaredMethodAction(logFactory.getClass(),
                    "setDiagnosticContext", new Class[]{String.class}));
            setter.invoke(logFactory, conf.getId());
        } catch (Throwable t) {
            // no contextual logging
        }
View Full Code Here

        this(unit, null);
    }
   
    public Exchange(String unit, Map<String,Object> config) {
        super(unit, false, PersistenceContextType.TRANSACTION, addLog(config));
        LogFactory serverLog = getUnit().getConfiguration().getLogFactory();
        try {
            log = (BufferedLog)serverLog;
        } catch (ClassCastException e) {
            System.err.println("Local Log was loaded by " + BufferedLog.class.getClassLoader());
            System.err.println("Server Log was loaded by " + serverLog.getClass().getClassLoader());
            e.printStackTrace();
        }
        populate();
        new MarketFeed(this).start(60*1000);
    }
View Full Code Here

        cp.setInto(this);
        setDiagnosticContext(this);
    }
   
    private void setDiagnosticContext(OpenJPAConfiguration conf) {
        LogFactory logFactory = conf.getLogFactory();
        try {
            Method setter = AccessController.doPrivileged(J2DoPrivHelper.
                    getDeclaredMethodAction(logFactory.getClass(),
                    "setDiagnosticContext", new Class[]{String.class}));
            setter.invoke(logFactory, conf.getId());
        } catch (Throwable t) {
            // no contextual logging
        }
View Full Code Here

        Object unit = p.get(PREFIX_OPENJPA+id.getProperty());
        return (unit == null) ? "?" : unit.toString();
    }
   
    private void setDiagnosticContext(String unit) {
        LogFactory logFactory = getLogFactory();
        if (logFactory instanceof LogFactoryImpl) {
            ((LogFactoryImpl)logFactory).setDiagnosticContext(unit);
        }
    }
View Full Code Here

        Object unit = p.get(PREFIX_OPENJPA + id.getProperty());
        return (unit == null) ? "?" : unit.toString();
    }
   
    private void setDiagnosticContext(OpenJPAConfiguration conf, String unit) {
        LogFactory logFactory = conf.getLogFactory();
        if (logFactory instanceof LogFactoryImpl) {
            ((LogFactoryImpl)logFactory).setDiagnosticContext(unit);
        }
    }
View Full Code Here

        cp.setInto(this);
        setDiagnosticContext(this);
    }
   
    private void setDiagnosticContext(OpenJPAConfiguration conf) {
        LogFactory logFactory = conf.getLogFactory();
        try {
            Method setter = AccessController.doPrivileged(J2DoPrivHelper.
                    getDeclaredMethodAction(logFactory.getClass(),
                    "setDiagnosticContext", new Class[]{String.class}));
            setter.invoke(logFactory, conf.getId());
        } catch (Throwable t) {
            // no contextual logging
        }
View Full Code Here

TOP

Related Classes of org.apache.openjpa.lib.log.LogFactory

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.