portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vitaly Baranovsky" <vitaly.baranovsk...@gmail.com>
Subject Re: preferences performance tuning
Date Wed, 26 Dec 2007 20:39:54 GMT
David, I can't test this schema file, because maven 1.0.2 gives me
Network is unreachable: connect. If you say me how can I solve this
problem I will check ms sql script for you.

Anyway, this schema will not work, because SQL can't create foreign
keys with ON DELETE CASCADE if foreign keys references to same table
(I've created such JIRA record:
http://issues.apache.org/jira/browse/JS2-838). So, you have to change
to onDelete="none" for FK_PREFS_NODE_1.


Output of maven build process:
j2:portal.conf.sql:
    [mkdir] Created dir:
D:\java\src\portals-jetspeed-2.1.3-dev\target\portal-sql
    [copy] Copying 1 file to
D:\java\src\portals-jetspeed-2.1.3-dev\target\portal-sql
    [copy] Copying C:\Documents and
Settings\BaranovskyV\.maven\cache\maven-jetspeed2-plugin-2.1.3-dev\plugin-resources\sql\drop.sql
to D:\java\src\portals-j
etspeed-2.1.3-dev\target\portal-sql\drop.sql
j2:_set.rdbms.props:

j2:_generate.sql:
    [echo] Using Torque schema located under: C:\Documents and
Settings\BaranovskyV/.maven/cache/maven-jetspeed2-plugin-2.1.3-dev/plugin-resources/schema
torque:init:

    [echo] Generating SQL schema creation scripts for mssql
    [mkdir] Created dir:
D:\java\src\portals-jetspeed-2.1.3-dev\target\portal-sql\mssql\schema
    [torque-sql] Using classpath
    [torque-sql] Generating to file
D:\java\src\portals-jetspeed-2.1.3-dev\target\portal-sql\mssql\schema\report.portal.sql.generation

BUILD FAILED
File...... C:\Documents and
Settings\BaranovskyV\.maven\cache\maven-jetspeed2-plugin-2.1.3-dev\plugin.jelly
Element... torque-sql
Line...... 824
Column.... 37
org.apache.torque.engine.EngineException: java.net.SocketException:
Network is unreachable: connect
Total time: 55 seconds
Finished at: Wed Dec 26 22:31:38 EET 2007





2007/12/19, David Sean Taylor <david@bluesunrise.com>:
>
> On Dec 10, 2007, at 9:35 AM, Ate Douma wrote:
>
> Here is the proposed prefs.xml schema:
> I am afraid this may break SQL Server. Can someone test who knows SQL
> Server?
>
> <?xml version="1.0"?>
> <!--
> Licensed to the Apache Software Foundation (ASF) under one or more
> contributor license agreements.  See the NOTICE file distributed with
> this work for additional information regarding copyright ownership.
> The ASF licenses this file to You under the Apache License, Version 2.0
> (the "License"); you may not use this file except in compliance with
> the License.  You may obtain a copy of the License at
>
>      http://www.apache.org/licenses/LICENSE-2.0
>
> Unless required by applicable law or agreed to in writing, software
> distributed under the License is distributed on an "AS IS" BASIS,
> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> See the License for the specific language governing permissions and
> limitations under the License.
> -->
> <!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/
> database_3_2.dtd">
> <!-- Autogenerated by JDBCToXMLSchema! -->
> <database name="j2">
>
>      <!--
>         pref_node
>      -->
>      <table name="PREFS_NODE">
>          <column name="NODE_ID" primaryKey="true" required="true"
> type="INTEGER"/>
>          <column name="PARENT_NODE_ID" type="INTEGER"/>
>          <column name="NODE_NAME" size="100" type="VARCHAR"/>
>          <column name="NODE_TYPE" type="SMALLINT"/>
>          <column name="FULL_PATH" size="254" type="VARCHAR"/>
>          <column name="CREATION_DATE" type="TIMESTAMP"/>
>          <column name="MODIFIED_DATE" type="TIMESTAMP"/>
>          <foreign-key foreignTable="PREFS_NODE"
> name="FK_PREFS_NODE_1" onDelete="cascade">
>              <reference foreign="NODE_ID" local="PARENT_NODE_ID"/>
>          </foreign-key>
>          <index name="IX_PREFS_NODE_1">
>              <index-column name="PARENT_NODE_ID"/>
>          </index>
>          <index name="IX_PREFS_NODE_2">
>              <index-column name="FULL_PATH"/>
>          </index>
>      </table>
>      <!--
>         prefs_property_value
>      -->
>      <table name="PREFS_PROPERTY_VALUE">
>          <column name="PROPERTY_VALUE_ID" primaryKey="true"
> required="true" type="INTEGER"/>
>          <column name="NODE_ID" type="INTEGER"/>
>          <column name="PROPERTY_NAME" size="100" type="VARCHAR"/>
>          <column name="PROPERTY_VALUE" size="254" type="VARCHAR"/>
>          <column name="CREATION_DATE" type="TIMESTAMP"/>
>          <column name="MODIFIED_DATE" type="TIMESTAMP"/>
>          <!-- Still an issue with OJB 1.0.3 when deleting M-N.
> Foreign Key Violation.
>               2007/12/13 - DST - I've been testing with this index
> enabled on Oracle, MySQL
>                and experiencing no issues. I think the index on
> should be the default case,
>                and inferior databases will have to turn it off as
> part of the integration process
>           -->
>          <foreign-key foreignTable="PREFS_NODE" onDelete="cascade">
>              <reference foreign="NODE_ID" local="NODE_ID" />
>          </foreign-key>
>          <index name="IX_FKPPV_1">
>              <index-column name="NODE_ID"/>
>          </index>
>      </table>
> </database>
>
>


-- 
With best regards,
Vitaly Baranovsky

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message