No. Since car and bus are not created by the spring factory, the instances you get will not be transaction weaved proxies so the annotations would be pointless.
You want to create it via the spring context using initializeBean or createBean. For more details, look at the java doc on AutoWireCapableBeanFactory.
Alternately you can register Can and Bus with spring context as prototype beans, and just use getBean( "beanName", BeanType.class ) and spring will always return you new instances of them.
@Component
@Scope("singleton")
public class CarFactory {
@Autowired
private AutowireCapableBeanFactory autowireCapableBeanFactory;
public Car create( Make make, Model model, Year year ) {
Car car = new Car( make, model, year );
// this will apply the post processors including ones that might wrap the original bean
// such as transaction interceptors etc.
Car carProxy = Car.class.cast(autowireCapableBeanFactory.configureBean(car, "carBean"));
return carProxy;
}
}