Page 1 of 1

About Question enthuware.ocejws.v6.2.293 :

Posted: Tue Nov 04, 2014 7:07 am
by austinor
For the question:
In a legacy enterprise system there are different applications and protocols. The company owning the enterprise system wants increase its business by allowing clients to connect over the internet. What is the quickest way to expose these legacy application services.

Supplied correct answer:

By creating an EJB based Web Service that exposes the required services and connects with the back-end system.
Does it have to be an EJB-based web service? If yes, why is that so? ... I mean, can't servlet-based JAX-WS web service also do?

Re: About Question enthuware.ocejws.v6.2.293 :

Posted: Tue Nov 04, 2014 7:20 am
by austinor
Is it because of the usual services provided by the EJB-container such as transaction management, connection pooling, session management, persistence, ... etc?

Re: About Question enthuware.ocejws.v6.2.293 :

Posted: Tue Nov 04, 2014 1:50 pm
by fjwalraven
Yes, you answered most of it yourself. (it is possible with a Servlet-based Web Service but preferably an EJB-based Web Service should be used)

Apart from the reasons you summed up: Servlets are not scalable like EJB's. Of every Servlet only one instance is created. EJB's are pooled and grabbed when needed.

Regards,
Frits