• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

applet not recieving init/start events in the second onwards call

 
Raghvendra Sharma
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
I am working on a java applet (swings), which actually handles a lot of data also. Data comes from database and is handled in data in the supporting classes with applet.
In the applet tag, i specify the jar name in param tag. The first time i ask for applet (to be opened in a new window) it opens file, i.e. it recognized the jar names etc from the archive tag and all stuff. Everything goes smooth.
Say i kill the child window and then fire the applet again from the same page. this time the applet's start init, method etc. all are skipped and nothing is executed. Also, the archive tag is completely ignored, and the plugin console specifies that it didn't recieve any jar names in the archive tag.
The dump of the plug-in console is given hereunder (second time onwards ) -
***********************************
Registered modality listener
Referencing classloader: sun.plugin.ClassLoaderInfo@1df354, refcount=1
Added trace listener: sun.plugin.ocx.ActiveXAppletViewer[TestApplet,0,0,700x500,invalid,layout=java.awt.BorderLayout]
Sending events to applet. LOAD
Sending events to applet. INIT
Sending events to applet. START
Determine if the applet requests to install any HTML page
HTML Installation finished.
Determine if the applet requests to install any JAR
Jar cache option: null
Jar archive(s): null
Jar cache version(s): null
Applet Installation finished.
in the init of applet
in the start of applet
******************************************
while for the first time the console is as -
*****************************************************
Trace level set to 5: basic, net, security, ext, liveconnect ... completed.
Cache filename: C:\WINNT\Profiles\raghvendrash\Temporary Internet Files\Content.IE5\XGH01KU4\04_47Test[1].jar
in the init of applet
Opening http://172.17.26.109/test/i18n.jar
Connecting http://172.17.26.109/test/i18n.jar with no proxy
Opening http://172.17.26.109/test/null
Connecting http://172.17.26.109/test/null with no proxy
Opening http://172.17.26.109/test/com/niit/cliks/te/web/TestingEngineBeanInfo.class
Connecting http://172.17.26.109/test/com/niit/cliks/te/web/TestingEngineBeanInfo.class with no proxy
Opening http://172.17.26.109/test/sun/beans/infos/TestingEngineBeanInfo.class
Connecting http://172.17.26.109/test/sun/beans/infos/TestingEngineBeanInfo.class with no proxy
**************************************************************
The behaviour further is that if i close the child and parent both the browser windows, and start afresh, the things go fine (obviously its the first launch of applet for the browser instance).
Additionally, what i have done is i have nullified all the data structures in destroy method of the applet.
I have to allow the client the behaviour in which he/she would be able to launch the applet n times from the same page.
how do i attack it...
any helps

regards
raghav..
 
Raghvendra Sharma
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all...
The problem was actually related to the life cycle management of the applet. I had to very effectively handle the destroy and stop calls and manage my objects. The problem was not that the init was not being fired, it was just that it was being picked up from cache. (the jar)
There are certain applet tags related to handling of caching of the applet, just go to java.sun.com/products/plugin
and look for applet caching section, you would get enough material to help it track down. I did the same way.
Hope it helps.
regards
raghav..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic