I think you can start by looking at com.jivesoftware.base.database.DefaultConnectionProvider, as you mentioned earlier.
You could probably create a CustomConnectionProvider and use it in your DAO classes.
To specify the connection parameters, you could use jive-startup.xml I believe:
Remember to use customProvider in your new CustomConnectionProvider class.
Let me know if this worked...
Thanks for your reply. I think what you suggested is part of what I need, but I need just a little more guidance.
I need to connect to 2 separate databases and maintain connection pools at the same time. Here's what I'm after: I want the default connection to remain intact, but add an additional connection and use one or more ConnectionProvider objects to manage these. Looking through the jive code, it looks like there can be only one ConnectionProvider. So from this perspective, this one ConnectionProvider would need to manage both connection pools.
<defaultProvider> <!-- this is the Jive data connection -->
<customProvider> <!-- this is the a custom data connection to non-Jive data -->
I have some thoughts on how to go about creating this CustomConnectionProvider, but I'm wondering if anyone has done this before, and if there are any gotchas or best practices I should be aware of.
I'm using a Tomcat 6 container, so my preference would be to use it to manage my database connection pools and inject them into the Jive using Spring and JNDI.
I get your point. You require two live connection providers, by declaring them in the xml as follows:
I have not done an actual customization of this type. A good place to start with is the ConnectionManager class, the spring-daoContext.xml and DataSourceFactory class.
You can either extend the ConnectionManager class or modify it to handle multiple connection providers. Once this is done, we need to find a way to access the providers in DAO class, using simpleJdbcTemplate, which I have not looked into. See if you could find a way to access custom providers in your DAO by some way. I'll get back if I find any.