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

Romain Manni-Bucau commented on SHIRO-337:
------------------------------------------

Hi [~lprimak] , the PR you mention was not `@Produces`-ing the session and was 
not using ini but java configuration getting `Instance` injected. If you want 
to produce the session just create a `@Produces` bean - likely using a custom 
scope since `@RequestScoped` or `@SessionScoped` have a specific semantic in 
CDI not 1-1 with the servlet layer and for ini you have to inject the 
`BeanManager` and use `bm.getReference(bm.resolve(bm.getBeans(name), 
expectedType, bm.createCreationalContext(null))` (note: if the bean.scope 
resulting of the resolve `!bm.isNormalScope(bean.getScope())` then ensure to 
track the creational context the time the object is used and `release` it when 
no more needed).

> adding support for CDI
> ----------------------
>
>                 Key: SHIRO-337
>                 URL: https://issues.apache.org/jira/browse/SHIRO-337
>             Project: Shiro
>          Issue Type: New Feature
>          Components: Integration: JEE
>    Affects Versions: 1.2.0, 1.2.1
>            Reporter: Romain Manni-Bucau
>            Priority: Major
>              Labels: patch, patch-with-test
>         Attachments: SHIRO-337-2.patch, SHIRO-337-3.patch, SHIRO-337.patch
>
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> As there is a spring or guice integration, a CDI integration could be 
> welcomed.
> Features:
>  * enable shiro components to be injectables (subject, session, security 
> manager)
>  * enable shiro to be configurable via cdi beans (producer methods) instead 
> of shiro.ini
>  * make interceptors for Shiro annotations (similar/duplicate of SHIRO-898)
>  * Make CDI beans available in shiro.ini
>  * Async / "reactive" support



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to