Return-Path: X-Original-To: apmail-felix-dev-archive@www.apache.org Delivered-To: apmail-felix-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E5B72D6BE for ; Mon, 31 Dec 2012 20:06:12 +0000 (UTC) Received: (qmail 84493 invoked by uid 500); 31 Dec 2012 20:06:12 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 84422 invoked by uid 500); 31 Dec 2012 20:06:12 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 84412 invoked by uid 99); 31 Dec 2012 20:06:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Dec 2012 20:06:12 +0000 Date: Mon, 31 Dec 2012 20:06:12 +0000 (UTC) From: "Felix Meschberger (JIRA)" To: dev@felix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (FELIX-3607) ThreadIO doesn't utilize changed system streams after bundle activation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FELIX-3607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Felix Meschberger updated FELIX-3607: ------------------------------------- Component/s: (was: Configuration Admin) > ThreadIO doesn't utilize changed system streams after bundle activation > ----------------------------------------------------------------------- > > Key: FELIX-3607 > URL: https://issues.apache.org/jira/browse/FELIX-3607 > Project: Felix > Issue Type: Bug > Components: Gogo Runtime > Affects Versions: gogo.runtime-0.12.0 > Reporter: Tuomas Kiviaho > Priority: Minor > Attachments: gogo-runtime.patch > > > I use maven failsafe to run integration test fragments inside external osgi framework and remote gogo is used to bridge forked failsafe execution with a bundled failsafe junit provider. Everything has worked fine until I noticed that once executing thread changes. Then I seem to start receiving surefire/failsafe directives along with whatever is printed to system streams. > When thread execution stays the same there is no problem > 'Hello World' -> server[failsafe] -> > '3,0001,Hello World' -> server[telnetconsole] -> > '3,0001,Hello World' -> client[telnetconsole] -> > '3,0001,Hello World' -> client[failsafe] -> > 'Hello World' > but thread changes due to using log service for instance then the message isn't coming back (which is perfectly normal) but instead is poured over to System.out > 'Hello World' -> server[logservice] -> > 'Hello World' -> server[loglistener] -> // here we have a different thread > 'Hello World' -> server[failsafe] -> > '3,0001,Hello World' -> server[telnetconsole] -> > '3,0001,Hello World' -> System.out // and here thread local can't be found so System.out is used as fallback mechanism > or that's what I think was meant to be. Actually the printing is done to some ancient System.out that was set during the bundle got active. Failsafe infact pushes and pops the System.out in between without Gogo noticing it. > This kind of possiblility could be taken into account by wrapping the system in, out and error to a dedicated FilteredStreams that use the previously obtained streams in case system streams do not point to ThreadIOImpl's err,out and in anymore. The close() method already contains similar logic. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira