views:

164

answers:

3

I want to provide a Java-based Web Service, but I don't require the features of a full-blown J2EE Application Server. I would like it to start as quickly as possible, though that's not a hard requirement. The Web Service will handle multiple connections and require access to an Oracle database so it will at least require a thread pool and database connection pool. I may want to put a JSP interface onto it later to provide an internal maintainence interface.

I have looked at Jetty with an Apache CXF stack, but it looks like I'll have to do a fair amount configuration before even coding the web service - Will it be worth it? Will it even work? Should I forget about the complexity and simply go with JBoss/Weblogic/etc and put up with the bloat and extra start-up time?

+1  A: 

Setting up Tomcat 6 + Axis 2 is fairly easy. I wouldn't recommend using JBoss/Glassfish/etc for your scenario - the overhead far outweighs the only benefit - no additional setup involved.

Bozhidar Batsov
Are tomcat and axis 2 low overhead? I have heard that axis 2 at least isn't a good performer?
trojanfoe
+1  A: 

I am using embedded jetty for exposing a number of jax-ws webservices. Works pretty well, and configuration involved just stripping off things I didn't need from jetty.

raticulin
So you are using the jax-ws built into JDK 6 or some other stack? What did you strip off?
trojanfoe
jax-ws 2.1.4 but most of its components are now in jkd yes. I stripped of jsp stuff etc from jetty.
raticulin
+3  A: 

I'd go with JAX-WS RI on Jetty, Tomcat or GlassFish v3 (I do not agree with other opinions expressed here and according to my practical experience with GFv3, GFv3 offers a highly productive environment for development).

And please, don't go Axis 2 (I won't even talk about its architecture and horrible deployment model and packaging hell, just have a look at the JAX-WS RI 2.1 benchmark details).

Pascal Thivent
Ah, that sounds encouraging - I can happily use the JAX-WS built into JDK 6 rather than a 'custom' WS stack? Does that cover WS-* though?
trojanfoe
@trojanfoe JAX-WS RI implements WS-I Basic Profile 1.1, Simple SOAP Binding Profile 1.0 and Attachment Profile 1.0. If you want end-to-end message-level security then you'll need the WSIT layerof Metro (Metro = JAX-WS RI + WSIT). See http://www.theserverside.com/news/thread.tss?thread_id=44110 for more details.
Pascal Thivent
So I am looking at Jetty + Metro to meet my requirements? What about the database connection pool? Is that standard with Jetty?
trojanfoe
@trojanfoe Jetty does support connection pooling, see [DataSource Examples](http://docs.codehaus.org/display/JETTY/DataSource+Examples). But I still think you should give GFv3 a try ;)
Pascal Thivent
I will try Jetty + Metro first and then if I have problems I will try glassfish 3. Many thanks!
trojanfoe