shiro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Les Hazlewood (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SHIRO-413) init() method is not called on class that implements org.apache.shiro.util.Initializable
Date Thu, 31 Jan 2013 23:01:13 GMT

    [ https://issues.apache.org/jira/browse/SHIRO-413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13568215#comment-13568215
] 

Les Hazlewood commented on SHIRO-413:
-------------------------------------

Dan, thanks very much for this information.  I think I'll be able to deep dive into this this
weekend.  I hope to have an answer asap!
                
> init() method is not called on class that implements org.apache.shiro.util.Initializable
> ----------------------------------------------------------------------------------------
>
>                 Key: SHIRO-413
>                 URL: https://issues.apache.org/jira/browse/SHIRO-413
>             Project: Shiro
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 1.2.1
>            Reporter: Dan Rollo
>            Priority: Critical
>
> Classes configured in shiro.ini that implement the "Initializable" interface should automatically
have their "init()" methods called. It appears this call is not always occurring. Example
below:
> public class WaffleNegotiateAuthFilter extends BasicHttpAuthenticationFilter
>                                        implements Initializable
> {
> ...
>     private final NegotiateSecurityFilter negotiateFilter;
>     public WaffleNegotiateAuthFilter() {
>         negotiateFilter = new NegotiateSecurityFilter();
>     }
>     @Override
>     protected void onFilterConfigSet() throws Exception {
>         negotiateFilter.init(getFilterConfig());
>     }
>     /**
>      * Initializes this object.
>      *
>      * @throws org.apache.shiro.ShiroException
>      *          if an exception occurs during initialization.
>      */
>     public void init() throws ShiroException {
>         try {
>             super.init(getFilterConfig());
>         } catch (ServletException e) {
>             throw new ShiroException(e);
>         }
>     }
> ...
> I still do not see the init() method being called.
> See this thread for more details: http://shiro-user.582556.n2.nabble.com/AuthenticatingFilter-lifecycle-when-used-in-urls-td7578146.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message