[opencms-dev] need SQL connection example
Jordi MartÃ
jmarti at theinit.com
Fri Feb 29 12:36:25 CET 2008
>would it require to add another connection pool as Arash pointed me to?
Yes, it would.
-----Mensaje original-----
De: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org]
En nombre de Christoph P. Kukulies
Enviado el: viernes, 29 de febrero de 2008 12:15
Para: The OpenCms mailing list
Asunto: Re: [opencms-dev] need SQL connection example
On Fri, Feb 29, 2008 at 10:47:40AM +0100, Jordi Mart? wrote:
> You can get the java.sql connection that opencms provides through this
> sentence:
>
> java.sql.Connection con =
>
org.opencms.main.OpenCms.getSqlManager().getConnection(org.opencms.db.CmsDbP
> ool.getDefaultDbPoolName());
I'm not so familar with CmsSqlManager class.
Assumed I have a second database besides opencms, e.g. "accounting".
Would it allow me to switch the database to "accounting" ? Or would it
require to add another connection pool as Arash pointed me to?
>
> You can use it directly in your jsp or in whatever servlet or class you
> would like to use.
>
> It's a good practice to create your jsp inside a module in opencms.
>
--
Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de
_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev
More information about the opencms-dev
mailing list