This kind of architecture called N-Tier architecture.
I worked in an application that had 2 application servers. The first application server host JSP/Servlet/JSTL, while the second hosts
EJB. First application server takes care of view to users, server site validation, authentication, session management, filters, etc. Second application server hosts EJBs that perform complex business logic and interact with database.
Remote lookup of EJB is meant for this kind of situations.