• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJBObject question

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic