daily pastebin goal
7%
SHARE
TWEET

Untitled

a guest Jan 28th, 2016 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @Override
  2.     public Object[] getExtrasInfosSource(int idSource) {
  3.     StringBuffer sql = new StringBuffer();
  4.         final SessionFactoryImplementor sfi = (SessionFactoryImplementor) getSessionFactory();
  5.         final Settings settings = sfi.getSettings();
  6.         // Appel du procedure stock√© "getExtrasInfosForSource(idSource integer)" au niveau de bd
  7.         sql.append("SELECT * from "+settings.getDefaultSchemaName()+".getExtras_Infos_For_Source(:idSource)");
  8.         SQLQuery query = this.getSession().createSQLQuery(sql.toString());
  9.         query.setInteger("idSource", idSource);
  10.         return (Object[]) query.setMaxResults(1).uniqueResult();...
  11.    
  12. <?xml version="1.0" encoding="utf-8"?>
  13. <Context>
  14.     <Resource name="jdbc/database"
  15.               auth="Container"
  16.               type="javax.sql.DataSource"
  17.               driverClassName="org.postgresql.Driver"
  18.               url="jdbc:postgresql://localhost:5432/DBA"
  19.               username="DBA"
  20.               password="DBA"
  21.               initialSize="34"
  22.               maxActive="80"
  23.               maxIdle="5"
  24.  
  25.               timeBetweenEvictionRunsMillis="1000"
  26.               minEvictableIdleTimeMillis="2000"
  27.               validationQuery="SELECT 1"
  28.               validationInterval="3000"
  29.               testOnBorrow="true"
  30.               removeAbandoned="true"
  31.               removeAbandonedTimeout="3"/>  
  32.  
  33. </Context>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top