0

I have built a relatively small Java application based on SAP Cloud SDK/Spring-Boot.

Each request should be unique. That's why I have provided each class I use with @RequestScope (In despair).

Now, when testing with several users in parallel, we noticed that the data is partially mixed.

I can't find any other scopes n the settings/POMs etc.

What else could it be? The cache from the remote system? I am not doing anything other than loading data from 3 different data, saving/mapping it in a model and then returning it to the requester.

My model header looks like:

@Data
@Component
@RequestScope
public class PartnerModel {
Tobias
  • 4,921
  • 4
  • 31
  • 40
  • 1
    It sounds to me as if you are injecting a singleton bean at some point during your operation. Check that all objects you use have session scope. Also your question is very light on information. – s_qw23 Aug 14 '23 at 18:16
  • 1
    Could you please specify what kind of data is getting mixed up? Is it the current tenant/principal? Also: Do you use any asynchronous operations while processing your users requests? – Johannes Schneider Aug 15 '23 at 06:20
  • Thanks guys. Your two comments were enough to find my problem. I had actually overlooked that I had an asynchronous function that then calls a bean with a session scope.... Something must have got mixed up – Tobias Aug 18 '23 at 17:09

0 Answers0