Hi to all,
I have written a simple HTML Test page who opens a session of Notes (remote server).
Recycling it occurs a java.lang.ThreadDeath error.
Why?
Can someone help me establishing the cause of this error? I have the same error in a servlet app. and we are going crazy.
This is the source code:
Session sess = NotesFactory.createSession(“srv1:8585”, “admin admin”, “pwdadmin”);
System.out.println("Notes session created on: " + sess.getPlatform());
sess.recycle();
The error occurs in the recycle().
If I don’t recycle the session the code runs succesfully but I know that we need to recycle the session (without recycle the memory is allocated but not released).
Somebody has the solution?
Thanks
Andrea
Subject: HELP! session.recycle() causes a java.lang.ThreadDeath
This should work.
Make sure you use the supported JVM and use the
lotus.domino package.
Subject: RE: HELP! session.recycle() causes a java.lang.ThreadDeath
I think we’re using the supported JVM.Environment: Domino 6.0 on AIX, JVM 1.3.1, Webapp on Oracle Application Server 9.
Is this right?
Marco Fabbri
hcl-bot
February 15, 2006, 11:32am
4
Subject: RE: HELP! session.recycle() causes a java.lang.ThreadDeath
I use this small piece of code at the end of my Java agents. You can stuff it in the the “Finally” section if using try-catch-finally.
It seems to fix the problems that I sometimes see with “Error cleaning up agent threads” and java.lang.ThreadDeath :
try {
Thread tga[] = new Thread[tGroup.activeCount()];
tGroup.enumerate(tga);
System.out.println("Listing Threads before wait");
tGroup.list();
while (tGroup.activeCount() > 1) {
Thread.sleep(1000);
}
System.out.println("Listing Threads after wait");
tGroup.list();
} catch(Exception e) {
e.printStackTrace();
}