Thanks in advance.I got struck in the middle of a problem and please help me.
In my application i am using datasouce and performing all operations without establishing any connections as this:
JdbcTemplate jt = new JdbcTemplate(datasource);
Now I want to get the primary keys of a table.Is there any way to get primarykeys directly from datasource.I want to get direectly from the datasource.
I tried to get primary key using connections also as follows:
Connection con = DataSourceUtils.doGetConnection(datasource);
DatabaseMetaData dbmeta = con.getMetaData();
ResultSet dbrs = dbmeta.getPrimaryKeys(null, null, "employeetable");
This is execuing sometimes and i am getting exceptions also as:
21:03:51,585 INFO [STDOUT] org.jboss.util.NestedSQLException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] ); - nested throwable: (javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] ))
please say any solution for this problem.