From: David ‘Bombe’ Roden Date: Wed, 18 Apr 2012 21:41:10 +0000 (+0200) Subject: Store the core itself in the servlet context. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=22775ec46bdf3dc361f72b10ce2d96d890c87050;p=demoscenemusic.git Store the core itself in the servlet context. --- 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");