• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

mock exam  RSS feed

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!