title: Spring jta-transaction-manager
body: <p>Using <a href="http://en.wikipedia.org/wiki/Spring_Framework" rel="nofollow noreferrer">Spring</a>:</p>
  
  <ol>
  <li><p>can jta-transaction-manager use id as name so that I can pass it as REF to my service layer like below?</p></li>
  <li><p>is tx:jta-transaction-manager can only be used for je22 container? I mean for <a href="http://en.wikipedia.org/wiki/Apache_Tomcat" rel="nofollow noreferrer">Tomcat</a>, I need to do it manually, like below:</p>
  
  <pre><code>&lt;tx:jta-transaction-manager id="name_transactionmanager"/&gt;
  
      &lt;bean id="projectService" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"&gt;
          &lt;property name="transactionManager"
                    ref="name_transactionmanager"/&gt;
          &lt;property name="target"&gt;
              &lt;bean
                class="com.company.project.company.services.ServiceImpl"
                init-method="init"&gt;
                   &lt;property
                     name="HRappsdao"
                     ref="HRappsdao"/&gt;
                   &lt;property
                     name="projectdao"
                     ref="projectdao"/&gt;
              &lt;/bean&gt;
          &lt;/property&gt;
          &lt;property name="transactionAttributes"&gt;
              &lt;props&gt;
                  &lt;prop key="store*"&gt;PROPAGATION_REQUIRED&lt;/prop&gt;
                  &lt;prop key="update*"&gt;PROPAGATION_REQUIRED&lt;/prop&gt;
                  &lt;prop key="remove*"&gt;PROPAGATION_REQUIRED&lt;/prop&gt;
                  &lt;prop key="bulkUpdate*"&gt;PROPAGATION_REQUIRED&lt;/prop&gt;
                  &lt;prop key="*"&gt;PROPAGATION_SUPPORTS,readOnly&lt;/prop&gt;
              &lt;/props&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  </code></pre></li>
  </ol>
  
  <h2>For question 2</h2>
  
  <pre><code>    &lt;bean id="transactionManager"
        class="org.springframework.transaction.jta.JtaTransactionManager"&gt;
          &lt;property name="userTransaction"&gt;
              &lt;bean class="org.springframework.transaction.jta.JotmFactoryBean"/&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  </code></pre>