Hi.
I developed the program using the "AllAgents" for Monitoring AgentStates.
It made by JavaCil.jar and CTIOS Toolkit's AllAgents.
About once a week sometimes an error occurs.
And then My Program is not working.
I want to know
1) the workaround
2) the events that can be judged an exception
3) the way to catch an exception
4) Can I handle the CilEvents like any other Events in Java CIL?
The following is the CTIOSClient tracelog.
----------------------------------
05/26/2016 11:47:50.0264 [agent.5000.3008].OnAgentStateEvent(eTalking, Reason: 1)(eAgentStateEvent)
05/26/2016 11:47:50.0264 [agent.5000.3008].OnAgentStateEvent(eTalking, Reason: 1)(eAgentStateEvent)
05/26/2016 11:47:50.0482 [agent.5000.7003].OnAgentStateEvent(eAvailable, Reason: 1234)(eAgentStateEvent)
05/26/2016 11:47:50.0482 CilServiceEvent(13185532).ReceiverThread, Exception from GetNextEvent, event thread will exit
05/26/2016 11:47:50.0482 CilServiceEvent(13185532).ReceiverThread, CIL Event thread exiting
-----------------------------------
Thank you..
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Could you provide some more information, and any troubleshooting you have done to help understand the issue?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hi ewindgat..
Thank you for your response..
The method "GetNextEvent()" is in the library "JavaCil.jar" that Cisco provides.
I think that the method is not throw Exceptions.
So.. I can not catch the Exception in my AllAgents program.
If i can, i will recycle my AllAgents program automatically.
but. Just for logging... I only could found the message in the tracelogs.
My customers call me, and then i restart my AllAgents program manually..
Can i get the source of "JavaCil.jar" ?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I decompiled the "CilServiceEvent.class" in theJavaCil.jar
ReceiverThread() method does not throws exceptions as i was thinking.
protected void ReceiverThread()
{
LOG(-2147479552, "ReceiverThread()");
boolean bDone = false;
while (!bDone)
{
int iEvent = 0;
Arguments pArgs = null;
LOG(-2147475456, "ReceiverThread, Calling GetNextEvent");
try
{
LOG(-2147475456, "ReceiverThread blocked on GetNextEvent()");
pArgs = this.m_Service.GetNextEvent();
}
catch (Exception e)
{
LOG(2, "ReceiverThread, Exception from GetNextEvent, event thread will exit");
this.m_bReceiverRunning = false;
bDone = true;
}
continue;
if (null != pArgs)
{
Integer IEvent = pArgs.GetValueIntObj(474);
iEvent = null == IEvent ? iEvent : IEvent.intValue();
LOG(-2147475456, "ReceiverThread, GetNextEvent returned Event( " + CtiOs_EnumStrings.EventIDToString(iEvent) + " )");
switch (iEvent)
{
case 536870914:
LOG(2, "ReceiverThread, eConnectionClosed received, event thread will exit");
synchronized (this.m_critProtect)
{
this.m_bReceiverRunning = false;
bDone = true;
}
break;
case 536870915:
LOG(2, "ReceiverThread, eConnectionRejected received, event thread will exit");
synchronized (this.m_critProtect)
{
this.m_bReceiverRunning = false;
bDone = true;
}
}
if (this.m_Session != null) {
try
{
this.m_Session.OnEvent(iEvent, pArgs);
}
catch (Exception e)
{
LOG(1, "ReceiverThread, Caught Exception: \n" + Utility_Methods.GetStackTraceString(e));
}
}
}
else
{
LOG(2, "ReceiverThread, NULL event received, event thread will exit");
bDone = true;
}
}
LOG(2, "ReceiverThread, CIL Event thread exiting");
}
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comments
0 comments
Please sign in to leave a comment.