Example for logging on to CDI-SessionScoped Logon with TomEE

I am currently fighting TomEE, JSF and CDI (I think).

Is there any example that contains the @@ javax.enterprise.context.SessionScoped annotation using TomEE 1.5.1 (or the current snapshot)?

I DO NOT want to use @ManagedBean or something else from javax.faces, just a CDI.

My problem: when I change some instance of @SessionScoped user session, I end up having a new SessionID (session fix problem?!?).

My usage example: I want to have a login on one page and be able to log in from anywhere, the user comes from a JPA layer, which I do not know for sure if you need to select.

Is there any other way to archive this ?!

I already got these pages, but didn't help me:

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!

+1
source share
2 answers

After a lot of time, I created my own “proof of concept” - an example of working with cdi- beans:

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

I hope this helps others, as if it helped me in developing this amazing :)

+1
source

I am using TomEE, but I do not understand your problem. Do you use a web profile?

Did you install beans.xml correctly?

, , . , . , bean , beans.xml

0

Source: https://habr.com/ru/post/1649554/


All Articles