The agent does not use a broker. The console creates the jobs and sends it to the agent sitting on the server using a SOAP call. The "options" of the job are colon separated strings (or any value chosen as the agent.delim.options in lokahi.properties). Along with the options are the "return to address" (the address of the console) and the "return method". (These are all part of the SOAP message.)
org.apache.lokahi.core.agent.JobSOAP receives the soap message in the handleJob function (line 52) then adds it to the local job queue (AgentJob.store(j) - like 57). The job queue contains a run time collection of AgentJobs. These are stored within the TMCDataStore and TMCCache. When the agent is restarted, all current jobs being handled by the agent are lost if they have not been sent back to the console. The jobs are now run through with the JobScheduler (Collection<AgentJob> jobs = AgentJob.getJobs(State.NEW); - line 53). When the jobs are complete, the ReportingThread gets the jobs (Collection<AgentJob> jobs = AgentJob.getJobs(State.COMPLETE); - line 67) and sends the result back to the console using TMCSOAPMessage. The console receives the returned SOAP message and then update the database. -Jeff -----Original Message----- From: Ludovic Maitre [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 09, 2007 7:37 AM To: [email protected] Subject: Some questions about the TMCAgent Hi all, I try to finish the port of Lokahi to MySQL but i'm stuck on the TMCAgent part (i believe). I cannot find where is initialized the broker (apart in the the commented line //DerbyBroker.initialize() of TMCAgent), nor where are really loaded the jobs : in jobscheduler, there is a line : Collection<AgentJob> jobs = AgentJob.getJobs(State.NEW); which i believe should load the jobs, but after having read AgentJob, TMCDataStore and TMCCache i still haven't found where the agent call the broker to read the jobs available in database. Could someone give me a clue about this ? Is this part of the agent developed or should i code it ? (i guess it's not hard but i'm wondering why this hasn't been already coded -> i have surely missed something [also where is configured the database used by the agent? does it use webservices to call the controller ? where is configured the controller adress and port ? should i put a jvm.conf file on the agent installation folder ?...]). So best regards and thanks in advance for any answer, PS: Sorry for the trivial questions but more i discover this app and more i understand that i haven't really understand it last year. -- Cordialement, Ludo - http://www.ubik-products.com --- "L'amour pour principe et l'ordre pour base; le progres pour but" (A.Comte) ------------------------------------------------------------------------------ Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as Banyu - direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. ------------------------------------------------------------------------------
