You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Christopher James Blythe (JIRA)" <de...@geronimo.apache.org> on 2006/12/06 22:40:21 UTC

[jira] Created: (DAYTRADER-29) Asyc 1-Phase mode should be removed

Asyc 1-Phase mode should be removed
-----------------------------------

                 Key: DAYTRADER-29
                 URL: http://issues.apache.org/jira/browse/DAYTRADER-29
             Project: DayTrader
          Issue Type: Improvement
          Components: EJB Tier
    Affects Versions: 1.2, 2.0
            Reporter: Christopher James Blythe


Here are some comments that I added to DT-22...

Since my involvement with Daytrader (and Trade), we've never been all that concerned with the Async 1-phase mode. Here is the lay of the land to my understanding...

Sync mode
 - Uses JMS topics and TradeTopicMDB to publish changes to the quote prices
 - There is flag in the DDs to disable this but it doesn't seem to apply to direct mode (only EJB mode)
Async 2-phase mode
 - This mode uses a JMS queue and the TradeBroker to handle order processing
 - Specifically, the buy and sell operations call a queueOrder method to place a message on the queue
 - The queueOrder is part of an XA transaction because two resource managers (JMS and database) are involved to create the order in the databse and place a message on the queue
- The MDB starts a new transaction when the message is read from the queue. The MDB then executes the completeOrder method which updates the order in the database inside the original MDB transaction context
Async 1-phase mode
 - Does the same as above, but does not involve an UserTransaction to provide XA
 - Since the MDB is container-managed, TradeEJB is used to complete the order and create a new transaction (avoiding XA)

My guess is that the Async 1-phase mode was added to messure the overhead associated with handling the XA transaction.

I have never found that much value in Async 1-phase mode. If you are using two different resources as part of a logical transaction, you should always use XA to ensure proper rollback handling. Honestly, I see very little need to keep it around... However, there might be some possiblities I have not considered. As an added benefit of removing this option, we would remove a dependency between the TradeDirect and TradeBean code.

I also like the idea of splitting up the modes by category and doing a little renaming to make them more descriptive.

Persistence Run-time Modes (one has to be selected)
1) Direct (or JDBC)
2) Stateless Session Bean to Direct
3) Full EJB (Stateless Session Bean to Entity Beans)

JMS Support Enablement (any can be selected)
- Publish Quote Updates (Publish quote price changes to a JMS topic)
- Process Buy/Sell Orders using XA (Asychronously process buy/sell orders by placing them on a JMS queue. An MDB is then responsible for reading a message form the queue and completing the order)

Thoughts?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (DAYTRADER-29) Async 1-Phase mode should be removed

Posted by "Christopher James Blythe (JIRA)" <de...@geronimo.apache.org>.
     [ https://issues.apache.org/jira/browse/DAYTRADER-29?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christopher James Blythe reassigned DAYTRADER-29:
-------------------------------------------------

    Assignee: Christopher James Blythe

> Async 1-Phase mode should be removed
> ------------------------------------
>
>                 Key: DAYTRADER-29
>                 URL: https://issues.apache.org/jira/browse/DAYTRADER-29
>             Project: DayTrader
>          Issue Type: Improvement
>          Components: EJB Tier
>    Affects Versions: 1.2, 2.0
>            Reporter: Christopher James Blythe
>         Assigned To: Christopher James Blythe
>         Attachments: daytrader-29.patch
>
>
> Here are some comments that I added to DT-22...
> Since my involvement with Daytrader (and Trade), we've never been all that concerned with the Async 1-phase mode. Here is the lay of the land to my understanding...
> Sync mode
>  - Uses JMS topics and TradeTopicMDB to publish changes to the quote prices
>  - There is flag in the DDs to disable this but it doesn't seem to apply to direct mode (only EJB mode)
> Async 2-phase mode
>  - This mode uses a JMS queue and the TradeBroker to handle order processing
>  - Specifically, the buy and sell operations call a queueOrder method to place a message on the queue
>  - The queueOrder is part of an XA transaction because two resource managers (JMS and database) are involved to create the order in the databse and place a message on the queue
> - The MDB starts a new transaction when the message is read from the queue. The MDB then executes the completeOrder method which updates the order in the database inside the original MDB transaction context
> Async 1-phase mode
>  - Does the same as above, but does not involve an UserTransaction to provide XA
>  - Since the MDB is container-managed, TradeEJB is used to complete the order and create a new transaction (avoiding XA)
> My guess is that the Async 1-phase mode was added to messure the overhead associated with handling the XA transaction.
> I have never found that much value in Async 1-phase mode. If you are using two different resources as part of a logical transaction, you should always use XA to ensure proper rollback handling. Honestly, I see very little need to keep it around... However, there might be some possiblities I have not considered. As an added benefit of removing this option, we would remove a dependency between the TradeDirect and TradeBean code.
> I also like the idea of splitting up the modes by category and doing a little renaming to make them more descriptive.
> Persistence Run-time Modes (one has to be selected)
> 1) Direct (or JDBC)
> 2) Stateless Session Bean to Direct
> 3) Full EJB (Stateless Session Bean to Entity Beans)
> JMS Support Enablement (any can be selected)
> - Publish Quote Updates (Publish quote price changes to a JMS topic)
> - Process Buy/Sell Orders using XA (Asychronously process buy/sell orders by placing them on a JMS queue. An MDB is then responsible for reading a message form the queue and completing the order)
> Thoughts?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DAYTRADER-29) Async 1-Phase mode should be removed

