3/15/2010

Some comments on my sample (in the previous post..)

On the previous post, I did not explain the code at all so I added some comments on my sample code.

Following line indicates that this code is a remote access application, thus this application uses NCSO.jar.

Session s = NotesFactory.createSession(host,cName,password) ;

As this is called a "remote" access application, you need to specify host name to connect server.
Local access application is used like this.

Session s = NotesFactory.createSession() ;

What confuses you is that "local" access application may access the server, too.
"local" just means that you use "local" notes client application dll to access Notes object and "remote" just means that application uses remote DIIOP-based procedure call (a.k.a ORB).


Also, some experienced developer saw my code and felt like this...

"Static variable for host name , user name and password in this code looks silly. I will handle this value as an argument value instead, which does not need compilation when I changed the value"

Believe me... I did it intentionally..
When investigating DIIOP issue/remote access application code issue in support scene, I always need to compile the code very frequently. so compilation is not the problem for my investigation. Rather, I wanted to avoid to forget the order of argument value or usage of aplication. That's why I preferred static value in sample code but feel free to change the same as you like.

No comments:

Post a Comment