Re: Outrigger. Jini2.1

"Santoshi, Vishal" <[email protected]>
Newsgroups gmane.comp.java.sun.javaspaces
Message-ID <[email protected]>
 Thank you Shay.
 Does that imply that a single Space instance can be passed over to a
thread pool executor and no synchronization(or locking is required).

Thus is this example code good.

JavaSpace space = SpaceLocator.getSpace();//some utility method
ThreadPool a = new ThreadPool(space);
a.startThreads();

Each thread or Callable or Runnable has a run method ;

        public class Xthread {
          JavaSpace space = null;
          public Xthread (JavaSpace space){
              this.space = space;
          } 
          public void run(){
             While(true){
               space.take(Entry, Transactio); /// etc
            }

         }
     }

-----Original Message-----
From: Shay Hassidim [mailto:[email protected]] 
Sent: Friday, February 10, 2006 2:39 AM
To: Santoshi, Vishal
Subject: RE: Outrigger. Jini2.1

JavaSpace is transaction safe.
mohalo transaction can be used with different spaces.

Shay


-----Original Message-----
From: Santoshi, Vishal [mailto:[email protected]]
Sent: Friday, February 10, 2006 6:35 AM
To: [email protected]
Subject: Outrigger. Jini2.1

I have used jini-start-examples to kick start learning about jini and
javasapces .
I have a few questions.

1. How do I identify a JavaSpace by a name ? I have tried modifying the
transient-outrigger.config in 
   example/outrigger/jrmp/config (I started off by using the
jrmp-transient option i.e urun jrmp-transient)
          import net.jini.jrmp.JrmpExporter;
          import net.jini.core.discovery.LookupLocator;
          import net.jini.lookup.entry.Name;
          import net.jini.core.entry.Entry;
          com.sun.jini.outrigger {
                serverExporter = new JrmpExporter();
                initialLookupGroups = new String[]
{"JRMP_Group0","JRMP_Group1"};
                initialLookupAttributes = new Entry[]{new
Name("gallup")};
          }//end com.sun.jini.outrigger

   This does not seem to resolve the space by name if I use this code.
           entry=new Entry[]{new Name("gallup")};
           _template=new ServiceTemplate(null,types,entry); // and so
on.

   

2.Is JavaSpace and a Transaction  threadsafe ? Can we use a space
concurrently while doing a put?
   Or to be precise 
          space.write(entry,transaction,Lease.FOREVER);
   is this call a thread safe call.
   And what about the corresponding take call.


3.Can a mohalo transaction transcend java spaces? Can a single
transaction be use with n different spaces?


Thanks a lot , in anticipation.
  

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

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