Im using Primefaces Push (the new thing in 3.4) together with jsf2 and ejb3. Seperate .war and ejb.jar
Now I need to trigger a prime-push event from the ejb tier. What is a clean way to do this? Some options I can think of:
- ManagedBean pass down a callback interface when invoking the ejb method
- A JMS messagelistener in the web-tier and ejb to send messages.
- Managed bean to analyze returned data from ejb method invocation and do push if conditions are met.
Basicly the question is where to put below code?
PushContext pushContext = PushContextFactory.getDefault().getPushContext();
pushContext.push("/notifications", new FacesMessage(summary, detail));
What i've got working, I didnt go with any of my ideas above, just added dependencies needed to access atmosphere APIs from EJB-tier.
MANIFEST.MF for ejb.jar:
in pom.xml for ejb.jar and application.ear
Then simply copied two packages from primefaces sources into ejb.jar
because adding primefaces in pom.xml for ejb.jar caused