Question

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!

Was it helpful?

Solution

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 :)

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top