Hello,

I have reached this post because I am facing the same problem. I see that in 
the FAQ it says:

anonymous wrote : Q: I have strange pooling? Connections that are not matched 
in my
  | 
  | matchManagedConnections
  | 
  | are destroyed.
  | 
  | A: Yes this is the default/expected behaviour.

I have had a look at the jca 1.5 specification and according to this issue it 
says the following

anonymous wrote : If the resource adapter cannot find an acceptable 
ManagedConnection instance, it
  | returns a null value. In this case, the application server requests the 
resource
  | adapter to create a new connection instance.

So, it does not say anything in particular about this behaviour.

Now I'm gonna explain my use case, on which I consider this is not the expected 
behaviour:

My resource adapter holds connections, each one have an associated window, so 
that on a request, and identifier is stored on the window to be removed later 
when an ACK is received. When a request is made, it may need one or more slots 
on the window, so I specify a ConnectionRequestInfo with the number of slots 
needed.

Suppose a request is made which needs 2 slots, and all connections in the pool 
have 1 free slot. The matchManagedConnections method returns null and 
application server creates a new Connection that is returned. At this moment, 
if existing connections are destroyed, their associated window information and 
actions on ACKs are lost. Other reason for not destroy them is that as they all 
have 1 slot free, they should be available for other 1 slot requests. Also, 
they will become available as ACKs  come.

I have seen that using <application-managed-security/> not only changes this 
behaviour, as application must implement all connection pooling task. In my 
case a new connection is created on each request, so I suppose that no 
connection management is performed by jboss. In my opinion, I consider that 
this behaviour should be configurable on a policy property, so you can use all 
jboss services in your resource adapter as matchManagedConnections method and 
choose what to do with no matching connections.

I only want to explain my point of view in order to contribute on improving 
this amazing project. Thanks a lot!

Borja

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4165307
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to