user1699074
user1699074

Reputation: 3

ejb interceptor for a stateless session bean,how can i invoke a stateful session bean

A class is a stateful session bean with a loginUser property. B class is a stateless session bean with a method addAUser. how does the interceptor check wether A.loginUser is null when B.addUser method be used. thank u .

Upvotes: 0

Views: 528

Answers (1)

Mikhail
Mikhail

Reputation: 4223

This problem cant be solved by injecting statefull into stateless. Because this is a EJB anti-pattern. Have a look at CDI. It provides session-scoped beans like Spring. the only limitation is that its available only since JEE6.

Upvotes: 1

Related Questions