• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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.
 
Whatever you say buddy! And I believe this tiny ad too:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic