Hi All,

 

Interesting snippet re JDBC driver throughput.  I've been playing with
getting a Spring/Hibernate setup to use CF's own datasources.  Firstly it
means you don't have to put the database login credentials into the Spring
configuration, but mainly to take advantage of the CF server's connection
pooling, which is supposed to give better performance.  

 

What I found was that using the jTDS driver via a non-pooled connection
manager (org.springframework.jdbc.datasource.DriverManagerDataSource) gave
me twice the throughput of the default CF8 MSSQL driver.  These results are
nothing like definitive - the test harness was just jmeter running on the
same box as the CF server - but it certainly seems that pretty decent
throughput is achievable with no pooling at all, and that the "seconds per
connection" overhead I'd read about does not at all apply to the jTDS/MSSQL
2000 setup.

 

BTW, if you're interested in how to consume a CF datasource in
Spring/Hibernate on Adobe CF, use this to define the datasource bean:

 

      <bean id="CFDataSourceService"
class="coldfusion.server.ServiceFactory"
factory-method="getDataSourceService"/>

 

      <bean id="myDataSource" factory-bean="CFDataSourceService"
factory-method="getDatasource">

            <constructor-arg type="java.lang.String"
value="myDataSourceName"/>

      </bean>     

 

and then your favourite factory method to inject that into the Hibernate
SessionFactory.  I do this:

 

      <bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"
<property name="dataSource"><ref bean="myDataSource"/></property>

            ...some more config stuff here

      </bean>

 

Usual caveats re the undocumented status of the CF ServiceFactory apply.

 

Jaime

 

 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CFCDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfcdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to