Apigee Javacallout Policy - com.apigee.flow.execution.spi.Execution

phanim
Participant II

Hi,

Can you provide answer for the below question?

Q) When are JavaCallouts (com.apigee.flow.execution.spi.Execution) instantiated? Are they created as singletons like Servlets? Are they created per route or per each incoming message?

0 2 339
2 REPLIES 2

One Class is instantiated per process. Each callout gets its own classloader.

When multiple concurrent requests arrive at Apige Edge, the execute() method on the callout can be called by multiple threads at one time. Apigee edge does not synchronize access to the callout object or to the execute() method. The execute method must be thread-safe.

See also this answer.

Thanks @Dino