Michiel Meeuwissen wrote:

Nico Klasens wrote:
- it took me quite some time to get it working. The installation notes
are in the other download.
I tried to get it working on hsql/jdbc.xml but did not succeed, but
perhaps the problem was in something I later solved.


The cmsc uses a datasource configured in tomcat. This datasource is installed the first time the war is deplayed in tomcat. The war contains a file META-INF/context.xml which is copied the first time to $TOMCAT_HOME/conf/Catalina/localhost/cmc-webapp.xml The default is currently for mysql with cmsc as db/user/password. tomcat also requires the libs for the conection pool in commn/lib

I understood how it should work, but it didn't because I didn't
immediately realise that I had to put stuff in common/lib. Happily I had
an old tomcat installation lying around which had them. It would be a
bit annoying to have to find them first. Pointers to where you can
download them would have been welcome :-)
I made a start with a maven project which should generate a zip which constains the files to patch tomcat. Didn't finish that.

Logging is one of the things I want to move out of the war. The location and requirements of logging are always different on every system and environment. Developers like it on stdout and sysadmins in a daily rolling file in thier logs dir.

We use the trick to specify the log-dir as : <!ENTITY logdir "${catalina.base}/logs/" >
No complete solution, and tomcat-only, but at least in our situtation it
helps a bit to make the same web-apps work in different tomcat
instances.
That is a solution, but not what I have in mind. For instance, log files on linux/unix are usually stored in /var/log/. Good hosters have maintenance tasks running on that part of the filesystem. What should be logged is also different per environment. In development you want to know a lot, but not in production.

- If something goes wrong during start up, it remains in an eternal loop
which is supposedly 'waiting for mmbase' (according to a
thread-dump). On the front-end no 503 are reported, during this
waiting, but requests are simply stalled.  Also e..g the
tomcat-manager is unreacheable during this (eternal) time.


This is also a point which should be addressed, but there is not a nice solution present which can be used easily.

There are some classes like MMBaseStarter en MMBaseStartThread which are
used by the MMBase servlets themselves. I don't know if they are useable
in this case, but they might...

I have to wait until the mmadmin module is ready. I don't want to start mmbase. Leaving it like this will remind me that I have to fix this nicely in time. A poor fix will very likely not be replaced by a good one.

- After a restart I needed to login again. I think that is not necessary
any more, because the cloud object in the session is serializable.


The tomcat context file defines a PersistentManager which turns of the session save feature. No good reason for doing it other than that the server starts in a clean state.

Ah, that's the reason. I only later realized that that line in the
Context-XML may have been the cause :-)

No, the issue is that it should not set the locale in the CloudTag to the mmbase locale when nothing is found in surrounding tags. It should leave the locale untouched. Okay, I know now how to refactor it nicely. I have to extract another method which only checks that the locale is set by something in the current request. The getLocale method will then call getDefaultLocale when the locale is not found by the new method. CloudTag.checkLocale will then only call the new method.

Calling ContextReferrers is necessary to find the closest tag which can provide a locale. A CloudReferrer can then return the locale from the cloud. In this way you could use the cloud to keep track of which language the user has selected. It is just one of my attempt to figure out how to do localization with mmbase.

I think i'm going to make a few demo-jsps for this in
mmexamples/taglib or so, which will at least define the behaviour. I may
ask you to review those then.
That okay.

Nico

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

Reply via email to