Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Bean reference in case of Stateless Session bean.

 
mallika shah
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
lets say

@Stateless
public class Hello extends HelloWorld
{
@EJB HelloStateless bean; //line 1
...
...
}

DOES The above code shows, the bean reference in the case of stateless session bean is itself a stateless object..

What if on //line 1 i say its a stateful bean..IS IT POSSIBLE??

thanks ,
mallika
 
Satya Maheshwari
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you can inject both Stateless as well as Stateful EJB in another Stateless ejb because it is just a client to the EJB being injected. It itself being stateless/stateful should not cause a difference.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic