• 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

EJB no no's!!

 
Ranch Hand
Posts: 320
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Been doing alot of research lately because we are re-writing our current project.
I've noticed that inside one of our session bean implementations, we have method calls on OTHER objects by passing 'this'.
Ex.

This is pseudo code so I hope it is clear. Let's also assume (cause it's true) that all object are properly initialised.
Now because of how EJB's work, does this not break the model?
I.E. We should be creating a handle to a remote interface of the SomeObjectSession object. Then the IRemoteSomeObjectSession should receive ALL the messages and step in as a translator / agent / interposer to the SomeObjectSession.
When we pass 'this' to someOtherObject do we not break this model because the someOtherObject can now reference the SomeOtherSession instance directly?
I am also curious how the container would react to this? What if your projedct was distributed, would your someOtherObject be talking to the right 'this'?
All the references I've read about this say it's "bad" but they don't really give details.
Thanks in advance.

[This message has been edited by John Bateman (edited March 02, 2001).]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic