2017-05-11 45 views
0

有什麼方法可以設置NotesFactory.createSessionWithIOR方法的連接超時和/或讀取超時?我無法找到涵蓋此的任何文檔。我發現Windows機器上的超時時間大約爲100秒,在Linux機器上超過大約10分鐘,我想將其設置爲更短的時間,例如30秒。如何控制Domino NotesFactory.createSessionWithIOR中的超時時間?

String ior = NotesFactory.getIOR(dominoServer, args); 
Session session = NotesFactory.createSessionWithIOR(ior, args, username, password); 

在Windows機器上的堆棧跟蹤

NotesException: Could not open Notes session 
    at lotus.domino.cso.Session.initSession(Unknown Source) 
    at lotus.domino.cso.Session.<init>(Unknown Source) 
    at lotus.domino.cso.Session.createSession(Unknown Source) 
    at lotus.domino.NotesFactory.createSessionUP(Unknown Source) 
    at lotus.domino.NotesFactory.createSessionWithIOR(Unknown Source) 
    at DominoUtils.connect4(DominoUtils.java:1475) 
    at DominoUtilsTest.testConnect4(DominoUtilsTest.java:347) 
... 
Caused by: org.omg.CORBA.COMM_FAILURE: java.net.SocketTimeoutException: connect timed out Host: 192.168.208.131 Port: 60148 vmcid: 0x0 minor code: 1 completed: No 
    at lotus.priv.CORBA.iiop.ConnectionTable.get(Unknown Source) 
    at lotus.priv.CORBA.iiop.ConnectionTable.get(Unknown Source) 
    at lotus.priv.CORBA.iiop.Generic.getConnection(Unknown Source) 
    at lotus.priv.CORBA.iiop.Generic.locate(Unknown Source) 
    at lotus.priv.CORBA.iiop.RepImpl.invokePreamble(Unknown Source) 
    at lotus.priv.CORBA.iiop.RepImpl.invoke(Unknown Source) 
    at lotus.priv.CORBA.portable.ObjectImpl._invoke(Unknown Source) 
    at lotus.domino.corba._IObjectServerStub.createSession(Unknown Source) 
    ... 30 more 
Caused by: java.net.SocketTimeoutException: connect timed out 
    at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) 
    at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85) 
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) 
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) 
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) 
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) 
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) 
    at java.net.Socket.connect(Socket.java:589) 
    at java.net.Socket.connect(Socket.java:538) 
    at java.net.Socket.<init>(Socket.java:434) 
    at java.net.Socket.<init>(Socket.java:211) 
    at lotus.priv.CORBA.iiop.Connection.newSocket(Unknown Source) 
    ... 38 more 

回答

1

我不知道我們是否能夠在運行時設置超時屬性,但你可能有它的一些控制在服務器文檔,Internet Protocols/DIIO選項卡。 enter image description here