glassfish
  1. glassfish
  2. GLASSFISH-19398

Add sub-command "list-transactions" to GF V3.x or later

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.1.2.2
    • Fix Version/s: None
    • Component/s: jts
    • Labels:
      None

      Description

      there is some requirements for listing the active transactions on server instance as the transaction id is the operand of some subcomannd.
      eg. the subcommand "rollback-transaction" which described in the following page.
      http://docs.oracle.com/cd/E26576_01/doc.312/e24938/rollback-transaction.htm#rollback-transaction-1

      for the ease of using the command above. we should supply subcommand("list-transactions" for assumed name) to list the active transaction info which contains transaction ID.

        Activity

        Hide
        Wu Jie added a comment -

        > There should be no difference between HIGH and LOW. If the latter doesn't work, file a jts bug.

        I filed a issue about that.
        http://java.net/jira/browse/GLASSFISH-19404

        Show
        Wu Jie added a comment - > There should be no difference between HIGH and LOW. If the latter doesn't work, file a jts bug. I filed a issue about that. http://java.net/jira/browse/GLASSFISH-19404
        Hide
        marina vatkina added a comment -

        There should be no difference between HIGH and LOW. If the latter doesn't work, file a jts bug. But the list-xxx command as a short-cut for monitoring (with duplication of the processing code), seems misleading.

        Show
        marina vatkina added a comment - There should be no difference between HIGH and LOW. If the latter doesn't work, file a jts bug. But the list-xxx command as a short-cut for monitoring (with duplication of the processing code), seems misleading.
        Hide
        Wu Jie added a comment -

        yeah,I see.
        the already available solution "get --monitor" seems to not work without tx monitoring being HIGH.
        when tx monitoring is set to be LOW, there is no transaction info by "get --monitor" or in the admin gui.

        Is above the original design?

        Show
        Wu Jie added a comment - yeah,I see. the already available solution "get --monitor" seems to not work without tx monitoring being HIGH. when tx monitoring is set to be LOW, there is no transaction info by "get --monitor" or in the admin gui. Is above the original design?
        Hide
        marina vatkina added a comment -

        This will not work without tx monitoring being on. Why do you need to have another solution to what is already available (and described in the link above)?

        Show
        marina vatkina added a comment - This will not work without tx monitoring being on. Why do you need to have another solution to what is already available (and described in the link above)?
        Hide
        Wu Jie added a comment -

        attached the prototype which did the following.
        1.the definition of subcommand "list-transaction" refer to ListTransactions.java which should be in
        transaction/jta/src/main/java/org/glassfish/jta/admin/cli

        2.the usage of subcommand "list-transaction" refer to list-transactions.1 which should be in
        transaction/jta/src/main/resources/org/glassfish/jta/admin/cli

        3.the definition of message refer to LocalStrings.properties which should be in
        transaction/jta/src/main/resources/org/glassfish/jta/admin/cli

        4.supply the REST API for "list-transaction" refer to CommandResourceMetaData.java which should be in
        admin/rest/src/main/java/org/glassfish/admin/rest/generator

        Show
        Wu Jie added a comment - attached the prototype which did the following. 1.the definition of subcommand "list-transaction" refer to ListTransactions.java which should be in transaction/jta/src/main/java/org/glassfish/jta/admin/cli 2.the usage of subcommand "list-transaction" refer to list-transactions.1 which should be in transaction/jta/src/main/resources/org/glassfish/jta/admin/cli 3.the definition of message refer to LocalStrings.properties which should be in transaction/jta/src/main/resources/org/glassfish/jta/admin/cli 4.supply the REST API for "list-transaction" refer to CommandResourceMetaData.java which should be in admin/rest/src/main/java/org/glassfish/admin/rest/generator
        Hide
        Wu Jie added a comment -

        attached draft of structure design.

        Show
        Wu Jie added a comment - attached draft of structure design.
        Hide
        Wu Jie added a comment -

        we can add the "list-transactions" subcommand as following.

        ===================================================================
        asadmin list-transactions [--help] [--detail[=true|=false]] target
        OPTIONS
        --help , -?
        Displays the help text for the subcommand.

        --detail
        this option specifies whether output the transaction
        in detail. outputs in detail if this option is set to
        true(default is false).

        OPERANDS
        target
        This option specifies the target on which you are
        listing the transactions. Valid values are:

        instance_name
        lists the active transactions on a particular
        server instance.

        EXAMPLES
        Example 1 Using list-transactions
        % asadmin list-transactions server
        List of the transactions:
        No. ID Status
        1 0000000000000008_00 Active
        2 0700000021A0FD38666E73742D6C696E7A672C7365727665 Active
        Command list-transactions executed successfully.

        Example 2 Using list-transactions
        % asadmin list-transactions --detail=true instance1
        List of the transactions:
        ----------------------------------------------------------------------------
        [No 1]
        ID :0000000000000008_00
        Status :Active
        ElapsedTime(ms):48204
        ComponentName :org.lns.samples.servlet.
        ResourceNames :jdbc.ServletJdbcDelete
        ----------------------------------------------------------------------------
        [No 2]
        ID :0700000021A0FD38666E73742D6C696E7A672C7365727665
        Status :Active
        ElapsedTime(ms):18891
        ComponentName :org.lns.samples.servlet.ServletJdbcDelete
        ResourceNames :jdbc/__TimerPool
        ----------------------------------------------------------------------------
        Command list-transactions executed successfully.
        ===================================================================

        Show
        Wu Jie added a comment - we can add the "list-transactions" subcommand as following. =================================================================== asadmin list-transactions [--help] [--detail [=true|=false] ] target OPTIONS --help , -? Displays the help text for the subcommand. --detail this option specifies whether output the transaction in detail. outputs in detail if this option is set to true(default is false). OPERANDS target This option specifies the target on which you are listing the transactions. Valid values are: instance_name lists the active transactions on a particular server instance. EXAMPLES Example 1 Using list-transactions % asadmin list-transactions server List of the transactions: No. ID Status 1 0000000000000008_00 Active 2 0700000021A0FD38666E73742D6C696E7A672C7365727665 Active Command list-transactions executed successfully. Example 2 Using list-transactions % asadmin list-transactions --detail=true instance1 List of the transactions: ---------------------------------------------------------------------------- [No 1] ID :0000000000000008_00 Status :Active ElapsedTime(ms):48204 ComponentName :org.lns.samples.servlet. ResourceNames :jdbc.ServletJdbcDelete ---------------------------------------------------------------------------- [No 2] ID :0700000021A0FD38666E73742D6C696E7A672C7365727665 Status :Active ElapsedTime(ms):18891 ComponentName :org.lns.samples.servlet.ServletJdbcDelete ResourceNames :jdbc/__TimerPool ---------------------------------------------------------------------------- Command list-transactions executed successfully. ===================================================================

          People

          • Assignee:
            marina vatkina
            Reporter:
            Wu Jie
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: