Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"

Renato Mascardo

+ Follow
since Jul 03, 2003
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 Renato Mascardo

Hello All,
I'm about to submit my assignment and I'm am going to have a 'master' archive with the following directory structure:
FBNApplication\client --> client jar
FBNApplication\client\doc --> user doc for app
FBNApplication\server --> server jar
FBNApplication\server\doc --> user doc for app
FBNApplication\sourceCode --> source code
FBNApplication\documentation\DesignChoices --> design doc
FBNApplication\documentation\JavaDoc --> javaDoc
FBNApplication\documentation\JavaDocUML --> JavaDoc with UML
FBNApplication\documentation\UserDocumentation --> User doc
The first part of the the readme.txt outlines how to 'unzip' the master archive. Does this directory structure make sense? And do you think it would be best to archive the files in the JavaDoc and src directories? I know that I will be archiving the application but how about the other files required for submission?
Hello all,
I've finished with the coding and am doing the documentation/packaging of the application. In my requirements documents it says, "Note: Your program must run correctly no matter what directory it is installed." Problem is that my app requires that the jar be in the same directory as the db.db (for the server) and be in a directory with the html user documentation that is linked via a help dialog box within the application.
I was hoping to be able to have the user "unzip" the client and server application with everything where it needs to be. Of course it can be unzipped anywhere but there are the above requirements. Thoughts on this? Do I have to change my packaging?
Hello all,
I'm having issues with the writeRecord method in the Data class. It eventually gets called by my modify method, however it throws the following exception:

I know that it might be an issue with the deprecated method I replaced, however when I went back to the orginal code it threw the same exception. Are there any requirements or gotchas with the writeRecord method? Should it still work with the old deprecated method? I'm sure it is something small like the offset being wrong or something.
Thanks in advance!
Thank you Mark. The only weird thing is that in my DataAccessFacade, I need to wrap the DataAccess calls in RemoteException try-catch even though its running in local mode. I'm assuming that your code does the same thing and it seems not necessary in Local mode.
What do you think?
Here is a quick question in regards to the Data classes. My design has the following:
1) Data Class --> Provided by Sun
2) DataAccess Interface implements Remote --> Includes all the method signatures of the Data class
3) DataAccessLocal implements DataAccess
4) DataAccessRemote extends UnicastRemoteObject implements DataAccess, Unreferenced
The question I have is that my DataAccess class implements Remote even though I don't really use it for the DataAccessLocal. I don't see any problems with that design but is there a better way to do that? Should I add another interface that extends DataAccess and implements Remote?
-Renato Mascardo
got it ... forgot to have the impl object extend the unicastremoteobject.

Originally posted by Andrew Monkhouse:
Hi Renato
Once you have bound your service to the registry, your application should keep running, and hence the registry will keep running.
Regards, Andrew

Thanks Andrew ... looks like I just saw that this morning. There was something wrong with my code in that it didn't keep running after it started up the registry. I'll repost as soon as I figure out what it was.
I had a quick question. If I use:
Registry registry = LocateRegistry.createRegistry(1099);
to create a new registry in my server, what is the best approach to keep the server running as it recieves requests? The infinite while loop works but that doesn't seem very efficient.
If I let the program exit then the registry isn't available anymore.
Am I Missing something here?