Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what methods do you put in EJB remote interface?

 
yamini nadella
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what methods do you put in EJB remote interface?
(a)defines signatures of EJB business methods
(b)defines all methods that client can call on EJB.

it seems both A and B correct. According to my idea only A is correct because we wont put create() and remove() methods in remote interface?
 
Santosh Pasupuleti
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"defines signatures of EJB business methods" seems to be the right answer.
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by yamini nadella:
because we wont put create() and remove() methods in remote interface?


Why wouldn't you but create() and remove() methods in remote interfaces?
 
Pavel Grushetzky
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
create() is supposed to be in home interface, isn't it?
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Correct. So create() isn't any help at all. But then there is remove(). remove():void is introduced through the javax.ejb.EJBObject interface along with getEJBHome():EJBHome, getHandle():Handle, getPrimaryKey() bject, isIdentical(o:EJBObject):boolean when you extend fron the EJBObject. So remove() has to be there but its there through interface inheritance. So in fact you "only" define the business method signatures with their return type in your interface.

You do implement an ejbRemove() in your bean - but thats not what the question is asking.

Note that the question is inaccurate in its use of the term signature; a signature consists of the method name and the parameter types but it does not include the method's return type - and you will have to specify the methods return type in the remote interface.
[ October 12, 2005: Message edited by: Peer Reynders ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic