Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!

mohini lalwani

+ Follow
since Nov 24, 2008
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 mohini lalwani

How i can run denny's dvd in network mode .

First I run with server argument
then it ask me database location and i selected RMI Server radio button ,I clicked start server . Server started

After that I created jar file

I type this command on command promopt
javaw -jar sampleproject.jar server

sampleproject is jar file name

nothing is happening

where is client program , how to run client program

When I created jar file then I gave as main class .

what to do ???
how to run client program after running server ???

let me know

Hi All,

In my delete method I am

doing like this .

becasue in instruction written
1 byte "deleted" flag. 0 implies valid record, 1 implies deleted record

please tell me is it okay ???
hello Alecsandru ,

then tell me how to handle RemoteException in class which is implementing the Remote Interface ?

I made Remote interface which actually extends Sun's interface
e.g. ContractorDatabaseRemote
ContractorDatabaseImpl implements ContractorDatabaseRemote interface .
how to handle RemoteException of each method of ContractorDatabaseImpl ??
I provided two functionality in GUI to book and release record .

Which methods of SUN Interface I should called when I am going to book record and release record from GUI ?

let me know .

Should I create my own interface which is going to implement SUN's interface?
reason behind this is I have to make Remote interface which should extend SUN's interface and every method in remote interface should throws
RemoteException .
So is it okay i will create my own interface which will extend Sun 's interface and only difference between my own interface and Sun 's interface is that every method in my own interface will throw RemoteException.
For sack of RMI I would like to do this .

Please reply is it okay to create own interface which will extend SUN's interface ???

Hi All,
I implemented read method and returned String[] .
String[] has record number,subcontractor name,location,specialties,size
,rate and owner

I am returning record number also .Is it okay or should I return
subcontractor name,location,specialties,size
,rate and owner only ???

Please reply .
When update method will be called which field be updated ?
Any field from record ?

and when it should get called ?
When user is trying to book contractor record .

please let me know
I am using TextPad to read the file .
When I am deleting record then


database is instance of RandomAccessFile

and when I looked at .db file
I found this character begining of record which i deleted using deleted (recNo)

is it okay ??
because in sun instruction written

"1 byte "deleted" flag. 0 implies valid record, 1 implies deleted record "

let me know
Each record has delete flag in begining so when
to implement delete method then which field should be updated ? or complete record will be deleted ? or just update delete flag with 1 .

In my assignment written .
1 byte "deleted" flag. 0 implies valid record, 1 implies deleted record
try {
// Determine where in the file this record should be.
// note: if this is null the record does not exist
locationInFile = recordNumbers.get(recNo);
throw new RecordNotFoundException("Record not found.");

recordNumbers is hashmap where key is recNo and value is offset of record

is it right condition to throw RecordNotFoundException ???

pleset let me know
when read method will throw RecordNotFoundException

public String [] read(int recNo) throws RecordNotFoundException;
I implemented RecordNotFoundException as :

public class RecordNotFoundException extends Exception {

* A version number for this class so that serialization can occur without
* worrying about the underlying class changing between serialization and
* deserialization.
private static final long serialVersionUID = 1L;

* Creates a default <code>RecordNotFoundException</code> instance.
public RecordNotFoundException()

* takes a String that serves as the exception's description.
* @param message
public RecordNotFoundException(String message)

is it okay ???

please give your inputs .