Applet overwritten when second instance initialized ?

Hi
When I try to initialize a second instance of an applet using IE(one instance is already running), I find that the first applet is overwritten by the second. This should not have been a problem, but my applet launches a password verification dialog box in the start method, and this is not destroyed when the second applet comes up, resulting in 2 of these dialog boxes. Result is, that if you close the second applet dialog box(ie, destroy the applet), and then enter the right password in the first dialog box, it causes the backend program to crash.
The Java Console shows that IE calls the 1st applet's stop/destroy/quit etc. methods, but they are not executed before being overwritten by second applet, hence destroying the dialog box in destroy() doesn't work. So, is there any way I can destroy the 1st applet before the second is loaded, or prevent second from being loaded?
Thanks
Santosh

Hello Santosh,
I have had many difficulties with this kind of problem in the past. The only way to gurantee that this will work is by making the Server more resilient.
Calin's suggestion is good. However, unfortunately, IE manages Applets in a very funny way. The fully qualified name of the Applet class depends on the window you opened the original Applet with (much like having loaded the same class with different ClassLoaders). This means that using static instance variables works in a very ad-hoc manner. Sometimes you get the result you expected, sometimes you don't.
IE also breaks the expected functioning of init/start/stop/destroy. If you keep on openning your applet HTML page, you will get the same number of concurrent applets all running on top of each other, until you close all browser windows.
If you have control over the Server process, make the start() method request a unique ID from the Server. After this, all subsequent calls from the Applet should be preceeded by this unique ID. The server should then listen for communication for each ID it has dispatched, up until a given timeout period, when it renders the ID invalid.
HTH,
Manuel Amago.

