Article View: borland.public.jbuilder.java.api
Article #167Re: What is this?
From: Kevin Dean
Date: Tue, 20 Jul 2004 14:14
Date: Tue, 20 Jul 2004 14:14
91 lines
4216 bytes
4216 bytes
There are two ways to prevent recursive event triggering:
1) Don't write code that triggers the event you're currently handling (not
always possible).
2) Add a boolean flag that is turned on when you enter the event handler and
turned off when you exit. The event handler code would look something like
this:
if (!handlingEvent) {
handlingEvent = true;
try {
doSomethingToTriggerEvent();
}
finally {
handlingEvent = false;
}
}
--
Check out our latest white papers at
http://www.datadevelopment.com/papers/index.html
BladeNET Scores With Borland Enterprise Tools
Team Development with JBuilder and Borland Enterprise Server
Dolphin Data Development Ltd.
http://www.datadevelopment.com/
"Ernesto Basc�n" <ebascon@hotmail.com> wrote in message
news:40fc4c4c@newsgroups.borland.com...
> I got that error everytime I call recursively a method without give the
> right control to it.
>
> Same exception is raised when an event listener is called and the event
> listener trigges another event that raises the same event again. Doing an
> infinite loop method calling.
>
> Best regards
>
>
> Ernesto
>
>
> "Kevin Dean" <NkOdSePaAnM@datadevelopment.com> wrote in message
> news:40a0ca1b$1@newsgroups.borland.com...
> > First of all, we need more of the stack trace than that. Paste it all
if
> > possible. Second of all, when did this occur? Under what
circumstances?
> > Can you replicate it?
> >
> > Thanks.
> >
> > --
> > Check out our latest white papers at
> > http://www.datadevelopment.com/papers/index.html
> >
> > BladeNET Scores With Borland Enterprise Tools
> > Team Development with JBuilder and Borland Enterprise Server
> >
> > Dolphin Data Development Ltd.
> > http://www.datadevelopment.com/
> >
> > "@(none)" <""milan\"@(none)"> wrote in message
> > news:40a0c784$1@newsgroups.borland.com...
> > >
> > > Exception in thread "main" java.lang.StackOverflowError
> > > at java.security.AccessController.doPrivileged(Native Method)
> > > at sun.io.Converters.getDefaultEncodingName(Converters.java:66)
> > > at java.lang.StringCoding.encode(StringCoding.java:376)
> > > at java.lang.String.getBytes(String.java:608)
> > > at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
> > > at
java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:125)
> > > at java.io.File.exists(File.java:679)
> > > at sun.misc.URLClassPath$FileLoader.getResource(URLClassPath.java:886)
> > > at sun.misc.URLClassPath.getResource(URLClassPath.java:156)
> > > at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
> > > at java.security.AccessController.doPrivileged(Native Method)
> > > at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
> > > at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
> > > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
> > > at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
> > > at java.security.Security.doGetImpl(Security.java:1122)
> > > at java.security.Security.doGetImpl(Security.java:1083)
> > > at java.security.Security.getImpl(Security.java:1044)
> > > at ...
> >
> >
>
>
Technical Details
Message-ID:
<40fd28e5$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!border1.nntp.dca.giganews.com!nntp.giganews.com!newshosting.com!nx01.iad01.newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<40a0c784$1@newsgroups.borland.com> <40a0ca1b$1@newsgroups.borland.com> <40fc4c4c@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1089d0,db80065efbaa27c8 X-Google-Attributes: gid1089d0,public X-Google-Language: ENGLISH,ASCII From: "Kevin Dean" <NkOdSePaAnM@datadevelopment.com> Newsgroups: borland.public.jbuilder.java.api References: <40a0c784$1@newsgroups.borland.com> <40a0ca1b$1@newsgroups.borland.com> <40fc4c4c@newsgroups.borland.com> Subject: Re: What is this? Date: Tue, 20 Jul 2004 10:14:57 -0400 Lines: 93 Organization: Dolphin Data Development Ltd. X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 NNTP-Posting-Host: 24.57.150.243 Message-ID: <40fd28e5$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1090332901 24.57.150.243 (20 Jul 2004 07:15:01 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!border1.nntp.dca.giganews.com!nntp.giganews.com!newshosting.com!nx01.iad01.newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail