You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Joel Schuster <jo...@Navsys.com> on 2010/01/29 19:00:21 UTC

FileInstall at different start levels

Is there any way to have multiple different FileInstall instances have different start levels?

I'm using FileInstall with multiple cfgs (up to 10), each monitoring different bundle/config directories depending on how I need to configure my run time.

I'm running into cases where one set needs to be all started before another set of bundles come up.

Any suggestions?

Re: FileInstall at different start levels

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 1/29/10 16:04, Joel Schuster wrote:
> Please see:
>
> https://issues.apache.org/jira/browse/FELIX-2021
>
> I've included a patch that adds this functionality. It seems to work quite nicely.
>    

Excellent. Please read my comment on the issue...

Thanks!

-> richard

> - Joel
>
> -----Original Message-----
> From: Richard S. Hall [mailto:heavy@ungoverned.org]
> Sent: Friday, January 29, 2010 12:02 PM
> To: users@felix.apache.org
> Subject: Re: FileInstall at different start levels
>
> On 1/29/10 13:19, Joel Schuster wrote:
>    
>> Oh, wait. After re-reading I believe you are saying I should implement that functionality... You know, contribute.
>>
>>      
> Yes, that is what I was saying. There is currently no support for that.
>
> I don't know the File Install code really well, but I believe that it
> allows you to configure new directories by dropping in a .cfg file to
> configure new watched directories. So, it would seem one would just need
> to modify File Install to introduce a new config property for setting a
> bundle's start level once it is installed. This should be fairly
> straightforward especially seeing that File Install already tracks the
> Start Level service.
>
> Of course, I am not a user of File Install, so maybe there are reasons
> why not to do this. At a minimum, open a JIRA issue and request the feature.
>
> ->  richard
>
>    
>> -----Original Message-----
>> From: Joel Schuster [mailto:joels@Navsys.com]
>> Sent: Friday, January 29, 2010 11:14 AM
>> To: users@felix.apache.org
>> Subject: RE: FileInstall at different start levels
>>
>> How would I associate a default start level config property per directory. This sounds like exactly what I need, just not sure how that would work in practice.
>>
>> - Joel
>>
>> -----Original Message-----
>> From: Richard S. Hall [mailto:heavy@ungoverned.org]
>> Sent: Friday, January 29, 2010 11:12 AM
>> To: users@felix.apache.org
>> Subject: Re: FileInstall at different start levels
>>
>> On 1/29/10 13:00, Joel Schuster wrote:
>>
>>      
>>> Is there any way to have multiple different FileInstall instances have different start levels?
>>>
>>> I'm using FileInstall with multiple cfgs (up to 10), each monitoring different bundle/config directories depending on how I need to configure my run time.
>>>
>>> I'm running into cases where one set needs to be all started before another set of bundles come up.
>>>
>>> Any suggestions?
>>>
>>>
>>>        
>> Currently, I don't think File Install deals with bundle start levels at all.
>>
>> One way to support this is to associate a default start level config
>> property per watched directory, so the bundles in that directory would
>> be put into the specified start level. You could create an issue and/or
>> submit a patch...
>>
>> ->   richard
>>
>> ---------------------------------------------------------------------
>> 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
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>
> ---------------------------------------------------------------------
> 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: FileInstall at different start levels

Posted by Joel Schuster <jo...@Navsys.com>.
Please see:

https://issues.apache.org/jira/browse/FELIX-2021

I've included a patch that adds this functionality. It seems to work quite nicely.

- Joel

-----Original Message-----
From: Richard S. Hall [mailto:heavy@ungoverned.org] 
Sent: Friday, January 29, 2010 12:02 PM
To: users@felix.apache.org
Subject: Re: FileInstall at different start levels

On 1/29/10 13:19, Joel Schuster wrote:
> Oh, wait. After re-reading I believe you are saying I should implement that functionality... You know, contribute.
>    

Yes, that is what I was saying. There is currently no support for that.

I don't know the File Install code really well, but I believe that it 
allows you to configure new directories by dropping in a .cfg file to 
configure new watched directories. So, it would seem one would just need 
to modify File Install to introduce a new config property for setting a 
bundle's start level once it is installed. This should be fairly 
straightforward especially seeing that File Install already tracks the 
Start Level service.

Of course, I am not a user of File Install, so maybe there are reasons 
why not to do this. At a minimum, open a JIRA issue and request the feature.

-> richard

