• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB Class-loading

 
Duran Harris
Ranch Hand
Posts: 608
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Was wondering if someone could give me some insight on classloading of EJBs. Ejb3 in Action states that beans are classloaded as needed when a client makes a request.This only makes sense to me for stateful session beans since they are instantiated once per client and so the classes for a given bean would only need to be located by the container if that bean were invoked.

Whereas in the case of stateless beans or MDBs the container would need to classload every single bean that was deployed in order to initialize the bean pools..


Can someone please give me some insight on this or point out what I am misunderstanding?
 
Pallav Bora
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A container may pull statefull session beans also even though the common understanding is that statefull sessions beans are not pulled. It depends on container implementation.
 
Duran Harris
Ranch Hand
Posts: 608
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think I understand where I was misunderstanding...

I was under the impression that the container would class load the beans on a client request...Looking back I realise this makes no sense...I guess the container would classload the beans on server startup whilst the client would classload the beans(stubs,interfaces?) when the lookup is performed...

Am I on the right track now?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!