Marina wrote:
Hi!

 I'm trying to find an easy way to add new
users/roles/groups to J2 permanently (using HSQL DB
for now). By that I mean that I want to persist newly
created objects in the DB between upgrades of J2.

Currently, when you update and rebuild J2 from CVs,
for example, you have to run the 'maven quickStart'
goal, otherwise none of the web applications
(/jetspeed, etc.) get deployed into the Tomcat.
Unfortunately, this goal also wipes out your DB clean
and you have to re-create all your custom
users/groups/roles...

After going through this (painful, if you have many
users) exercise a few times, I decided to write my own
version of the populate-default-db.sql - kind of
script.

Ive been using the target maven nodbMinDeploy from /portal to deploy the basic Jetspeed portal and security portlet app without demo apps. Note that this goal does not populate the database.
After running nodbMinDeploy, I run my own database scripts to populate the database, run maven goals to customize J2 to my components, and then deploy my portlet app(s).


I think I attached those scripts to another email on this list a few days ago. Thus I have a complete custom script for DDL and default data.



The problem is that I'm not sure what are dependences between all tables and it was not that easy to find what tables changed after you add, say, a new user since you don't really know which tables you should be monitoring.

Because of that, I have a few questions:

1. could somebody complete my list of tables that have
to be modified when use create custom users and roles
and want to tie them together?
  So far I have:

to create a new role:
PREFS_NODE SECURITY_PRINCIPAL


to create a new user and assign the new role to it:
SECURITY_PRINCIPAL PRINCIPAL_ROLE_ASSOC
SECURITY_USER_ROLE
SECURITY_USER_GROUP


  This actually does not work - I guess I missed a few
tables...

Yes its not enough, see the email or I can post them again.


2. Is there a way to save a 'snapshot' of a working DB with all new objects and use that in a new J2 installation?

Sure, thats dependent on your database.
For HSQL, simply save the script

3. if all else fails, where is the actual data for the
HSQL DB stored? Maybe I could use some kind of 'diff'
on it after I add a new user ...

:-)
After seeing the file you will probably never use HSQL again.
I never use HSQL, not even for development.
Last time I checked it went here:

src/database/hsql/Test.script
src/database/hsql/Production.script


Thank you!
Marina



__________________________________ Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
David Sean Taylor
Bluesunrise Software
[EMAIL PROTECTED]
[office] +01 707 773-4646
[mobile] +01 707 529 9194

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to