Errata
for
WebLogic Server 6.1 Workbook for Enterprise JavaBeans, 3rd Edition
by Greg Nyberg

Page 38 (last paragraph)

Change:

"Open the JDBC folder in the navigation pane and click on the Data Sources subfolder.  The
right page should display an empty list of JDBC data sources.  Click on the Configure a new
JDBC Data Source ... link and fill out the forum as shown inf Figure 25."

To:

"Open the JDBC folder in the navigation pane and click on the Tx Data Sources subfolder.
The right page should display an empty list of JDBC Tx data sources.  Click on the Configure
a new JDBC Tx Data Source... link and fill out the form as shown in Figure 25."

Change Figure 25  to


 

NOTE: Here is the Problem and why it needs to be fixed:

The workbook examples use a standard JDBC Data Source within the WebLogic server product.  Unfortunately, the use of a standard Data Source may cause problems with rollback processing, especially with failures occurring after ejbCreate() calls (which are auto-committed by the server).

True transactional behavior from EJB operations requires the use of a "Tx Data Source" in WebLogic.  If a TX Data Source is used, all operations performed through it (including ejbCreate() calls) will be part of the overall JTA transaction and committed at the end of the transaction.



Page 62

Change the value of the <jndi-name> element in the weblogic-ejb-jar.xml listing from:

<jndi-name>TravelAgentHome</jndi-name>

To:

<jndi-name>TravelAgentHomeRemote</jndi-name>

NOTE: This error is only in the workbook; this element is correct in the WebLogic workbook download.
 


Page 78

Change the data type of the HAS_GOOD_CREDIT according to the database used.

CREATE TABLE CUSTOMER
{
    ID INT PRIMARY KEY,
    LAST_NAME CHAR(20),
    FIRST_NAME CHAR(20),
    HAS_GOOD_CREDIT BIT[1]
}

In Cloudscape it should be boolean
In Oracle it should be int
In SQL*Server it should be bit
In DB2 UDB it should be int

Other database products will require their own data type for the HAS_GOOD_CREDITflag.

NOTE: The pre-created Cloudscape database provided in the WebLogic workbook download works, and the cloudscape.sql script provided in the download uses the "boolean" data type.


Page 116

Note: Although the following table definitions in the workbook have errors, the scripts in the source code download are correct.

 CHANGE:

 CREATE TABLE
 RESERVATION_CUSTOMER_LINK
 {
   RESERVATION_ID INT,
   CUSTOMER_ID INT,
  }

 TO (REMOVE "," AFTER CUSTOMER_ID INT):

 CREATE TABLE
 RESERVATION_CUSTOMER_LINK
 {
   RESERVATION_ID INT,
   CUSTOMER_ID INT
  }
 

 CHANGE:

 CREATE TABLE
 RESERVATION_CABIN_LINK
 {
  RESERVATION_ID INT,
  CABIN_ID INT,
  }

 TO (REMOVE "," AFTER CABIN_ID INT):

 CREATE TABLE
 RESERVATION_CABIN_LINK
 {
  RESERVATION_ID INT,
  CABIN_ID INT
  }