• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Interesting Mock Exam Question - HFE 652 (Suman can you answer this)

 
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which session bean component interface method(s) can be called successfully, by a local client.

A. remove()
B. getHandle()
C. isIdentical()
D. getEJBHome()


My Answers: A, B, C, D

Explaination : Local Client might have a remote component object, in that case it can see all the above methods and infact use it. In the question only the client is local not the component.

But the answer to this mock questions are given as A & C.

Does anybody knows why?

[ June 20, 2004: Message edited by: mini mehta ]
[ June 20, 2004: Message edited by: mini mehta ]
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A. remove()
B. getHandle() --Wrong :In case of Local client you dont get any handle.
C. isIdentical()
D. getHome() -- Never heard of this method before. Nearest is getEJBHome().
 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mini,

Explaination : Local Client might have a remote component object, in that case it can see all the above methods and infact use it. In the question only the client is local not the component.


I think you are right. Although a remote interface can give out only remote component interface references and local home can give out only local component interfaces, I think local client can access a remote home without narrowing. So, I agree with you that all the options in the given question are correct.
Looking at the answer to this question, I can tell you that the question should rather look like the following -
"Which session bean local component interface method(s) can be called successfully, by a local client?"
But not to worry, as far as I know the questions in the real exam are stated very clearly. So, you are not likely to face this type of problem in the real exam.
Anyway, If you dont mind me asking, when is your exam due?
Regards
Suman
 
mini mehta
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Suman, great answer as always. My exam is on 26 June.
 
Suman Sarker
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mini,
I know you are studying hard to prepare yourself for the exam. Knowing that you have only a couple of days left to sit for the exam, I would like to give you just one more piece of information regarding the SCBCD exam. I think the objective of the exam that you might want to give a little more attention to is that of EJB-QL. The HFEJB book does not really cover it all when it comes to EJB-QL. The reason I am saying this is most people think ELB-QL is very easy. They under-estimate the importance of EJB-QL and eventually get a low score in it. I hope you wont make the same mistake.
Good luck
Suman
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
//////////////////////////////////////////////////////////////
Which session bean component interface method(s) can be called successfully, by a local client.

A. remove()
B. getHandle()
C. isIdentical()
D. getEJBHome()


My Answers: A, B, C, D

Explaination : Local Client might have a remote component object, in that case it can see all the above methods and infact use it. In the question only the client is local not the component.

But the answer to this mock questions are given as A & C.

Does anybody knows why?
//////////////////////////////////////////////////////////////////////////
I think the answer is A & C.

in EJBHome interface:
EJBMetaData getEJBMetaData(),
HomeHandle getHomeHandle(),
void remove(Handle) --> EJBLocalHome
void remove(Object key)

in EJBObject interface:
Object getPrimaryKey()
EJBHome getEJBHome()
Handle getHandle()
void remove()
boolean isIdentical

in EJBLocalObject interface;
Object getPrimaryKey()
EJBLocalHOme getEJBLocalHome()
void remove()
boolean isIdentical(Object o)

the session bean can call remove(Object key) on the EJBHome, but the container will throw RemoteException. remove(Object key) method is for only entity bean.
You have to know that the question is "called Successfully".
as u said, a & b& c&d(never seen)methods are called. but
for a, c is ok. but for b, there is no method named getHandle() in the EJBLocalObject interface. so it cause to throw an exception.

that's what i think that answer a,c is correct.
[ June 22, 2004: Message edited by: youngwoo seo ]
 
Space pants. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic