Setting codebase on a per entry basis....
Ewan Silver <[email protected]>
| Newsgroups | gmane.comp.java.sun.javaspaces |
|---|---|
| Message-ID | <[email protected]> |
Hi all, I am having a little codebase issue and am looking for some alternative viewpoints. My situation is as follows: I have multiple processes using a Javaspace to communicate. One of the Entries that is passing through the space can be considered to be a kind of FactoryEntry. Its role is to allow a generic JavaSpace process to create (and then write back into a Space) multiple instances of an Entry whose parent type is well known. The process that is using the FactoryEntry does not need to know the what type of Entry has actually been created. The generic process is able to retrieve and use the FactoryEntry in the first instance because the codebase has been set properly by the process that first placed the FactoryEntry into the space. The issue is: how does the Generic process set the codebase for the new Entrys that were created by the FactoryEntry? One solution would be to ensure that the codebase of the generic process always contains the details of any entry that it will ever potentially see. This is not really feasible because it will involve updating the codebase of many different generic processes everytime a new Entry type is created. This will be an administrative nightmare. What I really need is a way to programmatically set the codebase on a per Entry basis as it is written into the Space. It occurred to me that it might be possible to replace aspects of the Marshalling code within the Jeri Exporter used by the Javaspace (most notably MarshalOutputStreams and InvocationHandlers) with code that dynamically allows me to set the codebase based on the type of Entry that is passing through. This would have the advantage in that I would only have to change code in a few places (notably the proxys generated by the Javaspace implementations I have deployed). This was quickly a non starter - the MarshalOutputStreams, etc used by the Jeri exporter are only for the PROXY - what I really need is a way to be able to set the codebase INSIDE the proxy, not the codebase FOR the proxy. I am left with the feeling that there is no way to programmatically set per Entry codebases without going inside the JavaSpace implementation and making internal proxy/server changes..... am I right in thinking this? Cheers, Ewan =========================================================================== To unsubscribe, send email to [email protected] and include in the body of the message "signoff JAVASPACES-USERS". For general help, send email to [email protected] and include in the body of the message "help". To view past JAVASPACES-USERS postings, please see: http://archives.java.sun.com/archives/javaspaces-users.html