thank you for describing this scenario, and also for the adding the test case.
By now locking on the factory's class, this now ensures that the different instances of the same factory in different contexts can't be called at the same time. This now fixes the test cases you described.
BTW: I suppose locking on the factory's method would introduce another problem if the factory uses injection, as (at least with some older Seam 2 version) I remember that entering a bean with injection twice messed up injection due to a cleanup to early. I am not sure if this is still the case.
Hello Marek Schmidt,
thank you for describing this scenario, and also for the adding the test case.
By now locking on the factory's class, this now ensures that the different instances of the same factory in different contexts can't be called at the same time. This now fixes the test cases you described.
$ mvn clean integration-test -Dtest=ConcurrentFactoryTest,FactoryLockTest
BTW: I suppose locking on the factory's method would introduce another problem if the factory uses injection, as (at least with some older Seam 2 version) I remember that entering a bean with injection twice messed up injection due to a cleanup to early. I am not sure if this is still the case.
Best regards,
Alexander.