[jboss-user] [Messaging, JMS & JBossMQ] - Re: Can the Code get a QueueConnection objcect per request

shetty_ritesh do-not-reply at jboss.com
Fri May 16 14:15:05 EDT 2008


Adrian, thanks for your inputs.
If i use the following jboss resource adaptor connection pooling mechanism is it correct. We are currently using the jndi name "ConnectionFactory" for looking up the connection .  Will this be ok if i get the connection every request and then close it (as i am using the jca resource adaptor)
Also am a bit conused as to whould i be using "ConnectionFactory" or "java:/JmsXA" to look up for the connection 

Your anwer is greatly appreciated..


The file is jms-ds.xml*****************

  <!-- The JMS provider loader -->
  
    DefaultJMSProvider
    
      org.jboss.jms.jndi.JNDIProviderAdapter
    
    <!-- The combined connection factory -->
    java:/XAConnectionFactory
    <!-- The queue connection factory -->
    java:/XAConnectionFactory
    <!-- The topic factory -->
    java:/XAConnectionFactory
    <!-- Uncomment to use HAJNDI to access JMS
    
       java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
       java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
       java.naming.provider.url=localhost:1100
    
    -->
  

  <!-- The server session pool for Message Driven Beans -->
  
    <depends optional-attribute-name="XidFactory">jboss:service=XidFactory
    StdJMSPool
    
      org.jboss.jms.asf.StdServerSessionPoolFactory
    
  

  <!-- JMS XA Resource adapter, use this to get transacted JMS in beans -->
  <tx-connection-factory>
    <jndi-name>JmsXA</jndi-name>
    <xa-transaction/>
    <rar-name>jms-ra.rar</rar-name>
    <connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition>
    <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
    <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/DefaultJMSProvider</config-property>
    <max-pool-size>20</max-pool-size>
    <security-domain-and-application>JmsXARealm</security-domain-and-application>
  </tx-connection-factory> 



Also the uil2-service.xml file has folowing entries (same as per j boss docs)



 <!-- JBossMQ using the Unified Invocation Layer
       All communication uses one socket connection -->

  

    <!-- The server chain -->
    <depends optional-attribute-name="Invoker">jboss.mq:service=Invoker
    <!-- JNDI binding -->
    ConnectionFactory
    <!-- JNDI binding for XA -->
    XAConnectionFactory
    <!-- The bind address -->
    ${jboss.bind.address}
    <!-- The bind port -->
    8093
    <!-- The ping period in millis -->
    60000
    <!-- Whether tcp/ip does not wait for buffer fills -->
    true
    <!-- Used to disconnect the client on the serverside if there is no activity -->
    <!-- Ensure this is greater than the ping period -->
    120000
    <!-- Used to disconnect the client on the clientside if there is no activity -->
    <!-- Ensure this is greater than the ping period -->
    120000
    <!-- The size of the buffer (in bytes) wrapping the socket -->
    <!-- The buffer is flushed after each request -->
    2048
    <!-- Large messages may block the ping/pong -->
    <!-- A pong is simulated after each chunk (in bytes) for both reading and writing -->
    <!-- It must be larger than the buffer size -->
    1000000
  

  <!-- Aliases UIL -> UIL2 for backwards compatibility 
       the deprecated UIL deployment can be found in docs/examples/jca -->
   
      UILConnectionFactory
      ConnectionFactory
      jboss:service=Naming
   
   
      UILXAConnectionFactory
      XAConnectionFactory
      jboss:service=Naming
   
   
      UIL2ConnectionFactory
      ConnectionFactory
      jboss:service=Naming
   
   
      UIL2XAConnectionFactory
      XAConnectionFactory
      jboss:service=Naming
   

   <!--
      Two JNDI bindings that act like jms client connections remotely
      but have j2ee defined semantics inside JBoss
   -->
   
      QueueConnectionFactory
      ConnectionFactory
      java:/JmsXA
      jboss:service=Naming
   
   
      TopicConnectionFactory
      ConnectionFactory
      java:/JmsXA
      jboss:service=Naming
   

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4151530#4151530

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4151530



More information about the jboss-user mailing list