Sulla mia applicazione flex utilizzo un bridge su un framework java. il mio problema è che quando chiudo la mia applicazione client, il server continua a cercare il client e finisce con il saturare la cpu.
Come posso chiudere il socket? (anche lanciando un jar)
Di seguito vi riporto i vari passaggi che rileva l'applicazione server:
Avvio:
java -cp systemlib\commons-io-1.3.1.jar;systemlib\log4j-1.2.9.jar;systemlib\commandlibrary.jar;artemis-0.1.jar com.effectiveui.artemis.ServiceControl
0 [main] INFO com.effectiveui.artemis - Artemis Service Control Starting
Bound port: 2127
{io.ports.start=2127, io.ports.end=2227, io.protocol=com.effectiveui.artemis.io.
amf}
Listening for a client...
125 [main] DEBUG com.effectiveui.artemis.library.loader.ArtemisClas sLoader -
loadClass(com.effectiveui.artemis.samples.adbc.Loa dListener, false)
125 [main] DEBUG com.effectiveui.artemis.library.loader.ArtemisClas sLoader -
loadClass(com.effectiveui.artemis.library.ArtemisL ibraryListener, false)
125 [main] DEBUG com.effectiveui.artemis.library.loader.ArtemisClas sLoader -
loading system class: com.effectiveui.artemis.library.ArtemisLibraryList ener
140 [main] DEBUG com.effectiveui.artemis.library.loader.ArtemisClas sLoader -
loadClass(java.lang.Object, false)
140 [main] DEBUG com.effectiveui.artemis.library.loader.ArtemisClas sLoader -
loading system class: java.lang.Object
140 [main] DEBUG com.effectiveui.artemis.library.loader.ArtemisClas sLoader -
loading local class: com.effectiveui.artemis.samples.adbc.LoadListener
140 [main] DEBUG com.effectiveui.artemis.library.loader.ArtemisClas sLoader -
loadClass(java.lang.Throwable, false)
140 [main] DEBUG com.effectiveui.artemis.library.loader.ArtemisClas sLoader -
loading system class: java.lang.Throwable
140 [main] DEBUG com.effectiveui.artemis.library.loader.ArtemisClas sLoader -
loadClass(java.lang.ClassNotFoundException, false)
140 [main] DEBUG com.effectiveui.artemis.library.loader.ArtemisClas sLoader -
loading system class: java.lang.ClassNotFoundException
140 [main] DEBUG com.effectiveui.artemis.library.loader.ArtemisClas sLoader -
loadClass(java.lang.Class, false)
140 [main] DEBUG com.effectiveui.artemis.library.loader.ArtemisClas sLoader -
loading system class: java.lang.Class
140 [main] DEBUG com.effectiveui.artemis.library.loader.ArtemisClas sLoader -
loadClass(com.effectiveui.artemis.samples.adbc.ADB C, false)
156 [main] DEBUG com.effectiveui.artemis.library.loader.ArtemisClas sLoader -
loadClass(com.effectiveui.artemis.mirror.ArtemisOb ject, false)
156 [main] DEBUG com.effectiveui.artemis.library.loader.ArtemisClas sLoader -
loading system class: com.effectiveui.artemis.mirror.ArtemisObject
156 [main] DEBUG com.effectiveui.artemis.library.loader.ArtemisClas sLoader -
loading local class: com.effectiveui.artemis.samples.adbc.ADBC
156 [main] DEBUG com.effectiveui.artemis.library.loader.ArtemisClas sLoader -
loadClass(java.sql.SQLException, false)
156 [main] DEBUG com.effectiveui.artemis.library.loader.ArtemisClas sLoader -
loading system class: java.sql.SQLException
156 [main] DEBUG com.effectiveui.artemis.library.loader.ArtemisClas sLoader -
loadClass(com.effectiveui.artemis.samples.adbc.cal ls.OpenConnectionCall, false)
156 [main] DEBUG com.effectiveui.artemis.library.loader.ArtemisClas sLoader -
loadClass(com.effectiveui.artemis.mirror.call.Arte misObjectCall, false)
171 [main] DEBUG com.effectiveui.artemis.library.loader.ArtemisClas sLoader -
loading system class: com.effectiveui.artemis.mirror.call.ArtemisObjectC all
171 [main] DEBUG com.effectiveui.artemis.library.loader.ArtemisClas sLoader -
loading local class: com.effectiveui.artemis.samples.adbc.calls.OpenCon nectionCa
ll
171 [main] DEBUG com.effectiveui.artemis.library.loader.ArtemisClas sLoader -
loadClass(com.effectiveui.artemis.samples.adbc.dto .ConnectionCredentials, false)

171 [main] DEBUG com.effectiveui.artemis.library.loader.ArtemisClas sLoader -
loading local class: com.effectiveui.artemis.samples.adbc.dto.Connectio nCredenti
als
187 [main] ERROR com.effectiveui.artemis.library.loader.ArtemisLibr aryLoader
- Error Loading Library: java.lang.IllegalArgumentException: Parameter 'director
y' is not a directory
187 [main] DEBUG com.effectiveui.artemis.ArtemisBridge - simple rpc library:
adbc
187 [main] DEBUG com.effectiveui.artemis.ArtemisBridge - simple rpc library:
ArtemisScreenshot
187 [main] DEBUG com.effectiveui.artemis.ArtemisBridge - simple rpc library:
ArtemisXSLT

Lancio il client:
Client connected: Socket[addr=/127.0.0.1,port=2983,localport=2127]
Opened socket... Socket[addr=/127.0.0.1,port=2983,localport=2127]
Listening for a client...

in questo momento riesco a far fare quello che voglio al client, ma se chiudo l'applicazione java satura la CPU perchè il socket è rimasto aperto ed il server cerca di ristabilire la connessione con il client