When using LS2J to utilize Java classes from within LotusScript, you may be faced with needing to declare and bind to a method explicitly using its JNI signature. A common case where this is necesary is when your Java class has multiple overridden methods and you need to explicitly use one of them. Instead of wrestling with the JNI syntax, you can use this handy function to bind to the object and print out the signatures for you to copy:
Just a quick tip/reminder to anyone out there who may have had to use the LotusScript (nee VisualBasic) Dir()
or Dir$()
function. The function IS NOT reentrant. If, as is a typical use-case, you want to deep traverse a directory tree by recursively calling a function that examines a directory using the Dir()
function, take care not to nest calls within the recursion. For example:
If time is money, then caching your lookup in Notes agents is cash in your pocket. An agent that repeatedly makes network requests such as view lookups to read document objects for processing data and needs to find the same object over and over can benefit greatly from caching the found object to avoid the network and lookup bottleneck for future requests. I get order-of-magnitude increases in agent performance using the techniques described below in agents that I have deemed network intensive in this manner and have implemented caching strategies for.