You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Raul Kripalani <ra...@evosent.com> on 2012/12/18 22:08:47 UTC

FileInstall - Avoiding framework refresh

Hi all,

Is it possible to avoid framework refreshes when File Install adds a
bundle? In some cases, refreshing the framework could be somewhat
destructive.

Right now I'm facing a situation where values of MDC logging disappear in
log4j appenders (I know it sounds random, but it's true). My setup: Karaf
2.2.9 with Equinox and Camel 2.10.3.

I've been able to trace this situation to when Commons FileUpload is
dropped inside deploy/, which ends up refreshing Spring Web (has an
optional dependency to FileUpload).

The refresh percolates up to the top due to transitive imports, probably
reaching the Pax Logging bundles. As a result, MDC stops working
altogether, likely related to the new classloader spaces and static
ThreadLocal fields.

Thanks for your help!

Regards,

*Raúl Kripalani*
Apache Camel Committer
Enterprise Architect, Program Manager, Open Source Integration specialist
http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
http://blog.raulkr.net | twitter: @raulvk <http://twitter.com/raulvk>

Re: FileInstall - Avoiding framework refresh

Posted by Peter Kriens <pe...@aqute.biz>.
I think FileInstall just exposes a bug in your setup. Code that can't withstand a refresh is buggy. It is better to find those bugs early and fix them then when they start happening in production.

Kind regards,

	Peter Kriens

On 18 dec. 2012, at 22:08, Raul Kripalani wrote:

> Hi all,
> 
> Is it possible to avoid framework refreshes when File Install adds a
> bundle? In some cases, refreshing the framework could be somewhat
> destructive.
> 
> Right now I'm facing a situation where values of MDC logging disappear in
> log4j appenders (I know it sounds random, but it's true). My setup: Karaf
> 2.2.9 with Equinox and Camel 2.10.3.
> 
> I've been able to trace this situation to when Commons FileUpload is
> dropped inside deploy/, which ends up refreshing Spring Web (has an
> optional dependency to FileUpload).
> 
> The refresh percolates up to the top due to transitive imports, probably
> reaching the Pax Logging bundles. As a result, MDC stops working
> altogether, likely related to the new classloader spaces and static
> ThreadLocal fields.
> 
> Thanks for your help!
> 
> Regards,
> 
> *Raúl Kripalani*
> Apache Camel Committer
> Enterprise Architect, Program Manager, Open Source Integration specialist
> http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
> http://blog.raulkr.net | twitter: @raulvk <http://twitter.com/raulvk>


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


Re: FileInstall - Avoiding framework refresh

Posted by Raul Kripalani <ra...@evosent.com>.
You are right, a refresh is needed at some point but it may not be
desirable to do it just then. Bear in mind that an admin always has access
to other methods to perform an explicit refresh when the time it's suitable
(e.g. Felix shell) for them. FileInstall is, in fact, a secondary mechanism.

In my opinion, it would make for a more powerful FileInstall if one could
configure whether refreshes will be immediate, or are left up to the user.

Agreed that FileInstall is not the best approach for production.

Regards,

Raúl.
On 18 Dec 2012 21:23, "Neil Bartlett" <nj...@gmail.com> wrote:

> A refresh is *needed* when the administrator is finished installing,
> updating and uninstalling bundles. So there has to be some kind of
> "boundary" that marks the end of the set of operations. FileInstall does
> not and cannot have such a boundary, so it is forced to refresh
> continuously.
>
> For this reason I don't recommend using FileInstall in production
> applications. It's fine for development and prototyping, but in a
> production system you need more control.
>
> Neil
>
>
> On Tue, Dec 18, 2012 at 9:08 PM, Raul Kripalani <ra...@evosent.com> wrote:
>
> > Hi all,
> >
> > Is it possible to avoid framework refreshes when File Install adds a
> > bundle? In some cases, refreshing the framework could be somewhat
> > destructive.
> >
> > Right now I'm facing a situation where values of MDC logging disappear in
> > log4j appenders (I know it sounds random, but it's true). My setup: Karaf
> > 2.2.9 with Equinox and Camel 2.10.3.
> >
> > I've been able to trace this situation to when Commons FileUpload is
> > dropped inside deploy/, which ends up refreshing Spring Web (has an
> > optional dependency to FileUpload).
> >
> > The refresh percolates up to the top due to transitive imports, probably
> > reaching the Pax Logging bundles. As a result, MDC stops working
> > altogether, likely related to the new classloader spaces and static
> > ThreadLocal fields.
> >
> > Thanks for your help!
> >
> > Regards,
> >
> > *Raúl Kripalani*
> > Apache Camel Committer
> > Enterprise Architect, Program Manager, Open Source Integration specialist
> > http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
> > http://blog.raulkr.net | twitter: @raulvk <http://twitter.com/raulvk>
> >
>

Re: FileInstall - Avoiding framework refresh

Posted by Neil Bartlett <nj...@gmail.com>.
A refresh is *needed* when the administrator is finished installing,
updating and uninstalling bundles. So there has to be some kind of
"boundary" that marks the end of the set of operations. FileInstall does
not and cannot have such a boundary, so it is forced to refresh
continuously.

For this reason I don't recommend using FileInstall in production
applications. It's fine for development and prototyping, but in a
production system you need more control.

Neil


On Tue, Dec 18, 2012 at 9:08 PM, Raul Kripalani <ra...@evosent.com> wrote:

> Hi all,
>
> Is it possible to avoid framework refreshes when File Install adds a
> bundle? In some cases, refreshing the framework could be somewhat
> destructive.
>
> Right now I'm facing a situation where values of MDC logging disappear in
> log4j appenders (I know it sounds random, but it's true). My setup: Karaf
> 2.2.9 with Equinox and Camel 2.10.3.
>
> I've been able to trace this situation to when Commons FileUpload is
> dropped inside deploy/, which ends up refreshing Spring Web (has an
> optional dependency to FileUpload).
>
> The refresh percolates up to the top due to transitive imports, probably
> reaching the Pax Logging bundles. As a result, MDC stops working
> altogether, likely related to the new classloader spaces and static
> ThreadLocal fields.
>
> Thanks for your help!
>
> Regards,
>
> *Raúl Kripalani*
> Apache Camel Committer
> Enterprise Architect, Program Manager, Open Source Integration specialist
> http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
> http://blog.raulkr.net | twitter: @raulvk <http://twitter.com/raulvk>
>