Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

JTAPI java memory problem

Hi folks,

I have to monitor up to 800 phones at once. I place an CallObserver on every terminal. I get the terminals' names via AXL. All works fine and the program is running for several hours. I have allocated 1024 MB of memory to the java heap. After those few hours the java process is still running but does not do anything (e.g. writing logs or DB entries). If I look up the machines' performance I can see that the RAM of the machine is full.

Is there a way to decrease memory usage with better programming style?

I place the observers in the following way where 'phones' is an array and contains the SEP... address of the phones:

for (int i=0; phones.size() > i; i++){

try {

Terminal term = provider.getTerminal(phones.get(i));

term.addCallObserver(new MyCallObserver());

System.out.println(phones.get(i));

}catch (Exception e){

e.printStackTrace();

}

}

I appreciate any help!!

Thx in advance and if one needs more information I will provide as much as I can!

Regards

Peter

2 REPLIES
Silver

Re: JTAPI java memory problem

Modify the script with the following and retest thescenario:

Instantiate peer = JtapiPeerFactory.getJtapiPeer(null) ones instead of instantiating every time in the loop.

Invoke Provider.shutdown only after provider becomes Inservice (Cisco Jtapi will send ProviderInServiceEvent after it goes inService) instead of shutting down as soon application gets the provider.

New Member

Re: JTAPI java memory problem

Thanks amritpatek,

I do instantiate the peer variable before I start the loop to get the terminals.

One question to your second suggestion about the provider shutdown. Why should I shut down the provider if I want to monitor the terminals continously? I mean my application should monitor the phones on a permanent basis not just for a few minutes. Maybe you can offer a brief explanation what you mean with your post. Thanks in advance again for your help!!!

Cheers

Peter

141
Views
0
Helpful
2
Replies
CreatePlease to create content