Hi You need to use a pooled datasource for connections so they are reused.
On Fri, Nov 13, 2009 at 3:06 PM, titexe <[email protected]> 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
