• 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

State for local clients

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I read this in the specs


The Bean Provider must be aware of the potential sharing of objects passed through local
interfaces. In particular, the Bean Provider must be careful that the state of one enterprise
bean is not assigned as the state of another. In general, the references that are passed across
local interfaces cannot be used outside of the immediate call chain and must never be stored as
part of the state of another enterprise bean. The Bean Provider must also exercise caution in
determining which objects to pass across local interfaces. This caution applies particularly in
the case where there is a change in transaction or security context.



can someone help me understand, why state shouldn't be maintained across local calls.
 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Justin,

I think this part of the spec is caused by the two different ways like parameters are handled.

If you have a local client then in the Bean you will work with an copy of the reference, so every changes to you do in the bean, will affect the objects of the caller. Otherwise, if you 've remote clients, the bean will work with an copy of the values and so will never affect the orginal values of the callers object.

Hoping this helps.

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic