Return-Path: X-Original-To: apmail-shiro-dev-archive@www.apache.org Delivered-To: apmail-shiro-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6456A9898 for ; Tue, 28 Feb 2012 17:18:09 +0000 (UTC) Received: (qmail 62120 invoked by uid 500); 28 Feb 2012 17:18:08 -0000 Delivered-To: apmail-shiro-dev-archive@shiro.apache.org Received: (qmail 61507 invoked by uid 500); 28 Feb 2012 17:18:08 -0000 Mailing-List: contact dev-help@shiro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@shiro.apache.org Delivered-To: mailing list dev@shiro.apache.org Received: (qmail 61044 invoked by uid 99); 28 Feb 2012 17:18:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2012 17:18:07 +0000 X-ASF-Spam-Status: No, hits=-1998.7 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD,URI_HEX X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2012 17:18:06 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 8B21B33EA1C for ; Tue, 28 Feb 2012 17:17:46 +0000 (UTC) Date: Tue, 28 Feb 2012 17:17:46 +0000 (UTC) From: "Roman Yaroslavtsev (Commented) (JIRA)" To: dev@shiro.apache.org Message-ID: <740299319.28761.1330449466571.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <3017489.44411291924203545.JavaMail.jira@thor> Subject: [jira] [Commented] (SHIRO-222) Register LifecycleBeanPostProcessor before ShiroFilterFactoryBean [patch included] MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/SHIRO-222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13218360#comment-13218360 ] Roman Yaroslavtsev commented on SHIRO-222: ------------------------------------------ Sorry, my suggestion to use Ordered interface was completely incorrect. The simplest solution is to declare LifecycleBeanPostProcessor method as static, to avoid early Configuration bean creation. > Register LifecycleBeanPostProcessor before ShiroFilterFactoryBean [patch included] > ---------------------------------------------------------------------------------- > > Key: SHIRO-222 > URL: https://issues.apache.org/jira/browse/SHIRO-222 > Project: Shiro > Issue Type: Bug > Components: Integration: Spring > Affects Versions: 1.1.0 > Reporter: manthos > Fix For: 1.2.0 > > Attachments: LifecycleBeanPostProcessor.patch > > > LifecycleBeanPostProcessor needs to be registred before ShiroFilterFactoryBean because... > ShiroFilterFactoryBean itself is a BeanPostProcessor, like LifecycleBeanPostProcessor too. So during AbstractApplicationContext.registerBeanPostProcessors() these two beans are created and added to nonOrderedPostProcessors, after then they get registered. At this execution point ShiroFilterFactoryBean is already created with its SecurityManager and defined Realms. So LifecycleBeanPostProcessor will not effect anymore on Realms init. > http://shiro-user.582556.n2.nabble.com/Shiro-and-Spring-with-ShiroFilterFactoryBean-td5811127.html -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira