Skip to content

Instantly share code, notes, and snippets.

@ctataryn
Created March 21, 2012 16:11
Show Gist options
  • Save ctataryn/2149120 to your computer and use it in GitHub Desktop.
Save ctataryn/2149120 to your computer and use it in GitHub Desktop.
@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