mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged V2.1 to HEAD
6950: Fix for forum issue (6111) when using xsl:include 6951: Partial fix for WCM-862 6952: Merged V1.4 to V2.1 6921: Reindex tracking refactoring. 6954: Merged V1.4 to V2.1 6927: Config and startup changes for index tracking git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7369 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -39,6 +39,10 @@ public interface Transaction
|
||||
|
||||
public void setChangeTxnId(String changeTxnId);
|
||||
|
||||
public Long getCommitTimeMs();
|
||||
|
||||
public void setCommitTimeMs(Long commitTimeMs);
|
||||
|
||||
public Server getServer();
|
||||
|
||||
public void setServer(Server server);
|
||||
|
@@ -149,6 +149,13 @@ public class PermissionsDaoComponentImpl extends HibernateDaoSupport implements
|
||||
{
|
||||
getSession().flush();
|
||||
}
|
||||
|
||||
/**
|
||||
* NO-OP
|
||||
*/
|
||||
public void beforeCommit()
|
||||
{
|
||||
}
|
||||
|
||||
public void setProtocolToACLDAO(Map<String, AccessControlListDAO> map)
|
||||
{
|
||||
|
@@ -32,6 +32,7 @@
|
||||
not-null="false"
|
||||
cascade="none" />
|
||||
<property name="changeTxnId" column="change_txn_id" type="string" length="56" not-null="true" />
|
||||
<property name="commitTimeMs" column="commit_time_ms" type="long" not-null="false" index="idx_commit_time_ms" />
|
||||
</class>
|
||||
|
||||
<class
|
||||
@@ -63,34 +64,34 @@
|
||||
server.ipAddress = :ipAddress
|
||||
</query>
|
||||
|
||||
<query name="txn.GetLastTxnIdForStore">
|
||||
<query name="txn.GetTxnsByCommitTimeAsc">
|
||||
<![CDATA[
|
||||
select
|
||||
max(txn.id)
|
||||
txn
|
||||
from
|
||||
org.alfresco.repo.domain.hibernate.NodeStatusImpl as status
|
||||
join status.transaction as txn
|
||||
org.alfresco.repo.domain.hibernate.TransactionImpl as txn
|
||||
where
|
||||
status.key.protocol = :protocol and
|
||||
status.key.identifier = :identifier
|
||||
txn.commitTimeMs >= :fromTimeInclusive and
|
||||
txn.commitTimeMs < :toTimeExclusive and
|
||||
txn.id not in (:excludeTxnIds)
|
||||
order by
|
||||
txn.commitTimeMs
|
||||
]]>
|
||||
</query>
|
||||
|
||||
<query name="txn.GetLastTxnId">
|
||||
|
||||
<query name="txn.GetTxnsByCommitTimeDesc">
|
||||
<![CDATA[
|
||||
select
|
||||
max(txn.id)
|
||||
txn
|
||||
from
|
||||
org.alfresco.repo.domain.hibernate.NodeStatusImpl as status
|
||||
join status.transaction as txn
|
||||
</query>
|
||||
|
||||
<query name="txn.GetLastRemoteTxnId">
|
||||
select
|
||||
max(txn.id)
|
||||
from
|
||||
org.alfresco.repo.domain.hibernate.NodeStatusImpl as status
|
||||
join status.transaction as txn
|
||||
join txn.server as server
|
||||
org.alfresco.repo.domain.hibernate.TransactionImpl as txn
|
||||
where
|
||||
server.ipAddress != :serverIpAddress
|
||||
txn.commitTimeMs >= :fromTimeInclusive and
|
||||
txn.commitTimeMs < :toTimeExclusive and
|
||||
txn.id not in (:excludeTxnIds)
|
||||
order by
|
||||
txn.commitTimeMs desc
|
||||
]]>
|
||||
</query>
|
||||
|
||||
<query name="txn.CountTransactions">
|
||||
@@ -100,34 +101,6 @@
|
||||
org.alfresco.repo.domain.hibernate.TransactionImpl as txn
|
||||
</query>
|
||||
|
||||
<query name="txn.GetNextTxns">
|
||||
<![CDATA[
|
||||
select
|
||||
txn
|
||||
from
|
||||
org.alfresco.repo.domain.hibernate.TransactionImpl as txn
|
||||
where
|
||||
txn.id > :lastTxnId
|
||||
order by
|
||||
txn.id
|
||||
]]>
|
||||
</query>
|
||||
|
||||
<query name="txn.GetNextRemoteTxns">
|
||||
<![CDATA[
|
||||
select
|
||||
txn
|
||||
from
|
||||
org.alfresco.repo.domain.hibernate.TransactionImpl as txn
|
||||
join txn.server as server
|
||||
where
|
||||
txn.id > :lastTxnId and
|
||||
server.ipAddress != :serverIpAddress
|
||||
order by
|
||||
txn.id
|
||||
]]>
|
||||
</query>
|
||||
|
||||
<query name="txn.GetTxnUpdateCountForStore">
|
||||
select
|
||||
count(status.key.guid)
|
||||
|
@@ -25,6 +25,7 @@
|
||||
package org.alfresco.repo.domain.hibernate;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import org.alfresco.repo.domain.Server;
|
||||
import org.alfresco.repo.domain.Transaction;
|
||||
@@ -44,6 +45,7 @@ public class TransactionImpl extends LifecycleAdapter implements Transaction, Se
|
||||
private Long id;
|
||||
private Long version;
|
||||
private String changeTxnId;
|
||||
private Long commitTimeMs;
|
||||
private Server server;
|
||||
|
||||
public TransactionImpl()
|
||||
@@ -56,6 +58,7 @@ public class TransactionImpl extends LifecycleAdapter implements Transaction, Se
|
||||
StringBuilder sb = new StringBuilder(50);
|
||||
sb.append("Transaction")
|
||||
.append("[id=").append(id)
|
||||
.append(", txnTimeMs=").append(new Date(commitTimeMs))
|
||||
.append(", changeTxnId=").append(changeTxnId)
|
||||
.append("]");
|
||||
return sb.toString();
|
||||
@@ -99,6 +102,16 @@ public class TransactionImpl extends LifecycleAdapter implements Transaction, Se
|
||||
this.changeTxnId = changeTransactionId;
|
||||
}
|
||||
|
||||
public Long getCommitTimeMs()
|
||||
{
|
||||
return commitTimeMs;
|
||||
}
|
||||
|
||||
public void setCommitTimeMs(Long commitTimeMs)
|
||||
{
|
||||
this.commitTimeMs = commitTimeMs;
|
||||
}
|
||||
|
||||
public Server getServer()
|
||||
{
|
||||
return server;
|
||||
|
Reference in New Issue
Block a user