11 Replies Latest reply on Jan 20, 2006 3:37 PM by adrian.brock

    CallableStatement caching...

    dsldsl

      I am looking for CallableStatement caching and I understand it has been implemented for PreparedStatemetns but not CallableStatements. Can someone point me in the right direction of where to look in the code to add this functionality? (Where can I find code overview docs?)

        • 1. Re: CallableStatement caching...
          starksm64

          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
          



          • 2. Re: CallableStatement caching...

            There's an overview of the source tree on the WIKI, but it doesn't go down
            to indvidual source level:
            http://www.jboss.org/wiki/Wiki.jsp?page=JBossJCA

            • 3. Re: CallableStatement caching...
              • 4. Re: CallableStatement caching...

                 


                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.


                • 5. Re: CallableStatement caching...
                  arro239

                  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?

                  • 6. Re: CallableStatement caching...
                    arro239

                    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?

                    • 7. Re: CallableStatement caching...
                      starksm64

                      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.

                      • 8. Re: CallableStatement caching...
                        clebert.suconic

                        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.

                        • 9. Re: CallableStatement caching...
                          starksm64

                          The current hsqldb 1.8.0.1 supports called statements so a basic test will be possible.

                          • 10. Re: CallableStatement caching...

                            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!
                            http://jira.jboss.com/jira/browse/JBAS-2584

                            • 11. Re: CallableStatement caching...

                              Andrey,

                              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.