Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ejbCreate in SFSB

 
Ankit Doshi
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it necessary that a SFSB has to have at least one create with some arguments? I didn't find any specific rules for create in the SFSB or probably I missed it.


Ankit
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's a clue: consider what is the purpose of a SFSB (compare with a SLSB if it helps) and then ask yourself if parameters make sense for ejbCreate.
 
Ankit Doshi
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, practically, parameters makes sense for SFSB. But, on some page of the HF EJB, I read that, if you write only one no arg create in the SFSB, even then it will be compiled and deployed without any problems. So I wanted to clarify this.
 
Greg Charles
Sheriff
Posts: 3002
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is OK for a stateful session bean to have only one ejbCreate() method with no arguments. They're not limited to that however, unlike stateless session beans.
 
Hong Anderson
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For stateless session beans only create() with no args is required and allowed in the home interface.
In the case of stateful session beans, the home interface must have at least one create method which may be no args create method, create(...) or create<method>(...).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic