portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Sean Taylor" <da...@bluesunrise.com>
Subject Re: dbpsml 2
Date Tue, 20 Nov 2001 17:59:30 GMT
(sending this a second time)

> Although this seems a little involved... Perhaps this is because the
> committed code imports profiles differently from Atuls original patch
> and thus avoid this issue.
Yes thats true, it does work differently. I didnt like Atul's original
solution for the import, which was to basically duplicate all the code
(lots) in the CastorPsmlManagerService in the DbInitializer.
So I removed the DBInitializer, and came up with 'PsmlImporter' - which
makes use of both the file-based service and the database-service without
hardly any new code.
This almost worked, except for the BaseProfile always used the static
accessor class PsmlManager, to save and get PSML documents.
The ImportProfile takes a 'provider' and 'consumer' service, and then knows
that it gets its PSML from the provider service, and writes to the consumer

> What is the bigger picture for this import routine - is it a "hack"
> until jetspeed handles starting from nothing in the db and building
> up the psml db from that?

No its not a hack. The default Jetspeed system is still distributed with
PSML on the file system.
If a user would like to switch over to the database impl, they have to have
some way to get their file-based PSML into the database.
My original thought was to write a command-line app, but that didn't go so
well since I couldn't find a good way to decouple our services from Turbine
and servlets in general.
Im told this will be easier in Turbine-3.
So Atul came up with the idea to import when the DBPSML Service first starts
The first thing it does is run a check to see if the import has been run
before. If it finds the 'admin' user, it will NOT import.
Actually Atul had a setting in the JRP where you could specify which user to
Or perhaps if we simply did a count(*) on the anonymous user

> Or is there a plan to keep the files/db in sync?
No - but Im working on an export from the database to the file system -
which will give you roundtrip.
To export elsewhere on the file system, set your JRP entry:
services.PsmlManager.root=<somewhere else on your file system>


To unsubscribe, e-mail:   <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>

View raw message