title: Why not access update DB in jax-rs web service
body: <p>I create Jax-Rs web service using following technology. but can't update DB </p>
  
  <p><em>Technology Used</em></p>
  
  <ul>
  <li>Java 1.8</li>
  <li>Eclipse Luna IDE</li>
  <li>RestEasy-3.0.8.Final</li>
  <li>Spring-Framework-3.2.11.RELEASE</li>
  <li>Hibernate-4.2.15.Final</li>
  <li>Apache Maven 3.2.1</li>
  <li>Apache Tomcat 8.0.23</li>
  <li>MySql-Connector-Java-5.1.32</li>
  </ul>
  
  <p>This is spring-hibernate-resteasy.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
      xmlns:tx="http://www.springframework.org/schema/tx"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
      http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
      http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"&gt;
  
  &lt;!-- to activate annotations in beans already registered in the ApplicationContext --&gt;
  &lt;context:annotation-config /&gt;
  
  &lt;!-- scans packages to find and register beans within the application context --&gt;
  &lt;context:component-scan base-package="com.resteasy.series.spring.hibernate" /&gt;
  
  &lt;!-- turn on spring transaction annotation --&gt;
  &lt;tx:annotation-driven transaction-manager="transactionManager" /&gt;
  
  &lt;!-- Transaction Manager --&gt;
  &lt;bean id="transactionManager"
      class="org.springframework.orm.hibernate4.HibernateTransactionManager"&gt;
      &lt;property name="sessionFactory" ref="sessionFactory" /&gt;
  &lt;/bean&gt;
  
  &lt;!-- Session Factory --&gt;
  &lt;bean id="sessionFactory"
      class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"&gt;
      &lt;property name="dataSource" ref="dataSource" /&gt;
      &lt;property name="annotatedClasses"&gt;
          &lt;list&gt;
              &lt;value&gt;com.resteasy.series.spring.hibernate.model.Customer&lt;/value&gt;
          &lt;/list&gt;
      &lt;/property&gt;
      &lt;property name="hibernateProperties"&gt;
          &lt;props&gt;
              &lt;prop key="hibernate.dialect"&gt;org.hibernate.dialect.MySQLDialect&lt;/prop&gt;
              &lt;prop key="hibernate.hbm2ddl.auto"&gt;update&lt;/prop&gt;
              &lt;prop key="hibernate.show_sql"&gt;true&lt;/prop&gt;
          &lt;/props&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;!-- dataSource configuration --&gt;
  &lt;bean id="dataSource"
      class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
      &lt;property name="driverClassName" value="com.mysql.jdbc.Driver" /&gt;
      &lt;property name="url" value="jdbc:mysql://localhost:3306/dbName" /&gt;
      &lt;property name="username" value="root" /&gt;
      &lt;property name="password" value="" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p></p>
  
  <p>I follow this article create for web service <a href="http://www.benchresources.net/resteasy-jax-rs-web-service-integrating-with-spring-and-hibernate-orm-framework/" rel="nofollow">link</a>.</p>
  
  <p>Why is this happen to me? How to solve in this scenario. I can get data From DB, but can't update DB.</p>