From 22775ec46bdf3dc361f72b10ce2d96d890c87050 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 18 Apr 2012 23:41:10 +0200 Subject: [PATCH] Store the core itself in the servlet context. --- src/main/java/net/pterodactylus/demoscenemusic/core/Core.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/net/pterodactylus/demoscenemusic/core/Core.java b/src/main/java/net/pterodactylus/demoscenemusic/core/Core.java index bfa8dee..4dc36f4 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/core/Core.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/core/Core.java @@ -45,6 +45,7 @@ public class Core implements ServletContextListener { * {@inheritDoc} */ public void contextInitialized(ServletContextEvent servletContextEvent) { + servletContextEvent.getServletContext().setAttribute("core", this); try { Context context = new InitialContext(); DataSource dataSource = (DataSource) context.lookup("java:/comp/env/jdbc/demosceneMusic"); -- 2.7.4