-1

I am running JBoss EAP 6.3.

In one of the AuthenticationFilter.java, Filter class which is configured in web.xml I have Thread.currentTthread().sleep(1000) for some reason.

When I run my JBoss App in debug mode the breakpoints whichever I set even in a prior line before Thread.currentThread().sleep(1000) in Filter class doesn't work.

I would like to know is it because of the threading Mechanism.

Dev Anand Sadasivam
  • 699
  • 7
  • 21
  • 49
  • both thread & static paradigm is not that harmful considering logic & programs..... is i so....... else it is not the way & incorrect....? https://stackoverflow.com/questions/2077216/java-thread-currentthread-sleepx-vs-thread-sleepx/34058957#34058957 – Dev Anand Sadasivam Dec 08 '15 at 07:58

2 Answers2

-1

Yes it is because of threading Mechanism which is been used.... Basically Thread.currentThread().sleep(1000) makes the current thread life cycle which is in execution to go for sleep..... If you need a sleep for a while you should use Thread.sleep() rather....

And answering the question as Thread.currentThread().sleep() is recognized within present class, breakpoints whichever set will not work regardless wherever its been set within that class as class nature been recognized as thread....

When Threads been used breakpoints won't work in debug mode, until unless Serializable also patched alongside with Runnable.

Dev Anand Sadasivam
  • 699
  • 7
  • 21
  • 49
-1

It may because of non-execution-paradigm as I have one CommonAuthenticationFilter.java and AuthenticationFilter.java although code execution may not dismay.....

JBoss strides or not executing this dual nature as one Filter passes so....

Eclipse break-points are well in-spite it may....

Debugging multiple threads in eclipse

But it is not.....,- as per the above discussion..... We're not discussing break-points at the,-core - run() so..... SO it is not that wrong Question...... and JBoss jDevStudio also as like Eclipse here as by SO.....

Community
  • 1
  • 1
Dev Anand Sadasivam
  • 699
  • 7
  • 21
  • 49
  • As per the discussion highlighted, embedded here.... http://stackoverflow.com/questions/5375538/debugging-multiple-threads-in-eclipse breakpoints didn't turn up in debug mode.... if debug point set in inside `run()` method, although it skips its prior first execution breakpoints,- breakpoint been araises inside run() which is been set. So hence onwards debug mode can be examined. _**It means breakpoints didn't turn at all if thread is in use.**_ I don't understand how & why inside `run()` its obliged.... Funda of Thread should be studied by myself rather debating & disputing it. Thanks. – Dev Anand Sadasivam Dec 30 '15 at 04:46