Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Best practice question?
Best practice question? [message #640345] Sat, 20 November 2010 19:09 Go to next message
Bojan Kraut is currently offline Bojan Kraut
Messages: 22
Registered: July 2009
Location: Maribor
Junior Member

Hi,

My question is regarding architecture of greenpages application.
There is a jpa bundle, which uses db bundle to get necessary data to connect to the database. jpa bundle instantiates an enttymanager which is used to access the data.

Let say id like to have two additional bundles - orders and invoices, which would use the same entitymanager. Is this possible? Or every bundle must have its own entity manager defined? How are runtime data shared? Is let say an account[id=5435] loaded in memory in two bundles or can both bundles access the same information?

Best regards,
Bojan
Re: Best practice question? [message #640548 is a reply to message #640345] Mon, 22 November 2010 08:23 Go to previous message
guofeng zhang is currently offline guofeng zhang
Messages: 49
Registered: July 2009
Member
If your each bundle needs a EntityManagerFactory, you might need to publish the EntityManagerFactory as a service, then get or inject the service to your bundle.

see http:// www.eclipse.org/forums/index.php?t=msg&th=198496&sta rt=0&S=3da08bead6b17caaec5cf954fe49be85
Previous Topic:Hudson CI
Next Topic:Greenpages sample problem
Goto Forum:
  


Current Time: Wed Aug 20 14:37:32 EDT 2014

Powered by FUDForum. Page generated in 0.10788 seconds