This week's giveaway is in the Programmer Certification (OCPJP) forum.
We're giving away four copies of Java Mock Exams (software) and have David Mayer on-line!
See this thread for details.
Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Session beans local home interface doubt

 
Ramesh kumaar
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

Can I call remove method from Session beans local home interface?

Regards,
Rameshkumar
 
sandeep vaid
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

You don't have the Method in local Home to remove session Bean so how will u remove. As the local interfaces does not have handles to it.

The Only remove() method is for the enity beans with primary key as parameter.


Thanks !!
Sandeep Vaid
 
amol deshpande
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

The EJBLocalHome interface does have one remove method with Primary Key parameter.
As you can recall primary key concept is associated with Entity beans only.
But the matter of fact is that same EJBLocalHome interface is used for both Entity and session beans. Thus, you can call remove from EJBLocalHome on Entity beans, but attempt to call it on Session beans will result in EJBException

Amol
PS. Reply Welcome.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!