IS 460 - BankTransaction EJB issues

0 views
Skip to first unread message

jacks...@gmail.com

unread,
Apr 11, 2006, 4:39:47 PM4/11/06
to BYU-Idaho Information Systems Majors
Some items to be aware of:

1. Apparently the word "EXPLANATION" is a reserved word in Oracle
XE. An error will occur if you update the database using this field.
Therefore, you will need to change the name of the field to
"DESCRIPTION", modify the "getter/setter" methods in the
BankTransactionBean class to reflect the name change and update the
ControlBean class to call "setDescription" method instead of the
setExplanation method.

2. If you want to use the method, public static final String
generateGUID(Object o), method to generate a unique ID outside of the
database, you will need to change the data type for the transactionID
field from INTEGER to VARCHAR(32) in the database for the transactionID
field. Then make the corresponding data type changes to your
BankTransaction Entity EJB and the BankTransaction java bean (i.e.,
change all references to Integer type to String type). Within the
ejbCreate method, you can then call the generateGUID method to get a
unique ID for the primary key field.

public String ejbCreate()throws CreateException {
setTransactionID(BankTransactionUtil.generateGUID(this));
return null;
}

Reply all
Reply to author
Forward
0 new messages