Announcement Announcement Module
No announcement yet.
Using roo-generated entities as a .jar dependency Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using roo-generated entities as a .jar dependency

    I've been trying, reasonably successfully, to use an entity class, generated by roo, in another app.
    Do you have any guidelines for doing this?

    I would like to use roo to generate all of my entities in this way.
    I'd have a 'database-app' where I can reverse engineer my tables, create the .jar file and import it as a dependency in another app.

    The problems that have arisen have been because the 'database-app' spring context is contained in the same .jar, and this seems to be searched for and used instead of the host application's context.

    I have tried excluding the META-INF/spring folder from the .jar, but this did not help.

    Is there a way of creating a .jar containing just roo entity classes and importing it, where it gets pulled into the host application's spring context?

    Or am I barking up the wrong tree?

    Any help would be greatly appreciated.

  • #2

    I think this is actually a novice Spring question, nothing to do with Roo, so please ignore.

    It's all about loading/excluding contexts in web.xml I guess.


    • #3
      Though I'm not sure I understand the details of your description it does sound to me you want multi-module Maven projects, OSGI via the Bundlor add-on or something similar. You could read the sections following "Migrating to OSGi" in the "SpringSource dm Server™ Programmer Guide" for ideas.
      Unfortunately I have done neither of those yet. I'm sure there are others that can chime in with their experiences.
      Last edited by MiB; Jan 8th, 2012, 06:19 PM.