views:

67

answers:

4

I am looking for something very close to an application server with these features:

  • it should handle a series of threads/daemons, allowing the user to start-stop-reload each one without affecting the others
  • it should keep libraries separated between different threads/daemons
  • it should allow to share some libraries

Currently we have some legacy code reinventing the wheel... and not a perflectly round-shaped one at that! I thought to use Tomcat, but I don't need a web server, except maybe for the simple backoffice user interface (/manager/html).

Any suggestion? Is there a non-web application server, or is there a better alternative to Tomcat (more lightweight, for example, or easier to configure)? Thanks in advance.

+1  A: 

You could consider Spring dmServer. It's a rather non-traditional appserver, with a very lightweight OSGi core (the web container is optional, for example), but it gives you classloader isolation and basic container services. It's not a JavaEE container, but comes with plug-in modules that are.

You're stlll going to have to do a lot of work yourself, but the basics of dmServer are very sound.

skaffman
+4  A: 

Have you looked at OSGi ? You can load/unload bundles (basically .jar files with metadata) independently of each other, and optionally define dependencies between these (with a software lifecycle defined such that bundles are aware of other bundles being loaded/unloaded).

Brian Agnew
OSGI is a specification, rather than a server. Do you recommend any specific software?
skaffman
It is. I don't :-) Other than I've worked a little with Apache Felix - http://felix.apache.org/site/index.html and the Newton framework - http://newton.codecauldron.org/site/index.html. But neither extensively.
Brian Agnew
+2  A: 

I have found the Jetty "contexts" concept very useful in handling applications (packaged as WAR's and with servlet context listeners), where the xml-file placed in contexts/ describe fully what you want to have started. When you remove the xml-file again, the thing described is stopped.

If you do not start a server connector you will just have a start-stop thing which sounds like what you are looking for.

Jetty can be made very small so the overhead is not bad.

Thorbjørn Ravn Andersen
+1  A: 

No one stops you from sending binary and text data instead of HTML-pages using http protocol. That is whats servlets are for. So I would use the tomcat server.

Ha
I'm not sure I've understood what you are suggesting here...
Manrico Corazzi