FORALL context switching .. how it works ?

hi guys,
in the asktom link over here
<u>http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:17483288166654#17514276298239 </u>
it was said that
<i>
forall i in 1 .. z_tab.count
insert
does this:
a) gather up inpus to insert (the entire z_tab)
b) perform context switch from PLSQL to SQL
c) execute insert N-times
d) perform context switch back from SQL to PLSQL
</i>
my question is does FORALL statement loops ?
does it do this ?
<b>Example 1</b>
loop 1
gather data to insert
loop 2
gather data to insert
loop 3
gather data to insert
loop finish
context switch to sql engine
perform insert 1 by 1
or
<b>Example 2</b>
loop 1 or no loop at all
gather all data required for insert
loop finish
context switch to sql engine
perform insert 1 by 1
my guess is example 1 is the correct answer
Advices gurus ?
Regards,
Noob

At what level are you asking the question?
In the context of PL/SQL, there is no loop. But if you pull back the layers and look at the intermediate language the procedure is compiled into, how the PL/SQL VM happens to implement those intermediate language instructions, how Oracle's C code happens to implement the VM, etc. it wouldn't shock me if there was some sort of loop-like construct in at least some level in some version of Oracle in some situation. Particularly depending on what you want to count as a loop at that level (somewhere in the SQL engine's C code, for example, Oracle might well have a loop when you're doing a full table scan, though it's probably not particularly useful to talk about a full table scan being in a loop)
In addition, why are you asking the question? I cannot envision a functionality or performance difference between the two approaches, so it doesn't seem like something that would have any influence on how you use a particular PL/SQL construct.
Justin

Similar Messages

  • Dynamicall​y-Launched VIs and Context Switching

    I'm working on a project that dynamically calls instances of a reentrant VI, which I assume is a pretty common practice. Everything works pretty well, until the number of calls to this dynamic VI gets pretty large--on the order of 1000 or more--at which point, we begin to see performance degradation. My guess is that we are taking hits due to context switching, since the number of threads far exceeds the number of logical processor cores available.
    A little more background:
    The dynamic VIs being called effectively run as daemons, each running a while loop and waiting on a dedicated input queue to receive data and save it to disk. All are stopped via a globally shared stop notifier (passed as a ControlValue.Set method argument at launch). Each is waiting on its respective queue with a 1 second timeout so that the stop notifier can be polled. Under normal operating conditions, each one will run at some rate between 0.1Hz and 25Hz (the various rates are a large driving factor for separating them and needing to spawn them dynamically).
    So, this leads me to the following questions:
    Am I correct that the context switching is the likely culprit in the performance degradation?
    If so, is there a fundamental difference in how LabVIEW handles multithreading with dynamic VI calls versus explicitly drawing separate while loops on a block diagram, or dropping multiple instances of a reentrant VI directly on the block diagram?
    Is it likely that reducing the number of dynamic clones to equal the number of available processor cores would improve performance? (the scope of each clone would grow, as it would have to maintain the state information that was original distributed across multiple clones)
    I realize that this question is pretty vague without concrete examples, but I'm hoping someone (AQ? Ben? Any of you NI gurus?) out there could provide some general insight into what's going on under the hood without needing to get too specific.

    TurboPhil wrote:
    Each is waiting on its respective queue with a 1 second timeout so that the stop notifier can be polled.
    There is one relatively easy fix you can probably make here - set the timeout to -1 and destroy the queues to stop the loop (destroying the queue will output an error from the wait primitive). This should at least stop all the code from running all the time, although I'm still not sure how the threading of the different VIs will play with each other. This might be an issue if the queue is only created in the VI, but I'm assuming it isn't.
    Try to take over the world!

  • [TeX Live] Unable to get ConTeXt (Mark IV) to work

    I would like to try out ConTeXt, but I can't get it to work. Trying to run "context my-small-test-file.tex" or "context --version" (or anything else I can think of) results in the following error message:
        mtxrun          | unknown script 'context.lua' or 'mtx-context.lua'
    The TeX Live wiki page says "The ConTeXt formats (for MKII and MKIV) are not automatically generated upon installation. See the ConTeXT wiki for instructions on how to do this." I've searched, but I haven't been able to find any helpful info in the ConTeXt wiki. For example, here it is suggested to run "context --make cont-en" to generate a format file, but this gives the same error message as above. Trying texconfig is no good either; it says "texconfig formats is no longer supported, because manual edits of fmtutil.cnf will be overwritten by the new TeX Live package manager, tlmgr, which regenerates that file as needed upon package changes. Thus, to add or remove formats, the recommended method is to use tlmgr to add or remove the appropriate package." But I don't know how tlmgr works, and anyway I'm reluctant to use anything that might interfere with pacman.
    No luck googling either... Suggestions, anyone?
    PS 1. Are there any good reasons why the texlive-core package doesn't configure ConTeXt to work out of the box?
    PS 2. I also tried context-minimals-git from the AUR, which kind of works, but it's useless since the integral signs ($\int$) don't look like they should and have a hideously large spacing around them...

    Also, you can have multiple versions of TL installed if you like and switch between them. I like this because I can always fall back to the previous edition if something terrible happens to the latest one! (Especially when I'm installing a new release and don't know quite what will happen.)
    I guess it doesn't seem like much hassle to me but I was managing TL with these tools before I started using Linux, so that might make a difference - it is easier, in fact, than learning to manage TL using pacman packages.
    But the "do not run with root privileges" is what really decided it for me. I prefer not to manage the installation using tools with privileges which the tools' authors explicitly recommend against! (I guess if you don't need to run anything to manage the installation this might not matter, though.)
    EDIT: By the way, I do this even though I pretty much install the lot so I certainly do not save space. But I have control and I know what the tools do and where they can do those things - only under /usr/local/texlive and /usr/local/stow-tex, basically. I manage the installation using a dedicated account which cannot write anywhere else besides world-writable directories such as /tmp. And it all seems to work.
    The only tricky part was figuring out how to create dummy packages to keep Arch's pacman and Fedora's yum happy .
    Last edited by cfr (2013-11-16 22:57:44)

  • Thread context switching.

    Since I'm working with some real-time applications I'm interested in the thread switching mechanisms of Java ME.
    So my question is when does the context switching take place?
    If a thread A changes the priority of thread B to higher than its own priority will thread B preempt A instantly or is it neccessary to cause the current thread to interrupt?
    How do same priority threads preempt each other?
    What priority is given to the garbage collector?
    Mikael

    Hi Mikael,
    I'm not a ME VM expert, so do not have the deep knowledge. But from what I know:
    - thread switching can take place at any point during execution of java code. That's in interpreted mode. In compiled mode there are some limitations on when it can happen but it still could be described with the words "at almost any point"
    - the scheduler is called to have "fair" policy. That is - all threads get their share of CPU time, the priority defines how big this share is
    - the current thread get preempted when it's exhaused it's currently allocated share of CPU time. next thread is scheduled at that point
    - I don't know whether rescheduling happens when thread priority is modified
    - GC is not a thread and it does not have any priority. It gets invoked according to internal logic which does not depend on logic of the scheduler but rather on heap parameters (configuration and usage)
    Regards,
    Andrey

  • I have a problem with wifi in my iphone 4s, i already try everything and download latest version 7.1(11D167) but wifi switch is not working, its my humble request to Apple support team that pls resolve this problem as soon as possible because

    I have a problem with wifi in my iphone 4s, i already try everything and download latest version 7.1(11D167) but wifi switch is not working, its my humble request to Apple support team that pls resolve this problem as soon as possible because its a prestiage of Apple Company.
    Pls inform me how can i resolve the problem of wifi.

    You have to go to autherized iPhone agent.

  • Software Update Point Switching is not working for some Clients

    Hi there,
    I found nothing similar here and I hope this is the right section.
    I´m running ConfigMgr 2012 R2 where one of the Site Systems from one of the Primaries is located in an untrusted Forest in a perimeter Network. The Site System there has the MP, SUP and DB Roles. In general it works great. The Systems in that untrusted Forest
    get the SCCM Agent pushed, see and can install published Software packages and receive Windows Updates. But there are a few systems where everything works, except Windows Updates.
    So I had a deeper look at what is happening and found out that the SUP switching is not working for them. They always try to contact the SUP from the Primary, which they cannot reach (this is intended).
    From how I understand SUP switching as described here
    http://blogs.technet.com/b/configmgrteam/archive/2013/03/27/software-update-points-in-cm2012sp1.aspx#pi140062=1
    the Windows Update Agent tries to connect to a SUP every 30 minutes and after 4 failed attempts he will try to connect to the next one until he finds one which works.
    As I said before, this seems to work for most systems in the untrusted forest, but some do not make any intentions to switch the SUP.
    So my next step was to find out from where the Update Agent can get the information of the available SUPs. I think they either don´t receive the information that other SUPs exist, or if the Information is there, they don´t realize that there´s an error and
    make no attempt to switch.
    I used the System Center Support Center to gather all Information from some of the systems with that problems (Log Files, WMI information, registry information, policies etc.) but I cannot find where SCCM or the Update Agent store the information which SUPs
    are available in my environment.
    I´m sure the problem is on the Systems which fail to connect to the right SUP and not in the SCCM infrastructure itself, because for most of the systems everything is working just perfect. Unfortunately in the Blog Post above there´s also no information
    where this information is stored and how it is obtained by the clients. In the comments there´s even one post which describes the same problem I have here, but there was no answer. I hope someone can point me into the right direction, because I´m stuck currently.
    Things I tried additionally to all the log file / WMI / registry sniffing:
    Removing the Software Distribution Folder and restarting the Windows Update Agent
    Removing the WindowsUpdate Registry folder in the HKLM\SOFTWARE\Policies\Windows section in the Registry and restarting the Windows Update Agent.
    Tried to reset the WUAgent with wuauclt /Resetauthorization additionally to the steps above.
    I also tried to manually set the WUServer and WUStatusServer Keys in the registry to the new Server, but as soon as the next Update Scan cycle runs, the value is set back to the URL of the Primary Sites SUP
    Is someone having additional ideas? It seems to me older systems are more affected (which were configured for a standard WSUS before SCCM 2012 was deployed) than newer ones which were installed when SCCM was in place already. But I don´t know what else to
    "reset" on those machines without reinstalling them.

    Thank you very much for your response. I must have missed that one by looking through numerous Logfiles. In this, there´s indeed a list of all available SUPs. So according to the LocationServices.log the machine should have a choice.
    The WMI Key however, contains just one entry and this is the URL of the Primaries SUP which is not reachable in the untrusted forest. Is it OK that the WMI entry includes only one entry? If yes, what process is putting the results from the LocationServices
    into WMI? It seems like the Windows Update Agent is feeded from the WMI Key then. If this is the case my problems seems to be the "communication path" between these two components.
    Is this the job from the SCCM Agent, the Windows Update Agent or maybe some third component I´m not aware of? I wonder how I can fix this.

  • I need to change my apple ID because I'm changing my email address. I'm worried that when I do, I'll no longer be able to use my first generation apple tv unless I change the apple ID there as well.  Does anyone know how this works??

    I have to change my apple ID because I'm changing my email address. (I have a Comcast address and am switching to U-verse) I'm worried that when I do, I'll no longer be able to use my first generation apple tv unless I change the apple ID there as well. I'm also trying to find out if changing my apple ID is going to interfere with getting my itunes content on my computer and my iphone.  Does anyone know how this works??

    My iTunes appleID is an old defunct e-mail address - it does not have to be functional.
    Do what Winston says to ensure you keep getting correspondence related to that ID.
    AC

  • How to work with EEWB tool in CRM and how to assign it to PCUI

    Hi Friends,
    Can any body will suggest me how to work with EEWB tool in CRM to add new fields ,i need to attach the fields to a GUI screen and same to PCUI also,
    And how to attach a search help for those fields,is the tool will automatically will create the search helps or it is similar as we do in abap,
    So can any body suggest me to get a material on this ,
    Thaking you
    Regards
    Raghavendra Prasad

    Prasad
    Following are the steps involved in general :
    1. Select the filter Worklist and enter your name in the input field of the object list selection. Press the enter key. Your object list is displayed.
    2. Place your cursor on the highest node(PROJECT BY XXXXXX). Select Create project from the context menu by right-clicking on it. You see the dialog box Create project.
    3. Enter a project name, description, packages, and namespaces for each system used. Leave the dialog box by pressing the enter key.
    Specify transport requests. The Project is created and appears in the object list.
    4. Place your cursor on the new project in the object list and select Create extension in the context menu. You see the dialog box Create extension.
    5. Enter a name and description. Define a Business Object and extension type. Press the enter key.The extension is created and appears in the object list below the project.
    6. Place your cursor on the new extension in the object list and select Call wizard in the context menu. The wizard for the extension action starts automatically.
    7. Fill in the input fields following the notes on screen and end the wizard by clicking on Complete.The extension tasks have been created and appear in the object list.
    Project and extension are created !
    Also take care that you have the Transport Requests and Save the Project and Extensions against a Development Class !
    In general , EEW will automatically puts the fields on the Screen. We donot want to worry abt that !
    The generated BADIs can be implemented to do some Checks(for example) !
    I hope this helps !
    Thanks
    <b>Allot points if this helps !</b>

  • The lock switch is not working anymore

    The lock switch on my nano doesn't work anymore, it's really annoying since I can't walk around with it in my pocket without the sound getting turned up or the song switched every time i move. Also, since the lock isn't working I can't turn it off properly. Is it a mechanical problem?
    Thanks

    Are you able to go to an Apple Store? I had an older generation model nano, which the lock switch wasn't working and since it was still under applecare warranty, they replaced the old nano for me. But that is in the USA, so I am not sure how it works in the UK.

  • Overhead of SQL to PL/SQL context switch using an inline function

    Hi,
    We have a bit of sql in a third party application that uses an inline pl/sql function to do some security checks.
    These security checks are redundant in our system - we don't use the functionality so the result is always true, but the function is always called for each line of output, which is over a thousand for a lot of records.
    The function itself is fairly lightweight in our environment - the tables it uses are empty so each iteration of the function is quite quick (about .1 of a second per query in total, vs 12-15 seconds for the 'main' query). What I was wondering if there is any way of measuring the overhead of just doing the function calls.
    If I do a trace of the session I see the timings and cost of the 'main' sql query, and the breakdown of the 2 sql statements that have been called in the function (with over 1000 executions each) but is there any way to measure how much of the time to execute the main query is spent doing the context switch?
    Regards,
    Carl

    You could knock up some example to show the timings and measure it...
    The following shows an example using context switching from PL/SQL to SQL and back in a loop, which gives an idea of the performance difference...
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2    v_sysdate DATE;
      3  begin
      4    v_sysdate := SYSDATE;
      5    INSERT INTO mytable SELECT rownum FROM DUAL CONNECT BY ROWNUM <= 1000000;
      6    DBMS_OUTPUT.PUT_LINE('Single Transaction: Time Taken: '||ROUND(((SYSDATE-v_sysdate)*(24*60*60)),0));
      7    EXECUTE IMMEDIATE 'TRUNCATE TABLE mytable';
      8    v_sysdate := SYSDATE;
      9    FOR i IN 1..1000000
    10    LOOP
    11      INSERT INTO mytable (x) VALUES (i);
    12    END LOOP;
    13    DBMS_OUTPUT.PUT_LINE('Multi Transaction: Time Taken: '||ROUND(((SYSDATE-v_sysdate)*(24*60*60)),0));
    14    EXECUTE IMMEDIATE 'TRUNCATE TABLE mytable';
    15* end;
    SQL> /
    Single Transaction: Time Taken: 1
    Multi Transaction: Time Taken: 37
    PL/SQL procedure successfully completed.
    SQL>Likewise you could time a query with X number of rows calling a PL/SQL function and not calling a PL/SQL function to see the difference. The more rows you do, the better idea you'll get of the difference.
    ;)

  • How to Work with Composite Primary Key

    Hi All,
    I'm working with Toplink JPA. Here I have A problem with inserting into database table which have composite Primary Key.
    What I'm doing is, I have two tables. to maintain many to many relation between these two tables I created another intermediate table which consists of foreign Keys (reference) of above two tables.
    Now these two foreign Keys in the Intermediate table made as composite Primary Keys.
    When I'm trying to the data in the Intermediate table I'm getting the foreign Keys values are null..
    could anyone suggest me how to work with composite Primary Keys
    Thanks,
    Satish

    I have the same problem, I have 3 tables with a join table joining them all. I have created an intermediate table entity. When I go to create a an entry, it says that I cannot enter null into "ID". Here is the SQl toplink generates:
    INSERT INTO Z_AUTH_USER_AUTHORIZATION (CONTEXT_ID, AUTHORIZATION_ID, USER_ID) VALUES (?, ?, ?)
    bind => [null, null, null]
    Here are the classes:
    -----------------------Join Table-----------------------------------------------
    @Entity()
    @Table(name = "Z_AUTH_USER_AUTHORIZATION")
    public class AuthUserAuthorization implements Serializable{
    @EmbeddedId
    private AuthUserAuthorizationPK compId;
    // bi-directional many-to-one association to AuthAuthorization
    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "AUTHORIZATION_ID", referencedColumnName = "ID", nullable = false, insertable = false, updatable = false)
    private AuthAuthorization authAuthorization;
    // bi-directional many-to-one association to AuthContext
    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "CONTEXT_ID", referencedColumnName = "ID", nullable = false, insertable = false, updatable = false)
    private AuthContext authContext;
    // bi-directional many-to-one association to AuthUser
    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "USER_ID", referencedColumnName = "ID", nullable = false, insertable = false, updatable = false)
    private AuthUser authUser;
    ---------------------------------------User table--------------------------------------------------------------
    @Entity()
    @Table(name = "Z_AUTH_USER")
    public class AuthUser implements Serializable, IUser{
    @Id()
    @SequenceGenerator(name = "AUTH_USER_ID_SEQ", sequenceName = "Z_AUTH_USER_ID_SEQ")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "AUTH_USER_ID_SEQ")
    @Column(name = "ID", unique = true, nullable = false, precision = 10)
    private Integer id;
    // bi-directional many-to-one association to AuthUserAuthorization
    @OneToMany(mappedBy = "authUser", fetch = FetchType.EAGER)
    private java.util.Set<AuthUserAuthorization> authUserAuthorizations;
    -----------------------------------Context table-----------------------------------------------------------------
    @Entity()
    @Table(name = "Z_AUTH_CONTEXT")
    public class AuthContext implements Serializable, IContext{
    @Id()
    @SequenceGenerator(name = "AUTH_CONTEXT_ID_SEQ", sequenceName = "Z_AUTH_CONTEXT_ID_SEQ")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "AUTH_CONTEXT_ID_SEQ")
    @Column(name = "ID", unique = true, nullable = false, precision = 8)
    private Integer id;
    // bi-directional many-to-one association to AuthUserAuthorization
    @OneToMany(mappedBy = "authContext", fetch = FetchType.EAGER)
    private java.util.Set<AuthUserAuthorization> authUserAuthorizations;
    ----------------------------Authorization table-------------------------------------------------
    @Entity()
    @Table(name = "Z_AUTH_AUTHORIZATION")
    public class AuthAuthorization implements Serializable, IAuthorization{
    @Id()
    @SequenceGenerator(name = "AUTH_AUTHORIZATION_ID_SEQ", sequenceName = "Z_AUTH_AUTHORIZATION_ID_SEQ")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "AUTH_AUTHORIZATION_ID_SEQ")
    @Column(name = "ID", unique = true, nullable = false, precision = 8)
    private Integer id;
    // bi-directional many-to-one association to AuthUserAuthorization
    @OneToMany(mappedBy = "authAuthorization", fetch = FetchType.EAGER)
    private java.util.Set<AuthUserAuthorization> authUserAuthorizations;
    I have tried to create the new entity several ways. I have tried to create one with the default constructor then set this entity on each of the other entities, I have also tried to pass in the entities to the join entity and set them there, but this doesn't work. Any help would be very appreciated!
    Thanks,
    Bill

  • I am using iPhone 3GS. I am living in Saudi Arabia. I cannot find the directions with in GCC contries in the Navigation Application "COMPASS" of iphone. Can you please explain me how to work on it??

    I am using iPhone 3GS. I am living in Saudi Arabia. I cannot find the directions with in GCC contries in the Navigation Application "COMPASS" of iphone. Only the map is displayed. I am not gtting the directions or information when I use it. Can you please explain me how to work on it??

    See http://kb.mozillazine.org/Editing_configuration#How_to_edit_configuration_files
    Add code to [http://kb.mozillazine.org/UserChrome.css userChrome.css] below the @namespace line.
    <pre><nowiki>@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    #context-sendlink {display:none !important;}</nowiki></pre>
    See also http://kb.mozillazine.org/Chrome_element_names_and_IDs

  • How cdp works?

    Hi there.
    I just wondering that how cdp works in cisco switch and not cisco device.
    cdp is propagated multicast 01:00:0c:cc:cc:cc(not sure) on all interface that supports SNAP.
    [diagram]
    SW1------SW2------SW3
    (cisco)   (cisco)    (cisco)
    in this case, sw 1 sends cdp multicast to sw2 and sw2 receive this cdp. i think that may igmp snooping is enabled by default in all interface so sw2 receives this multicast and response that "i'm your neighbor" by some mechanism (i dont no) .and doesn't flood this mcast. so it doesn't cross two hops.
    sw1 ------------sw2--------sw3
    (cisco)     (not cisco)     (cisco)
    and some case that sw2 is not cisco device and doesn't work with igmp snooping, it simply flood all interface. so i can see sw3 on sw1.
    if i was correct, what if that sw2(not cisco) enables igmp sooping all links?
    Can i still see sw3 on sw1??
    Best regards.

    Hi,
    CDP is a Cisco layer-2 proprietary protocol and does not work with other vendor's products. Some vendors like Juniper use LLDP instead of CDP to see their directly connected neighbors.  If you have a multi-vendor environment and your device support Standard LLDP, you can try enabling LLDP on Cisco devices to see their none-Cisco neighbors.
    Cisco Discovery Protocol is a Layer 2, media-independent, and network-independent protocol that networking applications use to learn about nearby, directly connected devices. Cisco Discovery Protocol is enabled by default. Each device configured for Cisco Discovery Protocol advertises at least one address at which the device can receive messages and sends periodic advertisements (messages) to the well-known multicast address 01:00:0C:CC:CC:CC. Devices discover each other by listening at that address. They also listen to messages to learn when interfaces on other devices are up or go down.
    http://www.cisco.com/en/US/docs/ios-xml/ios/cdp/configuration/15-mt/nm-cdp-discover.html#GUID-F729EBA3-2945-456F-9C1F-6CDD993CABEC
    HTH

  • How Jaws works?

    Does anybody know how Jaws works?
    What component will be read by Jaws when it's container becomes active windows?
    For example: JDialog
    Environment: Jaws 7.1, windows xp, jdk1.5 , JAB2.0.1
    1. If dialog just contains a JLabel, nothing will be read.
    2. If u use setFocusable(true) to JLabel, Jaws will read dialog title and two times the content of JLabel.
    3. If dialog contains a JTextField, Jaws will read dialog title and two or three times the contents of JTextField.
    Here the code you can try
    import java.awt.event.ActionEvent;
    import java.awt.event.KeyAdapter;
    import java.awt.event.KeyEvent;
    import javax.swing.AbstractAction;
    import javax.swing.JButton;
    import javax.swing.JDialog;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JTextField;
    public class DialogTest {
         protected JFrame frame = null;
         private static int choice = 1;
         public DialogTest(){
              frame = new JFrame("Just a frame");
              frame.setSize(500, 400);
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              JPanel panel = new JPanel();
              JButton button1 = new JButton(new MyAction("open dialog"));
              panel.add(button1);
              button1.addKeyListener(new KeyAdapter(){
                   public void keyTyped(KeyEvent e) {                    
                        if(KeyEvent.VK_ENTER == e.getKeyChar()){
                             onOpen();
              frame.getContentPane().add(panel);
              frame.setVisible(true);          
         private void onOpen(){
              JDialog dialog = new JDialog(frame,"Jaws Test Dialog");
              JPanel jp = new JPanel();
              JLabel jl = new JLabel("Will be read by Jaws label");
              JTextField jtf = new javax.swing.JTextField("Will be read by Jaws text field");
              switch(choice){
              case 1:
                   jp.add(jl);
                   break;
              case 2:
                   jp.add(jl);
                   System.out.println(jl.isFocusable());
                   jl.setFocusable(true);
                   break;
              case 3:
                   jtf.setEditable(false);
                   jtf.setBackground(jp.getBackground());
                   jtf.setBorder(javax.swing.BorderFactory.createEmptyBorder());
                   jp.add(jtf);
                   break;
              default :
                   jp.add(jl);
              dialog.getContentPane().add(new JPanel().add(jp));
              dialog.setSize(300, 250);
              dialog.setVisible(true);
         public static void main(String[] args){
              choice = 1;//CHANGE THIS TO TEST DIFFERENT CASE 1 2 3
              new DialogTest();
         class MyAction extends AbstractAction{
              public MyAction(String name){
                   super(name);
              public void actionPerformed(ActionEvent e) {
                   onOpen();
    }Please give your point of view to help me, I am totally confused by this.

    Sorry for resurrecting this 4 year old thread, but I recently encountered the same problem and found a solution.
    You need to
    1. modify the accessible tree to skip the JScrollPane and JViewPort
    2. avoid sending accessible property-changed events from the JEditorPane
    Full details including an example here: [Stack Overflow|http://stackoverflow.com/questions/6684389/jeditorpane-jscrollpane-and-accessibility/6693843#6693843].
    If anyone has any insights into why this works, I would very much appreciate hearing it.
    Best regards,
    Rasmus Faber.

  • Context switching.

    Theory: Firewalls essentially partition the Java Card platform’s object system into separate
    protected object spaces called contexts. The
    firewall is the boundary between one context and another. The Java Card RE shall
    allocate and manage a context for each Java API package containing applets1. All
    applet instances within a single Java API package share the same context. There is
    no firewall between individual applet instances within the same package. That is, an
    applet instance can freely access objects belonging to another applet instance that
    resides in the same package.
    That is the theory. What happens in my case. My Java Card project contains three packages and in one there is one Java Card applet. Splitting to three package was necessary because the application is large. What about the object instances from other packages. Are they assigned to other context and what happens when java card applet instance access these objects? Is context switching is happening?

    Patrick,
    Don't worry about context switching. Build a good load test. Run it against
    a "best guess" number of exec threads. Increase the number of threads and
    run again. If overall throughput drops, then decrease the number of threads
    and run again. Start with coarse increments (5 threads?) and work from there
    until you get the best setting.
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com/coherence.jsp
    Tangosol Coherence: Clustered Replicated Cache for Weblogic
    "Patrick Acheson" <[email protected]> wrote in message
    news:3d5aae20$[email protected]..
    >
    In setting the executeThreadCount variable for Weblogic 5.10, if thevariable is
    too high there will be a lot of context switching going on. What wouldconstitute
    a lot of context switching as opposed to what would be a normal orexpected amount?
    Our executeThreadCount is set at 100 and we have 4 CPUs. In Perfmon,about 10%
    of the threads show 1 to 2 context switches per second.

Maybe you are looking for