>
> -----Original Message-----
> From: Joel Schuster [mailto:joels@Navsys.com]
> Sent: Friday, January 29, 2010 11:14 AM
> To: users@felix.apache.org
> Subject: RE: FileInstall at different start levels
>
> How would I associate a default start level config property per directory. This sounds like exactly what I need, just not sure how that would work in practice.
>
> - Joel
>
> -----Original Message-----
> From: Richard S. Hall [mailto:heavy@ungoverned.org]
> Sent: Friday, January 29, 2010 11:12 AM
> To: users@felix.apache.org
> Subject: Re: FileInstall at different start levels
>
> On 1/29/10 13:00, Joel Schuster wrote:
>    
>> Is there any way to have multiple different FileInstall instances have different start levels?
>>
>> I'm using FileInstall with multiple cfgs (up to 10), each monitoring different bundle/config directories depending on how I need to configure my run time.
>>
>> I'm running into cases where one set needs to be all started before another set of bundles come up.
>>
>> Any suggestions?
>>
>>      
> Currently, I don't think File Install deals with bundle start levels at all.
>
> One way to support this is to associate a default start level config
> property per watched directory, so the bundles in that directory would
> be put into the specified start level. You could create an issue and/or
> submit a patch...
>
> ->  richard
>
> ---------------------------------------------------------------------
> 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
>
>
> ---------------------------------------------------------------------
> 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


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


Re: FileInstall at different start levels

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 1/29/10 13:19, Joel Schuster wrote:
> Oh, wait. After re-reading I believe you are saying I should implement that functionality... You know, contribute.
>    

Yes, that is what I was saying. There is currently no support for that.

I don't know the File Install code really well, but I believe that it 
allows you to configure new directories by dropping in a .cfg file to 
configure new watched directories. So, it would seem one would just need 
to modify File Install to introduce a new config property for setting a 
bundle's start level once it is installed. This should be fairly 
straightforward especially seeing that File Install already tracks the 
Start Level service.

Of course, I am not a user of File Install, so maybe there are reasons 
why not to do this. At a minimum, open a JIRA issue and request the feature.

-> richard

>
> -----Original Message-----
> From: Joel Schuster [mailto:joels@Navsys.com]
> Sent: Friday, January 29, 2010 11:14 AM
> To: users@felix.apache.org
> Subject: RE: FileInstall at different start levels
>
> How would I associate a default start level config property per directory. This sounds like exactly what I need, just not sure how that would work in practice.
>
> - Joel
>
> -----Original Message-----
> From: Richard S. Hall [mailto:heavy@ungoverned.org]
> Sent: Friday, January 29, 2010 11:12 AM
> To: users@felix.apache.org
> Subject: Re: FileInstall at different start levels
>
> On 1/29/10 13:00, Joel Schuster wrote:
>    
>> Is there any way to have multiple different FileInstall instances have different start levels?
>>
>> I'm using FileInstall with multiple cfgs (up to 10), each monitoring different bundle/config directories depending on how I need to configure my run time.
>>
>> I'm running into cases where one set needs to be all started before another set of bundles come up.
>>
>> Any suggestions?
>>
>>      
> Currently, I don't think File Install deals with bundle start levels at all.
>
> One way to support this is to associate a default start level config
> property per watched directory, so the bundles in that directory would
> be put into the specified start level. You could create an issue and/or
> submit a patch...
>
> ->  richard
>
> ---------------------------------------------------------------------
> 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
>
>
> ---------------------------------------------------------------------
> 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: FileInstall at different start levels

Posted by Joel Schuster <jo...@Navsys.com>.
Oh, wait. After re-reading I believe you are saying I should implement that functionality... You know, contribute.


-----Original Message-----
From: Joel Schuster [mailto:joels@Navsys.com] 
Sent: Friday, January 29, 2010 11:14 AM
To: users@felix.apache.org
Subject: RE: FileInstall at different start levels

How would I associate a default start level config property per directory. This sounds like exactly what I need, just not sure how that would work in practice.

- Joel

-----Original Message-----
From: Richard S. Hall [mailto:heavy@ungoverned.org] 
Sent: Friday, January 29, 2010 11:12 AM
To: users@felix.apache.org
Subject: Re: FileInstall at different start levels

On 1/29/10 13:00, Joel Schuster wrote:
> Is there any way to have multiple different FileInstall instances have different start levels?
>
> I'm using FileInstall with multiple cfgs (up to 10), each monitoring different bundle/config directories depending on how I need to configure my run time.
>
> I'm running into cases where one set needs to be all started before another set of bundles come up.
>
> Any suggestions?
>    

Currently, I don't think File Install deals with bundle start levels at all.

One way to support this is to associate a default start level config 
property per watched directory, so the bundles in that directory would 
be put into the specified start level. You could create an issue and/or 
submit a patch...

-> richard

