Can an EJB have only a local interface and local home?

Discussions

EJB design: Can an EJB have only a local interface and local home?

  1. Hi
       I am trying to deploy a stateless session bean with only a Local interface and Local home, without the remote interface and remote home. The bean is not being deployed.
    Is this is a valid situations as per EJB 2.0?

    thanks
    Rajit
  2. I think the remote home and remote interface are required.
    Could you post the error that you are getting when u are deploying that bean.

    And secondly you need to have them because you cannot in all cases have the beans deployed and the client calls happen on the same machine. Remote calls to the beans do happen at some point of time and for this u need the 2 interfaces.

    So it is better you have the remote home and remote interfaces along with the local ones.

    Nagendra Prasad
  3. It is perfectly alright to have only the local interface and the local home only. If the bean is being always accessed locally then only having local interfaces is fine. If only, ever, it is going to be accessed by remote clients as well then you need to have the remote interface and remote home too.
    Providing your descriptor file here would help in finding the problem you are facing.
  4. I think by default it defaults to be a local home....so you don't even have to bother....