This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Rust Web Development and have Bastian Gruber on-line!
See this thread for details.
Win a copy of Rust Web Development this week in the Other Languages forum!

ilwyvd illtvd

Greenhorn
+ Follow
since Oct 20, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
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.
18 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 mainifest.mf 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 manifest.mf 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 197.1.1.1:1099 the problem
occurs:
initial url rmi://197.1.1.1:1099/ServerManager
FBNDataModeller : java.rmi.UnmarshalException: error unmarshalling return; neste
d exception is:
java.lang.ClassNotFoundException: suncertify.server.RemoteDataServer_Stu
b
the client contains all the *_stub.class.
but I use :
java suncertify.client.Client 197.1.1.1 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
*
*/
if(searchSet!=null)
{

searchSet=newAccess.searchCritial
(startValue,desValue,carrierValue)model1.setset(searchSet,fieldInfo);
}
else
{
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)
{
data.remove(row);
fireTableRowsDeleted(row,row);
}

it is runs ok

}
I HAVE TWO CLASS ONE CREATING TABLE, ANOTHER IS A
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
model1.setset(searchSet);

/** get selected row number from listener
* methods in table created class
*/
Index=dispTable.getSelectedRow();
availableSeats=(String)dispTable.getValueAt
(orderIndex,8);
seatnumber=(Integer.valueOf
(availableSeats)).intValue();
/**error occurs when I get data from object[]
*on the condition Object is not null
*/
System.out.println((String)Object[Index][0][0]);
System.out.println(Object[0].length);