Paul,

Using RMI from NetD is no different than using RMI from a normal Java
application.

Your code:
          DocumentManager mgr = DocumentManager.getInstance();
          Document doc = mgr.fetchDocument(docIDString);
          CSpDisplayField f = (CSpDisplayField) event.getSource();
          f.setHtmlText(doc.getTitle());

could easily be accessing a RMI object of type Document that is returned
from your singleton DocumentManager object (which may or may not be [your
choice] an RMI object).

If you want to explore RMI, I suggest you simply read the RMI example
document that comes with the JDK (both 1.1.x and 1.2.x). 

[EMAIL PROTECTED]
Team NetDynamics

> -----Original Message-----
> From: Paul Huard [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, May 19, 1999 3:52 PM
> To:   Hill, Les
> Cc:   [EMAIL PROTECTED]; 'ND4 Group'
> Subject:      Re: [ND] coordinating across CPs
> 
> "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