Hi All ::
I’ve done some extensive searching on this and other sites relative to the Java / Domino topic. I’m struggling to understand what options I have for my scenario.
I need to write a little utility (as an eclipse plug-in) that accesses a Domino database on a remote server. I’ve found lots of good examples for the Java API (NSCO.jar / Notes.jar); however, I have no control over the Domino servers and since my app’s are dying with “Could not get IOR from Domino Server” (after lots of debugging, changing ports, protocols, etc) I believe that DIIOP is simply not running on the server. So…
I found a redbook that talks about LCJava and a JDBC for Domino… I cannot find anything more on lcjava other than a post somewhere that hinted to it being deprecated… and no signs of JDBC drivers… I downloaded LSX toolkit, but that looks overly complex for what I want…
Am I missing something obvious? Thanks in advance.
Subject: Java & Domino: what are my options here?
You can use “native” access to databases from Java without DIIOP. To do this you need to have a Notes client installed on the computer and a valid ID-file. Port 1532 must be open on network in order to connect to Domino server. Instead of NSCO.jar you use Notes.jar and make sure all paths/classpaths can be found by your Java program. I did not try this solution in large-scale applications.
You can also access Domino server by calling database’s URL and parsing the answer (HTML or XML), as the other poster suggested.
Subject: And you get much better performance this way, minus all the CORBA/DIIOP overhead.
Subject: RE: Java & Domino: what are my options here?
Thanks everyone for the replies… Andrei - I like the idea of using the native methods… can you point me to a quick sample-code page that shows how to establish a session, get DB, etc? is it the same just using local methods?
For example::
s = NotesFactory.createSession();
db = s.getDatabase(ServerName, DBName);
View view = db.getView(ViewName);
What about threads? I recall reading that local access requires threads, is that the same here?
thanks again for the help…
Subject: got it!
Sorry about that… but yes, if you use the “local” method it will work (as Andrei suggested) - for others looking to try this, here a snippet that i used::
// make a class that extendes NotesThread
public class AccessNotes extends NotesThread …
public static void main(String args) {
try {
AccessNotes an = new AccessNotes();
an.start();
…
public void runNotes() {
try {
s = NotesFactory.createSession();
db = s.getDatabase(ServerName, DBName);
View view = db.getView(ViewName);
// other code as needed…
hope this helps someone… thanks to everyone else for your help!
Mike
Subject: Java & Domino: what are my options here?
- Is DIIOP required in order to use the Java API to access a remote Domino Server?
Yes.
You can read stuff via http URLs like ?readviewentries etc. You can even post stuff if you pretend to be a browser user. If you want to use the CORBA API then turn on the CORBA server (DIIOP)