public static WebBeansContext enter(final WebBeansContext newOWBContext) { final WebBeansContext oldContext = contexts.get(); if (newOWBContext != null) { contexts.set(newOWBContext); } else { contexts.remove(); } if (logger.isDebugEnabled()) { logger.debug("Enter:'" + newOWBContext + "'"); } return oldContext; }
public String debug(final String message, final Throwable t) { if (isDebugEnabled()) { final String msg = getMessage(message, baseName); logStream.debug(msg, t); return msg; } return message; }
@Override public void begin() throws NotSupportedException, SystemException { transactionManager().begin(); if (transactionLogger.isDebugEnabled()) { transactionLogger.debug("Started user transaction " + transactionManager().getTransaction()); } }
@Override public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException { if (transactionLogger.isDebugEnabled()) { transactionLogger.debug("Committing user transaction " + transactionManager().getTransaction()); } transactionManager().commit(); }
@Override public void rollback() throws IllegalStateException, SecurityException, SystemException { if (transactionLogger.isDebugEnabled()) { transactionLogger.debug("Rolling back user transaction " + transactionManager().getTransaction()); } transactionManager().rollback(); }
public String debug(final String message, final Throwable t) { if (isDebugEnabled()) { final String msg = getMessage(message, baseName); logStream.debug(msg, t); return msg; } return message; }
@Override public void clear(final Object key) { final WebBeansContext ctx = getContext((ClassLoader) key); if (logger.isDebugEnabled()) { logger.debug("Clearing:'" + ctx + "'"); } contextByClassLoader.remove(key); ctx.clear(); }
@Override public void clear(final Object key) { final WebBeansContext ctx = getContext((ClassLoader) key); if (logger.isDebugEnabled()) { logger.debug("Clearing:'" + ctx + "'"); } contextByClassLoader.remove(key); if (ctx != null) { ctx.clear(); } } }
@Override public int getStatus() throws SystemException { final int status = transactionManager().getStatus(); if (transactionLogger.isDebugEnabled()) { transactionLogger.debug("User transaction " + transactionManager().getTransaction() + " has status " + getStatus(status)); } return status; }
@Override public void begin() throws NotSupportedException, SystemException { check(); transactionManager().begin(); if (transactionLogger.isDebugEnabled()) { transactionLogger.debug("Started user transaction " + transactionManager().getTransaction()); } }
@Override public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException { check(); if (transactionLogger.isDebugEnabled()) { transactionLogger.debug("Committing user transaction " + transactionManager().getTransaction()); } transactionManager().commit(); }
public String debug(final String message, final Throwable t, final Object... args) { if (isDebugEnabled()) { String msg = getMessage(message, baseName); msg = formatMessage(msg, args); logStream.debug(msg, t); return msg; } return message; }
public String debug(final String message, final Object... args) { if (isDebugEnabled()) { String msg = getMessage(message, baseName); msg = formatMessage(msg, args); logStream.debug(msg); return msg; } return message; }
@Override public void setRollbackOnly() throws SystemException { if (transactionLogger.isDebugEnabled()) { transactionLogger.debug("Marking user transaction for rollback: " + transactionManager().getTransaction()); } transactionManager().setRollbackOnly(); }
private static void logExclusions(final String[] exclusionArray) { if (logger.isDebugEnabled()) { logger.debug("Exclusion prefixes: ["); for (final String ex : exclusionArray) { logger.debug("-" + ex); } logger.debug("]"); } }
public String debug(final String message, final Throwable t, final Object... args) { if (isDebugEnabled()) { String msg = getMessage(message, baseName); msg = formatMessage(msg, args); logStream.debug(msg, t); return msg; } return message; }
private static void logExclusions(final String[] exclusionArray) { if (logger.isDebugEnabled()) { logger.debug("Exclusion prefixes: ["); for (final String ex : exclusionArray) { logger.debug("-" + ex); } logger.debug("]"); } }
@Override public int getStatus() throws SystemException { check(); final int status = transactionManager().getStatus(); if (transactionLogger.isDebugEnabled()) { transactionLogger.debug("User transaction " + transactionManager().getTransaction() + " has status " + getStatus(status)); } return status; }
@Override public void setRollbackOnly() throws SystemException { check(); if (transactionLogger.isDebugEnabled()) { transactionLogger.debug("Marking user transaction for rollback: " + transactionManager().getTransaction()); } transactionManager().setRollbackOnly(); }
@Override public void init(final Properties props) throws Exception { this.logger = Logger.getInstance(LogCategory.OPENEJB_SERVER.createChild("service." + getName()), "org.apache.openejb.server.util.resources"); this.debug = this.logger.isDebugEnabled(); super.init(props); }