In GigaSpaces version 6.x, a processing unit structure consisted of the following: Classes were placed under the root of the processing unit (/), jar files were placed under the lib directory, and shared resources were placed under the shared-lib directory. The most notable shared resources that were (required to be) placed under the shared-lib were common jar files where Entries (objects written to the space) were placed.
We always looked at this solution as less than optimal. This has been made even more apparent when in 6.6 we added support for web applications, and had to invent a new web application location, WEB-INF/shared-lib, where jar files including entries that were written to the space should be located. Of course, people are used to a certain web application structure, and users should not have to repackage their web application in order to deploy it on GigaSpaces Service Grid, but, we were really excited about our web application support, and knew that trying to get both the web application support and trying to tackle the “shared-lib” problem would mean that it would take much longer to get the web application feature out.
Well, I am happy to say that in the latest 7.0 milestone release, M3, a complete overhaul of our class loading architecture has been implemented (deserves another blog post), allowing us to completely remove the need for shared-lib. What does it mean? It means that if you package a simple processing unit, you should place classes either in the root folder, or as jar files within the lib directory. The shared-lib option should not be used anymore. If you are developing a web application that also write Entries to the Space, they can be safely placed either in WEB-INF/classes or WEB-INF/lib (as jar files).
An extremely nice side affect of the “no shared-lib” feature is the fact that now, when shared-lib is not used, Entries and other shared resources that used to be placed there are completely reloadable without bringing down the GSC (just by unpldeoying the processing unit).
So, in short, the use of shared-lib in processing unit and web application should be removed when using 7.0 M3 and future releases. “shared-lib” option is still supported and behaves in much the same way as it did in 6.x, but its usage is discouraged. We are even considering to automatically treat “shared-lib” as if it was another “lib”, and not even provide the option in 7.0, but we need your (GigaSpaces users) input on that.
Enjoy!