camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From titexe <tit...@yahoo.Fr>
Subject Re: Camel Database : Connection management database by Camel?
Date Fri, 13 Nov 2009 15:23:01 GMT

Problem is solved

I change JTDS through JDBC, and I added the following line:

  <property name="poolPreparedStatements" value="true"/>

Now you can manage the connection pools



Claus Ibsen-2 wrote:
> 
> On Fri, Nov 13, 2009 at 3:26 PM, titexe <titexe@yahoo.fr> wrote:
>>
>> Thank you for your response,
>>
>> can you tell me, how I can do? because I tried to look on the doc, but I
>> found nothing.
>>
> 
> Try this url :)
> http://tinyurl.com/yls2mcm
> 
> notice its friday today
> 
> 
>> Again, thank you,
>>
>>
>> Claus Ibsen-2 wrote:
>>>
>>> Hi
>>>
>>> You need to use a pooled datasource for connections so they are reused.
>>>
>>>
>>> On Fri, Nov 13, 2009 at 3:06 PM, titexe <titexe@yahoo.fr> wrote:
>>>>
>>>> Hello,
>>>>
>>>> I have a route camel that take the message in queue OUT and makes an
>>>> update
>>>> in the database.
>>>>
>>>> In fact that I receive many messages in 10,000 messages.
>>>> I receive an error:
>>>> java.sql.SQLException: Network error IOException: Address already in
>>>> use
>>>> error.
>>>>
>>>> By checking on the system, I found many connections to the database.
>>>>
>>>> Camel is what creates every time a connection for each message?
>>>>
>>>> What is the solution to share the same connection for a pool of
>>>> messages?
>>>>
>>>> below my configuration :
>>>>
>>>> <route errorHandlerRef="myDeadLetterChannel">
>>>> <from uri="activemq:queue:OUT"/>
>>>> <t uri="activemq:queue:IN"/>
>>>> <setBody>
>>>> UPDATE SET <simple> InterfaceMonitor CamelSent = CURRENT_TIMESTAMP
>>>> WHERE
>>>> Id
>>>> = '$ (in.header.MessageId)' </ simple>
>>>> </ setBody>
>>>> <t uri="jdbc:testdb"/>
>>>> </ route>
>>>>
>>>> <bean id="testdb" class="net.sourceforge.jtds.jdbcx.JtdsDataSource">
>>>> <property name="serverName" value="192.167.10.55"/>
>>>> <property name="portNumber" value="1433"/>
>>>> <property name="databaseName" value="IP"/>
>>>> <property name="user" value="appuser"/>
>>>> <property name="password" value="Passw0rd"/>
>>>> </ bean>
>>>>
>>>>
>>>>
>>>> Thank you in advance
>>>>
>>>> titexe
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/Camel-Database-%3A-Connection-management-database-by-Camel--tp26337091p26337091.html
>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> Apache Camel Committer
>>>
>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>> Open Source Integration: http://fusesource.com
>>> Blog: http://davsclaus.blogspot.com/
>>> Twitter: http://twitter.com/davsclaus
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Camel-Database-%3A-Connection-management-database-by-Camel--tp26337091p26337337.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: http://old.nabble.com/Camel-Database-%3A-Connection-management-database-by-Camel--tp26337091p26338275.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message