title: How to create Read only Connection in Java for Oracle Database
body: <p>I have  to design a tool which having text area where user can enter the their query and by giving submitting results will be shown. My requirement is such a way that it should accept only select queries but not update, insert, delete. If it is select results should be shown, otherwise error should be thrown. I have tried as below to make DB connection read only.</p>
  
  <p>Connection.setReadOnly(true) which is not recommendable and its throwing an error.</p>
  
  <p>'setReadOnly' is not supported on WebSphere java.sql.Connection implementation.</p>
  
  <p>Can some one please help me in getting Read only connection for Database or if any design changes are needed</p>