---------------------------------------------------------------------
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


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


RE: FileInstall at different start levels

Posted by Joel Schuster <jo...@Navsys.com>.
How would I associate a default start level config property per directory. This sounds like exactly what I need, just not sure how that would work in practice.

- Joel

-----Original Message-----
From: Richard S. Hall [mailto:heavy@ungoverned.org] 
Sent: Friday, January 29, 2010 11:12 AM
To: users@felix.apache.org
Subject: Re: FileInstall at different start levels

On 1/29/10 13:00, Joel Schuster wrote:
> Is there any way to have multiple different FileInstall instances have different start levels?
>
> I'm using FileInstall with multiple cfgs (up to 10), each monitoring different bundle/config directories depending on how I need to configure my run time.
>
> I'm running into cases where one set needs to be all started before another set of bundles come up.
>
> Any suggestions?
>    

Currently, I don't think File Install deals with bundle start levels at all.

One way to support this is to associate a default start level config 
property per watched directory, so the bundles in that directory would 
be put into the specified start level. You could create an issue and/or 
submit a patch...

-> richard

---------------------------------------------------------------------
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: FileInstall at different start levels

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 1/29/10 13:00, Joel Schuster wrote:
> Is there any way to have multiple different FileInstall instances have different start levels?
>
> I'm using FileInstall with multiple cfgs (up to 10), each monitoring different bundle/config directories depending on how I need to configure my run time.
>
> I'm running into cases where one set needs to be all started before another set of bundles come up.
>
> Any suggestions?
>    

Currently, I don't think File Install deals with bundle start levels at all.

One way to support this is to associate a default start level config 
property per watched directory, so the bundles in that directory would 
be put into the specified start level. You could create an issue and/or 
submit a patch...

-> richard

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


Re: FileInstall at different start levels

Posted by Justin Edelson <ju...@gmail.com>.
Hmmm. I think we're refering to two different things. What I mean by the 
extender pattern is where a bundle (the extender bundle) *extends* other 
bundles in some domain-specific way based on some criteria, typically 
the contents of the bundle or the manifest (or both).

Typically, I've seen this implemented with a two-phase approach upon 
activation of the extender bundle:
1) Extend any existing bundles
2) Watch for new bundles

It sounds from what you are saying that EclipseLink and DOSGi only do 
#2, not #1.

See http://www.aqute.biz/Snippets/Extender for more information.

Justin

On 1/29/10 2:17 PM, Joel Schuster wrote:
> No extender pattern in these cases, dependency is not by extension, just by indirect usage.
>
> - Joel
>
> -----Original Message-----
> From: Justin Edelson [mailto:justinedelson@gmail.com]
> Sent: Friday, January 29, 2010 11:45 AM
> To: users@felix.apache.org
> Subject: Re: FileInstall at different start levels
>
> These seem like bugs in Eclipselink and your DOSGi implementation. The
> extender pattern should apply to bundles started before AND after the
> extender bundle.
>
> Justin
>
> On Jan 29, 2010, at 1:12 PM, Joel Schuster<jo...@Navsys.com>  wrote:
>
>    
>> Just to clarify. The reason I run into problems is that there are no
>> direct dependencies between some bundles.
>>
>> Example:
>>
>> DB bundle that has a persistence.xml needs to be loaded AFTER
>> Eclipselink bundle that resisters for notification of DB bundles
>> being loaded so that it can go and look for the xml file. If
>> Eclipselink is loaded after DB bundle then the persistence context
>> is not available to some other bundle that uses Eclipselink and DB
>> bundle directly.
>>
>> This is also true for DOSGI, it has to be loaded before any bundles
>> that might have declarations to expose a service as a web service.
>> If the bundle that's trying to be exposed gets loaded first then
>> DOSGI will miss it's opportunity.
>>
>> - Joel
>>
>> -----Original Message-----
>> From: Joel Schuster [mailto:joels@Navsys.com]
>> Sent: Friday, January 29, 2010 11:00 AM
>> To: users@felix.apache.org
>> Subject: FileInstall at different start levels
>>
>> Is there any way to have multiple different FileInstall instances
>> have different start levels?
>>
>> I'm using FileInstall with multiple cfgs (up to 10), each monitoring
>> different bundle/config directories depending on how I need to
>> configure my run time.
>>
>> I'm running into cases where one set needs to be all started before
>> another set of bundles come up.
>>
>> Any suggestions?
>>
>> ---------------------------------------------------------------------
>> 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
>
>
> ---------------------------------------------------------------------
> 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: FileInstall at different start levels

Posted by Joel Schuster <jo...@Navsys.com>.
No extender pattern in these cases, dependency is not by extension, just by indirect usage.

