After adding a second persistence unit and changing my application’s data sources to XADataSource (MySQL), I’m now getting a confusing warning in the glassfish log about isolation levels on my parent entity:
WARN o.e.p.s.f.j.ejb_or_metadata : Parent Entity BaseEntity has an isolation
level of: PROTECTED which is more protective then the subclass Contact with
isolation: null so the subclass has been set to the isolation level PROTECTED.
After some research, I think that this isolation level warning message is coming from EclipseLink’s caching mechanism. But I am not specifying an isolation level anywhere in my app, so it appears that something in my configuration has triggered the BaseEntity class to have an isolation level of ‘PROTECTED’. The documentation is silent on what might cause it to be automatically assigned to that level — see user guide.
Minor testing with a single user has shown that the application seems to work as expected, but this warning message doesn’t make me feel comfortable rolling it out to the masses.
Can anyone shed some light into this message? Are my concerns valid?
After some research, I discovered that this warning had nothing to do with using the XADataSource. I had earlier began some exploration into EclipseLink’s Multitenancy, and it turned out that this was the culprit.
Referring to http://wiki.eclipse.org/EclipseLink/Examples/JPA/Multitenant#Persistence_Usage_for_Multiple_Tenants:
FYI — In reviewing the code, there are 3 other cases in ClassDescriptor.initializeCaching() in which the cache isolation is downgraded to PROTECTED: