Serge Nova Active Member Licensed User Mar 7, 2024 #1 Hello everyone, is it possible to insert client functionalities into a JRDC2 server application? The need is to check certain database information regularly (in the no-ui JRDC2 application) without having another application to do it.
Hello everyone, is it possible to insert client functionalities into a JRDC2 server application? The need is to check certain database information regularly (in the no-ui JRDC2 application) without having another application to do it.
Solution OliverA Mar 7, 2024 Serge Nova said: Hello everyone, is it possible to insert client functionalities into a JRDC2 server application Click to expand... Sure. One way, use a timer in the Main module to call a sub periodically. Then add your DBRequestMananger to your project and write JRDC2 client code as usual. Another option is to use one or more background workers (see https://www.b4x.com/android/forum/threads/server-background-workers.73269/). Just don't forget the StartMessageLoop as shown in the example code snippet (else your worker will finish on the first call to Sleep / Wait For and you will not be able to capture events in the worker's thread).
Serge Nova said: Hello everyone, is it possible to insert client functionalities into a JRDC2 server application Click to expand... Sure. One way, use a timer in the Main module to call a sub periodically. Then add your DBRequestMananger to your project and write JRDC2 client code as usual. Another option is to use one or more background workers (see https://www.b4x.com/android/forum/threads/server-background-workers.73269/). Just don't forget the StartMessageLoop as shown in the example code snippet (else your worker will finish on the first call to Sleep / Wait For and you will not be able to capture events in the worker's thread).
OliverA Expert Licensed User Longtime User Mar 7, 2024 #2 Serge Nova said: Hello everyone, is it possible to insert client functionalities into a JRDC2 server application Click to expand... Sure. One way, use a timer in the Main module to call a sub periodically. Then add your DBRequestMananger to your project and write JRDC2 client code as usual. Another option is to use one or more background workers (see https://www.b4x.com/android/forum/threads/server-background-workers.73269/). Just don't forget the StartMessageLoop as shown in the example code snippet (else your worker will finish on the first call to Sleep / Wait For and you will not be able to capture events in the worker's thread). Upvote 1 Solution
Serge Nova said: Hello everyone, is it possible to insert client functionalities into a JRDC2 server application Click to expand... Sure. One way, use a timer in the Main module to call a sub periodically. Then add your DBRequestMananger to your project and write JRDC2 client code as usual. Another option is to use one or more background workers (see https://www.b4x.com/android/forum/threads/server-background-workers.73269/). Just don't forget the StartMessageLoop as shown in the example code snippet (else your worker will finish on the first call to Sleep / Wait For and you will not be able to capture events in the worker's thread).
Serge Nova Active Member Licensed User Jul 29, 2024 #3 OliverA said: Another option is to use one or more background workers (see https://www.b4x.com/android/forum/threads/server-background-workers.73269/). Just don't forget the StartMessageLoop as shown in the example code snippet (else your worker will finish on the first call to Sleep / Wait For and you will not be able to capture events in the worker's thread). Click to expand... I just restarted the project, the second option works very well ?, thank you very much Upvote 0
OliverA said: Another option is to use one or more background workers (see https://www.b4x.com/android/forum/threads/server-background-workers.73269/). Just don't forget the StartMessageLoop as shown in the example code snippet (else your worker will finish on the first call to Sleep / Wait For and you will not be able to capture events in the worker's thread). Click to expand... I just restarted the project, the second option works very well ?, thank you very much