tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Wareham" <>
Subject Re: jvm cowardly refuses to print a thread dump
Date Wed, 03 Dec 2008 15:16:04 GMT
Martin Gainty wrote:
> if its a bean make sure you 
> declare your attributes as having either private or protected access
> in the case of attribute called size contained in class FuBar
> class FuBar
> {
>   public FuBar() { ; } //default no-arg constructor
>   private int Size;
> //declare accessor getSize
>   public getSize()
>  {
>    return Size;
>   }
> //declare mutator setSize
>   public setSize(int Size)
>   {
>    this.Size = Size;
>   }
> } //end class definition
> Martin 

You probably also want to declare Size as volatile if it's going to be
accessed by multiple threads and isn't enclosed in a synchronized
method or block. You may also want to declare the argument to the setter
as final, your variable naming convention conflicts with the Sun one,
and the default constructor is redundant. I'll remove my pedant hat now.


> ______________________________________________ 
> Disclaimer and confidentiality note 
> Everything in this e-mail and any attachments relates to the official business of Sender.
This transmission is of a confidential nature and Sender does not endorse distribution to
any party other than intended recipient. Sender does not necessarily endorse content contained
within this transmission. 
>> From:
>> To:
>> Date: Tue, 2 Dec 2008 08:47:05 -0600
>> Subject: RE: jvm cowardly refuses to print a thread dump
>>> From: news [] On Behalf Of Oliver Schoett
>>> Subject: Re: jvm cowardly refuses to print a thread dump
>>> Very likely you have unsynchronized accesses to the ArrayList
>> That's irrelevant for the size() method, where the entire code consists of this:
>>     public int size() {
>>         return size;
>>     }
>> Not much chance for a loop there...
>>  - Chuck
and is thus for use only by the intended recipient. If you received this in error, please
contact the sender and delete the e-mail and its attachments from all computers.
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail:
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:
> _________________________________________________________________
> You live life online. So we put Windows on the web. 

Chris Wareham
Senior Software Engineer
Visit London Ltd
6th floor,
2 More London Riverside, London SE1 2RR
Tel:  +44 (0)20 7234 5848
Fax: +44 (0)20 7234 5753

'Visit London Limited' is registered in England under No.761149;
Registered Office: Visit London, 2 More London Riverside, London SE1 2RR.

Visit London is the official visitor organisation for London. Visit London is partly funded
by Partnership, the Mayor's London Development Agency and London Councils.
The information contained in this e-mail is confidential and intended for the named recipient(s)
only.  If you have received it in error, please notify the sender immediately and then delete
the message.  If you are not the intended recipient, you must not use, disclose, copy or distribute
this email. The views expressed in this e-mail are those of the individual and not of Visit
London. We reserve the right to read and monitor any email or attachment entering or leaving
our systems without prior notice.
  Please don't print this e-mail unless you really need to.

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message