This code (above) constructs objects and wires them together according to Beans.xml (below). ExampleService is still constructed even though it is only mentioned below. A long and complex object graph can be defined this way and the only class mentioned in code would be the one with the entry point method, which in this case is greet().