首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Lotus连接器在IIOP连接后从副本运行代理

Lotus连接器在IIOP连接后从副本运行代理
EN

Stack Overflow用户
提问于 2019-12-04 11:41:54
回答 1查看 123关注 0票数 0

我确实有以下情况:

  • "ScheduledJobs.nsf"与代理"Worker"
  • The "ScheduledJobs.nsf"被复制在三个多米诺服务器上:DominoServer1DominoServer2DominoServer3
  • With Lotus Notes Connector im,它们能够通过IIOP建立到DominoServer1上的Notes数据库"ScheduledJobs.nsf"的连接。这个连接是静态的configured.
  • Because --有到Notes数据库的连接,我可以通过Javascript.

在Notes数据库上运行DominoServer1上的代理"Worker"

我想做的是:

有时,根据具体情况,我希望从副本中运行代理"Worker"。例如,我想在DominoServer3上运行代理“Worker”。

问题:

由于通过IIOP连接到Notes是静态的,所以我总是连接到DominoServer1上的数据库"ScheduledJobs.nsf"

问题:

在副本上的这个"Worker"连接之后,我能运行代理IIOP吗?

编辑的

我的"RunWorkerOn2"代码

代码语言:javascript
复制
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
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 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上运行代理。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59175232

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档