• 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

mock exam

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Everyone

Following is a question from JPilot test 1.0


Which are true about session beans?

Select all 3 correct Choices.

1. A client can pass a remote home object reference to another application.
2. The javax.ejb.EJBMetaData interface is intended to allow application assembly tools to discover information about the session bean, and to allow loose client/server binding and client-side scripting
3. The javax.ejb.EJBLocalHome interface defines the method create() which returns javax.ejb.EJBLocalObject.
4. The javax.ejb.EJBLocalHome interface defines the method remove(Object primaryKey) which returns null.

The answers include 1,2,3

But I think answer 3 is wrong because although the create() method must be given by the bean provider in the Home interface it is not defined in interface javax.ejb.EJBLocalHome

Is this correct?
 
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Rajesh Srivastava:
Hello Everyone

Following is a question from JPilot test 1.0


Which are true about session beans?

Select all 3 correct Choices.

1. A client can pass a remote home object reference to another application.
2. The javax.ejb.EJBMetaData interface is intended to allow application assembly tools to discover information about the session bean, and to allow loose client/server binding and client-side scripting
3. The javax.ejb.EJBLocalHome interface defines the method create() which returns javax.ejb.EJBLocalObject.
4. The javax.ejb.EJBLocalHome interface defines the method remove(Object primaryKey) which returns null.

The answers include 1,2,3

But I think answer 3 is wrong because although the create() method must be given by the bean provider in the Home interface it is not defined in interface javax.ejb.EJBLocalHome

Is this correct?



I think you are correct. At least one no-arg create method must be defined in the Bean's home interface (remote or local). The create method is the only way (unless a client has got an Handle or a reference) for a client to get a reference to the EJB[Local]Object, the only thing the client is really interested in, to call business methods.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic