Java agent thread problem

Hi there,

i got a problem with my java agent.

The agent gets a noteId, reads some items and then starts a thread using sametime to send information about these items to a recipient.

But, the if the java agent ends, it always also kills the sametime thread. The java debug console creates following output:

java.lang.ThreadDeath

at java.lang.Thread.stop(Thread.java:1007)

at java.lang.ThreadGroup.stopHelper(ThreadGroup.java:684)

at java.lang.ThreadGroup.stop(ThreadGroup.java:667)

at lotus.domino.AgentLauncher.run(Unknown Source)

at lotus.domino.NotesThread.run(Unknown Source)

Error cleaning up agent threads

So is there a possibility to avoid, that the ending agent thread also kills the other thread?

thanks for all hints

alex

Subject: Re:Java agent thread problem

Hi Alex,

When the Agent is terminated then all of the threads created by it are terminated as well when it’s stopped (the agent launcher waits a maximum of 500ms before it stops the other threads) - is it possible to encapsulate the sametime code you mentioned in another agent and start that from your existing agent?

Subject: Java agent thread problem

I don’t understand why i should call another agent with the sametime code. This only moves the problem from one agent to another.

At the moment, i let the java agent wait until the sametime communication finished. But the waiting agent blocks the notes client.

I’m no notes developer (this is for a university project), but i thought, the java agent has his own thread and therefore will not block the UI of the Notes client. I’m confused.