On 8/2/07, Ryan Moquin <[EMAIL PROTECTED]> wrote:
> I configured a JNDI Datasource for SQL Server. It's basically just a
> standard definition and I'm able to look it up and perform a database
> operation. So here's the situation and maybe you can help me figure out
> where my logic is flawed. I'm deploying an SA to servicemix containing 1
> service. When it starts up, it initializes itself, if there isn't anything
> in a specific table, and loads about 8500 into that table.
>
> Now, I was originally just letting hibernate handle all the connection
> pooling internally, and it worked great. Absolutely NO problem whatsoever.
> I learned last week, that the hibernate team says that you shouldn't use the
> hibernate internal pool in production because it doesn't scale. So, I
> decided to switch to using the pool in Servicemix and define a datasource in
> servicemix.
What do you mean defining a datasource in ServiceMix? Are you just
creating a JDBC connection pool in the conf/servicemix.xml file? If
so, what connection pool are you using?
> Ever since I did that, I've run into nothing but problems
> (other parts of our distributed application are now failing constantly in
> tomcat as well since I stopped letting hibernate manage the pooling). When
> our service is in the middle of saving the 8500 records to the database, it
> will abort with the exception I will list below. With hibernates internal
> pooling, all 8500 records will load with no problem. With a configured data
> source in service mix, I now get between 1000 - 5000 before it will abort
> with the following exception.
Can you provide the configuration you're using? Without more detail
about what exactly you are doing, I can't really even speculate. I'm a
bit confused as it sounds like you're defining a JDBC connection pool
(maybe using c3p0 or Commons DBCP I'm guessing) but an application
running in Tomcat is using the pool. I'm not sure why there appears to
be this separation by defining the connection pool in the
conf/servicemix.xml file instead somewhere in the application running
in Tomcat? Or maybe the whole thing is running in Tomcat including
ServiceMix??? Please provide some details on this.
> Am I misunderstanding something about
> connection pooling? I'm guessing I have to tweak some parameters. I
> watched the connection usage in SQL Server, there was only ever 1 connection
> made by our service application during all the database operations before it
> aborted. Any help will be appreciated, I've been banging my head on why
> external connection pooling won't work this whole week. Here is the
> exception:
...
> Caused by: org.hibernate.exception.JDBCConnectionException: Cannot open
> connection
...
> Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP
> connection to the host has failed. java.net.BindE
> xception: Address already in use: connect
I'm still not sure how your app is configured and running, but I
notice that the two errors above indicate a possible port conflict.
Bruce
--
perl -e 'print unpack("u30","D0G)[EMAIL
PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/
Castor - http://castor.org/