| Author |
Questions from Mikali study notes
|
Hussein Baghdadi
clojure forum advocate
Bartender
Joined: Nov 08, 2003
Posts: 3359
|
|
Hi. I have bean reading Mr. Mikali study notes. What does this line mean? "The enterprise bean must not attempt to define a class in a package" I will keep posting my question in this thread as I progress through Mr. Mikali study notes, I think it will be better than creating a thread for each question I have. Thanks.
|
 |
vitesse wei
Ranch Hand
Joined: Sep 07, 2007
Posts: 100
|
|
I think it means define class like normal,(like public class xxx{}).so bean can use(new) any predefined class,but not define class when it is running. correct me if I am wrong.
|
SCJP 5.0<br />SCWCD1.4<br />SCBCD5
|
 |
Hussein Baghdadi
clojure forum advocate
Bartender
Joined: Nov 08, 2003
Posts: 3359
|
|
No I don't think so... If your line is true, how am I supposed to create a composite key object? to create an instance of my enhanced Date class?
|
 |
vitesse wei
Ranch Hand
Joined: Sep 07, 2007
Posts: 100
|
|
|
i mean we can use all the classes we define,but we CAN NOT define it where we want use it,composite key class should be defined before we using it,right? in EJB3 we even don't use new operator too much,we use DI to ask for a instance of predefined class.
|
 |
Benoît de Chateauvieux
Ranch Hand
Joined: Aug 10, 2007
Posts: 183
|
|
Hi John, It simply meens that your EJB class must be declared public. If it isn't, you'll get a java.lang.InstantiationException: Bean class xxxx.yyyy must be declared public Hope it helps, Beno�t
|
SCJP5 | SCBCD5 | SCEA5 Part 1
|
 |
 |
|
|
subject: Questions from Mikali study notes
|
|
|