Is it possible to inject the EntityManager into a stateless session bean if the
bean is invoked from a MDB?
I have a message driven been that calls a stateless session bean. In the
session bean I inject entity manager. But when the session bean is invoked
from the MDB the entity manager is always null. The app is deployed as an EAR
and everything deployes successfully.
MDB:
@MessageDriven(activationConfig =
| {
| @ActivationConfigProperty(propertyName="destinationType",
| propertyValue="javax.jms.Queue"),
| @ActivationConfigProperty(propertyName="destination",
| propertyValue="queue/KeyCheckImageQueue2")
| })
|
| public class KeyCheckImagesMessageHandler implements MessageListener{
|
| public void onMessage (Message msg) {
Stateless session bean:
@Stateless
| @Name("xyzServices")
| public class KeyServicesImpl implements KeyServices
| {
|
| @PersistenceContext
| private EntityManager em;
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4081787#4081787
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4081787
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user