我确实有以下情况:
"ScheduledJobs.nsf"与代理"Worker""ScheduledJobs.nsf"被复制在三个多米诺服务器上:DominoServer1、DominoServer2、DominoServer3Lotus Notes Connector im,它们能够通过IIOP建立到DominoServer1上的Notes数据库"ScheduledJobs.nsf"的连接。这个连接是静态的configured.Javascript.在Notes数据库上运行DominoServer1上的代理"Worker"
我想做的是:
有时,根据具体情况,我希望从副本中运行代理"Worker"。例如,我想在或DominoServer3上运行代理“Worker”。
问题:
由于通过IIOP连接到Notes是静态的,所以我总是连接到DominoServer1上的数据库"ScheduledJobs.nsf"。
问题:
在副本上的这个"Worker"连接之后,我能运行代理IIOP吗?
编辑的
我的"RunWorkerOn2"代码
Dim agent As NotesAgent
Dim sess As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim item As NotesItem
Set db = sess.CurrentDatabase
Set agent = sess.CurrentAgent
Call db.Open( "DominoServer2/ORGANIZATION", "ScheduledJobs.nsf" )
Set agent = db.GetAgent("Worker")
// Reason why im using 'run' insted of RunOnServer:
// https://www-01.ibm.com/support/docview.wss?uid=swg1LO42549
If agent.Run() = 0 Then
Print "SUCCESS"
Else
Print "FAILED"
End If发布于 2019-12-05 05:30:48
你能做到这一点。
在包含"Worker“的ScheduledJobs数据库中,添加两个新代理:"RunWorkerOn2”和"RunWorkerOn3“。
在RunWorkerOn2代理的代码中,添加用于在DominoServer2上打开ScheduledJobs.nsf并使用NotesDatabase.GetAgent("Worker")的代码。然后调用NotesAgent.RunOnServer在Dominoserver2上运行Worker。
类似地,在RunWorkerOn3代理的代码中,在DominoServer3上打开ScheduledJobs.nsf并使用NotesDatabas.GetAgent("Worker")。然后调用NotesAgent.RunOnserver在DominoServer3上运行Worker。
因此,您的连接器仍然连接到DominoServer1,它在DominoServer1上运行所有的代理,但这些代理反过来将在DominoServer2和DominoServer3上运行代理。
https://stackoverflow.com/questions/59175232
复制相似问题