Global VARIABLES

Hi,
Is it possible to declare global variables in IS? I think it is possible using the inbuilt services in storage folder.But i wanted to know can i do the same using sme java services?

Appreciate ur help.

regards,
Suvankar

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.

Declare any variable which needs to be declared as public in the following format:

public static ArrayList outputList = new ArrayList();

Declare this in the shared tab in your java service.