I'd recommend creating a XML file that is specific to your integration test and register a custom scope:
Code:
<bean class="org.springframework.beans.factory.config.CustomScopeConfigurer">
<property name="scopes">
<map>
<entry key="session"><bean class="TestScope"/></entry>
</map>
</property>
</bean>
Unfortunately I don't think SessionScope will be acceptable because it requires a Session, or a reasonable approximation backing it. Also, "prototype" and "singleton" are not actual scopes, so you'd need to implement one. This class is the same as a prototype. If you wanted to be more similar to a singleton, in the get method you could store the bean in a HashMap using its name. If you wanted to get fancier you could build in support to your test class have the bean last the length of a single test, so the same bean would be returned during one test.
Code:
import org.springframework.beans.factory.config.Scope;
import org.springframework.beans.factory.ObjectFactory;
public class TestScope implements Scope {
public String getConversationId() {
return null;
}
public Object get(String name, ObjectFactory objectFactory) {
return objectFactory.getObject();
}
public Object remove(String name) {
return null;
}
public void registerDestructionCallback(String name, Runnable callback) {
}
}