public void setup(HttpSession session) {
terminateEarly(session);
SolverFactory solverFactory = SolverFactory.createFromXmlResource(
"org/optaplanner/examples/cloudbalancing/solver/cloudBalancingSolverConfig.xml");
Solver solver = solverFactory.buildSolver();
session.setAttribute(CloudBalancingSessionAttributeName.SOLVER, solver);
// Load a problem with 40 computers and 120 processes
CloudBalance unsolvedSolution = new CloudBalancingGenerator(true).createCloudBalance(100, 300);
session.setAttribute(CloudBalancingSessionAttributeName.SHOWN_SOLUTION, unsolvedSolution);