Leo
Leo

Reputation: 6570

Is there any JavaEE architecture where business logic layer is dedicated?

Supposing a classical 3-tier JavaEE architecture like this

All JavaEE tutorial examples show the web and biz layers in different containers, but in the same JavaEE server.

Is there any situation where there is an advantage to keep the EJBs apart, in their own machine? In this case, supposing they're going to communicate with the web tier via RMI, is there any kind of JavaEE container that manages EJBs but not JSP and servlets?

Upvotes: 2

Views: 475

Answers (1)

Gabriel Aramburu
Gabriel Aramburu

Reputation: 2981

Is there any situation where there is an advantage to keep the EJBs apart, in their own machine?

Sometimes, specifics non-functional requirements can determine your app design. For example, security: in order to achieve some security norms, the business layer has to reside in a more secure server not exposed directly to Internet.

Availability: if your business layer exposes some services consumed by a different client than the web server, and these services offer some kind of mission-critical functionality, probably they need to run on a 24/7 server.

I'm not sure that think in terms of "advantage" is the correct way to see this kind of decoupled architecture. I think that is more like a price (which is translated in a more complex design) that you have to pay if you need achieve this kind of requirements.

is there any kind of JavaEE container that manages EJBs but not JSP and servlets?

Yes, for example OpenEjb.

Upvotes: 2

Related Questions