Return-Path: X-Original-To: apmail-openejb-users-archive@www.apache.org Delivered-To: apmail-openejb-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A8640D612 for ; Tue, 7 Aug 2012 20:18:18 +0000 (UTC) Received: (qmail 98286 invoked by uid 500); 7 Aug 2012 20:18:18 -0000 Delivered-To: apmail-openejb-users-archive@openejb.apache.org Received: (qmail 98247 invoked by uid 500); 7 Aug 2012 20:18:18 -0000 Mailing-List: contact users-help@openejb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openejb.apache.org Delivered-To: mailing list users@openejb.apache.org Received: (qmail 98239 invoked by uid 99); 7 Aug 2012 20:18:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Aug 2012 20:18:18 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rmannibucau@gmail.com designates 209.85.212.170 as permitted sender) Received: from [209.85.212.170] (HELO mail-wi0-f170.google.com) (209.85.212.170) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Aug 2012 20:18:11 +0000 Received: by wibhq12 with SMTP id hq12so2584822wib.5 for ; Tue, 07 Aug 2012 13:17:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=aUrelARJXSiO8mAj1Ifmyb2cW4ON4jGNUHcprMPOEt0=; b=TUhZbwyHzN0QmzMeZvrmXNhc1EOEaTbDkxCLkSpKH4sQUvgeoEZYf4BadpF4VF5UQY D2U1Cuq392qdpzxWIqwOpEn1/LlnawkzlrMM7DfsmuZTaYrkmfO5WZrUOUkRpHAMHXFx l2V/GbZREWQR+m9LTVxg03IwIRL80dptKxe9CsfvuYxrAkC+0y2F4yIaywaJxFw3NHkC gYUPP+GmoeVNFn4Le9u34jRGRmUK+c3SB9wWMbHMDHaMwlm8TUuHkc2eLGyuADrmyY0V sBvMgqwvzPoUsrCBN5k4iUytC34+uGbjSh5kxIkp6iEj/5+HfDD2NKzscTZ8Sl1BZb5o ikhw== MIME-Version: 1.0 Received: by 10.180.76.135 with SMTP id k7mr30297047wiw.7.1344370671229; Tue, 07 Aug 2012 13:17:51 -0700 (PDT) Received: by 10.216.163.212 with HTTP; Tue, 7 Aug 2012 13:17:51 -0700 (PDT) Received: by 10.216.163.212 with HTTP; Tue, 7 Aug 2012 13:17:51 -0700 (PDT) In-Reply-To: <1344367433144-4656696.post@n4.nabble.com> References: <1344367433144-4656696.post@n4.nabble.com> Date: Tue, 7 Aug 2012 22:17:51 +0200 Message-ID: Subject: Re: EJBContext.isCallerInRole(String rolename) always returns false for EJB2.1 beans From: Romain Manni-Bucau To: users@openejb.apache.org Content-Type: multipart/alternative; boundary=f46d043c7e924e1a1704c6b2b0f2 --f46d043c7e924e1a1704c6b2b0f2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable If it is done in a single request i fear you need the snapshot. Otherwise it should work. - Romain Le 7 ao=FBt 2012 21:24, "ymaraner" a =E9crit : > I'm using the default authentication in TomEE+ 1.0.0 which uses the > tomcat-users.xml file: > > > > > > > > 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-role= name-always-returns-false-for-EJB2-1-beans-tp4656696.html > Sent from the OpenEJB User mailing list archive at Nabble.com. > --f46d043c7e924e1a1704c6b2b0f2--