users@glassfish.java.net

EJB Web Service endpoint architecture

From: Drinkwater, GJ \(Glen\) <"Drinkwater,>
Date: Tue, 27 Mar 2007 10:59:36 +0100

Hi

I have quite a few ejbs that I wish to expose as web services and I was wondering whats the best way to do this. Most of the methods are transactional and need to be thread safe.

I could

A) annontate each ejb with @WebService which means the clients have to import dozens of wsdl files for each ejb or

B) Create one ejb, and use a façade pattern to expose all the methods as one wsdl file. This means though that this ejb will be the bottleneck of the application, with every client having to have a instance of the bean to perform an operation on the other beans.

These two solutions are not really ideal. Are there any other solutions? I was thinking I could do B) with servlets so there is no bottlenecks but then I will have to look after a web module aswell as the ejb module, also are there any other implications of this solution?


Thanks Glen