camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Müller <christian.muel...@gmail.com>
Subject Re: JDBC connection for http hits to Oracle DB ...
Date Thu, 07 Feb 2013 23:28:46 GMT
Where is your Camel related question?
As far as I know, the Spring JDBC template will borrow an existing
connection from the database pool for each operation.

Best,
Christian

On Thu, Feb 7, 2013 at 3:21 PM, atiato <omar.atia@its.ws> wrote:

> Dears ,
>
> I'm using Spring JDBC template and I'm calling DB package for every http
> hit
> to apache camel Jetty server.
>
> the question is :
>
> will we hit DB using new JDBC connection for every hit ?
>
> or will we using the same JDBC template for all ? I mean use available JDBC
> connections in the pool ?
>
> as I already Have 2000 concurrent request to Jetty server if we have new
> JDBC connection for every hit then it will be an issue with hitting DB .
>
> the JDBC connection is as below Data Source and I'm passing this Datasource
> to Bean and using the JDBC template within that Bean which in turn calls DB
> package .
>
> Can u explain How we communicate with DB ?
>
> <bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource"
>                 destroy-method="close">
>                 <property name="driverClassName"
> value="oracle.jdbc.driver.OracleDriver"
> />
>                 <property name="url"
> value="jdbc:oracle:thin:@172.24.8.164:1521:TABSTST"
> />
>                 <property name="username" value="TABS" />
>                 <property name="password" value="tbstst$172" />
>                 <property name="maxActive" value="200" />
>                 <property name="poolPreparedStatements" value="true" />
>         </bean>
>
> and I'm passing id oracle-ds as below :
>
> <bean class="st.systor.np.sp.SpImpl" id="myBean">
>                 <property name="dataSource" ref="oracle-ds" />
>                 <property name="maps">
>                         <map>
>                                 <entry key="stage" value="015" />
>                                 <entry key="OperatorCodeID1" value="20" />
>                                 <entry key="OperatorCodeID2" value="10" />
>                                 <entry key="20" value="MTNS" />
>                                 <entry key="10" value="MTNS" />
>                                 <entry key="11" value="SDNI" />
>                                 <entry key="21" value="SDNI" />
>                                 <entry key="12" value="ZAIN" />
>                                 <entry key="22" value="ZAIN" />
>                                 <entry key="92" value="ZAIN" />
>                                 <entry key="42" value="ZAIN" />
>                         </map>
>                 </property>
>         </bean>
>
>
>
> Thanks and appreciate your feedback,
>
> Omar Atia
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/JDBC-connection-for-http-hits-to-Oracle-DB-tp5727128.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



--

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message