Derby
  1. Derby
  2. DERBY-314

eclipse plugin needs improved network server process handling

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.0.2.0
    • Fix Version/s: 10.1.1.0
    • Component/s: Tools
    • Labels:
      None
    • Environment:
      windows, eclipse 301, jdk142

      Description

      The eclipse plugin allows you to create multiple network server processes within the same project through a gap in the checking mechanism, but you can't close all those you create that way from within eclipse.

      To duplicate do the following:

      • setup the plugin and apply the eclipse nature to a project
      • start network server on the default port.
      • switch the port number using the derby preferences e.g. to 1528
      • go to the derby task - you see that the networkserver start/stop is a toggle, and because last time you started a networkserver process, it is now on 'stop'. Run the 'stop Networkserver. This will fail, because network server is not running on port 1528, so cannot be stopped.
        The toggle will now go back to 'start'.
      • start networkserver on port 1528.
      • trying this 'trick' in reverse - i.e. for the start - does not work, if the start fails, the toggle remains on 'start'.

        Activity

        Hide
        Susan Cline added a comment -

        Attached is a patch to resolve the problem with the Derby UI plugin where the network server can be started on multiple ports for the same Eclipse project and not being able to stop a running network server for a project.

        I'd appreciate it is someone could review it, and if it looks okay, commit it.

        The fix changes the behaviour to the following:

        1) Only one network server can be started per project.

        2) Once a network server is started for a project it must be stopped before any of it's settings (port, host and derby.system.home) can be changed.

        3) If a user tries to change these settings when the network server is running they will be notified
        that they cannot change them, and the text fields become uneditable.

        Testing:

        Manually tested this scenario:

        Started a network server for a project
        Attempted to change the port for the project
        This fails - the textfields are uneditable and a Pop-up box states the server must be stopped
        Stopped the network server
        Changed the port number
        Restarted the network server on the new port number
        Stopped the network server on this port number

        Created a second project and modified the port number to be the same as the
        server running on the first project.
        The console window explains this fails because a server is already running on this port.

        Output from svn stat:

        M plugins\eclipse\org.apache.derby.ui\src\org\apache\derby\ui\common\Messages.java
        M plugins\eclipse\org.apache.derby.ui\src\org\apache\derby\ui\properties\DerbyPropertiesPage.java

        Susan

        Patch attached.

        Show
        Susan Cline added a comment - Attached is a patch to resolve the problem with the Derby UI plugin where the network server can be started on multiple ports for the same Eclipse project and not being able to stop a running network server for a project. I'd appreciate it is someone could review it, and if it looks okay, commit it. The fix changes the behaviour to the following: 1) Only one network server can be started per project. 2) Once a network server is started for a project it must be stopped before any of it's settings (port, host and derby.system.home) can be changed. 3) If a user tries to change these settings when the network server is running they will be notified that they cannot change them, and the text fields become uneditable. Testing: Manually tested this scenario: Started a network server for a project Attempted to change the port for the project This fails - the textfields are uneditable and a Pop-up box states the server must be stopped Stopped the network server Changed the port number Restarted the network server on the new port number Stopped the network server on this port number Created a second project and modified the port number to be the same as the server running on the first project. The console window explains this fails because a server is already running on this port. Output from svn stat: M plugins\eclipse\org.apache.derby.ui\src\org\apache\derby\ui\common\Messages.java M plugins\eclipse\org.apache.derby.ui\src\org\apache\derby\ui\properties\DerbyPropertiesPage.java Susan Patch attached.
        Hide
        Andrew McIntyre added a comment -

        Committed attached patch, revision 189829.

        Show
        Andrew McIntyre added a comment - Committed attached patch, revision 189829.
        Hide
        Myrna van Lunteren added a comment -

        all done.

        Show
        Myrna van Lunteren added a comment - all done.

          People

          • Assignee:
            Susan Cline
            Reporter:
            Myrna van Lunteren
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development