[jbosstools-issues] [JBoss JIRA] (JBIDE-12162) Server adapters Runtime home directory cannot be different

Rob Stryker (JIRA) jira-events at lists.jboss.org
Tue Jun 12 23:50:04 EDT 2012


    [ https://issues.jboss.org/browse/JBIDE-12162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700913#comment-12700913 ] 

Rob Stryker commented on JBIDE-12162:
-------------------------------------

it seems that underneath the hood, the home directories *are* different. You can verify this by opening each server in the server editor, and then opening their launch configurations. You will see different values there. 

That means that this is a UI issue in the runtime wizard fragment, and after investigating, thats exactly whta it is. It seems that the runtime wizard fragments are only instantiated once. They are not instantiated each time something asks for one. And so therefore any state stored in them must be cleared before the next using. 

Here's a patch:

{code}
Index: JBossRuntimeWizardFragment.java
===================================================================
--- JBossRuntimeWizardFragment.java     (revision 41765)
+++ JBossRuntimeWizardFragment.java     (working copy)
@@ -131,6 +131,9 @@
        }
        
        protected void updateModels() {
+               // clean state from last time this fragment was used
+               // (fragments apparently do not have new instances constructed. ugh)
+               homeDir = null;
                updateJREs();
        }
        
Index: JBoss7RuntimeWizardFragment.java
===================================================================
--- JBoss7RuntimeWizardFragment.java    (revision 41765)
+++ JBoss7RuntimeWizardFragment.java    (working copy)
@@ -52,11 +52,6 @@
        }
 
        @Override
-       protected void updateModels() {
-               updateJREs();
-       }
-
-       @Override
        protected void createWidgets(Composite main) {
                createExplanation(main);
                createNameComposite(main);
{code}
                
> Server adapters Runtime home directory cannot be different
> ----------------------------------------------------------
>
>                 Key: JBIDE-12162
>                 URL: https://issues.jboss.org/browse/JBIDE-12162
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: JBossAS/Servers
>            Reporter: Max Rydahl Andersen
>            Assignee: Rob Stryker
>            Priority: Critical
>             Fix For: 3.3.0.Final
>
>
> 1. create server 1 with runtime 1 
> 2. create server 2 with runtime 2 (of same type as used in #1)
> 3. change runtime 1 homedirectory via server editor to something different than #2
> Assert:; runtime 1 and runtime 2 directory are now different.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list