"Hill, Les" wrote:

> Paul,
>
> It is not clear what you are trying to do with your cache.

The application is a document management system with the twist that the
Document object has become very logic-intensive due to customer requirements.
Thus, using data objects became virtually impossible. As a result I created a
Document object cache based on the "cache management pattern" illustrated in
Mark Grand's Java Patterns book. The pattern uses a Singleton Manager, a
Fetcher, and a Cache object.

A quick example of how it is used in our NetD code is:

 public int stTitle_onBeforeHtmlOutputEvent(CSpHtmlOutputEvent event)
 {
  DocumentManager mgr = DocumentManager.getInstance();
  Document doc = mgr.fetchDocument(docIDString);
  CSpDisplayField f = (CSpDisplayField) event.getSource();
  f.setHtmlText(doc.getTitle());
  return (PROCEED);
 }


> But if cache
> consistency across JVMs is important, then I can think of at least two
> simple options:
>
> Use a global session object -- this would work well for relatively small
> caches.
>

Another poster recommended that I do that and it seems easiest and most
cost-effective for the client. I believe I can make my Cache object into a
CSpValue/Global object relatively quickly, but I have yet to do it.

>
> Use RMI and run a long-lived service that acts as a global cache for all
> CPs.  (This can be very easy or very complex depending on what your cache
> needs to do -- RMI itself is almost a no-brainer).
>

That sounds interesting. If anyone has examples of how to do it in NetDynamics,
I'd love to see them.

Thanks for your help,
Paul

_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to