Repository cache operations
In general, SST seamlessly loads local representations of IDL interface definitions when required. However, in some circumstances, you might want to pre-load the cache with particular interface and module definitions. There are three mechanisms for doing this, defined as SstIdlRepository class methods:
buildOn: original into: destination with: elements from: repository
Creates a new instance of the receiver based on @original with the new containers whose repository IDs in @repository are given in @elements. The resulting cache is dumped out to @destination.
For example, to create a cache pre-loaded with the ping-pong IDL which has been loaded into a third-party interface repository whose IOR is in the file ifr.ior, you use this method as follows:
SstIdlRepository
buildOn: 'sstidlic.swp'
into: 'sstpingpong.swp'
with: #(#'IDL:PingPong:1.0')
from: 'ifr.ior'
Note that to use this cache, your IIOP application context must be established to use it with the idlRepository:cache: instance method of SstApplicationContext. If you have existing examples which use an alternative cache name, you can change the name of the destination cache to match your examples.
loadCacheWith: containers context: context
Attempts to download the contents of each container specified in the collection of repository IDs in @containers. The remote repository is found in the usual way from @context. The definitions are loaded into the context's IDL repository cache.
load: cache with: containers context: context
Attempts to download the contents of each container specified in the collection of repository IDs in @containers. The remote repository is found in the usual way from @context. The definitions are loaded into @cache.
In particular, you might want to use definitions for the CORBA module which differ from those supplied the Swapper file sstidlic.swp. This is done by first creating a minimal cache and then priming it with the modules desired as the following example demonstrates:
| context cache |
context := SstApplicationContext contextNamed: '<your context name>'.
cache := SstIdlRepository minimal.
SstIdlRepository
load: cache
with: (Array with: #'IDL:omg.org/CORBA:1.0')
context: context.
^cache
When starting with a minimal cache, you must always download at least the CORBA module. If the CORBA interface repository you are using does not provide access to the CORBA module definitions, you should make a copy of the Swapper file sstidlic.swp, set the context's repository cache location to the new file name, and use it as the cache to load with the loadCacheWith: context: operation instead.
Once the cache is primed, the Swapper can then be used as per normal to dump the new cache to a file for future use. The IOP, GIOP, and IIOP modules are always pre-loaded into every cache since SST relies on their exact definitions. These definitions cannot be overwritten.
Last modified date: 01/29/2015