Skip to main content



      Home
Home » Eclipse Projects » Virgo » Best practice question?
Best practice question? [message #640345] Sat, 20 November 2010 19:09 Go to next message
Eclipse UserFriend
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
Eclipse UserFriend
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: Mon Jun 30 19:45:59 EDT 2025

Powered by FUDForum. Page generated in 0.03345 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top