org.apache.openejb.util.Logger.error()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(6.6k)|赞(0)|评价(0)|浏览(219)

本文整理了Java中org.apache.openejb.util.Logger.error()方法的一些代码示例,展示了Logger.error()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.error()方法的具体详情如下:
包路径:org.apache.openejb.util.Logger
类名称:Logger
方法名:error

Logger.error介绍

暂无

代码示例

代码示例来源:origin: org.apache.tomee/openejb-core

  1. public static void configurationParsingError(final String messageType, final String message, final String line, final String column) {
  2. _logger.error("as0001", messageType, message, line, column);
  3. /*
  4. * An error broadcasting system is under development.
  5. * At this point an appropriate error would be broadcast to all listeners.
  6. */
  7. }

代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-core

  1. public static void configurationParsingError(String messageType, String message, String line, String column) {
  2. _logger.error("as0001", messageType, message, line, column);
  3. /*
  4. * An error broadcasting system is under development.
  5. * At this point an appropriate error would be broadcast to all listeners.
  6. */
  7. }

代码示例来源:origin: org.apache.tomee/openejb-core

  1. @Override
  2. public Object call() throws Exception {
  3. try {
  4. return homeMethodInvoke(interfce, method, args);
  5. } catch (final ApplicationException ae) {
  6. logger.error("EjbHomeProxyHandler: Asynchronous call to '" + interfce.getSimpleName() + "' on '" + method.getName() + "' failed", ae);
  7. throw ae;
  8. }
  9. }
  10. }), method.getReturnType() == Void.TYPE);

代码示例来源:origin: org.apache.openejb/openejb-core

  1. private void endRequest() {
  2. for (final Runnable r : endRequestRunnables.get()) {
  3. try {
  4. r.run();
  5. } catch (final Exception e) {
  6. logger.error(e.getMessage(), e);
  7. }
  8. }
  9. endRequestRunnables.remove();
  10. }

代码示例来源:origin: org.apache.openejb/openejb-core

  1. public static void handleUnknownError(final Throwable error, final String systemLocation) {
  2. final ByteArrayOutputStream baos = new ByteArrayOutputStream();
  3. final PrintWriter pw = new PrintWriter(baos);
  4. error.printStackTrace(pw);
  5. pw.flush();
  6. pw.close();
  7. _logger.error("ge0001", systemLocation, new String(baos.toByteArray()));
  8. /*
  9. * An error broadcasting system is under development.
  10. * At this point an appropriate error would be broadcast to all listeners.
  11. */
  12. }

代码示例来源:origin: org.apache.openejb/openejb-core

  1. public static void unregisterSilently(final ObjectName name) {
  2. try {
  3. get().unregisterMBean(name);
  4. } catch (final Exception e) {
  5. LOGGER.error("Cannot unregister MBean " + name, e);
  6. }
  7. }

代码示例来源:origin: org.apache.openejb/openejb-core

  1. public static Collection<Class<?>> findExtensions(final Finder finder) {
  2. try {
  3. return finder.findAvailableClasses("org.apache.openejb.extension");
  4. } catch (final IOException e) {
  5. LOGGER.error("Extension scanning of 'META-INF/org.apache.openejb.extension' files failed", e);
  6. return Collections.emptySet();
  7. }
  8. }

代码示例来源:origin: org.apache.tomee/openejb-core

  1. @Override
  2. public void run() {
  3. try {
  4. scan();
  5. } catch (final Exception e) {
  6. logger.error("Scan failed.", e);
  7. }
  8. }
  9. }, pollIntervalMillis, pollIntervalMillis);

代码示例来源:origin: org.apache.tomee/openejb-core

  1. public void addJarFileUrls(final String file) {
  2. if (new File(file).exists()) { // should we test real urls?
  3. try {
  4. entityManagerFactoryCallable.getUnitInfo().getJarFileUrls().add(new URL(file));
  5. } catch (final MalformedURLException e) {
  6. LOGGER.error("url " + file + " is malformed");
  7. }
  8. } else {
  9. LOGGER.error("url " + file + " is not correct");
  10. }
  11. }

代码示例来源:origin: org.apache.openejb/openejb-core

  1. public synchronized void reload() {
  2. try {
  3. createDelegate();
  4. } catch (final Exception e) {
  5. LOGGER.error("can't replace EntityManagerFactory " + delegate, e);
  6. }
  7. }

代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-core

  1. public void run() {
  2. try {
  3. scan();
  4. }
  5. catch (Exception e) {
  6. getLogger().error("Scan failed.", e);
  7. }
  8. }
  9. }, pollIntervalMillis, pollIntervalMillis);

代码示例来源:origin: org.apache.openejb/openejb-hsql

  1. private void flushLine() {
  2. if (!errorWriter)
  3. logger.info(text.toString());
  4. else
  5. logger.error(text.toString());
  6. text.setLength(0);
  7. }

代码示例来源:origin: org.apache.openejb/tomee-catalina

  1. private void optionalService(Properties properties, String className) {
  2. try {
  3. Service service = (Service) getClass().getClassLoader().loadClass(className).newInstance();
  4. service.init(properties);
  5. } catch (ClassNotFoundException e) {
  6. logger.info("Optional service not installed: " + className);
  7. } catch (Exception e) {
  8. logger.error("Failed to start: " + className, e);
  9. }
  10. }

代码示例来源:origin: org.apache.tomee/openejb-core

  1. public static void addExtensions(final ClassLoader loader, final Collection<String> classes) {
  2. for (final String clazz : classes) {
  3. try {
  4. final Object object = loader.loadClass(clazz).getConstructor().newInstance();
  5. SystemInstance.get().addObserver(object);
  6. } catch (final Throwable t) {
  7. LOGGER.error("Extension construction failed" + clazz, t);
  8. }
  9. }
  10. }

代码示例来源:origin: org.apache.tomee/openejb-core

  1. public static void addExtensions(final Collection<Class<?>> classes) {
  2. for (final Class<?> clazz : classes) {
  3. try {
  4. final Object object = clazz.getConstructor().newInstance();
  5. SystemInstance.get().addObserver(object);
  6. } catch (final Throwable t) {
  7. LOGGER.error("Extension construction failed" + clazz.getName(), t);
  8. }
  9. }
  10. }

代码示例来源:origin: org.apache.openejb/openejb-core

  1. public static void addExtensions(final ClassLoader loader, final Collection<String> classes) {
  2. for (final String clazz : classes) {
  3. try {
  4. final Object object = loader.loadClass(clazz).newInstance();
  5. SystemInstance.get().addObserver(object);
  6. } catch (final Throwable t) {
  7. LOGGER.error("Extension construction failed" + clazz, t);
  8. }
  9. }
  10. }

代码示例来源:origin: org.apache.tomee/openejb-core

  1. protected Transaction getTransaction() throws SystemException {
  2. try {
  3. return transactionManager.getTransaction();
  4. } catch (final javax.transaction.SystemException e) {
  5. txLogger.error("The Transaction Manager has encountered an unexpected error condition while attempting to obtain current transaction: {0}", e.getMessage());
  6. throw new SystemException(e);
  7. }
  8. }

代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-core

  1. protected Transaction getTransaction() throws SystemException {
  2. try {
  3. return transactionManager.getTransaction();
  4. } catch (javax.transaction.SystemException e) {
  5. txLogger.error("The Transaction Manager has encountered an unexpected error condition while attempting to obtain current transaction: {0}", e.getMessage());
  6. throw new SystemException(e);
  7. }
  8. }

代码示例来源:origin: org.apache.tomee/openejb-core

  1. @Override
  2. public void run() {
  3. try {
  4. stopImpl();
  5. } catch (final Throwable t) {
  6. Logger.getInstance(LogCategory.OPENEJB_STARTUP, ActiveMQResourceAdapter.class).getChildLogger("service").error("ActiveMQ shutdown failed", t);
  7. }
  8. }
  9. };

代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-core

  1. protected void setRollbackOnly(Transaction tx) {
  2. try {
  3. if (tx != null && tx.getStatus() == Status.STATUS_ACTIVE) {
  4. tx.setRollbackOnly();
  5. txLogger.debug("TX {0}: setRollbackOnly() on transaction {1}", transactionType, tx);
  6. }
  7. } catch (Exception e) {
  8. txLogger.error("Exception during setRollbackOnly()", e);
  9. throw new IllegalStateException("No transaction active", e);
  10. }
  11. }

相关文章