Hi Cristiano,

What you have defined in Blueprint is a service so Blueprint will be
responsible for registering it in the Service Registry, but does not
do any injection.  You should be able to use the equinox console to
see if Blueprint has registered the service.  The command should be
(apologies of you already know all this):

services(objectClass=org.eclipse.osgi.framework.console.CommandProvider)

If the service isn't there, do you see your bundle being processed by Blueprint?

Quiesce is a Blueprint extension that that allow Blueprint to take
bundles away gracefully.  It notifies Blueprint when a bundle is about
to be taken away and Blueprint then unregisters the bundle's services
and trying to let existing work run to completion.

I hope this helps.

Regards,

Graham.

On 27 May 2011 23:28, Cristiano Gavião <[email protected]> wrote:
> Hi Graham, thanks...
>
> I've used the single blueprint bundle for while to test...  I'm running from
> eclipse workspace (as a OSGI Framework)
>
> It seems that aries is being started ok, but there are something wrong with
> my example that I could figure out...
>
>> osgi> 19:04:39.340 [Start Level Event Dispatcher] DEBUG
>> o.a.a.b.container.BlueprintExtender - Starting blueprint extender...
>> 19:04:39.359 [Start Level Event Dispatcher] INFO
>>  o.a.a.b.container.BlueprintExtender - No quiesce support is available, so
>> blueprint components will not participate in quiesce operations
>> 19:04:39.359 [Start Level Event Dispatcher] DEBUG
>> o.a.a.b.container.BlueprintExtender - Blueprint extender started
>
> I would appreciate your help...
>
> I've created a single osgi project to provide a command service to
> org.eclipse.osgi.framework.console.CommandProvider interface.
>
> I use this blueprint xml:
>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0";
>>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>    xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0";
>>
>>  xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd";>
>>
>>
>> <bean id="commandProviderImpl"
>> class="org.jbehave.osgi.equinox.commands.CommandProvider">
>> </bean>
>>
>> <service id="commandService" ref="commandProviderImpl"
>>        interface="org.eclipse.osgi.framework.console.CommandProvider">
>> </service>
>> </blueprint>
>
> This is the impl class..
>>
>> public class CommandProvider implements
>>        org.eclipse.osgi.framework.console.CommandProvider {
>>
>>    @Override
>>    public String getHelp() {
>>        StringBuffer help = new StringBuffer();
>>        help.append("--- Jbehave Equinox Commands ---\r\n");
>>        help.append("\tstatus - JBehave OSGi EmbedderService status.");
>>        help.append("\trunAnnotaddedEmbedder - Run Stories via Annotated
>> Embedder on Karaf.");
>>        help.append("\r\n\r\n");
>>        return help.toString();
>>    }
>
> But I can't see any result when I type 'help'. It seems that it is not being
> injected...
>
> any tip to help trace this?
>
> btw, what is quiesce ?
>
> thanks a lot
>
> Cristiano
>
>
>
> On 27/05/11 18:23, Graham Charters wrote:
>>
>> Hi Cristiano,
>>
>> The single blueprint bundle is a roll-up of the other blueprint
>> bundles. As such, it contains more than you need.  For basic blueprint
>> you just need blueprint.api and blueprint.core, I believe.  Install
>> and start them in equinox and then install and start your bundle that
>> uses blueprint and it should be processed (the install/start order of
>> these bundles is not important).
>>
>> The following article gives a good overview of Blueprint, but is a
>> little out of date in terms of the build it uses.  The blueprint
>> specification hasn't changed since then, though.
>>
>> http://www.ibm.com/developerworks/opensource/library/os-osgiblueprint/
>>
>> You typically don't have to import any packages for blueprint because
>> you don't use it's APIs directly (you write blueprint XMLs).
>>
>> Let us know if you have any problems.
>>
>> Regards, Graham.
>>
>> On 27 May 2011 22:02, Cristiano Gavião<[email protected]>  wrote:
>>>
>>> Hi people,
>>>
>>> I'm trying to use aries blueprint on equinox to able to consume some
>>> service
>>> bundles. Those services I've built using org.osgi.compendium-4.2.0.jar
>>> and
>>> bnd.
>>>
>>> So, which jar should I use on my client bundle? Which package should I
>>> import ?
>>>
>>> blueprint.api
>>> blueprint
>>> blueprint.core
>>>
>>> Is there any config that I need to do ?
>>>
>>> thanks a lot
>>>
>>> Cristiano
>>>
>
>

Reply via email to