Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Does OSGI work?

No you don't have to have all your eclipselink stuff in the same
plugin as your eo's.

I have a jpa.util type package that knows how to configure an
entitymanager factory and contains some base "model" classes that help
with getting an entity manager and querying it.

That way my actual real work plugins just contain 3 main components:

1) Entities
2) persistence.xml
3) Models: These extend base models and do 3 main things. 1) Create
new instances of an entity manager 2) Query this entity manager 3)
Persist objects.

I'll try to get a blog post together today that explains this in more
detail. Let me know if you have any other questions in the meantime.


On Thu, Aug 7, 2008 at 12:38 AM, Markus Franz <markus.franz@xxxxxxxxxxx> wrote:
> Hi,
> First, let me thank you for responding so quickly. The golden rule (that
> entities cannot cross classload boundaries) is something i already kind of
> suspected, yet a workaround as mentioned by Bryan would be very nice indeed.
> Also i think any blog-post considering eclipselink and rcp/osgi that goes a
> little into detail about modularity would be much, much appreciated not only
> by me. My problem is that every example i found works with just ONE plugin,
> that contains every dependency, the DB-drivers, the eclipselink
> functionality AND the data with mappings. This is nothing i can use (for
> obvious reasons, as i want to design an open platform-like framework).
> If i understand you correctly, my approach using extension points for
> database-related stuff should work, but i must have all eclipselink related
> stuff in the same plugin as my data-objects and mappings? is this correct?
> so if i later am to develop a new plugin with new objects, i have to
> duplicate much of the code/dependencies related to eclipselink? Or did i
> understand you wrong (sorry, i am still kind of overwhelmed by the whole
> subject)?
> Markus
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx

Back to the top