cancel
Showing results for 
Search instead for 
Did you mean: 

Problems moving to OCC V2 because of its stateless nature

Dear experts, et. al.,

We are planning to use OCC v2, which is stateless. However, we have the problem that our current hybris shop relies heavily on session attributes, etc. How would you approach this? Does hybris offer any guide on how to transition from OCC v1 to v2 and stop relying on session-related attributes?

Kind regards,

L.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member537989
Contributor
0 Kudos

You can still reuse the session concept because it's present but you need to make sure that right values being propagated to the session on every OCC call

Regarding transition - have you seen Upgrade guide?

0 Kudos

So you are saying that it is necessary to create a session for all REST calls even if they come from OCC V2?

former_member537989
Contributor
0 Kudos

A session is being created by Hybris framework on every request, so it's always present in the request processing context, so you can still partially rely on attributes kept in the session, however it's now your duty to make sure that every request actually gets these attributes somehow. And of course you cannot rely on a session as being container for data kept between requests.