• Post Reply Bookmark Topic Watch Topic
  • New Topic

enterprise beans don't implement their own remote interfaces  RSS feed

 
Adam Hardy
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
since enterprise beans don't implement their own remote interfaces in EJB, I could easily overlook updating the remote interface when I add methods to my classes.
is this a big source of developer error when coding EJB's? I can imagine myself doing it alot and finding my client-beans blowing up at runtime.
in Mastering EJB by Roman, the author suggests writing a 'super'-interface that both the remote interface and the enterprise bean implement. In this way, the java compiler will tell you when your remote interface and your bean's methods don't match.
Do alot of people use this strategy?
thanks
Adam
[ December 15, 2002: Message edited by: Adam Hardy ]
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It doesn't blow up at run time. It blows up at deployment time when the container informs you it can't generate the deployment code because the interfaces do not match.
Personally, I don't think it's a huge issue.
Kyle
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you use a tool like XDoclet you can save yourself from writing the Home and Remote interfaces at all. It also does a ton other useful things (like generating deployment descriptors), check it out.
[ December 15, 2002: Message edited by: Chris Mathews ]
 
Adam Hardy
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I've seen Xdoclet mentioned alot without knowing what it is. I'll check it out. Thanks for the tip.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!