• 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

The Syncronized block in EJBs

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As Ejb Specs says that we can not have the sycronized code inside the ejb so how come we are able to call the vector/Hashtable's functions inside the EJB's They contains all syncronized code inside them. How is possible if it is against the spacifications of EJB.


Thanks!!
Sandeep Vaid
 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by sandeep vaid:
As Ejb Specs says that we can not have the sycronized code inside the ejb so how come we are able to call the vector/Hashtable's functions inside the EJB's They contains all syncronized code inside them. How is possible if it is against the spacifications of EJB.



I'm guessing that each EJB runs in its own thread and that the code (in the Container) that calls the ejbXXX() methods on the bean is itself running in a synchonized block of some sort.
-jeff
 
sandeep vaid
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think there will be no use having hashtable/Vector in EJB.
As each client have different instance of bean object. (i.e it is not multithreaded) so using hashtable/Vector will be overhead only, nothing will be gained out of it.
 
reply
    Bookmark Topic Watch Topic
  • New Topic