Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: V3
    • Fix Version/s: not determined
    • Component/s: installation
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      6,784

      Description

      Batches are common in the UNIX world and had been popular in the DOS world, too.
      But in the Windows world, batches are something administrators don't like: The
      chance is just too high that they break. The reason is that the batch language
      is not well suited for exceptions. Batches are potentially instable. Also when
      running they open that ugly DOS BOX, which nobody wants to see and (worse!)
      could break using CTRL-BREAK (with undeterministic result, depending on the
      currently executed command within the batch). And worse, the batch language
      itself has several differences between the Windows versions...

      On Windows it is typical to have an EXE file. In the Java world it is typical to
      have a JAR file. Both can be supplied with excellent exception handling and can
      optionally run without showing any UI.

      So it would be really great if there would be no batches but EXE or JAR files
      that drive the command line interface. I do not see anything in the batch that
      can be done in a batch but not in a JAR file. Since we are in the Java universe
      let's use Java.

        Activity

        Hide
        Byron Nevins added a comment -

        I'm starting to get a little bit lost. The discussion is too abstract. What
        specifically are you talking about? Is it that "asadmin.bat" even exists? Or
        is it that the installer provides these clunky little scripts that start and
        stop the server?

        In the former case, we are providing a service to users. Asadmin is a **command
        line tool**. It is supposed to be used in a "DOS box". We provide a fully
        featured GUI as well – the Admin GUI normally found at localhost:4848. Asadmin
        allows you to easily do things like run JDK6 for V3 and run JDK5 for other
        things, etc.

        This is analogous to what Microsoft does. E.g. managing Services
        GUI: "Rt-Click My Computer/Manage/Services&Applications/Services"
        Command Line: sc

        You can run "asadmin" easily without a batch file. Simply run it like so – no
        batch involved:

        C:\Users\bnevins>java -jar e:\glassfishv3\glassfish\modules\admin-cli.jar
        start-domain
        Waiting for DAS to start .............
        Started domain: domain1
        Domain location: E:\glassfishv3\glassfish\domains\domain1
        Log file: E:\glassfishv3\glassfish\domains\domain1\logs\server.log
        Admin port for the domain: 4848
        Command start-domain executed successfully.

        Show
        Byron Nevins added a comment - I'm starting to get a little bit lost. The discussion is too abstract. What specifically are you talking about? Is it that "asadmin.bat" even exists? Or is it that the installer provides these clunky little scripts that start and stop the server? In the former case, we are providing a service to users. Asadmin is a **command line tool**. It is supposed to be used in a "DOS box". We provide a fully featured GUI as well – the Admin GUI normally found at localhost:4848. Asadmin allows you to easily do things like run JDK6 for V3 and run JDK5 for other things, etc. This is analogous to what Microsoft does. E.g. managing Services GUI: "Rt-Click My Computer/Manage/Services&Applications/Services" Command Line: sc You can run "asadmin" easily without a batch file. Simply run it like so – no batch involved: C:\Users\bnevins>java -jar e:\glassfishv3\glassfish\modules\admin-cli.jar start-domain Waiting for DAS to start ............. Started domain: domain1 Domain location: E:\glassfishv3\glassfish\domains\domain1 Log file: E:\glassfishv3\glassfish\domains\domain1\logs\server.log Admin port for the domain: 4848 Command start-domain executed successfully.
        Hide
        Byron Nevins added a comment -

        Here is a link that describes how to run a script with no window...

        http://tinyurl.com/6bbe3d

        Show
        Byron Nevins added a comment - Here is a link that describes how to run a script with no window... http://tinyurl.com/6bbe3d
        Hide
        mkarg added a comment -

        It is ok to have CLI tools, but this is not about the form of tool but about
        the form of implementation: Batch files vs. standalone binaries.

        It's not about one particular batch file, it is about using batch files at all.
        Most distracting is applient.bat and asadmin.bat being batch files, but
        certainly every other batch falls into the same category.

        I never said that microsoft does not use CLI tools or batches on their own, but
        that it is uncommon. The fact that microsoft provides one doesn't make it more
        common tot he average Windows user or administrator, and doesn't change their
        own logo criteria.

        The main problem is that a batch can break. The fact that it showns a DOS box
        is just an unwanted (and correctable) side effect.

        And: There is a big difference between a real Windows service and wrapping
        something behaving LIKE a service (read the Windows service API to get an
        understanding of the difference – GF just supports SOME of the needed events,
        while Windows users expect ALL to be supported). Lots of threads in this forum
        are based solely on the fact that GF does not work like a "real" service, but
        just comes with a service that controls GF. That problems will be gone as soon
        as you understand that you must not somehow wrap Java to make it look like
        Windows, but that you must start do DESIGN FOR Windows to make people happy.
        That IS possible in Java, and it does not necessarily break compatibility with
        other platforms. But you need to learn how to do it and you then must do it.
        Otherwise it will always feal like a "impurity" on Windows.

        We lost several customers since they where unhappy with the "strange" felling
        of GF, actually, and all we ask for is just to get rid of batches in the first
        place. Is that so non-understandable?

        Show
        mkarg added a comment - It is ok to have CLI tools, but this is not about the form of tool but about the form of implementation: Batch files vs. standalone binaries. It's not about one particular batch file, it is about using batch files at all. Most distracting is applient.bat and asadmin.bat being batch files, but certainly every other batch falls into the same category. I never said that microsoft does not use CLI tools or batches on their own, but that it is uncommon. The fact that microsoft provides one doesn't make it more common tot he average Windows user or administrator, and doesn't change their own logo criteria. The main problem is that a batch can break. The fact that it showns a DOS box is just an unwanted (and correctable) side effect. And: There is a big difference between a real Windows service and wrapping something behaving LIKE a service (read the Windows service API to get an understanding of the difference – GF just supports SOME of the needed events, while Windows users expect ALL to be supported). Lots of threads in this forum are based solely on the fact that GF does not work like a "real" service, but just comes with a service that controls GF. That problems will be gone as soon as you understand that you must not somehow wrap Java to make it look like Windows, but that you must start do DESIGN FOR Windows to make people happy. That IS possible in Java, and it does not necessarily break compatibility with other platforms. But you need to learn how to do it and you then must do it. Otherwise it will always feal like a "impurity" on Windows. We lost several customers since they where unhappy with the "strange" felling of GF, actually, and all we ask for is just to get rid of batches in the first place. Is that so non-understandable?
        Hide
        scatari added a comment -

        Instead of java.exe, javaw.exe can be used to suppress the command window @startup time. javaw.exe
        uses WinMain() as the entry point.

        Show
        scatari added a comment - Instead of java.exe, javaw.exe can be used to suppress the command window @startup time. javaw.exe uses WinMain() as the entry point.
        Hide
        Tom Mueller added a comment -

        Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.

        Show
        Tom Mueller added a comment - Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.

          People

          • Assignee:
            scatari
            Reporter:
            mkarg
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: