private DataManager dataManager;
+ /** The data directory. */
+ private DataDirectory dataDirectory;
+
private final ConsumerManager consumerManager = new ConsumerManager();
public DataManager getDataManager() {
return consumerManager;
}
+ /**
+ * Returns the data directory helper.
+ *
+ * @return The data directory
+ */
+ public DataDirectory getDataDirectory() {
+ return dataDirectory;
+ }
+
//
// SERVLETCONTEXTLISTENER METHODS
//
@Override
public void contextInitialized(ServletContextEvent servletContextEvent) {
servletContextEvent.getServletContext().setAttribute("core", this);
+ dataDirectory = new DataDirectory(servletContextEvent.getServletContext().getInitParameter("data-directory"));
try {
Context context = new InitialContext();
DataSource dataSource = (DataSource) context.lookup("java:/comp/env/jdbc/demosceneMusic");
</listener>
<context-param>
- <description>The directory where the streaming files (MP3, Vorbis, etc.) are stored.</description>
- <param-name>storage.streamed</param-name>
- <param-value>/var/lib/demoscene-music/streamed</param-value>
- </context-param>
-
- <context-param>
- <description>The directory where the original files (binaries, SID files, MOD files, etc.) are stored.</description>
- <param-name>storage.original</param-name>
- <param-value>/var/lib/demoscene-music/original</param-value>
+ <description>The directory where the files are stored.</description>
+ <param-name>data-directory</param-name>
+ <param-value>/var/lib/demoscene-music/files</param-value>
</context-param>
<resource-ref>