title: How to set oracle.net.ns.SQLnetDef.TCP_CONNTIMEOUT_STR
body: <p>I have googled and found lots of documents and web pages saying that I should set oracle.net.ns.SQLnetDef.TCP_CONNTIMEOUT_STR to 3 seconds. I was unable to locate an example of how exactly to do that.</p>
  
  <p>Is it a system level property that I can set with -Doracle.net.ns.SQLnetDef.TCP_CONNTIMEOUT_STR=3 or what? A properties file? A Spring config example?</p>
  
  <p>I have a plain java application with the ojdbc.jar in the classpath. Beans are configured/wired using Spring xml.</p>
  
  <pre><code>&lt;bean id="myDataSource" destroy-method="close"
      class="org.apache.commons.dbcp.BasicDataSource"&gt;
      &lt;property name="driverClassName" value="${my.jdbc.driverClassName}" /&gt;
      &lt;property name="url" value="${my.jdbc.url}" /&gt;
  
      &lt;!-- cut --&gt;
  &lt;/bean&gt;
  </code></pre>