The code can be found in the jboss-x.y/connector source module:
org.jboss.resource.adapter.jdbc.CachedPreparedStatement org.jboss.resource.adapter.jdbc.PreparedStatementCache org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection
Comment by Marcus Eriksson [21/Dec/05 03:31 PM - Visible to jira-users] Delete
[ Permlink ]
Actually very important when stored procedures are used. I, like many others I guess, use it a lot to speed up things.
i'm ready to implemenyt that - but seems like a need a tutor to the process?
1st of all http://docs.jboss.org/process-guide/en/html/cvsaccess.html mentions anoncvs.forge.jboss.net but ops anoncvs.forge.jboss.net 'no such host known' :(
2nd - where do i post a patch?
so, regarding implementation... there are 3 options how we could set callablestatement cache size
0) keep both PreparedStatements and CallableStatements in one cache - and rename it to StatementCache.
1) have 2 caches - one for PreparedStatements and one for CallableStatements. use same property existing preparedStatementCacheSize for both CallableStatementsCache and PreparedStatementsCache max size
2) have 2 caches - one for PreparedStatements and one for CallableStatements
introduce a new property, which will be pretty same as preparedStatementCacheSize - and call it callableStatementCacheSize
which way do you feel is the right one?
Only one cache is needed in my view. The patch attached to JBAS-2584 seems ok, but the introduction of the org.jboss.resource.adapter.jdbc.CachedStatement is not neccessary and just complicates tracking changes in org.jboss.resource.adapter.jdbc.CachedPreparedStatement across versions. The org.jboss.resource.adapter.jdbc.CachedCallableStatement can just be a subclass of CachedPreparedStatement without having to introduce another base class.
How we are going to create testcases for this?
HSQLDB doesn't suport store procedures as far as I know.
I guess we would need to create some properties on testcase project to support external drivers. Then we could have an oppitional task to execute external database dependent tasks. (something dependent on ifdefined).
Of course, if I'm wrong about HSQLDB not supporting Store Procedures this wouldn't be needed, but I guess the external database test on the testcase is a good idea anyways.
The current hsqldb 126.96.36.199 supports called statements so a basic test will be possible.
This has been backported to 4.0.x but not 3.2.x
Which means that less one month after I put a lot of time into synching the codebases
they are out-of-synch again!
I know it is nice to have these features and it takes more work to test extra
branches (especially 3.2.x which has the horrible .jpp files)
but it is even more work for me when I have figure out how to or whether I can backport
fixes, which is much more important!
Can you contact me or Scott about getting cvs r/w access if you are interested.
The e-mail address you provided when you registered is not valid.