Help coderanch get a
new server
by contributing to the fundraiser

Prabhakar Reddy Bokka

Ranch Hand
+ Follow
since Jul 26, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Prabhakar Reddy Bokka

Dear Kathy Sierra & Bert Bates,

What is the inspiration behind the energy of writing this updated version of book? I am very much impressed by reading your previous versions of this book and the information in this book is always the best. Every time when i go through the book, it inspires me to think about achieving another certification and gain more knowledge and improve on new updated features. Thank you for the continued energy in releasing the updated versions. Wish you many more celebrations!!!

Thanks,
Prabhakar
Surprisingly, I came to know that Java Bug Database is not correct. oak...

Yes, we purchased Oracle support for resolution of the bug accepted by Oracle and displayed in Java Bug Database.

Now Oracle says this is not a bug and Java Bug Database is not correct/valid page... oak...

Oracle says EventQueue. push and pop behavior changed from Java 7.stopped support for multi threading. But never documented the same in JavaDoc.
8 years ago
This issue got accepted as bug in JDK 7 and later versions. Targetted for the fix in JDK 9. Below is link to the bug details

http://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8144759
8 years ago
EventQueue.pop() Stops dispatching events using this EventQueue.

SwingUtilities.isEventDispatchThread() should return false after the EventQueue.pop() called.

It works perfectly till JDK 1.6. But not working after JDK 7 and later versions. EventQueue.pop() is not stopping dispatching events.
As a result SwingUtilities.isEventDispatchThread() returning true even after EventQueue.pop() called.

My code is depening on EventQueue.push() to replace with new AWT-EventQueue, and EventQueue.pop() to stop dispatching events.

As both are not working from JDK 1.7, My code is broken in newer versions. It became a show stopper for my migration.

But there was no change to the API documentation of the class EventQueue EventQueue API

I checked the source code, the logic is completely changed. However i do not see the changes documented in the class.

To me, it seems a bug in JDK 1.7 and later versions.

Can anyone guide me how to resolve this issue?
8 years ago
We are using EventQueue.push() to replace with a new AWT EventQueue. It was working fine till JDK 6.

But it seems the EventQueue.push/pop behavior changed from JDK 7 and later versions. Checked in the JDK source code, it changed a lot. But there was no update to the Documentation. So, i am assuming there should not be any changes to its behavior.

But it was not working as expected.

Below is the sample code i created for testing. SwingUtilities.isEventDispatchThread() returns different values in JDK 6 and JDK 7 after EventQueue.push/pop method calls.


Output of this code is different in JDK 6 and JDK 7.
But as per the documentation in the EventQueue class, there are no changes in the behavior.

Can someone help me to understand how to handle the AWT EventQueue and EventDispatchThread in JDK 7 and later versions?

8 years ago

Mohamed Suood wrote:
boatList[0].setMastHeight(12); // <<=== something is woring here in this line.



The issue is... setMastHeight(12) method is not a method of Boat class, and your instance is of a Boat class. Hence the issue.
If you want to set setMastHeight, you need to use the instace of SailBoat class.
9 years ago

Campbell Ritchie wrote:Stop using Date. Use the Java8 classes instead.



Not sure how many applications are upgraded to java8. Many applications are still using java 5/6. Practically this may not be possible if your application using lower version of java.
9 years ago
The code you posted works perfectly.. seems the problem is somewhere else in your code. Check if you are assigning the value properly.
9 years ago
Looks like there is an issue with the JDBC code. Test your JDBC code with a simple java class and then try this...
@ Mansukhdeep: Thank you !
11 years ago

Joanne Neal wrote:
When you create a new Test instance you initialise the test variable of that object with another new Test instance. This instance will initialise it's test field with another new Test instance. This instance will initialise it's test field with another new Test instance. This instance will initialise it's test field with another new Test instance. This instance will initialise it's test field with another new Test instance. This instance will initialise it's test field with another new Test instance...



Could you explain clearly... what is causing the error??
11 years ago

puneet bansal wrote:hi
I want to create a WSDL from a java class



Do you mean to create a Web Service?
If so, Search google for simple WS implementaion, and deployment is just a "right click and deploy" if you are using any IDE.
11 years ago
Nothing special, its the same way how you call your WS from java client.
Just make sure your servlet/project in classpath for all the WS libraries.
11 years ago
Change your project build path to use JRE version that is compatible with Jboss 5.
That resolves the inconsistency of the versions.
11 years ago