[jboss-user] [Installation, Configuration & Deployment] - How can I create my own Connection Factory?
lmsook
do-not-reply at jboss.com
Mon Dec 11 12:50:09 EST 2006
Hello,
I'm a beginner in JBoss and I read the related topic to my question, but I can not still find the solution.
What I want is that I want to have 2 my own Topic Connection Factory and 1 my own Queue Connection Factory besides the default ConnectionFactory JBoss provides.
What I did was adding below codes to /deploy/jms/uil2-service.xml file
<mbean code="org.jboss.naming.LinkRefPairService"
| name="jboss.jms:alias=PrimaryTCF">
| <attribute name="JndiName">PrimaryTCF</attribute>
| <attribute name="RemoteJndiName">PrimaryTCF</attribute>
| <attribute name="LocalJndiName">java:/UserJmsXA</attribute>
| <depends>jboss:service=Naming</depends>
| </mbean>
|
| <mbean code="org.jboss.naming.LinkRefPairService"
| name="jboss.jms:alias=SiteSubscriptionTCF">
| <attribute name="JndiName">SiteSubscriptionTCF</attribute>
| <attribute name="RemoteJndiName">SiteSubscriptionTCF</attribute>
| <attribute name="LocalJndiName">java:/UserJmsXA2</attribute>
| <depends>jboss:service=Naming</depends>
| </mbean>
|
| <mbean code="org.jboss.naming.LinkRefPairService"
| name="jboss.jms:alias=SiteSubscriptionQCF">
| <attribute name="JndiName">SiteSubscriptionQCF</attribute>
| <attribute name="RemoteJndiName">SiteSubscriptionQCF</attribute>
| <attribute name="LocalJndiName">java:/UserJmsXA3</attribute>
| <depends>jboss:service=Naming</depends>
| </mbean>
|
And I also added below codes to the /deploy/jms/jms-ds.xml
<tx-connection-factory>
| <jndi-name>UserJmsXA</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>
|
| <tx-connection-factory>
| <jndi-name>UserJmsXA2</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>
|
| <tx-connection-factory>
| <jndi-name>UserJmsXA3</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.Queue</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>
|
As I run the application trying to connect those PrimaryTCF,SiteSubscriptionTCF,SiteSubscriptionQCF, it gives me
sometimes "Bus error" and sometimes "java.lang.StackOverflowError"
Would you please point out what's wrong with my codes and how I can fix it?
Thanks for your help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992851#3992851
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992851
More information about the jboss-user
mailing list