AW: [opencms-dev] DB2

Simon Wilks simon.wilks at silion.ch
Tue Jan 30 13:36:32 CET 2001


Hi Andreas,

Thanks for your very informative email!

The situation at the moment is that OpenCms with DB2 is (very basically) up
and running. There are still some SQL and DB2 problems though.

One thing that doesn't work with DB2 is a prepared statement of the form:

	SELECT ?, field2, field3 FROM....

This used only once in OpenCms and is definded in CmsQueries in
C_TASK_TYPE_COPY. I will have to do this another way now...if you have any
preferences let me know.

I am now going to strip back the new com.opencms.file.db2Sql package to the
minimum as I have based it on the mySql package and a lot of this code may
not be necessary over the generic package.

Other than that I having some trouble with massive memory usage, speed and
instability problems on the DB2 side...but that's my problem ;o)

That's it for now.

Regards,

Simon.

software engineer
simon.wilks at silion.ch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
silion (switzerland) ag    software engineering
spinnereistrasse 8              9008 st. gallen
tel 0878 80 90 60             fax 0878 80 90 30
info at silion.ch                    www.silion.ch

a member of the Penta Group   www.pentagroup.ch




> -----Ursprüngliche Nachricht-----
> Von: owner-opencms-dev at www.opencms.com
> [mailto:owner-opencms-dev at www.opencms.com]Im Auftrag von Andreas
> Schouten
> Gesendet: Montag, 29. Januar 2001 09:35
> An: 'opencms-dev at www.opencms.com'
> Betreff: AW: [opencms-dev] DB2
>
>
> Hi Simon,
>
> yes - please ask questions in this mailing list. I am looking forward to
> your resource broker for DB2. If there is a high amount of source-code we
> should review and check in - please send it directly to one of us
> developers.
>
> Before you start you should have a look into the com.opencms.genericSql -
> package. Start with CmsResourceBroker, CmsDbAccess and CmsQueries.
>
> Currently I refactor this package, so the Classes I_CmsDbPool,
> CmsDbPool and
> CmsConnectionGuard will be deleted or deprecated very soon. Maybe you can
> wait until I have made the changes (I hope I can check in a first version
> within this or the next day). Things will become easier with the new
> invented db-Pool (the current Pool is not generic and not nice to use).
> There will be a new Class to generate unique Id's - so ignore the nextId()
> method in the CmsDbAccess.
>
> Now some general words how things work:
> All requests for Resources will start at the CmsObject. This
> CmsObject adds
> informations about the current user and the current project. With this
> additional information the CmsObject asks the resource broker
> (That one you
> have set up in your opencms.properties). The resource broker now
> checks, if
> the user has access to the requested resource (Otherwise a
> CmsException "no
> access" will be thrown). If access is granted the rb asks the CmsDbAccess
> for the resource. The CmsDbAccess uses the CmsQueries to ask the database.
>
> How to create a new package for another db:
> Create a new subpacke in com.opencms.file. Create three Classes
> (CmsResourceBroker, CmsDbAccess and CmsQueries). Extend these classes from
> the classes in the genericSql package. I think you don't have to override
> very few methods in the CmsResourceBroker, because things should
> be general
> in here. You have to add CmsQueries, if some queries don't work with your
> database. You have to override the corresponding methods in the class
> CmsDbAccess, to use the special added Queries for your database.
>
> One hint: First you should try "your" database with the generic resource
> broker and the JDBS-driver for the database (You can set all
> these things up
> in the opencms.properties).
>
> If you have the feeling something in the gerneicSql-package is not generic
> enough - please discuss this topic with us in this mailing list. Maybe we
> can get access to DB2 and oracle and other db's without creating a new
> package.
>
> I hope I haven't forgot any topic :-)
>
> Regards,
>
> Andreas Schouten
>
>
> -----Ursprüngliche Nachricht-----
> Von: Simon Wilks [mailto:sjwilks at hotmail.com]
> Gesendet: Freitag, 26. Januar 2001 22:39
> An: opencms-dev at opencms.com
> Betreff: [opencms-dev] DB2
>
>
> Hi all,
>
> I have just begun work on resource broker for IBM's DB2 database server.
>
> God help me.
>
> If anyone else out there has already looked at this I would love
> to know as
> I hate reinventing stuff. Also if anyone has experience with DB2
> and JDBC I
> would appreciate an email in case I need come up against some big
> problems
> and need to ask a few questions.
>
> OpenCms developers: Can I post questions regarding OpenCms code here or
> should this be done another way? Is there any other documentation around,
> such as UML, etc. that might help me along?
>
> Thanks,
>
> Simon Wilks
> software engineer
> simon.wilks at silion.ch
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> silion (switzerland) ag    software engineering
> spinnereistrasse 8              9008 st. gallen
> tel 0878 80 90 60             fax 0878 80 90 30
> info at silion.ch                    www.silion.ch
>
> a member of the Penta Group   www.pentagroup.ch
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




More information about the opencms-dev mailing list