Created
June 15, 2015 15:20
-
-
Save jsanda/f1f9c8199d0e67cbe062 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public class MetricsServiceProducer { | |
private MetricsServiceImpl metricsService; | |
@Produces | |
public MetricsService getMetricsService() { | |
if (metricsService == null) { | |
metricsService = new MetricsServiceImpl(); | |
Session session = // create session object... | |
String keyspace = // keyspace to use for metrics... | |
boolean resetDB = true; | |
metricsService.startUp(session, keyspace, resetDB); | |
} | |
return metricsService; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment