Announcement Announcement Module
No announcement yet.
Spring roo and stored procedure Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring roo and stored procedure

    hi friends,
    I know how you could cope stored procedures in the database using spring roo.

    If anyone has any experience on the subject, that I could help.


  • #2
    You mean how can you access stored procedures in the database?

    This is not very aligned with ORM goals, so technologies like JPA (which is the main persistence model in Roo) aren't a good fit.

    The good news is as you use Spring, you have JdbcTemplate available at any time and you can use it concurrently with JPA. They can even work OK in the same transaction. You can read about stored procedure features of JdbcTemplate in the Spring Reference Guide at



    • #3
      As Ben says, one of the great things about Roo is that it is based on Spring and it's trivial to add additional Spring beans or use Spring class libraries. Which means that you can easily add specialized/advanced features you need--you don't hit a wall.


      • #4
        I saw that using hibernate as persistence provider could call stored procedures or functions, but there really is no concrete examples or clear about the subject. In my case I must get through this in Postgresql function registration.

        Is that procedures do not go with the goal of an ORM, but in the institution I am trying to introduce a spring roo, has created some functions are quite complex but in the end it returning these functions are of the record.


        • #5
          I would strongly advise against using Hibernate's sproc support and instead use the JdbcTemplate support I mentioned previously. The JdbcTemplate support is well documented and has seen extensive use in countless Spring applications. You can invoke your Postgres sproc quite easily - there should be no problem at all doing this within a Roo app.


          • #6
            Thanks for your comments, I will review the JdbcTemplate to make calls to our roo sproc from my application, if possible case of adding an entry to the blog of roo on the subject.

            Thank you very much