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

amit ahuja

Ranch Hand
+ Follow
since Nov 20, 2001
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 amit ahuja

Hi all,
I was wrapping up my assignment, and was wondering on, how many options should be given in search criteria screen. Presently i have given origin, destination, flight no. and carrier.
What have you guys done ?
thanx
amit
"Life is so simple, and this I realized after realizing how complex it is"
Yes u have to throw exception but IOException.. check out the comment on lock method in given Data.java
amit
Mark you are in BIG demand.
Sure sanjeev you can have LockManager. It is cleaner to do that way.
And it just a class which keeps track of record no. and the conncetion who locked. It is called by Lock(recordno) method and unlock(recordno) from extended data class.
do i answer ur query?
amit
Mark, you are right on Unreferenced interface.
but that doesn't fit into my design, because i have only one remote object serving all clients.
And now even if one client goes down, the unrefernced() method won't be called till all the clients die.
Infact in my design if one client locks and get disconnected. That record is always locked till all clients disconnect, thus unrefernced() method called and in which releaseAllLocks() called.
Mark do you think this will make me loose points? if yes, please tell me how to take care of stale locks in my design.
Thanks
amit
Mark, answer to first question is this piece of code from my data class....I'm talking abt "The record position is invalid"
/**
* Lock the requested record. If the argument is -1, lock the whole
* database. This method blocks until the lock succeeds. No timeouts
* are defined for this.
* @param recno The record number to lock.
* @exception IOException If the record position is invalid.
*/
public void lock(int record) throws IOException {
}
and why i had disconnect is that, suppose the wait time is very high (where i show busy cursor), that time the user can disconnect from the menu.
Also if user closes his window when a record is locked, I call this disconnect (which is basically dispose off all acquired locks by that client).
I'm sure it is not any critical requirement but at same time it was easy to implement.
what u think mark
amit
Hi Siddharth,
It seems we are from same planet or atleast our planets are near by in the galaxy.
Becoz i too have very same design except just timer class (i don't do cleaning job...)
I have nearly finished my coding.. just tits-bits left here and there.
keep up the good work...
amit
Mark,
I do have lock Exception in LockManger only.
But at same time I throw IOException from extended data class for primarily two cases
1.) when the record is not available..(required as comment in provided Data class on lock method.
2.) when the thread is interrupted by calling disconnect from the client. In that case i dispose off the (i assume it is one only at a given time) locked record from that client.
what do u feel abt this design?
wud lov to know ur view.
amit
Hi all,
I was worried abt a small thing.. Can i throw some LockException in Lock(int) and unlock(int) methods in my extended data class, considering the requirement as below ??
"Record locking must be implemented using the methods public void lock(int) and public void unlock(int)."
amit
Rajesh sorry for delay,
Actually i tried that method before and that didn't help me.
Any more ideas.. it is LAST hoodUp in my assignement.. waiting on it.
Thanks
amit
please help me too in JTable. you look like a savior to me..
I have used default table model and JTable and i found that ENTER key is for moving the selection down in the Jtable By default. I wanted to use enter as click to default button. But it seems i'm not able to override (or disable)the default function of enter.
I tried objectMap & inputMap and couple of such things... but nothing helped.. please help me..
thanks
amit
Thanks Kalichar and Rajesh,
I agree with you guys. But Still i have small doubt.. did u guys use swing worker thread for booking or searching ?
I guess we need to talk to server on a seperate thread to show an hour glass too (not worked much in swings..)
Am i right?
amit
hi all,
I was wondering do we need to show the progress bar in are UI as booking or search is going on. Becoz potentialy it is possible for our booking to go on for some good time (like rec is locked lock..).
and if you need one, then do we need to have facility to cancel the transaction in the middle?
please help me taking this decision
Thanks
amit
Thanks Mark,
Your opinion really counts.. ask me
And as for Taj Mahal, you need beautifull Mumtaz.. Sun doesn't provide any such motivation..
Wud like to know what others feel.
amit
Hi all,
Recently i was on net for my UI design and came across so many things including HMVC at
http://www.javaworld.com/javaworld/jw-07-2000/jw-0721-hmvc.html and
http://www.crionics.com/projects/hmvc/hmvc-doc.pdf
HMVC is good design but i'm really confused do we really need that much stuff in our assignment??
please help me out of this
thanks
amit
[ March 03, 2002: Message edited by: amit ahuja ]