1 Reply Latest reply on Jul 1, 2008 3:42 PM by wkudla

    Stored procedure calls made easy

    wkudla

      Hi!

      Since there is a lot of stored procedure invocations in my current project (on Oracle db) I decided to isolate a dedicated component for completing this task.
      The project is called JProcedure and being hosted on google code at the moment: http://jprocedure.googlecode.com.
      There is some wiki documentation showing how to use the stuff.
      The basic concept for this project was to simplify stored procedure invocations from java code (which can be a pain in the *** sometimes) by leveraging java annotations.
      The only thing you have to do is annotate a class that represents stored procedure definition and then annotate any method that reflects a stored procedure. For transforming the statement output you will have to write your custom ResultTransformer and that's it.
      The engine supports automated caching (which you can turn on and off using annotations) and custom invocation interceptors that allow you to add additional logic before and after a stored procedure call.
      Current limitations:
      1. There is only Oracle support implemented at the moment, but supporting other db vendors is just a matter of implementing a single StatementBuilder interface.
      2. The Connection object is being obtained from JNDI given a DataSource path and does not support caching Datasource object - this will be enchanced to support different ways of obtaining a connection
      3. There is no specific exception handling policy (on to do list)
      4. No transaction management which means you have to use the component in transactional context or manage transaction yourself (To be done)

      The engine works and occured to be extremely handy, hence the decision of open-sourcing it.

      If you find few spare minutes and take a look at what has been done so far, I will very much appreciate any positive and negative feedback.

      Once again: http://jprocedure.googlecode.com/

      Thanks in advance

      Wojciech Kudla

        • 1. Stable version 1.0 released!
          wkudla

          Stable version 1.0 has just been released introducing pluggable cache engines, setting different caching policy types and providing a callable statement wrapper that allows you to totaly forget about any resource releasing!
          JProcedure is absolute free, open-source project you can access on http://jprocedure.googlecode.com
          Feedback is welcome!
          Have fun!

          Wojciech