Re: Temp file being written to / with Font

2005-02-17 Thread Shey Rab Pawo
Do you have any idea why that is not working for me?  Is there
something I should do with the Font object to close it or something? 
That seems unlikely but I wonder.  I am running this on XP
Professional on a laptop in development.


On Thu, 17 Feb 2005 09:54:57 +, Mark Benussi
<[EMAIL PROTECTED]> wrote:
> Yes it did.
> 
> Original Message Follows
> From: Shey Rab Pawo <[EMAIL PROTECTED]>
> Reply-To: Shey Rab Pawo <[EMAIL PROTECTED]>
> To: Mark Benussi <[EMAIL PROTECTED]>
> CC: user@struts.apache.org
> Subject: Re: Temp file being written to / with Font
> Date: Wed, 16 Feb 2005 13:20:50 -0800
> 
> I was too fast in responding.  I switched to Tiger (jre 5.0) but still
> have the same behavior when I create an image using a Font object.
> Did the change to 5.0 solve your companies' problem?
> 
> On Wed, 16 Feb 2005 17:07:36 +, Mark Benussi
> <[EMAIL PROTECTED]> wrote:
>  > Oh dear. I heard about something similar to this first time the other
>  > day.
>  >
>  > JDK 1.4 has a bug that does no release resources even when you release
> any
>  > Font objects.
>  >
>  > My company has had converstaion with Sun but what they ultimately
> recommend
>  > is upgrade to 1.5
>  >
>  > Sorry, I cant provide more than this.
>  >
>  >
> 
> --
> The radiance of all the stars does not equal a sixteenth part of the
> moon's radiance, likewise, good deeds giving us merit, all these do
> not equal a sixteenth part of the merit of loving-kindness..
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
The radiance of all the stars does not equal a sixteenth part of the
moon's radiance, likewise, good deeds giving us merit, all these do
not equal a sixteenth part of the merit of loving-kindness..

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Temp file being written to / with Font

2005-02-17 Thread Mark Benussi
Yes it did.
Original Message Follows
From: Shey Rab Pawo <[EMAIL PROTECTED]>
Reply-To: Shey Rab Pawo <[EMAIL PROTECTED]>
To: Mark Benussi <[EMAIL PROTECTED]>
CC: user@struts.apache.org
Subject: Re: Temp file being written to / with Font
Date: Wed, 16 Feb 2005 13:20:50 -0800
I was too fast in responding.  I switched to Tiger (jre 5.0) but still
have the same behavior when I create an image using a Font object.
Did the change to 5.0 solve your companies' problem?
On Wed, 16 Feb 2005 17:07:36 +, Mark Benussi
<[EMAIL PROTECTED]> wrote:
> Oh dear. I heard about something similar to this first time the other
> day.
>
> JDK 1.4 has a bug that does no release resources even when you release 
any
> Font objects.
>
> My company has had converstaion with Sun but what they ultimately 
recommend
> is upgrade to 1.5
>
> Sorry, I cant provide more than this.
>
>

--
The radiance of all the stars does not equal a sixteenth part of the
moon's radiance, likewise, good deeds giving us merit, all these do
not equal a sixteenth part of the merit of loving-kindness..
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Temp file being written to / with Font

2005-02-16 Thread Shey Rab Pawo
I was too fast in responding.  I switched to Tiger (jre 5.0) but still
have the same behavior when I create an image using a Font object. 
Did the change to 5.0 solve your companies' problem?


On Wed, 16 Feb 2005 17:07:36 +, Mark Benussi
<[EMAIL PROTECTED]> wrote:
> Oh dear. I heard about something similar to this first time the other
> day.
> 
> JDK 1.4 has a bug that does no release resources even when you release any
> Font objects.
> 
> My company has had converstaion with Sun but what they ultimately recommend
> is upgrade to 1.5
> 
> Sorry, I cant provide more than this.
> 
> 


-- 
The radiance of all the stars does not equal a sixteenth part of the
moon's radiance, likewise, good deeds giving us merit, all these do
not equal a sixteenth part of the merit of loving-kindness..

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Temp file being written to / with Font

2005-02-16 Thread Shey Rab Pawo
Thanks, Mark


On Wed, 16 Feb 2005 17:07:36 +, Mark Benussi
<[EMAIL PROTECTED]> wrote:
> Oh dear. I heard about something similar to this first time the other
> day.
> 
> JDK 1.4 has a bug that does no release resources even when you release any
> Font objects.
> 
> My company has had converstaion with Sun but what they ultimately recommend
> is upgrade to 1.5
> 
> Sorry, I cant provide more than this.
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Temp file being written to / with Font

2005-02-16 Thread Mark Benussi
Oh dear. I heard about something similar to this first time the other 
day.

JDK 1.4 has a bug that does no release resources even when you release any 
Font objects.

My company has had converstaion with Sun but what they ultimately recommend 
is upgrade to 1.5

Sorry, I cant provide more than this.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Temp file being written to / with Font

2005-02-16 Thread Shey Rab Pawo
I am getting .tmp files written to a /temp directory in my webapp. 
The names are like "+~JF38289.tmp".  The size of these is pretty big,
e.g. 35-65 kilobytes, and contains content relating to true type font
files.

I don't know if this is Struts related, but the Tomcat people have not
claimed this problem as theirs, so I am trying Struts.  If anyone has
anything helpful, that would be appreciated.

I am using Tomcat 5.0 and Struts 1.2.6.  I am getting a temp file
seemingly related to my fonts whenever I dynamically create new images
with writing on the fly.  My code to create the Font objects, reading
from .ttf files, is as follows:

 public synchronized static Font getFont(String fontLogicalName,
   Map attributes) {
   Filefile = null;
   Fontfont = null;
   FileInputStream fontStream   = null;
   String  physicalName = null;
   String  familyName   = null;

   physicalName = (String)fonts.get(fontLogicalName + "FONT");
   familyName   = (String)fonts.get(fontLogicalName + "FAMILY");

   attributes.put(TextAttribute.FONT,fontLogicalName);
   attributes.put(TextAttribute.FAMILY,familyName);

   if(physicalName == null) {
 try {
   font = new Font(attributes);
 } catch (Exception e) {
   // ERROR HANDLING
 }
   }

   try {
 file = new File(MY_CLASSPATH_TO_FONT_FILE);
 fontStream = new FileInputStream(file);
 font = Font.createFont(Font.TRUETYPE_FONT,fontStream);
 font = font.deriveFont(attributes);
 fontStream.close();
   } catch (FileNotFoundException fnfe) {
 // ERROR HANDLING
   } catch (IOException ioe) {
 // ERROR HANDLING
   } catch (FontFormatException ffe) {
 // ERROR HANDLING
   }

   return font;
 }

Does anyone see why I am getting these files?  Is this Struts related?
 Any help?
-- 
The radiance of all the stars does not equal a sixteenth part of the
moon's radiance, likewise, good deeds giving us merit, all these do
not equal a sixteenth part of the merit of loving-kindness..

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]