How is this EJB packaged? Is it inside the WAR or in a separate JAR inside an EAR? However I’m note sure this will work correctly as PrettyContext.getCurrentInstance() is using FacesContext.getCurrentInstance() internally which may not work from EJBs.
But there are other ways of obtaining the PrettyConfig instance. For example:
However, you will need to have access to the ServletContext in this case. Please be aware that PrettyFaces always initializes itself for one web application, so you will definitively have to use something like the ServletContext to access the PrettyFaces configuration.
Do you play Magic?
Get TopDecked MTG, the #1 Magic App, built by players, for players. Free to use, forever.