Similar Messages

  • OS X 10.5.6, Safari 3.2.1 hangs when second applet loaded is signed applet

    Dear Forum,
    I've been investigating a customer's problem. She is trying to use our
    VoIP applet, but it continuously freezes Safari when the Trust dialog shows.
    A "Force Quit" is necessary.
    I managed to reproduce the problem consistently on
    - PowerMac7 OS X 10.5.6 (Build 9G55)
    - Architecture: ppc
    - Safari 3.2.1 (5525.27.1)
    - JVM 1.5.0_16 from Apple
    The problem is persistent when:
    - the signed applet is loaded as second applet in the browser
    - the signed applet is cached by the JVM
    Our customer uses:
    - Mac Book ProOS X 10.5.6
    - Safari 3.2.1
    - JVM 1.5.0_16 from Apple
    This problem does not occur on:
    - Mac OS X 10.4.11 (Mac Powerbook G4)
    - Safari 3.2.1 (4525.27.1)
    - JVM 1.5.0_16 from Apple
    and not on:
    - MacBook Air, OS X 10.5.6, 1.6 Ghz Intel core 2 duo
    - Safari Version 3.2.1 (5525.27.1)
    - JVM 1.5.0_16 from Apple
    Steps to reproduce the problem:
    Launch Safari.
    In (first) page/tab go to
    http://www.javatester.org/version.html
    (this uses a non signed applet)
    Open a second tab. Here go to:
    http://ukapi.phonefromhere.com/talk/vtop2.xsql?key=01612884242
    This is a signed applet that will ring our office over VoIP.
    Click the "Trust" button (signed by PhoneFromHere).
    As long as this applet isn't cached by the JVM this will work, so
    the first time you will succeed.
    Now Quit Safari (not "just" close all Safari windows, but a "real" quit) and repeat the exercise.
    The second (and next) time this will fail (only if the signed applet is loaded as second, so the order is important)! This keeps failing until I go (back) to the Java Preference window (via Finder) and explicitly delete the cached files.
    The URL will work when loaded first (cached or not).
    Some diagnostics, that might help:
    I configured the Java Preference window to "enable Logging, Tracing and Show applet livecycle exceptions".
    When the applet fails to load (and Safari freezes/hangs), the last few records of the plugin150.log are:
    <message>basic: Loading http://ukapi.phonefromhere.com/talk/lib/pfh.jar from cache
    <message>basic: Reading cached JAR file from JRE 1.5 release
    <message>basic: Certificates for http://ukapi.phonefromhere.com/talk/lib/pfh.jar is read from JAR cache
    <message>security: Loading certificates from Deployment session certificate store
    <message>security: Loaded certificates from Deployment session certificate store
    <message>security: Checking if certificate is in Deployment session certificate store
    (and then nothing)
    whereas when it succeeds to load, as soon as I click the "Trust" button, it's say:
    <message>security: User has granted the priviledges to the code for this session only
    The Report is a bit too long to port, I'll include the same text above when sending it.
    Model: PowerMac7,2, BootROM 5.1.3f0, 2 processors, PowerPC 970 (2.2), 1.8 GHz, 2 GB
    To cut a long story short? Is this a know bug (I couldn't find anything, but you never know)? Does anyone have any ideas how to fix this?
    Thanks, Birgit

    I have the same issue now after downgrading my Flash plugin. I downgraded from 10 to 9 latest because I like using Camino and for some reason Flash 10 doesn't play nice with Camino. But all of a sudden as I use Camino 2b2 for everyday and Safari 3.2 for banking and such, the browser hangs requiring a forced quit when I close it. I've re-installed the browser twice now with all the previous folders, and preferences erased and caches emptied. I even when to re-installing 10.5.6 and it still crashes, it's odd. Maybe 10.5.7 will address this.

  • We want to update our second iPhone 4 on one single iMac, but are afraid that the data of the 1st phone will be overwritten when syncing.

    We want to update our second iPhone 4 on one single iMac, but are afraid that the data of the 1st phone will be overwritten when syncing the 2nd phone. What to do?

    Create a separate user account for the second phone. See http://support.apple.com/kb/HT1495 (and http://support.apple.com/kb/HT2542).

  • Closing the Second instance of the browser.

    Hello,
    I am working on a project written in Java. When applet is running in Browser, we can open the new instance of the browser using File->window->new (or pressing CTR-N). Since the second window runns in the context of first window, It is causing some problem.
    Is there any way for me to close the second instance of the browser from my Java applet?? If not is there any way for me to disable both the File->new->Window and CTR-N options.
    I am new to java and java script. If it is not possible in Java Applet, is it possible in java Script. Please Provide me with full information.
    Thanks and Regards,
    Ratna.

    Hi,
    There is no way you can close the browser window that the user opens. Even if there is a way through some hack, it will not completely give u a solution, independant of browsers and all. And moreover it is not advisable to restrict the user like that.
    A more elegant way would be to handle it in the server side. I can give u one ligical way. U can make the page expire as soon as it gets loaded. U can do that by using the code below. And you have to have a server side function to check for a request from the same client machine for the same page.
    <%
        if (request.getProtocol().compareTo("HTTP/1.0") == 0)
            response.setHeader("Pragma", "no-cache");
        else if (request.getProtocol().compareTo("HTTP/1.1") == 0)
            response.setHeader("Cache-Control", "no-cache");
        response.setHeader("Expires", "-1");
    %>So when the user opens a new browser window, he will be shown page expired message, or the page will be requested again from the server. U can have a map storing the remote address and the session of the user.

  • Can I install a second instance of i-Calender on the server where right now is running the first instance? How?

    The first instance is running on a Sun R420 Enterprise
    server. The second instance will run in the same server.

    When you say "Authorized"  you mean in the sense of Itunes Store Authorized? if so the system in Question is authorized it is my primary Workstation and was waiting until iCloud came out to update to Lion. My MBP , and 2006 MP are all running Lion and are part of the 5 systems "authorized". I did not run into this issue with either the MBP or the MP when i installed and I bought two copies at the same time on my the first day Lion was available.
    Do you know the mechanism with which the App Store tracks purchases on different computers prior to iCloud coming out?
    once again thanks for your response
    chris meredith

  • Create a second instance by DBCA

    I have a simple RHEL3 box with 1 G memory, I had used the DBCA to install a database, 10g r2, on it. How can I use the DBCA to create a second instance on the same DB? Someone´s thread said it can, But when I run the dbca, there is no place I can pick to create second instance, all I have is to create another database and next. My oracle was 10g r2 (10.2.0.1) SE1 version downloaded from Oracle. Is a problem with my original download copy or setup of the dbca? Thx.
    Chi

    Thanks Kuljeet. I think I missed that part of fundamentals. So how about the second schema vs second instance? Some users said that the second instance will need more overhead for oracle structure. and many experienced users said that second schema on the same instance is bad idea. The reason I want is to separate the test part of the database operation to a second environment (not sure it is a good word). So the management of Oracle will be simpler. My 10g r2 is part of BAAN erp application, BAAN uses Oracle as a data/index storage only, Most of the processes is around running SELECT, UPDATE and INSERT sql (developed from BAAN´s 4G script). No procedure, no function, no trigger or any other involved. However, during the set-up of the BAAN, contractor created a test set of database, then repeated the data/index tables to a prod set. So that our BAAN users can test some processes and move that processes to prod.

  • Cannot start second instance of collector

    Hi everyone
    I've got a strange one here. A workstation I noticed that wasn't scanned since 6 months (WinXP SP3, ZCM 10.3.1).
    When I check the ZAA windows, it says Last Scanned i.e. today, Last Upload June 2.
    I've found several errors 'Cannot start second instance of collector' in the local colw32.log.
    However, the workstation gets rebooted daily and I can't find another instance of colw32.exe running in TaskManager.
    How can I resolve this? I can't tell how many clients are affected. However, I've got almost 300 clients (15%) that haven't been scanned in the last 180 days...
    Thanks
    Roland

    Originally Posted by rpfenninger
    Hi everyone
    I've got a strange one here. A workstation I noticed that wasn't scanned since 6 months (WinXP SP3, ZCM 10.3.1).
    When I check the ZAA windows, it says Last Scanned i.e. today, Last Upload June 2.
    I've found several errors 'Cannot start second instance of collector' in the local colw32.log.
    However, the workstation gets rebooted daily and I can't find another instance of colw32.exe running in TaskManager.
    How can I resolve this? I can't tell how many clients are affected. However, I've got almost 300 clients (15%) that haven't been scanned in the last 180 days...
    Thanks
    Roland
    We had similar issue, inventory was never uploaded to server. To solve it we had to manually do a "Scan Now" from Zenworks agent -> Show properties -> Inventory -> Scan Now, after we did that once on the workstation then scheduled scans started to upload again.
    I guess it would probably also work if you do a Inventory scan from quick tasks in ZCC but I never tried it so I'm not sure.
    Thomas

  • Installing second instance of directory in common root.

    Is it possible to install a second instance of a directory server in a
    common base directory?
    For example:
    /user/netscape/server4/slapd-first-server
    /user/netscape/server4/slapd-second-server
    I'm using the iAS 6.0 installer. I've installed the first instance with all
    components. When I try to install a 2nd instance providing a base directory
    of /user/netscape/server4 it doesn't let me install the 2nd instance.
    Thanks in advance,
    Rodger...

    Rodger,
    I am sorry for being dense, but would a second instance be a configuration
    where you are running 2 servers on the same machine on different ports for
    instance (389 and 400 for example) but they access the same base database? I am
    looking at how to do that and would like to know.
    thanks,
    Gary
    [email protected]
    Rodger Ball wrote:
    Is it possible to install a second instance of a directory server in a
    common base directory?
    For example:
    /user/netscape/server4/slapd-first-server
    /user/netscape/server4/slapd-second-server
    I'm using the iAS 6.0 installer. I've installed the first instance with all
    components. When I try to install a 2nd instance providing a base directory
    of /user/netscape/server4 it doesn't let me install the 2nd instance.
    Thanks in advance,
    Rodger...

  • Application lags, until second Instance is started - AND no lagging on another machine...

    Hey, it's me again:
    The last days I started to get along with LabWindows quite well, and my program grew very fast, but today I found a probleme, I do not really know how to handle.
    When I compile my program (both in "debug" and "release"-mode), and start it, it lags quite a lot, but the another version, I still had from friday and did NOT lag that day, started to lag too. So there must be any problem with maybe the configuration or whatever.
    But the weirdest thing:
    When I first start one Version (does not matter which one), and than afterwards start another Instance of it, or a complete other Version (maybe one Version of Friday, and on I just compiled), the second Application (which lags when being started alone), does NOT lag at all.
    In addition to that, all Versions do NOT lag, when I start them on a little netbook, where they're supposed to be used anyway.
    Sumarizing:
    1 Instance --> lagging
    2 Instances --> first lags, second doesn't
    This whole thing is very frustrating
    I hope, some of you may know what to do!
    Greetings from Lübeck
    Mathias

    MacMatze:
    Glad you found the problem.  You don't need to be embarrassed by it, but you should learn from it.  It sounds like you need to do some error handling, and should probably do some status reporting.  Here are a couple of suggestions.
    1. To troubleshoot a "lagging" problem, you could single-step through your code to see which statement takes longer than you expect.
    2. If the problem was that a power supply was unplugged, it was still unplugged when you started your second instance of the program.  I'd guess you didn't see the lag on the second instance because one or more errors were generated because some resource (maybe like a COM port) was already tied up by the first instance.  Since you didn't mention getting error when you started your second instance, I'd guess that you are ignoring errors that you should be handling.  Many functions indicate errors in their return variables.  Review your code for functions whose return variables you are ignoring.  Handle them as needed, even if it's just with a dialog box.
    3. "Of course" your supply will always be plugged in?  Have you heard of Murphy's Law?  If it was unplugged for you, it might be unplugged for another user.  Or the fuse may blow or the power supply may die.  You should find a way to detect and report conditions like that, so your user isn't wondering why the program isn't starting.
    4. If you have multiple steps in your program or hardware initialization, you could put up a status bar with messages indicating the current operation, so if the program appears to hang, at least the user has some idea on what the program is trying to do.

  • Can't forward request from Apache to Tomcat on second instance

    Hi,
    I am trying to create 2 separate environments (dev and test) on one powerful
    Unix server which has 2 network cards, 2 IP addresses, 2 server names...
    Using Apache 2.0.43 and Tomcat 4.1.29/JBoss 3.0.7, mod_jk 2.0.43
    on Solaris 9, Intranet environment.
    Everything is fine on the first instance,
    but on the second instance when I do http://server2,
    Apache still can't redirect to second Tomcat/JBoss:
    "Forbidden
    You don't have permission to access / on this server.
    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
    Apache/2.0.48 (Unix) mod_jk2/2.0.2 Server at mopppgctxat1.pfizer.com Port 80"
    If I do http://server2:8080, getting it all right.
    I made all internal ports on the second instance different from the first:
    e.g. 8080->8180, 8009->8109, etc.
    Even tried to change "Listen <ip2>:80" to 81, same error.
    Curiously, jk2.properties is totally commented out.
    I haven't compiled mod_jk, just copied the binary from the 1st instance.
    Can that be a problem ?
    Any help is very appreciated.
    Thank you,
    Oleg.

    By trying and trying I got it to work .... long hours
    I removed the queue to queue option and the subscriber name from the subscriptions definition. And then I removed the destination-queue on the propagation schedule. Then it worked.
    Mette

  • Do manually entered metadata become lost/overwritten when transferring my library to a new external hd?

    will manually entered/adjusted album and song metadata become lost/overwritten when i transfer my itunes library to a new external hd?... assuming that i follow apple protocal for the procedure?  i'm nervous about losing all those minute adjustments i have made over time to my library's music!
    any assurance would be GREATLY appreciated! 
    cheers

    If you follow Apple protocol to the tee you should be fine...that being said, I've never had a perfect experience when moving my library. I recently followed this: http://support.apple.com/kb/ht1449 and for the most part the outcome was exactly I had hoped for. In my case, I moved about 80,000 pieces of music from one external HD to a second external HD. I did it all from within iTunes and everything seemed to work. When I compared my source and destination folders however, there were about a thousand files that didn't show up on the destination disk.
    The files that didn't come across weren't recognized by iTunes, even though they were MP3 files. After some research I learned that iTunes is particular about certain tags that it doesn't like. I'm still working on the issue and actually have an open question on it which I wrote yesterday if you care to see.
    I don't know if I was that much help but I will say that by following the instructions referenced above, I had a very good transition considering the number of files involved.
    Good luck,
    JB

  • OBIEE 10g: Presentation Cache in Second Instance of Presentation Server

    Hi everyone,
    I've been having an issue with my presentation cache disappearing every couple of minutes.
    I'm working with OBIEE 10.1.3.4, on Oracle Application Server on a Linux RHEL 5.4 32bit. I've spun up a second instance of the presentation service using the commands from RNM1978's blog here (http://rnm1978.wordpress.com/2009/08/25/multiple-rpds-on-one-server-part-2-presentation-services/). The reason why I have a second instance of the presentation service is for mobile reporting purposes. We have lots of executives using iPhones and the Oracle Business Intelligence Indicators application. The second instance defaults all charts to be PNGs, it also uses a separate, clean catalog, so that the executives don't get lost in all of the out of the box BI Applications content that is in our main catalog.
    Everything is setup and working properly, both presentation services are accessible and use the same RPD but different catalogs. The only thing that isn't working is the presentation service cache. A lot of these reports are QTD or YTD so it takes a few minutes to run some. We were hoping to use iBots to create BI Server cache at the beginning of the day. That seemed to help a bit but it seems to clear after a few minutes.
    Additionally, before we went to do demos to end users, we would run all the reports from a demo iPhone. Go to do the demo and within five minutes, the presentation cache would have already cleared. I confirmed the same by looking in the Session Manager of the second presentation service.
    Does anyone know why this would be happening? I have cache turned on in the bi server and I also have the following settings in my instanceconfigMobile.XML:
    <Cache>
    <Query>
    <CacheMaxEntries>1000</CacheMaxEntries>
    <CacheMaxExpireMinutes>720</CacheMaxExpireMinutes>
    <CacheMinExpireMinutes>720</CacheMinExpireMinutes>
    <CacheMinUserExpireMinutes>720</CacheMinUserExpireMinutes>
    </Query>
    </Cache>
    Are there other settings I need to investigate?
    Is this just additional commands I need to run when launching the additional presentation service? Here's the command I'm using:
    . ./common.sh
    . ./sa-init.sh
    sawserver -c /home/oracle/OracleBIData/web/config/instanceconfigMobile.xml >> /home/oracle/OracleBIData/web/log/sawserverMobile.out.log 2>&1 &
    Thanks!
    -=Joe

    Hi Joe
    I can't say I've tried Robin's technique to run two presentation servers but from my basic understanding of it, both versions will share the same cache as defined in a single nqsconfig.ini file. Maybe these 2 are conflicting somehow?
    I see that a separate instanceconfig.xml is used for each presentation server. I know there are a bunch of advanced, largely undocumented, cache properties you can set in there. I can send you a document listing the various properties if you want to play with it - contact me via my website.
    Paul
    http://total-bi.com

  • Creating objects in a second instance

    I have created a second instance through the console of a directory server, which has been configured with the same rootdn as the original.
    When I open up the console why in the new instance does it show the rootdn on the config tab but the original doesnt ......
    also ....
    why when i go into the second instance i try creating data objects for root suffixes ive created to mirror the original instance, does it create them under cn=config ......
    Thanks
    G

    Hi
    I have read that creating objects in a loop degrades
    performance. Can someone explain why this should be
    so?Every object creation takes time, so if you create
    lot of unnecessary temporary items in loop it degrades
    performance (so it is nothing loop specific).

  • Second instance installation SGA question

    Hi Everybody,
    I have an Oracle 10g Database installed on a Solaris Server and the SGA of the Database is 3.9 GB. The Solaris System has 4 GB RAM.
    Now I want to install another instance on the Solaris Server. How is it with the SGA? How much SGA can I give to the new instance and is there a problem when the two SGAs of the Instances have more than the 4 GB of the Solaris system (e.g. 3.9 (first instance) + 3.9 (second instance) ). The plan is that both instances will run at the same time.
    Thanks for any answer.
    Regards DocX

    The first instance was installed by a third person and it seems that it calculates > the memory automatically because Shared, Large Pool and Buffer Cache are
    shown as 0 and only the total SGA is shown as 3.9 GB.That means SGA autotuning is turned on, responsible parameter is SGA_TARGET (not SGA_MAX_SIZE). Often SGA_MAX_SIZE is not set, but derived from the sum of all memory structures or - if set - SGA_TARGET.
    SGA_TARGET is dynamically modifiable (alter system set ...), while the database is open, but SGA_MAX_SIZE is not.
    Because of its swapping/paging facilities the machine can handle more memory than available as physical RAM, but becomes slow. Oracle may show something like 'not enough memory', when you try to start the instance.
    so Oracle does not handle the memory automatically like giving each instance only 2 GB physically memory although both have a SGA of 3.9 GBThere is no 'cross-instance' memory maintenance between Oracle instances.
    Werner

  • BIP 11g Enterprise - Need second instance of bip server

    we are short of boxes and instead of deploying a full vm just for a second instance, I was thinking of setting up a second instance of bip under the web logic. However, when I try to clone the existing bip managed server, the system is adding it a as a node in the same cluster. That is not good because I am not doing load balancing.
    I need a complete second instance with its own ports but managed under same web logic server. Any guidance would be appreciated?
    D

    Hi Joe
    I can't say I've tried Robin's technique to run two presentation servers but from my basic understanding of it, both versions will share the same cache as defined in a single nqsconfig.ini file. Maybe these 2 are conflicting somehow?
    I see that a separate instanceconfig.xml is used for each presentation server. I know there are a bunch of advanced, largely undocumented, cache properties you can set in there. I can send you a document listing the various properties if you want to play with it - contact me via my website.
    Paul
    http://total-bi.com

Maybe you are looking for