This might be an obvious but I'm having a hard time understanding why we need to define the class of a bean in two places.... 

From the spring reference manual...
...

```
<bean id="petStore"
class="org.springframework.samples.jpetstore.services.PetStoreServiceImpl">
<property name="accountDao" ref="accountDao"/>
<property name="itemDao" ref="itemDao"/>
<!-- additional collaborators and configuration for this bean go here -->
</bean>

```

---

```
// retrieve configured instance
PetStoreServiceImpl service = context.getBean("petStore", PetStoreServiceImpl.class);

```

Shouldn't the xml fine be enough for the container to know the class of petStore?