From dev-return-95764-apmail-geronimo-dev-archive=geronimo.apache.org@geronimo.apache.org Thu Oct 11 18:21:05 2012 Return-Path: X-Original-To: apmail-geronimo-dev-archive@www.apache.org Delivered-To: apmail-geronimo-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 64E6FD074 for ; Thu, 11 Oct 2012 18:21:05 +0000 (UTC) Received: (qmail 14815 invoked by uid 500); 11 Oct 2012 18:21:03 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 14747 invoked by uid 500); 11 Oct 2012 18:21:03 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 14537 invoked by uid 99); 11 Oct 2012 18:21:03 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Oct 2012 18:21:03 +0000 Date: Thu, 11 Oct 2012 18:21:03 +0000 (UTC) From: "Jarek Gawor (JIRA)" To: dev@geronimo.apache.org Message-ID: <62750369.32516.1349979663614.JavaMail.jiratomcat@arcas> In-Reply-To: <542423615.4538.1349497922697.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (GERONIMODEVTOOLS-805) Restart bundle when Eclipse HCR fails 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/GERONIMODEVTOOLS-805?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13474402#comment-13474402 ] Jarek Gawor commented on GERONIMODEVTOOLS-805: ---------------------------------------------- Updated the code to restart the bundle in revision 1394917. When Eclipse HCR fails Eclipse saves the Java type as out-of-synch type. During publishing GEP checks if any of the modified classes are on this out-of-synch list and if so forces bundle restart. If none of the modified classes are on the out-of-synch list then the class changes are just persisted to the disk. Garbage collection is also forced after a bundle is restarted after HCR failure. This is done in order to (or try to) ensure that there is only one copy of the given Java type loaded in the server VM. Otherwise, Eclipse HCR might fail if tires to update two or more (i.e. old and new) versions of the same Java type. Every time bundle restart is forced after HCR failure the following informational message will show up in the Eclipse "error log": Eclipse hot code replace failed - will restart bundle. GEP also registers a custom HotCodeReplaceListener which prevents the Eclipse's standard "hot code replace failed" dialog from showing. The HotCodeReplaceListener just logs the HCR results. > Restart bundle when Eclipse HCR fails > ------------------------------------- > > Key: GERONIMODEVTOOLS-805 > URL: https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-805 > Project: Geronimo-Devtools > Issue Type: Improvement > Components: eclipse-plugin > Affects Versions: 3.0 > Reporter: Jarek Gawor > Assignee: Jarek Gawor > > Currently, when Eclipse hot code replace (HCR) fails at debug time the changes made to the Java class are just persisted to disk. This can be improved a bit so that the bundle is automatically restarted when HCR fails. This should allow the user to continue debugging the class without being in an inconsistent state. -- 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