- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
Wildfly 10 开箱即用地将池连接工厂配置为具有两个条目的 JMS 子系统的一部分。
<pooled-connection-factory name="activemq-ra"
transaction="xa"
connectors="in-vm"
entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory"/>
人们可能会像这样注入(inject)连接工厂:
@Resource(mappedName = "java:jboss/DefaultJMSConnectionFactory")
private ConnectionFactory connectionFactory;
这和选择其他条目有什么区别; java:/JmsXA
?
最佳答案
没有什么区别,它是一个额外的 JNDI 条目,以适应 JMS 2 规范默认 ConnectionFactory
名称:java:comp/DefaultJMSConnectionFactory
您应该使用此名称来解析它。
Since JMS 2.0, a default JMS connection factory is accessible to EE application under the JNDI name java:comp/DefaultJMSConnectionFactory. WildFly messaging subsystem defines a pooled-connection-factory that is used to provide this default connection factory. Any parameter change on this pooled-connection-factory will be take into account by any EE application looking the default JMS provider under the JNDI name java:comp/DefaultJMSConnectionFactory.
See https://docs.jboss.org/author/display/WFLY9/Messaging+configuration
另一个只是一个旧标识符:
The JCA layer intercepts the calls to createConnection() and createSession() and provides a caching layer (amongst other things). So when you call createConnection() or createSession(), then, in most cases it's not really calling the actual JMS implementation to actually create a new JMS connection or JMS session, it's just returning one from it's own internal cache - in other words the JCA layer pools JMS connections and JMS sessions.
In JBoss application server, the "special" JMS connection factory which provides the JCA caching is usually available at java:/JmsXA in jndi.
参见https://developer.jboss.org/wiki/ShouldICacheJMSConnectionsAndJMSSessions
关于jms - DefaultJMSConnectionFactory 和 JmsXA 之间的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39962774/
Wildfly 10 开箱即用地将池连接工厂配置为具有两个条目的 JMS 子系统的一部分。 人们可能会像这样注入(inject)连接工厂: @Resource(mappedName =
我是一名优秀的程序员,十分优秀!