one additional chack that you might do is to make sure that Environment (that is used to create or load ksession) is not shared between different threads as it get's local data during execution such as EntityManager and that make the code not thread safe. Once you have always dedicated environment for single execution you should get rid of concurrency issues. Although this might not be the case for you.
HTH