Lotus Notes / Domino Sonstiges > Java und .NET mit Notes/Domino

Zugriff auf DB

(1/2) > >>

leuchtdiode:
hallo leute,

ich würde mit java gerne auf eine datenbank auf einem domino server zugreifen, wie mach ich das genau?

lg,
alex

jBubbleBoy:
aus einem Agenten heraus z.B. so:


--- Code: ---try {
Session se = getSession();
AgentContext ac = se.getAgentContext();

Database db = ac.getCurrentDatabase();
DocumentCollection  col = ac.getUnprocessedDocuments();
Document tmp = null;
Document doc = col.getFirstDocument();
    while (doc != null) {
      System.out.println( doc.getItemValueString("Subject") );

      tmp = doc;
      doc = col.getNextDocument();
      tmp.recycle();
    }
} catch(Exception e) {
e.printStackTrace();
}
--- Ende Code ---

m3:

--- Zitat ---You can call the Domino Objects from a Java program by importing the lotus.domino package. The
program can be coded as an application, a Domino agent, an applet, or a servlet. Local calls access
run-time code on the local computer, which must have Domino installed. CORBA-based remote (IIOP)
calls access run-time code from a remote Domino server; in this case, the local computer need not have
Domino installed. Compilation must be on a computer with Domino Designer installed.
Note: Notes/Domino Release 7 supports the Sun Java(TM) 2 Platform, Technology Edition, v 1.4.2. To
avoid incompatibilities: do not run Java agents compiled under Release 7 on earlier Domino servers or
Notes clients; do not use Release 7 Java archives (Notes.jar, NCSO.jar, domtags.jar) on Java platforms
earler than v. 1.4.2.
--- Ende Zitat ---
Lotus Domino 7 Programming Guide, Volume 3: Java/CORBA Classes

leuchtdiode:
ok, aber du sagst oben getCurrentDatabase()! aber woher weiß der welche ich mein und vorallem, welchen server ich mein?

ich hab einen domino-server und will von irgendeinem client im netzwerk mit einem java-programm zugreifen, geht das dann auch so?

und welche klassenbibliotheken würde ich dazu benötigen??

lg

jBubbleBoy:
Client = Notesclient?

Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln