1 / 12

Lecture 15 Jini Technology

Lecture 15 Jini Technology. Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University email: cheng@cse.ttu.edu.tw http://www.cse.ttu.edu.tw/~cheng. Installation. Install jini1.1 to c:jini1_1 doc examples lib policy source

Download Presentation

Lecture 15 Jini Technology

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 15 Jini Technology Instructors: Fu-Chiung Cheng (鄭福炯) Associate Professor Computer Science & Engineering Tatung University email: cheng@cse.ttu.edu.tw http://www.cse.ttu.edu.tw/~cheng

  2. Installation • Install jini1.1 to c:\jini1_1\ • doc\ • examples\ • lib\ • policy\ • source\ • index.html • Install nuggets to c:\nuggets • about\ • images\ • pages\ • index.html

  3. Installation • Install jini setup script to c:\jiniSetup\ • addJiniClientLibs.bat • addJiniServerLibs.bat • startHTTPServer.bat • startRMID.bat • startReggie.bat • Set path=%path%;c:\jiniSetup\ • Also make sure JDK 1.2.2 or 1.3 are installed

  4. Start lookup service • Start the first dos terminal • Remove previous reggie data if necessary • >rmdir /s c:\temp\reggie_log • >rmdir /s c:\temp\reggie • Check if jdk is setup ok (must 1.2.2 and up) • >java –version • Set up jini libs for both client and server • >addJiniServerLibs • >addJiniClientLibs

  5. Start lookup service • Start http server • startHTTPServer.bat • Start RMI daemon • startRMID.bat • Start lookup service(reggie) • startReggie.bat

  6. Run HelloServer • Start a dos terminal • Add server setting • >addJiniServerLibs.bat • cd c:\nuggets\pages\examples\jiniexample1 • Make sure the settings of setInstallPoint.bat are correct. • recompile HelloServer and HelloClient • >c.bat • Run Hello Server (register service to LU service) • >cd server-side • >newRun.bat

  7. Run HelloServer • You should see the following output: server: JoinManager = com.sun.jini.lookup.JoinManager@67e89 server: LookupLocator = jini://localhost/ server: LookupLocator.host = localhost server: LookupLocator.port = 4160 server: ServiceRegistrar = com.sun.jini.reggie.RegistrarProxy@9c2853 server: ServiceID = 7e23b037-4349-458b-8c13-a6e0b1e57b0f server: received ServiceID = 32831a51-5200-460a-9298-a5ca617b6d40 server: ServiceMatches = net.jini.core.lookup.ServiceMatches@6fa474 server: num matches = 3 server: svc item 0: net.jini.core.lookup.ServiceItem@15c083 server: svc object 0: MyServer_Stub[RemoteStub [ref: [endpoint:[140.129.20.234:1945](remote),objID:[d107f:e6c86ceb27:-8000, 0]]]] server: svc item 1: net.jini.core.lookup.ServiceItem@11d8c1 server: svc object 1: MyServer_Stub[RemoteStub [ref: [endpoint:[140.129.20.234:2017](remote),objID:[0]]]] server: svc item 2: net.jini.core.lookup.ServiceItem@2d9c06 server: svc object 2: com.sun.jini.reggie.RegistrarProxy@9c2853 *-----------------------------------------*

  8. Run Hello Client • Start a dos terminal • Add client setting • >addJiniClientLibs.bat • cd c:\nuggets\pages\examples\jiniexample1 • Make sure the settings of setInstallPoint.bat are correct. • Run Hello Client • >cd client-side • >newRun.bat

  9. Run Hello Client • You should see the following output: client: LookupLocator = jini://localhost/ client: LookupLocator.host = localhost client: LookupLocator.port = 4160 client: ServiceRegistrar = com.sun.jini.reggie.RegistrarProxy@9c2853 client: ServiceID = 7e23b037-4349-458b-8c13-a6e0b1e57b0f client: ServiceTemplate = net.jini.core.lookup.ServiceTemplate@37c60d client: Service object = MyServer_Stub[RemoteStub [ref: [endpoint:[140.129.20.234:2017](remote),objID:[d107f:e6c877b55e:-8000, 0]]]] client: Calling sayHello() --->Hello World from MyServer!<---

  10. Jini Example 2 • Recompile if necessary and add Jini libs • >cd JiniExample2/ • >c.bat • Start lookup service (as jini example 1) • Start already • Run HelloServer • >cd JiniExample2/server-side • >r.bat • Run HelloClient • >cd JiniExample2/client-side • >r.bat

  11. Jini Example 3 • Recompile if necessary and add Jini libs • >cd JiniExample3/ • >c.bat • Start lookup service (as jini example 1) • Start already • Run HelloServer • >cd JiniExample3/server-side • >r.bat • Run HelloClient • >cd JiniExample3/client-side • >r.bat

  12. Jini Example 4 • Recompile if necessary and add Jini libs • >cd JiniExample4/ • >c.bat • Start lookup service (as jini example 1) • Start already • Run HelloServer • >cd JiniExample4/server-side • >r.bat • Run HelloClient • >cd JiniExample4/client-side • >r.bat

More Related