B4J Question Building web servers with B4J how create global variables

Discussion in 'B4J Questions' started by Roberto P., Feb 20, 2015.

  1. Roberto P.

    Roberto P. Well-Known Member Licensed User

    HI
    how to create global variables in the web server? user code and other information to be saved for each transaction.
    thanks
     
  2. avacondios

    avacondios Active Member Licensed User

    You can create a global Hashmap variable and store any information for each session or to share any information on each request. Unfortunately, we don't have the possibility to create listeners on Jetty server and it will be good idea to add on the next version of B4x. Be careful, the variables need to be thread safe, because each handler is running on different thread and you cannot modify on the same time a common global variable.
     
  3. Erel

    Erel Administrator Staff Member Licensed User

  4. Roberto P.

    Roberto P. Well-Known Member Licensed User

    is the example that I need
    thanks
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice