• Post Reply Bookmark Topic Watch Topic
  • New Topic

Using EJB Annotation inside the Bean class

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

Given a Session bean class with the following annotations:
private @EJB(name="fooejbref") Foo foo;

Hi the above line is inside the session Bean , here i am having a query , I know that using @EJB inside a servlet is for making communication from controller to the business Layers .

But what is the purpose of having a @EJB inside the session Bean .

Means my query is why does a bean ever needs to communicate with other beans ??
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35716
412
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why not? Maybe the session beans are at different levels of granularity. Having one call another is a perfectly reasonable thing to do.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!