If you have configured Infinispan via xml already then you shouldn't need to do anything programatically. Just do something like: -
EmbeddedCacheManager cacheManager = new DefaultCacheManager(persistence.xml);
Cache cache = cacheManager.getCache();
And that should do it for you.
Well what you can do is get all the keys in the cache as a set - there's an API method on that. From there you can get hold of the values in the cache that you need. Simply put: - cache --> getKeys() --> {I can now get all the values that I'd require}.