ilwyvd illtvd

+ Follow
since Oct 20, 2002
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by ilwyvd illtvd

I pass scjd with score 134,thanks a lot for you all at Javaranch.
20 years ago
does this being permitted by Sun,Actually,in
some situation you package the server side in servre.jar, client side in client.jar,you can
use java.rmi.server.code to get the stub,but it
type too many words,I believe use Class-Path server.jar in may be a good way,but
I doubt is it being approved by Sun???
I have three jar files:server.jar client.jar share.jar
in server.jar I package all classes using ackage suncertify.server.
in client.jar I package all classes
using ackage suncertify.client
both the for server.jar and client.jar
have the Class-Path=share.jar
the server.jar runs ok
the client.jar when I use
java -Djava.rmi.server.codebase=file:///c:/server.jar
-jar client.jar
it runs well
but I copy the stub files to client side, and build the client.jar,using the command:
java -jar client.jar
it report can not find the "suncertify.server.*stub,java.lang.exception......."
I understand it is path problem but how can I
resolve the *stub problem ,I do not want to use
codebase parameter when I run client.jar
I try many times , but still have the errors
my Client.jar contains
1. all of Client classes
2. suncertify\server\RemoteDataServer_stub.class
when I use
java -jar Client.jar the problem
initial url rmi://
FBNDataModeller : java.rmi.UnmarshalException: error unmarshalling return; neste
d exception is:
java.lang.ClassNotFoundException: suncertify.server.RemoteDataServer_Stu
the client contains all the *_stub.class.
but I use :
java suncertify.client.Client 1099
it works, why? it also works when I use:
java -Djava.rmi.server.codebase=file:///suncertify/server.jar -jar client.jar
I have to use :
"package suncertify.server" in all classes in server,and this arouse the client can not find
the suncertify.server.RemoteDataServer_Stu
b,help,how to resolve this problem.
I have same problem as you, could you find any way to resolve it??
my server provide different remote object including unreferenced method to different client. when one client crash,the associated remote object would invoke the unreferenced method to search the hashtable to remove all
the record with the remote object,by the way
in my lock/unlock method ,I use record as key
remoteobject as value
I use rmi factory to produce remote reference to
different client,to ensure only one data instance and one lock manager instance to clients,I put the search method and bookflight method in client class(dataaccessor),for each time,when client choose the remote mode,the dataaccessor would
create a remoteobject,all operations can be controlled in bookflights method in dataaccessor.
how can I know client died from server class??
Thank you for your answer,I understand it should
be guarantee only one data instance in wrapper class created by server to use data class,but how
can I know the client died,how the clientId connect with the client request.
I want design the data class provided by sun as
singleton mode,is it ok???and I also think it is doesn't matter in lock mode, you use clintId or remote dataObject as value,the only import thing is that you should ensure your hashtable key is recNumber.I have written a multi-threads class to test the lock methods, it runs Ok.
I designed the table for remote and local both,
the model used by remote or local depends on your
data,you can get your data from local or remote
from your dataaccesor class
Thank you I did not make the question very clearly,I have resolved the problem,it caused by
my deleterows method in model class, I changed my method programming way as:
/** if the search result is null ,delete all
* rows shown in table,else send the dataobject
* to model

for(; model1.getRowCount()>0; model1.removeR(0));}
in table model I use the method() as:
/**It is remove row you selected
public void removeRow(int row)

it is runs ok

TABLE MODEL,I pass through a Object[][] to tablemodel FROM TABLE CLASS,the table
show correctly,and if I GET ANYTHING FROM Object[][] in creating table class,it throw many exception,
the sentence is:
//send Object[] searchSet to model,ok

/** get selected row number from listener
* methods in table created class
/**error occurs when I get data from object[]
*on the condition Object is not null