Rob Vermeulen wrote:
Sorry, my sentence implied too much. What I should have written was that
I don't like to have a class variable which is only used at startup and
in a method which does more then the name implies.
The readability of the code would already improve when the exists method
calls a new getAllTables method and a contains on the returned
Collection, but it does not solve the more fundamental issue.
This new cache object shows that we have to create a workaround, because
a class is responsible for something it shouldn't be responsible.
The MMObjectBuilder class checks if it exists in the database, but
actually MMBase should check with the database that the builder exists.
A builder does not have to know that it is stored in a database.

I agree, but Marcel provides a simple fix not a new architecture. :-p

The fix is in line with the performance step of the optimization project so no problems here. It only shows that we need a refactoring in this area.

It still will be a problem in startup time. The lookup is preformed at
connection initialisation time and not at query time. After
initialization the connection (TCP) has allocated the resources in the
network and does not have to do a lookup anymore. The default jdbc.xml
will create 20 connections and that can take a long time.

I misunderstood you with this one. In our case setting up the
connections is no problem. The problem starts with a lot of database
communication that MMBase seems to need to start up.

IOW we could get more performance when we eliminate more of these queries.

Are you referring to the basename in the mmbaseroot.xml? Then you are
still in trouble when you have 2 clouds with the same basename in the
same database. Fortunately, there are not many users in our community
who can afford a "decent" database which supports schemas. These
databases can solve the issues on their level so it is not very blocking :)

Fortunately we use different basenames. But we also use different
catalogs (database instances). MMBase should also work if we didn't
use different basenames. Marcel is looking into this more, and
hopefully he will provide a fix soon :-p

Looking forward to the commit

Nico
_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers

Reply via email to