I assume you are talking about runtime, not initialization time. At runtime, it is convenient if the shared object has no mutable state. If it has, you might want to wrap that in as ThreadLocal variable.
If there is a problem during initialization, that would be a bug I suppose. -- Richard On 01.04.2014, at 14:05, Marshall Schor <[email protected]> wrote: > On 4/1/2014 7:05 AM, Swril wrote: >> I have an AE that I am running in a CPE. >> The AE has a ExternalResource to a SharedResourceObject. >> I set the setMaxProcessingUnitThreadCount to 5. >> >> When I run the pipeline, I am getting errors like NPE which hinted that >> things are out-of-step due to the multiple threads. >> >> Are there any advice on what to do for using AE with ExternalResource in a >> CPE? > > One thought: it's probably necessary to write the code you supply for the > SharedResourceObject to be thread safe. A good source for understanding the > complex details around how to do this is > http://lmgtfy.com/?q=java+concurrency+in+practice . > -Marshall
