Re: java multi-connections!

From: Jinyi <yj021578_at_inf.tu-dresden.de>
Date: Wed 29 May 2002 11:07:28 AM GMT
Message-ID: <003301c20701$06aabe10$aadd1e8d@kingy>
Dear Kish,
 
         thanks for quick reply.

         I have done some experiments so far, by showing some of the results here,
         hope, it can help a little to whom wants to do the similar things as me.

         1. A way doesn't work: 

         First query the predicate "remote_connect/3" on Eclipse side, it blocks and listens 
         on the port assigned. On Java applet side using RemoteEclipse to connect directly to
         Eclipse "server", after successful handshake, the Java side holds the control, or you can
         call the method "resume" to hand over the control to Eclipse side. 
         Note, in any case, at one time only one connection can be create between Java and Eclipse,
         so it doesn't satisfy our requirement of multi-connections.

         
         2. A way to step around the restriction:
 
         Instead of using RemoteEclipse directly connect to Eclipse, we run a Java application (hereafter 
         Java Server) on the web server side (which listens on a certain port). Java Applets connect to Java 
         Server via socket, and OutofProcessEclipse is used for each connection to interface to Eclipse.
         The idea is Java Applets send the queries to Java Server through socket, and Java Server forward (rpc)
         the queries to Eclipse, and send back the result to Java Applets. Since multi instances of OutofProcessEclipse
         are allowed, it works with the multi-connections!

         Nevertheless, I still have one question, it seems dynamic assert doesn't work with OutOfProcessEclipse,
         
        e.g. 
        I have a very simple Eclipse program test.pl, compiled by calling OutOfProcessEclipse's method compile.
        
        :- dynamic p/1.

        p(2).
       p(1).

        Afterwards, calling OutOfProcessEclipse's method rpc("assert(p3)"), the assert itself succeeds, but when I continue to
        call rpc(p(3)), a com.practechnologies.eclipse.Fail was thrown, any HINTS?

        Sorry for my poor English, any doubts, please don't hesitate to contact me! 
 
 
Cheers,
Yi JIN        
         
       
 
Received on Wed May 29 13:48:30 2002

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:14 PM GMT GMT