Restore method isInitialized to detect if JPA is initialized