Hi !
I try to code a Java servlet which will launch a Notes agent, which is not signed by the same id the servlet will use. Is it possible ?
When the agent tries to create a new document in the db, I always have an ECL alert showing that the signer’s id don’t have access to the current database. If the servlet use the signer’s id, there is no problem.
I’ve tried to change the ECL, with no success.
Subject: Can a servlet launch an agent ?
Probably need to check that the ID with which the agent is signed, has access to the database you need to create documents in.
Especially true if you are signing the agent on behalf of another user.
Hope this helps.
Paul
Subject: RE: Can a servlet launch an agent ?
The 2 IDs used have manager access to the database.BTW the servlet is not launched on a server, it is a standalone app which can be run on any workstation with a Notes client.
Subject: RE: Can a servlet launch an agent ?
A servlet by definition runs on a server. That’s why they call it a servlet. Maybe you’re talking about an applet or an application.
An ECL alert only happens in the Notes client. You’re getting some other kind of message, not an ECL alert. Please post the exact message and tell where you get it.
How are you calling the agent? If you want to use the ID of the signer of the agent, you might try using runOnServer method.
Subject: Can a standalone java app launch an agent ?
OK, I have some vocabulary problems 
In the java app I use a local id with a Registration :
Registration reg=s.createRegistration();
reg.switchToID(idPath,idPwd);
Then I try to get the agent and run it :
Database db = s.getDatabase(serverName,dbName);
Agent agent = db.getAgent(agentName);
agent.run();
The agent is a simple one :
Sub Initialize
Dim session As New NotesSession
Msgbox "User : "+session.UserName
Dim db As NotesDatabase
Set db=session.CurrentDatabase
Dim doc As NotesDocument
Set doc=db.CreateDocument
doc.Form="MyForm"
doc.Titre="Test"
Call doc.Save(False,False)
End Sub
This works great if the ID used by the Java app is the same that the one used to sign the agent. If the app use an other ID, I get the following error message (on "Set doc=db.CreateDocument) :
Client Execution Security is enabled.ECL Alert Result: Code signed by MyDevelopper/MyDomain was prevented from executing with the right: Access to current database.
Thanks for the help !