Use ByApplication pooling and pass the ip address.
JBoss will create a subpool for each ip address.
The spec doesn't recommend this kind of usage.
Any reason for using JCA? i.e. Transactions/Security.
Why not write it as an MBean?
I'll check out the ByApplication pooling option.
My main reason for trying JCA is connection pooling.
I hadn't considered MBeans because I don't know much
about them. I'll check this option out as well.
I checked the spec and, as you say, it recommends not
using the ConnectionRequestInfo to pass EIS specific
information (it mentions IP address and port). However,
in my case, the IP address _is_ client specific rather
than EIS specific since it client may choose to connect
to any of the "discovered" IP addresses.
I tried using the ByApplication setting and JBoss then
creates a sub-pool per IP address, which is something
like what I want. However, it still insists on trying to
destroy unmatched connections in a sub-pool when a new
connection request arrives. That is, it supports a maximum
of 1 connection per sub-pool which was not my
understanding after reading the documentation.
Also, what advantages would using an MBean have in this
situation? I am really after managed connection pooling
only; security and transactions are not required at this
Thanks in advance,
I don't understand. The idea is to use the ConnectionRequestInfo
to make all the connections in each subpool equivalent.
You shouldn't be getting connections that don't match?
An MBean is more flexible, you don't have to squeeze your
application into the spec defined behaviour.
Of course you would have to write your own pool or reuse
the jboss pool.