• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB & Component Interface

 
Vijay Chandran
Ranch Hand
Posts: 186
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear friends,

When we create an EJB we also create two interfaces. One of them is the Component Interface and other is Home Interface.

When we create the bean we are implementing SessionBean but not the Component interface. We will be implementing the method that is defined in the Component interface in the bean class.
But why we are not doing
BeanClass implements ComponentInterface,SessionBean?


Kindly provide your solutions.

Regards,
Vijay
 
Lave Kulshreshtha
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
We need to implement only sessionbean not the interface because the EJB life cycle and services are being controlled by container. More over this is the standard EJB specification for a bean provider. So I do not think that any one need to work in this direction.

-Lave
 
Mike Keith
author
Ranch Hand
Posts: 304
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why aren't you using EJB 3.0? Then you would be able to implement your business interface, and not have to implement any other SessionBean interface. Just the way it should be :-)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!