Lotus
Apr 12, 2013
How to automatically refresh your database in "silent mode"
Break away from dependence on the Lotus Notes client to update your database: an easy tutorial to get applications with the latest update every morning
Scenario: a development server, a release server and many production customers' servers: nothing more classic.
Every time a change is deployed on the release server, the best thing would be to "push" it automatically on production server, or as soon as possible (at least).
Document Actions
Nov 28, 2012
Mixing Lotus Domino and Twitter together - a way for mobile approach
What if you want to create different layouts for different devices in Lotus Domino? This is a way to make this possible, for example using Twitter Bootstrap
It's always more important to develop applications that are accessible from any device so we wondered what it takes to adapt an application, perhaps already developed, to ensure this possibility. In this case, Twitter provides its layout via Twitter Bootstrap, so it was decided to integrate it.
Document Actions
Apr 12, 2012
"Error cleaning up agent threads" - a never ending story
A real case that has been solved
There are thousands of posts on Lotus Domino forum about this problem: "Error cleaning up agent threads".
I ran into a similar problem using a Java agent. I state that this agent has been inherited from another developer ;-) so it was not easy for me to initially understand what the problem could be.
In any case, every time the agent ended, I had the above error to the log.
In truth, none of the posts that I've seen has been helpful, until, by inspecting the code carefully and isolating the parts of it, I found the solution.
One line of code was:
Utils u = new Utils (..... some parameter ....);
public class Utils extends AgentBase {
In practice, the class is defined to extend agentBase, so it's like it was an agent itself. The result is that each time it's loaded, a thread is istantiated.
When finished, the agent's thread was terminated, but the child's thread lost the reference to his father, causing the error.
This problem is naturally solved by changing the definition of the class:
public class Utils {
It may seem a trivial issue, but I guarantee that it is really sneaky, especially if you are working on other people's code.
As you can check on support forums, every developer has a different solution for this problem. In the end, my suggestion are:
- Never extend AgentBase in external class
- use recycle() methods to clean up memory object, expecially in loop code
Any other input on this issue is welcome.
Stay tuned!
Document Actions
Jul 19, 2011
Problems with charset in 8.5.1 environment
Strange behaviour managing XML file in Java agent
In this scenario, i've experienced some problems with UTF-8 charset in strings. In 6.5 environment everithing works fine.
This is my code in a Java agent:
org.w3c.dom.Document docXML = attachSegnatura.parseXML(false); XSLTResultTarget out = new XSLTResultTarget(); out.setFileName(path + "SegnaturaRT.xml"); attachSegnatura.transformXML(xsl, out); DOMParser parser = new DOMParser(); parser.parse(path + "SegnaturaRT.xml"); org.w3c.dom.Document docRT = ((DOMParser)parser).getDocument();
tFactory = TransformerFactory.newInstance(); StreamSource xslSS = new StreamSource(pathFile+"Segnatura.xsl"); StreamSource xslRT= new StreamSource(pathFile + "Segnatura.xml"); FileOutputStream fos = new FileOutputStream(pathFile + "SegnaturaRT.xml"); transformer = tFactory.newTransformer(xslSS); transformer.transform(xslRT, new StreamResult(fos)); transformer.reset(); fos.close(); DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); docRT = dBuilder.parse(new File(pathFile + "SegnaturaRT.xml"));
Anybody experienced something like this?
Document Actions
Apr 06, 2011
DIIOP?? No more...
I'm porting servlet code running on 6.5 Domino Server in XPages.
Servlet comunicate with Domino through DIIOP, and need DIIOP to istantiate Session object:
lotus.Domino.session = NotesFactory.createSession(server,login, password);
Thanks to Karsten Lehmann for its great library:
http://www.mindoo.com/web/blog.nsf/dx/18.07.2009191738KLENAL.htm?opendocument&comments
Now i can initialize a session using:
lotus.Domino.session = DominoAccess.getCurrentSession();
No more DIIOP needed!!