• 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

HFEJB: What the difference between pass object as copy and as reference?

 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I saw this in the HFEJB page 69 and I would like to know if somebody may give me some help. Thanks, Nato.
 
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Nato,

Look at the accompnying pictures. Never understimate the power of those pictures in the books of Head First Series.

The pictures where they talk of a Dog Reference.
Just when you thought they dont make any sense , they will, have a look again and come back.

If you are still stuck, the ranchers will surely help you

But as 'Head First' says...when you devour the problem yourself..you understand the concept best
 
John Anaivs
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rahul, thanks for your reply. I didn't understimate the pictures. I just didn't undestood in this context.. But I think I did understimate my Java knowledge. I'm a SCJP 1.4 and I know the Java concepts. I just think that I became a little scared with this concepts together with RMI. Thanks again, Nato.
 
Rahul Mishra
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well,

Happens to all of us..and most of all me

In terms of EJB ( when it uses RMI - IIOP/ RMI) objects are passed by Value but you already know that in Java objects are passed by Reference.

Now you would say why this difference?

Primarily because, when i say RMI ...i say across the network..i mean different JVM's ...right???

A reference in one JVM doesnt mean anything in another...so you cant pass it by reference...(unless..there is a concept of a remote object itself being passed which you can explore later..thats pass by reference even in RMI)...so the other option is pass by Value...

Hope this rudimentary info helps...Rest...HFEJB explains this concept in detail...
 
John Anaivs
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Rahul, it's helped so much.
 
Rahul Mishra
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thats what we do here..help each other
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic