Re: Killing Applets in browsers

1998-12-13 Thread Leo Cyr

If you use HotJava (current is 1.1.5) for some reason ;-) it automatically
re-downloads the classes/jars specified in the Applet tag.  I'm not sure why
-- I guess it is realted to the browser's cache, but caching of html is
still on...  It just works...

Christopher Hinds wrote:

> Since the browser caches HTML pages in a history list of some type,
> every
> you time leave and return to the HTML page, the applet will be activated
> ( start() ) and deactivated ( stop() ) respectively. Therefore you can
> try clearing the cached pages which should force the embedded JVM
> to call the destroy() on the applet.  Or you can uses JavaScript to
> clear the browser cached history
> list if the browser supports JavaScript.
>
> Cheers
> Chris
>
> Thor Erik Karlsen wrote:
>
> >  This is a proplem that has been irritating me since the day I started
> > developing applets(not that long ago). Is there a WORKING way an
> > applet can destroy itself and tell the browser that its dead? I always
> > have to start the browser again and reload the applet during
> > development. Destroy() dont work. What im looking for is some code
> > within the applet that solves the problem once for all.  Thor Erik
> > Karlsen
> > Catalyst ONE AS
> > [EMAIL PROTECTED]



Re: How can I debug Java Program??

1998-12-13 Thread Juergen Kreileder

> Darius Bacon writes:

