The emulator has to intercept most of the instructions used for guest-kernel-to-application communications and has to model a complete set of virtual hardware devices.
If these requirements hold then Cloudfoundry will automatically intercept your local datasource and use the Cloudfoundry service instead of what is set in the Spring context.