day, October 15, 2002 3:38 PM
> To: 'Tomcat Users List'
> Subject: RE: Java Question
>
>
> A service will start without a user logged in (if the startup
> mode is set to
> Auto) and continue to run after they log out. Anything in the startup
> folder doesn
A service will start without a user logged in (if the startup mode is set to
Auto) and continue to run after they log out. Anything in the startup
folder doesn't start until the user logs in and is terminated when the log
out.
-Original Message-
From: Gaull, Kathy [mailto:[EMAIL PROTECTE
At 01:17 AM 1/11/2002 -, you wrote:
>
>Hi, this is partially a Java question and partially a Tomcat
>question. I looked through "Java Servlet Programming" and some other
>books and I couldn't find a good answer.
>
>I am writing a program which uses Jmagick to generate some images
>which will
n the past
week. I'm sorry!
Thanks again for everyone's help!
Brandon
-Original Message-
From: Hemant Singh [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 12, 2001 11:22 PM
To: [EMAIL PROTECTED]
Subject: Re: Java Question
HI Bran:
There is no relation betn static and syn
HI Bran:
There is no relation betn static and synchronize
If you are synchronizing the static method than it
does means you are giving him the class level lock,
and not instance level lock.
Hope that help
Regards
Hemant
--- Brandon Cruz <[EMAIL PROTECTED]> wrote:
> I have looked all over and can
2:18 PM
> Subject: Java Question
>
> - Original Message -
> From: "Pae Choi" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, June 12, 2001 2:41 PM
> Subject: Re: Java Question
>
>
> > When you access the 'synchr
Message-
>From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, June 12, 2001 3:42 PM
>To: [EMAIL PROTECTED]
>Subject: Re: Java Question
>
>
>Correct me if I'm wrong. But you'd only need to synchronize if the method
>used data that was sha
Correct me if I'm wrong. But you'd only need to synchronize if the method
used data that was shared between threads. If you have a method:
public static int getMonth(String date)
{
return dataFormatter.parse(date).get(Calendar.MONTH);
}
or something lik
EMAIL PROTECTED]'
Subject: RE: Java Question
> public static String getYear(String str){
> synchronized(str){
> newStr = str.substring(0,4);
> return newStr;
> }
> }
While your use of "synchronize" is correct, _this_ synchronization is not
Stupid example. Should have been an array...
- Original Message -
From: "William Kaufman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 12, 2001 3:47 PM
Subject: RE: Java Question
> > public static String getYear(String st
June 12, 2001 11:56 AM
To: [EMAIL PROTECTED]
Subject: RE: Java Question
So would changing something simple from...
public static String getYear(String str){
newStr = str.substring(0,4);
return newStr;
}
to...
public static String getYear(String str){
synchronized(str){
().getYear("abcdefghi");
}
}
- Original Message -
From: "Brandon Cruz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 12, 2001 2:56 PM
Subject: RE: Java Question
> So would changing something simple from...
>
> public static S
ay, June 12, 2001 2:59 PM
Subject: Re: Java Question
> You don't seem to understand the relationship between the JVM's
> threads and the native OS's threads.
>
>
> Pae
>
> > Actually the outcome is predictable:
> > monitorenter will obtain objectr
PROTECTED]
Subject: Re: Java Question
Actually the outcome is predictable:
monitorenter will obtain objectref on this (aload_0)
* if no other thread has locked the object
* if the object is currently locked by another thread (monitorenter
instruction)
* if the current thread already owns a lock
>
> - Original Message -
> From: "Pae Choi" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, June 12, 2001 2:41 PM
> Subject: Re: Java Question
>
>
> > When you access the 'synchronized' static method, it locks i
Subject: Java Question
- Original Message -
From: "Pae Choi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 12, 2001 2:41 PM
Subject: Re: Java Question
> When you access the 'synchronized' static method, it locks its class.
> so this
Yes. Monitor lock need to be put on code (preferred) or method wherever they
care accessed by more than one thread.
Example:
static void doSort (int [] arr)
{
..
synchronized(arr)
{
// sensitive code
}
}
.method static doSort([I)V
aload_0
monitorenter
; sensiti
When you access the 'synchronized' static method, it locks its class.
so this will ensure the thread-safe access. Otherwise, the result is
unknown.
Pae
> I have looked all over and can't find the answer to this simple question.
> If you use a static method, do you have to synchronize
Ryan wrote:
>
> Then this is my next problem.
>
> I currently have getThumb() returning an Image object.
>
> The part where I am stuck at is what to do in the toURL() method.
>
> my mock getThumb() method currently looks something like
> public Image getThumb(){
> this.iValue = "/home/thu
> Then this is my next problem.
>
> I currently have getThumb() returning an Image object.
>
> The part where I am stuck at is what to do in the toURL() method.
>
> my mock getThumb() method currently looks something like
> public Image getThumb(){
> this.iValue = "/home/thumbs";
> return
}
-ryan
- Original Message -
From: "Michael Wentzel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 22, 2001 8:32 AM
Subject: RE: Java Question on Inheritance
> > Ultimately, I want to get the thumb of this Image and convert it to a
No.
The way you are doing means you are calling .toURL() method on what ever is
returned by the method getThumb(). Unless getThumb returns a type of Object of
type SuperOne or it's sub-class you cannot call this method and you should see a
compile time error.
What
you can do is
URL
ur
> Ultimately, I want to get the thumb of this Image and convert it to a URL.
I want > to be able to do this efficiently and use something like the
following syntax.
>
>myImage.getThumb().toURL()
>
>
>Is this possible?
Yes, but getThumb() must return a subclass of SuperOne.
---
Michael We
I don't think you can convert a gif file to anything
else but other image format.
gp
--- Ryan <[EMAIL PROTECTED]> wrote:
> I don't really know what to call what I'm having
> trouble with but here is what I am trying to do.
>
> I have a superclass called SuperOne, it has a method
> to convert a
24 matches
Mail list logo