免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
java程序遠(yuǎn)程訪問Domino數(shù)據(jù)庫簡例

package kenny.remote;
import lotus.domino.Database;
import lotus.domino.Document;
import lotus.domino.NotesException;
import lotus.domino.NotesFactory;
import lotus.domino.Session;
import lotus.domino.View;
/**
 * @author Kenny
 * example:java程序遠(yuǎn)程訪問Domino服務(wù)器
 */
public class ConnectDomino {
 //要訪問的Domino服務(wù)器域名,也可以用IP,默認(rèn)的DIIOP端口是63148,若不知道端口,請?jiān)儐柟芾韱T
 private final static String HOST = "oa.abc.com.cn:63148";
 //用戶名必須是name.nsf中注冊的用戶名,當(dāng)然如果服務(wù)器允許匿名訪問,這可以不需要此用戶名
 private final static String USERNAME = "admin";
 private final static String PASSWORD = "admin";
 public void getDominoDB(){
  Session session = null;
  Database db = null;
  View view = null;
  Document doc = null,docx = null;
  try{
   //建立連接會(huì)話,若匿名訪問,用NotesFactory.createSession(HOST)即可
   session = NotesFactory.createSession(HOST, USERNAME, PASSWORD);
   db = session.getDatabase("SvrName", "DBName.nsf");
   view = db.getView("ViewName");
   doc = view.getFirstDocument();
   while(doc != null){
    //Process the Document doc
    System.out.println(doc.getCreated());
    //Then get the next document
    docx = view.getNextDocument(doc);
    //recycle the document we're done with,in the loop body,that's necessary
    if(doc != null) doc.recycle();
    doc = docx;
    if(docx != null) docx.recycle();
   }
  }catch(NotesException e){
   e.printStackTrace();
  }finally{
   try{//all of the domino objects must be recycle
    if(docx != null) docx.recycle();
    if(doc != null) doc.recycle();
    if(view != null) view.recycle();
    if(db != null) db.recycle();
    if(session != null) session.recycle();
   }catch(NotesException eRecycle){
    eRecycle.printStackTrace();
   }
  }
 }
}

     另外,java程序的類路徑必須包含NCSO.jar,此包可以從安裝了Domino服務(wù)器或者Domino Designer客戶端軟件的計(jì)算機(jī)上獲得,具體路徑為\Data\domino\java。

本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊舉報(bào)。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
[Domino]如何用java遠(yuǎn)程訪問Domino郵箱數(shù)據(jù)
Java讀取FTP上的txt文件
Domino連接池解決方案
Ext與后臺數(shù)據(jù)庫交互
POI 操作Excel
JAVA算法與編程題
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服