Thanks, that makes sense. I really appreciate your help!

I think I found a work around, that worked for me at least. Instead of
assigning start levels, I just put all of the core felix bundles and Pax
logging into the auto startup folder (default: ./bundle) and then dropped
everything else including my PAX config into the File Install folder
(default: ./load). Looks like File Install would read and push out the PAX
config file before loading the bundles in the same folder. Don't know if
this is by design or not, but seemed to always read the configs first. Since
the PAX config gets pushed out before all of the bundles get loaded, their
log statements are applied against the loaded PAX config logger.

>From what I can tell, it looks like the File Install config push seems
synchronous, as it would not start loading bundles until the config was
fully applied... /shrug... either way, seemed to solve the issue. 

Thanks!


gnodet wrote:
> 
> The thing is that config admin pushes changes asynchronously. So there
> will be a small delay between when pax-logging resisteres the
> ManagedFactory and the time it will be actually configured.
> 
> On Sat, Feb 20, 2010 at 00:59, steve.foster <[email protected]>
> wrote:
>>
>> I think that worked, but didn't have the result I expected.
>> Here's the output...
>>
>> Welcome to Felix
>> ================
>>
>> [FelixStartLevel] INFO org.ops4j.pax.logging.internal.Activator -
>> Enabling
>> SLF4J API support.
>> [FelixStartLevel] INFO org.ops4j.pax.logging.internal.Activator -
>> Enabling
>> Jakarta Commons Logging API support.
>> [Configuration Updater] DEBUG org.apache.felix.configadmin - Running task
>> ManagedService Update: pid=org.ops4j.pax.logging
>> [FelixDispatchQueue] DEBUG org.ops4j.pax.logging.pax-logging-service -
>> BundleEvent STARTED
>> [FelixStartLevel] INFO org.ops4j.pax.logging.internal.Activator -
>> Enabling
>> Log4J API support.
>> [FelixStartLevel] INFO org.ops4j.pax.logging.internal.Activator -
>> Enabling
>> Avalon Logger API support.
>> [FelixStartLevel] INFO org.ops4j.pax.logging.internal.Activator -
>> Enabling
>> JULI Logger API support.
>> [FelixDispatchQueue] DEBUG org.ops4j.pax.logging.pax-logging-api -
>> BundleEvent STARTED
>> [FelixStartLevel] DEBUG org.apache.felix.fileinstall - ServiceEvent
>> REGISTERED
>> [FelixStartLevel] DEBUG org.apache.felix.fileinstall - ServiceEvent
>> REGISTERED
>> [FelixStartLevel] DEBUG org.apache.felix.configadmin - Scheduling task
>> ManagedServiceFactory Update: factoryPid=org.apache.felix.fileinstall
>> [FelixDispatchQueue] DEBUG org.apache.felix.fileinstall - BundleEvent
>> RESOLVED
>> [Configuration Updater] DEBUG org.apache.felix.configadmin - Running task
>> ManagedServiceFactory Update: factoryPid=org.apache.felix.fileinstall
>> [FelixDispatchQueue] DEBUG org.apache.felix.fileinstall - BundleEvent
>> STARTED
>> ...LOTS OF DEBUG SPAM HERE...
>> ...LOTS OF DEBUG SPAM HERE...
>> [fileinstall-./load] DEBUG org.apache.felix.configadmin - Scheduling task
>> Update: pid=org.ops4j.pax.logging
>> [Configuration Updater] DEBUG org.apache.felix.configadmin - Running task
>> Update: pid=org.ops4j.pax.logging
>>
>>
>> After that, the logging config is applied (second poll), which makes me
>> wonder if File Install really pushed out the config on the initial
>> (first)
>> poll. Maybe an issue with the run levels of the packages, or there is
>> something else needed to be started for the config to be applied?
>>
>> FELIX config.properties...
>> felix.auto.start.2= \
>>    file:deploy/org.apache.felix.configadmin-1.2.4.jar \
>>    file:deploy/pax-logging-service-1.4.jar \
>>    file:deploy/pax-logging-api-1.4.jar
>>
>> felix.auto.start.3= \
>>    file:deploy/org.apache.felix.fileinstall-2.0.8.jar
>>
>> org.osgi.framework.startlevel.beginning=4
>> felix.startlevel.bundle=4
>>
>>
>> Or maybe PAX goes async mode during the startup and a race condition
>> results
>> between PAX fully loading up, and File Install pushing out the config
>> settings...
>>
>> Any ideas?
>>
>>
>> gnodet wrote:
>>>
>>> Yeah, there is a flag you can set.  We use it for karaf.
>>> Just add the following:
>>>    felix.fileinstall.noInitialDelay = true
>>>
>>> This mostly works for the default configuration.  In that case,
>>> fileinstall will perform the first poll synchronously while the bundle
>>> is starting.
>>>
>>> On Sat, Feb 20, 2010 at 00:24, steve.foster <[email protected]>
>>> wrote:
>>>>
>>>> Hello All,
>>>>
>>>> Just wondering if there is a way to get the File Install bundle to do
>>>> an
>>>> initial poll during it's startup, instead of waiting for the delay
>>>> before
>>>> it
>>>> starts polling?
>>>>
>>>> Basically what I'm after is using the File Install to configure PAX
>>>> logging
>>>> via the config file. It works currently, but the issue is I would like
>>>> it
>>>> to
>>>> load the logging config before it moves to the next run level. So PAX
>>>> will
>>>> already have the configuration in place when other bundles startup, so
>>>> the
>>>> other bundles don't spam the console with debug messages.
>>>>
>>>> I can simulate it by setting the poll interval to something very small,
>>>> but
>>>> that really isn't the solution.
>>>>
>>>> Any ideas? Maybe there is a better way to go about this?
>>>>
>>>> Thanks!
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/Felix-File-Install---Immediately-poll-on-startup-tp27661788p27661788.html
>>>> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [email protected]
>>>> For additional commands, e-mail: [email protected]
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Cheers,
>>> Guillaume Nodet
>>> ------------------------
>>> Blog: http://gnodet.blogspot.com/
>>> ------------------------
>>> Open Source SOA
>>> http://fusesource.com
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Felix-File-Install---Immediately-poll-on-startup-tp27661788p27662059.html
>> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
> 
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Felix-File-Install---Immediately-poll-on-startup-tp27661788p27676875.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to