>> Subject: Re: How can I debug Java Program??
>> 
>> Hi Han,
>> There are different approaches one can take on debugging a Java program:
>> 1) Using System.out.println's at places you expect trouble.
>> 2) Use a debugMode boolean property throuhout your program and a
>> (central?) logger. Make your object log info/warning/error messages to
>> the logger. Make the logger decide what to display to System.err (for
>> example), based on the debugMode condition.
>> 3) Use a debugger provided by an IDE, like JBuilder or Symantec Visual
>> Cafe
>> 4) Use the JDK Java debugger \:( (wouldn't do this if I were you)

You can use ddd (The Data Display Debugger, available under GPL)
as a front-end for jdb:

ddd -jdb MyClass

Darius> There are a couple other options on Linux.

Darius> Metamata Debug, from my employer:
Darius> http://www.metamata.com/products/debug.html Non-free, but
Darius> you can download an evaluation copy.

Darius> IBM's Jikes debugger:
Darius> http://www.alphaWorks.ibm.com/formula/JikesDebugger A free
Darius> graphical debugger using the sun.tools.debug classes.


Juergen



Re: Problems with Threads

1998-12-13 Thread zun

On Sat, 12 Dec 1998, Carlos Alberto Roman Zamitiz wrote:

> I have a problem with threads: My java client contains 2 threads which
> call to 2 methods. First thread calls method "x" into while(true) but when
> second thread calls method "y", first thread must wait. When second thread
> finish method "y" must notify and first thread will awake.
> 
> But I receive this message:
> java.lang.IllegalMonitorStateException: current thread not owner

Your two threads must wait and notify on the same object, and must also be
synchronized on the same object.

. . . Sean.




Re: How can I debug Java Program??

1998-12-13 Thread Dimitris Vyzovitis



 
You can use ddd (The Data Display Debugger, available under GPL)
as a front-end for jdb:
ddd -jdb MyClass
SInce it was mentioned, has anybody else (besides me ;-} )observed any
strange glitches with ddd and jdb?
I mean sometimes (pretty often to be sincere) jdb simply hungs and
doesn't respond to ddd commands (and has to be restarted - really annoying).
Furthermore, the nexti command doesn't enter various method invocations
(while it should) and I have to use a series of stepi commands for the
desired effect
[Sorry for going really off-topic, but ddd gets really annoying sometimes,
although it is a nice tool in general]
 
-- 
Dimitrios Vyzovitis  -- Information Processing Laboratory
[EMAIL PROTECTED] -- Aristotle University of Thessaloniki
[EMAIL PROTECTED] -- Dept. of Electrical and Computer Engineering
    http://egnatia.ee.auth.gr/~dviz
 


Re: BUG? Modal dialogs don't call subclass constructors!!! - FALSE ALARM

1998-12-13 Thread Dimitris Vyzovitis


False Alarm.
After closer examination (thanks to Juergen), I realized that I fired
a false alarm.
-- 
Dimitrios Vyzovitis  -- Information Processing Laboratory
[EMAIL PROTECTED] -- Aristotle University of Thessaloniki
[EMAIL PROTECTED] -- Dept. of Electrical and Computer Engineering
    http://egnatia.ee.auth.gr/~dviz
 


Swing applications + TYA 1.2?

1998-12-13 Thread Bryce McKinlay

I was going to send this to Albrecht Kleine (author of TYA), but can't
seem to resolve his mail address, so I'll post it here. Origional
message follows:

--

I have just installed TYA 1.2 - Together/J is now working great (and
*fast*!) without having to
#undef anything in tyaconfig.h. However, *all* Swing applications are
now crashing on startup.
The problem is allways in the same method. Here is TYA's debug output:

NEW CR32 (3) disable (nil) sync=0
TYA: *** user programm switched off JIT compiling ***
--Disable_hook
--start JITCompileMethod-
METHOD=javax/swing/UIManager.initializeSystemDefaults
TYA: JIT problem in javax/swing/UIManager.initializeSystemDefaults
(Ljava/util/Properties;)V 2 4
SIGSEGV   11*  segmentation violation
stackbase=BF9FFD5C, stackpointer=BF9E5510

Full thread dump:
"SIGQUIT handler" (TID:0x4065f2a0, sys_thread_t:0x81e5298, state:R,
thread_t:
t@3075, sp:0x0
threadID:0x1054, stack_base:0xbf5ffd68, stack_size:0x20) prio=0
[ ... thread dump blah blah blah ...]

Environment:
- Kernel 2.1.131ac8
- glibc 2.0.7-29
- JDK 1.1.7v1a (tried with both native & green threads)
- Swing 1.1beta3

I have tried #undef EXCEPTIONS_BY_SIGNALS but the error still occurs.

No problem with TYA 1.1-v4 ...

---

Anyone have any ideas?

  [ bryce ]




Re: Swing applications + TYA 1.2? [update]

1998-12-13 Thread Bryce McKinlay

Michael Emmel wrote:

>   I know the method I crash thre  often. It inits the gui.
> If the sleep work it means he has a race in his Jit.   By sleeping your app it
> gives the Jit a chance to run through the new code.
> That a big method and hes not through jitting it before other stuff gets
> called.
> If not its a generic  C buffer over flow.
>
> The method is about 300-400 lines long and calls  EVERYTHING.
> Its the killer test for a Jit.  IT causes the Awt shlib to load all the swing
> gui classes etc etc etc.
> Tons of inititalization.
>
> Anyway I just wanted to clarify my suggestion.

Update... I just fixed the problem. There seems to be a problem with TYA's
handling of the java.lang.Compiler.disable() call in UIManager.

In earlier versions of TYA, IGNORE_DISABLE was #defined (see tya.c), but in 1.2
this define was commented out. I put it back in and everything works now.

regards

  [ bryce ]




RE: JDBC-connection in Linux

1998-12-13 Thread Java News Collector

At 02:17 AM 12/12/98 -0800, Tauren Mills wrote:
>I'd highly recommend taking a look at MySQL.  www.mysql.com
>
>I'm using RedHat 5.2, JRun 2.2.1, and MySQL with type 4 JDBC drivers.  The
>database and JDBC drivers are free.  The database is faster than anything
>else I've seen, including the big ones like Oracle, MS SQL, Informix, etc.

This discussion really belongs on a database forum but here goes...

Regarding performance of mySQL vs. Oracle or Informix;

I hate to throw water on your fire but the real database engines (MS SQL is
*not* one of them) use raw disk space and run on *real* unix systems with
I/O subsystems capable of 80+ MB/s sustained transfer rates.  We've worked
with Informix engines supporting 250 simultaneous users on databases
exceeding 100GB.  I don't think its fair to even talk about comparing mySQL
to a mature, commercial database engine.

When trying to determine how a database engine might perform under a heavy
load, one of the first questions you might ask is "does it use raw or
cooked disk space?".  If it uses cooked disk space (i.e. files in the
filesytem), it will be significantly slower than a similarly well designed
system that uses raw disk space.  By eliminating the unnecessary
file-access calls through the O/S, the overhead of I/O is reduced.  Also,
nothing can replace a *fast* SCSI subsystem.  Don't even bother with IDE.
Regardless of what they say about throughput, the IDE interface requires
constant management by your CPU and doesn't allow overlapping I/O (most
SCSI controllers allow 255+ concurrent I/O operations).  In my experience,
a slow SCSI subsystem on a heavily loaded system will outperform the best IDE.

I am working intensively with postgreSQL.  It has a rather rich set of
features but it isn't ANSI compliant (yet).  The documentation needs some
work.  After writing some complex triggers and external functions, I think
I am going to write some HOWTO's and submit them to the postgres project team.

Douglas Toltzman
http://www.oakstrsft.com/



Re: JDBC-connection in Linux

1998-12-13 Thread Java News Collector

At 07:38 PM 12/12/98 -0500, Leo Cyr wrote:
>I too have had great success with postgresql (www.postgresql.org ;-) --
>I've used the driver and code I wrote on many platforms including 4.x+
>browsers and it works great so far.
>
>Is anyone using postgreSQL (6.3.2 or other) with postgresql.jar in any
>"high load" production environment like in an application server
>(running on a linux jdk)? How is it doing? any problems...

We are putting postgreSQL through its paces but we haven't gotten to
production testing, yet.  We have been pumping our httpd logs into the
database for a few months so there are at least a few hundred-thousand rows
in the log tables.  Although the load isn't high, we haven't seen a single
crash in about 5 months of continuous use.

Douglas Toltzman