[jboss-user] [JCA/JBoss] - Re: Changinh connection state in CMP EJB

dimonv do-not-reply at jboss.com
Thu Jul 9 07:57:43 EDT 2009


"vickyk" wrote : What issue do you see here?
There are cases in which the same RA provides connections of the different types. If the client application calls an additional getConnection method of the RA and provides the meta-info to it, which contains e.g. the java type of connection, and then casts the returned connection to the type it has requested ClassCastException occurs. Another example is JBoss' JMS RA; it provides a class called  org.jboss.resource.adapter.jms.JmsConnectionRequestInfo which implements of javax.resource.spi.ConnectionRequestInfo. org.jboss.resource.adapter.jms.JmsConnectionRequestInfo defines the type of connection returned by RA: topic, queue or both, I assume all of these types can not be put into the same pool.
BTW I thought that was one of the reasons for org.jboss.resource.connectionmanager.JBossManagedConnectionPool.PoolByCri implementation.
If you say:
"vickyk" wrote : ...the reauthentication would be decided at the RA level
why do you need any additional infrastructure for the re-authentication?
"vickyk" wrote : The -ds.xml should then supply the infrastructure needed to support the reauthentication i.e reauthentication mechanish as in case of jdbc rar. 

And if we use a JCA-compliant RA supporting re-authentication, who is responsible for supplying a re-authentication mechanism?
Even in case of JDBC no additional mechanism is not necessary in -ds.xml; this mechanism should be behind getConnection, as described in chap. 9.1.9 of JCA specification.
IMO the only what -ds.xml needs is:
"dimonv" wrote : Probably an addition tag within -ds.xml combined with "ByContainer..." is needed to give org.jboss.resource.connectionmanager.JBossManagedConnectionPool a hint which pool implementation should be used. 

Thus if -ds.xml says e.g. true and <security-domain-and-application>sec domain</security-domain-and-application> or <security-domain>sec domain</security-domain> then PoolBySubjectAndCri resp. PoolBySubject should be used.

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

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



More information about the jboss-user mailing list