I tried that, but it didn't work either.
Type: Posts; User: bluedolphincp; Keyword(s):
I tried that, but it didn't work either.
Can anyone please kindly help me out?
I am leaning concurrency programming in jdk 5, and ran into trouble with Executor framework, actually, it's a generic type problem.
I want to use Executor.invokeAll to execute a collection of...
class eventhandler
{
eventcallback()
{
common logic;
if(timeout)
{
clean up logic;
...
That solution is not right for every senario.
what i originally had in mind is (i got confused along the way): there is a thread that callbacks some method when some event happens (such as a...
hi, Alarmnummer, i got your point. the "loop" thread should/will have some blocking mechanism, it won't hog the cpu forever. thank you.
I've stumpled upon the conclusion, it feels like a anticlimax:o , cos the solution is so simple, and it's a wonder that i haven't thought about that:confused: :
while(true)
{
...
I've got the solution (after talking to a very great teacher.) In the loop thread, which i can't control but the logic (the accessing collection part) is under my control, i place that logic in a...
Hi Alarmnummer, that's exactly what i want to solve. I just don't want to synchronize th "loop" thread every time it enters iteration just because every one hour some other thread will access the...
Hi, Alarmnummer, just had a crash corse on Executor this weekend, i think i got your problem. but i have two problems:
1) i guess you are talking about ScheduledThreadPoolExecutor, and making it...
Yeah, you are right, the looping thread needs to modify the collection all the time, maybe add a new item to it or something.
Thank you very much.
In this case, "looping thread" is the thread that needs to access the collection all the time, and the background thread needs to access the collection only in a specific time. My idea is not to...
Jörg Heinicke, i agree with you there. I just want to see if there is a solution regarding this kind of problem. Thanks.
I'm confused, lumpynose, i've that book, but i don't know where i can find the solution. would you be kind enough to point out which chaper? thanks a lot.
I think I've made some mistakes. The normal thread should be:
while(true)
{
normalThreadNewLoopStarted=false;
try {
lock.lock();...
every hour is just my example. My point is if another thread doen't often contend the shared resource, then that resource should not be locked. I just want to find if there is a way to ensure...
I have an interesting situation here. I have a normal thread that accesses a collection in an endless loop, e.g.
while(true)
{
//access the collection
}
and a background thread...
Thanks, but i still want to figure out what went wrong.
i'm learning Expert Spring Mvc And Web Flow, there is an example project JumpIntoSpringMVC. I placed this project under tomcat webapp, and...
I tried to debug into spring while starting tomcat, yet debug didn't stop where the breakpoints were set. C:\debug.JPG
I'm using myeclipse GA 5.0, eclipse 3.2 ,tomcat 5.5 and j2se 5.0. i've tried...
I've figured out my own problem. It's because the server machine has the firewall on. That raises another question:My project is Swing-based, so i can't use HttpInvoker, and also due to the...
I'm studying an example from "Pro Spring" . If I run both client and server application on the same machine, everything's ok, here is the print out from the server application:
信息: Looking for RMI...
I'm studying the same example from "Pro Spring" . If I run both client and server on the same machine, everything's ok, here is the print out from the server application:
信息: Looking for RMI...
I'm studying the same example from "Pro Spring" . If I run both client and server on the same machine, everything's ok, here is the print out from the server application:
信息: Looking for RMI...
I ran into a problem when learning Spring. Can somebody please help me?
I defined a Type in Oracle:
create type Address_type as object
(street varchar2(50),
city varchar2(25),
...