I configure a SessionListener in web.xml:
<listener>
<listener-class>epulse.audit.manager.SessionListener</listener-class>
</listener>
And in the listener I have directly wired the Logger so:
public class SessionListener implements HttpSessionListener {
/** The log. */
private static Logger log = Logger.getLogger(SessionListener.class);
/** The audit log. */
@Inject
private AuditDAO auditDAO;
I now want to inject a DAO to perform auditing but of course the
SessionListener is managed by the web container, what to do?
As it happens at present the audit log is just a wrapper service for SLF4j so I
can directly instantiate the audit logging the same as the regular log.
John