Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Best practice question?
Best practice question? [message #640345] Sun, 21 November 2010 00:09 Go to next message
Bojan Kraut is currently offline Bojan KrautFriend
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 13:23 Go to previous message
guofeng zhang is currently offline guofeng zhangFriend
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: Sun Dec 08 03:22:04 GMT 2024

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

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

Back to the top