[jboss-user] [EJB 3.0] - how to get principal from Entity

apdo do-not-reply at jboss.com
Wed Jan 21 09:12:21 EST 2009

I know the more accepted pattern is to not have logic into the entity. However I am performing the migration of an application from EJB2 to EJB3 where there is logic into the entities.

In my old entity bean (not session bean), I have code that call getCallerPrincipal from the EntityContext. I have tried, using @Resource, to inject EntityContext but I got a null value. Is there a way to access the callerPrincipal from entity in EJB3.

Thank you very much for your help,

An Phong Do

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4203647#4203647

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4203647

More information about the jboss-user mailing list