I think an Interceptor or Event on the writer side would be the right solution for this. In our current project we have done something similar and it works great.
Using this approach you would keep the ability to switch the database below or-mapping and could elaborate your update-event from a simple TableUpdate -trigger which i think should be done within a few hours to a concrete Update-Event containing all changed data.
EDIT:
First of all i would not only track the OnSave but also AfterTransactionCompleted to ensure the Transaction is comitted. This also enables you to collect all objects of the tx.
The easiest way to do this is overriding the EmptyInterceptor object like this:
public class EntityInterceptor : EmptyInterceptor
{
private IList<object> entities = new List<object>();
public override bool OnSave(object entity, object id, object[] state, string[] propertyNames, NHibernate.Type.IType[] types)
{
entities.Add(entity);
return base.OnSave(entity, id, state, propertyNames, types);
}
public override void AfterTransactionCompletion(ITransaction tx)
{
if (tx.WasCommitted)
{
Console.WriteLine("Data has been inserted. Notify the reader here.");
}
entities = new List<object>();
}
}
海事组织处理中通信的最平级做法是:网络改造。 有几个例子说明如何做到这一点。 http://www.mctainsh.com/Articles/Csharp/RemoteCallback.aspx#A_simple_example”rel=“nofollow noreferer”>here。 或者,如果你想尝试WCF,见here。 或搜索SO,可在此找到许多好的例子。