08-06-2014 09:23 AM
Hello,
when I create an application with jtapi, then it will never exit.
I've even created a simple program which just uses the provider, but the program won't exit.
import javax.telephony.*;
public class Startup {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
try
{
JtapiPeer peer = JtapiPeerFactory.getJtapiPeer(null);
String providerString = "<server>;login=<user>;passwd=<password>;appinfo=BusyLamp";
Provider provider = peer.getProvider(providerString);
System.out.format("Started Provider");
provider.shutdown();
System.out.format("Provider Shutdown");
}catch( Exception e)
{
}
}
}
The main function will return, but the program will never exit.
Am I missing something here or is this a bug?
Solved! Go to Solution.
09-09-2014 02:49 PM
Hello,
you gave me the right hint.
I've just disabled logging via
var properties = peer.getJtapiProperties(); properties.setUseFileTrace(false); properties.setUseJavaConsoleTrace(false);
and now it is working as expected =)
08-06-2014 04:45 PM
You may want to try 'System.exit(0);' at the end.
If you have JDK installed, you can run jconsole to check if there are any threads running.
09-05-2014 03:53 PM
Hello,
sorry for the late delay, but I was on holiday.
This didn't really work well =(.
I've also tried this with OpenJDK & ikvm (.NET Wrapper)
This is the Callstack with .NET
09-09-2014 05:11 AM
Hi.
I had the same issue. My solution was to disable logger thread.
Try adding jtapi.ini file with following configuration:
UseLogFileTraceWriteThread=0
Hope it helps
09-09-2014 02:49 PM
Hello,
you gave me the right hint.
I've just disabled logging via
var properties = peer.getJtapiProperties(); properties.setUseFileTrace(false); properties.setUseJavaConsoleTrace(false);
and now it is working as expected =)
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide