Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added Apache Solr, changed logging (halfway through)
- Loading branch information
kolais
committed
Mar 30, 2009
1 parent
adb7c5b
commit 87d4327
Showing
42 changed files
with
581 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0"?> | ||
<solr persistent="true" sharedLib="lib"> | ||
<cores adminPath="/admin/cores"> | ||
<core name="experiments" instanceDir="experiments" default="true"/> | ||
</cores> | ||
</solr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# just turn off all jul logging | ||
handlers = java.util.logging.ConsoleHandler | ||
|
||
# Set the default logging level for the root logger | ||
.level = ALL | ||
|
||
# Set the default logging level for new ConsoleHandler instances | ||
java.util.logging.ConsoleHandler.level = OFF |
52 changes: 51 additions & 1 deletion
52
src/main/java/uk/ac/ebi/arrayexpress/AEInterfaceApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,67 @@ | ||
package uk.ac.ebi.arrayexpress; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.slf4j.bridge.SLF4JBridgeHandler; | ||
import uk.ac.ebi.arrayexpress.app.Application; | ||
import uk.ac.ebi.arrayexpress.components.*; | ||
|
||
public class AEInterfaceApplication extends Application | ||
import javax.servlet.ServletContext; | ||
import javax.servlet.ServletContextEvent; | ||
import javax.servlet.ServletContextListener; | ||
import java.net.MalformedURLException; | ||
import java.net.URL; | ||
|
||
public class AEInterfaceApplication extends Application implements ServletContextListener | ||
{ | ||
// logging machinery | ||
private final Logger logger = LoggerFactory.getLogger(getClass()); | ||
|
||
private ServletContext servletContext; | ||
|
||
public AEInterfaceApplication() | ||
{ | ||
super("arrayexpress"); | ||
|
||
addComponent(new SaxonEngine()); | ||
addComponent(new SearchEngine()); | ||
addComponent(new Experiments()); | ||
addComponent(new Users()); | ||
addComponent(new DownloadableFilesRegistry()); | ||
addComponent(new JobsController()); | ||
} | ||
|
||
public URL getResource(String path) throws MalformedURLException | ||
{ | ||
return null != servletContext ? servletContext.getResource(path) : null; | ||
} | ||
|
||
|
||
public synchronized void contextInitialized( ServletContextEvent sce ) | ||
{ | ||
servletContext = sce.getServletContext(); | ||
|
||
logger.info("****************************************************************************************************************************"); | ||
logger.info("*"); | ||
logger.info("* {}", servletContext.getServletContextName()); | ||
logger.info("*"); | ||
logger.info("****************************************************************************************************************************"); | ||
|
||
// re-route all subsequent java.util.logging calls via slf4j | ||
SLF4JBridgeHandler.install(); | ||
|
||
initialize(); | ||
} | ||
|
||
public synchronized void contextDestroyed( ServletContextEvent sce ) | ||
{ | ||
terminate(); | ||
|
||
// restor java.util.logging calls to the original state | ||
SLF4JBridgeHandler.uninstall(); | ||
|
||
servletContext = null; | ||
|
||
logger.info("****************************************************************************************************************************\n\n"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
src/main/java/uk/ac/ebi/arrayexpress/app/ApplicationComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.