I'm interested in upgrading to eclipselink from an older build of
toplink. One of the features that I have been looking for is dynamic
weaving in an RCP application. I've seen https://bugs.eclipse.org/bugs/show_bug.cgi?id=233728 which seems to
indicate that it can be done with the osgi bundles, but I don't see how
to use the osgi bundles in an RCP application. The "osgi proof of
concept" documentation seems a bit out of date, and doesn't consider rcp
apps which launch a bit differently than standard osgi runtime based
Does anyone know how to use the osgi bundles with an RCP application?
The bugzilla issue mentions a next step to "Document how to get all this
working". Has that been done? Is it anything more than setting up the
persistence.xml file to set eclipselink.weaving = "true"?
I'm just back from vacation and will be investing some effort in
documenting our OSGi and RCP support. You're right, the POC docs are out
But as you can see in the bug you referenced, we do have dynamic
weaving working for some basic use cases with Equinox OSGi. We have lots
of work to do here to make it "all singing and all dancing" but the basics
are working. The implementation leverages the Equinox AdaptorHook
framework and is service based. This fits nicely with "generic" OSGi
applications but not so well with RCP. I think the problem is just in our
lack of expertise with RCP and probably not insurmountable. Essentially
we need to have EclipseLink examine a persistence unit before the Entity
classes are loaded so that we can register a weaving service that will
weave them as they are loaded. I played around with getting this to work
in an RCP app at one point but had trouble getting the services to start
before the RCP main program was invoked. If you can explain how to setup
an RCP app with services running properly before the Application is
invoked then we can make some progress on this.
Can anyone offer any advice? Is it totally trivial and in my quick
attempt I just didn't get it?
I'm not sure that I understand all of your questions and I haven't
worked with the Adapter Hook framework, but it sounds to me like you
need to register a service before any of the Entity classes are loaded.
The two ways that seem most obvious to me are:
1) explicitly define some responsible bundle to start first via the
config.ini file with the "osgi.bundles" directive
2) programmatically in the application startup (perhaps a bit more
Does that make any sense, or do I not understand what you are trying to
Thanks for your response. I'm really looking forward to seeing this work.
My question is an RCP specific one: How can I configure an RCP
application launch such EcilpseLink services are up and running before the
RCP main program is started. I have to admit that I haven't looked at
this in a while but this is where I believe I left it. I'll take another
look at the Comics RCP example to see if I can get byte code weaving
working with it.
Let's take this conversation over to the eclipselink-users mailing list
because there a few RCP savvy people on the list who may be able to help.