Java code deployment

I have an agent which simply calls java code which is in a jar file. I deploy this jar file to the …/jvm/lib/ext directory on the server. Do I also need to “attach” it to the domino database? In the agent design, I can click “Edit Project” and include the jar file there also. If I put the jar file in both places, which jar does the agent use? What if the code in each is different?..

Thanks in advance for your help!!!

agent code below:

public class JavaAgent extends AgentBase {

public void NotesMain() {

try {

Session session = getSession();

AgentContext agentContext = session.getAgentContext();

new ProcessNotifications( session, context.getCurrentDatabase() ) ;

} catch(Exception e) {

e.printStackTrace();

}

}

}

Subject: java code deployment

How do you attach it to the domino database? I can’t find the “Edit Project” option anywhere. I’m using domino 7.

Edit: Nevermind, I found it. It was a tab at the bottom of the edit window.

Subject: java code deployment

If you deploy it to the server, you should not attach it to the agent’s design note. If you put the code in both places, the one the JVM finds first in the first classpath at runtime would be the one that would be used. I’m honestly not sure which one that would be but it would be easy enough (for you) to test if you really want to know. Just add a call to System.out.println() to one jar that’s not in the other jar, restart the agent manager, let the agent run, and note what was printed to the log.dgg