mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-01 14:41:46 +00:00
Backport/[MNT-24490] Reference for AlfrescoSQLServerDialect changed to SQLServerDialect
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
<!-- Resource defaultTransactionIsolation="-1" defaultAutoCommit="false" maxActive="100" initialSize="10" password="alfresco" username="alfresco" url="jdbc:mysql:///alfresco" driverClassName="org.gjt.mm.mysql.Driver" type="javax.sql.DataSource" auth="Container" name="jdbc/dataSource"/-->
|
<!-- Resource defaultTransactionIsolation="-1" defaultAutoCommit="false" maxActive="100" initialSize="10" password="alfresco" username="alfresco" url="jdbc:mysql:///alfresco" driverClassName="org.gjt.mm.mysql.Driver" type="javax.sql.DataSource" auth="Container" name="jdbc/dataSource"/-->
|
||||||
<Environment override="false" type="java.lang.Boolean" name="properties/startup.enable" description="A flag that globally enables or disables startup of the major Alfresco subsystems." value="true"/>
|
<Environment override="false" type="java.lang.Boolean" name="properties/startup.enable" description="A flag that globally enables or disables startup of the major Alfresco subsystems." value="true"/>
|
||||||
<Environment override="false" type="java.lang.String" name="properties/dir.root" description="The filesystem directory below which content and index data is stored. Should be on a shared disk if this is a clustered installation."/>
|
<Environment override="false" type="java.lang.String" name="properties/dir.root" description="The filesystem directory below which content and index data is stored. Should be on a shared disk if this is a clustered installation."/>
|
||||||
<Environment override="false" type="java.lang.String" name="properties/hibernate.dialect" description="The fully qualified name of a org.hibernate.dialect.Dialect subclass that allows Hibernate to generate SQL optimized for a particular relational database. Choose from org.hibernate.dialect.DerbyDialect, org.hibernate.dialect.MySQLInnoDBDialect, org.alfresco.repo.domain.hibernate.dialect.AlfrescoOracle9Dialect, org.alfresco.repo.domain.hibernate.dialect.AlfrescoSybaseAnywhereDialect, org.alfresco.repo.domain.hibernate.dialect.AlfrescoSQLServerDialect, org.hibernate.dialect.PostgreSQLDialect"/>
|
<Environment override="false" type="java.lang.String" name="properties/hibernate.dialect" description="The fully qualified name of a org.hibernate.dialect.Dialect subclass that allows Hibernate to generate SQL optimized for a particular relational database. Choose from org.hibernate.dialect.DerbyDialect, org.hibernate.dialect.MySQLInnoDBDialect, org.alfresco.repo.domain.hibernate.dialect.AlfrescoOracle9Dialect, org.alfresco.repo.domain.hibernate.dialect.AlfrescoSybaseAnywhereDialect, org.alfresco.repo.domain.hibernate.dialect.SQLServerDialect, org.hibernate.dialect.PostgreSQLDialect"/>
|
||||||
<Environment override="false" type="java.lang.String" name="properties/hibernate.query.substitutions" description="Mapping from tokens in Hibernate queries to SQL tokens. For PostgreSQL, set this to "true TRUE, false FALSE"."/>
|
<Environment override="false" type="java.lang.String" name="properties/hibernate.query.substitutions" description="Mapping from tokens in Hibernate queries to SQL tokens. For PostgreSQL, set this to "true TRUE, false FALSE"."/>
|
||||||
<Environment override="false" type="java.lang.Boolean" name="properties/hibernate.jdbc.use_get_generated_keys" description="Enable use of JDBC3 PreparedStatement.getGeneratedKeys() to retrieve natively generated keys after insert. Requires JDBC3+ driver. Set to false if your driver has problems with the Hibernate identifier generators. By default, tries to determine the driver capabilities using connection metadata."/>
|
<Environment override="false" type="java.lang.Boolean" name="properties/hibernate.jdbc.use_get_generated_keys" description="Enable use of JDBC3 PreparedStatement.getGeneratedKeys() to retrieve natively generated keys after insert. Requires JDBC3+ driver. Set to false if your driver has problems with the Hibernate identifier generators. By default, tries to determine the driver capabilities using connection metadata."/>
|
||||||
<Environment override="false" type="java.lang.String" name="properties/hibernate.default_schema" description="Qualify unqualified table names with the given schema/tablespace in generated SQL. It may be necessary to set this when the target database has more than one schema."/>
|
<Environment override="false" type="java.lang.String" name="properties/hibernate.default_schema" description="Qualify unqualified table names with the given schema/tablespace in generated SQL. It may be necessary to set this when the target database has more than one schema."/>
|
||||||
|
@@ -500,7 +500,7 @@
|
|||||||
org.hibernate.dialect.MySQLInnoDBDialect,
|
org.hibernate.dialect.MySQLInnoDBDialect,
|
||||||
org.alfresco.repo.domain.hibernate.dialect.AlfrescoOracle9Dialect,
|
org.alfresco.repo.domain.hibernate.dialect.AlfrescoOracle9Dialect,
|
||||||
org.alfresco.repo.domain.hibernate.dialect.AlfrescoSybaseAnywhereDialect,
|
org.alfresco.repo.domain.hibernate.dialect.AlfrescoSybaseAnywhereDialect,
|
||||||
org.alfresco.repo.domain.hibernate.dialect.AlfrescoSQLServerDialect, org.hibernate.dialect.PostgreSQLDialect</description>
|
org.alfresco.repo.domain.hibernate.dialect.SQLServerDialect, org.hibernate.dialect.PostgreSQLDialect</description>
|
||||||
<env-entry-name>properties/hibernate.dialect</env-entry-name>
|
<env-entry-name>properties/hibernate.dialect</env-entry-name>
|
||||||
<env-entry-type>java.lang.String</env-entry-type>
|
<env-entry-type>java.lang.String</env-entry-type>
|
||||||
<env-entry-value/> <!-- Empty value included for JBoss compatibility -->
|
<env-entry-value/> <!-- Empty value included for JBoss compatibility -->
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* Alfresco Remote API
|
* Alfresco Remote API
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2023 Alfresco Software Limited
|
* Copyright (C) 2005 - 2025 Alfresco Software Limited
|
||||||
* %%
|
* %%
|
||||||
* This file is part of the Alfresco software.
|
* This file is part of the Alfresco software.
|
||||||
* If the software was purchased under a paid Alfresco license, the terms of
|
* If the software was purchased under a paid Alfresco license, the terms of
|
||||||
@@ -212,7 +212,7 @@ public class ProcessesImplTest extends TestCase implements RecognizedParamsExtra
|
|||||||
{
|
{
|
||||||
// the tests are always run on PostgreSQL only
|
// the tests are always run on PostgreSQL only
|
||||||
// Dialect dialect = (Dialect) applicationContext.getBean("dialect");
|
// Dialect dialect = (Dialect) applicationContext.getBean("dialect");
|
||||||
// if (dialect instanceof AlfrescoSQLServerDialect)
|
// if (dialect instanceof SQLServerDialect)
|
||||||
// {
|
// {
|
||||||
// REPO-1104: we do not run this test on MS SQL server because it will fail
|
// REPO-1104: we do not run this test on MS SQL server because it will fail
|
||||||
// until the Activiti defect related to REPO-1104 will be fixed
|
// until the Activiti defect related to REPO-1104 will be fixed
|
||||||
|
@@ -143,7 +143,7 @@
|
|||||||
</bean>
|
</bean>
|
||||||
<bean id="nodeDAO.org.alfresco.repo.domain.dialect.Dialect" class="org.alfresco.repo.domain.node.ibatis.NodeDAOImpl" parent="nodeDAObase" />
|
<bean id="nodeDAO.org.alfresco.repo.domain.dialect.Dialect" class="org.alfresco.repo.domain.node.ibatis.NodeDAOImpl" parent="nodeDAObase" />
|
||||||
<bean id="nodeDAO.org.alfresco.repo.domain.dialect.MySQLInnoDBDialect" class="org.alfresco.repo.domain.node.ibatis.NodeDAOImpl$MySQL" parent="nodeDAO.org.alfresco.repo.domain.dialect.Dialect" />
|
<bean id="nodeDAO.org.alfresco.repo.domain.dialect.MySQLInnoDBDialect" class="org.alfresco.repo.domain.node.ibatis.NodeDAOImpl$MySQL" parent="nodeDAO.org.alfresco.repo.domain.dialect.Dialect" />
|
||||||
<bean id="nodeDAO.org.alfresco.repo.domain.dialect.AlfrescoSQLServerDialect" class="org.alfresco.repo.domain.node.ibatis.NodeDAOImpl$MSSQL" parent="nodeDAO.org.alfresco.repo.domain.dialect.Dialect" />
|
<bean id="nodeDAO.org.alfresco.repo.domain.dialect.SQLServerDialect" class="org.alfresco.repo.domain.node.ibatis.NodeDAOImpl$MSSQL" parent="nodeDAO.org.alfresco.repo.domain.dialect.Dialect" />
|
||||||
|
|
||||||
<!-- WARNING: Experimental/unsupported - see MySQLClusterNDBDialect ! -->
|
<!-- WARNING: Experimental/unsupported - see MySQLClusterNDBDialect ! -->
|
||||||
<bean id="nodeDAO.org.alfresco.repo.domain.dialect.AlfrescoMySQLClusterNDBDialect" class="org.alfresco.repo.domain.node.ibatis.NodeDAOImpl$MySQLClusterNDB" parent="nodeDAO.org.alfresco.repo.domain.dialect.Dialect" />
|
<bean id="nodeDAO.org.alfresco.repo.domain.dialect.AlfrescoMySQLClusterNDBDialect" class="org.alfresco.repo.domain.node.ibatis.NodeDAOImpl$MySQLClusterNDB" parent="nodeDAO.org.alfresco.repo.domain.dialect.Dialect" />
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* Alfresco Repository
|
* Alfresco Repository
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2021 Alfresco Software Limited
|
* Copyright (C) 2005 - 2025 Alfresco Software Limited
|
||||||
* %%
|
* %%
|
||||||
* This file is part of the Alfresco software.
|
* This file is part of the Alfresco software.
|
||||||
* If the software was purchased under a paid Alfresco license, the terms of
|
* If the software was purchased under a paid Alfresco license, the terms of
|
||||||
@@ -53,6 +53,7 @@ import org.junit.runners.Suite;
|
|||||||
|
|
||||||
// From AppContext05TestSuite
|
// From AppContext05TestSuite
|
||||||
org.alfresco.repo.domain.node.NodeDAOTest.class,
|
org.alfresco.repo.domain.node.NodeDAOTest.class,
|
||||||
|
org.alfresco.repo.domain.subscriptions.SubscriptionDAOTest.class,
|
||||||
org.alfresco.repo.security.permissions.impl.AclDaoComponentTest.class,
|
org.alfresco.repo.security.permissions.impl.AclDaoComponentTest.class,
|
||||||
org.alfresco.repo.domain.contentdata.ContentDataDAOTest.class,
|
org.alfresco.repo.domain.contentdata.ContentDataDAOTest.class,
|
||||||
org.alfresco.repo.domain.encoding.EncodingDAOTest.class,
|
org.alfresco.repo.domain.encoding.EncodingDAOTest.class,
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* #%L
|
* #%L
|
||||||
* Alfresco Repository
|
* Alfresco Repository
|
||||||
* %%
|
* %%
|
||||||
* Copyright (C) 2005 - 2016 Alfresco Software Limited
|
* Copyright (C) 2005 - 2025 Alfresco Software Limited
|
||||||
* %%
|
* %%
|
||||||
* This file is part of the Alfresco software.
|
* This file is part of the Alfresco software.
|
||||||
* If the software was purchased under a paid Alfresco license, the terms of
|
* If the software was purchased under a paid Alfresco license, the terms of
|
||||||
@@ -26,6 +26,8 @@
|
|||||||
package org.alfresco.repo.domain.subscriptions;
|
package org.alfresco.repo.domain.subscriptions;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
import org.junit.experimental.categories.Category;
|
||||||
|
import org.springframework.context.ApplicationContext;
|
||||||
|
|
||||||
import org.alfresco.query.PagingRequest;
|
import org.alfresco.query.PagingRequest;
|
||||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||||
@@ -41,11 +43,9 @@ import org.alfresco.service.cmr.subscriptions.SubscriptionItemTypeEnum;
|
|||||||
import org.alfresco.service.transaction.TransactionService;
|
import org.alfresco.service.transaction.TransactionService;
|
||||||
import org.alfresco.test_category.OwnJVMTestsCategory;
|
import org.alfresco.test_category.OwnJVMTestsCategory;
|
||||||
import org.alfresco.util.ApplicationContextHelper;
|
import org.alfresco.util.ApplicationContextHelper;
|
||||||
import org.alfresco.util.testing.category.NeverRunsTests;
|
import org.alfresco.util.testing.category.DBTests;
|
||||||
import org.junit.experimental.categories.Category;
|
|
||||||
import org.springframework.context.ApplicationContext;
|
|
||||||
|
|
||||||
@Category({OwnJVMTestsCategory.class, NeverRunsTests.class})
|
@Category({OwnJVMTestsCategory.class, DBTests.class})
|
||||||
public class SubscriptionDAOTest extends TestCase
|
public class SubscriptionDAOTest extends TestCase
|
||||||
{
|
{
|
||||||
private ApplicationContext ctx = ApplicationContextHelper.getApplicationContext();
|
private ApplicationContext ctx = ApplicationContextHelper.getApplicationContext();
|
||||||
@@ -59,8 +59,7 @@ public class SubscriptionDAOTest extends TestCase
|
|||||||
{
|
{
|
||||||
final PersonService ps = personService;
|
final PersonService ps = personService;
|
||||||
|
|
||||||
return AuthenticationUtil.runAs(new RunAsWork<NodeRef>()
|
return AuthenticationUtil.runAs(new RunAsWork<NodeRef>() {
|
||||||
{
|
|
||||||
@Override
|
@Override
|
||||||
public NodeRef doWork() throws Exception
|
public NodeRef doWork() throws Exception
|
||||||
{
|
{
|
||||||
@@ -71,8 +70,7 @@ public class SubscriptionDAOTest extends TestCase
|
|||||||
|
|
||||||
protected void insert(final String userId, final NodeRef node) throws Exception
|
protected void insert(final String userId, final NodeRef node) throws Exception
|
||||||
{
|
{
|
||||||
RetryingTransactionCallback<Object> callback = new RetryingTransactionCallback<Object>()
|
RetryingTransactionCallback<Object> callback = new RetryingTransactionCallback<Object>() {
|
||||||
{
|
|
||||||
public Object execute() throws Throwable
|
public Object execute() throws Throwable
|
||||||
{
|
{
|
||||||
subscriptionsDAO.insertSubscription(userId, node);
|
subscriptionsDAO.insertSubscription(userId, node);
|
||||||
@@ -84,8 +82,7 @@ public class SubscriptionDAOTest extends TestCase
|
|||||||
|
|
||||||
protected void delete(final String userId, final NodeRef node) throws Exception
|
protected void delete(final String userId, final NodeRef node) throws Exception
|
||||||
{
|
{
|
||||||
RetryingTransactionCallback<Object> callback = new RetryingTransactionCallback<Object>()
|
RetryingTransactionCallback<Object> callback = new RetryingTransactionCallback<Object>() {
|
||||||
{
|
|
||||||
public Object execute() throws Throwable
|
public Object execute() throws Throwable
|
||||||
{
|
{
|
||||||
subscriptionsDAO.deleteSubscription(userId, node);
|
subscriptionsDAO.deleteSubscription(userId, node);
|
||||||
@@ -97,8 +94,7 @@ public class SubscriptionDAOTest extends TestCase
|
|||||||
|
|
||||||
protected int count(final String userId) throws Exception
|
protected int count(final String userId) throws Exception
|
||||||
{
|
{
|
||||||
RetryingTransactionCallback<Integer> callback = new RetryingTransactionCallback<Integer>()
|
RetryingTransactionCallback<Integer> callback = new RetryingTransactionCallback<Integer>() {
|
||||||
{
|
|
||||||
public Integer execute() throws Throwable
|
public Integer execute() throws Throwable
|
||||||
{
|
{
|
||||||
return subscriptionsDAO.countSubscriptions(userId, SubscriptionItemTypeEnum.USER);
|
return subscriptionsDAO.countSubscriptions(userId, SubscriptionItemTypeEnum.USER);
|
||||||
@@ -110,8 +106,7 @@ public class SubscriptionDAOTest extends TestCase
|
|||||||
|
|
||||||
protected boolean hasSubscribed(final String userId, final NodeRef node) throws Exception
|
protected boolean hasSubscribed(final String userId, final NodeRef node) throws Exception
|
||||||
{
|
{
|
||||||
RetryingTransactionCallback<Boolean> callback = new RetryingTransactionCallback<Boolean>()
|
RetryingTransactionCallback<Boolean> callback = new RetryingTransactionCallback<Boolean>() {
|
||||||
{
|
|
||||||
public Boolean execute() throws Throwable
|
public Boolean execute() throws Throwable
|
||||||
{
|
{
|
||||||
return subscriptionsDAO.hasSubscribed(userId, node);
|
return subscriptionsDAO.hasSubscribed(userId, node);
|
||||||
@@ -123,8 +118,7 @@ public class SubscriptionDAOTest extends TestCase
|
|||||||
|
|
||||||
protected PagingSubscriptionResults select(final String userId) throws Exception
|
protected PagingSubscriptionResults select(final String userId) throws Exception
|
||||||
{
|
{
|
||||||
RetryingTransactionCallback<PagingSubscriptionResults> callback = new RetryingTransactionCallback<PagingSubscriptionResults>()
|
RetryingTransactionCallback<PagingSubscriptionResults> callback = new RetryingTransactionCallback<PagingSubscriptionResults>() {
|
||||||
{
|
|
||||||
public PagingSubscriptionResults execute() throws Throwable
|
public PagingSubscriptionResults execute() throws Throwable
|
||||||
{
|
{
|
||||||
return subscriptionsDAO.selectSubscriptions(userId, SubscriptionItemTypeEnum.USER, new PagingRequest(
|
return subscriptionsDAO.selectSubscriptions(userId, SubscriptionItemTypeEnum.USER, new PagingRequest(
|
||||||
@@ -137,8 +131,7 @@ public class SubscriptionDAOTest extends TestCase
|
|||||||
|
|
||||||
protected int countFollowers(final String userId) throws Exception
|
protected int countFollowers(final String userId) throws Exception
|
||||||
{
|
{
|
||||||
RetryingTransactionCallback<Integer> callback = new RetryingTransactionCallback<Integer>()
|
RetryingTransactionCallback<Integer> callback = new RetryingTransactionCallback<Integer>() {
|
||||||
{
|
|
||||||
public Integer execute() throws Throwable
|
public Integer execute() throws Throwable
|
||||||
{
|
{
|
||||||
return subscriptionsDAO.countFollowers(userId);
|
return subscriptionsDAO.countFollowers(userId);
|
||||||
@@ -150,8 +143,7 @@ public class SubscriptionDAOTest extends TestCase
|
|||||||
|
|
||||||
protected PagingFollowingResults selectFollowing(final String userId) throws Exception
|
protected PagingFollowingResults selectFollowing(final String userId) throws Exception
|
||||||
{
|
{
|
||||||
RetryingTransactionCallback<PagingFollowingResults> callback = new RetryingTransactionCallback<PagingFollowingResults>()
|
RetryingTransactionCallback<PagingFollowingResults> callback = new RetryingTransactionCallback<PagingFollowingResults>() {
|
||||||
{
|
|
||||||
public PagingFollowingResults execute() throws Throwable
|
public PagingFollowingResults execute() throws Throwable
|
||||||
{
|
{
|
||||||
return subscriptionsDAO.selectFollowing(userId, new PagingRequest(100000, null));
|
return subscriptionsDAO.selectFollowing(userId, new PagingRequest(100000, null));
|
||||||
@@ -163,8 +155,7 @@ public class SubscriptionDAOTest extends TestCase
|
|||||||
|
|
||||||
protected PagingFollowingResults selectFollowers(final String userId) throws Exception
|
protected PagingFollowingResults selectFollowers(final String userId) throws Exception
|
||||||
{
|
{
|
||||||
RetryingTransactionCallback<PagingFollowingResults> callback = new RetryingTransactionCallback<PagingFollowingResults>()
|
RetryingTransactionCallback<PagingFollowingResults> callback = new RetryingTransactionCallback<PagingFollowingResults>() {
|
||||||
{
|
|
||||||
public PagingFollowingResults execute() throws Throwable
|
public PagingFollowingResults execute() throws Throwable
|
||||||
{
|
{
|
||||||
return subscriptionsDAO.selectFollowers(userId, new PagingRequest(100000, null));
|
return subscriptionsDAO.selectFollowers(userId, new PagingRequest(100000, null));
|
||||||
|
Reference in New Issue
Block a user