Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / September 2006

Tip: Looking for answers? Try searching our database.

"Java Performance Tuning Book" anyone read this book?

Thread view: 
coltrane - 25 Sep 2006 21:25 GMT
I am looking for someone who has run some of the examples in this book.
I cannot get one of the first projects to work. I keep gettting a stack
error running the ObjectCreationMonitoring example. I ( and others )
believe there is a recursion problem. The modification to the Object
class seems a little suspect. Also, changing the stack size did not
help.

thanks for your help

john
Tris Orendorff - 26 Sep 2006 20:37 GMT
> I am looking for someone who has run some of the examples in this book.
> I cannot get one of the first projects to work. I keep gettting a stack
> error running the ObjectCreationMonitoring example. I ( and others )
> believe there is a recursion problem. The modification to the Object
> class seems a little suspect. Also, changing the stack size did not
> help.

Sorry, I haven't read the book but if you post a small example someone
will comment on it.

Signature

Sincerely,

Tris Orendorff
[Q: What kind of modem did Jimi Hendrix use?
A: A purple Hayes.]

coltrane - 27 Sep 2006 14:13 GMT
> > I am looking for someone who has run some of the examples in this book.
> > I cannot get one of the first projects to work. I keep gettting a stack
[quoted text clipped - 12 lines]
> [Q: What kind of modem did Jimi Hendrix use?
>  A: A purple Hayes.]

Thanks for the response,

Originally I was trying to get an object monitor to work. This required
modifying the java.lang.Object class. When I ran this I received a
stack error. So to test where the error occured I removed the
monitoring app and replaced it with a simple hello world. Using the new
Object I still recieved the stack error. Again to remove any reference
to the monitoring code I removed the one line of code used for the
Object Monitor. I replaced it with a System.out.println(...).  I still
received the error. So after all that, this is the additonal code I
added to the Object class

  public Object(){
       this(true);
       System.out.println("java.lang.Object");
   }
   public Object(boolean b)
   {
   }

What I have found is that if I do not use a class, something derived
from Object, there is no problem. In other words, If I use:

int x;
x = 1 + 2

there is no error. But if I use

Integer x = 2;

Boom! StackError.

One last thing, I am invoking the app with the following command line

java -Xbootclasspath/p:ObjectHack.jar;rt.jar tuning.HelloWorld

(the java.lang.Object class is obviously in ObjectHack.jar)

So that the deal.

thanks again


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.