robertoprato / bluecove

Automatically exported from code.google.com/p/bluecove
0 stars 0 forks source link

Concurrency problem #30

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When two different OBEX clients concurrently running in the same jvm try to
deliver a file to two different OBEX servers. The second Thread rises the
following exception:
Mar 27, 2008 10:01:10 AM concurrencia.ObexClient run
SEVERE: null
java.io.IOException: Failed to connect. [16] Device or resource busy
        at
com.intel.bluetooth.BluetoothStackBlueZ.connectionRfOpenClientConnectionImpl(Nat
ive
Method)
        at
com.intel.bluetooth.BluetoothStackBlueZ.connectionRfOpenClientConnection(Bluetoo
thStackBlueZ.java:434)
        at
com.intel.bluetooth.BluetoothRFCommClientConnection.<init>(BluetoothRFCommClient
Connection.java:33)
        at
com.intel.bluetooth.MicroeditionConnector.openImpl(MicroeditionConnector.java:38
9)
        at
com.intel.bluetooth.MicroeditionConnector.open(MicroeditionConnector.java:159)
        at javax.microedition.io.Connector.open(Connector.java:81)
        at concurrencia.ObexClient.enviaSaludo(ObexClient.java:79)
        at concurrencia.ObexClient.run(ObexClient.java:67)
        at java.lang.Thread.run(Thread.java:619)

Am I right expecting a local device to support multiple connections to
multiple devices?

I'm using the SNAPSHOT version of bluecove and bluecove-gpl

Original issue reported on code.google.com by stalin.m...@gmail.com on 27 Mar 2008 at 5:03

GoogleCodeExporter commented 8 years ago

Original comment by skarzhev...@gmail.com on 5 Apr 2008 at 8:33

GoogleCodeExporter commented 8 years ago
Just tested and BlueCove on BlueZ works as expected.
I was able to connect and send data to different devices at the same time.

BTW there are no point running your application in two different JVMs if they 
are
using the same BT adapter.

You should get: "[16] Device or resource busy"  When connection already 
established
to the same device same port.

Original comment by skarzhev...@gmail.com on 7 Apr 2008 at 10:05