Java application server to use or not if my program has no user interface?
<p>I'm doing a project, splitting the whole application into frontend and backend (skipping database part first) and use jms as frontend and backend communicating platform. Frontend will be web-based, so we write jsps and servlets, packaging as war and deploy to application server(oracle weblogic). But for backend, since it has no user interface (just pick message from jms, new a thread to do db operation using JPA and do business logics and send result to jms), should I use application server to run my code?</p>

<p>I've tried putting code into regular application server, wrapping backend thread starting code in servlet context listener, storing started thread into servlet context, and everything seems to be fine. Spring part seems to work too. Is this the right way?</p>

<p>If I choose not to use the servlet way, how should i package my code and deploy to application server? The entry point of the code will be what class?</p>
