• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJBObject question

 
Ghajini Johnson
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In EJB3.0 which is playing the EJBObject role? It should be the container generated wrapper class. When the lookup happens directly the refrence to this wrapper class is to be given to the client right??

Is my understanding correct?

If so, how many individual wrapper class' instances the container can maintain? If there are 2000 clients working on the system, does it mean that many instances of the wrapper class instances are running?
 
Lann Lu
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer to your question is Yes.

EJBObject now is gone in EJB 3, or we say, not exposed to the users. Vendors may use similar mechanism to implement EJB 3 beans like before.

Generally there are 2 types of approaches, one is static, which is more traditional. Code generation is used during packaging/deploy phase.

Another approach is dynamic proxy, where you won't see the "wrapper" classes. This approach is extensively used by Spring/Hibernate etc.

It is also true generally to your second question. Most vendors will instantiate a new EJBObject per client. Remember "Bean" object is pooled though.

Again this also depends on the vendor's implementation. Vendor may choose different ways to make it more efficient.

Hope it helps.

Cheers,
Tao
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic