Maximum number of Java applets running at one time?

R

Rhino

I recently started working at a place that has a number of applets to do
various tasks. I noticed that some of the applets were quite prone to
problems and asked someone who has worked there for a while why they were so
buggy. He said that they'd been told the problems occurred when individual
users had more than 6 applets open at the same time. Apparently, one of the
technical people had looked into the problem and been told by Sun that you
should never have more than 6 applets open at a time or you would have this
sort of problem. Now, I'm hearing all this third or fourth hand and
something has probably been "lost in the translation" but is there ANYTHING
to this?

I've been programming in Java for quite some time and have never heard of
such a thing. Then again, I've never tried running that many applets
concurrently either so this may be accurate information. Does anyone know if
there is any truth to the claim that more than 6 concurrent aplications is
an issue?
 
T

Thomas Hawtin

Rhino said:
I recently started working at a place that has a number of applets to do
various tasks. I noticed that some of the applets were quite prone to
problems and asked someone who has worked there for a while why they were so
buggy. He said that they'd been told the problems occurred when individual
users had more than 6 applets open at the same time. Apparently, one of the
technical people had looked into the problem and been told by Sun that you
should never have more than 6 applets open at a time or you would have this
sort of problem. Now, I'm hearing all this third or fourth hand and
something has probably been "lost in the translation" but is there ANYTHING
to this?

Is it a case of running out of memory or sockets?

Tom Hawtin
 
Z

Zaph0d

Maybe some statics are leaking between the apps?
Different applets, if running on the same JVM, can share static
instances of variables.
 
R

Rhino

Thomas Hawtin said:
Is it a case of running out of memory or sockets?
I've told you everything I know which, admittedly, is not very much and far
from first hand. I suppose there is not enough detail for anyone to actually
answer the question. If the opportunity presents itself, I will see if I can
see anything in the Java console that might clarify the problem. They might
even be logging somewhere but the computers are set up strangely there and
its not easy to find things: there is no command prompt and Windows Explorer
is not installed.
 
A

Andrew Thompson

Rhino said:
I recently started working at a place that has a number of applets to do
various tasks.
....one of the
technical people had looked into the problem and been told by Sun that you
should never have more than 6 applets open at a time or you would have this
sort of problem. ....
I've been programming in Java for quite some time and have never heard of
such a thing. Then again, I've never tried running that many applets
concurrently either so this may be accurate information. Does anyone know if
there is any truth to the claim that more than 6 concurrent aplications is
an issue?

I waited (for a bit) to see if any definitive information was
going to be posted, since I do not have any.

OTOH, I've been a long time poster to these groups, and
have probably helped people with scores of applet problems,
and read hundreds of applet related posts.

Never have I heard of this specific problem.

Both Thomas and Zap0d made good points, especially
about the shared VM - it depends on the browser as
to whether a VM is shared between applets in different
windows, or a new VM for each browser window (AFAIU -
all applets on the same web-page have to share the same
VM - nothing else is specifically defined.)

If the problem persists, you might try launching the
applets via web-start - that should get them on-screen
in a more predictable environment.

( But personally I think you were told a load of old
cobblers, and it was some coder's excuse for not
diving in to debug the applets. )

Andrew T.
 
C

Chris Uppal

Andrew said:
Both Thomas and Zap0d made good points, especially
about the shared VM - it depends on the browser as
to whether a VM is shared between applets in different
windows, or a new VM for each browser window (AFAIU -
all applets on the same web-page have to share the same
VM - nothing else is specifically defined.)

Not if it's a Sun JVM. The Sun JVM cannot be restarted, nor is it possible to
have more than one instance at a time, so browsers /have/ to share the JVM.
(Which is why, if you have the "display in status bar" option turned on under
Windows, the JVM icon will apear when you first visit a site which uses Java,
and then will hang around for days until you happen to have no <Browser>
instances left alive -- or even longer if the browser keeps itself
resident-but-invisible for fast starts).

( But personally I think you were told a load of old
cobblers, and it was some coder's excuse for not
diving in to debug the applets. )

I suppose it's possible that some early browser had a hard- or soft- limit on
the number of "sessions" it could set up for applets with any one JVM instance.
To me it sounds more likely that the originating Sun engineer said something
like "you can expect problems if you have more than, oh, say half-a-dozen
applets on the same page".

-- chris
 
A

Andrew Thompson

Chris Uppal wrote:
....
To me it sounds more likely that the originating Sun engineer said something
like "you can expect problems if you have more than, oh, say half-a-dozen
applets on the same page".

That seems much more credible. A case of 'chinese whispers'
could easily elevate it to a 'golden rule' as was related to the OP.

Andrew T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top