Does it mean that I cannot use directly the tomcat dbcp library? zsolt
>-----Original Message----- >From: Niels Beekman [mailto:[EMAIL PROTECTED] >Sent: Friday, October 21, 2005 10:14 AM >To: [email protected] >Subject: RE: How to use tomcat's naming-factory-dbcp.jar > >Ok, then you probably have to write your own transactionmanager and put >the following in your SQLMap config.xml: > ><transactionManager type="mypackage.TomcatDbcpTransactionConfig"> > <dataSource type="mypackage.TomcatDbcpDataSourceFactory"> > <property name="prop1" value="value1"/> > <property name="prop2" value="value2"/> > </dataSource> ></transactionManager> > >This requires implementations of: >- com.ibatis.sqlmap.engine.transaction.TransactionConfig (extend >com.ibatis.sqlmap.engine.transaction.BaseTransactionConfig) >- com.ibatis.sqlmap.engine.datasource.DataSourceFactory > >Maybe there is some documentation at the Tomcat-site about the >DBCP-package, I suspect it is almost a copy of the DBCP-implementation. > >Not sure if this is the preferred way to go though, I don't know if your >datasources would be accessible in Tomcat too. > >Hope this helps, > >Niels > >-----Original Message----- >From: Zsolt [mailto:[EMAIL PROTECTED] >Sent: vrijdag 21 oktober 2005 10:05 >To: [email protected] >Subject: RE: How to use tomcat's naming-factory-dbcp.jar > >Thank you Niels, but I would like configure the database connection in >sqlmap-config.xml. Because we ship our application with tomcat it would >be >easier if we could configure ibatis to use naming-factory-dbcp.jar that >is >always there. > >Zsolt > > >>-----Original Message----- >>From: Niels Beekman [mailto:[EMAIL PROTECTED] >>Sent: Friday, October 21, 2005 9:16 AM >>To: [email protected] >>Subject: RE: How to use tomcat's naming-factory-dbcp.jar >> >>You should reference the datasources defined in Tomcat using JNDI, this >>can be found in the documentation. >> >>Niels >> >>-----Original Message----- >>From: Zsolt [mailto:[EMAIL PROTECTED] >>Sent: vrijdag 21 oktober 2005 9:15 >>To: [email protected] >>Subject: How to use tomcat's naming-factory-dbcp.jar >> >>Hi, >> >>I use tc-5.5.12 and that is shipped with naming-factory-dbcp.jar. It >>looks >>like it has new class names such as: >>org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory >> >>How do I have to configure sqlmap-config.xml to use this library? >> >>Zsolt >> >>
