JProcedure - stored procedure calls made simple


General J2EE: JProcedure - stored procedure calls made simple

  1. 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: There is no wiki documentation right now (examples are being creted), but the api docs and the source itself should be enough. 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. Caching is done by using simple Map which is very, very bad. There will be support for different caching utilities (ehcache, jboss cache, etc). 5. No transaction management which means you have to use the component in transactional context (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: Thanks in advance Wojciech Kudla

    Threaded Messages (4)

  2. Simple tutorial added[ Go to top ]

    Just added a simple tutorial on how to use the stuff: Have a nice reading!
  3. oracle object types[ Go to top ]

    hi Is your framework also able to map the oracle objecttypes and 'table of' objecttypes, which are oracle-specific database types. In my current project the customer uses those a lot for the out-parameters of the stored procedures. At the moment we use ibatis with typehandler to map to the pojo's. You have any experiences on this ? Or tips for using an other/your framework.
  4. Re: oracle object types[ Go to top ]

    Since you write your own result transformers you can do whatever you want. Currently there is no mapping policy for JProcedure. If you have any suggestions how such mapping should look like, I would welcome your input into the isuues section of jprocedure project :) I didn't like iBatis approach to mapping from relational to object model and that is why I decided to rely on custom transformers. If you have any ideas on how you would like it to work, just describe it precisely and I will try to add it to the engine i no time :)
  5. 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 Feedback is welcome! Have fun! Wojciech