简体   繁体   中英

Example for CDI-SessionScoped LogIn with TomEE

i'm currently fighting with TomEE, JSF and CDI (i think).

Is there any example out there which has "@javax.enterprise.context.SessionScoped" annotation using TomEE 1.5.1 (or current snapshot)?

I DONT want to use @ManagedBean or something else from javax.faces, just plain CDI.

My problem is: when i change some @SessionScoped user session instance i end up in having a new sessionID (session fixation problem?!?).

My Use-Case: I want to have a login on one page and have the possability to login from anywhere, the user comes from a JPA-layer which scope i don't know exactly if have to choose.

Is there another way to archieve this?!

I already got this pages, but didn't helped me out:

http://openejb.979440.n4.nabble.com/Guest-user-td4655258i20.html

https://issues.apache.org/jira/browse/TOMEE-734

https://issues.apache.org/jira/browse/TOMEE-745

Thanks for any help!

After a lot of time i created my own "proof-of-concept"-example working with cdi-beans:

https://github.com/FibreFoX/cdi-sessionscoped-login

I hope it will help others, like it helped me while developing that piece of awesome :)

I Use TomEE but I don't understand your problem. Do you use the web-profile?

Did you setup beans.xml correctly?

The bugs you linked are unrelated probably your setup. Impossible to say since I don't have anything to go on. Link a sample project I can try or at least paste your bean and tell were you put beans.xml

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM