The search services Enterprise JavaBean (EJB) caches agents, channels, and subchannels to minimize the number of accesses to the database. Caching is based on the user name. If multiple clients have the same user name, they share the same cache. Clients of the search services EJB must be aware that:
Each user must make a call to setupUserMemory(user) before any other calls for agents or channels.
Each user must make a call to cleanupUserMemory(user) when that user is finished with agents and channels.
While iterating through agents, channels, or subchannels, another client using the same user name may be creating or removing items. This can result in items becoming unavailable and an exception being thrown.
The first call to getCountOfChannels(roles, user) loads the channels and subchannels from the database into the cache for that user name. Subsequent calls to getCountOfChannels(roles, user) with the same user name, even by another client, uses information in the cache. Subsequent calls do not reload the channels from the database, even if different roles are given.
Copyright © 2004. Sybase Inc. All rights reserved. |
![]() |