• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HF EJB: p148

 
Geert Krekelberg
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • 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?
 
Nitin Mehhta
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Hanna Habashy
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
  • 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.
 
Joe Nguyen
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic