This is an old FAQ, it has been discussed quite a few times before.
I would suggest using search, but you'll have to filter out all the posts similar to this
one where I couldn't be bothered to answer it, again...
I will accept a patch that allows a
in the -ds.xml, but only if pooling Criteria is ByNothing and
has not been specified.
Without that constrain, it is impossible/undesirable for the pool(s!) to prefill.
Although, you could imagine a hack where it also did it for the ByContainer
pooling criteria, if it knew the login module was ConfiguredIdentity or a subclass thereof.
Thanks for the reply Adrian
I have searched the forums with the words "minimum connection" , "min-pool-size", "pool filler" in various combinations, but couldn't get to see many posts that have any answer to my question. So, I'm resorting back to you, if you can provide me of any links, or search phrases. Moreover, this question is not part of the JCA FAQ.
Your reply also doesn't tell me if there is a way to do that or not. Please let me know if there is a provision to make use of pool filler to create the connections at the startup.
No there is currently no way to do it.
The reason is because in general extra information is required before connections
can be constructed. This is the ManagedConnectionFactory's ConnectionRequestInfo,
whether there is a transaction and in some cases what is the user/password
of the EJB/servlet request.
This information is only provided when the application makes the first request.
e.g. For JMS you cannot know whether the pool should be filled Queue or Topic
e.g.2 For Oracle XA you need to know whether the connections will be used
inside or outside a transaction the <no-tx-separate-pool/> workaround.
The criteria I listed above are the special cases where it could in principle do
a prefill because it has enough information.
BUT, it does not do this in the current implementation.
Additionally, with the default configuration, any prefilled connections would be closed
anyway after 15 minutes of non-use.
All the pooling parameters are listed here:
Thanks a lot Adrian