Re: M1 Security Schema MSSQL Constraints

2004-12-17 Thread Randy Watler
I believe that changes to security-schema.xml on 12/3 just before the M1 
release that included adding "on delete cascade" to these foreign keys 
is what broke the MSSQL configuration for me. While I believe these 
constraints are appropriate schema wise, I am afraid they are hitting a 
MS SQL Server 2000 limitation. Fixing this probably involves customizing 
Torque... something Ate is pondering replacing... not sure it is worth 
the trouble.

If we want to keep the cascading deletes, a Simpler fix might involve 
splitting the usage of the SECURITY_PRINCIPAL into its separate usages, 
(i.e. USER_PRINCIPAL, ROLE_PRINCIPAL, GROUP_PRINCIPAL, and 
REMOTE_PRINCIPAL). This way, the cascading delete will not attempt to 
visit the same table twice. Will this change cause problems in the admin 
portlets?

Any thoughts on preserving the SECURITY_PRINCIPAL heterogeneous mapping 
vs. cascading deletes? Does anyone want to even consider extending Torque?

Randy
Randy Watler wrote:
Guys,
Apparently, multiple foreign keys to a single related table with an ON 
DELETE CASCADE constraint is not supported in MS SQL Server by design. 
It requires use of yet another trigger to implement. Unfortunately, 
this is not the first time I have been told to use a trigger for basic 
constraints, (such as ON DELETE SET NULL),  in MS SQL Server, >:-(.

I am no SQL Server expert, so does anyone else care to attempt this 
before I do?

Randy
rwatler wrote:
David/Ate/Scott,
While executing the M1 scripts for DB configuration of MS SQL Server 
2K, I ended up with these errors:

db.execute:
[echo] Executing scripts for ./sql/DDL/mssql/security-schema.sql
 [sql] Executing file: 
/usr/share/tomcat5/jetspeed-database/scripts/sql/DDL/mssql/security-schema.sql 

 [sql] Failed to execute:   BEGIN ALTER TABLE 
SSO_PRINCIPAL_TO_REMOTE ADD CONSTRAINT SSO_PRINCIPAL_TO_REMOTE_FK_2 
FOREIGN KEY (REMOTE_PRINCIPAL_ID) REFERENCES SECURITY_PRINCIPAL 
(PRINCIPAL_ID) ON DELETE CASCADE END

BUILD FAILED
/usr/share/tomcat5/jetspeed-database/scripts/build.xml:64: The 
following error occurred while executing this line:
/usr/share/tomcat5/jetspeed-database/scripts/build.xml:38: 
java.sql.SQLException: Introducing FOREIGN KEY constraint 
'SSO_PRINCIPAL_TO_REMOTE_FK_2' on table 'SSO_PRINCIPAL_TO_REMOTE' may 
cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION 
or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints.

...

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


JNDI Context Problem

2004-12-17 Thread jean-charles . jabouille
Hi,

I try to deploy jetspeed2 under JOnas which use Carol. The problem is that


[org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl] ERROR:
Naming Exception while looking up DataSource (java:comp/env/jdbc/jetspeed)
ContextWrapper.ContextWrapper() failed: java.util.NoSuchElementException
javax.naming.NamingException: ContextWrapper.ContextWrapper() failed:
java.util.NoSuchElementException
at
org.objectweb.carol.jndi.spi.ContextWrapper.(ContextWrapper.java:103)
at
org.objectweb.carol.jndi.spi.MultiOrbInitialContextFactory.getInitialContext(MultiOrbInitialContextFactory.java:59)
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.(InitialContext.java:175)
at
org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.newConnectionFromDataSource(Unknown
 Source)
at
org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.lookupConnection(Unknown
 Source)


The datasource that I declared in Jonas is not found. I debugged Carol and
see the environnement for the JNDI CONTEXT when jetspeed is deploying:

{java.naming.provider.url=,
java.naming.factory.initial=org.objectweb.carol.jndi.spi.MultiOrbInitialContextFactory,
 java.naming.factory.url.pkgs=org.objectweb.jonas.naming:tyrex.naming}

-I don't understand why
"java.naming.factory.url.pkgs=org.objectweb.jonas.naming:tyrex.naming". I
fixed the jndiinternalcontext to false. So why Tyrex is use for the naming
factory ?

-The second thing is that the "java.naming.provider.url" should be like
"rmi://localhost:1099". So why is it empty?

-Where is defined the build of the jndi context when when want to use the
jndi connector of the application server(jonas) ?


If you want more precisions, don't hesitate...

thanks for your answers


Jabouille Jean Charles



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



Sharing Preferences

2004-12-17 Thread Grinshtein, Artem
Hi,

Congratulations on the M1 release!

I've some questions about sharing preference attibutes:
 - Does M1 support the sharing of preferences?
 - What preference scopes are/will be possible (per user, per application, per 
group/role)?
 - How does it work?
 - How can I use it?

Thanks 
Artem


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