Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt related to information provided on page 86 of HF book

 
Rohit Bhagwat
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello sir, friends ,madam

This is my first post in EJB certification forum. I am planning to give SCBCD. Since I am new to EJB, I am going through HFEJB book. This is indeed a great book for beginners. While reading chapter number 2 (Architectural Overview)I had one doubt on page no 86.

As per the EJB rule your bean class must have the business methods that are provided by the component interface. However the bean class doesnt implement the component interface.
The author has suggested a design for those who wish to enforce that your Bean class implement an interface and thus enforce the compiler to check whether the methods present in the interface are implemented by the Bean class. This idea is diagrammatically shown on page 86.

Question : Refering to page 86 of HeadFirst EJB..
BookCart interface extends BookCartBusiness interface which has the business methods. BookCartBusiness interface is being implemented by the bean class.BookCart interface is a remote interface so the methods must declare that it throws RemoteException as it is going to be accessed by remote clients. So the methods in BookCartBusiness interface must also throw RemoteException as those are going to be accessed by remote clients.Is this point missing that the methods in the BookCartBusiness interface must throw RemoteException? Or I am wrong somewhere ?

Waiting for your suggestions

Thanks and Regards
Rohit.
 
Ankit Doshi
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess you're right. The methods in the BookCartBusiness interface must declare RemoteExceptions for all the business methods.
 
Rohit Bhagwat
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ankit..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic