cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Adapter Module concurrency / thread problem

Former Member
0 Kudos

Hi,

I have a CustomAdapterModule being used in many differents interfaces.

In interface A the module will implement a Class A and in interface B, the same module implements Class B for message transformation.

There's seems to be some concurrency problems where Class B is loaded for interface A when both interface (A&B) are executed in parallel.

Anyone experienced that kind of behaviour?

Does a new instance of the Custom Adapter Module is instantiated for each message or is it reused?

I don't store values in any static variable. I was wondering if I should use thread-safe variable type inside the process() method?

i deal mainly with String for configuration parameters. Could go for StringBuffer, at some performance cost.

I would appreciate if someone can point to documentation on Adapters Module behaviors' in concurrency/threading env.

Thanks,

Martin

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I had a method calling another method and using instance variable in the class.

since the Adapter Module is a stateless session bean, you have no guarantee that the functions will be called inside the same bean, therefore all variables must be passed as argument between methods.