Hello, I have a rather "simple" system configuration and wanted to simplify my persistence configuration by adding persistence-unit defintions to the persistence.xml. I basically have one pu definition for each environment (dev/tst/prd).
On each system, there are several services which use the same pu definition but have their own instance of the pu. These communicate with each other via activeMQ to keep the caches in synch. Until now, I had one PU and in each service/environment the persistence configuration was included in a conf file and passed to the emf. The multiple pu's work just fine, as long as there is no error in ANY of them. However, if ANY one of the pu's has an error in the RemoteCommitProvider definition - jpa will not start. This occurs in the PCEnhancerAgent.registerClassLoadEnhancer which appears to loop over each pu and create a OpenJPAConfigurationImpl. In the loop the instantiateAll() method is invoked on each conf - whether I wanted to load that pu or not! - that in tune causes the RemoteCommitProvider to be created ... IF, when starting my development environment, the test environment is not online (or reachable) the start will fail. Is there a reason that we need to process persistence-unit definitions which are not requested? Setting DynamicEnhancementAgent to false resolves the problem .... John ---- Who is General Failure, and why is he reading my hard disk?