Thus wrapping the data you wish to import inside taglib code in some JSP-files.

This is an easy way to import small sets of data, however if you try to import larger datasets you surely will hit on the maximum-size-for-method in java. You can of course work around this by using multiple JSPs to do the import, but that will make it harder to create relations between objects.

Yes, I've tried this once before, and it failed horribly :).

When importing data from another database or filesource, you might consider writing your own custom JSP file that just connects to the datasource, and calls the MMBase API to create objects and relations. I have done this several times, and it is usually a good idea if some business logic is involved.

On the other hand, for simple one-time imports the XMLImport should just do his thing.

I would advise against writing directly into the MMBase database, unless you know exactly what you are doing. Usually you have to update several tables (when using inheritance for instance) and it's far more convenient to trust the MMBase API to take care of that.

Johannes



Reply via email to