|
ark, This is an excert from my struts-config.xml It works ok. This Struts application is running on the AS400 so I am using the local db2 drivers. I had some trouble updating files with this before I appended "WITH NC" to the end of my insert and update SQL statements (I was updating non-journalled files)and it worked fine after that <!-- ========================= Data Sources ============================= --> <data-sources> <data-source> <set-property property="autoCommit" value="true"/> <set-property property="description" value="DB2 Datasource"/> <set-property property="driverClass" value="com.ibm.db2.jdbc.app.DB2Driver"/> <set-property property="maxCount" value="10"/> <set-property property="minCount" value="2"/> <set-property property="password" value="xxxxxxxx"/> <set-property property="url" value="jdbc:db2:*local;naming=system"/> <set-property property="user" value="xxxxxxxx"/> <set-property property="naming" value="system"/> </data-source> </data-sources> I use this in my action classes to connect DataSource datasource = (DataSource) context.getAttribute(Action.DATA_SOURCE_KEY); try { connection = datasource.getConnection(); } catch (Exception e) { System.out.println("Unable to create connection using STRUTS Connection Pooling"); } -----Original Message----- From: Mark Phippard [mailto:MarkP@softlanding.com] Sent: Tuesday, January 28, 2003 3:55 PM To: Java Programming on and around the iSeries / AS400 Subject: Struts or DBCP Pooling and Toolbox Anyone care to share a Struts DataSource configuration that works with the Toolbox driver? Did you use the Toolbox DataSource driver or the DBCP BasicDataSource and the normal Toolbox JDBC classes. Any pros/cons? Thanks _______________________________________________ This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list To post a message email: JAVA400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo.cgi/java400-l or email: JAVA400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/java400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.