Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gemini » Multiple version of bundle OSGI / BluePrint
Multiple version of bundle OSGI / BluePrint [message #1015275] Thu, 28 February 2013 02:09 Go to next message
etherny etherny is currently offline etherny ethernyFriend
Messages: 9
Registered: February 2013
Junior Member
Question about : OSGI / BluePrint
Hi all, i have try to launch a multiple instance of a bundle but with a different version.
The first blueprint config in the bundle version 1.0.0
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="">
	<bean id="launcher1" init-method="start" destroy-method="stop" class="com.test.Test">
	</bean>
</blueprint>

The second in the bundle version 2.0.0
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="">
	<bean id="launcher2" init-method="start" destroy-method="stop" class="com.test.Test">
	</bean>
</blueprint>


Start method of V1 bundle
public void start()
{
System.out.println("START");
}

Start method of V2 bundle
public void start()
{
	System.out.println("START V2");
}


when i start virgo, the two bundles are launched, but call V1 Start method twice.

V1 manifest : 
Manifest-Version: 1.0
Bundle-Version: 1.0.0
Bundle-Name: BundleTest
Bundle-ManifestVersion: 2
Bundle-SymbolicName: BundleTest
Export-Package: com.test;version="1.0.0"

V2 manifest :
Manifest-Version: 1.0
Bundle-Version: 2.0.0
Bundle-Name: BundleTest
Bundle-ManifestVersion: 2
Bundle-SymbolicName: BundleTest
Export-Package: com.test;version="2.0.0"


thx for your help.

[Updated on: Thu, 28 February 2013 13:53]

Report message to a moderator

Re: Multiple version of bundle OSGI / BluePrint [message #1015324 is a reply to message #1015275] Thu, 28 February 2013 08:55 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
What happens if you deploy v2 on its own?
Re: Multiple version of bundle OSGI / BluePrint [message #1015402 is a reply to message #1015324] Thu, 28 February 2013 13:50 Go to previous messageGo to next message
etherny etherny is currently offline etherny ethernyFriend
Messages: 9
Registered: February 2013
Junior Member
The V2 start method is called.

Start method of V2 bundle
public void start()
{
System.out.println("START V2");
}

[Updated on: Thu, 28 February 2013 13:51]

Report message to a moderator

Re: Multiple version of bundle OSGI / BluePrint [message #1015408 is a reply to message #1015402] Thu, 28 February 2013 13:57 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
The behaviour is very strange. Have you tried checking the wiring of the com.test package with both bundles installed in Virgo? It may be that somehow the v2 bundle is importing the v1 package and driving the v1 start method. The 3.6.x web admin console should be useful for this.

[Updated on: Thu, 28 February 2013 13:58]

Report message to a moderator

Re: Multiple version of bundle OSGI / BluePrint [message #1015444 is a reply to message #1015408] Thu, 28 February 2013 15:41 Go to previous messageGo to next message
etherny etherny is currently offline etherny ethernyFriend
Messages: 9
Registered: February 2013
Junior Member
You can see my wiring in this two pictures.
I have put my eclipse projects too.
Everything seems good for me.

Thx for your help.

index.php/fa/13611/0/
index.php/fa/13612/0/

[Updated on: Thu, 28 February 2013 15:43]

Report message to a moderator

Re: Multiple version of bundle OSGI / BluePrint [message #1015446 is a reply to message #1015444] Thu, 28 February 2013 15:49 Go to previous messageGo to next message
etherny etherny is currently offline etherny ethernyFriend
Messages: 9
Registered: February 2013
Junior Member
I have a track, i have the bug in eclipse virgo plugin, but when i put the bundles in pickup, all seems good, see trace log. Traces for V1 and V2 bundle.



Re: Multiple version of bundle OSGI / BluePrint [message #1015449 is a reply to message #1015446] Thu, 28 February 2013 15:53 Go to previous messageGo to next message
etherny etherny is currently offline etherny ethernyFriend
Messages: 9
Registered: February 2013
Junior Member
Some differences between launch virgo throw eclipse plugin, and launch virgo with startup.bat peapse.
Re: Multiple version of bundle OSGI / BluePrint [message #1015460 is a reply to message #1015449] Thu, 28 February 2013 16:06 Go to previous message
etherny etherny is currently offline etherny ethernyFriend
Messages: 9
Registered: February 2013
Junior Member
I have put exported bundles in pickup and start the virgo with the server eclipse tab (not with the startup.bat).
All work when i don't add the bundles in server eclipse tab.
index.php/fa/13617/0/


I have the problem only when i add bundles in server eclipse tab.
index.php/fa/13618/0/
  • Attachment: ok.png
    (Size: 8.05KB, Downloaded 906 times)
  • Attachment: ko.png
    (Size: 9.36KB, Downloaded 818 times)
Previous Topic:Multiple version of bundle OSGI / BluePrint
Next Topic:LocalBundleContextAdvice not serializable exception
Goto Forum:
  


Current Time: Sun Dec 22 05:43:21 GMT 2024

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

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

Back to the top