1)
Is it required to have a create method in the Home interface of the
Entity Bean?
Beacuse i created a Employee Bean with no create in the Home interface and no ejbCreate in the Bean Class. When i varified it using the Deploytool, it gave me error saying required a ejbCreate in the Bean class. I will again try this and post the code for Component, Home and Bean class later.
2)
I have Employee table in oracle database. The primary Key is Empno NUMBER(4). Now when i create a Entity Bean the deploytool of
J2ee RE 1.3, somewhere asks for the primary key class. As specified in the Head First Book the primary key class can only be
String or wrapper classes, how can i define a ejbCreate method for this Bean?
Can i define it like this --
public int ejbCreate()
or should it be defined as
public Integer ejbCreate()
3)
How should the findByPrimaryKey method for this be defined in the Home interface??
Can it be like this
public Employee findByPrimaryKey(int empno)
or
should it be
public Employee findByPrimaryKey(Integer empno)
4)
What i am trying to understand in questions 2 and 3 is, can we use primitive data type for the primary key of a Entity Bean?