Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Remote interface in EJB  RSS feed

 
Alok Srivastava
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to have more than one remote interface for an entity bean.....???
basically i am thinking that way... because... consider a case:
there are two users A and B, for a typical banking application.
A is the account holder in a bank..... who has the authority to simply view the acc. balance.
B is the bank employee.... who has the authority to update as well as view the account balance.
i want to have a single entity bean,,"AccInfoBean"
now the remote interface that should be invoked should depend on the user... of the bean.... i.e. two different functionalities.. and correspondingly two different remote interfaces....???
i was just thinking is it any how possible...???by this we can reuse one entity bean for two functions.....!!!
one of the possible solutions could be... to check the user in the Bean object... and then allow or disallow the user to access a function depending on his identity(say login). But this definetly requires an interaction with some other database table.. to check the user details. For which i would have to invoke some method to interact with a table, for which the entity bean is not supposed to.
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
J2EE has good security built-in. I am at home, so I can't refer to my cheat notes (otherwise known as the J2EE 1.2.1 Developer's Guide) but if you look in this document, you'll see that you can incorporate security into your EJB's and servlets declaratively (with a deployment descriptor) based on users and groups.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!