Win a copy of Head First Android this week in the Android forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Legal Declarations of CMP ejbCreate()

 
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Legal Declarations of CMP Bean ejbCreate()

A)public void ejbCreateBigCustomer() throws CreateException;
B)public String ejbCreateAccount() throws createException;
C)public int ejbCeate() throws CreateException;

Ignoring the fact that none of them have arguements i picked the correct answer as 'B' and 'C' . But HFEJB picks only B as the answer?

Why??what's wrong with C??
 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First of all, the return type of ejbCreate() method must be a public, Serializible class

Check out page. 333 --> "Rules for Primary Keys"

The option C is returning int, that is a data type (not a class)
 
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,


Legal Declarations of CMP Bean ejbCreate()

A)public void ejbCreateBigCustomer() throws CreateException;
B)public String ejbCreateAccount() throws createException;
C)public int ejbCeate() throws CreateException



The Answer should be only B.
As per the Specs the return type of ejbCreate() is Entity Bean's Primary Key Class or it should be a Object and cannnot be a primitive data type as what Mr.Balaji told.
Also assuming,createException is a typo.It should be CreateException.

B.T.W what server r u using??? I guess in JBoss or weblogic,it will not allows us to use like this-ejbCreateAccount().It should be ejbCreate().Any experts comments on this part,Please..
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic