Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gemini » List of Services: Wait for all Services?
List of Services: Wait for all Services? [message #1004427] Wed, 23 January 2013 03:07 Go to previous message
Tobias P. is currently offline Tobias P.
Messages: 19
Registered: April 2012
Junior Member
I am Using Eclipse Virgo/Gemini Blueprint and have an Interface with multiple implementations:

Implementation 1:
    <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">

	<bean id="MyID1"
		class="ImplementationCLass1">
	</bean>

	<service ref="MyID1"
		interface="MyInterface" />

</blueprint>


Implementation 2:

<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">

	<bean id="MYID2"
		class="ImplementationClass2">
	</bean>

	<service ref="MYID2"
		interface="MyInterface" />

</blueprint>

Implementation 3:

<
blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">

	<bean id="MyID3"
		class="ImplementationClass3">
	</bean>

	<service ref="MyID3"
		interface="MyInterface" />

</blueprint>


And a Client:

<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">

	<reference-list id="MyImplementations"
		interface="MyInterface" />

	<bean id="clientID" class="ClientClass"
		init-method="startUp">

		<property name="services" ref="MyImplementations"></property>

	</bean>

</blueprint>



The startUp method is a simple method which iterates over the whole list and prints out a simple string (for testing purpose)

The Problem is if i install the client Bundle only two out of tree Services are in my List.
If i stop and start the Bundle again, all three Services are in my List.

Any ideas/sugesstions why?

Is it possible to tell Blueprint that the list MUST contain all Services matching MyInterface?

If you need additional information feel free to ask
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:Gemini JPA / DBAccess - best way to configure JDBC properties?
Next Topic:Gemini DBAccess Maven Artifacts
Goto Forum:
  


Current Time: Fri May 24 09:09:07 EDT 2013

Powered by FUDForum. Page generated in 0.01592 seconds