- Joel

-----Original Message-----
From: Justin Edelson [mailto:justinedelson@gmail.com] 
Sent: Friday, January 29, 2010 11:45 AM
To: users@felix.apache.org
Subject: Re: FileInstall at different start levels

These seem like bugs in Eclipselink and your DOSGi implementation. The
extender pattern should apply to bundles started before AND after the
extender bundle.

Justin

On Jan 29, 2010, at 1:12 PM, Joel Schuster <jo...@Navsys.com> wrote:

> Just to clarify. The reason I run into problems is that there are no
> direct dependencies between some bundles.
>
> Example:
>
> DB bundle that has a persistence.xml needs to be loaded AFTER
> Eclipselink bundle that resisters for notification of DB bundles
> being loaded so that it can go and look for the xml file. If
> Eclipselink is loaded after DB bundle then the persistence context
> is not available to some other bundle that uses Eclipselink and DB
> bundle directly.
>
> This is also true for DOSGI, it has to be loaded before any bundles
> that might have declarations to expose a service as a web service.
> If the bundle that's trying to be exposed gets loaded first then
> DOSGI will miss it's opportunity.
>
> - Joel
>
> -----Original Message-----
> From: Joel Schuster [mailto:joels@Navsys.com]
> Sent: Friday, January 29, 2010 11:00 AM
> To: users@felix.apache.org
> Subject: FileInstall at different start levels
>
> Is there any way to have multiple different FileInstall instances
> have different start levels?
>
> I'm using FileInstall with multiple cfgs (up to 10), each monitoring
> different bundle/config directories depending on how I need to
> configure my run time.
>
> I'm running into cases where one set needs to be all started before
> another set of bundles come up.
>
> Any suggestions?
>
> ---------------------------------------------------------------------
> 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


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


Re: FileInstall at different start levels

Posted by Justin Edelson <ju...@gmail.com>.
These seem like bugs in Eclipselink and your DOSGi implementation. The
extender pattern should apply to bundles started before AND after the
extender bundle.

Justin

On Jan 29, 2010, at 1:12 PM, Joel Schuster <jo...@Navsys.com> wrote:

> Just to clarify. The reason I run into problems is that there are no
> direct dependencies between some bundles.
>
> Example:
>
> DB bundle that has a persistence.xml needs to be loaded AFTER
> Eclipselink bundle that resisters for notification of DB bundles
> being loaded so that it can go and look for the xml file. If
> Eclipselink is loaded after DB bundle then the persistence context
> is not available to some other bundle that uses Eclipselink and DB
> bundle directly.
>
> This is also true for DOSGI, it has to be loaded before any bundles
> that might have declarations to expose a service as a web service.
> If the bundle that's trying to be exposed gets loaded first then
> DOSGI will miss it's opportunity.
>
> - Joel
>
> -----Original Message-----
> From: Joel Schuster [mailto:joels@Navsys.com]
> Sent: Friday, January 29, 2010 11:00 AM
> To: users@felix.apache.org
> Subject: FileInstall at different start levels
>
> Is there any way to have multiple different FileInstall instances
> have different start levels?
>
> I'm using FileInstall with multiple cfgs (up to 10), each monitoring
> different bundle/config directories depending on how I need to
> configure my run time.
>
> I'm running into cases where one set needs to be all started before
> another set of bundles come up.
>
> Any suggestions?
>
> ---------------------------------------------------------------------
> 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: FileInstall at different start levels

Posted by Joel Schuster <jo...@Navsys.com>.
Just to clarify. The reason I run into problems is that there are no direct dependencies between some bundles.

Example:

DB bundle that has a persistence.xml needs to be loaded AFTER Eclipselink bundle that resisters for notification of DB bundles being loaded so that it can go and look for the xml file. If Eclipselink is loaded after DB bundle then the persistence context is not available to some other bundle that uses Eclipselink and DB bundle directly.

This is also true for DOSGI, it has to be loaded before any bundles that might have declarations to expose a service as a web service. If the bundle that's trying to be exposed gets loaded first then DOSGI will miss it's opportunity.

- Joel

-----Original Message-----
From: Joel Schuster [mailto:joels@Navsys.com] 
Sent: Friday, January 29, 2010 11:00 AM
To: users@felix.apache.org
Subject: FileInstall at different start levels

Is there any way to have multiple different FileInstall instances have different start levels?

I'm using FileInstall with multiple cfgs (up to 10), each monitoring different bundle/config directories depending on how I need to configure my run time.

I'm running into cases where one set needs to be all started before another set of bundles come up.

Any suggestions?

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