Results 1 to 6 of 6

Thread: Spring roo and stored procedure

  1. #1
    Join Date
    Nov 2009
    Location
    Tarija, Bolivia
    Posts
    13

    Default 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.

    Thanks

  2. #2
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    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 http://static.springsource.org/sprin...le-jdbc-call-1

    HTH
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

  3. #3
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    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.
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

  4. #4
    Join Date
    Nov 2009
    Location
    Tarija, Bolivia
    Posts
    13

    Default

    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. #5
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    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.
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

  6. #6
    Join Date
    Nov 2009
    Location
    Tarija, Bolivia
    Posts
    13

    Default

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •