can it possible define two remote interfaces for one ejb


EJB programming & troubleshooting: can it possible define two remote interfaces for one ejb

  1. can it possible to define two remote interface for one ejb. the situation:: all the methods accessed by all the department clients in an organization are written in one ejb. can it possible to restrict to access only some methods by defining two remote interfaces that are implemented by one ejb.
    pl help me.
  2. I don't think you can define multiple remote interfaces for one EJB. What you could do is use a Session bean to make calls to the business methods in the EJB. That way you can control what you want a particular client can do. The client need not be aware of the methods exposed by your Entity bean.

  3. Here is another option:

    Make EJB2 that is a subclass of your original EJB1. It will have all of the same logic through inheritance. Make a new (restricted) remote interface for EJB2. This will really only work well if EJB1 is a Session Bean.
  4. thank you[ Go to top ]

    Thank you Paul,

    my doubt is cleared with your answer.
  5. Instead of making two remote you can provide security tag in the xml which help to provide the access like for some of the User you can expose some methods for other you can expose methods.