tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: ManagedConnectionFactory.matchManagedConnections
Date Thu, 11 Feb 2010 17:32:47 GMT

On Feb 10, 2010, at 6:16 AM, Stephen Connolly wrote:

> Hi,
>
> Having some fun with
> ManagedConnectionFactory
> .matchManagedConnections(Set,Subject,ConnectionRequestInfo)
>
> I have a custom RA...
>
> my implementation looks a little something like (pseudo code)
>
> for (ManagedConnectionImpl mci: connectionSet) {
>   if (mci.getRequestInfo().equals(requestInfo)) {
>     return mci;
>   }
>   return null;
> }
>
> which from my reading of section 6.5.3 of the JCA spec is the correct
> thing to do if you implement connection pooling.
>
> However, if at any point I fail to find a matching connection from the
> supplied connectionSet and return null per the spec, I get a lovely
> exception from
>
> org
> .apache
> .geronimo
> .connector
> .outbound.SinglePoolConnectionInterceptor#internalGetConnection
>
> thrown from line 105: The pooling strategy does not match the
> MatchManagedConnections implementation. Please investigate and
> reconfigure this pool
>
> If I instead throw a javax.resource.NotSupportedException then things
> seem to work, but that is against the spec...

David Jencks is the one who wrote the Java EE Connector impl we use.   
He might have a better idea.

-David


Mime
View raw message