Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public Object[] getExtrasInfosSource(int idSource) {
- StringBuffer sql = new StringBuffer();
- final SessionFactoryImplementor sfi = (SessionFactoryImplementor) getSessionFactory();
- final Settings settings = sfi.getSettings();
- // Appel du procedure stocké "getExtrasInfosForSource(idSource integer)" au niveau de bd
- sql.append("SELECT * from "+settings.getDefaultSchemaName()+".getExtras_Infos_For_Source(:idSource)");
- SQLQuery query = this.getSession().createSQLQuery(sql.toString());
- query.setInteger("idSource", idSource);
- return (Object[]) query.setMaxResults(1).uniqueResult();...
- <?xml version="1.0" encoding="utf-8"?>
- <Context>
- <Resource name="jdbc/database"
- auth="Container"
- type="javax.sql.DataSource"
- driverClassName="org.postgresql.Driver"
- url="jdbc:postgresql://localhost:5432/DBA"
- username="DBA"
- password="DBA"
- initialSize="34"
- maxActive="80"
- maxIdle="5"
- timeBetweenEvictionRunsMillis="1000"
- minEvictableIdleTimeMillis="2000"
- validationQuery="SELECT 1"
- validationInterval="3000"
- testOnBorrow="true"
- removeAbandoned="true"
- removeAbandonedTimeout="3"/>
- </Context>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement