openejb-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: EJBContext.isCallerInRole(String rolename) always returns false for EJB2.1 beans
Date Tue, 07 Aug 2012 20:17:51 GMT
If it is done in a single request i fear you need the snapshot.

Otherwise it should work.

- Romain
Le 7 août 2012 21:24, "ymaraner" <tphaley@gmail.com> a écrit :

> I'm using the default authentication in TomEE+ 1.0.0 which uses the
> tomcat-users.xml file:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <tomcat-users>
>   <role rolename="testrole"/>
>   <user username="testuser" password="" roles="testrole"/>
> </tomcat-users>
>
> I log into my client application using "testuser".
>
> Within an EJB 2.1 session bean, I make the call:
>    context.isCallerInRole("testrole");
>
> This returns false
>
> The client cannot connect to the application without specifying "testuser"
> or with "testuser" removed from the tomcat-users.xml file so I am fairly
> sure that the authentication is set up correctly.
> Is there something that I need to do in my application to make it use the
> roles defined in tomcat-users.xml? Are they not used by default?
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/EJBContext-isCallerInRole-String-rolename-always-returns-false-for-EJB2-1-beans-tp4656696.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message