title: Ehcache element <cache/> does not allow attribute "transactionalMode"?
body: <p>According to the <a href="http://ehcache.org/documentation/jta.html" rel="nofollow noreferrer">Ehcache documentation</a>, starting with version 2.0, an Ehcache cache may participate in a <a href="http://en.wikipedia.org/wiki/Java_Transaction_API" rel="nofollow noreferrer">JTA</a> transaction based on the value of attribute <code>transactionalMode</code> on element <code>&lt;cache/&gt;</code>.</p>
  
  <p>If this is true, then why does Ehcache, when it encounters this attribute in my Ehcache configuration file, throw the following exception and complain that "Element  does not allow attribute "transactionalMode".":</p>
  
  <pre><code>Caused by: net.sf.ehcache.CacheException: Error configuring from zip:C:/Program Files/Oracle/Middleware/user_projects/domains/abstrack1/servers/AdminServer/tmp/_WL_user/_appsdir_middleware-ear-1.0-SNAPSHOT_ear/n8rga7/middleware-ejb-1.0-SNAPSHOT.jar!/ehcache.xml. Initial cause was Error configuring from input stream. Initial cause was null:35: Element &lt;cache&gt; does not allow attribute "transactionalMode".
      at net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:95)
      at net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:131)
      at net.sf.ehcache.CacheManager.parseConfiguration(CacheManager.java:241)
      at net.sf.ehcache.CacheManager.init(CacheManager.java:190)
      at net.sf.ehcache.CacheManager.&lt;init&gt;(CacheManager.java:183)
      at net.sf.ehcache.hibernate.EhCacheProvider.start(EhCacheProvider.java:128)
      at org.hibernate.impl.SessionFactoryImpl.&lt;init&gt;(SessionFactoryImpl.java:183)
      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1291)
      at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:814)
      at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:732)
      at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
      ... 76 more]]&gt;
  </code></pre>
  
  <p>Here is a sample cache definition from my <code>ehcache.xml</code> file in which I've set <code>transactionalMode</code> to "xa":</p>
  
  <pre><code>&lt;cache
      name="com.db.spgit.abstrack.model.Security"
      maxElementsInMemory="500"
      eternal="false"
      timeToIdleSeconds="300"
      timeToLiveSeconds="86400"
      overflowToDisk="false"
      transactionalMode="xa" /&gt;
  </code></pre>