Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I would write the "Flusher" app as a stand alone Java process. Perhaps use something like <a href="http://wrapper.tanukisoftware.com/doc/english/download.jsp" rel="nofollow">Java Service Wrapper</a> to turn it into a service for your OS. I'm not very familiar with the options for interfacing with a RAM disk via Java, but you're either going to end up with an InputStream which you can keep open for the life of the process and continually read from, or you're going to continually poll from inside a while loop. It's perfectly ok to do something like the following:</p> <pre><code>private volotile boolean stopFlag; ... while(!stopFlag) { processNextInput(); } </code></pre> <p>Then you would have some other mechanism in another thread that could set stopFlag to true when you wanted to terminate the process.</p> <p>As for monitoring the flusher JMX seems like a good solution. That's exactly what it was intended for. You would create an MBean that would expose any kind of status or statistics you wanted and then other processes could connect to that MBean and query for that data.</p> <p>The "Client" app would then be a simple servlet application which does reporting on your database and provides a pretty front end for the MBean from your flusher. Alternatively you could just monitor the flusher using a JMX console and not even involve the client with that piece of the system.</p> <p>I don't think EJBs really make sense for this system. I'm somewhat biased against EJBs, so take my advice with a grain of salt, but to me I don't really see a need for them in this application.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload