Introduction

Normally, a frontend such as a web application (e.g. JSF) is used to retrieve data from a system and display it. User interaction is required: a user pulls up a website and e.g. clicks a button which in turn triggers a whole round trip process (view calls controller, controller informs model, model updates and notifies view via controller again).

In my setup I don’t have any user interaction because my webapp is a view only. No user can do any CRUD actions (except Read). The “user interaction” comes so to speak from my backend: This system runs the entirety of business logic and receives user interactions through other channels than the webapp. However, all changes within the backend need to be somehow pushed into the webapp frontend.

I am using JEE, more precisely EJB 3.2, JSF 2.2 and PrimeFaces 5.1 (as well as JMS 2.x, WildFly 8.2, OmniFaces 2.0). My backend communicates changes via JMS. I defined a MessageListener within my webapp that listens to all incoming changes. These changes are pushed into the model (EJBs).

A model should never know anything about it’s view: the model is completely agnostic to the view. In JEE terms this means that my EJBs (model) should not inject any ManagedBeans (controller).