Re: Recommendations for working with LookupCache
Patrick Wright <[email protected]>
| Newsgroups | gmane.comp.java.sun.jini |
|---|---|
| Message-ID | <[email protected]> |
Mark, Bob Thanks for your responses. I'll respond to both at once because the answer is the same. My problem is simply a coding error on my part. You both pointed to some mistake with equality--that gave me a clue. I was passing the service item, not the service reference, to discard(). The Object parameter should have been the queue, however I reasoned that the LookupCache was a cache of ServiceItems, and would need the item reference to know what to discard. By calling discard(serviceref) LookupCache behaves as expected, and I don't need my complicated workaround. One question (re: Jini design)--why discard service references and not service items? It's not clear to me how one should look at it (esp. being new to Jini). Thanks again, your answers saved me from some too-complex code. Patrick -------------------------------------------------------------------------- Getting Started: http://www.jini.org/wiki/Category:Getting_Started Community Web Site: http://jini.org jini-users Archive: http://archives.java.sun.com/archives/jini-users.html Unsubscribing: email "signoff JINI-USERS" to [email protected]