[opencms-dev] best approach

Nacho Fernandez snatcho at gmail.com
Thu Sep 25 12:13:13 CEST 2008


Hi Jose and list,

The recommended approach to using additional database tables is not using
the OpenCms database but creating a different dabatase for your
application/module. That other database can be then accessed two ways:

1.- Granting permissions to the database user that controls OpenCms (by
default called "opencms") on the new database you created and using OpenCms
API to get a connection for the standard OpenCms database pool.
2.- Defining a separate database pool with the right data (that database can
be even by a different vendor, for instance an Oracle database different to
the MySQL where you may have installed OpenCms) and once again getting
connections through OpenCms API but this time from that other pool. For this
approach I suggest you read this nice wiki article:
http://opencms-wiki.org/Using_OpenCms%27s_Database_connection_pool . By the
way, the last part of the article shows you how to get data from a database
pool in OpenCms and that should be useful to you even if you choose the
first approach.

I hope it helps. Greetings,

Nacho.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20080925/a274107b/attachment.htm>


More information about the opencms-dev mailing list