Posted by "Christopher James Blythe (JIRA)" <de...@geronimo.apache.org>.
     [ https://issues.apache.org/jira/browse/DAYTRADER-29?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christopher James Blythe updated DAYTRADER-29:
----------------------------------------------

    Attachment: daytrader-29.patch

This patch simply removes the async 1-phase mode option. If additional changes are mode to the mode names, etc. a new JIRA will be opened.

> Async 1-Phase mode should be removed
> ------------------------------------
>
>                 Key: DAYTRADER-29
>                 URL: https://issues.apache.org/jira/browse/DAYTRADER-29
>             Project: DayTrader
>          Issue Type: Improvement
>          Components: EJB Tier
>    Affects Versions: 1.2, 2.0
>            Reporter: Christopher James Blythe
>         Attachments: daytrader-29.patch
>
>
> Here are some comments that I added to DT-22...
> Since my involvement with Daytrader (and Trade), we've never been all that concerned with the Async 1-phase mode. Here is the lay of the land to my understanding...
> Sync mode
>  - Uses JMS topics and TradeTopicMDB to publish changes to the quote prices
>  - There is flag in the DDs to disable this but it doesn't seem to apply to direct mode (only EJB mode)
> Async 2-phase mode
>  - This mode uses a JMS queue and the TradeBroker to handle order processing
>  - Specifically, the buy and sell operations call a queueOrder method to place a message on the queue
>  - The queueOrder is part of an XA transaction because two resource managers (JMS and database) are involved to create the order in the databse and place a message on the queue
> - The MDB starts a new transaction when the message is read from the queue. The MDB then executes the completeOrder method which updates the order in the database inside the original MDB transaction context
> Async 1-phase mode
>  - Does the same as above, but does not involve an UserTransaction to provide XA
>  - Since the MDB is container-managed, TradeEJB is used to complete the order and create a new transaction (avoiding XA)
> My guess is that the Async 1-phase mode was added to messure the overhead associated with handling the XA transaction.
> I have never found that much value in Async 1-phase mode. If you are using two different resources as part of a logical transaction, you should always use XA to ensure proper rollback handling. Honestly, I see very little need to keep it around... However, there might be some possiblities I have not considered. As an added benefit of removing this option, we would remove a dependency between the TradeDirect and TradeBean code.
> I also like the idea of splitting up the modes by category and doing a little renaming to make them more descriptive.
> Persistence Run-time Modes (one has to be selected)
> 1) Direct (or JDBC)
> 2) Stateless Session Bean to Direct
> 3) Full EJB (Stateless Session Bean to Entity Beans)
> JMS Support Enablement (any can be selected)
> - Publish Quote Updates (Publish quote price changes to a JMS topic)
> - Process Buy/Sell Orders using XA (Asychronously process buy/sell orders by placing them on a JMS queue. An MDB is then responsible for reading a message form the queue and completing the order)
> Thoughts?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (DAYTRADER-29) Async 1-Phase mode should be removed

Posted by "Christopher James Blythe (JIRA)" <de...@geronimo.apache.org>.
     [ https://issues.apache.org/jira/browse/DAYTRADER-29?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christopher James Blythe closed DAYTRADER-29.
---------------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0
                   1.2

Applied patches to branches\1.2 and trunk. Trunk also required changes to TradeJPA.java.

> Async 1-Phase mode should be removed
> ------------------------------------
>
>                 Key: DAYTRADER-29
>                 URL: https://issues.apache.org/jira/browse/DAYTRADER-29
>             Project: DayTrader
>          Issue Type: Improvement
>          Components: EJB Tier
>    Affects Versions: 1.2, 2.0
>            Reporter: Christopher James Blythe
>         Assigned To: Christopher James Blythe
>             Fix For: 1.2, 2.0
>
>         Attachments: daytrader-29.patch
>
>
> Here are some comments that I added to DT-22...
> Since my involvement with Daytrader (and Trade), we've never been all that concerned with the Async 1-phase mode. Here is the lay of the land to my understanding...
> Sync mode
>  - Uses JMS topics and TradeTopicMDB to publish changes to the quote prices
>  - There is flag in the DDs to disable this but it doesn't seem to apply to direct mode (only EJB mode)
> Async 2-phase mode
>  - This mode uses a JMS queue and the TradeBroker to handle order processing
>  - Specifically, the buy and sell operations call a queueOrder method to place a message on the queue
>  - The queueOrder is part of an XA transaction because two resource managers (JMS and database) are involved to create the order in the databse and place a message on the queue
> - The MDB starts a new transaction when the message is read from the queue. The MDB then executes the completeOrder method which updates the order in the database inside the original MDB transaction context
> Async 1-phase mode
>  - Does the same as above, but does not involve an UserTransaction to provide XA
>  - Since the MDB is container-managed, TradeEJB is used to complete the order and create a new transaction (avoiding XA)
> My guess is that the Async 1-phase mode was added to messure the overhead associated with handling the XA transaction.
> I have never found that much value in Async 1-phase mode. If you are using two different resources as part of a logical transaction, you should always use XA to ensure proper rollback handling. Honestly, I see very little need to keep it around... However, there might be some possiblities I have not considered. As an added benefit of removing this option, we would remove a dependency between the TradeDirect and TradeBean code.
> I also like the idea of splitting up the modes by category and doing a little renaming to make them more descriptive.
> Persistence Run-time Modes (one has to be selected)
> 1) Direct (or JDBC)
> 2) Stateless Session Bean to Direct
> 3) Full EJB (Stateless Session Bean to Entity Beans)
> JMS Support Enablement (any can be selected)
> - Publish Quote Updates (Publish quote price changes to a JMS topic)
> - Process Buy/Sell Orders using XA (Asychronously process buy/sell orders by placing them on a JMS queue. An MDB is then responsible for reading a message form the queue and completing the order)
> Thoughts?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DAYTRADER-29) Async 1-Phase mode should be removed

Posted by "Christopher James Blythe (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/DAYTRADER-29?page=all ]

Christopher James Blythe updated DAYTRADER-29:
----------------------------------------------

    Summary: Async 1-Phase mode should be removed  (was: Asyc 1-Phase mode should be removed)

> Async 1-Phase mode should be removed
> ------------------------------------
>
>                 Key: DAYTRADER-29
>                 URL: http://issues.apache.org/jira/browse/DAYTRADER-29
>             Project: DayTrader
>          Issue Type: Improvement
>          Components: EJB Tier
>    Affects Versions: 1.2, 2.0
>            Reporter: Christopher James Blythe
>
> Here are some comments that I added to DT-22...
> Since my involvement with Daytrader (and Trade), we've never been all that concerned with the Async 1-phase mode. Here is the lay of the land to my understanding...
> Sync mode
>  - Uses JMS topics and TradeTopicMDB to publish changes to the quote prices
>  - There is flag in the DDs to disable this but it doesn't seem to apply to direct mode (only EJB mode)
> Async 2-phase mode
>  - This mode uses a JMS queue and the TradeBroker to handle order processing
>  - Specifically, the buy and sell operations call a queueOrder method to place a message on the queue
>  - The queueOrder is part of an XA transaction because two resource managers (JMS and database) are involved to create the order in the databse and place a message on the queue
> - The MDB starts a new transaction when the message is read from the queue. The MDB then executes the completeOrder method which updates the order in the database inside the original MDB transaction context
> Async 1-phase mode
>  - Does the same as above, but does not involve an UserTransaction to provide XA
>  - Since the MDB is container-managed, TradeEJB is used to complete the order and create a new transaction (avoiding XA)
> My guess is that the Async 1-phase mode was added to messure the overhead associated with handling the XA transaction.
> I have never found that much value in Async 1-phase mode. If you are using two different resources as part of a logical transaction, you should always use XA to ensure proper rollback handling. Honestly, I see very little need to keep it around... However, there might be some possiblities I have not considered. As an added benefit of removing this option, we would remove a dependency between the TradeDirect and TradeBean code.
> I also like the idea of splitting up the modes by category and doing a little renaming to make them more descriptive.
> Persistence Run-time Modes (one has to be selected)
> 1) Direct (or JDBC)
> 2) Stateless Session Bean to Direct
> 3) Full EJB (Stateless Session Bean to Entity Beans)
> JMS Support Enablement (any can be selected)
> - Publish Quote Updates (Publish quote price changes to a JMS topic)
> - Process Buy/Sell Orders using XA (Asychronously process buy/sell orders by placing them on a JMS queue. An MDB is then responsible for reading a message form the queue and completing the order)
> Thoughts?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira