乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      java程序遠程訪問Domino數(shù)據(jù)庫簡例

       king9413 2012-04-05

      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程序遠程訪問Domino服務(wù)器
       */
      public class ConnectDomino {
       //要訪問的Domino服務(wù)器域名,也可以用IP,默認的DIIOP端口是63148,若不知道端口,請詢問管理員
       private final static String HOST = "oa.abc.com.cn:63148";
       //用戶名必須是name.nsf中注冊的用戶名,當然如果服務(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{
         //建立連接會話,若匿名訪問,用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客戶端軟件的計算機上獲得,具體路徑為\Data\domino\java。

        本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
        轉(zhuǎn)藏 分享 獻花(0

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多