Re: JavaSpace Name

Dan Creswell <[email protected]>
Newsgroups gmane.comp.java.sun.javaspaces
Message-ID <[email protected]>
Diana Huang wrote:
> Hi all,
>
> I start a JavaSpace. Its name is "MessageSpace". And I also have a
> http server, a lookup server running successfully. However, after I
> start a outrigger, I can't find the space with a name of
> "MessageSpace". The details of coding :
>

[snip]

> Additionally, I use Browser service to monitor the services. After
> the reggie and the JavaSpace is started, I can see two services
> (ServiceRegistrar and JavaSpace). The JavaSpace service has two
> attributes (ServiceInfo and BasicServiceType). I found even I set

That, unfortunately, means you weren't successful in naming your
outrigger instance..... :(

> spaceName in the outrigger starting script, the name in the

I'm not sure why you expected that setting spaceName to a value would
have any effect on Outrigger.  Is there a piece of documentation you've
read that gave you this impression?  If there is, could you point us to it?

All configuration information for Outrigger can be found in the package
documentation: com.sun.jini.outrigger

S'far as I can see, there's no simple configuration variable you can set
to get a name configured.  I believe what you need to do is specify the
configuration variable initialLookupAttributes with something like:

import net.jini.lookup.entry.Name;

com.sun.jini.outrigger {
        ......

        initialLookupAttributes = new Entry[] {new Name("MessageSpace")};

        ......
}

> ServiceInfo is still "JavaSpace". wondering how to overide JavaSpace
> Name?
>

Note:  I don't think this alone will be sufficient to ensure Name is
available to all parties because Name needs to be part of the codebase
for Outrigger (it isn't by default) or available on the classpath of the
services receiving outrigger's proxy (it's in jini-ext.jar).  i.e.
Reggie would need jini-ext.jar on it's classpath as would your client's
(safe to assume they do if they're doing a lookup for it).  If Name is
not available via either codebase or classpath you'll get problems with
lookup and registration.  The easist solution might be to put Name into
Outrigger's codebase which can be achieved as detailed here:

http://archives.java.sun.com/cgi-bin/wa?A2=ind0310&L=jini-users&F=&S=&P=13919

Hope that helps,

Dan.

===========================================================================
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

JDC members can download the JavaSpaces(tm) Technology from:
http://developer.java.sun.com/developer/products/jini/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.