0
votes

I wrote custom java class, a special http connector in the flow with request-response mule-http connector.

enter image description here

But if there are too many requests calls this flow, an IllegalStateException occured.

As far as i know the data or variables from one thread copies to another thread and I get an IllegalState...

How can I synchronize data in my connector? May I forget to implement some interfaces?

public class MyHTTPConnector {    
...

}
1
Look at the stack trace. Which method throws IllegalStateException?Alexei Kaigorodov
Is your custom java class thread safe?David Dossot
No, it's not thread safe. Do I need to add synchronized to all methods? Will it enough? Should I implement any other interfaces?Alexander Dormenko

1 Answers

0
votes

I synchronize all methods in my class and solve the problem. Thanks everyone for assistance.