Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] question about composite persistence unit

Hello,

On Friday 02 March 2012 - 19:03:48, Tom Ware wrote:
> Lets take a step back.
> ...
> https://fisheye2.atlassian.com/browse/eclipselink/trunk/examples/my-sports/
> MySports/src/example/mysports/admin/AdminMetadataSource.java?hb=true
> 
> https://fisheye2.atlassian.com/browse/eclipselink/trunk/examples/my-sports/
> MySports/src/example/mysports/admin/RESTAdminServerConnector.java?r=9600

Thanks for the links.

I probably was hobnailed describing my problem.
I don't need Assistance on how to write a MetaDataSource. The point is, I 
don't know how to bring it into play.

Anyway - after sessions of research and debug, I have to confess, that I was 
wrong on my last post:

	 I do need dynamic extension of known entities.

The workflow of my app is like this:
- authentication happens at splashscreen (no extension-plugin might have been 
loaded at that point)

- application is loaded and navigation tree is shown (uses statically 
published entities from app core)

- the user decides to expand a tree node, which triggers the activation of an 
extension plugin. That's the point, I have to inform the EntityManager about 
new classes, it should care about. 


Persistence (in my app) is an application service, coded in core app and 
published as a service - so all extensions will use the same application-
session from authentication.

I dived into the eclipselink sources and found a 
EntityManagerSetupImpl.updateDescriptorCacheSettings(...) - I know, that's 
internal stuff, but is there a way to trigger that call (or similar action) 
from application?

I could imagine a Properties instance in my app, which gets extended by 
extension-plugin activation and for so always holds the pool of known entity-
names.
Binding that PropertyMap to a Handler of the EntityDescriptorCache, dynamic 
change of supported classes could be established.

Don't know how weaving interferes this game, but using static weaving should 
make the binaries fit into dynamic play. Can I trigger weaving at build-
process?


kind regards 

Gero

P.S. digging the sources, I hit DatabaseSessionImpl - is it true, that in SE-
environments only one database connection is supported/allowed?
Before eclipselink, I was using connectionpool from apache.
Is there a way to use connectionpools with eclipselink?


Back to the top