Oracle and MS SQL Server successfully verified
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/7a816095 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/7a816095 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/7a816095 Branch: refs/heads/SYNCOPE-156 Commit: 7a8160953af3034426cb934b721967e1de60bb32 Parents: 91146a4 Author: Francesco Chicchiriccò <[email protected]> Authored: Thu Sep 3 13:01:29 2015 +0200 Committer: Francesco Chicchiriccò <[email protected]> Committed: Thu Sep 3 13:01:29 2015 +0200 ---------------------------------------------------------------------- .../core/persistence/jpa/dao/SearchSupport.java | 6 ++-- .../jpa/entity/user/JPADynRoleMembership.java | 2 +- .../jpa/entity/user/JPAUDynGroupMembership.java | 2 +- .../src/main/resources/indexes.xml | 8 +++--- .../src/main/resources/views.xml | 24 ++++++++-------- fit/core-reference/pom.xml | 8 +++++- .../resources/oracle/domains/Master.properties | 28 ++++++++++++++++++ .../resources/oracle/persistence.properties | 30 -------------------- .../resources/oracle/provisioning.properties | 24 ++++++++++++++++ .../sqlserver/domains/Master.properties | 28 ++++++++++++++++++ .../resources/sqlserver/persistence.properties | 30 -------------------- .../resources/sqlserver/provisioning.properties | 24 ++++++++++++++++ 12 files changed, 132 insertions(+), 82 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/syncope/blob/7a816095/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/SearchSupport.java ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/SearchSupport.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/SearchSupport.java index 77be714..e87a22e 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/SearchSupport.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/SearchSupport.java @@ -122,7 +122,7 @@ class SearchSupport { public SearchView dyngroupmembership() { String kind = anyTypeKind == AnyTypeKind.USER ? "u" : "a"; - return new SearchView("sv" + kind + "dgm", field().name + "_" + kind + "dyngroupmembership"); + return new SearchView("sv" + kind + "dgm", field().name + "_" + kind + "dyngmemb"); } public SearchView role() { @@ -130,7 +130,7 @@ class SearchSupport { } public SearchView dynrolemembership() { - return new SearchView("svdr", field().name + "_dynrolemembership"); + return new SearchView("svdr", field().name + "_dynrmemb"); } public SearchView nullAttr() { @@ -142,7 +142,7 @@ class SearchSupport { } public SearchView groupResource() { - return new SearchView("svrr", field().name + "_group_resource"); + return new SearchView("svrr", field().name + "_group_res"); } public SearchView uniqueAttr() { http://git-wip-us.apache.org/repos/asf/syncope/blob/7a816095/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/user/JPADynRoleMembership.java ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/user/JPADynRoleMembership.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/user/JPADynRoleMembership.java index f812b28..96575d1 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/user/JPADynRoleMembership.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/user/JPADynRoleMembership.java @@ -46,7 +46,7 @@ public class JPADynRoleMembership extends AbstractUDynMembership implements DynR private JPARole role; @ManyToMany - @JoinTable(joinColumns = + @JoinTable(name = TABLE + "_User", joinColumns = @JoinColumn(name = "dynRoleMembership_id"), inverseJoinColumns = @JoinColumn(name = "user_id")) http://git-wip-us.apache.org/repos/asf/syncope/blob/7a816095/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/user/JPAUDynGroupMembership.java ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/user/JPAUDynGroupMembership.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/user/JPAUDynGroupMembership.java index ac150dc..a40bf91 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/user/JPAUDynGroupMembership.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/user/JPAUDynGroupMembership.java @@ -46,7 +46,7 @@ public class JPAUDynGroupMembership extends AbstractUDynMembership implements UD private JPAGroup group; @ManyToMany - @JoinTable(joinColumns = + @JoinTable(name = TABLE + "_User", joinColumns = @JoinColumn(name = "uDynGroupMembership_id"), inverseJoinColumns = @JoinColumn(name = "user_id")) http://git-wip-us.apache.org/repos/asf/syncope/blob/7a816095/core/persistence-jpa/src/main/resources/indexes.xml ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/main/resources/indexes.xml b/core/persistence-jpa/src/main/resources/indexes.xml index ff42b84..f5ae8f7 100644 --- a/core/persistence-jpa/src/main/resources/indexes.xml +++ b/core/persistence-jpa/src/main/resources/indexes.xml @@ -55,10 +55,10 @@ under the License. <entry key="ARelationship_RightIndex">CREATE INDEX ARelationship_RightIndex ON ARelationship(right_anyObject_id)</entry> <entry key="ARelationship_AnyObjectIndex">CREATE INDEX ARelationship_AnyObjectIndex ON ARelationship(left_anyObject_id)</entry> - <entry key="UPlainAttrValue_attributeIdIndex">CREATE INDEX UPlainAttrValue_attributeIdIndex on UPlainAttrValue(attribute_id)</entry> - <entry key="GPlainAttrValue_attributeIdIndex">CREATE INDEX GPlainAttrValue_attributeIdIndex on GPlainAttrValue(attribute_id)</entry> - <entry key="APlainAttrValue_attributeIdIndex">CREATE INDEX APlainAttrValue_attributeIdIndex on APlainAttrValue(attribute_id)</entry> - <entry key="CPlainAttrValue_attributeIdIndex">CREATE INDEX CPlainAttrValue_attributeIdIndex on CPlainAttrValue(attribute_id)</entry> + <entry key="UPlainAttrValue_attrIndex">CREATE INDEX UPlainAttrValue_attrIndex on UPlainAttrValue(attribute_id)</entry> + <entry key="GPlainAttrValue_attrIndex">CREATE INDEX GPlainAttrValue_attrIndex on GPlainAttrValue(attribute_id)</entry> + <entry key="APlainAttrValue_attrIndex">CREATE INDEX APlainAttrValue_attrIndex on APlainAttrValue(attribute_id)</entry> + <entry key="CPlainAttrValue_attrIndex">CREATE INDEX CPlainAttrValue_attrIndex on CPlainAttrValue(attribute_id)</entry> <entry key="UPlainAttr_owner_id_index">CREATE INDEX UPlainAttr_owner_id_index on UPlainAttr(owner_id)</entry> <entry key="GPlainAttr_owner_id_index">CREATE INDEX GPlainAttr_owner_id_index on GPlainAttr(owner_id)</entry> http://git-wip-us.apache.org/repos/asf/syncope/blob/7a816095/core/persistence-jpa/src/main/resources/views.xml ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/main/resources/views.xml b/core/persistence-jpa/src/main/resources/views.xml index a00b786..2e14834 100644 --- a/core/persistence-jpa/src/main/resources/views.xml +++ b/core/persistence-jpa/src/main/resources/views.xml @@ -80,11 +80,11 @@ under the License. FROM UMembership m, SyncopeGroup g WHERE m.group_id = g.id </entry> - <entry key="user_search_udyngroupmembership"> - CREATE VIEW user_search_udyngroupmembership AS + <entry key="user_search_udyngmemb"> + CREATE VIEW user_search_udyngmemb AS SELECT ds.user_id AS any_id, d.group_id AS group_id - FROM UDynGroupMembership d, UDynGroupMembership_SyncopeUser ds + FROM UDynGroupMembership d, UDynGroupMembership_User ds WHERE d.id = ds.uDynGroupMembership_id </entry> <entry key="user_search_role"> @@ -93,11 +93,11 @@ under the License. SELECT ss.user_id AS any_id, ss.role_id AS role_id FROM SyncopeUser_SyncopeRole ss </entry> - <entry key="user_search_dynrolemembership"> - CREATE VIEW user_search_dynrolemembership AS + <entry key="user_search_dynrmemb"> + CREATE VIEW user_search_dynrmemb AS SELECT ds.user_id AS any_id, d.role_id AS role_id - FROM DynRoleMembership d, DynRoleMembership_SyncopeUser ds + FROM DynRoleMembership d, DynRoleMembership_User ds WHERE d.id = ds.dynRoleMembership_id </entry> <entry key="user_search_resource"> @@ -106,8 +106,8 @@ under the License. SELECT st.user_id AS any_id, st.resource_name AS resource_name FROM SyncopeUser_ExternalResource st </entry> - <entry key="user_search_group_resource"> - CREATE VIEW user_search_group_resource AS + <entry key="user_search_group_res"> + CREATE VIEW user_search_group_res AS SELECT m.user_id AS any_id, st.resource_name AS resource_name FROM UMembership m, SyncopeGroup r, SyncopeGroup_ExternalResource st @@ -173,8 +173,8 @@ under the License. FROM AMembership m, SyncopeGroup g WHERE m.group_id = g.id </entry> - <entry key="anyObject_search_adyngroupmembership"> - CREATE VIEW anyObject_search_adyngroupmembership AS + <entry key="anyObject_search_adyngmemb"> + CREATE VIEW anyObject_search_adyngmemb AS SELECT ds.anyObject_id AS any_id, d.group_id AS group_id FROM ADynGroupMembership d, ADynGroupMembership_AnyObject ds @@ -186,8 +186,8 @@ under the License. SELECT st.anyObject_id AS any_id, st.resource_name AS resource_name FROM AnyObject_ExternalResource st </entry> - <entry key="anyObject_search_group_resource"> - CREATE VIEW anyObject_search_group_resource AS + <entry key="anyObject_search_group_res"> + CREATE VIEW anyObject_search_group_res AS SELECT m.anyObject_id AS any_id, st.resource_name AS resource_name FROM AMembership m, SyncopeGroup r, SyncopeGroup_ExternalResource st http://git-wip-us.apache.org/repos/asf/syncope/blob/7a816095/fit/core-reference/pom.xml ---------------------------------------------------------------------- diff --git a/fit/core-reference/pom.xml b/fit/core-reference/pom.xml index a3d825b..781e147 100644 --- a/fit/core-reference/pom.xml +++ b/fit/core-reference/pom.xml @@ -470,7 +470,7 @@ under the License. <dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc6</artifactId> - <version>11.1.0</version> + <version>11.2.0.4</version> <scope>test</scope> </dependency> </dependencies> @@ -482,6 +482,9 @@ under the License. <resource> <directory>src/main/resources</directory> <filtering>true</filtering> + <excludes> + <exclude>provisioning.properties</exclude> + </excludes> </resource> <resource> <directory>src/main/resources/oracle</directory> @@ -515,6 +518,9 @@ under the License. <resource> <directory>src/main/resources</directory> <filtering>true</filtering> + <excludes> + <exclude>provisioning.properties</exclude> + </excludes> </resource> <resource> <directory>src/main/resources/sqlserver</directory> http://git-wip-us.apache.org/repos/asf/syncope/blob/7a816095/fit/core-reference/src/main/resources/oracle/domains/Master.properties ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/main/resources/oracle/domains/Master.properties b/fit/core-reference/src/main/resources/oracle/domains/Master.properties new file mode 100644 index 0000000..3623c2d --- /dev/null +++ b/fit/core-reference/src/main/resources/oracle/domains/Master.properties @@ -0,0 +1,28 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +Master.driverClassName=oracle.jdbc.OracleDriver +Master.url=jdbc:oracle:thin:@pioppo:1521:orcl +Master.schema=SYNCOPE +Master.username=syncope +Master.password=syncope +Master.databasePlatform=org.apache.openjpa.jdbc.sql.OracleDictionary +Master.orm=META-INF/spring-orm-oracle.xml + +# note: other connection pool settings can also be configured here, see DataSource definition +Master.pool.validationQuery=SELECT 1 FROM DUAL + +Master.audit.sql=audit_oracle.sql http://git-wip-us.apache.org/repos/asf/syncope/blob/7a816095/fit/core-reference/src/main/resources/oracle/persistence.properties ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/main/resources/oracle/persistence.properties b/fit/core-reference/src/main/resources/oracle/persistence.properties deleted file mode 100644 index 687282d..0000000 --- a/fit/core-reference/src/main/resources/oracle/persistence.properties +++ /dev/null @@ -1,30 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -content.directory=${conf.directory} -jpa.driverClassName=oracle.jdbc.OracleDriver -jpa.url=jdbc:oracle:thin:@pioppo:1521:orcl -jpa.username=syncope -jpa.password=syncope -jpa.dialect=org.apache.openjpa.jdbc.sql.OracleDictionary -jpa.pool.validationQuery=SELECT 1 FROM DUAL -jpa.orm=META-INF/spring-orm-oracle.xml -#note: other connection pool settings can also be configured here, see persistenceContext.xml -quartz.jobstore=org.quartz.impl.jdbcjobstore.oracle.OracleDelegate -quartz.scheduler.idleWaitTime=5000 -quartz.sql=tables_oracle.sql -audit.sql=audit_oracle.sql -database.schema=SYNCOPE http://git-wip-us.apache.org/repos/asf/syncope/blob/7a816095/fit/core-reference/src/main/resources/oracle/provisioning.properties ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/main/resources/oracle/provisioning.properties b/fit/core-reference/src/main/resources/oracle/provisioning.properties new file mode 100644 index 0000000..22071c0 --- /dev/null +++ b/fit/core-reference/src/main/resources/oracle/provisioning.properties @@ -0,0 +1,24 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +userProvisioningManager=org.apache.syncope.core.provisioning.java.DefaultUserProvisioningManager +groupProvisioningManager=org.apache.syncope.core.provisioning.java.DefaultGroupProvisioningManager +anyObjectProvisioningManager=org.apache.syncope.core.provisioning.java.DefaultAnyObjectProvisioningManager +virAttrCache=org.apache.syncope.core.provisioning.java.cache.MemoryVirAttrCache + +quartz.jobstore=org.quartz.impl.jdbcjobstore.oracle.OracleDelegate +quartz.sql=tables_oracle.sql +quartz.scheduler.idleWaitTime=5000 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/syncope/blob/7a816095/fit/core-reference/src/main/resources/sqlserver/domains/Master.properties ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/main/resources/sqlserver/domains/Master.properties b/fit/core-reference/src/main/resources/sqlserver/domains/Master.properties new file mode 100644 index 0000000..3dcce44 --- /dev/null +++ b/fit/core-reference/src/main/resources/sqlserver/domains/Master.properties @@ -0,0 +1,28 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +Master.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver +Master.url=jdbc:sqlserver://acacia:1433;database=syncope;selectMethod=cursor;sendStringParametersAsUnicode=false +Master.schema=dbo +Master.username=syncope +Master.password=syncope +Master.databasePlatform=org.apache.openjpa.jdbc.sql.SQLServerDictionary +Master.orm=META-INF/spring-orm-sqlserver.xml + +# note: other connection pool settings can also be configured here, see DataSource definition +Master.pool.validationQuery=SELECT 1 + +Master.audit.sql=audit_sqlserver.sql http://git-wip-us.apache.org/repos/asf/syncope/blob/7a816095/fit/core-reference/src/main/resources/sqlserver/persistence.properties ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/main/resources/sqlserver/persistence.properties b/fit/core-reference/src/main/resources/sqlserver/persistence.properties deleted file mode 100644 index fa329d6..0000000 --- a/fit/core-reference/src/main/resources/sqlserver/persistence.properties +++ /dev/null @@ -1,30 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -content.directory=${conf.directory} -jpa.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver -jpa.url=jdbc:sqlserver://acacia:1433;database=syncope;selectMethod=cursor;sendStringParametersAsUnicode=false -jpa.username=syncope -jpa.password=syncope -jpa.dialect=org.apache.openjpa.jdbc.sql.SQLServerDictionary -jpa.pool.validationQuery=SELECT 1 -jpa.orm=META-INF/spring-orm-sqlserver.xml -#note: other connection pool settings can also be configured here, see persistenceContext.xml -quartz.jobstore=org.quartz.impl.jdbcjobstore.MSSQLDelegate -quartz.scheduler.idleWaitTime=5000 -quartz.sql=tables_sqlServer.sql -audit.sql=audit_sqlserver.sql -database.schema= http://git-wip-us.apache.org/repos/asf/syncope/blob/7a816095/fit/core-reference/src/main/resources/sqlserver/provisioning.properties ---------------------------------------------------------------------- diff --git a/fit/core-reference/src/main/resources/sqlserver/provisioning.properties b/fit/core-reference/src/main/resources/sqlserver/provisioning.properties new file mode 100644 index 0000000..5e0088e --- /dev/null +++ b/fit/core-reference/src/main/resources/sqlserver/provisioning.properties @@ -0,0 +1,24 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +userProvisioningManager=org.apache.syncope.core.provisioning.java.DefaultUserProvisioningManager +groupProvisioningManager=org.apache.syncope.core.provisioning.java.DefaultGroupProvisioningManager +anyObjectProvisioningManager=org.apache.syncope.core.provisioning.java.DefaultAnyObjectProvisioningManager +virAttrCache=org.apache.syncope.core.provisioning.java.cache.MemoryVirAttrCache + +quartz.jobstore=org.quartz.impl.jdbcjobstore.MSSQLDelegate +quartz.sql=tables_sqlServer.sql +quartz.scheduler.idleWaitTime=5000 \ No newline at end of file
