-
1. Re: Setup JMS resource adapter problem
willievu Sep 26, 2001 5:09 AM (in response to willievu)I'm using JBoss 2.4.1a with Tomcat 3.2.3. The JMS portion of jboss.jcml looks like this:
<!-- For Message Driven Beans -->
DefaultJMSProvider
org.jboss.jms.jndi.JBossMQProvider
java:/XAConnectionFactory
java:/XAConnectionFactory
StdJMSPool
org.jboss.jms.asf.StdServerSessionPoolFactory
../../db/jbossmq/
<!-- JMS XA Resource adapter, use this to get transacted JMS in beans -->
JmsXA
JCA:service=RARDeployer
JMS Adapter
MinervaXACMFactory
<!-- See the documentation for the specific connection manager
implementation you are using for the properties you can set -->
# Pool type - uncomment to force, otherwise it is the default
#PoolConfiguration=per-factory
# Connection pooling properties - see
# org.jboss.pool.PoolParameters
MinSize=5
MaxSize=10
Blocking=true
GCEnabled=false
IdleTimeoutEnabled=false
InvalidateOnError=false
TrackLastUsed=false
GCIntervalMillis=120000
GCMinIdleMillis=1200000
IdleTimeoutMillis=1800000
MaxIdleTimeoutPercent=1.0
<!-- Principal mapping configuration -->
org.jboss.resource.security.ManyToOnePrincipalMapping
userName=sa
password=
Thanks again. -
2. Re: Setup JMS resource adapter problem
pra Sep 26, 2001 1:12 PM (in response to willievu)Seems strange. Have you tested to do it without your added principal mapping?
//Peter -
3. Re: Setup JMS resource adapter problem
willievu Sep 26, 2001 8:36 PM (in response to willievu)Yes I did. I am using JAAS though for EJBs. Does it have something to do with this JMS security problem?
-
4. Re: Setup JMS resource adapter problem
davidjencks Sep 27, 2001 1:14 AM (in response to willievu)Aha! you have to set minsize 0 in the pool unless you can supply default credentials to the adapter. In this case, the adapter does not support UserName and Password attributes, so you can't. The "Minsize" connections are created with no context, so there is no way to get a Subject unless the adapter is configured with a default. (JBoss can't really know that the ManyToOnePrincipalMapping always returns the same Subject)
So -- you should set minsize 0 and we should add UserName and Password to the rar (and provide them to ManagedConnections as default).
And I should add a comment in the manual about this gotcha.
Peter, would you like to do this (modify the rar) or shall I?
thanks
david jencks -
5. Re: Setup JMS resource adapter problem
willievu Sep 27, 2001 7:32 AM (in response to willievu)ok. I tried David's suggestion. However, when my entity bean tries to get a connection, the server encounters problem. It keeps saying connection factory is not bound by the JNDI name. Here is the server log:
----------------
[JmsXA] Unable to create ManagedConnection: javax.resource.spi.CommException: javax.naming.NameNotFoundException: INVMXATopicConnectionFactory not bound
[JmsXA] Pool org.jboss.jms.ra.JmsManagedConnectionFactory-1 factory org.jboss.pool.connector.ManagedConnectionPoolFactory@688b35 unable to create new object!
[JmsXA] Pool org.jboss.jms.ra.JmsManagedConnectionFactory-1 [0/0/10] waiting for a free object
--------------------
I tried many combinations of JMSProviderLoader but all combinations yield the same result.
Here is the excerpt from jboss.jcml. Notice that the commented out QueueFactoryRef and TopicFactoryRef are all the combinations I tried.
---------------------
DefaultJMSProvider
org.jboss.jms.jndi.JBossMQProvider
<!--
java:/INVMXAQueueConnectionFactory
java:/INVMXATopicConnectionFactory
-->
<!--
java:/XAQueueConnectionFactory
java:/XATopicConnectionFactory
-->
<!--
java:/XAConnectionFactory
java:/XAConnectionFactory
-->
<!--
java:/ConnectionFactory
java:/ConnectionFactory
-->
<!--
java:/INVMQueueConnectionFactory
java:/INVMTopicConnectionFactory
-->
XAConnectionFactory
XAConnectionFactory
StdJMSPool
org.jboss.jms.asf.StdServerSessionPoolFactory
../../db/jbossmq/
-------------------- -
6. Re: Setup JMS resource adapter problem
pra Sep 27, 2001 9:58 AM (in response to willievu)Hi, in your first example configuration you had a correct JMS provider adapter configured.
DefaultJMSProvider
org.jboss.jms.jndi.JBossMQProvider
java:/XAConnectionFactory
java:/XAConnectionFactory
This ought to work.
By the way. The problem you had earlier is now fixed in the CVS Head branch. But it is not backported to 2.4.x.
//Peter