public static void configurationParsingError(final String messageType, final String message, final String line, final String column) { _logger.error("as0001", messageType, message, line, column); /* * An error broadcasting system is under development. * At this point an appropriate error would be broadcast to all listeners. */ }
public static void configurationParsingError(String messageType, String message, String line, String column) { _logger.error("as0001", messageType, message, line, column); /* * An error broadcasting system is under development. * At this point an appropriate error would be broadcast to all listeners. */ }
@Override public Object call() throws Exception { try { return homeMethodInvoke(interfce, method, args); } catch (final ApplicationException ae) { logger.error("EjbHomeProxyHandler: Asynchronous call to '" + interfce.getSimpleName() + "' on '" + method.getName() + "' failed", ae); throw ae; } } }), method.getReturnType() == Void.TYPE);
private void endRequest() { for (final Runnable r : endRequestRunnables.get()) { try { r.run(); } catch (final Exception e) { logger.error(e.getMessage(), e); } } endRequestRunnables.remove(); }
public static void handleUnknownError(final Throwable error, final String systemLocation) { final ByteArrayOutputStream baos = new ByteArrayOutputStream(); final PrintWriter pw = new PrintWriter(baos); error.printStackTrace(pw); pw.flush(); pw.close(); _logger.error("ge0001", systemLocation, new String(baos.toByteArray())); /* * An error broadcasting system is under development. * At this point an appropriate error would be broadcast to all listeners. */ }
public static void unregisterSilently(final ObjectName name) { try { get().unregisterMBean(name); } catch (final Exception e) { LOGGER.error("Cannot unregister MBean " + name, e); } }
public static Collection<Class<?>> findExtensions(final Finder finder) { try { return finder.findAvailableClasses("org.apache.openejb.extension"); } catch (final IOException e) { LOGGER.error("Extension scanning of 'META-INF/org.apache.openejb.extension' files failed", e); return Collections.emptySet(); } }
@Override public void run() { try { scan(); } catch (final Exception e) { logger.error("Scan failed.", e); } } }, pollIntervalMillis, pollIntervalMillis);
public void addJarFileUrls(final String file) { if (new File(file).exists()) { // should we test real urls? try { entityManagerFactoryCallable.getUnitInfo().getJarFileUrls().add(new URL(file)); } catch (final MalformedURLException e) { LOGGER.error("url " + file + " is malformed"); } } else { LOGGER.error("url " + file + " is not correct"); } }
public synchronized void reload() { try { createDelegate(); } catch (final Exception e) { LOGGER.error("can't replace EntityManagerFactory " + delegate, e); } }
public void run() { try { scan(); } catch (Exception e) { getLogger().error("Scan failed.", e); } } }, pollIntervalMillis, pollIntervalMillis);
private void flushLine() { if (!errorWriter) logger.info(text.toString()); else logger.error(text.toString()); text.setLength(0); }
private void optionalService(Properties properties, String className) { try { Service service = (Service) getClass().getClassLoader().loadClass(className).newInstance(); service.init(properties); } catch (ClassNotFoundException e) { logger.info("Optional service not installed: " + className); } catch (Exception e) { logger.error("Failed to start: " + className, e); } }
public static void addExtensions(final ClassLoader loader, final Collection<String> classes) { for (final String clazz : classes) { try { final Object object = loader.loadClass(clazz).getConstructor().newInstance(); SystemInstance.get().addObserver(object); } catch (final Throwable t) { LOGGER.error("Extension construction failed" + clazz, t); } } }
public static void addExtensions(final Collection<Class<?>> classes) { for (final Class<?> clazz : classes) { try { final Object object = clazz.getConstructor().newInstance(); SystemInstance.get().addObserver(object); } catch (final Throwable t) { LOGGER.error("Extension construction failed" + clazz.getName(), t); } } }
public static void addExtensions(final ClassLoader loader, final Collection<String> classes) { for (final String clazz : classes) { try { final Object object = loader.loadClass(clazz).newInstance(); SystemInstance.get().addObserver(object); } catch (final Throwable t) { LOGGER.error("Extension construction failed" + clazz, t); } } }
protected Transaction getTransaction() throws SystemException { try { return transactionManager.getTransaction(); } catch (final javax.transaction.SystemException e) { txLogger.error("The Transaction Manager has encountered an unexpected error condition while attempting to obtain current transaction: {0}", e.getMessage()); throw new SystemException(e); } }
protected Transaction getTransaction() throws SystemException { try { return transactionManager.getTransaction(); } catch (javax.transaction.SystemException e) { txLogger.error("The Transaction Manager has encountered an unexpected error condition while attempting to obtain current transaction: {0}", e.getMessage()); throw new SystemException(e); } }
@Override public void run() { try { stopImpl(); } catch (final Throwable t) { Logger.getInstance(LogCategory.OPENEJB_STARTUP, ActiveMQResourceAdapter.class).getChildLogger("service").error("ActiveMQ shutdown failed", t); } } };
protected void setRollbackOnly(Transaction tx) { try { if (tx != null && tx.getStatus() == Status.STATUS_ACTIVE) { tx.setRollbackOnly(); txLogger.debug("TX {0}: setRollbackOnly() on transaction {1}", transactionType, tx); } } catch (Exception e) { txLogger.error("Exception during setRollbackOnly()", e); throw new IllegalStateException("No transaction active", e); } }