You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Gebo Uniken <ge...@gmail.com> on 2010/12/06 14:31:43 UTC

Auto installing fragments in http-bridge mode

Hi,

I'm using Felix in http-bridge mode following the sample located here: http://svn.apache.org/repos/asf/felix/trunk/http/samples/bridge/

The webapp I'm building pre-packages some bundles that should be  
started when the framework starts. However I'm running into a problem  
when auto-deploying a fragment bundle. Obviously, these shouldn't be  
started by Felix. And if I'm correctly reading the documentation,  
Felix in standard mode provides the configuration property  
felix.auto.install.n to handle this situation. However, this is a  
_configuration_ property. And it seems that setting  
felix.auto.install.n as a system property doesn't work. When  
constructing Felix I only know how to pass system properties: new  
Felix(sysProps).

Can someone point me to some code where I can learn how to initialize  
felix from my webapp so that I can either pass configuration  
properties if that is possible or else tell felix some other way to  
not try to start my fragment bundles.

Thanks,
Gebo




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Auto installing fragments in http-bridge mode

Posted by Gebo Uniken <ge...@gmail.com>.
No I didn't! And now that I did this I made a lot of progress.

Installing the fragment from outside the webapp now works: adding  
felix.auto.install.1=file:/absolute/path/to/fragment.jar delivers the  
required result. I still have to figure out how to reference the  
bundle as a relative path though. file:WEB-INF/bundles/fragment.jar  
doesn't work yet. But I'll work that out eventually. Thanks Karl, this  
was exactly the information I was after!

Gebo

Op 6 dec 2010, om 15:03 heeft Karl Pauls het volgende geschreven:

> Oh wait, did you follow the documentation and added the  
> AutoProcessor too?
>
> regards,
>
> Karl
>
> On Mon, Dec 6, 2010 at 2:49 PM, Gebo Uniken <ge...@gmail.com>  
> wrote:
>> Yes I did that. felix.auto.install.1=file:bundles/slf4j-jcl.jar
>>
>> However, in the documentation you point to, namely here:
>>  http://felix.apache.org/site/apache-felix-framework-launching-and-embedding.html#ApacheFelixFrameworkLaunchingandEmbedding-creatingandconfiguring
>> it doesn't list the felix.auto.install.<n> property.
>>
>> But if you say that it should work I'll try harder to make it work.  
>> See if I
>> didn't make any mistakes.
>>
>> Thanks for the quick reply,
>> Gebo
>>
>> Op 6 dec 2010, om 14:37 heeft Karl Pauls het volgende geschreven:
>>
>>> Did you replace the ".n" with a startlevel number e.g.;
>>>
>>> felix.auto.install.1
>>>
>>> because it should work if you pass it into the felix instance.
>>> Otherwise, have a look at:
>>>
>>>
>>> http://felix.apache.org/site/apache-felix-framework-launching-and-embedding.html
>>>
>>> regards,
>>>
>>> Karl
>>>
>>> On Mon, Dec 6, 2010 at 2:31 PM, Gebo Uniken  
>>> <ge...@gmail.com> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I'm using Felix in http-bridge mode following the sample located  
>>>> here:
>>>> http://svn.apache.org/repos/asf/felix/trunk/http/samples/bridge/
>>>>
>>>> The webapp I'm building pre-packages some bundles that should be  
>>>> started
>>>> when the framework starts. However I'm running into a problem when
>>>> auto-deploying a fragment bundle. Obviously, these shouldn't be  
>>>> started
>>>> by
>>>> Felix. And if I'm correctly reading the documentation, Felix in  
>>>> standard
>>>> mode provides the configuration property felix.auto.install.n to  
>>>> handle
>>>> this
>>>> situation. However, this is a _configuration_ property. And it  
>>>> seems that
>>>> setting felix.auto.install.n as a system property doesn't work.  
>>>> When
>>>> constructing Felix I only know how to pass system properties: new
>>>> Felix(sysProps).
>>>>
>>>> Can someone point me to some code where I can learn how to  
>>>> initialize
>>>> felix
>>>> from my webapp so that I can either pass configuration properties  
>>>> if that
>>>> is
>>>> possible or else tell felix some other way to not try to start my
>>>> fragment
>>>> bundles.
>>>>
>>>> Thanks,
>>>> Gebo
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Karl Pauls
>>> karlpauls@gmail.com
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>
>
>
> -- 
> Karl Pauls
> karlpauls@gmail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Auto installing fragments in http-bridge mode

Posted by Karl Pauls <ka...@gmail.com>.
Oh wait, did you follow the documentation and added the AutoProcessor too?

regards,

Karl

On Mon, Dec 6, 2010 at 2:49 PM, Gebo Uniken <ge...@gmail.com> wrote:
> Yes I did that. felix.auto.install.1=file:bundles/slf4j-jcl.jar
>
> However, in the documentation you point to, namely here:
>  http://felix.apache.org/site/apache-felix-framework-launching-and-embedding.html#ApacheFelixFrameworkLaunchingandEmbedding-creatingandconfiguring
> it doesn't list the felix.auto.install.<n> property.
>
> But if you say that it should work I'll try harder to make it work. See if I
> didn't make any mistakes.
>
> Thanks for the quick reply,
> Gebo
>
> Op 6 dec 2010, om 14:37 heeft Karl Pauls het volgende geschreven:
>
>> Did you replace the ".n" with a startlevel number e.g.;
>>
>> felix.auto.install.1
>>
>> because it should work if you pass it into the felix instance.
>> Otherwise, have a look at:
>>
>>
>> http://felix.apache.org/site/apache-felix-framework-launching-and-embedding.html
>>
>> regards,
>>
>> Karl
>>
>> On Mon, Dec 6, 2010 at 2:31 PM, Gebo Uniken <ge...@gmail.com> wrote:
>>>
>>> Hi,
>>>
>>> I'm using Felix in http-bridge mode following the sample located here:
>>> http://svn.apache.org/repos/asf/felix/trunk/http/samples/bridge/
>>>
>>> The webapp I'm building pre-packages some bundles that should be started
>>> when the framework starts. However I'm running into a problem when
>>> auto-deploying a fragment bundle. Obviously, these shouldn't be started
>>> by
>>> Felix. And if I'm correctly reading the documentation, Felix in standard
>>> mode provides the configuration property felix.auto.install.n to handle
>>> this
>>> situation. However, this is a _configuration_ property. And it seems that
>>> setting felix.auto.install.n as a system property doesn't work. When
>>> constructing Felix I only know how to pass system properties: new
>>> Felix(sysProps).
>>>
>>> Can someone point me to some code where I can learn how to initialize
>>> felix
>>> from my webapp so that I can either pass configuration properties if that
>>> is
>>> possible or else tell felix some other way to not try to start my
>>> fragment
>>> bundles.
>>>
>>> Thanks,
>>> Gebo
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Karl Pauls
>> karlpauls@gmail.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>



-- 
Karl Pauls
karlpauls@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Auto installing fragments in http-bridge mode

Posted by Gebo Uniken <ge...@gmail.com>.
Yes I did that. felix.auto.install.1=file:bundles/slf4j-jcl.jar

However, in the documentation you point to, namely here:  http://felix.apache.org/site/apache-felix-framework-launching-and-embedding.html#ApacheFelixFrameworkLaunchingandEmbedding-creatingandconfiguring
it doesn't list the felix.auto.install.<n> property.

But if you say that it should work I'll try harder to make it work.  
See if I didn't make any mistakes.

Thanks for the quick reply,
Gebo

Op 6 dec 2010, om 14:37 heeft Karl Pauls het volgende geschreven:

> Did you replace the ".n" with a startlevel number e.g.;
>
> felix.auto.install.1
>
> because it should work if you pass it into the felix instance.
> Otherwise, have a look at:
>
> http://felix.apache.org/site/apache-felix-framework-launching-and-embedding.html
>
> regards,
>
> Karl
>
> On Mon, Dec 6, 2010 at 2:31 PM, Gebo Uniken <ge...@gmail.com>  
> wrote:
>> Hi,
>>
>> I'm using Felix in http-bridge mode following the sample located  
>> here:
>> http://svn.apache.org/repos/asf/felix/trunk/http/samples/bridge/
>>
>> The webapp I'm building pre-packages some bundles that should be  
>> started
>> when the framework starts. However I'm running into a problem when
>> auto-deploying a fragment bundle. Obviously, these shouldn't be  
>> started by
>> Felix. And if I'm correctly reading the documentation, Felix in  
>> standard
>> mode provides the configuration property felix.auto.install.n to  
>> handle this
>> situation. However, this is a _configuration_ property. And it  
>> seems that
>> setting felix.auto.install.n as a system property doesn't work. When
>> constructing Felix I only know how to pass system properties: new
>> Felix(sysProps).
>>
>> Can someone point me to some code where I can learn how to  
>> initialize felix
>> from my webapp so that I can either pass configuration properties  
>> if that is
>> possible or else tell felix some other way to not try to start my  
>> fragment
>> bundles.
>>
>> Thanks,
>> Gebo
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>
>
>
> -- 
> Karl Pauls
> karlpauls@gmail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Auto installing fragments in http-bridge mode

Posted by Karl Pauls <ka...@gmail.com>.
Did you replace the ".n" with a startlevel number e.g.;

felix.auto.install.1

because it should work if you pass it into the felix instance.
Otherwise, have a look at:

http://felix.apache.org/site/apache-felix-framework-launching-and-embedding.html

regards,

Karl

On Mon, Dec 6, 2010 at 2:31 PM, Gebo Uniken <ge...@gmail.com> wrote:
> Hi,
>
> I'm using Felix in http-bridge mode following the sample located here:
> http://svn.apache.org/repos/asf/felix/trunk/http/samples/bridge/
>
> The webapp I'm building pre-packages some bundles that should be started
> when the framework starts. However I'm running into a problem when
> auto-deploying a fragment bundle. Obviously, these shouldn't be started by
> Felix. And if I'm correctly reading the documentation, Felix in standard
> mode provides the configuration property felix.auto.install.n to handle this
> situation. However, this is a _configuration_ property. And it seems that
> setting felix.auto.install.n as a system property doesn't work. When
> constructing Felix I only know how to pass system properties: new
> Felix(sysProps).
>
> Can someone point me to some code where I can learn how to initialize felix
> from my webapp so that I can either pass configuration properties if that is
> possible or else tell felix some other way to not try to start my fragment
> bundles.
>
> Thanks,
> Gebo
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>



-- 
Karl Pauls
karlpauls@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org