title: Custom JPA Fetch Size on spring boot application not working on IBM liberty core
body: <p>In application (Spring boot + Spring data + JPA[hibernate] + Oracle), we defined below property of fetch size in application.properties file.</p>
  
  <blockquote>
    <p>spring.jpa.properties.hibernate.jdbc.fetch_size = 500</p>
  </blockquote>
  
  <p>The above property working on the embedded tomcat container. But once we deployed the application on websphere liberty core server. It always taking the default fetch size i.e. 1. The container not recognized the defined property.</p>
  
  <p>Application is running on JNDI configuration. And JNDI configuration defined in server.xml of liberty. Below is the code snippet.</p>
  
  <pre><code>&lt;application id="Example" location="C:/Example.ear" name="Example" type="ear" /&gt;
  
  &lt;authData id="auth1" password="dev123" user="dev"/&gt;
  &lt;dataSource jndiName="jdbc/example" type="oracle.jdbc.xa.client.OracleXADataSource"&gt;
      &lt;jdbcDriver libraryRef="OracleLib"/&gt;
      &lt;properties.oracle URL="jdbc:oracle:thin:@//s123456.fr.net.intra:1521/test" databaseName="test" driverType="thin" password="dev123" portNumber="1521" serverName="s123456.fr.net.intra" user="dev"/&gt;
  &lt;/dataSource&gt;
  &lt;resource-ref binding-name="jdbc/example" name="jdbc/example"&gt;
      &lt;authentication-alias name="auth1"/&gt;
  &lt;/resource-ref&gt;enter code here
  </code></pre>
  
  <p>As per my findings we can set the fetch size for db2 and informix but didn't find  it for properties.oracle, as mentioned <a href="https://www.ibm.com/support/knowledgecenter/en/SSD28V_8.5.5/com.ibm.websphere.wlp.core.doc/autodita/rwlp_metatype_core.html#mtFile128" rel="nofollow noreferrer">here</a> </p>
  
  <p>Fetch size property as mentioned above worked if I Retrieve data using entity manager as,</p>
  
  <pre><code>@PersistenceContext
  private EntityManager entityManager;
  
  Query query = session.createSQLQuery("SELECT * FROM Employee");
  query.list();
  </code></pre>
  
  <p>But I don't want to go with entity manager, as we used spring data for application.</p>
  
  <p>How can I set the fetch size in liberty core for spring boot with spring data application?</p>