• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Best practice for persistence unit

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

imagine following setup:
I have multiple packages with entity beans. Currently each package contains a persistence.xml and the names of persistence units are different for each package. Each package is packed into a separate jar file. But all persistence units use the same data source and configuration.

In my opinion this doesn't make much sense. It would be easier to have only one persistence.xml containing the configuration only once and to use the same persistence unit in all packages.

What do you thing about it? For which case or for which reason would it be a good idea to have more than one persistence unit within an application?

Regards,
Christian
 
I am mighty! And this is a mighty small ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic