Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Questions about creat methods  RSS feed

 
QX WANG
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
I understand that if the client of some enterprise bean wants to create a instance of the bean class,the ejb programmer musth provide the create method in the Home interface,and ejbCreate method in the bean class.The parameter list of the two method must be same.
My question is : Is there any design strategy to guarantee the programmer will not violate these two rules? Or Does the specification of EJB make some rules?
thanks
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The EJB compiler will complain if the implementation class doesn't match the remote/local interface. Is that what you meant?
 
QX WANG
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes..that is what i want..
 
QX WANG
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i know that jike will complain this kind of error, but this method depends on the complier,any other method more flexible.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't mean Jikes by "EJB compiler" (assuming you meant the Jikes compiler). Jikes is a Java compiler and I was talking about a different thing called EJB compiler (for example, BEA WebLogic comes with ejbc, which is an EJB compiler).
Anyway, the fact that practically any EJB compiler will complain if your code is missing something should be enough. What do you mean by "more flexible"?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!