Domino Code Fragment

Code Name*
Replacement class for Session
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.18.116.62.45
Description*
Replaces lotus.notes.Session class
Type*
Java
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
First, let's look at the two classes we'll use in debug mode to replace the
                          standard lotus.notes.Session and lotus.notes.AgentContext.


                           /*** The replacement class for Session ***/

                           import java.util.*;
                          import lotus.notes.*;


                           public class MySession extends lotus.notes.Session
                          {
                          private Session s;


                           public MySession()
                          throws NotesException
                          {
                          super(1); // any old value will do
                          this.s = Session.newInstance(); // create a "real" session to
                          } // redirect calls to



                           public AgentContext getAgentContext()
                          throws NotesException
                          {
                          MyAgentContext mac = new MyAgentContext(this.s);
                          return mac;
                          }


                           public Name createName(String st)
                          throws NotesException
                          {
                          return this.s.createName(st);
                          }


                           } // end class