Skip to Main Content
Enterprise JavaBeans 3.1, 6th Edition
book

Enterprise JavaBeans 3.1, 6th Edition

by Andrew Lee Rubinger, Bill Burke
September 2010
Intermediate to advanced content levelIntermediate to advanced
766 pages
18h 35m
English
O'Reilly Media, Inc.
Content preview from Enterprise JavaBeans 3.1, 6th Edition

Source Listing

Following is a full listing of all source code used in this runnable example.

Implementation Resources

CreditCardTransaction.java

package org.jboss.ejb3.examples.ch19.timer.api; import java.math.BigDecimal; /** * Value object representing a single credit card transaction. * Immutable. * * @author <a href="mailto:andrew.rubinger@jboss.org">ALR</a> * @version $Revision: $ */ public class CreditCardTransaction { //--------------------------------------------------------------------------|| // Instance Members --------------------------------------------------------|| //--------------------------------------------------------------------------|| /** * The card number */ private final String cardNumber; /** * The amount to be charged */ private final BigDecimal amount; //--------------------------------------------------------------------------|| // Constructor -------------------------------------------------------------|| //--------------------------------------------------------------------------|| /** * Creates a new instance with the specified card number and amount * @param cardNumber * @param amount * @throws IllegalArgumentException If either argument is null */ public CreditCardTransaction(final String cardNumber, final BigDecimal amount) throws IllegalArgumentException { // Precondition checks if (cardNumber == null || cardNumber.length() == 0) { throw new IllegalArgumentException("card number must be specified"); } if (amount == null) { throw new IllegalArgumentException("amount ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Reinventing the Organization for GenAI and LLMs

Reinventing the Organization for GenAI and LLMs

Ethan Mollick
JavaServer Faces

JavaServer Faces

Hans Bergsten
EJB 3 Developer Guide

EJB 3 Developer Guide

Michael Sikora

Publisher Resources

ISBN: 9781449399139Errata Page