If the mdb invoker can be configured to use the jms rar then there should already be the ability to specify how the connection credentials are obtained using the existing jaas/jca integration. I don't remember off the top of my head if we can do this. Seems like its just configuring a JMSProviderLoader to use the java:JmsXA factory.
No you can't use the JCA *pooled* JMS connection for the MDB.
The real issue is being to able define the user/password through JAAS
on the JMS Provider config, rather than defining it in the ejb config.
The comment about deployment roles is irrelevent, since the admin can always
define it standardjboss.xml
So refresh my memory on why the jms rar cannot be used. Fundamental mismatch between jca and mdb semantics or we just don't have the neccessary pooling implementation available?
Its certainly no problem to add support for obtaining connection credentials from jaas to the JMS Provider, but if we can't configure a jca provider there would seem to be a spec mismatch here.
Because the EJB2.0 MDB uses the ConnectionConsumer with a ServerSessionPool
provided by the J2EE container.
1) J2EE6.7 explicitly denies access to the ConnectionConsumer from the resource adapter
and one session per connection (not a pool of sessions like the ServerSessionPool)
2) The ConnectionConsumer requires a "static" unshared connection
not a pooled connection