There are several ways that could be used. Which would be better depends on how many, their nature, concurrent access concerns, will they be updated, etc. One is a static object using one of the Java collection classes, with services to CRUD the variables as desired. Of course you’ll want to make sure any solution is thread safe.
I’ve had mixed experience with the storage services. In one case, they worked fine for what we needed. In another, ran into deadlock issues that I could not resolve in the time I had. Personally, I would tend to steer clear of those.
#webMethods#Integration-Server-and-ESB#Flow-and-Java-services