Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » rcp, osgi, and dynamic weaving
rcp, osgi, and dynamic weaving [message #376331] Thu, 10 July 2008 20:36 Go to next message
Ted Pricer is currently offline Ted Pricer
Messages: 7
Registered: July 2009
Junior Member
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
applications.

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"?
Re: rcp, osgi, and dynamic weaving [message #379266 is a reply to message #376331] Tue, 12 August 2008 14:07 Go to previous messageGo to next message
Ted Pricer is currently offline Ted Pricer
Messages: 7
Registered: July 2009
Junior Member
Has anybody had any luck with this?
Re: rcp, osgi, and dynamic weaving [message #379273 is a reply to message #379266] Wed, 13 August 2008 14:55 Go to previous messageGo to next message
Shaun Smith is currently offline Shaun Smith
Messages: 197
Registered: July 2009
Senior Member
Hi Ted,

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
of date.

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[1]
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?

--Shaun


[1] http://wiki.eclipse.org/index.php/Adaptor_Hooks
Re: rcp, osgi, and dynamic weaving [message #379603 is a reply to message #379273] Mon, 18 August 2008 20:34 Go to previous messageGo to next message
Ted Pricer is currently offline Ted Pricer
Messages: 7
Registered: July 2009
Junior Member
Shaun,

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
dangerous)

Does that make any sense, or do I not understand what you are trying to
accomplish.

Thanks for your response. I'm really looking forward to seeing this work.
Re: rcp, osgi, and dynamic weaving [message #379612 is a reply to message #379603] Tue, 19 August 2008 13:43 Go to previous message
Shaun Smith is currently offline Shaun Smith
Messages: 197
Registered: July 2009
Senior Member
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.

--Shaun
Previous Topic:Sequence with Table for mapped-superclass
Next Topic:First steps
Goto Forum:
  


Current Time: Thu Oct 23 00:40:23 GMT 2014

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

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