Created
March 21, 2012 16:11
-
-
Save ctataryn/2149120 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
@Configuration | |
public class CamelConfig { | |
@Resource | |
private SugarPlayerManagementService sugarService; | |
@Resource | |
private AdvantagePlayerManagementService advantageService; | |
@Resource | |
private DataWarehousePlayerManagementService dataWarehouseService; | |
/** | |
* The Camel Context will be automatically added to the ApplicationContext through this configuration method | |
* @return | |
*/ | |
public @Bean CamelContext getCamelContext() { | |
CamelContext camelContext = new DefaultCamelContext(); | |
try { | |
camelContext.addRoutes(new DataWarehouseRoutes(dataWarehouseService)); | |
camelContext.addRoutes(new SugarRoutes(sugarService)); | |
camelContext.addRoutes(new AdvantageRoutes(advantageService)); | |
camelContext.addRoutes(new PlayerManagementWebServiceRoutes(dataWarehouseService)); | |
} catch (Exception e) { | |
throw new RuntimeException(e); | |
} | |
try { | |
camelContext.start(); | |
} catch (Exception e) { | |
// TODO Auto-generated catch block | |
throw new RuntimeException(e); | |
} | |
return camelContext; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment