Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Questions from Mikali study notes

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic