try {// connect to serverserver.connect();// add sync access, poll every 500 msAccessBase access = new SyncAccess(server, 500);access.addItem(itemId, new DataCallback() {@Overridepublic void changed(Item item, ItemState state) {System.out.println(state);}});// start readingaccess.bind();// wait a little bitThread.sleep(10 * 1000);// stop readingaccess.unbind();} catch (final JIException e) {System.out.println(String.format("%08X: %s ->", e.getErrorCode(), server.getErrorMessage(e.getErrorCode())));}
Recieved RESPONSE
Jun 24, 2014 5:34:54 PM rpc.DefaultConnection processOutgoing
INFO:
Sending REQUEST
Jun 24, 2014 5:34:54 PM rpc.DefaultConnection processIncoming
INFO:
Recieved RESPONSE
Value: [[[Type: 1 , [Hello]]]], Timestamp: Tue Jun 24 17:34:54 IDT 2014, Quality: 192, ErrorCode: 00000000
Jun 24, 2014 5:34:55 PM rpc.DefaultConnection processOutgoing
INFO:
Sending REQUEST
Jun 24, 2014 5:34:55 PM rpc.DefaultConnection processIncoming
INFO:
Recieved RESPONSE
Value: [[[Type: 1 , [Hello]]]], Timestamp: Tue Jun 24 17:34:54 IDT 2014, Quality: 192, ErrorCode: 00000000
Jun 24, 2014 5:34:55 PM rpc.DefaultConnection processOutgoing
INFO:
Sending REQUEST
Jun 24, 2014 5:34:55 PM rpc.DefaultConnection processIncoming
INFO:
Recieved RESPONSE
Value: [[[Type: 1 , [world!]]]], Timestamp: Tue Jun 24 17:34:55 IDT 2014, Quality: 192, ErrorCode: 00000000
Jun 24, 2014 5:34:56 PM rpc.DefaultConnection processOutgoing
INFO:
Sending REQUEST
Jun 24, 2014 5:34:56 PM rpc.DefaultConnection processIncoming
INFO:
Recieved RESPONSE
Value: [[[Type: 1 , [world!]]]], Timestamp: Tue Jun 24 17:34:55 IDT 2014, Quality: 192, ErrorCode: 00000000
Jun 24, 2014 5:34:56 PM rpc.DefaultConnection processOutgoing
INFO:
Sending REQUEST
Jun 24, 2014 5:34:56 PM rpc.DefaultConnection processIncoming
INFO:
Recieved RESPONSE
Value: [[[Type: 1 , [This]]]], Timestamp: Tue Jun 24 17:34:56 IDT 2014, Quality: 192, ErrorCode: 00000000
Jun 24, 2014 5:34:57 PM rpc.DefaultConnection processOutgoing
INFO:
Sending REQUEST
Jun 24, 2014 5:34:57 PM rpc.DefaultConnection processIncoming
INFO:
Recieved RESPONSE
Value: [[[Type: 1 , [This]]]], Timestamp: Tue Jun 24 17:34:56 IDT 2014, Quality: 192, ErrorCode: 00000000
Jun 24, 2014 5:34:57 PM rpc.DefaultConnection processOutgoing
INFO:
Sending REQUEST
Jun 24, 2014 5:34:57 PM rpc.DefaultConnection processIncoming
INFO:
Recieved RESPONSE
Value: [[[Type: 1 , [is]]]], Timestamp: Tue Jun 24 17:34:57 IDT 2014, Quality: 192, ErrorCode: 00000000
Jun 24, 2014 5:34:58 PM rpc.DefaultConnection processOutgoing
INFO:
Sending REQUEST
Jun 24, 2014 5:34:58 PM rpc.DefaultConnection processIncoming
INFO:
Recieved RESPONSE
Value: [[[Type: 1 , [is]]]], Timestamp: Tue Jun 24 17:34:57 IDT 2014, Quality: 192, ErrorCode: 00000000
Jun 24, 2014 5:34:58 PM rpc.DefaultConnection processOutgoing
INFO:
Sending REQUEST
Jun 24, 2014 5:34:58 PM rpc.DefaultConnection processIncoming
INFO:
Recieved RESPONSE
Value: [[[Type: 1 , [a]]]], Timestamp: Tue Jun 24 17:34:58 IDT 2014, Quality: 192, ErrorCode: 00000000
Jun 24, 2014 5:34:59 PM rpc.DefaultConnection processOutgoing
INFO:
Sending REQUEST
Jun 24, 2014 5:34:59 PM rpc.DefaultConnection processIncoming
INFO:
Recieved RESPONSE
Value: [[[Type: 1 , [a]]]], Timestamp: Tue Jun 24 17:34:58 IDT 2014, Quality: 192, ErrorCode: 00000000
Jun 24, 2014 5:34:59 PM rpc.DefaultConnection processOutgoing
INFO:
Sending REQUEST
Jun 24, 2014 5:34:59 PM rpc.DefaultConnection processIncoming
INFO:
Recieved RESPONSE
Value: [[[Type: 1 , [UC]]]], Timestamp: Tue Jun 24 17:34:59 IDT 2014, Quality: 192, ErrorCode: 00000000
Jun 24, 2014 5:35:00 PM rpc.DefaultConnection processOutgoing
INFO:
Sending REQUEST
Jun 24, 2014 5:35:00 PM rpc.DefaultConnection processIncoming
INFO:
Recieved RESPONSE
Value: [[[Type: 1 , [UC]]]], Timestamp: Tue Jun 24 17:34:59 IDT 2014, Quality: 192, ErrorCode: 00000000
Jun 24, 2014 5:35:00 PM rpc.DefaultConnection processOutgoing
INFO:
Sending REQUEST
Jun 24, 2014 5:35:00 PM rpc.DefaultConnection processIncoming
INFO:
Recieved RESPONSE
Value: [[[Type: 1 , [test.]]]], Timestamp: Tue Jun 24 17:35:00 IDT 2014, Quality: 192, ErrorCode: 00000000
Jun 24, 2014 5:35:01 PM rpc.DefaultConnection processOutgoing
INFO:
Sending REQUEST
Jun 24, 2014 5:35:01 PM rpc.DefaultConnection processIncoming
INFO:
Recieved RESPONSE
Value: [[[Type: 1 , [test.]]]], Timestamp: Tue Jun 24 17:35:00 IDT 2014, Quality: 192, ErrorCode: 00000000
Jun 24, 2014 5:35:01 PM rpc.DefaultConnection processOutgoing
INFO:
Sending REQUEST
Jun 24, 2014 5:35:02 PM rpc.DefaultConnection processIncoming
INFO:
Recieved RESPONSE
Value: [[[Type: 1 , [Hello]]]], Timestamp: Tue Jun 24 17:35:01 IDT 2014, Quality: 192, ErrorCode: 00000000
Jun 24, 2014 5:35:02 PM rpc.DefaultConnection processOutgoing
INFO:
Sending REQUEST
Jun 24, 2014 5:35:03 PM rpc.DefaultConnection processIncoming
INFO:
Recieved RESPONSE
Value: [[[Type: 1 , [world!]]]], Timestamp: Tue Jun 24 17:35:02 IDT 2014, Quality: 192, ErrorCode: 00000000
Jun 24, 2014 5:35:03 PM rpc.DefaultConnection processOutgoing
INFO:
Sending REQUEST
Jun 24, 2014 5:35:03 PM rpc.DefaultConnection processIncoming
INFO:
Recieved RESPONSE
Jun 24, 2014 5:35:03 PM rpc.DefaultConnection processOutgoing
INFO:
Sending REQUEST
Jun 24, 2014 5:35:03 PM rpc.DefaultConnection processIncoming
INFO:
Recieved RESPONSE
17:35:03.824 [jI_ShutdownHook] WARN org.jinterop.dcom.core.JISession - prepareForReleaseRef: Releasing numInstancesfirsttime + 5 references of IPID: 0001f019-1360-0000-102e-b4b5bb0b249e session: 2001520446 , numInstancesfirsttime is 5
17:35:03.828 [jI_ShutdownHook] WARN org.jinterop.dcom.core.JISession - prepareForReleaseRef: Releasing numInstancesfirsttime + 5 references of IPID: 0001681a-1360-0000-fde3-00b9eb7d0d83 session: 2001520446 , numInstancesfirsttime is 5
17:35:03.829 [jI_ShutdownHook] WARN org.jinterop.dcom.core.JISession - prepareForReleaseRef: Releasing numInstancesfirsttime + 5 references of IPID: 0001f019-1360-0000-102e-b4b5bb0b249e session: 2001520446 , numInstancesfirsttime is 5
17:35:03.829 [jI_ShutdownHook] WARN org.jinterop.dcom.core.JISession - prepareForReleaseRef: Releasing numInstancesfirsttime + 5 references of IPID: 0001b018-1360-0000-c55c-cb4b2278a7a9 session: 2001520446 , numInstancesfirsttime is 5
17:35:03.829 [jI_ShutdownHook] WARN org.jinterop.dcom.core.JISession - prepareForReleaseRef: Releasing numInstancesfirsttime + 5 references of IPID: 00019017-1360-0000-7d55-6bbf87f5e970 session: 2001520446 , numInstancesfirsttime is 5
17:35:03.829 [jI_ShutdownHook] WARN org.jinterop.dcom.core.JISession - prepareForReleaseRef: Releasing numInstancesfirsttime + 5 references of IPID: 0001481b-1360-0000-df9b-41d0eebad868 session: 2001520446 , numInstancesfirsttime is 5
17:35:03.829 [jI_ShutdownHook] WARN org.jinterop.dcom.core.JISession - prepareForReleaseRef: Releasing numInstancesfirsttime + 5 references of IPID: 00010814-1360-0000-9808-37632b28da20 session: 2001520446 , numInstancesfirsttime is 5
Hi,
Does it stop after 10 seconds?
Jens
--
You received this message because you are subscribed to the Google Groups "openSCADA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openscada+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Then have a look at the line where it stops the service after 10 seconds.
The application will sleep for 10 seconds and then unbind.
final AccessBase access = new SyncAccess ( server, 100 ); access.addItem ( itemId, new DataCallbackDumper () ); access.addItem ( itemId2, new DataCallbackDumper () ); // access.addItem ( itemId3, new DataCallbackDumper () ); // access.addItem ( itemId4, new DataCallbackDumper () );
// start reading access.bind ();
// run forever final boolean running = true; while ( running ) { Thread.sleep ( 10 * 1000 ); }
/* // stop reading access.unbind ();
// disconnect autoReconnectController.disconnect (); */ }
Well I would say that your application terminates after 10 seconds.