Package org.apache.aries.samples.ariestrader.entities

Examples of org.apache.aries.samples.ariestrader.entities.OrderDataBeanImpl.cancel()


                 * Complete a Sell operation - remove the Holding from the Account -
                 * deposit the Order proceeds to the Account balance
                 */
                if (holding == null) {
                    Log.error("TradeJpaCm:completeOrder -- Unable to sell order " + order.getOrderID() + " holding already sold");
                    order.cancel();
                    return order;
                }
                else {
                    entityManager.remove(holding);
                    order.setHolding(null);
View Full Code Here


        if (Log.doTrace())
            Log.trace("TradeJpaCm:cancelOrder", orderID + " twoPhase=" + twoPhase);

        OrderDataBeanImpl order = entityManager.find(OrderDataBeanImpl.class, orderID);
        order.cancel();
    }

    public void orderCompleted(String userID, Integer orderID) {
        if (Log.doActionTrace())
            Log.trace("TradeAction:orderCompleted", userID, orderID);
View Full Code Here

                 * Complete a Sell operation - remove the Holding from the Account -
                 * deposit the Order proceeds to the Account balance
                 */
                if (holding == null) {
                    Log.error("TradeJpaAm:completeOrder -- Unable to sell order " + order.getOrderID() + " holding already sold");
                    order.cancel();
                    entityManager.getTransaction().commit();
                    return order;
                }
                else {
                    entityManager.remove(holding);
View Full Code Here

        /*
         * managed transaction
         */
        try {
            entityManager.getTransaction().begin();
            order.cancel();
            entityManager.getTransaction().commit();
        }
        catch (Exception e) {
            entityManager.getTransaction().rollback();
            entityManager.close();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.