Java agent GUI locks up Notes when prematurely closed

Hi all. I posted this a while ago, and it seems as if posts get forgotton once they move to the second page, so I’m posting a refresher.

Here is the original post:

http://www-10.lotus.com/ldd/nd6forum.nsf/DateAllThreadedweb/7a8eaf23e98b77a1852573bf00590638?OpenDocument

Does anyone know what is going on here?

Thank you in advance for your help.

Subject: Java agent GUI locks up Notes when prematurely closed

Regarding your question in the original post.

To develop a standalone application that uses the Notes classes, just import lotus.domino.* and have your class extend NotesThread (usually not possible), or use NotesThread.sinitThread() and NotesThread.stermThread() for EVERY thread that uses a Notes object.

This generally makes testing easier (eg. no need to use the Agent Runner database to debug) and can probably avoid the weird threading issue you are encountering now.

I have never tried to use the Java GUI classes from within an agent.

Subject: RE: Java agent GUI locks up Notes when prematurely closed

OH. I see what you mean about a standalone app. In that case, I think that is what I’m doing. I’ve got the JavaAgent class and the GUI class, both of which are already extending something, so you’re right, I can’t extend NotesThread in there. I guess that you’re referring to composition as opposed to interitance when you say “use NotesThrea.sinitThread()”? Would I just create a variable that is a NotesThread in my GUI class and then terminate that variable in my Windows event? I’m already calling NotesThread.stermThread() in the event, but its just that generic statement. Its not aimed at a particular variable.

Subject: RE: Java agent GUI locks up Notes when prematurely closed

I would suggest you look at the Domino help page for the NotesThread class. It outlines the various patterns you can use. It also specifies the do’s and don’ts of multithreading with Domino objects, which you should definately read.