Skip to main content



      Home
Home » Eclipse Projects » Gemini » Multiple version of bundle OSGI / BluePrint
Multiple version of bundle OSGI / BluePrint [message #1015275] Wed, 27 February 2013 21:09 Go to next message
Eclipse UserFriend
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 08:53] by Moderator

Re: Multiple version of bundle OSGI / BluePrint [message #1015324 is a reply to message #1015275] Thu, 28 February 2013 03:55 Go to previous messageGo to next message
Eclipse UserFriend
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 08:50 Go to previous messageGo to next message
Eclipse UserFriend
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 08:51] by Moderator

Re: Multiple version of bundle OSGI / BluePrint [message #1015408 is a reply to message #1015402] Thu, 28 February 2013 08:57 Go to previous messageGo to next message
Eclipse UserFriend
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 08:58] by Moderator

Re: Multiple version of bundle OSGI / BluePrint [message #1015444 is a reply to message #1015408] Thu, 28 February 2013 10:41 Go to previous messageGo to next message
Eclipse UserFriend
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 10:43] by Moderator

Re: Multiple version of bundle OSGI / BluePrint [message #1015446 is a reply to message #1015444] Thu, 28 February 2013 10:49 Go to previous messageGo to next message
Eclipse UserFriend
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 10:53 Go to previous messageGo to next message
Eclipse UserFriend
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 11:06 Go to previous message
Eclipse UserFriend
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 937 times)
  • Attachment: ko.png
    (Size: 9.36KB, Downloaded 856 times)
Previous Topic:Multiple version of bundle OSGI / BluePrint
Next Topic:LocalBundleContextAdvice not serializable exception
Goto Forum:
  


Current Time: Fri Apr 25 13:54:51 EDT 2025

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

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

Back to the top