This week's book giveaway is in the Testing forum.
We're giving away four copies of Data Structures the Fun Way: An Amusing Adventure with Coffee-Filled Examples and have Jeremy Kubica on-line!
See this thread for details.
  • 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

HF EJB: p148

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the HF EJB book, on page 148 the thoughts on isIdentical() says:

...to let you compare two home or component interface references...


isIdentical is defined in EJBObject, not in EJBHome, so where do the home interfaces come in?
 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is incorrect. As I read in some test that all the references to the home are always equal. I think by that they mean that all references of a home under one JNDI name are same always. So there is no method explicitly used to comare them. Not isIdentical... not even equals().
 
Geert Krekelberg
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is only one Home for each bean type. So an isIdentical method for the home would be ludicrous. I meant to ask whether this remark in the book was intentional or a mistake. As far as I can see, it's a mistake, but then again, I'm just starting on the topic.
 
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
What I understood from the book is that you might have two references to home objects(stubs). YOU might got them in different ways. In this case, you can use isIdendical to check weather the two references refere to the same home or not.
I am new to EJB, any EJB guru corect me if I am wrong.
 
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just as Geert indicated, isIdentical() method is only in the component interface. Thus, isIdentical() cannot be used to verify two homes.


There are no dumb questions...
Suppose a client gets two component interfaces from a method arguments and wants to verify whether the homes of these two components are identical.
 
brevity is the soul of wit - shakepeare. Tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic