- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中bitronix.tm.resource.common.XAResourceProducer.init()
方法的一些代码示例,展示了XAResourceProducer.init()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XAResourceProducer.init()
方法的具体详情如下:
包路径:bitronix.tm.resource.common.XAResourceProducer
类名称:XAResourceProducer
方法名:init
[英]Initialize this XAResourceProducer's internal resources.
[中]初始化此XAResourceProducer的内部资源。
代码示例来源:origin: com.github.marcus-nl.btm/btm
/**
* Initialize {@link XAResourceProducer}s given a set of properties.
* @param properties the properties to use for initialization.
* @return the number of resources which failed to initialize.
*/
int initXAResourceProducers(Properties properties) {
Map<String, List<PropertyPair>> entries = buildConfigurationEntriesMap(properties);
int errorCount = 0;
for (Map.Entry<String, List<PropertyPair>> entry : entries.entrySet()) {
String uniqueName = entry.getKey();
List<PropertyPair> propertyPairs = entry.getValue();
XAResourceProducer producer = buildXAResourceProducer(uniqueName, propertyPairs);
if (ResourceRegistrar.get(producer.getUniqueName()) != null) {
if (log.isDebugEnabled()) { log.debug("resource already registered, skipping it:" + producer.getUniqueName()); }
continue;
}
if (log.isDebugEnabled()) { log.debug("creating resource " + producer); }
try {
producer.init();
} catch (ResourceConfigurationException ex) {
log.warn("unable to create resource with unique name " + producer.getUniqueName(), ex);
producer.close();
errorCount++;
}
resourcesByUniqueName.put(producer.getUniqueName(), producer);
}
return errorCount;
}
代码示例来源:origin: bitronix/btm
/**
* Initialize {@link XAResourceProducer}s given a set of properties.
* @param properties the properties to use for initialization.
* @return the number of resources which failed to initialize.
*/
int initXAResourceProducers(Properties properties) {
Map<String, List<PropertyPair>> entries = buildConfigurationEntriesMap(properties);
int errorCount = 0;
for (Map.Entry<String, List<PropertyPair>> entry : entries.entrySet()) {
String uniqueName = entry.getKey();
List<PropertyPair> propertyPairs = entry.getValue();
XAResourceProducer producer = buildXAResourceProducer(uniqueName, propertyPairs);
if (ResourceRegistrar.get(producer.getUniqueName()) != null) {
if (log.isDebugEnabled()) { log.debug("resource already registered, skipping it:" + producer.getUniqueName()); }
continue;
}
if (log.isDebugEnabled()) { log.debug("creating resource " + producer); }
try {
producer.init();
} catch (ResourceConfigurationException ex) {
log.warn("unable to create resource with unique name " + producer.getUniqueName(), ex);
producer.close();
errorCount++;
}
resourcesByUniqueName.put(producer.getUniqueName(), producer);
}
return errorCount;
}
代码示例来源:origin: org.codehaus.btm/btm
/**
* Initialize {@link XAResourceProducer}s given a set of properties.
* @param properties the properties to use for initialization.
* @return the number of resources which failed to initialize.
*/
int initXAResourceProducers(Properties properties) {
Map<String, List<PropertyPair>> entries = buildConfigurationEntriesMap(properties);
int errorCount = 0;
for (Map.Entry<String, List<PropertyPair>> entry : entries.entrySet()) {
String uniqueName = entry.getKey();
List<PropertyPair> propertyPairs = entry.getValue();
XAResourceProducer producer = buildXAResourceProducer(uniqueName, propertyPairs);
if (ResourceRegistrar.get(producer.getUniqueName()) != null) {
if (log.isDebugEnabled()) log.debug("resource already registered, skipping it:" + producer.getUniqueName());
continue;
}
if (log.isDebugEnabled()) log.debug("creating resource " + producer);
try {
producer.init();
} catch (ResourceConfigurationException ex) {
log.warn("unable to create resource with unique name " + producer.getUniqueName(), ex);
producer.close();
errorCount++;
}
resourcesByUniqueName.put(producer.getUniqueName(), producer);
}
return errorCount;
}
代码示例来源:origin: org.mule.btm/mule-btm
/**
* Initialize {@link XAResourceProducer}s given a set of properties.
* @param properties the properties to use for initialization.
* @return the number of resources which failed to initialize.
*/
int initXAResourceProducers(Properties properties) {
Map<String, List<PropertyPair>> entries = buildConfigurationEntriesMap(properties);
int errorCount = 0;
for (Map.Entry<String, List<PropertyPair>> entry : entries.entrySet()) {
String uniqueName = entry.getKey();
List<PropertyPair> propertyPairs = entry.getValue();
XAResourceProducer producer = buildXAResourceProducer(uniqueName, propertyPairs);
if (ResourceRegistrar.get(producer.getUniqueName()) != null) {
if (log.isDebugEnabled()) log.debug("resource already registered, skipping it:" + producer.getUniqueName());
continue;
}
if (log.isDebugEnabled()) log.debug("creating resource " + producer);
try {
producer.init();
} catch (ResourceConfigurationException ex) {
log.warn("unable to create resource with unique name " + producer.getUniqueName(), ex);
producer.close();
errorCount++;
}
resourcesByUniqueName.put(producer.getUniqueName(), producer);
}
return errorCount;
}
本文整理了Java中bitronix.tm.resource.common.XAResourceProducer.getUniqueName()方法的一些代码示例,展示了XAResourceProdu
本文整理了Java中bitronix.tm.resource.common.XAResourceProducer.setFailed()方法的一些代码示例,展示了XAResourceProducer.
本文整理了Java中bitronix.tm.resource.common.XAResourceProducer.createPooledConnection()方法的一些代码示例,展示了XAReso
本文整理了Java中bitronix.tm.resource.common.XAResourceProducer.endRecovery()方法的一些代码示例,展示了XAResourceProduce
本文整理了Java中bitronix.tm.resource.common.XAResourceProducer.close()方法的一些代码示例,展示了XAResourceProducer.clos
本文整理了Java中bitronix.tm.resource.common.XAResourceProducer.findXAResourceHolder()方法的一些代码示例,展示了XAResour
本文整理了Java中bitronix.tm.resource.common.XAResourceProducer.init()方法的一些代码示例,展示了XAResourceProducer.init(
本文整理了Java中bitronix.tm.resource.common.XAResourceProducer.startRecovery()方法的一些代码示例,展示了XAResourceProdu
我是一名优秀的程序员,十分优秀!