Announcement Announcement Module
No announcement yet.
Planning on writing a custom persistence provider for Roo Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Planning on writing a custom persistence provider for Roo


    I am planning on writing a custom persistence provider for Roo. Here is my use case which I would like to solve:

    I have a REST server which responds to HTTP GET requests with JSON serialized objects. I want to generate a Roo client that will provide me with CRUD operations on these objects.

    I have in mind three approaches:
    1) Build entities with a provided persistence provider such as MySQL/Hibernate and autogenerate the CRUD screens. Then rip out/override the AspectJ persistence code and replace with a wrapper to HttpClient - CRUD methods will delegate to HttpClient with the appropriate HTTP request and serialize the JSON back to a bean.
    2) Build my own persistence provider that does this.
    3) Build the client not using Roo.

    #3 is not really an option, since the goal of this exercise is to provide a proof of concept of being able to build a client (almost on demand) for this server really quickly.

    I think #2 is cleaner. However, there does not seem to be any documentation available (yet) on how to build ones own persistence provider.

    If there are no immediate plans on providing documentation for this, I am okay with figuring this stuff out from code, but I can't find where to download the sources from.

    Any help (and/or suggestions on other alternatives) would be appreciated.

    Thanks very much,

  • #2
    Please scratch the part where I was looking for the sources in the previous post...I found the git repository from ROO-817.

    Still would like feedback/pointers/suggestions on whether there are better approaches to doing what I want to do.




    • #3
      Just to close the loop on this one, I went with option #1 - build a "default" Roo app with Hibernate and in-memory Hypersonic, then build my custom entity manager factory and related classes. Full description is on this blog post.