本文整理了Java中org.apache.openejb.util.Logger.warning()
方法的一些代码示例,展示了Logger.warning()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.warning()
方法的具体详情如下:
包路径:org.apache.openejb.util.Logger
类名称:Logger
方法名:warning
暂无
代码示例来源:origin: org.apache.tomee/openejb-core
@Override
public void run() {
for (final String mapping : mappings) {
try {
addFilterMethod.invoke(null, clazz.getName(), webContext, mapping, config);
deployedWebObjects.filterMappings.add(mapping);
} catch (final Exception e) {
LOGGER.warning(e.getMessage(), e);
}
}
}
});
代码示例来源:origin: org.apache.tomee/openejb-core
@Override
public void run() {
for (final String mapping : mappings) {
try {
addServletMethod.invoke(null, clazz.getName(), webContext, mapping);
deployedWebObjects.mappings.add(mapping);
} catch (final Exception e) {
LOGGER.warning(e.getMessage(), e);
}
}
}
});
代码示例来源:origin: org.apache.openejb/openejb-core
private static Provider createProviderInstance(final String providerClass, final ClassLoader classLoader) {
if (providerClass != null && providerClass.length() > 0 && !providerClass.equals(ProviderWrapper.class.getName())) {
try {
final Class<? extends Provider> clazz = classLoader.loadClass(providerClass).asSubclass(Provider.class);
return clazz.newInstance();
} catch (final Throwable e) {
logger.warning("Unable to construct provider implementation " + providerClass, e);
}
}
return null;
}
代码示例来源:origin: org.apache.tomee/openejb-core
private static Provider createProviderInstance(final String providerClass, final ClassLoader classLoader) {
if (providerClass != null && providerClass.length() > 0 && !providerClass.equals(ProviderWrapper.class.getName())) {
try {
final Class<? extends Provider> clazz = classLoader.loadClass(providerClass).asSubclass(Provider.class);
return clazz.newInstance();
} catch (final Throwable e) {
logger.warning("Unable to construct provider implementation " + providerClass, e);
}
}
return null;
}
代码示例来源:origin: org.apache.openejb/openejb-core
@Override
public void run() {
try {
//Force a shutdown without waiting for jobs to complete.
s.shutdown(false);
log.warning("Forced " + name + " shutdown - Jobs may be incomplete");
} catch (final Throwable e) {
ex.set(e);
}
}
};
代码示例来源:origin: org.apache.tomee/openejb-core
@Override
public void run() {
try {
//Force a shutdown without waiting for jobs to complete.
s.shutdown(false);
log.warning("Forced " + name + " shutdown - Jobs may be incomplete");
} catch (final Throwable e) {
ex.set(e);
}
}
};
代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-core
private void doAfterCompletion(int status) {
for (Synchronization sync : new ArrayList<Synchronization>(registeredSynchronizations)) {
try {
sync.afterCompletion(status);
} catch (RuntimeException e) {
logger.warning("Synchronization afterCompletion threw a RuntimeException", e);
}
}
}
代码示例来源:origin: org.apache.openejb/openejb-core
private void doAfterCompletion(final int status) {
for (final Synchronization sync : new ArrayList<Synchronization>(registeredSynchronizations)) {
try {
sync.afterCompletion(status);
} catch (final RuntimeException e) {
logger.warning("Synchronization afterCompletion threw a RuntimeException", e);
}
}
}
代码示例来源:origin: org.apache.openejb/openejb-http
@Override
public void contextInitialized(final ServletContextEvent servletContextEvent) {
try {
OpenEJBLifecycle.initializeServletContext(servletContextEvent.getServletContext(), webBeansContext);
} catch (final Exception e) {
logger.warning(e.getMessage(), e);
}
ensureRequestScope();
}
代码示例来源:origin: org.apache.openejb/openejb-core
@Override
public void run() {
try {
//Force a shutdown without waiting for jobs to complete.
s.shutdown(false);
Logger.getInstance(LogCategory.OPENEJB, "org.apache.openejb.util.resources").warning("Forced Quartz stop - Jobs may be incomplete");
} catch (final Throwable e) {
QuartzResourceAdapter.this.ex.set(e);
}
}
};
代码示例来源:origin: org.apache.tomee/openejb-core
private static void unusedProperty(final String id, final Logger parentLogger, final String property) {
if (isInternalProperty(property)) {
return;
}
final String msg = "unused property '" + property + "' for resource '" + id + "'";
if (null != parentLogger) {
parentLogger.getChildLogger("service").warning(msg);
} else { // note: we should throw an exception if this is called, shouldnt be possible in our lifecycle
System.out.println(msg);
}
}
代码示例来源:origin: org.apache.tomee/openejb-core
public void addDeploymentListener(final DeploymentListener deploymentListener) {
final ReentrantLock l = lock;
l.lock();
try {
logger.warning("DeploymentListener API is replaced by @Observes event");
SystemInstance.get().addObserver(new DeploymentListenerObserver(deploymentListener));
} finally {
l.unlock();
}
}
代码示例来源:origin: org.apache.openejb/openejb-core
public void addDeploymentListener(final DeploymentListener deploymentListener) {
final ReentrantLock l = lock;
l.lock();
try {
logger.warning("DeploymentListener API is replaced by @Observes event");
SystemInstance.get().addObserver(new DeploymentListenerObserver(deploymentListener));
} finally {
l.unlock();
}
}
代码示例来源:origin: org.apache.openejb/openejb-core
@Override
public void removeTimer(final long id) {
try {
getTasks().removeTimerData(id);
} catch (final TimerStoreException e) {
log.warning("Unable to remove timer data from memory store", e);
}
}
代码示例来源:origin: org.apache.tomee/openejb-core
@Override
public void removeTimer(final long id) {
try {
getTasks().removeTimerData(id);
} catch (final TimerStoreException e) {
log.warning("Unable to remove timer data from memory store", e);
}
}
代码示例来源:origin: org.apache.tomee/openejb-core
private ScheduledExecutorService createScheduledExecutorService() {
ManagedThreadFactory managedThreadFactory;
try {
managedThreadFactory = ThreadFactories.findThreadFactory(threadFactory);
} catch (final Exception e) {
Logger.getInstance(LogCategory.OPENEJB, ManagedScheduledExecutorServiceImplFactory.class).warning("Unable to create configured thread factory: " + threadFactory, e);
managedThreadFactory = new ManagedThreadFactoryImpl();
}
return new ScheduledThreadPoolExecutor(core, managedThreadFactory, CURejectHandler.INSTANCE);
}
代码示例来源:origin: org.apache.openejb/openejb-core
/**
* Returns a timerData to the TimerStore, if a cancel() is rolled back.
*
* @param timerData the timer to be returned to the timer store
*/
public void addTimerData(final TimerData timerData) {
try {
timerStore.addTimerData(timerData);
} catch (final Exception e) {
log.warning("Could not add timer of type " + timerData.getType().name() + " due to " + e.getMessage());
}
}
代码示例来源:origin: org.apache.tomee/openejb-core
@ManagedOperation
@Description("change the validation mode if possible (value is ok)")
public void setValidationMode(final String value) {
try {
final ValidationMode mode = ValidationMode.valueOf(value.trim().toUpperCase());
reloadableEntityManagerFactory.setValidationMode(mode);
} catch (final Exception iae) {
LOGGER.warning("Can't set validation mode " + value, iae);
reloadableEntityManagerFactory.setProperty(JAVAX_PERSISTENCE_VALIDATION_MODE, value);
}
}
代码示例来源:origin: org.apache.openejb/openejb-core
@ManagedOperation
@Description("change the validation mode if possible (value is ok)")
public void setValidationMode(final String value) {
try {
final ValidationMode mode = ValidationMode.valueOf(value.trim().toUpperCase());
reloadableEntityManagerFactory.setValidationMode(mode);
} catch (final Exception iae) {
LOGGER.warning("Can't set validation mode " + value, iae);
reloadableEntityManagerFactory.setProperty(JAVAX_PERSISTENCE_VALIDATION_MODE, value);
}
}
代码示例来源:origin: org.apache.tomee/openejb-cxf
private static void loadOASISCatalog(Bus bus, URL catalogURL) {
OASISCatalogManager catalog = new OASISCatalogManager();
try {
catalog.loadCatalog(catalogURL);
logger.debug("Loaded " + catalogURL + " catalog.");
bus.setExtension(catalog, OASISCatalogManager.class);
} catch (IOException e) {
logger.warning("Failed to load catalog file: " + catalogURL, e);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!