Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6378023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:57:03+00:00 2026-05-25T01:57:03+00:00

I’ve just recently started using hibernate and so I apologize if this is a

  • 0

I’ve just recently started using hibernate and so I apologize if this is a stupid question.

I want to package some of my code into a module which different applications can then utilize.
For example, a package that handles sending SMS messages.
This package does some database work to get basic config data and then might do some transaction logging.
This will then be added to applications requiring SMS functionality.
The package would therefore require the calling application to contain the specific config and logging tables required by the package.

My problem is that in order to write the hibernate methods that get the config and do the logging it needs to know of the hibernate specific DOA objects. The problem is these objects are only generated when we create the specific application database mapping.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T01:57:03+00:00Added an answer on May 25, 2026 at 1:57 am

    We are in a similar situation, so here’s what we do:

    1. All entities are contained in our library and thus the DAOs have full knowlegde of those entities.
    2. If an application needs more fields in an entity, it subclasses the base entity and subclasses the corresponding DAO as well (which is parameterized using generics).
    3. The library doesn’t contain any persistence.xml, but our applications define one, listing the library jar using a <jar-file> element. Note that for this to work, all DAOs have to use the same persistence unit, which is defined in that persistence.xml.
    4. The application will have to provide the tables defines in the library, but those can be overwritten using a XML file (named orm.xml in our case). That file is defined in our persistence.xml.

    Of course, you can reduce complexity if you don’t have to extend your library with application specific code. In that case you can put the persistence.xml into the lib, use a different persitence unit etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
link Im having trouble converting the html entites into html characters, (&# 8217;) i
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I have some data like this: 1 2 3 4 5 9 2 6

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.