Andrew Ao

Greenhorn
+ Follow
since Sep 10, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Andrew Ao

hi:
sorry, but maybe i didn't make it clear. let me provide some background info.
i am writing the front end of an ordertaking app using java. due to its usage and need for fast entry, gui is NOT recommended. the user will be using a keyboard to enter orders and traverse around the application.
i was looking around, and try to find a way to intercept user keystroke. but System.in.readLine is a "blocking function." that's why i figure i might need to use native code to monitor keystrokes.
first, i should mention that my background is in the middle tier. so, i don't know much about UI. but here is what i am doing.
"recreate" text ui components using HMVC approach. monitor the keyboard input using native c code, and manage user's interaction using chain of command patterns.
if anyone has a better idea, please let me know. please drop a line at lovegokou@yahoo.com if you reply to this because this thread could get buried in javaranch.
regards,
-andrew
22 years ago
as far as i know, jave doesn't seem to have a method of "monitoring keystrokes". i think i might need to use jni.
thank you,
-aao
22 years ago
Hi,
i m looking for a way to monitor keyboard event in a text program - not GUI.
thank you,
-andrew
22 years ago
Hi:
how do we model exception handling in interaction diagram? or is it just similar to modeling a condition?
thank you,
-aao
Hi, Paul:
when can i find it? i was looking around in the ibm site, but didn't have a clue. could you provide us an url?
thank you,
-aao

Originally posted by John Dale:
Sometimes creating the instance at load time won't work, so we have to use other techniques.


i guess i didn't make it very clear.
1) the classloader load class when Singleton.newInstance().
2) only at that time of class loading, the static field would be initialized.
therefore, i considered it would work the same as "double-check for lazy loading" while removing the overhead of synchronization.
please comment if there is a fault with my understanding.
regards,
-aao
I also think that it would be simpler and more efficient to use a static field than lazy loading.
-aao
why do we usually suggest using lazy loading in java? shouldn't it just work the same by instantiating in a static field.
-aao
I would still suggest the design pattern book by GoF. although the examples are given in C++, I think the idea is the patterns of different objects collaborate together to solve common problem.
if you would like to see examples in java, i would suggest pattern in java. i read the one by william cooper, but i personally don't like it at all.
of course, j2ee pattern is a must for j2ee apps.
-aao
i would like to make a short note that nullification should be used with stack, or similar situation. otherwise, it could cause memory leak from time to time.
regards,
-aao
23 years ago
Hi, Joe:
Thank you very much. i passed the certification today with 90% by following your study guide and self-testing with your mock exam. you are great. thank you.
without actually seeing any test sample question, i was a little uncertain of the usefulness of the guide. by seeing the mock exam, and taking the real exam, i found it very helpful, and would like to encourage other to use it.
thank you,
-andrew
23 years ago
Hi, i just had a sample test for wl 6.0 test from bea. i couldn't understand why the answer to the following question is D.
Which of the following JMS message acknowledgment options minimizes session overhead?
A. NO_ACKNOWLEDGE
B. AUTO_ACKNOWLEDGE
C. CLIENT_ACKNOWLEDGE
D. DUPS_OK_ACKNOWLEDGE
I thought WL has a proprietory acknowledge mode - NO_ACKNOWLEDGE, which doesn't require any acknowledgment after message delivery to client. so, i thought this should have less overhead than DUPS_OK_ACKNOWLEDGE.
thank you,
-andrew
23 years ago
i like the j2ee book by wrox too. but i like enterprise java beans (o'reilly) and enterprise java with uml more.
-aao
what null point exception did you get?
regards,
-aao