Thanks for the replies guys. The problem is that I can't cast it to GenericPrinicpal.
java.lang.ClassCastException: org.apache.tomee.catalina.TomcatSecurityService$TomcatUser cannot be cast to org.apache.catalina.realm.GenericPrincipal Some details: I've configured a custom principal for use with JAASRealm in an app which stores some data that I need to pass on to my EJB. This "some data" is assigned in a custom login module that have been configured to authenticate this app. I understand now that it is by design that a GenericPrincipal is returned with my custom principal nested, but I was just hoping for a way to access this user principal easily. Now that I know it's not possible, I've got a workaround to access this "some data" in my EJB without the use of my custom user prinicipal. Thanks again for the help. -- View this message in context: http://openejb.979440.n4.nabble.com/Custom-Principal-from-EJB-tp4662921p4662957.html Sent from the OpenEJB User mailing list archive at Nabble.com.
