Multiple Applet Instances

Hi.
I'm writing an asp application that reports on performance indicators.
When you click on an item in the report, a window opens to an asp page that interrogates a database for historical data on the selected indicator, passes the results to the client via hidden fields, and the client converts this data into X/Y coordinates that are then passed to an applet that draws a graph. Trouble is, when several instances of the graph window are opened they get overlaid on to each other and when you bring focus back to an overlaid graph, the graph gets re-drawn with the results of the most recent instance of the graph class (I hope my terminology is correct here!) not the instance that it created when it was first opened. The end result is that every instance of the graph window that looses then regains visibility shows the same graph.
Unexpected!
I don't have enough Java (yet) to know where to look for a solution, can someone shove me in the right direction?
Thanks.
Neil.

There are only 3 ways I can think of for that to happen.
1. Your graph applet is querying the db on its own somehow, and when it refreshes, it gets the data from the last query
2. Your web browser (ie?) gets confused, reloads, and again, you get the new data from the db
3. Web browser somehow gets its applet cache screwed up and displays the wrong one

Similar Messages

  • Tracking applet instances

    I have an applet, and I want to support multiple instances of the applet running in the same browser.
    This is easy: just make sure that the applet object is encapsulated properly - no ugly globals which aren't shareable.
    However, the applet needs to use classes which create Threads and then perform callbacks into the main applet code. These callbacks are unfortunately static methods, even though the different applet instances need to handle them differently. The obvious solution would be to modify these classes, but they are binary only.
    I had this working for Netscape 4 and Internet Explorer using Microsoft's JVM, by calling...
    Thread.currentThread ().getThreadGroup ()...and maintaining a table mapping this object reference to a context object which could contain the information needed by the callback routine. This works because both JVMs create a separate ThreadGroup for each applet instance.
    Sadly, it seems the Sun Java Plugin used by Netscape 6, most other browsers, and increasingly many installations of IE, puts all applet threads in the same thread group, no matter which applet instance they belong to.
    Have a look at http://www.omniconsumerproducts.com/~martin/applet_test/test.html to see the problem. The source is in the same directory on the server.
    Does anyone have any other solutions? I need to be able to get something globally that is unique to an Applet instance. I tried ClassLoader but all the browsers I tried use the same ClassLoader for different instances of the same applet. (Except for Netscape 4 if you shift-reload, but that's another story.)
    The optimal solution would be if Applets could create their own child ThreadGroups, but they can't for security reasons (even though child ThreadGroups inherit all the restrictions of the parent).
    Any ideas?
    Martin

    Are the threads created by the library doing anything time consuming? If not, then you can make sure that the library function that create the threads will not be called before the previous thread created by the function ends. Here is some pseudo code to show the idea. Since this is a design hack, it may not fit in your case though.
    I tested the Mutex class, so the remaining code may have some error. Howerver, it should make the idea clear.
    Lets assume you call a library function with two Object argument and the library calls back a static method someCallBackMethod in a new thread.
    from your applet Foo you will do something like this,
    class Foo extends Applet {
    static LibraryAdapter la = new LibraryAdapter();
    public void someMethod() {
    la.call(this, someObject1, someObject2)
    public static someCallBackMethod() {
    Foo foo = la.getActive()
    foo.doneWithActive();
    }//Foo ends
    class LibraryAdapter implements Runnable {
    Queue queue = some thread safe queue implementation
    private Mutex fetch = new Mutex();
    private Mutex queueMutex = new Mutex();
    public LibraryAdapter() {
    new Thread(this).start();
    public void call(Foo caller, Object arg1, Object arg2) {
    queue.enqueue(new InvokationData(caller, arg1, arg2));
    queueMutex.notifyX();
    public Foo getActive() {
    return queue.front().caller;
    public void doneWithActive() {
    queue.dequeue();
    fetch.notifyX();
    private class InvokationData{
    Foo caller;
    Object arg1;
    Object arg2;
    ... constructor
    public void run() {
    while(true) {
    fetch.waitX();
    queueMutex.waitX();
    InvokationData data = (InvocationData)queue.front()
    ... interact with library with data
    }//main loop ends
    }//run ends
    }//top level class ends
    public class Mutex{
    private Object m = new Object();
    private int wtc = 0;//waiting notify call counter
    private int encc = 0;//extra notify call counter
    public void waitX() throws InterruptedException{
    synchronized(m){
    if(encc > 0){
    encc--;
    }else {
    wtc++;
    try{
    m.wait();
    }catch(InterruptedException ex){
    wtc--;
    throw ex;
    }//else ends
    }//sync ends
    }//waitX() ends
    public void notifyX() {
    synchronized(m){
    if(wtc == 0){
    encc++;
    }else{
    m.notify();
    wtc--;
    }//sync ends
    }//notifX ends
    }//Mutex ends

  • Package with multiple applets

    Hi
    I want to install 2 applets on real java card. They both are in the same package and cna use each other.
    How can i do this on JCOP ?
    and what if they are on difference packages and what if i am using some other lib as well ? do i need to install that lib too if yes then how ?
    BR
    Umer

    If your packages and applets are in one JCOP Java Card project, this should be handled for you. You can have multiple applets in a package, you can have multiple instances of a single applet, and you can have multiple packages with multiple applets as well as library packages.
    If you want to access an applet from another applet in the same package, it is like referencing any other class instance. If they are in different packages you need to use shareable objects. This is because of the applet firewall.
    Cheers
    Shane

  • Can there be multiple ASM instances on single node?

    Hi,
    Can there be multiple ASM instances on single node?
    This one says No : http://www.freelists.org/archives/oracle-l/02-2008/msg00317.html
    And This one says Yes : http://www.databasejournal.com/features/oracle/article.php/3571371
    Thanks in advance.
    Thanks,
    Harsha
    Edited by: user498756 on Sep 11, 2008 2:23 AM

    ...that document doesnt say you cannot have multiple ASM instances on a node. It says "...ASM, +you only need one ASM+ instance for that computer, to manage the two database instances that use ASM."
    The fact that you only need one - and I cannot think of a good reason to have more than one - does not preclude the fact that you do seem to be able to have multiple ASM instances on a single node, each looking after its own set of disks and diskgroups.
    Again - I cannot think of a good reason to do so though!
    -Bob

  • How To Install Multiple OBIEE Instances On One Linux Machine

    Hi,
    OS: Red Hat ES 5.2
    OBIEE : 10.1.3.4
    We one development server(Linux) where one OBIEE 10.1.3.4 was installed with os user as 'ora1a' (Deployed on Oracle Application Server 10.1.3.4)
    and now I have installed OBIEE 10.1.3.4 on same Linux Server with different user(ora2b) and different mount point (Deployed on Another Oracle Application Server 10.1.3.4 )
    But My OBIEE was not working and I came to know that only one can be working by default.
    After following few notes i have update NQSConfig.inc and odbc.ini with different ports ie from 9704 to 9725 and bounced BI server and presentation server
    But still its not working can any one tell me what are all needs to update to make it work
    Thanks in advance
    Regards,
    Bhanu Chander
    Reference's i used: HOW TO: Install Multiple OBIEE Instances On One UNIX Machine          (Doc ID 605582.1)

    Hi
    I was not much clear about what you are telling
    See my first OBIEE instance URL is http://hostname18.oracle.com:7777/analytics (As i deployed OBIEE on Application server 10g(OAS1))
    and second one is http://hostname18.oracle.com:7778/analytics (As i deployed OBIEE on another Application server 10g(OAS2))
    Also My port for first OBIEE instance is 9704 and second one is 9725(Which i changed to this)
    Now tell me what are all i should update
    Thanks,
    Bhanu Chander

  • How Can I Use Multiple Weblogic Instances in a Single OS

    Hello Everyone,
    Actually I have to install Some different applications. Few of them need weblogic 10.3.6 and others need 10.3.4. The OS am using is Oracle  Enterprise Linux 5.
    Now I am able to install 2 separate(One of 10.3.4 and 10.3.6) instances with two different users,In two different directories.
    I have installed the weblogic 10.3.6 version with a user webadmin and installed node manager with port 5556. This is working fine.
    The main problem here is :
    In the second instance (10.3.4 ) installed with a a different user and gave the port number to NodeManager as 1600 and its not getting started. Its throwing error and also after some errors in the terminal am able to see that its reverting to port number 5556 only.
    What might be the issue?
    I have to install 2 different versions of weblogic in a single Server. But am failing with NodeManager. What Can I do to have multiple weblogic instances with multiple versions in a single server ?
    Can anyone suggest a resolution for this please ?
    Thanks in advance.

    Pl do not spam these forums with multiple posts - How Can I Use Multiple Weblogic Instances in a Single OS

  • Multiple Tomcat instances on the same server

    Can we have multiple tomcat instances load balanced on the same physical box without VM. Has there been any such implementations. How can CMS be distributed across. What can the know architecture for the same.
    Regards
    Vijsy

    This can be done, but it really depends on the load balancer you use.
    There is no recommendation from BusinessObjects and you might want to consult the load balancer vendor for instructions and support.
    Regards
    Caroline

  • Multiple Portal instances on the same machine

    Hi  Forum,
    we have a requirement where in we are asked to implement multiple instances of Portal on the same machine. can you please give me some detials on Feasibility , issues and limitations of having multiple Portal instances on the same machine , different instances pointing to different tiers(Dev, Test, Production) etc
    pointers will be highly appreciated..
    regards,
    uday

    Hi Uday,
       Please look at this.
    Multiple Portal Instances - Virtual Hosting
    Regards,
    Siva
    P.S: Award points if you find this useful.

  • One Oracle Application Server and multiple OC4J Instances

    While we are getting new server (for development) we have to set-up a Development and Production enviroment for our project (dont have previous OAS installation) but on the same machine.
    So, is a good option to have One OAS INstallation (Ora Home) and then create multiple OC4J instances, one for each environment (Development, QA and Production)?, is it possible? How to manage deployments between OC4J instances, simulating different contexts if they are in the same server and under the same HTTP Server? Will be there conflicts?

    Hi,
    you can do this and OracleAs will manage the different instances. The deployment can be done with Enterprise Manager in which case you select the OC4J instance first before deploying. If deploying from JDeveloper, you can specify the OC4J instance when creating the named connection
    Frank

  • Need to get data from multiple database instances in a single query

    Hi,
    I need a small favour from you guys. The prob is as follows:
    I need to get name, row_id from table A from schema 1 and gbu_name, name from table B from schema 2 where a.name = b.name. I wrote the query in the following manner:
    SELECT a.name, a.row_id, b.gbu_name
    FROM Schema1.A as a, Schema2.B as b
    Where a.name = b.name
    But this query is not working and the error is like " The table does not exists".
    Please update me how to avoid the error and get the right sort of result.
    Thanks & Regards,
    Debabrata

    Ah, youre actually asking different things.
    In your topic title, you say youre running separate instances
    In your body text, you say you are under different user/schema
    So tell me, do you have more than one database or not? How many entries in your TNS file?
    I would say, for "multiple database instances"
    SELECT
      a.id, b.id
    FROM
      tableA a
      INNER JOIN
      tableB@OTHER_DATABASE_LINK_NAME b  <--NOTE!
      USING(id)And of course you will have to look up CREATE PUBLIC DATABASE LINK sql..
    Message was edited by:
    charred

  • Multiple AIA instances on same Linux box

    H,
    Can multiple SOA instances be deployed on same linux box then with AIA on top of it.
    Can some one pls answer this?
    Regards,
    Rakesh

    Yes you can but:
    Each SOA installation must be in his own ORACLE_HOME directory.
    Each AIA installation must be in his own ORACLE_HOME directory.
    You must point to different databases. You can not have mulitple SOA schema's in one sinlge database.
    Marc
    http://orasoa.blogspot.com

  • Multiple AIA instances on same server?

    Hi,
    Does anyone know how to install multiple AIA instances on the same SOA server? The installer hints that this might be possible, although I have not seen how this is done because the installer expects an empty oracle home path. The only information I have found so far is for an earlier 2.x release of AIA and that suggested:
    "Each SOA installation must be in his own ORACLE_HOME directory.
    Each AIA installation must be in his own ORACLE_HOME directory.
    You must point to different databases. You can not have mulitple SOA schema's in one sinlge database."
    Is this true?
    Thanks,
    Kev.

    957354 wrote:
    Hi Laxman,
    If its a testing purpose its ok to have a one oracle_home and single listener for multiple DB. One problem when applying oracle patches for one of the instances running in a multiple DB running then you need to bring all the DB running in that host since the oracle_home is sharing between all db instances.
    Thanks
    Sunil Rajesh K.C.Starting with 11g, patchset updates are full installs and done into a new home. This makes it possible to migrate one instance at a time. However, your point would be a consideration for one-off patches like CPUs.
    However, please note ... OP --- PLEASE NOTE even with multiple oracle homes, you still only need a single listener.

  • Multiple DMVPN Instances on Same WAN Interface

    Hi Folks,
    Is it possible to run Multiple DMVPN Instances on a single WAN Interface ? Can we for example configure 3 Tunnels on a Router using one same WAN Interface but running separate EIGRP Instances for each Tunnel ? Kindly let me know , Alioune

    Hi Alioune,
    Yes you can create DMVPN as you said with one WAN interface that is possible..... you can have multiple tunnel interfaces pointed to a WAN interface as the source interface which resides in public zone..... with different public ip's as the destination tunnel...
    interface Tunnel1
    description ** A-VPN Tunnel **
    bandwidth 100000
    ip vrf forwarding red
    ip address 10.0.252.2 255.255.255.252
    no ip redirects
    no ip unreachables
    no ip proxy-arp
    ip mtu 1500
    load-interval 60
    tunnel source GigabitEthernet0/0 (WAN Interface)
    tunnel destination  1.1.1.1
    tunnel protection ipsec profile dmvpn
    interface Tunnel1
    description ** B-VPN Tunnel **
    bandwidth 100000
    ip vrf forwarding red
    ip address 10.0.252.5 255.255.255.252
    no ip redirects
    no ip unreachables
    no ip proxy-arp
    ip mtu 1500
    load-interval 60
    tunnel source GigabitEthernet0/0 (WAN Interface)
    tunnel destination  2.1.1.1
    tunnel protection ipsec profile dmvpn
    like the above..... shown sample...
    Please rate if the given information helps!!!

  • Multiple Database Instances on Single Server and effect of NLS_LANG

    What is the effect of the NLS_LANG registry setting on a Windows server that is to host multiple database instance each created with a different database character set ? The server needs to support data in the following languages : Thai, Chinese Traditional, Chinese Simplified, Vietnamese and Korean. Selecting the Unicode character set(AL32UTF8) is not an option since the application is not Unicode complaint.
    My understanding is that as long as NLS_LANG is set correctly on the client connecting to the particular database instance then the data will be stored correctly - is this correct ?
    What should NLS_LANG be set to on the server if there are multiple oracle instances with different character sets ?

    My question is not in relation to connecting to the database on the server itself but with regards to client connections. What I need to know is what is the effect of the NLS_LANG setting in the registry on a server that has multiple databases each created with a different character set ?
    Say for instance, the server has two databases - one created with the character set ZHS16GBK and the other created with the character set JA16SJIS and NLS_LANG is set to SIMPLIFIED CHINESE_CHINA.ZHS16GBK in the registry on the server. Will Japanese data that is inserted into the database that has character set JA16SJIS be stored correctly when it is inserted from a client with NLS_LANG set to JAPANESE_JAPAN.JA16SJIS even though NLS_LANG is set to SIMPLIFIED CHINESE_CHINA.ZHS16GBK on the server ?

  • Multiple ASM instances on a single node

    Can i have multiple ASM instances on a single node? This is to have each instance supporting different environment dev,stage etc
    Thanks
    Sannidhi

    I had been discussing the same issue with someone from Oracle. I asked for multiple ASMs on a server so that we could have seperate ASMs running for, say, 10g and 11g.
    He explained that we should think of ASM as being the same as Veritas FileSystem. We don't run multiple instances of Veritas on our servers. On single Veritas "instance" (set of drivers) provides all the Veritas Fx mountpoints on the server. Similarly, there should be only 1 ASM instance on a server.
    (substitute UFS or ZFS or CFS for Veritas in the above example and you still have only 1 filesystem manager on a server providing one type of filesystem, although you could have, say , UFS and Veritas co-exist ; just as you could have Veritas, ASM and Raw co-exist on a server).
    Hemant K Chitale
    Edited by: Hemant K Chitale on Sep 29, 2009 11:50 AM

Maybe you are looking for