We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOther Libraries › bluetoothDesktop Connection Pool Exception
Page Index Toggle Pages: 1
bluetoothDesktop Connection Pool Exception (Read 603 times)
bluetoothDesktop Connection Pool Exception
Mar 31st, 2009, 7:40am
 
Hi there,
I just implemented an bluetooth application and I used bluetoothDesktop library for this issue. http://www.extrapixel.ch/processing/bluetoothDesktop/index.html

To start a freqently search I simply restart the Bluetooth like that:

Bluetooth b1 = new Bluetooth(this, Bluetooth.UUID_RFCOMM);
b1.start("simpleService" + bluetooths.length);
b1.discover();

everytime the DiscoverComplete Event is thrown I call the same code like above.
After about 20 minutes is got an Java runtime Exeptions which is called like this:

java.lang.RuntimeException: No free connections Objects in Pool.


Does anybody know what I am doing wrong

Thanks


roland
Re: bluetoothDesktop Connection Pool Exception
Reply #1 - Mar 31st, 2009, 7:59am
 
hi roland.

you probably don't .stop() your connection?
http://www.extrapixel.ch/processing/bluetoothDesktop/Bluetooth_stop.html

haven't used my library in a while, so i actually can't remember it exactly  Wink but obviously you need to stop() it as often as you start() it.
Re: bluetoothDesktop Connection Pool Exception
Reply #2 - Mar 31st, 2009, 1:15pm
 
i tried this, but same exception again. after i played a litte bit around i found the solution.

probably there is anywhere a bug or something like that that throws this exception when you create a new Bluetooth object frequently. so i just put the discover()-call into the draw method and anything works find scince 2 hours.

thank you for your help and your library.
Page Index Toggle Pages: 1