[心缘地方]同学录
首页 | 功能说明 | 站长通知 | 最近更新 | 编码查看转换 | 代码下载 | 常见问题及讨论 | 《深入解析ASP核心技术》 | 王小鸭自动发工资条VBA版
登录系统:用户名: 密码: 如果要讨论问题,请先注册。

[备忘]JBOSS 配置连接工厂,JBOSS Configuring Connection Factories

上一篇:[备忘]richfaces的日期控件导致页面载入慢。[已解决]
下一篇:[转贴]JDBC批量插入的例子(JDBC batch insert,JDBC Prepared Statement Addbatch)

添加日期:2009/1/7 15:33:46 快速返回   返回列表 阅读4653次
没试过,不知道行不行。

5.7. Configuring Connection Factories

With the default configuration JBoss Messaging binds two connection factories in JNDI at start-up. 

The first connection factory is the default non-clustered connection factory and is bound into the following JNDI contexts: /ConnectionFactory, 
/XAConnectionFactory, java:/ConnectionFactory, java:/XAConnectionFactory. 

This connection factory is provided to maintain compatibility with applications 
originally written against JBoss MQ which has no automatic failover or load 
balancing. 

This connection factory should be used if you do not require client 
side automatic failover or load balancing. 

The second connection factory is the default clustered connection factory and is bound into the following JNDI contexts /ClusteredConnectionFactory, 
/ClusteredXAConnectionFactory, java:/ClusteredConnectionFactory, 
java:/ClusteredXAConnectionFactory. 

You may want to configure additional connection factories, for instance if you 
want to provide a default client id for a connection factory, or if you want to 
bind it in different places in JNDI, if you want different connection factories 
to use different transports, or if you want to selective enable or disable 
load-balancing and/or automatic failover for a particular connection factory. 

Deploying a new connection factory is equivalent with adding a new 
ConnectionFactory MBean configuration to connection-factories-service.xml. 
It is also possible to create an entirely new service deployment descriptor 
xxx-service.xml altogether and deploy it in $JBOSS_HOME/server/messaging/deploy. 

Connection factories can support automatic failover and/or load-balancing by 
setting the corresponding attributes 

An example connection factory configuration is presented below: 


<mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
      name="jboss.messaging.connectionfactory:service=MyConnectionFactory"
      xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
      <depends optional-attribute-name="ServerPeer">
                 jboss.messaging:service=ServerPeer
      </depends>
      <depends optional-attribute-name="Connector">
                 jboss.messaging:service=Connector,transport=bisocket
      </depends>
      <depends>jboss.messaging:service=PostOffice</depends>

      <attribute name="JNDIBindings">
         <bindings>
            <binding>/MyConnectionFactory</binding>
            <binding>/factories/cf</binding>
         </bindings>
      </attribute>
      
      <attribute name="ClientID">myClientID</attribute>

      <attribute name="SupportsFailover">true</attribute>
      
      <attribute name="SupportsLoadBalancing">false</attribute>  
      
      <attribute name="LoadBalancingFactory">org.acme.MyLoadBalancingFactory</attribute>
          
      <attribute name="PrefetchSize">1000</attribute> 

      <attribute name="SlowConsumers">false</attribute>
      
      <attribute name="StrictTck">true</attribute>

      <attribute name="DefaultTempQueueFullSize">50000</attribute>
      
      <attribute name="DefaultTempQueuePageSize">1000</attribute> 
            
      <attribute name="DefaultTempQueueDownCacheSize">1000</attribute> 
      
      <attribute name="DupsOKBatchSize">10000</attribute> 
   </mbean>



             
The above example would create a connection factory with pre-configured client 
ID myClientID and bind the connection factory in two places in the JNDI tree: 
/MyConnectionFactory and /factories/cf. 

The connection factory overrides the default values for PreFetchSize, DefaultTempQueueFullSize, 
DefaultTempQueuePageSize, DefaultTempQueueDownCacheSize and DupsOKBatchSize, 
SupportsFailover, SupportsLoadBalancing and LoadBalancingFactory. 

The connection factory will use the default remoting connector. 

To use a different remoting connector with the connection factory change the Connector attribute to specify the service name of the connector you wish to use. 
 

评论 COMMENTS
没有评论 No Comments.

添加评论 Add new comment.
昵称 Name:
评论内容 Comment:
验证码(不区分大小写)
Validation Code:
(not case sensitive)
看不清?点这里换一张!(Change it here!)
 
评论由管理员查看后才能显示。the comment will be showed after it is checked by admin.
CopyRight © 心缘地方 2005-2999. All Rights Reserved