hi all Please do let me know in RMI how does method call is processed from stub at client side to skeleton at server side. Stub is remote reference to remote object with all remote methods(only signatures) cloned to it. When client makes call on remote object, call in intercepted by stub which internally delegates this call to remote object(skeleton precisely). ... |
Hello to all!! I m using Rmi for my distributed application but i m facing problem to select the application which should be easy to implement n distributed among the clients......... Basically,there is a concept regarding clusters in which application will be broken into small chunks n then clients using their resources n give response to the servers.......... I m thinking ... |
hi all I have read RMI uses its own protocols for request and response Conversation between server and client.I could not understand the difference between HTTP and the RMI protocols . Please let me know How does RMI protocols sends request....? How does it differ from HTTP request response? thanks in advance Vikas |
Applets themselves are just code delivered from a web server to a browser, where they're interpreted and executed. If you want to execute code that runs on the server side and returns a result, RMI is the only way to do it. But I'm not really sure what your objection is. Is the overhead of downloading a stub? The inconvenience of ... |
|
hi all, I am having problem with RMI. I am aware that marshalexception may rise when an unsynchronized object is sent. But I have no clue abt this. Becos I was able to send the object, and pretty sure that the objects I have used are serializable. Ne suggestions?? (I was able to write the object sent to a file.) Thanks, ... |
|
|
Best way to learn RMI is to build something with it. Just start out simple. RMI is fairly.. not simple, but brief. Once you've got something simple working, its very easy to expand it to be much more complex. All you have to do is add methods to your server interface. Go look at Michael Earnest's post about getting started with ... |
We found it slow to run some complex java 2D graphics on unix box, but it is faster to run it on windows (maybe many people have realized this). However the Oracle db is installed on unix machine and we need to use the database prior to creating java 2D. How about this --- Use RMI mechanism to split the code ... |
Hello, First timer here...bear with me. I am running a RMI server and an applet with one interface for the RMI Server. This part works fine. The .class files and the html is deployed thru TOMCAT 4.1 The problem is however when the server code is changed to handle callbacks with the applet. Have already changed the security policy file. Now ... |
Greetings, I am new to java rmi. I am looking for help to explain a wired case I ran into. Here was what I was doing: I have a public class "Book.class" stored at "c:\book\Book.class". Also I create a remote object at "c:\rmi\Rmitest.java" in which a reference of Book class is used. (The Remote interface is under c:\rmi.). I compile the ... |
Hello Everybody, I am working on jsp application where I have made an applet and that applet is calling Remote method . My problem is that when I set a java policy file and grant all permission then applet -RMI works perfectly but I want to give only netsocket permission to this applet ,but if I give this netsocket permission then ... |
|
hello, well according to my thinking point there maybe or maynot be some tools for RMI testing as I myself working on financial projrect but best thing is that we should have full knowledge of server and RMI working and clear concept of RMI and you will explore more when you will develop and use RMI and use .In this way ... |
|
16. RMI coderanch.comHello to All.... Can anyone tell me about the fact related to RMI. It's applicable to only Homogenous Environment or it can be useful to Heterogenous Environment...If not then which thing we will use for heterogenous environment..... And what about its scope in sense of LAN or WAN...it is applicable to both or not...... ok Bye |
|
|
Hello Ranchers, Could someone explain me PASS BY REFERENCE in RMI with an example. however, I read some articles, I am not able to get the bottom of it. Also when RMI would use PASS BY VALUE & PASS BY reference. Can we make the option or its JVM way to go !! ? any input is appreciated!! ~ Shalini [ ... |
Okay, this might very well be a "Duh" question but I've noticed that when I run my RMI servers, a "log" directory is made with the following files: Logfile.1 Snapshot.1 Version_Number Does anyone know what those files are? I would think that they contain RMI logging output but none of the files are in a readable text format. I need to ... |
Multiple requests will come in to Server1 and Server1 needs to use Server2 which inturn processes these requests and returns them back to Server1 and then Server1 returns them to individual client browsers. My thought is to use RMI and run a RMI Registry & the Server Implementation on Server2. Then, run the Client Implementation on Server1. When multiple browser clients ... |
Hi all, Is my understanding correct (am looking at moving a C# Remoting project to Java)? Objects that are exported (ie reachable from another process space) and that usually subclass UnicastRemoteObject listen on their own server socket? So for example, we have a well named object "Foo" that is bound in the naming registry (say 1099) so that when an RMI ... |
Hi all, I was just wondering. Is it logical/possible to compare TCP/IP with RMI, or can the two not be compared at all? I am doing a chat application using RMI for client connection to server and TCP/IP for client to client connection. I need to provide justification for my choice of architecture, and have not been able to find anything. ... |
|
You're going to need to make some decisions about how you want this to be distributed... Do the files only really exist on a central server, or can any of the various users host files? How will you handle multiple users editing the same file or line? How and when will it be decided that a file will be saved permanently? ... |
Guys, Does anybody have comparison list of performance/usabiliby issues between Tibco RV ( Rendezvous ) and RMI. Many of our legacy applications use RV but it adds learning curve to the new people . I know my company used RV for performance issues. But not all applications are performance sensitive. RMI is open technology to use. OR just socket programming ? ... |
|
|
I can load the _stub.class from file server, but some how it can not load the other return type class file, and I have to copy the return type class file to the client side, otherwise, It woud not run the code showed as below ============================Customer Return type============================= package supermarket.server; public class Customer implements java.io.Serializable { private int cust_ID; private String ... |
Hi! I use RMI adn I try to encapsulate some properties from the server side and send them on the client side.For this I have an "encap" interface (it extends Serializable) with a lot of gets/sets.This interface is implemented by a inner class on the server side, the server has a get method with the return type my encapsulate interface.Is this ... |
Hola ranchers. I was playing with RMI tutorial at java.sun.com and I have the following Qs : (please note, this is my first day with RMI) 1. I want to launch the server : set CLASSPATH=F:\todd\src;f:\todd\public_html\classes\compute.jar java -Djava.rmi.server.codebase=file:/f:\todd\public_html\classes/ engine.ComputeEngine ofcourse its work ! but when changing the classpath to the following : set CLASSPATH=F:\todd\src\engine;f:\todd\public_html\classes\compute.jar I get the exception that its could't ... |
I am using RMI in Eclipse developing a serer/client aaplication on my PC... Everything compiles and the WBRemote_Stub.class is generated How do I fix/prevent this message when starting the server program? I am new to this so even the most basic ideas will be of help. I am still reading the RMI tutorial which is pretty vague about external things (e.g. ... |
|
I convert a large file to byte array on server side, and transfer it to client side. I want to build a progress indicator,can any one give me some advices, if you can provide sample code, it would be great. or I don't mind to use an alternative other than simply send the whole file's byte array to the client. thanks ... |
Hi I studied Applying the factory pattern to RMI and now I am a little confused by how & why we should apply the factory design pattern at RMI. About how: Should the factory be a Singleton? Is it ok to instead of a Singleton have a method startServer() that is called once at the beginning of a program and binds ... |
Hi, I am new to RMI. Have this question here. If more than one client connect to the server, and call a method which will modify the same resouce, eg. an integer. How does RMI handle this kind of problem? If the method being called by two client at the same time, will it be queued for excution? I writing a ... |
|
Originally posted by nobu taku: i've read much about rmi and other distrib technologies and wonder why we need code running on other machines. what would we do if a Branch or a company has to access the services / Data from the Head office? what would we do if we want to integrate a supplier and a consumer companies to ... |
i have an apache sever started on http://IP1:8000/ and a tomcat server stated on http://IP1:8080/ . this servers are integrated with JK2. in the server tomacat the servelethandler of the sun is configureted. also i have a RMI server strated in the machine with IP1:1099. the code of the server is try { HelloImpl1 obj = new HelloImpl1(); Naming.rebind("//IP1:1099/HelloServer", obj); System.out.println("HelloServer ... |
I have a rmi interface working for a long while. Our system admin put some package on AIX machine where I have my rmi stuff. Something has change to rmiregistry or something. I was able to to rmiregistry fine but I have problem to start with my interface. I found out the address bind to has changed. It change from xx.xxx.xx.99 ... |
|
|
|
Ok, I have an rmi application that uses the ClassFileServer provided by sun as the codebase argument to the server class I use to bind a remote data object to the rmiregistry. On my machine, all parts of the program work as expected. However, when I distribued my java source hierarchy and the text file containing the commands to run and ... |
|
46. rmi coderanch.comI'm trying to call a server method from the client, and pass it a client object. The problem is that, when sending the object, it has to be an interface. So rather than sending type "Client" i would send type "ClientInterface". Now, on the server side, I try to cast the type ClientInterface back to Client and it doesnt work. If ... |
|
|
hi, i'm writing a client-server application using RMI. the client presses a button which invokes a remote method which creates a process on the server side using Runtime.exec(). now i need to get the output from the process (standard output) and send it back to the client while it's being written. the idea is to keep the client updated on the ... |
|
import java.rmi.Naming; import java.rmi.*; public class CalculatorImpl extends java.rmi.server.UnicastRemoteObject implements Calculator { public CalculatorImpl() throws java.rmi.RemoteException { super(); } public int sub(int a, int b) throws java.rmi.RemoteException { return a-b; } public static void main(String[] args) { if (System.getSecurityManager() == null) System.setSecurityManager(new RMISecurityManager()); try { Calculator c = new CalculatorImpl(); Naming.rebind("rmi://Server0/CalculatorService", c); } catch (Exception e) {System.out.println ("Error binding");} } } ... |
|
Hi, I have set up an rmi-Server, which should handle all request to an ORACLE DB, and an appropriate rmi-Client, running so fare on the same machine. The server is comming up fine and binds my remote object. The rmi-client is looking up the remote object sucessfuly. I can invoke the inherited methods of my remote object e.g. ProdServer.getClass(). My own ... |
|
|
I don't know for sure, but I have a few guesses. How are you transferring the files that you are printing? If you're transferring the file all in one piece, it could be that transferring a 20MB file takes so long that any requests after it time out. How do you handle multiple requests? Is there any kind of callback to ... |
I'm fairly new to RMI and I'm writting test code to see how things work. I wrote a server that registers itself and a client that connects the server and call it's methods. The thing I don't understand is how to get the server to call client methods. Say something happens on the server and it wants to notify all the ... |
Hi, I have a server application that has a remote object(call it A). I register it with RMI. I dont run rmic to generate the stubs, but before I bind the object to registry, I do exportObject on the fly and then register it. Now my server process will spawn new processes and they in turn will talk to my remote ... |
Hi all, I'm building a workflow system and have implemented different rmi servers on diferent machines. The servers can properly looked up and their methods may be called. Now I want to trasfer a file as argument. As I have found in documentations it should be possible, if the file object is implemented serializable. I have done so. Now the remote ... |
The argument to rebind (and lookup, and bind) deals with *where* to bind (or find, in the case of lookup) the *running instance* of the service you want, and it looks something like this: Naming.rebind([I]protocol://address:port/name[/I]); If you leave off the protocol portion it assumes it's "rmi://". If you leave off the address portion it assumes it's "localhost". If you leave off ... |
Place all six .java files together with the client.policy file in the same folder. From the command line run the following commands: >start rmiregistry >start java TestServer >start java TestClient //client1 >start java TestClient //client2 Push dialog box OK button to close client1. Push dialog box OK button to close client2. This works fine. However, if I close client2 before client1 ... |
The short answer is to add .; to the beginning of your classpath, so that the current directory is always loaded first. You could also add C:\Examples; to the classpath, but this isn't as good of a solution because it's hardcodng the specific path into the classpath, and you aren't *always* going to want C:\Examples on your classpath every time you ... |
Jini is more of a distributed architecture rather than simply more of an API for doing distributed programming like RMI. In fact, Jini is implemented using RMI. I would recommend learning RMI first, because you won't get very far in Jini without understanding RMI anyway. JNDI stands for Java Naming and Directory Interface. It basically provides a way to look up ... |
|
hi, currently i am working on a project in which i need some help. I want to ask can i have multiple RMI servers and a single client on my server machine. Will single client communicate with multiple servers or do i need to do this with sockets. What i know is when we start a rmi server a specified objects ... |
|
I have this servlet that calls this session bean that is located on a different machine. I know that the call is an RMI call. Does anyone know if the call is encrypted. when I call the session bean method and I pass it an object, can someone, somehow, look into that data. The servlet actually passes credit card information to ... |
Hi group, I have recently started studying RMI using Jguru's notes and i confronted some doubts such as 1) RMI uses 2 protocols TCP/IP and a wire protocol (IIOP in java2)...i am not able to understand the exact mechanism of this stream transfer. how RMI system is configured to use both protocols at once...or there is an order like first TCP/IP ... |
|
|
Esmond Pitt, in his java.rmi book, mentions that "it is perfectly possible to deploy systems where servers use a different version of the JDK from clients". Since the book is a 2001 one (no newer books on RMI exist), it discusses JDK 1.3. Indeed, I have tested interoperability of a 1.2.2 client with a 1.3.1 server in two different environment and ... |
Hi Guys In our application we are using RMI server running in Windows 2000 Server Which gets data From Oracle8.1.5. Our client applications are running in Windows XP and Windows 2000 professional. When more clients are connected and trying to access data from server sometimes in some XP clients I am getting the connection Refused error (i.e.) i could not access ... |
73. RMI Test coderanch.comHi people, i would like to try and run a simple "Hello World!" program using RMI. I have read many tutorials but can't seem to get it up and going. Can some one please explain how i can do this, but giving me a example code or something. I would like to try it under Eclipse. I would like to try ... |
74. RMI coderanch.comHi, "When you pass a serialized object as an argument or return value, you better make sure the class file for the type you're passing is available on the other side. If the class isnt there, the object will never deserialize and you're screwed"... How come the class should be there on the Remote Object when we pass a serialized object? ... |
|
Hi all, I am pretty new to RMI and I have a trivial question. Is it necessary that all the server code has to be implemented from an interface? I went through some sample code and all seem to be doing the same. Is it just a standard or it has to be done like that. Plz help clearing the doubt. ... |
|
Hi All, I've developed a simple RMI application, but have yet to deploy it onto an application server. In other words, I have it running on my localhost, using rmiregistry in my command prompt. However, I was wanting a good tutorial explaining how to deploy a rmi app on a server, such as weblogic, websphere etc. Therefore, I wondered if anyone ... |
I have set up a basic server application. It contains three files namely Arith.java (implements the Remote interface) ArithImpl.java (implements Arith.java the server) and ArithApp.java which is the client Application All of these are in the same package. I have compiled all of these files and I execute the rmic ArithImpl command from within the ArithImpl.java file via Runtime.getRuntime.exec(...); The stub ... |
I wouldn't normally ask something like this but I've only got one machine so I can't get the answer by myself. OK, so when RMI downloads classes not found on the client: Where are they downloaded to? Will the class file persist on the client for the next time? Is there any built-in version control? i.e. will RMI download an updated ... |
ComputeEngine exception: Unknown host: host; nested exception is: java.net.UnknownHostException: host java.rmi.UnknownHostException: Unknown host: host; nested exception is: java.net.UnknownHostException: host at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source) at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source) at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source) at sun.rmi.server.UnicastRef.newCall(Unknown Source) at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source) at java.rmi.Naming.rebind(Unknown Source) at engine.ComputeEngine.main(ComputeEngine.java:25) Caused by: java.net.UnknownHostException: host at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.(Unknown Source) at java.net.Socket.(Unknown Source) ... |
|
Hi , I get the following exception when I run a test client which calls the session EJB . java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: java.lang.ClassNotFoundException: com.dstsystems.concorde.business.valueObject.enterpriseAdministrationManagement.AccountingCenterData: This error could indicate that a component was deployed on a cluster member but not other members of that cluster. Make sure that any component deployed on a server that is part of ... |
|
Hi all, Just wanted someone to confirm my understanding of RMI concerning the need for webservers. Basically, I don't want to use them. So in order for this to happen, all I need to do is make sure that both server and client have all the necessary .class files they will ever need. In effect, I could just duplicate the application ... |
|
Unreferenced is only called when no client has a reference to the server. If you use the RMIRegistry, then it has a reference and Unreferenced is never called. Your concern has been the concern of developers since the beginning of remote procedures. There have been numerous discussions on this subject on the RMI forum at java.sun.com. It all comes down to ... |
Hi, I'm also having problem with RMI app behind NAT as well. Could you please help me to identify problem and to solve it? The scenario is as follow: - My RMI server is running on Linux machine which is running as guest on VMWare with Windows XP is host OS. - On XP, physical IP address: 129.94.174.21 (host IP), virtual ... |
|
|
friends, i am absolutely new to RMI i have been unable to run a single rmi based program i.e.absolutely small programs say there is an interface.java,implementation.java,client.java,server.java what i have to do to run it on windows xp using java 2 i have not been able to understand the tutorials on net tutorials said about setting classpath and a security policy which ... |
|
|
That's where I've gotten stuck, I mean I've tried using RMIC and the RMIC registry, but I've gotten nowhere with it, I just keep hitting the wall when it comes to implementing it, probably because I don't have much time to work with it. I've been learning portlets, servlets, JSP, JDBC, IBM's Portlet Factory, not to mention just being introduced to ... |
Hi, Originally posted by kkyim: If the client tries to connect to the rmi server behind the firewall, what is the workaround? We struggled with this for ages and ages before calling off the whole thing and going for another solution for people effected by NAT. Our situation was home workers that are behind a personal home router (which in effect ... |
Inorder to implement a RMI application. I should define an interface:AInterface, and an implemention:AInterfaceImpl. I'm not sure how to deploy these tow files. In the client:AInterface.java, in the server side:AInterfaceImpl.java? If that case, I don't know how the client look for the concrate implemention. Or the files should be deployed in the both side? Also I don't know the stub and ... |
|
I am interested in learning more about RMI. So far, my background is the RMI tutorial that is part of Sun's Java Tutorial. I have also read through most of the RMI Specification. I wonder if anybody knows of any good reference material for learning more of the advanced topics of RMI? - Adam |
|
100. J2ME RMI coderanch.com |