[jboss-svn-commits] JBL Code SVN: r32889 - in labs/jbossesb/branches/JBESB_4_7_CP/product: install and 9 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri May 14 08:28:11 EDT 2010


Author: kevin.conner at jboss.com
Date: 2010-05-14 08:28:10 -0400 (Fri, 14 May 2010)
New Revision: 32889

Added:
   labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/
   labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/db2/
   labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/db2/import.sql
   labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/derby/
   labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/derby/import.sql
   labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/hsqldb/
   labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/hsqldb/import.sql
   labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/mysql/
   labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/mysql/import.sql
   labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/oracle9/
   labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/oracle9/import.sql
   labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/postgres/
   labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/postgres/import.sql
   labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/sqlserver/
   labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/sqlserver/import.sql
Modified:
   labs/jbossesb/branches/JBESB_4_7_CP/product/build-distr.xml
   labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-ds.xml
   labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/persistence.xml
   labs/jbossesb/branches/JBESB_4_7_CP/product/install/registry-jboss-service-jbossas5.xml
   labs/jbossesb/branches/JBESB_4_7_CP/product/install/registry-jboss-service.xml
Log:
Support initialisation of jUDDI DB through scripts: JBESB-3319

Modified: labs/jbossesb/branches/JBESB_4_7_CP/product/build-distr.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/build-distr.xml	2010-05-14 12:17:52 UTC (rev 32888)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/build-distr.xml	2010-05-14 12:28:10 UTC (rev 32889)
@@ -127,6 +127,7 @@
             <fileset dir="${installation.files.dir}/jUDDI-registryV3">
                 <include name="juddi-ds.xml"/>
                 <include name="esb.juddi.xml"/>
+                <include name="juddi-sql/**"/>
             </fileset>
             <!-- temporary until 3.0.1 release pushed out through maven -->
 	    <fileset dir="${lib.ext.dir}" includes="juddi-core-*.jar"/>

Modified: labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-ds.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-ds.xml	2010-05-14 12:17:52 UTC (rev 32888)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-ds.xml	2010-05-14 12:28:10 UTC (rev 32889)
@@ -18,5 +18,13 @@
         <attribute name="Database">juddiDB</attribute>
         <attribute name="InProcessMode">true</attribute>
    </mbean>
-   
+   <mbean code="org.jboss.internal.soa.esb.dependencies.DatabaseInitializer"
+      name="jboss.esb:service=JUDDIDatabaseInitializer">
+      <attribute name="Datasource">java:/juddiDB</attribute>
+      <attribute name="ExistsSql">select count(*) from  j3_publisher</attribute>
+      <attribute name="SqlFiles">
+         juddi-sql/hsqldb/import.sql
+      </attribute>
+      <depends>jboss.jca:service=DataSourceBinding,name=juddiDB</depends>
+   </mbean>
 </datasources>

Added: labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/db2/import.sql
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/db2/import.sql	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/db2/import.sql	2010-05-14 12:28:10 UTC (rev 32889)
@@ -0,0 +1,629 @@
+
+    create table j3_address (
+        id bigint generated by default as identity,
+        sort_code varchar(10),
+        tmodel_key varchar(255),
+        use_type varchar(255),
+        address_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_address_line (
+        id bigint generated by default as identity,
+        key_name varchar(255),
+        key_value varchar(255),
+        line varchar(80) not null,
+        address_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_auth_token (
+        auth_token varchar(51) not null,
+        authorized_name varchar(255) not null,
+        created timestamp not null,
+        last_used timestamp not null,
+        number_of_uses integer not null,
+        token_state integer not null,
+        primary key (auth_token)
+    );
+
+    create table j3_binding_category_bag (
+        id bigint not null,
+        entity_key varchar(255) not null,
+        primary key (id),
+        unique (entity_key)
+    );
+
+    create table j3_binding_descr (
+        id bigint generated by default as identity,
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_binding_template (
+        access_point_type varchar(255),
+        access_point_url varchar(4000),
+        hosting_redirector varchar(255),
+        entity_key varchar(255) not null,
+        service_key varchar(255) not null,
+        primary key (entity_key)
+    );
+
+    create table j3_business_category_bag (
+        id bigint not null,
+        entity_key varchar(255) not null,
+        primary key (id),
+        unique (entity_key)
+    );
+
+    create table j3_business_descr (
+        id bigint generated by default as identity,
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_business_entity (
+        entity_key varchar(255) not null,
+        primary key (entity_key)
+    );
+
+    create table j3_business_identifier (
+        id bigint generated by default as identity,
+        key_name varchar(255),
+        key_value varchar(255) not null,
+        tmodel_key_ref varchar(255),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_business_name (
+        id bigint generated by default as identity,
+        lang_code varchar(5),
+        name varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_business_service (
+        entity_key varchar(255) not null,
+        business_key varchar(255) not null,
+        primary key (entity_key)
+    );
+
+    create table j3_category_bag (
+        id bigint generated by default as identity,
+        primary key (id)
+    );
+
+    create table j3_clerk (
+        clerk_name varchar(255) not null,
+        cred varchar(255),
+        publisher_id varchar(255) not null,
+        node_name varchar(255),
+        primary key (clerk_name)
+    );
+
+    create table j3_client_subscriptioninfo (
+        subscription_key varchar(255) not null,
+        last_notified timestamp,
+        fromClerk_clerk_name varchar(255),
+        toClerk_clerk_name varchar(255),
+        primary key (subscription_key)
+    );
+
+    create table j3_contact (
+        id bigint generated by default as identity,
+        use_type varchar(255),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_contact_descr (
+        id bigint generated by default as identity,
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        contact_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_discovery_url (
+        id bigint generated by default as identity,
+        url varchar(255) not null,
+        use_type varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_email (
+        id bigint generated by default as identity,
+        email_address varchar(255) not null,
+        use_type varchar(255),
+        contact_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_instance_details_descr (
+        id bigint generated by default as identity,
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        tmodel_instance_info_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_instance_details_doc_descr (
+        id bigint generated by default as identity,
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        tmodel_instance_info_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_keyed_reference (
+        id bigint generated by default as identity,
+        key_name varchar(255),
+        key_value varchar(255) not null,
+        tmodel_key_ref varchar(255),
+        category_bag_id bigint,
+        keyed_reference_group_id bigint,
+        primary key (id)
+    );
+
+    create table j3_keyed_reference_group (
+        id bigint generated by default as identity,
+        tmodel_key varchar(255),
+        category_bag_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_node (
+        name varchar(255) not null,
+        custody_transfer_url varchar(255) not null,
+        factory_initial varchar(255),
+        factory_naming_provider varchar(255),
+        factory_url_pkgs varchar(255),
+        inquiry_url varchar(255) not null,
+        juddi_api_url varchar(255),
+        manager_name varchar(255) not null,
+        proxy_transport varchar(255) not null,
+        publish_url varchar(255) not null,
+        security_url varchar(255) not null,
+        subscription_url varchar(255) not null,
+        primary key (name)
+    );
+
+    create table j3_overview_doc (
+        id bigint generated by default as identity,
+        overview_url varchar(255) not null,
+        overview_url_use_type varchar(255),
+        entity_key varchar(255),
+        tomodel_instance_info_id bigint,
+        primary key (id)
+    );
+
+    create table j3_overview_doc_descr (
+        id bigint generated by default as identity,
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        overview_doc_id bigint,
+        primary key (id)
+    );
+
+    create table j3_person_name (
+        id bigint generated by default as identity,
+        lang_code varchar(5),
+        name varchar(255) not null,
+        contact_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_phone (
+        id bigint generated by default as identity,
+        phone_number varchar(50) not null,
+        use_type varchar(255),
+        contact_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_publisher (
+        authorized_name varchar(255) not null,
+        email_address varchar(255),
+        is_admin varchar(5),
+        is_enabled varchar(5),
+        max_bindings_per_service integer,
+        max_businesses integer,
+        max_services_per_business integer,
+        max_tmodels integer,
+        publisher_name varchar(255) not null,
+        primary key (authorized_name)
+    );
+
+    create table j3_publisher_assertion (
+        from_key varchar(255) not null,
+        to_key varchar(255) not null,
+        from_check varchar(5) not null,
+        key_name varchar(255) not null,
+        key_value varchar(255) not null,
+        tmodel_key varchar(255) not null,
+        to_check varchar(5) not null,
+        primary key (from_key, to_key)
+    );
+
+    create table j3_service_category_bag (
+        id bigint not null,
+        entity_key varchar(255) not null,
+        primary key (id),
+        unique (entity_key)
+    );
+
+    create table j3_service_descr (
+        id bigint generated by default as identity,
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_service_name (
+        id bigint generated by default as identity,
+        lang_code varchar(5),
+        name varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_service_projection (
+        business_key varchar(255) not null,
+        service_key varchar(255) not null,
+        primary key (business_key, service_key)
+    );
+
+    create table j3_subscription (
+        subscription_key varchar(255) not null,
+        authorized_name varchar(255) not null,
+        binding_key varchar(255),
+        brief smallint,
+        create_date timestamp not null,
+        expires_after timestamp,
+        last_notified timestamp,
+        max_entities integer,
+        notification_interval varchar(255),
+        subscription_filter clob(65636) not null,
+        primary key (subscription_key)
+    );
+
+    create table j3_subscription_chunk_token (
+        chunk_token varchar(255) not null,
+        data integer not null,
+        end_point timestamp,
+        expires_after timestamp not null,
+        start_point timestamp,
+        subscription_key varchar(255) not null,
+        primary key (chunk_token)
+    );
+
+    create table j3_subscription_match (
+        id bigint generated by default as identity,
+        entity_key varchar(255) not null,
+        subscription_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_tmodel (
+        deleted smallint,
+        lang_code varchar(5),
+        name varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (entity_key)
+    );
+
+    create table j3_tmodel_category_bag (
+        id bigint not null,
+        entity_key varchar(255) not null,
+        primary key (id),
+        unique (entity_key)
+    );
+
+    create table j3_tmodel_descr (
+        id bigint generated by default as identity,
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_tmodel_identifier (
+        id bigint generated by default as identity,
+        key_name varchar(255),
+        key_value varchar(255) not null,
+        tmodel_key_ref varchar(255),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_tmodel_instance_info (
+        id bigint generated by default as identity,
+        instance_parms varchar(512),
+        tmodel_key varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_tmodel_instance_info_descr (
+        id bigint generated by default as identity,
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        tmodel_instance_info_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_transfer_token (
+        transfer_token varchar(51) not null,
+        expiration_date timestamp not null,
+        primary key (transfer_token)
+    );
+
+    create table j3_transfer_token_keys (
+        id bigint generated by default as identity,
+        entity_key varchar(255),
+        transfer_token varchar(51) not null,
+        primary key (id)
+    );
+
+    create table j3_uddi_entity (
+        entity_key varchar(255) not null,
+        authorized_name varchar(255) not null,
+        created timestamp,
+        modified timestamp not null,
+        modified_including_children timestamp,
+        node_id varchar(255),
+        primary key (entity_key)
+    );
+
+    alter table j3_address 
+        add constraint FKF83236BE75D860FB 
+        foreign key (address_id) 
+        references j3_contact;
+
+    alter table j3_address_line 
+        add constraint FKC665B8D5F8B8D8CF 
+        foreign key (address_id) 
+        references j3_address;
+
+    alter table j3_binding_category_bag 
+        add constraint FKCF34B2376A68D45A 
+        foreign key (id) 
+        references j3_category_bag;
+
+    alter table j3_binding_category_bag 
+        add constraint FKCF34B237CFBD88B7 
+        foreign key (entity_key) 
+        references j3_binding_template;
+
+    alter table j3_binding_descr 
+        add constraint FK5EA60911CFBD88B7 
+        foreign key (entity_key) 
+        references j3_binding_template;
+
+    alter table j3_binding_template 
+        add constraint FKD044BD6A2E448F3F 
+        foreign key (service_key) 
+        references j3_business_service;
+
+    alter table j3_binding_template 
+        add constraint FKD044BD6AD1823CA5 
+        foreign key (entity_key) 
+        references j3_uddi_entity;
+
+    alter table j3_business_category_bag 
+        add constraint FKD6D3ECB06A68D45A 
+        foreign key (id) 
+        references j3_category_bag;
+
+    alter table j3_business_category_bag 
+        add constraint FKD6D3ECB0BEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_business_descr 
+        add constraint FK3A24B4B8BEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_business_entity 
+        add constraint FKCA61A0CD1823CA5 
+        foreign key (entity_key) 
+        references j3_uddi_entity;
+
+    alter table j3_business_identifier 
+        add constraint FKB0C7A652BEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_business_name 
+        add constraint FK43F526F4BEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_business_service 
+        add constraint FK5D4255ACD1823CA5 
+        foreign key (entity_key) 
+        references j3_uddi_entity;
+
+    alter table j3_business_service 
+        add constraint FK5D4255ACEF04CFEE 
+        foreign key (business_key) 
+        references j3_business_entity;
+
+    alter table j3_clerk 
+        add constraint FK34DC7D9F6BB0F935 
+        foreign key (node_name) 
+        references j3_node;
+
+    alter table j3_client_subscriptioninfo 
+        add constraint FKDF04CC095BFC6733 
+        foreign key (fromClerk_clerk_name) 
+        references j3_clerk;
+
+    alter table j3_client_subscriptioninfo 
+        add constraint FKDF04CC09F3CE9C04 
+        foreign key (toClerk_clerk_name) 
+        references j3_clerk;
+
+    alter table j3_contact 
+        add constraint FK7551BEEABEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_contact_descr 
+        add constraint FK56CA9E6C2E3FD94F 
+        foreign key (contact_id) 
+        references j3_contact;
+
+    alter table j3_discovery_url 
+        add constraint FKA042FDAABEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_email 
+        add constraint FK34F910E62E3FD94F 
+        foreign key (contact_id) 
+        references j3_contact;
+
+    alter table j3_instance_details_descr 
+        add constraint FK3CC165902B115C6F 
+        foreign key (tmodel_instance_info_id) 
+        references j3_tmodel_instance_info;
+
+    alter table j3_instance_details_doc_descr 
+        add constraint FK447324492B115C6F 
+        foreign key (tmodel_instance_info_id) 
+        references j3_tmodel_instance_info;
+
+    alter table j3_keyed_reference 
+        add constraint FK350C8454E075C8D7 
+        foreign key (keyed_reference_group_id) 
+        references j3_keyed_reference_group;
+
+    alter table j3_keyed_reference 
+        add constraint FK350C84541DB72652 
+        foreign key (category_bag_id) 
+        references j3_category_bag;
+
+    alter table j3_keyed_reference_group 
+        add constraint FKF6224ED41DB72652 
+        foreign key (category_bag_id) 
+        references j3_category_bag;
+
+    alter table j3_overview_doc 
+        add constraint FK5CD8D0E8C5BF8903 
+        foreign key (entity_key) 
+        references j3_tmodel;
+
+    alter table j3_overview_doc 
+        add constraint FK5CD8D0E8E8CE1B36 
+        foreign key (tomodel_instance_info_id) 
+        references j3_tmodel_instance_info;
+
+    alter table j3_overview_doc_descr 
+        add constraint FK36FB9EA9BDC711C 
+        foreign key (overview_doc_id) 
+        references j3_overview_doc;
+
+    alter table j3_person_name 
+        add constraint FKCB7B8AFF2E3FD94F 
+        foreign key (contact_id) 
+        references j3_contact;
+
+    alter table j3_phone 
+        add constraint FK359202B82E3FD94F 
+        foreign key (contact_id) 
+        references j3_contact;
+
+    alter table j3_publisher_assertion 
+        add constraint FK8A102449E3544929 
+        foreign key (to_key) 
+        references j3_business_entity;
+
+    alter table j3_publisher_assertion 
+        add constraint FK8A102449CCEE22D8 
+        foreign key (from_key) 
+        references j3_business_entity;
+
+    alter table j3_service_category_bag 
+        add constraint FK185A68076A68D45A 
+        foreign key (id) 
+        references j3_category_bag;
+
+    alter table j3_service_category_bag 
+        add constraint FK185A680748D0656D 
+        foreign key (entity_key) 
+        references j3_business_service;
+
+    alter table j3_service_descr 
+        add constraint FKB6D63D4148D0656D 
+        foreign key (entity_key) 
+        references j3_business_service;
+
+    alter table j3_service_name 
+        add constraint FKCC1BE94B48D0656D 
+        foreign key (entity_key) 
+        references j3_business_service;
+
+    alter table j3_service_projection 
+        add constraint FK629F290F2E448F3F 
+        foreign key (service_key) 
+        references j3_business_service;
+
+    alter table j3_service_projection 
+        add constraint FK629F290FEF04CFEE 
+        foreign key (business_key) 
+        references j3_business_entity;
+
+    alter table j3_subscription_match 
+        add constraint FK5B9C2F19BEEE42E5 
+        foreign key (subscription_key) 
+        references j3_subscription;
+
+    alter table j3_tmodel 
+        add constraint FK83C8072BD1823CA5 
+        foreign key (entity_key) 
+        references j3_uddi_entity;
+
+    alter table j3_tmodel_category_bag 
+        add constraint FK7E0859DB6A68D45A 
+        foreign key (id) 
+        references j3_category_bag;
+
+    alter table j3_tmodel_category_bag 
+        add constraint FK7E0859DBC5BF8903 
+        foreign key (entity_key) 
+        references j3_tmodel;
+
+    alter table j3_tmodel_descr 
+        add constraint FK63DFF1EDC5BF8903 
+        foreign key (entity_key) 
+        references j3_tmodel;
+
+    alter table j3_tmodel_identifier 
+        add constraint FKD5FB623DC5BF8903 
+        foreign key (entity_key) 
+        references j3_tmodel;
+
+    alter table j3_tmodel_instance_info 
+        add constraint FKDC6C9004CFBD88B7 
+        foreign key (entity_key) 
+        references j3_binding_template;
+
+    alter table j3_tmodel_instance_info_descr 
+        add constraint FKD826B4062B115C6F 
+        foreign key (tmodel_instance_info_id) 
+        references j3_tmodel_instance_info;
+
+    alter table j3_transfer_token_keys 
+        add constraint FK8BBF49185ED9DD48 
+        foreign key (transfer_token) 
+        references j3_transfer_token;

Added: labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/derby/import.sql
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/derby/import.sql	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/derby/import.sql	2010-05-14 12:28:10 UTC (rev 32889)
@@ -0,0 +1,635 @@
+
+    create table j3_address (
+        id bigint not null,
+        sort_code varchar(10),
+        tmodel_key varchar(255),
+        use_type varchar(255),
+        address_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_address_line (
+        id bigint not null,
+        key_name varchar(255),
+        key_value varchar(255),
+        line varchar(80) not null,
+        address_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_auth_token (
+        auth_token varchar(51) not null,
+        authorized_name varchar(255) not null,
+        created timestamp not null,
+        last_used timestamp not null,
+        number_of_uses integer not null,
+        token_state integer not null,
+        primary key (auth_token)
+    );
+
+    create table j3_binding_category_bag (
+        id bigint not null,
+        entity_key varchar(255) not null,
+        primary key (id),
+        unique (entity_key)
+    );
+
+    create table j3_binding_descr (
+        id bigint not null,
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_binding_template (
+        access_point_type varchar(255),
+        access_point_url varchar(4000),
+        hosting_redirector varchar(255),
+        entity_key varchar(255) not null,
+        service_key varchar(255) not null,
+        primary key (entity_key)
+    );
+
+    create table j3_business_category_bag (
+        id bigint not null,
+        entity_key varchar(255) not null,
+        primary key (id),
+        unique (entity_key)
+    );
+
+    create table j3_business_descr (
+        id bigint not null,
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_business_entity (
+        entity_key varchar(255) not null,
+        primary key (entity_key)
+    );
+
+    create table j3_business_identifier (
+        id bigint not null,
+        key_name varchar(255),
+        key_value varchar(255) not null,
+        tmodel_key_ref varchar(255),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_business_name (
+        id bigint not null,
+        lang_code varchar(5),
+        name varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_business_service (
+        entity_key varchar(255) not null,
+        business_key varchar(255) not null,
+        primary key (entity_key)
+    );
+
+    create table j3_category_bag (
+        id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_clerk (
+        clerk_name varchar(255) not null,
+        cred varchar(255),
+        publisher_id varchar(255) not null,
+        node_name varchar(255),
+        primary key (clerk_name)
+    );
+
+    create table j3_client_subscriptioninfo (
+        subscription_key varchar(255) not null,
+        last_notified timestamp,
+        fromClerk_clerk_name varchar(255),
+        toClerk_clerk_name varchar(255),
+        primary key (subscription_key)
+    );
+
+    create table j3_contact (
+        id bigint not null,
+        use_type varchar(255),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_contact_descr (
+        id bigint not null,
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        contact_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_discovery_url (
+        id bigint not null,
+        url varchar(255) not null,
+        use_type varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_email (
+        id bigint not null,
+        email_address varchar(255) not null,
+        use_type varchar(255),
+        contact_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_instance_details_descr (
+        id bigint not null,
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        tmodel_instance_info_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_instance_details_doc_descr (
+        id bigint not null,
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        tmodel_instance_info_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_keyed_reference (
+        id bigint not null,
+        key_name varchar(255),
+        key_value varchar(255) not null,
+        tmodel_key_ref varchar(255),
+        category_bag_id bigint,
+        keyed_reference_group_id bigint,
+        primary key (id)
+    );
+
+    create table j3_keyed_reference_group (
+        id bigint not null,
+        tmodel_key varchar(255),
+        category_bag_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_node (
+        name varchar(255) not null,
+        custody_transfer_url varchar(255) not null,
+        factory_initial varchar(255),
+        factory_naming_provider varchar(255),
+        factory_url_pkgs varchar(255),
+        inquiry_url varchar(255) not null,
+        juddi_api_url varchar(255),
+        manager_name varchar(255) not null,
+        proxy_transport varchar(255) not null,
+        publish_url varchar(255) not null,
+        security_url varchar(255) not null,
+        subscription_url varchar(255) not null,
+        primary key (name)
+    );
+
+    create table j3_overview_doc (
+        id bigint not null,
+        overview_url varchar(255) not null,
+        overview_url_use_type varchar(255),
+        entity_key varchar(255),
+        tomodel_instance_info_id bigint,
+        primary key (id)
+    );
+
+    create table j3_overview_doc_descr (
+        id bigint not null,
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        overview_doc_id bigint,
+        primary key (id)
+    );
+
+    create table j3_person_name (
+        id bigint not null,
+        lang_code varchar(5),
+        name varchar(255) not null,
+        contact_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_phone (
+        id bigint not null,
+        phone_number varchar(50) not null,
+        use_type varchar(255),
+        contact_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_publisher (
+        authorized_name varchar(255) not null,
+        email_address varchar(255),
+        is_admin varchar(5),
+        is_enabled varchar(5),
+        max_bindings_per_service integer,
+        max_businesses integer,
+        max_services_per_business integer,
+        max_tmodels integer,
+        publisher_name varchar(255) not null,
+        primary key (authorized_name)
+    );
+
+    create table j3_publisher_assertion (
+        from_key varchar(255) not null,
+        to_key varchar(255) not null,
+        from_check varchar(5) not null,
+        key_name varchar(255) not null,
+        key_value varchar(255) not null,
+        tmodel_key varchar(255) not null,
+        to_check varchar(5) not null,
+        primary key (from_key, to_key)
+    );
+
+    create table j3_service_category_bag (
+        id bigint not null,
+        entity_key varchar(255) not null,
+        primary key (id),
+        unique (entity_key)
+    );
+
+    create table j3_service_descr (
+        id bigint not null,
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_service_name (
+        id bigint not null,
+        lang_code varchar(5),
+        name varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_service_projection (
+        business_key varchar(255) not null,
+        service_key varchar(255) not null,
+        primary key (business_key, service_key)
+    );
+
+    create table j3_subscription (
+        subscription_key varchar(255) not null,
+        authorized_name varchar(255) not null,
+        binding_key varchar(255),
+        brief smallint,
+        create_date timestamp not null,
+        expires_after timestamp,
+        last_notified timestamp,
+        max_entities integer,
+        notification_interval varchar(255),
+        subscription_filter clob(65636) not null,
+        primary key (subscription_key)
+    );
+
+    create table j3_subscription_chunk_token (
+        chunk_token varchar(255) not null,
+        data integer not null,
+        end_point timestamp,
+        expires_after timestamp not null,
+        start_point timestamp,
+        subscription_key varchar(255) not null,
+        primary key (chunk_token)
+    );
+
+    create table j3_subscription_match (
+        id bigint not null,
+        entity_key varchar(255) not null,
+        subscription_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_tmodel (
+        deleted smallint,
+        lang_code varchar(5),
+        name varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (entity_key)
+    );
+
+    create table j3_tmodel_category_bag (
+        id bigint not null,
+        entity_key varchar(255) not null,
+        primary key (id),
+        unique (entity_key)
+    );
+
+    create table j3_tmodel_descr (
+        id bigint not null,
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_tmodel_identifier (
+        id bigint not null,
+        key_name varchar(255),
+        key_value varchar(255) not null,
+        tmodel_key_ref varchar(255),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_tmodel_instance_info (
+        id bigint not null,
+        instance_parms varchar(512),
+        tmodel_key varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_tmodel_instance_info_descr (
+        id bigint not null,
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        tmodel_instance_info_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_transfer_token (
+        transfer_token varchar(51) not null,
+        expiration_date timestamp not null,
+        primary key (transfer_token)
+    );
+
+    create table j3_transfer_token_keys (
+        id bigint not null,
+        entity_key varchar(255),
+        transfer_token varchar(51) not null,
+        primary key (id)
+    );
+
+    create table j3_uddi_entity (
+        entity_key varchar(255) not null,
+        authorized_name varchar(255) not null,
+        created timestamp,
+        modified timestamp not null,
+        modified_including_children timestamp,
+        node_id varchar(255),
+        primary key (entity_key)
+    );
+
+    alter table j3_address 
+        add constraint FKF83236BE75D860FB 
+        foreign key (address_id) 
+        references j3_contact;
+
+    alter table j3_address_line 
+        add constraint FKC665B8D5F8B8D8CF 
+        foreign key (address_id) 
+        references j3_address;
+
+    alter table j3_binding_category_bag 
+        add constraint FKCF34B2376A68D45A 
+        foreign key (id) 
+        references j3_category_bag;
+
+    alter table j3_binding_category_bag 
+        add constraint FKCF34B237CFBD88B7 
+        foreign key (entity_key) 
+        references j3_binding_template;
+
+    alter table j3_binding_descr 
+        add constraint FK5EA60911CFBD88B7 
+        foreign key (entity_key) 
+        references j3_binding_template;
+
+    alter table j3_binding_template 
+        add constraint FKD044BD6A2E448F3F 
+        foreign key (service_key) 
+        references j3_business_service;
+
+    alter table j3_binding_template 
+        add constraint FKD044BD6AD1823CA5 
+        foreign key (entity_key) 
+        references j3_uddi_entity;
+
+    alter table j3_business_category_bag 
+        add constraint FKD6D3ECB06A68D45A 
+        foreign key (id) 
+        references j3_category_bag;
+
+    alter table j3_business_category_bag 
+        add constraint FKD6D3ECB0BEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_business_descr 
+        add constraint FK3A24B4B8BEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_business_entity 
+        add constraint FKCA61A0CD1823CA5 
+        foreign key (entity_key) 
+        references j3_uddi_entity;
+
+    alter table j3_business_identifier 
+        add constraint FKB0C7A652BEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_business_name 
+        add constraint FK43F526F4BEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_business_service 
+        add constraint FK5D4255ACD1823CA5 
+        foreign key (entity_key) 
+        references j3_uddi_entity;
+
+    alter table j3_business_service 
+        add constraint FK5D4255ACEF04CFEE 
+        foreign key (business_key) 
+        references j3_business_entity;
+
+    alter table j3_clerk 
+        add constraint FK34DC7D9F6BB0F935 
+        foreign key (node_name) 
+        references j3_node;
+
+    alter table j3_client_subscriptioninfo 
+        add constraint FKDF04CC095BFC6733 
+        foreign key (fromClerk_clerk_name) 
+        references j3_clerk;
+
+    alter table j3_client_subscriptioninfo 
+        add constraint FKDF04CC09F3CE9C04 
+        foreign key (toClerk_clerk_name) 
+        references j3_clerk;
+
+    alter table j3_contact 
+        add constraint FK7551BEEABEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_contact_descr 
+        add constraint FK56CA9E6C2E3FD94F 
+        foreign key (contact_id) 
+        references j3_contact;
+
+    alter table j3_discovery_url 
+        add constraint FKA042FDAABEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_email 
+        add constraint FK34F910E62E3FD94F 
+        foreign key (contact_id) 
+        references j3_contact;
+
+    alter table j3_instance_details_descr 
+        add constraint FK3CC165902B115C6F 
+        foreign key (tmodel_instance_info_id) 
+        references j3_tmodel_instance_info;
+
+    alter table j3_instance_details_doc_descr 
+        add constraint FK447324492B115C6F 
+        foreign key (tmodel_instance_info_id) 
+        references j3_tmodel_instance_info;
+
+    alter table j3_keyed_reference 
+        add constraint FK350C8454E075C8D7 
+        foreign key (keyed_reference_group_id) 
+        references j3_keyed_reference_group;
+
+    alter table j3_keyed_reference 
+        add constraint FK350C84541DB72652 
+        foreign key (category_bag_id) 
+        references j3_category_bag;
+
+    alter table j3_keyed_reference_group 
+        add constraint FKF6224ED41DB72652 
+        foreign key (category_bag_id) 
+        references j3_category_bag;
+
+    alter table j3_overview_doc 
+        add constraint FK5CD8D0E8C5BF8903 
+        foreign key (entity_key) 
+        references j3_tmodel;
+
+    alter table j3_overview_doc 
+        add constraint FK5CD8D0E8E8CE1B36 
+        foreign key (tomodel_instance_info_id) 
+        references j3_tmodel_instance_info;
+
+    alter table j3_overview_doc_descr 
+        add constraint FK36FB9EA9BDC711C 
+        foreign key (overview_doc_id) 
+        references j3_overview_doc;
+
+    alter table j3_person_name 
+        add constraint FKCB7B8AFF2E3FD94F 
+        foreign key (contact_id) 
+        references j3_contact;
+
+    alter table j3_phone 
+        add constraint FK359202B82E3FD94F 
+        foreign key (contact_id) 
+        references j3_contact;
+
+    alter table j3_publisher_assertion 
+        add constraint FK8A102449E3544929 
+        foreign key (to_key) 
+        references j3_business_entity;
+
+    alter table j3_publisher_assertion 
+        add constraint FK8A102449CCEE22D8 
+        foreign key (from_key) 
+        references j3_business_entity;
+
+    alter table j3_service_category_bag 
+        add constraint FK185A68076A68D45A 
+        foreign key (id) 
+        references j3_category_bag;
+
+    alter table j3_service_category_bag 
+        add constraint FK185A680748D0656D 
+        foreign key (entity_key) 
+        references j3_business_service;
+
+    alter table j3_service_descr 
+        add constraint FKB6D63D4148D0656D 
+        foreign key (entity_key) 
+        references j3_business_service;
+
+    alter table j3_service_name 
+        add constraint FKCC1BE94B48D0656D 
+        foreign key (entity_key) 
+        references j3_business_service;
+
+    alter table j3_service_projection 
+        add constraint FK629F290F2E448F3F 
+        foreign key (service_key) 
+        references j3_business_service;
+
+    alter table j3_service_projection 
+        add constraint FK629F290FEF04CFEE 
+        foreign key (business_key) 
+        references j3_business_entity;
+
+    alter table j3_subscription_match 
+        add constraint FK5B9C2F19BEEE42E5 
+        foreign key (subscription_key) 
+        references j3_subscription;
+
+    alter table j3_tmodel 
+        add constraint FK83C8072BD1823CA5 
+        foreign key (entity_key) 
+        references j3_uddi_entity;
+
+    alter table j3_tmodel_category_bag 
+        add constraint FK7E0859DB6A68D45A 
+        foreign key (id) 
+        references j3_category_bag;
+
+    alter table j3_tmodel_category_bag 
+        add constraint FK7E0859DBC5BF8903 
+        foreign key (entity_key) 
+        references j3_tmodel;
+
+    alter table j3_tmodel_descr 
+        add constraint FK63DFF1EDC5BF8903 
+        foreign key (entity_key) 
+        references j3_tmodel;
+
+    alter table j3_tmodel_identifier 
+        add constraint FKD5FB623DC5BF8903 
+        foreign key (entity_key) 
+        references j3_tmodel;
+
+    alter table j3_tmodel_instance_info 
+        add constraint FKDC6C9004CFBD88B7 
+        foreign key (entity_key) 
+        references j3_binding_template;
+
+    alter table j3_tmodel_instance_info_descr 
+        add constraint FKD826B4062B115C6F 
+        foreign key (tmodel_instance_info_id) 
+        references j3_tmodel_instance_info;
+
+    alter table j3_transfer_token_keys 
+        add constraint FK8BBF49185ED9DD48 
+        foreign key (transfer_token) 
+        references j3_transfer_token;
+
+    create table hibernate_unique_key (
+         next_hi integer 
+    );
+
+    insert into hibernate_unique_key values ( 0 );

Added: labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/hsqldb/import.sql
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/hsqldb/import.sql	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/hsqldb/import.sql	2010-05-14 12:28:10 UTC (rev 32889)
@@ -0,0 +1,629 @@
+
+    create table j3_address (
+        id bigint generated by default as identity (start with 1),
+        sort_code varchar(10),
+        tmodel_key varchar(255),
+        use_type varchar(255),
+        address_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_address_line (
+        id bigint generated by default as identity (start with 1),
+        key_name varchar(255),
+        key_value varchar(255),
+        line varchar(80) not null,
+        address_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_auth_token (
+        auth_token varchar(51) not null,
+        authorized_name varchar(255) not null,
+        created timestamp not null,
+        last_used timestamp not null,
+        number_of_uses integer not null,
+        token_state integer not null,
+        primary key (auth_token)
+    );
+
+    create table j3_binding_category_bag (
+        id bigint not null,
+        entity_key varchar(255) not null,
+        primary key (id),
+        unique (entity_key)
+    );
+
+    create table j3_binding_descr (
+        id bigint generated by default as identity (start with 1),
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_binding_template (
+        access_point_type varchar(255),
+        access_point_url varchar(4000),
+        hosting_redirector varchar(255),
+        entity_key varchar(255) not null,
+        service_key varchar(255) not null,
+        primary key (entity_key)
+    );
+
+    create table j3_business_category_bag (
+        id bigint not null,
+        entity_key varchar(255) not null,
+        primary key (id),
+        unique (entity_key)
+    );
+
+    create table j3_business_descr (
+        id bigint generated by default as identity (start with 1),
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_business_entity (
+        entity_key varchar(255) not null,
+        primary key (entity_key)
+    );
+
+    create table j3_business_identifier (
+        id bigint generated by default as identity (start with 1),
+        key_name varchar(255),
+        key_value varchar(255) not null,
+        tmodel_key_ref varchar(255),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_business_name (
+        id bigint generated by default as identity (start with 1),
+        lang_code varchar(5),
+        name varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_business_service (
+        entity_key varchar(255) not null,
+        business_key varchar(255) not null,
+        primary key (entity_key)
+    );
+
+    create table j3_category_bag (
+        id bigint generated by default as identity (start with 1),
+        primary key (id)
+    );
+
+    create table j3_clerk (
+        clerk_name varchar(255) not null,
+        cred varchar(255),
+        publisher_id varchar(255) not null,
+        node_name varchar(255),
+        primary key (clerk_name)
+    );
+
+    create table j3_client_subscriptioninfo (
+        subscription_key varchar(255) not null,
+        last_notified timestamp,
+        fromClerk_clerk_name varchar(255),
+        toClerk_clerk_name varchar(255),
+        primary key (subscription_key)
+    );
+
+    create table j3_contact (
+        id bigint generated by default as identity (start with 1),
+        use_type varchar(255),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_contact_descr (
+        id bigint generated by default as identity (start with 1),
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        contact_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_discovery_url (
+        id bigint generated by default as identity (start with 1),
+        url varchar(255) not null,
+        use_type varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_email (
+        id bigint generated by default as identity (start with 1),
+        email_address varchar(255) not null,
+        use_type varchar(255),
+        contact_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_instance_details_descr (
+        id bigint generated by default as identity (start with 1),
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        tmodel_instance_info_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_instance_details_doc_descr (
+        id bigint generated by default as identity (start with 1),
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        tmodel_instance_info_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_keyed_reference (
+        id bigint generated by default as identity (start with 1),
+        key_name varchar(255),
+        key_value varchar(255) not null,
+        tmodel_key_ref varchar(255),
+        category_bag_id bigint,
+        keyed_reference_group_id bigint,
+        primary key (id)
+    );
+
+    create table j3_keyed_reference_group (
+        id bigint generated by default as identity (start with 1),
+        tmodel_key varchar(255),
+        category_bag_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_node (
+        name varchar(255) not null,
+        custody_transfer_url varchar(255) not null,
+        factory_initial varchar(255),
+        factory_naming_provider varchar(255),
+        factory_url_pkgs varchar(255),
+        inquiry_url varchar(255) not null,
+        juddi_api_url varchar(255),
+        manager_name varchar(255) not null,
+        proxy_transport varchar(255) not null,
+        publish_url varchar(255) not null,
+        security_url varchar(255) not null,
+        subscription_url varchar(255) not null,
+        primary key (name)
+    );
+
+    create table j3_overview_doc (
+        id bigint generated by default as identity (start with 1),
+        overview_url varchar(255) not null,
+        overview_url_use_type varchar(255),
+        entity_key varchar(255),
+        tomodel_instance_info_id bigint,
+        primary key (id)
+    );
+
+    create table j3_overview_doc_descr (
+        id bigint generated by default as identity (start with 1),
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        overview_doc_id bigint,
+        primary key (id)
+    );
+
+    create table j3_person_name (
+        id bigint generated by default as identity (start with 1),
+        lang_code varchar(5),
+        name varchar(255) not null,
+        contact_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_phone (
+        id bigint generated by default as identity (start with 1),
+        phone_number varchar(50) not null,
+        use_type varchar(255),
+        contact_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_publisher (
+        authorized_name varchar(255) not null,
+        email_address varchar(255),
+        is_admin varchar(5),
+        is_enabled varchar(5),
+        max_bindings_per_service integer,
+        max_businesses integer,
+        max_services_per_business integer,
+        max_tmodels integer,
+        publisher_name varchar(255) not null,
+        primary key (authorized_name)
+    );
+
+    create table j3_publisher_assertion (
+        from_key varchar(255) not null,
+        to_key varchar(255) not null,
+        from_check varchar(5) not null,
+        key_name varchar(255) not null,
+        key_value varchar(255) not null,
+        tmodel_key varchar(255) not null,
+        to_check varchar(5) not null,
+        primary key (from_key, to_key)
+    );
+
+    create table j3_service_category_bag (
+        id bigint not null,
+        entity_key varchar(255) not null,
+        primary key (id),
+        unique (entity_key)
+    );
+
+    create table j3_service_descr (
+        id bigint generated by default as identity (start with 1),
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_service_name (
+        id bigint generated by default as identity (start with 1),
+        lang_code varchar(5),
+        name varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_service_projection (
+        business_key varchar(255) not null,
+        service_key varchar(255) not null,
+        primary key (business_key, service_key)
+    );
+
+    create table j3_subscription (
+        subscription_key varchar(255) not null,
+        authorized_name varchar(255) not null,
+        binding_key varchar(255),
+        brief bit,
+        create_date timestamp not null,
+        expires_after timestamp,
+        last_notified timestamp,
+        max_entities integer,
+        notification_interval varchar(255),
+        subscription_filter longvarchar not null,
+        primary key (subscription_key)
+    );
+
+    create table j3_subscription_chunk_token (
+        chunk_token varchar(255) not null,
+        data integer not null,
+        end_point timestamp,
+        expires_after timestamp not null,
+        start_point timestamp,
+        subscription_key varchar(255) not null,
+        primary key (chunk_token)
+    );
+
+    create table j3_subscription_match (
+        id bigint generated by default as identity (start with 1),
+        entity_key varchar(255) not null,
+        subscription_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_tmodel (
+        deleted bit,
+        lang_code varchar(5),
+        name varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (entity_key)
+    );
+
+    create table j3_tmodel_category_bag (
+        id bigint not null,
+        entity_key varchar(255) not null,
+        primary key (id),
+        unique (entity_key)
+    );
+
+    create table j3_tmodel_descr (
+        id bigint generated by default as identity (start with 1),
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_tmodel_identifier (
+        id bigint generated by default as identity (start with 1),
+        key_name varchar(255),
+        key_value varchar(255) not null,
+        tmodel_key_ref varchar(255),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_tmodel_instance_info (
+        id bigint generated by default as identity (start with 1),
+        instance_parms varchar(512),
+        tmodel_key varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_tmodel_instance_info_descr (
+        id bigint generated by default as identity (start with 1),
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        tmodel_instance_info_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_transfer_token (
+        transfer_token varchar(51) not null,
+        expiration_date timestamp not null,
+        primary key (transfer_token)
+    );
+
+    create table j3_transfer_token_keys (
+        id bigint generated by default as identity (start with 1),
+        entity_key varchar(255),
+        transfer_token varchar(51) not null,
+        primary key (id)
+    );
+
+    create table j3_uddi_entity (
+        entity_key varchar(255) not null,
+        authorized_name varchar(255) not null,
+        created timestamp,
+        modified timestamp not null,
+        modified_including_children timestamp,
+        node_id varchar(255),
+        primary key (entity_key)
+    );
+
+    alter table j3_address 
+        add constraint FKF83236BE75D860FB 
+        foreign key (address_id) 
+        references j3_contact;
+
+    alter table j3_address_line 
+        add constraint FKC665B8D5F8B8D8CF 
+        foreign key (address_id) 
+        references j3_address;
+
+    alter table j3_binding_category_bag 
+        add constraint FKCF34B2376A68D45A 
+        foreign key (id) 
+        references j3_category_bag;
+
+    alter table j3_binding_category_bag 
+        add constraint FKCF34B237CFBD88B7 
+        foreign key (entity_key) 
+        references j3_binding_template;
+
+    alter table j3_binding_descr 
+        add constraint FK5EA60911CFBD88B7 
+        foreign key (entity_key) 
+        references j3_binding_template;
+
+    alter table j3_binding_template 
+        add constraint FKD044BD6A2E448F3F 
+        foreign key (service_key) 
+        references j3_business_service;
+
+    alter table j3_binding_template 
+        add constraint FKD044BD6AD1823CA5 
+        foreign key (entity_key) 
+        references j3_uddi_entity;
+
+    alter table j3_business_category_bag 
+        add constraint FKD6D3ECB06A68D45A 
+        foreign key (id) 
+        references j3_category_bag;
+
+    alter table j3_business_category_bag 
+        add constraint FKD6D3ECB0BEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_business_descr 
+        add constraint FK3A24B4B8BEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_business_entity 
+        add constraint FKCA61A0CD1823CA5 
+        foreign key (entity_key) 
+        references j3_uddi_entity;
+
+    alter table j3_business_identifier 
+        add constraint FKB0C7A652BEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_business_name 
+        add constraint FK43F526F4BEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_business_service 
+        add constraint FK5D4255ACD1823CA5 
+        foreign key (entity_key) 
+        references j3_uddi_entity;
+
+    alter table j3_business_service 
+        add constraint FK5D4255ACEF04CFEE 
+        foreign key (business_key) 
+        references j3_business_entity;
+
+    alter table j3_clerk 
+        add constraint FK34DC7D9F6BB0F935 
+        foreign key (node_name) 
+        references j3_node;
+
+    alter table j3_client_subscriptioninfo 
+        add constraint FKDF04CC095BFC6733 
+        foreign key (fromClerk_clerk_name) 
+        references j3_clerk;
+
+    alter table j3_client_subscriptioninfo 
+        add constraint FKDF04CC09F3CE9C04 
+        foreign key (toClerk_clerk_name) 
+        references j3_clerk;
+
+    alter table j3_contact 
+        add constraint FK7551BEEABEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_contact_descr 
+        add constraint FK56CA9E6C2E3FD94F 
+        foreign key (contact_id) 
+        references j3_contact;
+
+    alter table j3_discovery_url 
+        add constraint FKA042FDAABEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_email 
+        add constraint FK34F910E62E3FD94F 
+        foreign key (contact_id) 
+        references j3_contact;
+
+    alter table j3_instance_details_descr 
+        add constraint FK3CC165902B115C6F 
+        foreign key (tmodel_instance_info_id) 
+        references j3_tmodel_instance_info;
+
+    alter table j3_instance_details_doc_descr 
+        add constraint FK447324492B115C6F 
+        foreign key (tmodel_instance_info_id) 
+        references j3_tmodel_instance_info;
+
+    alter table j3_keyed_reference 
+        add constraint FK350C8454E075C8D7 
+        foreign key (keyed_reference_group_id) 
+        references j3_keyed_reference_group;
+
+    alter table j3_keyed_reference 
+        add constraint FK350C84541DB72652 
+        foreign key (category_bag_id) 
+        references j3_category_bag;
+
+    alter table j3_keyed_reference_group 
+        add constraint FKF6224ED41DB72652 
+        foreign key (category_bag_id) 
+        references j3_category_bag;
+
+    alter table j3_overview_doc 
+        add constraint FK5CD8D0E8C5BF8903 
+        foreign key (entity_key) 
+        references j3_tmodel;
+
+    alter table j3_overview_doc 
+        add constraint FK5CD8D0E8E8CE1B36 
+        foreign key (tomodel_instance_info_id) 
+        references j3_tmodel_instance_info;
+
+    alter table j3_overview_doc_descr 
+        add constraint FK36FB9EA9BDC711C 
+        foreign key (overview_doc_id) 
+        references j3_overview_doc;
+
+    alter table j3_person_name 
+        add constraint FKCB7B8AFF2E3FD94F 
+        foreign key (contact_id) 
+        references j3_contact;
+
+    alter table j3_phone 
+        add constraint FK359202B82E3FD94F 
+        foreign key (contact_id) 
+        references j3_contact;
+
+    alter table j3_publisher_assertion 
+        add constraint FK8A102449E3544929 
+        foreign key (to_key) 
+        references j3_business_entity;
+
+    alter table j3_publisher_assertion 
+        add constraint FK8A102449CCEE22D8 
+        foreign key (from_key) 
+        references j3_business_entity;
+
+    alter table j3_service_category_bag 
+        add constraint FK185A68076A68D45A 
+        foreign key (id) 
+        references j3_category_bag;
+
+    alter table j3_service_category_bag 
+        add constraint FK185A680748D0656D 
+        foreign key (entity_key) 
+        references j3_business_service;
+
+    alter table j3_service_descr 
+        add constraint FKB6D63D4148D0656D 
+        foreign key (entity_key) 
+        references j3_business_service;
+
+    alter table j3_service_name 
+        add constraint FKCC1BE94B48D0656D 
+        foreign key (entity_key) 
+        references j3_business_service;
+
+    alter table j3_service_projection 
+        add constraint FK629F290F2E448F3F 
+        foreign key (service_key) 
+        references j3_business_service;
+
+    alter table j3_service_projection 
+        add constraint FK629F290FEF04CFEE 
+        foreign key (business_key) 
+        references j3_business_entity;
+
+    alter table j3_subscription_match 
+        add constraint FK5B9C2F19BEEE42E5 
+        foreign key (subscription_key) 
+        references j3_subscription;
+
+    alter table j3_tmodel 
+        add constraint FK83C8072BD1823CA5 
+        foreign key (entity_key) 
+        references j3_uddi_entity;
+
+    alter table j3_tmodel_category_bag 
+        add constraint FK7E0859DB6A68D45A 
+        foreign key (id) 
+        references j3_category_bag;
+
+    alter table j3_tmodel_category_bag 
+        add constraint FK7E0859DBC5BF8903 
+        foreign key (entity_key) 
+        references j3_tmodel;
+
+    alter table j3_tmodel_descr 
+        add constraint FK63DFF1EDC5BF8903 
+        foreign key (entity_key) 
+        references j3_tmodel;
+
+    alter table j3_tmodel_identifier 
+        add constraint FKD5FB623DC5BF8903 
+        foreign key (entity_key) 
+        references j3_tmodel;
+
+    alter table j3_tmodel_instance_info 
+        add constraint FKDC6C9004CFBD88B7 
+        foreign key (entity_key) 
+        references j3_binding_template;
+
+    alter table j3_tmodel_instance_info_descr 
+        add constraint FKD826B4062B115C6F 
+        foreign key (tmodel_instance_info_id) 
+        references j3_tmodel_instance_info;
+
+    alter table j3_transfer_token_keys 
+        add constraint FK8BBF49185ED9DD48 
+        foreign key (transfer_token) 
+        references j3_transfer_token;

Added: labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/mysql/import.sql
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/mysql/import.sql	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/mysql/import.sql	2010-05-14 12:28:10 UTC (rev 32889)
@@ -0,0 +1,678 @@
+
+    create table j3_address (
+        id bigint not null auto_increment,
+        sort_code varchar(10),
+        tmodel_key varchar(255),
+        use_type varchar(255),
+        address_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_address_line (
+        id bigint not null auto_increment,
+        key_name varchar(255),
+        key_value varchar(255),
+        line varchar(80) not null,
+        address_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_auth_token (
+        auth_token varchar(51) not null,
+        authorized_name varchar(255) not null,
+        created datetime not null,
+        last_used datetime not null,
+        number_of_uses integer not null,
+        token_state integer not null,
+        primary key (auth_token)
+    );
+
+    create table j3_binding_category_bag (
+        id bigint not null,
+        entity_key varchar(255) not null,
+        primary key (id),
+        unique (entity_key)
+    );
+
+    create table j3_binding_descr (
+        id bigint not null auto_increment,
+        descr longtext not null,
+        lang_code varchar(5),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_binding_template (
+        access_point_type varchar(255),
+        access_point_url longtext,
+        hosting_redirector varchar(255),
+        entity_key varchar(255) not null,
+        service_key varchar(255) not null,
+        primary key (entity_key)
+    );
+
+    create table j3_business_category_bag (
+        id bigint not null,
+        entity_key varchar(255) not null,
+        primary key (id),
+        unique (entity_key)
+    );
+
+    create table j3_business_descr (
+        id bigint not null auto_increment,
+        descr longtext not null,
+        lang_code varchar(5),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_business_entity (
+        entity_key varchar(255) not null,
+        primary key (entity_key)
+    );
+
+    create table j3_business_identifier (
+        id bigint not null auto_increment,
+        key_name varchar(255),
+        key_value varchar(255) not null,
+        tmodel_key_ref varchar(255),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_business_name (
+        id bigint not null auto_increment,
+        lang_code varchar(5),
+        name varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_business_service (
+        entity_key varchar(255) not null,
+        business_key varchar(255) not null,
+        primary key (entity_key)
+    );
+
+    create table j3_category_bag (
+        id bigint not null auto_increment,
+        primary key (id)
+    );
+
+    create table j3_clerk (
+        clerk_name varchar(255) not null,
+        cred varchar(255),
+        publisher_id varchar(255) not null,
+        node_name varchar(255),
+        primary key (clerk_name)
+    );
+
+    create table j3_client_subscriptioninfo (
+        subscription_key varchar(255) not null,
+        last_notified datetime,
+        fromClerk_clerk_name varchar(255),
+        toClerk_clerk_name varchar(255),
+        primary key (subscription_key)
+    );
+
+    create table j3_contact (
+        id bigint not null auto_increment,
+        use_type varchar(255),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_contact_descr (
+        id bigint not null auto_increment,
+        descr longtext not null,
+        lang_code varchar(5),
+        contact_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_discovery_url (
+        id bigint not null auto_increment,
+        url varchar(255) not null,
+        use_type varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_email (
+        id bigint not null auto_increment,
+        email_address varchar(255) not null,
+        use_type varchar(255),
+        contact_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_instance_details_descr (
+        id bigint not null auto_increment,
+        descr longtext not null,
+        lang_code varchar(5),
+        tmodel_instance_info_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_instance_details_doc_descr (
+        id bigint not null auto_increment,
+        descr longtext not null,
+        lang_code varchar(5),
+        tmodel_instance_info_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_keyed_reference (
+        id bigint not null auto_increment,
+        key_name varchar(255),
+        key_value varchar(255) not null,
+        tmodel_key_ref varchar(255),
+        category_bag_id bigint,
+        keyed_reference_group_id bigint,
+        primary key (id)
+    );
+
+    create table j3_keyed_reference_group (
+        id bigint not null auto_increment,
+        tmodel_key varchar(255),
+        category_bag_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_node (
+        name varchar(255) not null,
+        custody_transfer_url varchar(255) not null,
+        factory_initial varchar(255),
+        factory_naming_provider varchar(255),
+        factory_url_pkgs varchar(255),
+        inquiry_url varchar(255) not null,
+        juddi_api_url varchar(255),
+        manager_name varchar(255) not null,
+        proxy_transport varchar(255) not null,
+        publish_url varchar(255) not null,
+        security_url varchar(255) not null,
+        subscription_url varchar(255) not null,
+        primary key (name)
+    );
+
+    create table j3_overview_doc (
+        id bigint not null auto_increment,
+        overview_url varchar(255) not null,
+        overview_url_use_type varchar(255),
+        entity_key varchar(255),
+        tomodel_instance_info_id bigint,
+        primary key (id)
+    );
+
+    create table j3_overview_doc_descr (
+        id bigint not null auto_increment,
+        descr longtext not null,
+        lang_code varchar(5),
+        overview_doc_id bigint,
+        primary key (id)
+    );
+
+    create table j3_person_name (
+        id bigint not null auto_increment,
+        lang_code varchar(5),
+        name varchar(255) not null,
+        contact_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_phone (
+        id bigint not null auto_increment,
+        phone_number varchar(50) not null,
+        use_type varchar(255),
+        contact_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_publisher (
+        authorized_name varchar(255) not null,
+        email_address varchar(255),
+        is_admin varchar(5),
+        is_enabled varchar(5),
+        max_bindings_per_service integer,
+        max_businesses integer,
+        max_services_per_business integer,
+        max_tmodels integer,
+        publisher_name varchar(255) not null,
+        primary key (authorized_name)
+    );
+
+    create table j3_publisher_assertion (
+        from_key varchar(255) not null,
+        to_key varchar(255) not null,
+        from_check varchar(5) not null,
+        key_name varchar(255) not null,
+        key_value varchar(255) not null,
+        tmodel_key varchar(255) not null,
+        to_check varchar(5) not null,
+        primary key (from_key, to_key)
+    );
+
+    create table j3_service_category_bag (
+        id bigint not null,
+        entity_key varchar(255) not null,
+        primary key (id),
+        unique (entity_key)
+    );
+
+    create table j3_service_descr (
+        id bigint not null auto_increment,
+        descr longtext not null,
+        lang_code varchar(5),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_service_name (
+        id bigint not null auto_increment,
+        lang_code varchar(5),
+        name varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_service_projection (
+        business_key varchar(255) not null,
+        service_key varchar(255) not null,
+        primary key (business_key, service_key)
+    );
+
+    create table j3_subscription (
+        subscription_key varchar(255) not null,
+        authorized_name varchar(255) not null,
+        binding_key varchar(255),
+        brief bit,
+        create_date datetime not null,
+        expires_after datetime,
+        last_notified datetime,
+        max_entities integer,
+        notification_interval varchar(255),
+        subscription_filter longtext not null,
+        primary key (subscription_key)
+    );
+
+    create table j3_subscription_chunk_token (
+        chunk_token varchar(255) not null,
+        data integer not null,
+        end_point datetime,
+        expires_after datetime not null,
+        start_point datetime,
+        subscription_key varchar(255) not null,
+        primary key (chunk_token)
+    );
+
+    create table j3_subscription_match (
+        id bigint not null auto_increment,
+        entity_key varchar(255) not null,
+        subscription_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_tmodel (
+        deleted bit,
+        lang_code varchar(5),
+        name varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (entity_key)
+    );
+
+    create table j3_tmodel_category_bag (
+        id bigint not null,
+        entity_key varchar(255) not null,
+        primary key (id),
+        unique (entity_key)
+    );
+
+    create table j3_tmodel_descr (
+        id bigint not null auto_increment,
+        descr longtext not null,
+        lang_code varchar(5),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_tmodel_identifier (
+        id bigint not null auto_increment,
+        key_name varchar(255),
+        key_value varchar(255) not null,
+        tmodel_key_ref varchar(255),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_tmodel_instance_info (
+        id bigint not null auto_increment,
+        instance_parms longtext,
+        tmodel_key varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_tmodel_instance_info_descr (
+        id bigint not null auto_increment,
+        descr longtext not null,
+        lang_code varchar(5),
+        tmodel_instance_info_id bigint not null,
+        primary key (id)
+    );
+
+    create table j3_transfer_token (
+        transfer_token varchar(51) not null,
+        expiration_date datetime not null,
+        primary key (transfer_token)
+    );
+
+    create table j3_transfer_token_keys (
+        id bigint not null auto_increment,
+        entity_key varchar(255),
+        transfer_token varchar(51) not null,
+        primary key (id)
+    );
+
+    create table j3_uddi_entity (
+        entity_key varchar(255) not null,
+        authorized_name varchar(255) not null,
+        created datetime,
+        modified datetime not null,
+        modified_including_children datetime,
+        node_id varchar(255),
+        primary key (entity_key)
+    );
+
+    alter table j3_address 
+        add index FKF83236BE75D860FB (address_id), 
+        add constraint FKF83236BE75D860FB 
+        foreign key (address_id) 
+        references j3_contact (id);
+
+    alter table j3_address_line 
+        add index FKC665B8D5F8B8D8CF (address_id), 
+        add constraint FKC665B8D5F8B8D8CF 
+        foreign key (address_id) 
+        references j3_address (id);
+
+    alter table j3_binding_category_bag 
+        add index FKCF34B2376A68D45A (id), 
+        add constraint FKCF34B2376A68D45A 
+        foreign key (id) 
+        references j3_category_bag (id);
+
+    alter table j3_binding_category_bag 
+        add index FKCF34B237CFBD88B7 (entity_key), 
+        add constraint FKCF34B237CFBD88B7 
+        foreign key (entity_key) 
+        references j3_binding_template (entity_key);
+
+    alter table j3_binding_descr 
+        add index FK5EA60911CFBD88B7 (entity_key), 
+        add constraint FK5EA60911CFBD88B7 
+        foreign key (entity_key) 
+        references j3_binding_template (entity_key);
+
+    alter table j3_binding_template 
+        add index FKD044BD6A2E448F3F (service_key), 
+        add constraint FKD044BD6A2E448F3F 
+        foreign key (service_key) 
+        references j3_business_service (entity_key);
+
+    alter table j3_binding_template 
+        add index FKD044BD6AD1823CA5 (entity_key), 
+        add constraint FKD044BD6AD1823CA5 
+        foreign key (entity_key) 
+        references j3_uddi_entity (entity_key);
+
+    alter table j3_business_category_bag 
+        add index FKD6D3ECB06A68D45A (id), 
+        add constraint FKD6D3ECB06A68D45A 
+        foreign key (id) 
+        references j3_category_bag (id);
+
+    alter table j3_business_category_bag 
+        add index FKD6D3ECB0BEB92A91 (entity_key), 
+        add constraint FKD6D3ECB0BEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity (entity_key);
+
+    alter table j3_business_descr 
+        add index FK3A24B4B8BEB92A91 (entity_key), 
+        add constraint FK3A24B4B8BEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity (entity_key);
+
+    alter table j3_business_entity 
+        add index FKCA61A0CD1823CA5 (entity_key), 
+        add constraint FKCA61A0CD1823CA5 
+        foreign key (entity_key) 
+        references j3_uddi_entity (entity_key);
+
+    alter table j3_business_identifier 
+        add index FKB0C7A652BEB92A91 (entity_key), 
+        add constraint FKB0C7A652BEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity (entity_key);
+
+    alter table j3_business_name 
+        add index FK43F526F4BEB92A91 (entity_key), 
+        add constraint FK43F526F4BEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity (entity_key);
+
+    alter table j3_business_service 
+        add index FK5D4255ACD1823CA5 (entity_key), 
+        add constraint FK5D4255ACD1823CA5 
+        foreign key (entity_key) 
+        references j3_uddi_entity (entity_key);
+
+    alter table j3_business_service 
+        add index FK5D4255ACEF04CFEE (business_key), 
+        add constraint FK5D4255ACEF04CFEE 
+        foreign key (business_key) 
+        references j3_business_entity (entity_key);
+
+    alter table j3_clerk 
+        add index FK34DC7D9F6BB0F935 (node_name), 
+        add constraint FK34DC7D9F6BB0F935 
+        foreign key (node_name) 
+        references j3_node (name);
+
+    alter table j3_client_subscriptioninfo 
+        add index FKDF04CC095BFC6733 (fromClerk_clerk_name), 
+        add constraint FKDF04CC095BFC6733 
+        foreign key (fromClerk_clerk_name) 
+        references j3_clerk (clerk_name);
+
+    alter table j3_client_subscriptioninfo 
+        add index FKDF04CC09F3CE9C04 (toClerk_clerk_name), 
+        add constraint FKDF04CC09F3CE9C04 
+        foreign key (toClerk_clerk_name) 
+        references j3_clerk (clerk_name);
+
+    alter table j3_contact 
+        add index FK7551BEEABEB92A91 (entity_key), 
+        add constraint FK7551BEEABEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity (entity_key);
+
+    alter table j3_contact_descr 
+        add index FK56CA9E6C2E3FD94F (contact_id), 
+        add constraint FK56CA9E6C2E3FD94F 
+        foreign key (contact_id) 
+        references j3_contact (id);
+
+    alter table j3_discovery_url 
+        add index FKA042FDAABEB92A91 (entity_key), 
+        add constraint FKA042FDAABEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity (entity_key);
+
+    alter table j3_email 
+        add index FK34F910E62E3FD94F (contact_id), 
+        add constraint FK34F910E62E3FD94F 
+        foreign key (contact_id) 
+        references j3_contact (id);
+
+    alter table j3_instance_details_descr 
+        add index FK3CC165902B115C6F (tmodel_instance_info_id), 
+        add constraint FK3CC165902B115C6F 
+        foreign key (tmodel_instance_info_id) 
+        references j3_tmodel_instance_info (id);
+
+    alter table j3_instance_details_doc_descr 
+        add index FK447324492B115C6F (tmodel_instance_info_id), 
+        add constraint FK447324492B115C6F 
+        foreign key (tmodel_instance_info_id) 
+        references j3_tmodel_instance_info (id);
+
+    alter table j3_keyed_reference 
+        add index FK350C8454E075C8D7 (keyed_reference_group_id), 
+        add constraint FK350C8454E075C8D7 
+        foreign key (keyed_reference_group_id) 
+        references j3_keyed_reference_group (id);
+
+    alter table j3_keyed_reference 
+        add index FK350C84541DB72652 (category_bag_id), 
+        add constraint FK350C84541DB72652 
+        foreign key (category_bag_id) 
+        references j3_category_bag (id);
+
+    alter table j3_keyed_reference_group 
+        add index FKF6224ED41DB72652 (category_bag_id), 
+        add constraint FKF6224ED41DB72652 
+        foreign key (category_bag_id) 
+        references j3_category_bag (id);
+
+    alter table j3_overview_doc 
+        add index FK5CD8D0E8C5BF8903 (entity_key), 
+        add constraint FK5CD8D0E8C5BF8903 
+        foreign key (entity_key) 
+        references j3_tmodel (entity_key);
+
+    alter table j3_overview_doc 
+        add index FK5CD8D0E8E8CE1B36 (tomodel_instance_info_id), 
+        add constraint FK5CD8D0E8E8CE1B36 
+        foreign key (tomodel_instance_info_id) 
+        references j3_tmodel_instance_info (id);
+
+    alter table j3_overview_doc_descr 
+        add index FK36FB9EA9BDC711C (overview_doc_id), 
+        add constraint FK36FB9EA9BDC711C 
+        foreign key (overview_doc_id) 
+        references j3_overview_doc (id);
+
+    alter table j3_person_name 
+        add index FKCB7B8AFF2E3FD94F (contact_id), 
+        add constraint FKCB7B8AFF2E3FD94F 
+        foreign key (contact_id) 
+        references j3_contact (id);
+
+    alter table j3_phone 
+        add index FK359202B82E3FD94F (contact_id), 
+        add constraint FK359202B82E3FD94F 
+        foreign key (contact_id) 
+        references j3_contact (id);
+
+    alter table j3_publisher_assertion 
+        add index FK8A102449E3544929 (to_key), 
+        add constraint FK8A102449E3544929 
+        foreign key (to_key) 
+        references j3_business_entity (entity_key);
+
+    alter table j3_publisher_assertion 
+        add index FK8A102449CCEE22D8 (from_key), 
+        add constraint FK8A102449CCEE22D8 
+        foreign key (from_key) 
+        references j3_business_entity (entity_key);
+
+    alter table j3_service_category_bag 
+        add index FK185A68076A68D45A (id), 
+        add constraint FK185A68076A68D45A 
+        foreign key (id) 
+        references j3_category_bag (id);
+
+    alter table j3_service_category_bag 
+        add index FK185A680748D0656D (entity_key), 
+        add constraint FK185A680748D0656D 
+        foreign key (entity_key) 
+        references j3_business_service (entity_key);
+
+    alter table j3_service_descr 
+        add index FKB6D63D4148D0656D (entity_key), 
+        add constraint FKB6D63D4148D0656D 
+        foreign key (entity_key) 
+        references j3_business_service (entity_key);
+
+    alter table j3_service_name 
+        add index FKCC1BE94B48D0656D (entity_key), 
+        add constraint FKCC1BE94B48D0656D 
+        foreign key (entity_key) 
+        references j3_business_service (entity_key);
+
+    alter table j3_service_projection 
+        add index FK629F290F2E448F3F (service_key), 
+        add constraint FK629F290F2E448F3F 
+        foreign key (service_key) 
+        references j3_business_service (entity_key);
+
+    alter table j3_service_projection 
+        add index FK629F290FEF04CFEE (business_key), 
+        add constraint FK629F290FEF04CFEE 
+        foreign key (business_key) 
+        references j3_business_entity (entity_key);
+
+    alter table j3_subscription_match 
+        add index FK5B9C2F19BEEE42E5 (subscription_key), 
+        add constraint FK5B9C2F19BEEE42E5 
+        foreign key (subscription_key) 
+        references j3_subscription (subscription_key);
+
+    alter table j3_tmodel 
+        add index FK83C8072BD1823CA5 (entity_key), 
+        add constraint FK83C8072BD1823CA5 
+        foreign key (entity_key) 
+        references j3_uddi_entity (entity_key);
+
+    alter table j3_tmodel_category_bag 
+        add index FK7E0859DB6A68D45A (id), 
+        add constraint FK7E0859DB6A68D45A 
+        foreign key (id) 
+        references j3_category_bag (id);
+
+    alter table j3_tmodel_category_bag 
+        add index FK7E0859DBC5BF8903 (entity_key), 
+        add constraint FK7E0859DBC5BF8903 
+        foreign key (entity_key) 
+        references j3_tmodel (entity_key);
+
+    alter table j3_tmodel_descr 
+        add index FK63DFF1EDC5BF8903 (entity_key), 
+        add constraint FK63DFF1EDC5BF8903 
+        foreign key (entity_key) 
+        references j3_tmodel (entity_key);
+
+    alter table j3_tmodel_identifier 
+        add index FKD5FB623DC5BF8903 (entity_key), 
+        add constraint FKD5FB623DC5BF8903 
+        foreign key (entity_key) 
+        references j3_tmodel (entity_key);
+
+    alter table j3_tmodel_instance_info 
+        add index FKDC6C9004CFBD88B7 (entity_key), 
+        add constraint FKDC6C9004CFBD88B7 
+        foreign key (entity_key) 
+        references j3_binding_template (entity_key);
+
+    alter table j3_tmodel_instance_info_descr 
+        add index FKD826B4062B115C6F (tmodel_instance_info_id), 
+        add constraint FKD826B4062B115C6F 
+        foreign key (tmodel_instance_info_id) 
+        references j3_tmodel_instance_info (id);
+
+    alter table j3_transfer_token_keys 
+        add index FK8BBF49185ED9DD48 (transfer_token), 
+        add constraint FK8BBF49185ED9DD48 
+        foreign key (transfer_token) 
+        references j3_transfer_token (transfer_token);

Added: labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/oracle9/import.sql
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/oracle9/import.sql	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/oracle9/import.sql	2010-05-14 12:28:10 UTC (rev 32889)
@@ -0,0 +1,631 @@
+
+    create table j3_address (
+        id number(19,0) not null,
+        sort_code varchar2(10 char),
+        tmodel_key varchar2(255 char),
+        use_type varchar2(255 char),
+        address_id number(19,0) not null,
+        primary key (id)
+    );
+
+    create table j3_address_line (
+        id number(19,0) not null,
+        key_name varchar2(255 char),
+        key_value varchar2(255 char),
+        line varchar2(80 char) not null,
+        address_id number(19,0) not null,
+        primary key (id)
+    );
+
+    create table j3_auth_token (
+        auth_token varchar2(51 char) not null,
+        authorized_name varchar2(255 char) not null,
+        created timestamp not null,
+        last_used timestamp not null,
+        number_of_uses number(10,0) not null,
+        token_state number(10,0) not null,
+        primary key (auth_token)
+    );
+
+    create table j3_binding_category_bag (
+        id number(19,0) not null,
+        entity_key varchar2(255 char) not null,
+        primary key (id),
+        unique (entity_key)
+    );
+
+    create table j3_binding_descr (
+        id number(19,0) not null,
+        descr varchar2(1024 char) not null,
+        lang_code varchar2(5 char),
+        entity_key varchar2(255 char) not null,
+        primary key (id)
+    );
+
+    create table j3_binding_template (
+        access_point_type varchar2(255 char),
+        access_point_url varchar2(4000 char),
+        hosting_redirector varchar2(255 char),
+        entity_key varchar2(255 char) not null,
+        service_key varchar2(255 char) not null,
+        primary key (entity_key)
+    );
+
+    create table j3_business_category_bag (
+        id number(19,0) not null,
+        entity_key varchar2(255 char) not null,
+        primary key (id),
+        unique (entity_key)
+    );
+
+    create table j3_business_descr (
+        id number(19,0) not null,
+        descr varchar2(1024 char) not null,
+        lang_code varchar2(5 char),
+        entity_key varchar2(255 char) not null,
+        primary key (id)
+    );
+
+    create table j3_business_entity (
+        entity_key varchar2(255 char) not null,
+        primary key (entity_key)
+    );
+
+    create table j3_business_identifier (
+        id number(19,0) not null,
+        key_name varchar2(255 char),
+        key_value varchar2(255 char) not null,
+        tmodel_key_ref varchar2(255 char),
+        entity_key varchar2(255 char) not null,
+        primary key (id)
+    );
+
+    create table j3_business_name (
+        id number(19,0) not null,
+        lang_code varchar2(5 char),
+        name varchar2(255 char) not null,
+        entity_key varchar2(255 char) not null,
+        primary key (id)
+    );
+
+    create table j3_business_service (
+        entity_key varchar2(255 char) not null,
+        business_key varchar2(255 char) not null,
+        primary key (entity_key)
+    );
+
+    create table j3_category_bag (
+        id number(19,0) not null,
+        primary key (id)
+    );
+
+    create table j3_clerk (
+        clerk_name varchar2(255 char) not null,
+        cred varchar2(255 char),
+        publisher_id varchar2(255 char) not null,
+        node_name varchar2(255 char),
+        primary key (clerk_name)
+    );
+
+    create table j3_client_subscriptioninfo (
+        subscription_key varchar2(255 char) not null,
+        last_notified timestamp,
+        fromClerk_clerk_name varchar2(255 char),
+        toClerk_clerk_name varchar2(255 char),
+        primary key (subscription_key)
+    );
+
+    create table j3_contact (
+        id number(19,0) not null,
+        use_type varchar2(255 char),
+        entity_key varchar2(255 char) not null,
+        primary key (id)
+    );
+
+    create table j3_contact_descr (
+        id number(19,0) not null,
+        descr varchar2(1024 char) not null,
+        lang_code varchar2(5 char),
+        contact_id number(19,0) not null,
+        primary key (id)
+    );
+
+    create table j3_discovery_url (
+        id number(19,0) not null,
+        url varchar2(255 char) not null,
+        use_type varchar2(255 char) not null,
+        entity_key varchar2(255 char) not null,
+        primary key (id)
+    );
+
+    create table j3_email (
+        id number(19,0) not null,
+        email_address varchar2(255 char) not null,
+        use_type varchar2(255 char),
+        contact_id number(19,0) not null,
+        primary key (id)
+    );
+
+    create table j3_instance_details_descr (
+        id number(19,0) not null,
+        descr varchar2(1024 char) not null,
+        lang_code varchar2(5 char),
+        tmodel_instance_info_id number(19,0) not null,
+        primary key (id)
+    );
+
+    create table j3_instance_details_doc_descr (
+        id number(19,0) not null,
+        descr varchar2(1024 char) not null,
+        lang_code varchar2(5 char),
+        tmodel_instance_info_id number(19,0) not null,
+        primary key (id)
+    );
+
+    create table j3_keyed_reference (
+        id number(19,0) not null,
+        key_name varchar2(255 char),
+        key_value varchar2(255 char) not null,
+        tmodel_key_ref varchar2(255 char),
+        category_bag_id number(19,0),
+        keyed_reference_group_id number(19,0),
+        primary key (id)
+    );
+
+    create table j3_keyed_reference_group (
+        id number(19,0) not null,
+        tmodel_key varchar2(255 char),
+        category_bag_id number(19,0) not null,
+        primary key (id)
+    );
+
+    create table j3_node (
+        name varchar2(255 char) not null,
+        custody_transfer_url varchar2(255 char) not null,
+        factory_initial varchar2(255 char),
+        factory_naming_provider varchar2(255 char),
+        factory_url_pkgs varchar2(255 char),
+        inquiry_url varchar2(255 char) not null,
+        juddi_api_url varchar2(255 char),
+        manager_name varchar2(255 char) not null,
+        proxy_transport varchar2(255 char) not null,
+        publish_url varchar2(255 char) not null,
+        security_url varchar2(255 char) not null,
+        subscription_url varchar2(255 char) not null,
+        primary key (name)
+    );
+
+    create table j3_overview_doc (
+        id number(19,0) not null,
+        overview_url varchar2(255 char) not null,
+        overview_url_use_type varchar2(255 char),
+        entity_key varchar2(255 char),
+        tomodel_instance_info_id number(19,0),
+        primary key (id)
+    );
+
+    create table j3_overview_doc_descr (
+        id number(19,0) not null,
+        descr varchar2(1024 char) not null,
+        lang_code varchar2(5 char),
+        overview_doc_id number(19,0),
+        primary key (id)
+    );
+
+    create table j3_person_name (
+        id number(19,0) not null,
+        lang_code varchar2(5 char),
+        name varchar2(255 char) not null,
+        contact_id number(19,0) not null,
+        primary key (id)
+    );
+
+    create table j3_phone (
+        id number(19,0) not null,
+        phone_number varchar2(50 char) not null,
+        use_type varchar2(255 char),
+        contact_id number(19,0) not null,
+        primary key (id)
+    );
+
+    create table j3_publisher (
+        authorized_name varchar2(255 char) not null,
+        email_address varchar2(255 char),
+        is_admin varchar2(5 char),
+        is_enabled varchar2(5 char),
+        max_bindings_per_service number(10,0),
+        max_businesses number(10,0),
+        max_services_per_business number(10,0),
+        max_tmodels number(10,0),
+        publisher_name varchar2(255 char) not null,
+        primary key (authorized_name)
+    );
+
+    create table j3_publisher_assertion (
+        from_key varchar2(255 char) not null,
+        to_key varchar2(255 char) not null,
+        from_check varchar2(5 char) not null,
+        key_name varchar2(255 char) not null,
+        key_value varchar2(255 char) not null,
+        tmodel_key varchar2(255 char) not null,
+        to_check varchar2(5 char) not null,
+        primary key (from_key, to_key)
+    );
+
+    create table j3_service_category_bag (
+        id number(19,0) not null,
+        entity_key varchar2(255 char) not null,
+        primary key (id),
+        unique (entity_key)
+    );
+
+    create table j3_service_descr (
+        id number(19,0) not null,
+        descr varchar2(1024 char) not null,
+        lang_code varchar2(5 char),
+        entity_key varchar2(255 char) not null,
+        primary key (id)
+    );
+
+    create table j3_service_name (
+        id number(19,0) not null,
+        lang_code varchar2(5 char),
+        name varchar2(255 char) not null,
+        entity_key varchar2(255 char) not null,
+        primary key (id)
+    );
+
+    create table j3_service_projection (
+        business_key varchar2(255 char) not null,
+        service_key varchar2(255 char) not null,
+        primary key (business_key, service_key)
+    );
+
+    create table j3_subscription (
+        subscription_key varchar2(255 char) not null,
+        authorized_name varchar2(255 char) not null,
+        binding_key varchar2(255 char),
+        brief number(1,0),
+        create_date timestamp not null,
+        expires_after timestamp,
+        last_notified timestamp,
+        max_entities number(10,0),
+        notification_interval varchar2(255 char),
+        subscription_filter clob not null,
+        primary key (subscription_key)
+    );
+
+    create table j3_subscription_chunk_token (
+        chunk_token varchar2(255 char) not null,
+        data number(10,0) not null,
+        end_point timestamp,
+        expires_after timestamp not null,
+        start_point timestamp,
+        subscription_key varchar2(255 char) not null,
+        primary key (chunk_token)
+    );
+
+    create table j3_subscription_match (
+        id number(19,0) not null,
+        entity_key varchar2(255 char) not null,
+        subscription_key varchar2(255 char) not null,
+        primary key (id)
+    );
+
+    create table j3_tmodel (
+        deleted number(1,0),
+        lang_code varchar2(5 char),
+        name varchar2(255 char) not null,
+        entity_key varchar2(255 char) not null,
+        primary key (entity_key)
+    );
+
+    create table j3_tmodel_category_bag (
+        id number(19,0) not null,
+        entity_key varchar2(255 char) not null,
+        primary key (id),
+        unique (entity_key)
+    );
+
+    create table j3_tmodel_descr (
+        id number(19,0) not null,
+        descr varchar2(1024 char) not null,
+        lang_code varchar2(5 char),
+        entity_key varchar2(255 char) not null,
+        primary key (id)
+    );
+
+    create table j3_tmodel_identifier (
+        id number(19,0) not null,
+        key_name varchar2(255 char),
+        key_value varchar2(255 char) not null,
+        tmodel_key_ref varchar2(255 char),
+        entity_key varchar2(255 char) not null,
+        primary key (id)
+    );
+
+    create table j3_tmodel_instance_info (
+        id number(19,0) not null,
+        instance_parms varchar2(512 char),
+        tmodel_key varchar2(255 char) not null,
+        entity_key varchar2(255 char) not null,
+        primary key (id)
+    );
+
+    create table j3_tmodel_instance_info_descr (
+        id number(19,0) not null,
+        descr varchar2(1024 char) not null,
+        lang_code varchar2(5 char),
+        tmodel_instance_info_id number(19,0) not null,
+        primary key (id)
+    );
+
+    create table j3_transfer_token (
+        transfer_token varchar2(51 char) not null,
+        expiration_date timestamp not null,
+        primary key (transfer_token)
+    );
+
+    create table j3_transfer_token_keys (
+        id number(19,0) not null,
+        entity_key varchar2(255 char),
+        transfer_token varchar2(51 char) not null,
+        primary key (id)
+    );
+
+    create table j3_uddi_entity (
+        entity_key varchar2(255 char) not null,
+        authorized_name varchar2(255 char) not null,
+        created timestamp,
+        modified timestamp not null,
+        modified_including_children timestamp,
+        node_id varchar2(255 char),
+        primary key (entity_key)
+    );
+
+    alter table j3_address 
+        add constraint FKF83236BE75D860FB 
+        foreign key (address_id) 
+        references j3_contact;
+
+    alter table j3_address_line 
+        add constraint FKC665B8D5F8B8D8CF 
+        foreign key (address_id) 
+        references j3_address;
+
+    alter table j3_binding_category_bag 
+        add constraint FKCF34B2376A68D45A 
+        foreign key (id) 
+        references j3_category_bag;
+
+    alter table j3_binding_category_bag 
+        add constraint FKCF34B237CFBD88B7 
+        foreign key (entity_key) 
+        references j3_binding_template;
+
+    alter table j3_binding_descr 
+        add constraint FK5EA60911CFBD88B7 
+        foreign key (entity_key) 
+        references j3_binding_template;
+
+    alter table j3_binding_template 
+        add constraint FKD044BD6A2E448F3F 
+        foreign key (service_key) 
+        references j3_business_service;
+
+    alter table j3_binding_template 
+        add constraint FKD044BD6AD1823CA5 
+        foreign key (entity_key) 
+        references j3_uddi_entity;
+
+    alter table j3_business_category_bag 
+        add constraint FKD6D3ECB06A68D45A 
+        foreign key (id) 
+        references j3_category_bag;
+
+    alter table j3_business_category_bag 
+        add constraint FKD6D3ECB0BEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_business_descr 
+        add constraint FK3A24B4B8BEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_business_entity 
+        add constraint FKCA61A0CD1823CA5 
+        foreign key (entity_key) 
+        references j3_uddi_entity;
+
+    alter table j3_business_identifier 
+        add constraint FKB0C7A652BEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_business_name 
+        add constraint FK43F526F4BEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_business_service 
+        add constraint FK5D4255ACD1823CA5 
+        foreign key (entity_key) 
+        references j3_uddi_entity;
+
+    alter table j3_business_service 
+        add constraint FK5D4255ACEF04CFEE 
+        foreign key (business_key) 
+        references j3_business_entity;
+
+    alter table j3_clerk 
+        add constraint FK34DC7D9F6BB0F935 
+        foreign key (node_name) 
+        references j3_node;
+
+    alter table j3_client_subscriptioninfo 
+        add constraint FKDF04CC095BFC6733 
+        foreign key (fromClerk_clerk_name) 
+        references j3_clerk;
+
+    alter table j3_client_subscriptioninfo 
+        add constraint FKDF04CC09F3CE9C04 
+        foreign key (toClerk_clerk_name) 
+        references j3_clerk;
+
+    alter table j3_contact 
+        add constraint FK7551BEEABEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_contact_descr 
+        add constraint FK56CA9E6C2E3FD94F 
+        foreign key (contact_id) 
+        references j3_contact;
+
+    alter table j3_discovery_url 
+        add constraint FKA042FDAABEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_email 
+        add constraint FK34F910E62E3FD94F 
+        foreign key (contact_id) 
+        references j3_contact;
+
+    alter table j3_instance_details_descr 
+        add constraint FK3CC165902B115C6F 
+        foreign key (tmodel_instance_info_id) 
+        references j3_tmodel_instance_info;
+
+    alter table j3_instance_details_doc_descr 
+        add constraint FK447324492B115C6F 
+        foreign key (tmodel_instance_info_id) 
+        references j3_tmodel_instance_info;
+
+    alter table j3_keyed_reference 
+        add constraint FK350C8454E075C8D7 
+        foreign key (keyed_reference_group_id) 
+        references j3_keyed_reference_group;
+
+    alter table j3_keyed_reference 
+        add constraint FK350C84541DB72652 
+        foreign key (category_bag_id) 
+        references j3_category_bag;
+
+    alter table j3_keyed_reference_group 
+        add constraint FKF6224ED41DB72652 
+        foreign key (category_bag_id) 
+        references j3_category_bag;
+
+    alter table j3_overview_doc 
+        add constraint FK5CD8D0E8C5BF8903 
+        foreign key (entity_key) 
+        references j3_tmodel;
+
+    alter table j3_overview_doc 
+        add constraint FK5CD8D0E8E8CE1B36 
+        foreign key (tomodel_instance_info_id) 
+        references j3_tmodel_instance_info;
+
+    alter table j3_overview_doc_descr 
+        add constraint FK36FB9EA9BDC711C 
+        foreign key (overview_doc_id) 
+        references j3_overview_doc;
+
+    alter table j3_person_name 
+        add constraint FKCB7B8AFF2E3FD94F 
+        foreign key (contact_id) 
+        references j3_contact;
+
+    alter table j3_phone 
+        add constraint FK359202B82E3FD94F 
+        foreign key (contact_id) 
+        references j3_contact;
+
+    alter table j3_publisher_assertion 
+        add constraint FK8A102449E3544929 
+        foreign key (to_key) 
+        references j3_business_entity;
+
+    alter table j3_publisher_assertion 
+        add constraint FK8A102449CCEE22D8 
+        foreign key (from_key) 
+        references j3_business_entity;
+
+    alter table j3_service_category_bag 
+        add constraint FK185A68076A68D45A 
+        foreign key (id) 
+        references j3_category_bag;
+
+    alter table j3_service_category_bag 
+        add constraint FK185A680748D0656D 
+        foreign key (entity_key) 
+        references j3_business_service;
+
+    alter table j3_service_descr 
+        add constraint FKB6D63D4148D0656D 
+        foreign key (entity_key) 
+        references j3_business_service;
+
+    alter table j3_service_name 
+        add constraint FKCC1BE94B48D0656D 
+        foreign key (entity_key) 
+        references j3_business_service;
+
+    alter table j3_service_projection 
+        add constraint FK629F290F2E448F3F 
+        foreign key (service_key) 
+        references j3_business_service;
+
+    alter table j3_service_projection 
+        add constraint FK629F290FEF04CFEE 
+        foreign key (business_key) 
+        references j3_business_entity;
+
+    alter table j3_subscription_match 
+        add constraint FK5B9C2F19BEEE42E5 
+        foreign key (subscription_key) 
+        references j3_subscription;
+
+    alter table j3_tmodel 
+        add constraint FK83C8072BD1823CA5 
+        foreign key (entity_key) 
+        references j3_uddi_entity;
+
+    alter table j3_tmodel_category_bag 
+        add constraint FK7E0859DB6A68D45A 
+        foreign key (id) 
+        references j3_category_bag;
+
+    alter table j3_tmodel_category_bag 
+        add constraint FK7E0859DBC5BF8903 
+        foreign key (entity_key) 
+        references j3_tmodel;
+
+    alter table j3_tmodel_descr 
+        add constraint FK63DFF1EDC5BF8903 
+        foreign key (entity_key) 
+        references j3_tmodel;
+
+    alter table j3_tmodel_identifier 
+        add constraint FKD5FB623DC5BF8903 
+        foreign key (entity_key) 
+        references j3_tmodel;
+
+    alter table j3_tmodel_instance_info 
+        add constraint FKDC6C9004CFBD88B7 
+        foreign key (entity_key) 
+        references j3_binding_template;
+
+    alter table j3_tmodel_instance_info_descr 
+        add constraint FKD826B4062B115C6F 
+        foreign key (tmodel_instance_info_id) 
+        references j3_tmodel_instance_info;
+
+    alter table j3_transfer_token_keys 
+        add constraint FK8BBF49185ED9DD48 
+        foreign key (transfer_token) 
+        references j3_transfer_token;
+
+    create sequence juddi_sequence;

Added: labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/postgres/import.sql
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/postgres/import.sql	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/postgres/import.sql	2010-05-14 12:28:10 UTC (rev 32889)
@@ -0,0 +1,631 @@
+
+    create table j3_address (
+        id int8 not null,
+        sort_code varchar(10),
+        tmodel_key varchar(255),
+        use_type varchar(255),
+        address_id int8 not null,
+        primary key (id)
+    );
+
+    create table j3_address_line (
+        id int8 not null,
+        key_name varchar(255),
+        key_value varchar(255),
+        line varchar(80) not null,
+        address_id int8 not null,
+        primary key (id)
+    );
+
+    create table j3_auth_token (
+        auth_token varchar(51) not null,
+        authorized_name varchar(255) not null,
+        created timestamp not null,
+        last_used timestamp not null,
+        number_of_uses int4 not null,
+        token_state int4 not null,
+        primary key (auth_token)
+    );
+
+    create table j3_binding_category_bag (
+        id int8 not null,
+        entity_key varchar(255) not null,
+        primary key (id),
+        unique (entity_key)
+    );
+
+    create table j3_binding_descr (
+        id int8 not null,
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_binding_template (
+        access_point_type varchar(255),
+        access_point_url varchar(4000),
+        hosting_redirector varchar(255),
+        entity_key varchar(255) not null,
+        service_key varchar(255) not null,
+        primary key (entity_key)
+    );
+
+    create table j3_business_category_bag (
+        id int8 not null,
+        entity_key varchar(255) not null,
+        primary key (id),
+        unique (entity_key)
+    );
+
+    create table j3_business_descr (
+        id int8 not null,
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_business_entity (
+        entity_key varchar(255) not null,
+        primary key (entity_key)
+    );
+
+    create table j3_business_identifier (
+        id int8 not null,
+        key_name varchar(255),
+        key_value varchar(255) not null,
+        tmodel_key_ref varchar(255),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_business_name (
+        id int8 not null,
+        lang_code varchar(5),
+        name varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_business_service (
+        entity_key varchar(255) not null,
+        business_key varchar(255) not null,
+        primary key (entity_key)
+    );
+
+    create table j3_category_bag (
+        id int8 not null,
+        primary key (id)
+    );
+
+    create table j3_clerk (
+        clerk_name varchar(255) not null,
+        cred varchar(255),
+        publisher_id varchar(255) not null,
+        node_name varchar(255),
+        primary key (clerk_name)
+    );
+
+    create table j3_client_subscriptioninfo (
+        subscription_key varchar(255) not null,
+        last_notified timestamp,
+        fromClerk_clerk_name varchar(255),
+        toClerk_clerk_name varchar(255),
+        primary key (subscription_key)
+    );
+
+    create table j3_contact (
+        id int8 not null,
+        use_type varchar(255),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_contact_descr (
+        id int8 not null,
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        contact_id int8 not null,
+        primary key (id)
+    );
+
+    create table j3_discovery_url (
+        id int8 not null,
+        url varchar(255) not null,
+        use_type varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_email (
+        id int8 not null,
+        email_address varchar(255) not null,
+        use_type varchar(255),
+        contact_id int8 not null,
+        primary key (id)
+    );
+
+    create table j3_instance_details_descr (
+        id int8 not null,
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        tmodel_instance_info_id int8 not null,
+        primary key (id)
+    );
+
+    create table j3_instance_details_doc_descr (
+        id int8 not null,
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        tmodel_instance_info_id int8 not null,
+        primary key (id)
+    );
+
+    create table j3_keyed_reference (
+        id int8 not null,
+        key_name varchar(255),
+        key_value varchar(255) not null,
+        tmodel_key_ref varchar(255),
+        category_bag_id int8,
+        keyed_reference_group_id int8,
+        primary key (id)
+    );
+
+    create table j3_keyed_reference_group (
+        id int8 not null,
+        tmodel_key varchar(255),
+        category_bag_id int8 not null,
+        primary key (id)
+    );
+
+    create table j3_node (
+        name varchar(255) not null,
+        custody_transfer_url varchar(255) not null,
+        factory_initial varchar(255),
+        factory_naming_provider varchar(255),
+        factory_url_pkgs varchar(255),
+        inquiry_url varchar(255) not null,
+        juddi_api_url varchar(255),
+        manager_name varchar(255) not null,
+        proxy_transport varchar(255) not null,
+        publish_url varchar(255) not null,
+        security_url varchar(255) not null,
+        subscription_url varchar(255) not null,
+        primary key (name)
+    );
+
+    create table j3_overview_doc (
+        id int8 not null,
+        overview_url varchar(255) not null,
+        overview_url_use_type varchar(255),
+        entity_key varchar(255),
+        tomodel_instance_info_id int8,
+        primary key (id)
+    );
+
+    create table j3_overview_doc_descr (
+        id int8 not null,
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        overview_doc_id int8,
+        primary key (id)
+    );
+
+    create table j3_person_name (
+        id int8 not null,
+        lang_code varchar(5),
+        name varchar(255) not null,
+        contact_id int8 not null,
+        primary key (id)
+    );
+
+    create table j3_phone (
+        id int8 not null,
+        phone_number varchar(50) not null,
+        use_type varchar(255),
+        contact_id int8 not null,
+        primary key (id)
+    );
+
+    create table j3_publisher (
+        authorized_name varchar(255) not null,
+        email_address varchar(255),
+        is_admin varchar(5),
+        is_enabled varchar(5),
+        max_bindings_per_service int4,
+        max_businesses int4,
+        max_services_per_business int4,
+        max_tmodels int4,
+        publisher_name varchar(255) not null,
+        primary key (authorized_name)
+    );
+
+    create table j3_publisher_assertion (
+        from_key varchar(255) not null,
+        to_key varchar(255) not null,
+        from_check varchar(5) not null,
+        key_name varchar(255) not null,
+        key_value varchar(255) not null,
+        tmodel_key varchar(255) not null,
+        to_check varchar(5) not null,
+        primary key (from_key, to_key)
+    );
+
+    create table j3_service_category_bag (
+        id int8 not null,
+        entity_key varchar(255) not null,
+        primary key (id),
+        unique (entity_key)
+    );
+
+    create table j3_service_descr (
+        id int8 not null,
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_service_name (
+        id int8 not null,
+        lang_code varchar(5),
+        name varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_service_projection (
+        business_key varchar(255) not null,
+        service_key varchar(255) not null,
+        primary key (business_key, service_key)
+    );
+
+    create table j3_subscription (
+        subscription_key varchar(255) not null,
+        authorized_name varchar(255) not null,
+        binding_key varchar(255),
+        brief bool,
+        create_date timestamp not null,
+        expires_after timestamp,
+        last_notified timestamp,
+        max_entities int4,
+        notification_interval varchar(255),
+        subscription_filter text not null,
+        primary key (subscription_key)
+    );
+
+    create table j3_subscription_chunk_token (
+        chunk_token varchar(255) not null,
+        data int4 not null,
+        end_point timestamp,
+        expires_after timestamp not null,
+        start_point timestamp,
+        subscription_key varchar(255) not null,
+        primary key (chunk_token)
+    );
+
+    create table j3_subscription_match (
+        id int8 not null,
+        entity_key varchar(255) not null,
+        subscription_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_tmodel (
+        deleted bool,
+        lang_code varchar(5),
+        name varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (entity_key)
+    );
+
+    create table j3_tmodel_category_bag (
+        id int8 not null,
+        entity_key varchar(255) not null,
+        primary key (id),
+        unique (entity_key)
+    );
+
+    create table j3_tmodel_descr (
+        id int8 not null,
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_tmodel_identifier (
+        id int8 not null,
+        key_name varchar(255),
+        key_value varchar(255) not null,
+        tmodel_key_ref varchar(255),
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_tmodel_instance_info (
+        id int8 not null,
+        instance_parms varchar(512),
+        tmodel_key varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_tmodel_instance_info_descr (
+        id int8 not null,
+        descr varchar(1024) not null,
+        lang_code varchar(5),
+        tmodel_instance_info_id int8 not null,
+        primary key (id)
+    );
+
+    create table j3_transfer_token (
+        transfer_token varchar(51) not null,
+        expiration_date timestamp not null,
+        primary key (transfer_token)
+    );
+
+    create table j3_transfer_token_keys (
+        id int8 not null,
+        entity_key varchar(255),
+        transfer_token varchar(51) not null,
+        primary key (id)
+    );
+
+    create table j3_uddi_entity (
+        entity_key varchar(255) not null,
+        authorized_name varchar(255) not null,
+        created timestamp,
+        modified timestamp not null,
+        modified_including_children timestamp,
+        node_id varchar(255),
+        primary key (entity_key)
+    );
+
+    alter table j3_address 
+        add constraint FKF83236BE75D860FB 
+        foreign key (address_id) 
+        references j3_contact;
+
+    alter table j3_address_line 
+        add constraint FKC665B8D5F8B8D8CF 
+        foreign key (address_id) 
+        references j3_address;
+
+    alter table j3_binding_category_bag 
+        add constraint FKCF34B2376A68D45A 
+        foreign key (id) 
+        references j3_category_bag;
+
+    alter table j3_binding_category_bag 
+        add constraint FKCF34B237CFBD88B7 
+        foreign key (entity_key) 
+        references j3_binding_template;
+
+    alter table j3_binding_descr 
+        add constraint FK5EA60911CFBD88B7 
+        foreign key (entity_key) 
+        references j3_binding_template;
+
+    alter table j3_binding_template 
+        add constraint FKD044BD6A2E448F3F 
+        foreign key (service_key) 
+        references j3_business_service;
+
+    alter table j3_binding_template 
+        add constraint FKD044BD6AD1823CA5 
+        foreign key (entity_key) 
+        references j3_uddi_entity;
+
+    alter table j3_business_category_bag 
+        add constraint FKD6D3ECB06A68D45A 
+        foreign key (id) 
+        references j3_category_bag;
+
+    alter table j3_business_category_bag 
+        add constraint FKD6D3ECB0BEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_business_descr 
+        add constraint FK3A24B4B8BEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_business_entity 
+        add constraint FKCA61A0CD1823CA5 
+        foreign key (entity_key) 
+        references j3_uddi_entity;
+
+    alter table j3_business_identifier 
+        add constraint FKB0C7A652BEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_business_name 
+        add constraint FK43F526F4BEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_business_service 
+        add constraint FK5D4255ACD1823CA5 
+        foreign key (entity_key) 
+        references j3_uddi_entity;
+
+    alter table j3_business_service 
+        add constraint FK5D4255ACEF04CFEE 
+        foreign key (business_key) 
+        references j3_business_entity;
+
+    alter table j3_clerk 
+        add constraint FK34DC7D9F6BB0F935 
+        foreign key (node_name) 
+        references j3_node;
+
+    alter table j3_client_subscriptioninfo 
+        add constraint FKDF04CC095BFC6733 
+        foreign key (fromClerk_clerk_name) 
+        references j3_clerk;
+
+    alter table j3_client_subscriptioninfo 
+        add constraint FKDF04CC09F3CE9C04 
+        foreign key (toClerk_clerk_name) 
+        references j3_clerk;
+
+    alter table j3_contact 
+        add constraint FK7551BEEABEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_contact_descr 
+        add constraint FK56CA9E6C2E3FD94F 
+        foreign key (contact_id) 
+        references j3_contact;
+
+    alter table j3_discovery_url 
+        add constraint FKA042FDAABEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_email 
+        add constraint FK34F910E62E3FD94F 
+        foreign key (contact_id) 
+        references j3_contact;
+
+    alter table j3_instance_details_descr 
+        add constraint FK3CC165902B115C6F 
+        foreign key (tmodel_instance_info_id) 
+        references j3_tmodel_instance_info;
+
+    alter table j3_instance_details_doc_descr 
+        add constraint FK447324492B115C6F 
+        foreign key (tmodel_instance_info_id) 
+        references j3_tmodel_instance_info;
+
+    alter table j3_keyed_reference 
+        add constraint FK350C8454E075C8D7 
+        foreign key (keyed_reference_group_id) 
+        references j3_keyed_reference_group;
+
+    alter table j3_keyed_reference 
+        add constraint FK350C84541DB72652 
+        foreign key (category_bag_id) 
+        references j3_category_bag;
+
+    alter table j3_keyed_reference_group 
+        add constraint FKF6224ED41DB72652 
+        foreign key (category_bag_id) 
+        references j3_category_bag;
+
+    alter table j3_overview_doc 
+        add constraint FK5CD8D0E8C5BF8903 
+        foreign key (entity_key) 
+        references j3_tmodel;
+
+    alter table j3_overview_doc 
+        add constraint FK5CD8D0E8E8CE1B36 
+        foreign key (tomodel_instance_info_id) 
+        references j3_tmodel_instance_info;
+
+    alter table j3_overview_doc_descr 
+        add constraint FK36FB9EA9BDC711C 
+        foreign key (overview_doc_id) 
+        references j3_overview_doc;
+
+    alter table j3_person_name 
+        add constraint FKCB7B8AFF2E3FD94F 
+        foreign key (contact_id) 
+        references j3_contact;
+
+    alter table j3_phone 
+        add constraint FK359202B82E3FD94F 
+        foreign key (contact_id) 
+        references j3_contact;
+
+    alter table j3_publisher_assertion 
+        add constraint FK8A102449E3544929 
+        foreign key (to_key) 
+        references j3_business_entity;
+
+    alter table j3_publisher_assertion 
+        add constraint FK8A102449CCEE22D8 
+        foreign key (from_key) 
+        references j3_business_entity;
+
+    alter table j3_service_category_bag 
+        add constraint FK185A68076A68D45A 
+        foreign key (id) 
+        references j3_category_bag;
+
+    alter table j3_service_category_bag 
+        add constraint FK185A680748D0656D 
+        foreign key (entity_key) 
+        references j3_business_service;
+
+    alter table j3_service_descr 
+        add constraint FKB6D63D4148D0656D 
+        foreign key (entity_key) 
+        references j3_business_service;
+
+    alter table j3_service_name 
+        add constraint FKCC1BE94B48D0656D 
+        foreign key (entity_key) 
+        references j3_business_service;
+
+    alter table j3_service_projection 
+        add constraint FK629F290F2E448F3F 
+        foreign key (service_key) 
+        references j3_business_service;
+
+    alter table j3_service_projection 
+        add constraint FK629F290FEF04CFEE 
+        foreign key (business_key) 
+        references j3_business_entity;
+
+    alter table j3_subscription_match 
+        add constraint FK5B9C2F19BEEE42E5 
+        foreign key (subscription_key) 
+        references j3_subscription;
+
+    alter table j3_tmodel 
+        add constraint FK83C8072BD1823CA5 
+        foreign key (entity_key) 
+        references j3_uddi_entity;
+
+    alter table j3_tmodel_category_bag 
+        add constraint FK7E0859DB6A68D45A 
+        foreign key (id) 
+        references j3_category_bag;
+
+    alter table j3_tmodel_category_bag 
+        add constraint FK7E0859DBC5BF8903 
+        foreign key (entity_key) 
+        references j3_tmodel;
+
+    alter table j3_tmodel_descr 
+        add constraint FK63DFF1EDC5BF8903 
+        foreign key (entity_key) 
+        references j3_tmodel;
+
+    alter table j3_tmodel_identifier 
+        add constraint FKD5FB623DC5BF8903 
+        foreign key (entity_key) 
+        references j3_tmodel;
+
+    alter table j3_tmodel_instance_info 
+        add constraint FKDC6C9004CFBD88B7 
+        foreign key (entity_key) 
+        references j3_binding_template;
+
+    alter table j3_tmodel_instance_info_descr 
+        add constraint FKD826B4062B115C6F 
+        foreign key (tmodel_instance_info_id) 
+        references j3_tmodel_instance_info;
+
+    alter table j3_transfer_token_keys 
+        add constraint FK8BBF49185ED9DD48 
+        foreign key (transfer_token) 
+        references j3_transfer_token;
+
+    create sequence juddi_sequence;

Added: labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/sqlserver/import.sql
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/sqlserver/import.sql	                        (rev 0)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/juddi-sql/sqlserver/import.sql	2010-05-14 12:28:10 UTC (rev 32889)
@@ -0,0 +1,629 @@
+
+    create table j3_address (
+        id numeric(19,0) identity not null,
+        sort_code varchar(10) null,
+        tmodel_key varchar(255) null,
+        use_type varchar(255) null,
+        address_id numeric(19,0) not null,
+        primary key (id)
+    );
+
+    create table j3_address_line (
+        id numeric(19,0) identity not null,
+        key_name varchar(255) null,
+        key_value varchar(255) null,
+        line varchar(80) not null,
+        address_id numeric(19,0) not null,
+        primary key (id)
+    );
+
+    create table j3_auth_token (
+        auth_token varchar(51) not null,
+        authorized_name varchar(255) not null,
+        created datetime not null,
+        last_used datetime not null,
+        number_of_uses int not null,
+        token_state int not null,
+        primary key (auth_token)
+    );
+
+    create table j3_binding_category_bag (
+        id numeric(19,0) not null,
+        entity_key varchar(255) not null,
+        primary key (id),
+        unique (entity_key)
+    );
+
+    create table j3_binding_descr (
+        id numeric(19,0) identity not null,
+        descr varchar(1024) not null,
+        lang_code varchar(5) null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_binding_template (
+        access_point_type varchar(255) null,
+        access_point_url varchar(4000) null,
+        hosting_redirector varchar(255) null,
+        entity_key varchar(255) not null,
+        service_key varchar(255) not null,
+        primary key (entity_key)
+    );
+
+    create table j3_business_category_bag (
+        id numeric(19,0) not null,
+        entity_key varchar(255) not null,
+        primary key (id),
+        unique (entity_key)
+    );
+
+    create table j3_business_descr (
+        id numeric(19,0) identity not null,
+        descr varchar(1024) not null,
+        lang_code varchar(5) null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_business_entity (
+        entity_key varchar(255) not null,
+        primary key (entity_key)
+    );
+
+    create table j3_business_identifier (
+        id numeric(19,0) identity not null,
+        key_name varchar(255) null,
+        key_value varchar(255) not null,
+        tmodel_key_ref varchar(255) null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_business_name (
+        id numeric(19,0) identity not null,
+        lang_code varchar(5) null,
+        name varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_business_service (
+        entity_key varchar(255) not null,
+        business_key varchar(255) not null,
+        primary key (entity_key)
+    );
+
+    create table j3_category_bag (
+        id numeric(19,0) identity not null,
+        primary key (id)
+    );
+
+    create table j3_clerk (
+        clerk_name varchar(255) not null,
+        cred varchar(255) null,
+        publisher_id varchar(255) not null,
+        node_name varchar(255) null,
+        primary key (clerk_name)
+    );
+
+    create table j3_client_subscriptioninfo (
+        subscription_key varchar(255) not null,
+        last_notified datetime null,
+        fromClerk_clerk_name varchar(255) null,
+        toClerk_clerk_name varchar(255) null,
+        primary key (subscription_key)
+    );
+
+    create table j3_contact (
+        id numeric(19,0) identity not null,
+        use_type varchar(255) null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_contact_descr (
+        id numeric(19,0) identity not null,
+        descr varchar(1024) not null,
+        lang_code varchar(5) null,
+        contact_id numeric(19,0) not null,
+        primary key (id)
+    );
+
+    create table j3_discovery_url (
+        id numeric(19,0) identity not null,
+        url varchar(255) not null,
+        use_type varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_email (
+        id numeric(19,0) identity not null,
+        email_address varchar(255) not null,
+        use_type varchar(255) null,
+        contact_id numeric(19,0) not null,
+        primary key (id)
+    );
+
+    create table j3_instance_details_descr (
+        id numeric(19,0) identity not null,
+        descr varchar(1024) not null,
+        lang_code varchar(5) null,
+        tmodel_instance_info_id numeric(19,0) not null,
+        primary key (id)
+    );
+
+    create table j3_instance_details_doc_descr (
+        id numeric(19,0) identity not null,
+        descr varchar(1024) not null,
+        lang_code varchar(5) null,
+        tmodel_instance_info_id numeric(19,0) not null,
+        primary key (id)
+    );
+
+    create table j3_keyed_reference (
+        id numeric(19,0) identity not null,
+        key_name varchar(255) null,
+        key_value varchar(255) not null,
+        tmodel_key_ref varchar(255) null,
+        category_bag_id numeric(19,0) null,
+        keyed_reference_group_id numeric(19,0) null,
+        primary key (id)
+    );
+
+    create table j3_keyed_reference_group (
+        id numeric(19,0) identity not null,
+        tmodel_key varchar(255) null,
+        category_bag_id numeric(19,0) not null,
+        primary key (id)
+    );
+
+    create table j3_node (
+        name varchar(255) not null,
+        custody_transfer_url varchar(255) not null,
+        factory_initial varchar(255) null,
+        factory_naming_provider varchar(255) null,
+        factory_url_pkgs varchar(255) null,
+        inquiry_url varchar(255) not null,
+        juddi_api_url varchar(255) null,
+        manager_name varchar(255) not null,
+        proxy_transport varchar(255) not null,
+        publish_url varchar(255) not null,
+        security_url varchar(255) not null,
+        subscription_url varchar(255) not null,
+        primary key (name)
+    );
+
+    create table j3_overview_doc (
+        id numeric(19,0) identity not null,
+        overview_url varchar(255) not null,
+        overview_url_use_type varchar(255) null,
+        entity_key varchar(255) null,
+        tomodel_instance_info_id numeric(19,0) null,
+        primary key (id)
+    );
+
+    create table j3_overview_doc_descr (
+        id numeric(19,0) identity not null,
+        descr varchar(1024) not null,
+        lang_code varchar(5) null,
+        overview_doc_id numeric(19,0) null,
+        primary key (id)
+    );
+
+    create table j3_person_name (
+        id numeric(19,0) identity not null,
+        lang_code varchar(5) null,
+        name varchar(255) not null,
+        contact_id numeric(19,0) not null,
+        primary key (id)
+    );
+
+    create table j3_phone (
+        id numeric(19,0) identity not null,
+        phone_number varchar(50) not null,
+        use_type varchar(255) null,
+        contact_id numeric(19,0) not null,
+        primary key (id)
+    );
+
+    create table j3_publisher (
+        authorized_name varchar(255) not null,
+        email_address varchar(255) null,
+        is_admin varchar(5) null,
+        is_enabled varchar(5) null,
+        max_bindings_per_service int null,
+        max_businesses int null,
+        max_services_per_business int null,
+        max_tmodels int null,
+        publisher_name varchar(255) not null,
+        primary key (authorized_name)
+    );
+
+    create table j3_publisher_assertion (
+        from_key varchar(255) not null,
+        to_key varchar(255) not null,
+        from_check varchar(5) not null,
+        key_name varchar(255) not null,
+        key_value varchar(255) not null,
+        tmodel_key varchar(255) not null,
+        to_check varchar(5) not null,
+        primary key (from_key, to_key)
+    );
+
+    create table j3_service_category_bag (
+        id numeric(19,0) not null,
+        entity_key varchar(255) not null,
+        primary key (id),
+        unique (entity_key)
+    );
+
+    create table j3_service_descr (
+        id numeric(19,0) identity not null,
+        descr varchar(1024) not null,
+        lang_code varchar(5) null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_service_name (
+        id numeric(19,0) identity not null,
+        lang_code varchar(5) null,
+        name varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_service_projection (
+        business_key varchar(255) not null,
+        service_key varchar(255) not null,
+        primary key (business_key, service_key)
+    );
+
+    create table j3_subscription (
+        subscription_key varchar(255) not null,
+        authorized_name varchar(255) not null,
+        binding_key varchar(255) null,
+        brief tinyint null,
+        create_date datetime not null,
+        expires_after datetime null,
+        last_notified datetime null,
+        max_entities int null,
+        notification_interval varchar(255) null,
+        subscription_filter text not null,
+        primary key (subscription_key)
+    );
+
+    create table j3_subscription_chunk_token (
+        chunk_token varchar(255) not null,
+        data int not null,
+        end_point datetime null,
+        expires_after datetime not null,
+        start_point datetime null,
+        subscription_key varchar(255) not null,
+        primary key (chunk_token)
+    );
+
+    create table j3_subscription_match (
+        id numeric(19,0) identity not null,
+        entity_key varchar(255) not null,
+        subscription_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_tmodel (
+        deleted tinyint null,
+        lang_code varchar(5) null,
+        name varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (entity_key)
+    );
+
+    create table j3_tmodel_category_bag (
+        id numeric(19,0) not null,
+        entity_key varchar(255) not null,
+        primary key (id),
+        unique (entity_key)
+    );
+
+    create table j3_tmodel_descr (
+        id numeric(19,0) identity not null,
+        descr varchar(1024) not null,
+        lang_code varchar(5) null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_tmodel_identifier (
+        id numeric(19,0) identity not null,
+        key_name varchar(255) null,
+        key_value varchar(255) not null,
+        tmodel_key_ref varchar(255) null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_tmodel_instance_info (
+        id numeric(19,0) identity not null,
+        instance_parms varchar(512) null,
+        tmodel_key varchar(255) not null,
+        entity_key varchar(255) not null,
+        primary key (id)
+    );
+
+    create table j3_tmodel_instance_info_descr (
+        id numeric(19,0) identity not null,
+        descr varchar(1024) not null,
+        lang_code varchar(5) null,
+        tmodel_instance_info_id numeric(19,0) not null,
+        primary key (id)
+    );
+
+    create table j3_transfer_token (
+        transfer_token varchar(51) not null,
+        expiration_date datetime not null,
+        primary key (transfer_token)
+    );
+
+    create table j3_transfer_token_keys (
+        id numeric(19,0) identity not null,
+        entity_key varchar(255) null,
+        transfer_token varchar(51) not null,
+        primary key (id)
+    );
+
+    create table j3_uddi_entity (
+        entity_key varchar(255) not null,
+        authorized_name varchar(255) not null,
+        created datetime null,
+        modified datetime not null,
+        modified_including_children datetime null,
+        node_id varchar(255) null,
+        primary key (entity_key)
+    );
+
+    alter table j3_address 
+        add constraint FKF83236BE75D860FB 
+        foreign key (address_id) 
+        references j3_contact;
+
+    alter table j3_address_line 
+        add constraint FKC665B8D5F8B8D8CF 
+        foreign key (address_id) 
+        references j3_address;
+
+    alter table j3_binding_category_bag 
+        add constraint FKCF34B2376A68D45A 
+        foreign key (id) 
+        references j3_category_bag;
+
+    alter table j3_binding_category_bag 
+        add constraint FKCF34B237CFBD88B7 
+        foreign key (entity_key) 
+        references j3_binding_template;
+
+    alter table j3_binding_descr 
+        add constraint FK5EA60911CFBD88B7 
+        foreign key (entity_key) 
+        references j3_binding_template;
+
+    alter table j3_binding_template 
+        add constraint FKD044BD6A2E448F3F 
+        foreign key (service_key) 
+        references j3_business_service;
+
+    alter table j3_binding_template 
+        add constraint FKD044BD6AD1823CA5 
+        foreign key (entity_key) 
+        references j3_uddi_entity;
+
+    alter table j3_business_category_bag 
+        add constraint FKD6D3ECB06A68D45A 
+        foreign key (id) 
+        references j3_category_bag;
+
+    alter table j3_business_category_bag 
+        add constraint FKD6D3ECB0BEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_business_descr 
+        add constraint FK3A24B4B8BEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_business_entity 
+        add constraint FKCA61A0CD1823CA5 
+        foreign key (entity_key) 
+        references j3_uddi_entity;
+
+    alter table j3_business_identifier 
+        add constraint FKB0C7A652BEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_business_name 
+        add constraint FK43F526F4BEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_business_service 
+        add constraint FK5D4255ACD1823CA5 
+        foreign key (entity_key) 
+        references j3_uddi_entity;
+
+    alter table j3_business_service 
+        add constraint FK5D4255ACEF04CFEE 
+        foreign key (business_key) 
+        references j3_business_entity;
+
+    alter table j3_clerk 
+        add constraint FK34DC7D9F6BB0F935 
+        foreign key (node_name) 
+        references j3_node;
+
+    alter table j3_client_subscriptioninfo 
+        add constraint FKDF04CC095BFC6733 
+        foreign key (fromClerk_clerk_name) 
+        references j3_clerk;
+
+    alter table j3_client_subscriptioninfo 
+        add constraint FKDF04CC09F3CE9C04 
+        foreign key (toClerk_clerk_name) 
+        references j3_clerk;
+
+    alter table j3_contact 
+        add constraint FK7551BEEABEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_contact_descr 
+        add constraint FK56CA9E6C2E3FD94F 
+        foreign key (contact_id) 
+        references j3_contact;
+
+    alter table j3_discovery_url 
+        add constraint FKA042FDAABEB92A91 
+        foreign key (entity_key) 
+        references j3_business_entity;
+
+    alter table j3_email 
+        add constraint FK34F910E62E3FD94F 
+        foreign key (contact_id) 
+        references j3_contact;
+
+    alter table j3_instance_details_descr 
+        add constraint FK3CC165902B115C6F 
+        foreign key (tmodel_instance_info_id) 
+        references j3_tmodel_instance_info;
+
+    alter table j3_instance_details_doc_descr 
+        add constraint FK447324492B115C6F 
+        foreign key (tmodel_instance_info_id) 
+        references j3_tmodel_instance_info;
+
+    alter table j3_keyed_reference 
+        add constraint FK350C8454E075C8D7 
+        foreign key (keyed_reference_group_id) 
+        references j3_keyed_reference_group;
+
+    alter table j3_keyed_reference 
+        add constraint FK350C84541DB72652 
+        foreign key (category_bag_id) 
+        references j3_category_bag;
+
+    alter table j3_keyed_reference_group 
+        add constraint FKF6224ED41DB72652 
+        foreign key (category_bag_id) 
+        references j3_category_bag;
+
+    alter table j3_overview_doc 
+        add constraint FK5CD8D0E8C5BF8903 
+        foreign key (entity_key) 
+        references j3_tmodel;
+
+    alter table j3_overview_doc 
+        add constraint FK5CD8D0E8E8CE1B36 
+        foreign key (tomodel_instance_info_id) 
+        references j3_tmodel_instance_info;
+
+    alter table j3_overview_doc_descr 
+        add constraint FK36FB9EA9BDC711C 
+        foreign key (overview_doc_id) 
+        references j3_overview_doc;
+
+    alter table j3_person_name 
+        add constraint FKCB7B8AFF2E3FD94F 
+        foreign key (contact_id) 
+        references j3_contact;
+
+    alter table j3_phone 
+        add constraint FK359202B82E3FD94F 
+        foreign key (contact_id) 
+        references j3_contact;
+
+    alter table j3_publisher_assertion 
+        add constraint FK8A102449E3544929 
+        foreign key (to_key) 
+        references j3_business_entity;
+
+    alter table j3_publisher_assertion 
+        add constraint FK8A102449CCEE22D8 
+        foreign key (from_key) 
+        references j3_business_entity;
+
+    alter table j3_service_category_bag 
+        add constraint FK185A68076A68D45A 
+        foreign key (id) 
+        references j3_category_bag;
+
+    alter table j3_service_category_bag 
+        add constraint FK185A680748D0656D 
+        foreign key (entity_key) 
+        references j3_business_service;
+
+    alter table j3_service_descr 
+        add constraint FKB6D63D4148D0656D 
+        foreign key (entity_key) 
+        references j3_business_service;
+
+    alter table j3_service_name 
+        add constraint FKCC1BE94B48D0656D 
+        foreign key (entity_key) 
+        references j3_business_service;
+
+    alter table j3_service_projection 
+        add constraint FK629F290F2E448F3F 
+        foreign key (service_key) 
+        references j3_business_service;
+
+    alter table j3_service_projection 
+        add constraint FK629F290FEF04CFEE 
+        foreign key (business_key) 
+        references j3_business_entity;
+
+    alter table j3_subscription_match 
+        add constraint FK5B9C2F19BEEE42E5 
+        foreign key (subscription_key) 
+        references j3_subscription;
+
+    alter table j3_tmodel 
+        add constraint FK83C8072BD1823CA5 
+        foreign key (entity_key) 
+        references j3_uddi_entity;
+
+    alter table j3_tmodel_category_bag 
+        add constraint FK7E0859DB6A68D45A 
+        foreign key (id) 
+        references j3_category_bag;
+
+    alter table j3_tmodel_category_bag 
+        add constraint FK7E0859DBC5BF8903 
+        foreign key (entity_key) 
+        references j3_tmodel;
+
+    alter table j3_tmodel_descr 
+        add constraint FK63DFF1EDC5BF8903 
+        foreign key (entity_key) 
+        references j3_tmodel;
+
+    alter table j3_tmodel_identifier 
+        add constraint FKD5FB623DC5BF8903 
+        foreign key (entity_key) 
+        references j3_tmodel;
+
+    alter table j3_tmodel_instance_info 
+        add constraint FKDC6C9004CFBD88B7 
+        foreign key (entity_key) 
+        references j3_binding_template;
+
+    alter table j3_tmodel_instance_info_descr 
+        add constraint FKD826B4062B115C6F 
+        foreign key (tmodel_instance_info_id) 
+        references j3_tmodel_instance_info;
+
+    alter table j3_transfer_token_keys 
+        add constraint FK8BBF49185ED9DD48 
+        foreign key (transfer_token) 
+        references j3_transfer_token;

Modified: labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/persistence.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/persistence.xml	2010-05-14 12:17:52 UTC (rev 32888)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/install/jUDDI-registryV3/persistence.xml	2010-05-14 12:28:10 UTC (rev 32889)
@@ -61,7 +61,6 @@
 
     <properties>
       <property name="hibernate.archive.autodetection" value="class"/>
-      <property name="hibernate.hbm2ddl.auto" value="create"/>
       <property name="hibernate.show_sql" value="false"/>
 
       <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect" />

Modified: labs/jbossesb/branches/JBESB_4_7_CP/product/install/registry-jboss-service-jbossas5.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/install/registry-jboss-service-jbossas5.xml	2010-05-14 12:17:52 UTC (rev 32888)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/install/registry-jboss-service-jbossas5.xml	2010-05-14 12:28:10 UTC (rev 32889)
@@ -14,7 +14,7 @@
 		<attribute name="NumThreads">20</attribute>
 		<attribute name="Timeout">20</attribute>
 
-		<depends>jboss.jca:service=DataSourceBinding,name=juddiDB</depends>
+		<depends>jboss.esb:service=JUDDIDatabaseInitializer</depends>
 		<depends>jboss.esb:service=PropertyService</depends>
 	</mbean>
 	<loader-repository>

Modified: labs/jbossesb/branches/JBESB_4_7_CP/product/install/registry-jboss-service.xml
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/install/registry-jboss-service.xml	2010-05-14 12:17:52 UTC (rev 32888)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/install/registry-jboss-service.xml	2010-05-14 12:28:10 UTC (rev 32889)
@@ -7,7 +7,7 @@
 		<attribute name="NumThreads">20</attribute>
 		<attribute name="Timeout">20</attribute>
 
-		<depends>jboss.jca:service=DataSourceBinding,name=juddiDB</depends>
+		<depends>jboss.esb:service=JUDDIDatabaseInitializer</depends>
 		<depends>jboss.esb:service=PropertyService</depends>
 	</mbean>
 	<loader-repository>



More information about the jboss-svn-commits mailing list