Yes, it is extremely easy as a matter of fact. If you look in the SQL examples, ext-connection dir, you will get the basic layout. Here is an overview..
org.apache.xalan.lib.sql.ConnectionPool is an interface, in hind sight I should of probably followed convention can called it IConnectionPool.
You need to create a wrapper class that implements the ConnectionPool interface and maps the interface calls to Tomcat's connection pool.
Now in the init() method of your Servlet, create an instance of you wrapper class and register it with the
org.apache.xalan.lib.sql.ConnectionMgr class.
Now for each UserName/Password/Default Database, you need to create a new instance and register it with the ConnectionMgr.
Then in the Stylesheet, reference the ConnectionPool instance by name.
All the basics of this should be in the example code.
If you get the wrapper class working and create a sample / skeleton
servlet class I will add the code to the extension directory with a
note that you submitted the code but I think you need to sign one of those ASF license agreements.
Send me an Email if you have questions, but CC the dev list so it gets recorded in the public archive. If I don't respond right away, then just send me a reminder. I am on again, off again on the list and procmail pre sorts by Xalan messages in a seperate folder.
Regards John G
Haigh Martin - SCOPE Programme ISS - wrote:
John,
I got your e-mail address from the Xalan extension library pages and I hope you don't mind me asking you a question about the SQL extensions.
I am using Tomcat 5 and part of the application already gets jdbc DataSource objects from the connection pool managed by Tomcat (using the common-pool services). Rather than set up another pool of connections specifically for Xalan I wanted to know if it is possible for Xalan to make use of the Tomcat pool and if so, do you know of an example of how to do this?
Thanks in advance
Martin Haigh
****************************** The Cabinet Office's computer systems may be monitored and communications
carried on them recorded, to secure the effective operation of the system
and for other lawful purposes.
-- -------------------------------------- John Gentilin Eye Catching Solutions Inc. 18314 Carlwyn Drive Castro Valley CA 94546
Contact Info [EMAIL PROTECTED] Ca Office 1-510-881-4821 NJ Office 1-732-422-4917
