Property reference with default value in persistence.xml ignored in Hibernate in JBoss EAP

Solution Verified - Updated -

Issue

  • A property reference was specified for configuration in the persistence.xml in a JPA application but the value is ignored

    <property name="hibernate.cache.use_second_level_cache" value="${hibernate.cache.level2.enabled:false}"/>
    
  • Whether the property is set (e.g. as a system property in the standalone.xml) to false or omitted, the cache is enabled.

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 7
  • Hibernate 5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content