[opencms-dev] DbAccess for a custom file type

Christian Steinert christian_steinert at web.de
Thu Nov 2 02:32:12 CET 2006


Andy Bicksbo schrieb:
> Hi
> I think you missunderstood me. I don't want to create a new resource
> type, i want to implement some custom Objects, such as for exemple a
> CmsUser, or CmsProject,... and create an specific dbconnection, which
> should be in the same style and structure as the dbconnection of for
> exemple CmsUser.
Dear Andy,

I am not sure if I understand...

Why would you implement your own type of project or a totally different
type of users for example? Do you want to synchronize opencms with the
user management and resource management of other systems? What would be
the benefit for you?

> So the point is, that i don't know how to get an apropriate
> CmsDbContext for the method calls(which get added at SecurityManager)
> and how to implement the new Driver to CmsDriverManager, that the new
> Driver(implements the Driver interface) gets correctly initialized
I see, but I am afraid that I cannot help with that part. I don't know
if you can get connections from the opencms connection pool without
modifying the core. But there should probably be some service where you
can get configuration data and then use this to access the database
yourself. Sadly I cannot suggest anything in particular, because I did
not need this until now.

Of course - no matter how you get your database connection - you should
not interfere with tables that belong to opencms, because you cannot
know when and how they are being updated while your processes try to
accomplish something.


>
> Hope thats more clearly know
> An additional quastion would be, what is it good for making some major
> classes of an opensource project final?
>   and not provide public access to methods?
I think, some services are just too critical. They should not be called
without very special privileges and checks. Many internal functions of
any sophisticated system will expect a certain state in which they are
called. If somebody from outside can easily call them without that state
being present, then anything can happen.
I think it's good software design to hide some implementation details
and not make them available for direct calling. This is just a software
design issue, not an open sorce vs closed source issue.
> A possibilty would be to add classes to some opencms packages, but
> this would cause loads of props at updating opencms.

christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20061102/57c29f7b/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3269 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20061102/57c29f7b/attachment.bin>


More information about the opencms-dev mailing list