Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gemini » Weaving and early bundle activation
Weaving and early bundle activation [message #1278666] Thu, 27 March 2014 17:16 Go to next message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 493
Registered: July 2009
Senior Member

Hi,

we use Gemini weaving bundle for JPA weaving. This bundle needs to be started early, before the JPA classes are loaded.

In our own product we are able to define this in the config but when we piggyback our plugins on an existing Eclipse installation we have no influence on the config files.

Do you have an idea how to solve this?

Cheers,

Wim
Re: Weaving and early bundle activation [message #1279235 is a reply to message #1278666] Fri, 28 March 2014 12:42 Go to previous messageGo to next message
Michael Keith is currently offline Michael KeithFriend
Messages: 243
Registered: July 2009
Senior Member
Hi Wim,

So you are saying that you can't control the start level of the bundles when they are installed, or the active start level of the framework, right?

Another option is to refresh the bundles. That should cause an effective reboot of Gemini.

-Mike
Re: Weaving and early bundle activation [message #1280509 is a reply to message #1278666] Sun, 30 March 2014 12:58 Go to previous message
Gunnar Wagenknecht is currently offline Gunnar WagenknechtFriend
Messages: 486
Registered: July 2009
Location: San Francisco ✈ Germany
Senior Member

On 2014-03-27 17:16:27 +0000, Wim Jongman said:

> In our own product we are able to define this in the config but when we
> piggyback our plugins on an existing Eclipse installation we have no
> influence on the config files.
>
> Do you have an idea how to solve this?

You should be able to do this using p2 instructions. Place a p2.inf
file next to a bundle manifest that gets installed.

Here is an example for org.eclipse.core.runtime:

#create a requirement on a configuration fragment
#requires.0.namespace=org.eclipse.equinox.p2.iu
#requires.0.name=configure.org.eclipse.core.runtime.startlevel
#requires.0.range=[1.0.0,1.0.0]
#requires.0.greedy=true

#create a IU fragment for configuring start levels of org.eclipse.core.runtime
#units.0.id=configure.org.eclipse.core.runtime.startlevel
#units.0.version=1.0.0
#units.0.provides.1.namespace=org.eclipse.equinox.p2.iu
#units.0.provides.1.name=configure.org.eclipse.core.runtime.startlevel
#units.0.provides.1.version=1.0.0
#units.0.instructions.unconfigure=org.eclipse.equinox.p2.touchpoint.eclipse.setStartLevel(startLevel:-1);
\
#
org.eclipse.equinox.p2.touchpoint.eclipse.markStarted(started:false);
#units.0.instructions.configure=org.eclipse.equinox.p2.touchpoint.eclipse.setStartLevel(startLevel:4);
\
#
org.eclipse.equinox.p2.touchpoint.eclipse.markStarted(started:true);
#units.0.hostRequirements.1.namespace=osgi.bundle
#units.0.hostRequirements.1.name=org.eclipse.core.runtime
#units.0.hostRequirements.1.range=[3.7.0,4.0.0)
#units.0.hostRequirements.1.greedy=false
#units.0.hostRequirements.2.namespace=org.eclipse.equinox.p2.eclipse.type
#units.0.hostRequirements.2.name=bundle
#units.0.hostRequirements.2.range=[1.0.0,2.0.0)
#units.0.hostRequirements.2.greedy=false
#units.0.requires.1.namespace=osgi.bundle
#units.0.requires.1.name=org.eclipse.core.runtime
#units.0.requires.1.range=[3.7.0,4.0.0)
#units.0.requires.1.greedy=false


-Gunnar


--
Gunnar Wagenknecht
gunnar@xxxxxxxx
Previous Topic:Problems when using ApsectJ and Gemini EclipseLink weaving for LazyLoading
Next Topic:Old XSD for compendium in Blueprint 2.0.0.M02
Goto Forum:
  


Current Time: Thu Apr 25 12:26:38 GMT 2024

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

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

Back to the top