• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

One EJB should have only one class which implements bean class?

 
yamini nadella
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One EJB should have only one class which implements bean class like SessionBean/EntityBean/MessageDrivenBean?

One EJB should have only one Home interface and one Component Interface which implements EjbHome and EjbObject respectively?

commonly I found word like ejb-jar as synonym of EJB. is it correct?.
According to my idea ejb-jar.xml is Data Discriptor.

how to use one EJB for both local and remote?. one way which I know is declare it as remote even for local usage also. What are the other ways?
Can one EJB have both local and remote interface implementation classes?

Thanks in advance,
Yamini.
 
Kathy Sierra
Cowgirl and Author
Rancher
Posts: 1589
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A single bean can have both a remote and local interface set (although it's usually rare to do this), but the client code is different, of course...but the bean itself should not ever know whether it's being accessed through a Remote component interface or a local component interface, since the actual *bean implementation* methods are always local.

cheers,
Kathy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic