[opencms-dev] best approach

J Arrazolo jarrazolo at gmail.com
Fri Sep 26 06:51:05 CEST 2008


Thanks Nacho.  I think I follow.  I loaded and configured the OpenCms module
developer and am able to connect to the database and I am thinking this is
the best way to develop modules.  Can you comment on this please?

 

Thanks

 

-Jose

 

  _____  

From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Nacho Fernandez
Sent: Thursday, September 25, 2008 5:13 AM
To: The OpenCms mailing list
Subject: Re: [opencms-dev] best approach

 

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/61bc093a/attachment.htm>


More information about the opencms-dev mailing list