Sevice Contract - Listener for Events Queue Issue

Hi,
The Listener for Events Queue in our Production environment ran very long, It took about 3+ hrs to complete the program. Is there any thing specific that we can check as part of RCA.
Further there were 'library cache lock' found ... how this can impact the performance and how library cache lock works.
Regards
Tauseef E Ahmad

Hi Team,
i used the following code for recognizing the key events.
String javaScriptKeyListener =
" function keyListener() "
+" { "
+" alert(window.event.keyCode) ; } ";
OAWebBean body = pageContext.getRootWebBean();
if (body instanceof OABodyBean)
((OABodyBean)body).setOnLoad("onKeyPress = javascript:keyListener()");
but it is not working as expected..
Any suggestions ??
Regards
Sridhar

Similar Messages

  • Listen for Events from anywhere

    Hello!
    I have an application with a rather complicated component hierarchy.
    How can I have it so that I can listen for events from any component in any component, regardless of who is who's child?
    Thank you!

    You need a broadcasting mechanism.
    Many architecture framework offers this facility, but as a quick hack you can try something like
    public class Broadcaster extends EventDispatcher  ( singleton anti pattern   )
    instance
    then just do Broadcaster.instance.addEventListener or removeEventListener. it's a crappy singleton, but at least it does not hold any global state.
    I've also seen people use Application.application to dispatch/listen globally but really don't like it.
    Note : Use weak references or your views will never be eligible for garbage collections.

  • Listen for events from an embedded Swf

    Hi there,
    I have spend so long searching for an answer on the web but can not find any that works, please help!
    I'm not even sure if this is possible but if anyone can guide me in the right direction I would most appreciate it!
    Basically what I would like to do is to load a swf in to my flex application - contrary to my post title it doesnt even have to be embedded - when the loaded swf finishes playing it's animation I want for it to dispatch an event and for flex to listen for that event and trigger a function when the event is captured.
    The animation is made in Flash CS3. I have not used any classes, rather on the last frame I set up an action to dispatch an event like this:
    dispatchEvent(new Event("finishedPlaying"));
    In my Flex Application I load my swf using swfLoader and I add an event listener to it like so:
    mySwfLoader.addEventListener("finishedPlaying", test);
    and my function is like this:
    private function test():void
         trace("it worked!");
    This is not working at all and I'm sure I am missing something but I cant seem to find any straightforward answer on the internet!
    Is it at all possible for a swf made in flash to communicate with flex??
    Since they are both written in AS3, I figured it would be easy but alas!
    If anyone can help me I would most appreciate it, thank you in advance!!
    By the way I have also tried:
    mySwfLoader.content.addEventListener("finishedPlaying", test);
    but no luck....

    You have to wait for the swf to complete loading before adding the event listener.
    When are you adding the event listener?
    mySwfLoader.addEventListener("finishedPlaying", test);
    Have a look at the SWFLoader complete event:
    http://livedocs.adobe.com/flex/3/langref/mx/controls/SWFLoader.html#event:complete

  • Mxml file listening for event.

    Hi All,
       I'm having following code in my project, here Report.mxml file displays to enter user details like (firstname,lastname,city,state,zip etc). After entering user information there is submit button. When user selects this button it needs to submit this data into database and return REPORT_ID back to confirmation state.
       My problem is that submitting data into database and getting REPORT_ID is taking some time because of that it is not displaying REPORT_ID in Confirmation viewStack. Rather than getting REPORT_ID from RemoteObject, hardcoding(given in red color) this value in my controller then it is displaying REPORT_ID.
      How to wait for event result for displaying confirmation viewStack. Can anyone please suggest me what changes I need to make so that confirmation page will be displayed only after getting REPORT_ID.
    ------------------------------- Report.mxml (begin) ----------------
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%">
    <mx:Script>
        <![CDATA[
        import mx.controls.Alert;
        import com.westernstates.classes.controller.WesternStatesController;
        import com.westernstates.classes.model.WesternStatesModel;
        import com.westernstates.classes.events.*;
        private var _inquiryIdTxt:String;
        private var _inquiryIdTxtChanged:Boolean;
        public function set inquiryIdTxt(value:String):void
           _inquiryIdTxt = value;
           _inquiryIdTxtChanged = true;
           invalidateProperties();
           invalidateSize();
        override protected function commitProperties():void
          super.commitProperties();
          if (_inquiryIdTxtChanged)
              Alert.show("Inside commitProperties 1",_inquiryIdTxt);
             inquiryIdVal.text = _inquiryIdTxt;
             //inquiryIdVal.text = "1234"
             _inquiryIdTxtChanged = false;
        public function init():void{
            Alert.show("Inside newreport init mxml");
            myViewStack.selectedChild = newReport;
            Confirmation.visible=false;
            // Reset the value too.
            first_name.text = "";
            last_name.text = "";
            street_address.text = "";
            street_address2.text = "";
            city.text = "";
            state.text = "";
            zip.text = "";
            public function submitInquiry(evt:Event):void{
            var chk_speed_up:String = "";
            WesternStatesModel.inquiryConsumer.first_name = first_name.text;
              WesternStatesModel.inquiryConsumer.last_name = last_name.text;
              WesternStatesModel.inquiryConsumer.street_address = street_address.text;
              WesternStatesModel.inquiryConsumer.street_address2 = street_address2.text;
              WesternStatesModel.inquiryConsumer.city = city.text;
              WesternStatesModel.inquiryConsumer.state = state.text;
              WesternStatesModel.inquiryConsumer.zip = zip.text;
              myViewStack.selectedChild = Confirmation;
              newReport.visible=false;   
             this.dispatchEvent(new NewReportEvent());        
              //inquiryIdVal.text = _inquiryIdTxt;
              inquiryIdVal.text = WesternStatesModel.inquiryConsumer.inquiry_id;
        ]]>
    </mx:Script>
        <mx:ViewStack id="myViewStack" width="100%" height="100%" creationPolicy="all" >
        <mx:Canvas id="newReport" height="100%" width="100%" visible="true">
        <mx:Label x="10" y="10" text="NEW REPORT"  fontSize="18" fontWeight="bold" color="#F07012"/>
        <mx:TitleWindow width="100%" height="100%" layout="absolute" title="Create A New Report" fontWeight="normal" fontSize="13" y="38" x="0">
         <mx:Canvas height="100%" width="100%">
         <mx:VBox width="100%" height="100%">
             <mx:HBox>
                 <mx:Label text="Consumer Information: " fontSize="12" fontWeight="bold" color="#34B05D"/>
             </mx:HBox>
             <mx:HBox>
                 <mx:Label text="Report Type: " fontWeight="normal"/>
                 <mx:Label text="Phone" fontWeight="bold"/>
             </mx:HBox>
             <mx:HBox width="100%">
                 <mx:Label width="25%"  text="First Name:" fontWeight="normal"/>
                 <mx:TextInput width="25%" id="first_name"/>
                 <mx:Label  width="25%" text="Last Name:" fontWeight="normal"/>
                 <mx:TextInput width="25%" id="last_name"/>
             </mx:HBox>
             <mx:HBox width="100%">
                 <mx:Label  width="25%" text="Address1: " fontWeight="normal"/>
                 <mx:TextInput width="25%" id="street_address"/>
                 <mx:Label  width="25%" text="Address2:" fontWeight="normal"/>
                 <mx:TextInput width="25%" id="street_address2"/>
             </mx:HBox>
             <mx:HBox width="100%">
                 <mx:Label  width="25%" text="City: " fontWeight="normal"/>
                 <mx:TextInput width="25%" id="city"/>
                 <mx:Label  width="25%" text="State:" fontWeight="normal"/>
                 <mx:TextInput width="25%" id="state"/>
             </mx:HBox>
             <mx:HBox width="100%">
                 <mx:Label  width="25%" text="Zipcode: " fontWeight="normal"/>
                 <mx:TextInput width="25%" id="zip"/>
                 <mx:Label  width="25%" text="Phone"/>
                 <mx:TextInput width="25%" id="phone"/>
             </mx:HBox>
             <mx:HBox width="100%" horizontalAlign="center">
                 <mx:Button label="SUBMIT REPORT" id="submit_search" click="submitInquiry(event)" fillColors="#34B05D"/>
             </mx:HBox>        
            </mx:VBox>
        </mx:Canvas>
        </mx:TitleWindow>
        </mx:Canvas>
            <mx:Canvas id="Confirmation" width="100%" height="100%">
            <mx:Label x="10" y="10" text="NEW REPORT"  fontSize="18" fontWeight="bold" color="#F07012"/>
            <mx:TitleWindow width="100%" height="132" layout="absolute" title="Create A New Report" fontWeight="normal" fontSize="13" y="38" x="0">
            <mx:VBox width="100%" height="81">
                 <mx:HBox>
                     <mx:Label text="Submission Confirmation:" fontSize="12" fontWeight="bold" color="#34B05D"/>
                 </mx:HBox>
                 <mx:HBox>
                     <mx:Label text="Report has been created successfully with Report ID:"/>
                     <mx:Label id="inquiryIdVal" fontSize="12" fontWeight="bold" color="#34B05D"/>
                 </mx:HBox>
             </mx:VBox>
            </mx:TitleWindow>
            </mx:Canvas>
        </mx:ViewStack>
    </mx:Canvas>
    ------------------------------- Report.mxml (end)   -----------------
    ------------------------------- NewReportEvent.as( begin) ---------------
    package com.westernstates.classes.events
      import flash.events.Event;
      // This custom event should be dispatched if the user
      // successfully logs into the application.
      public class NewReportEvent extends Event{   
        public static const REPORT:String = "report"; 
        public function NewReportEvent(){
          super(NewReportEvent.REPORT);
    ------------------------------- NewReportEvent.as( end)   ----------------
    ------------------------------- WesternStatesController.as (begin) ------------
       public class WesternStatesController extends UIComponent{
        public function WesternStatesController(){
          addEventListener( FlexEvent.CREATION_COMPLETE, init);
        // Add event listeners to the system manager so it can handle events
        // of interest bubbling up from anywhere in the application.
        private function init( event:Event ):void{    
         systemManager.addEventListener(NewReportEvent.REPORT, newInquiry, true);
          login(new LoginEvent(LoginEvent.LOGIN));
            public function newInquiry(evt:NewReportEvent):void{
                 Alert.show("Inside newInquiry", evt.type);
                 addNewInquiry();
                 //getNewInquiryResult();
             }//End of newInquiry
             public function addNewInquiry():void
                 ro = new RemoteObject();
                 setUpAmfChannel();
                 ro.destination = "manageInquiryService";
                 ro.addEventListener("fault", faultHandler);      
                 ro.createInquiry.addEventListener("result", getNewInquiryResultHandler);
                 Alert.show("Before addNewInquiry");      
                 ro.createInquiry(WesternStatesModel.inquiry,WesternStatesModel.inquiryConsumer);
             }//End of addNewInquiry
             public function getNewInquiryResultHandler(event:ResultEvent):void
                     WesternStatesModel.inquiryConsumer.inquiry_id = event.result as String;
                    //WesternStatesModel.inquiryConsumer.inquiry_id = "09S-1234";  UNCOMMENT     
             }//End of getNewInquiryResultHandler
    ------------------------------- WesternStatesController.as (end) ---------------
    Thanks in advance.
    Regards,
    Sharath.

    Can someone please tell me how to add event handler to show REPORT_ID before displaying confirmation page. Confirmation page should be displayed once data saved successfully and getting REPORT_ID back from server.
    How to set variables for .mxml from action script(.as) file.
    Thanks,
    Sharath.

  • Listen for event in own class?

    Hi
    I dispatch events from models to classes listening. How do you set up an event and listener in the same class?
    Eg for the former - a model "MyModel" to class - it's:
    public static const MY_VAR:String = "myVar";
    triggered by...
    dispatchEvent(new Event(MY_VAR));
    picked up in another class by...
    modelVar.addEventListener(MyModel.MY_VAR, doSomething);
    but what if the class that's dispatching also has the listener?
    So if MyClass is dispatching the event, along the lines of...
    addEventListener(MyClass.MY_VAR, doSomething);
    Cheers for taking a look

    Very often I'm waiting for a few key items before I can finally do something else. Setting simple flags or checking nulls can help with this.
    Often I download multiple data structures (JSON/XML/etc) and I need all of them before I can parse them because the co-depend on each other. URLLoaders finish at different times so I just set a flag for what I need but check if all are complete before I continue each time one finishes.
    e.g.
    package
         public class IHateWaiting extends EventDispatcher
              public static const MY_VAR:String = "myVar";
              private var _xmlA:XML;
              private var _xmlB:XML;
              public function IHateWaiting()
                   // load A
                   var ulA:URLLoader = new URLLoader();
                   ulA.addEventListener(Event.COMPLETE, _handleFinishedF);
                   ulA.load(new URLRequest("http://www.example.com/a.xml"));
                   // load B
                   var ulB:URLLoader = new URLLoader();
                   ulB.addEventListener(Event.COMPLETE, _handleFinishedF);
                   ulB.load(new URLRequest("http://www.example.com/b.xml"));
                   // listen to self
                   addEventListener(IHateWaiting.MY_VAR, _handleAppEventF);
              private function _handleFinishedF(e:Event):void
                   if (e.type == Event.COMPLETE)
                        var data:XML = XML(e.target.data);
                        // A or B? any way you can tell
                        if (data.A.length() > 0) _xmlA = data;
                        else if (data.B.length() > 0) _xmlB = data;
                        // event method (requires extra handler or a fake event)
                        if (_xmlA && _xmlB) dispatchEvent(new Event(IHateWaiting.MY_VAR));
                        // preferred direct reference, no handler needed
                        // if (_xmlA && _xmlB) _parseXML();
              private function _handleAppEventF(e:Event):void
                   if (e.type == IHateWaiting.MY_VAR) _parseXML();
              private function _parseXML():void
                    // parse XML
    I recommend the reference version from post #2. It's cleaner because you don't need to double up on functions (handler->reference) like you see above with dispatching. The only purpose for _handleAppEventF() in this case is just to run _parseXML(), which is a useless duplicate function.
    I've always kept my handlers free of model-esque logic, so you see me calling a different function from that handler, _parseXML(). This is just because I want my handlers to only handle events and then hand off the work elsewhere.
    Instead of dispatching the event, I agree with moccamaximum, run the method directly. Even if it's 2 lines of code to do 1 thing, I think the clarity of it is much cleaner coding. So I would recommend nuking the self-listener in the constructor above. When I have all the data I'm looking for, I'd run the methods in the class directly and If the parent needs to know, I'd dispatch when they complete.
    e.g.
              private function _handleFinishedF(e:Event):void
                   if (e.type == Event.COMPLETE)
                        var data:XML = XML(e.target.data);
                        // A or B? any way you can tell
                        if (data.A.length() > 0) _xmlA = data;
                        else if (data.B.length() > 0) _xmlB = data;
                        if (_xmlA && _xmlB)
                             // parse first (synchronous)
                             _parseXML();
                             // xml ready, dispatch to parent
                             dispatchEvent(new Event(IHateWaiting.MY_VAR));

  • Listen for events in another Gui class

    Most of the GUIs I have written to date have consisted of either a single class or multiple self-contained classes - mainly extensions of JPanel with JButtons etc to perform certain tasks.
    Now I want to be able to click a JButton in one class which will invoke a method in another.
    The code is too lengthy to post here but this is the general layout:
    JFrame Simulation_GUI contains a JPanel (panelMain) which is set as the content pane
    panelMain contains two GUI classes which extend JPanel;
    buttonPane > contains a number of JButtons, including the one I want to click
    loadingPane > contains the method (which takes a Hastable as an argument) I want to run
    All three panels are declared in the main class which extends JFrame, so I know that from there I can simply call;
    loadingPanel.runLoads(htData); but how do I do this from the JButton on the buttonPane.
    Any assistance greatly appreciated as I have little enough hair at the moment and can't afford to tear much more out.
    Thanks in advance

    Class GUI1 {
    //Display all the buttons.
    public void init() {
    Button.addActionListener(new
    ener(new SomeClass(this));
    Class SomeClass implements ActionListener {
    GUI1 gui = null;
    SomeClass(GUI1 gui) {
    this.gui = gui;
    public void actionPerformed(ActionEvent e) {
    //Do all your process here
    gui.setTable(table);    //table would be ur
    ould be ur hashtable
    }Cheers
    -PThis didn't fully answer my question but did two things:
    1. Told me that it is at least possible and it is just me having a senior moment,
    2. Sent me on the right road to finding a solution
    With additional help from the following post I have sorted my problem. Basically I had to centrallise the event handling into a different class. This was instantiated by the main GUI class and passed to the other GUI components as an argument.
    http://forum.java.sun.com/thread.jspa?threadID=576012&messageID=2881969
    Simple when you know how...!
    prashanth_kuppur - have some Duke Dollars on me and thanks for the poke in the right direction.

  • Mbean that listen for jms queue messages

    Hi to all,
              I must use a Jmx notification listener architecture to trap when a new message arrives (i must also handle the message content) in a weblogic jms queue.
              Do you know which mbean could help me to observe the new ariving message?
              In the javadocs i cant' find any useful mbean to do that..
              Thanks

    Hi to all,
              I must use a Jmx notification listener architecture to trap when a new message arrives (i must also handle the message content) in a weblogic jms queue.
              Do you know which mbean could help me to observe the new ariving message?
              In the javadocs i cant' find any useful mbean to do that..
              Thanks

  • ViInstallHandler for event callbacks issue

    My app register callbacks for two events IO_COMPLETION and SERVICE_REQ (two viInstallHandler calls one after other). This perfectly works with the old version GPIB version 1. and VISA 2.1 but do not work with VISA 2.6.1 and GPIB driver NI488 2.2.1.
    However, if my application only registers for IO_COMPLETION, the call back function is triggered after viWrite for command "*IDN?\n".
    What needs to be done if both of the events to trigger the callbacks in a session?

    Please verify which NI-488 version you have - do you mean that you have NI-488.2 2.1? (I don't think that 2.2.1 exists.) If my guess is correct, you should upgrade to NI-488.2 2.2 at www.ni.com/downloads. There were some fixes related specifically to this bug.
    While you're at it, I suggest upgrading to NI-VISA 3.1. There have been a handful of GPIB-related bug fixes in that upgrade as well.
    Dan Mondrik
    National Instruments

  • ICal no longer listening for event notifications in 10.5.4

    Up until 10.5.4, iCal would automatically add todo's and calendar events to its display when an event was created from an external app using the CalendarStore framework...
    Not anymore... The events are created, but you need to click on a different view to get iCal to realize something has been added to the calendar
    What's the normal way to submit a bug report to Apple on this?

    Hi,
    the normal way is to submit feedback over here: http://www.apple.com/feedback/ical.html
    Björn

  • Listening for an event in main from a component

    Hi
    Ok so i have a Flash Builder project 4.5 that i created in Flash Catalyst thats draws all its data from MySql and four months into the build, as this is my first web project im noticing that when the page loads up in the browser it loads everything at once! and as im hoping to reuse some of the same components for diffrent tasks i assume that if i put the data retrivail under events that happen within the web page this will hopeful control the data flow as well as showing the correct data depending on CurrentState!
    The problem that im having is that my buttons are in my Main Application and the data retrival process is in my components! so i was trying to create addEventListener(MouseEvent.CLICK events in a component that was listening for events in my Main application. i have search the internet but every one is talking about the process in the main or component but not both!
    Does anyone know what im talking about and could you please share some light please

    Do you ever get to a point in programming where you think that perhaps i have choosen the wrong hobby to get infatuated about
    That code worked really well targetplanet but it had a side effect that just makes me nutts lol
      as it triggered a mouse event function in the component that was initialized in Main and just made my web site go nuts . the component that we initialized was a skin but its itemRenderer component that followed had the mouse event! perhaps i better start again with me learning perhaps i missed something
    or perhaps i should just have one component to one job instead of trying to be clever and mutitask with less components!

  • Listening for several input queues

    Hi!
    My application receives messages from several queues. I also need to know for each message what queue is it from. That's why I had to define separate MessageListener's for each queue. So each queue has its instance of MyListener (see below). I synchronized the onMessage method on static Object, so only one message from all queues is processed in given moment:
    MyListener implements MessageListener
    static Object object;
    onMessage (Message message)
    synchronized (object)
    //process
    The problem is, that while processing current message, new messages (I suppose one per queue) are already taken from the queue and waiting to be processed. Thus if my application will shut down I will loose at least one message per queue. I'd like to hear your suggestions.
    Thanks.

    Rather than creating multiple listeners, you can write one listener with a case like structure:
    public void onMessage(Message m) {
    Queue queue = (Queue) m.getJMSDestination();
    String name = queue.getName();
    if (name.equals("q1")) {
    // what the message listener for q1 would do ...
    } else if (name.equals("q2")) {
    // etc
    You can then register this message listener for multiple queues. The motivation for doing this was a requirement that the execution of the message listeners had to be serialized. You can also achieve this by creating the queue receivers from the same session.
    If there is no serialization requirement it's a matter of taste whether you prefer the combo listener above or multiple listeners. In this case you also can create the sessions from different connections to get concurrent message dispatch and possibly better performance.
    - Bjarne.

  • Failed Event Queue

    Does anyone know what is involved in writing a custom event handler that will process
    messages of the WLI_FAILEDEVENT Queue?
    I tried writing an MDB that would listen to that queue, however I believe a listener
    for that queue alread exists.
    Thanks

    Does anyone know what is involved in writing a custom event handler that will process
    messages of the WLI_FAILEDEVENT Queue?
    I tried writing an MDB that would listen to that queue, however I believe a listener
    for that queue alread exists.
    Thanks

  • Listening to Events from inside loaded swf

    In Flash Builder 4 I have a swfLoader with which I load swf files. The swf files that get loaded get created in Flash Pro, and I would like to be able to listen for events from the level that they get loaded from. What would I have to specify in the Flash file for the path? Can't seem to be able to specify the right path.
    Thanks a lot for any help!

    I wouldnt say this is elegant but we have been having issues gaining direct access to the SWF's loaded in via OSMF. However I have done setups where I dispatch an event from a SWF and have it bubble up and catch it on the MediaContainer level. Not elegant but works- otherwise may need to make a custom MediaElement and bypass the SWFElement to gain tighter control - seems like there should be a better way, but I havnt found it.

  • Suggestions for debugging the event queue

    Hello,
    I have an issue where an exception is thrown inside the AWT-EventQueue-0 and I can't quite figure out where it's coming from. I can replicate it relatively easily, but the action that I do to replicate it actually does all kinds of stuff behind the scenes so it's not so easy to sort out what's going on. I'm debugging with eclipse if it matters. The stack trace mentions none of my code and only mentions java library code. I tried overriding dispatchEventImpl in the components I wrote that are involved in the aforementioned action that causes it to happen, with hope of catching the exception in there and putting a breakpoint or something to give me a clue, but apparently dispatchEventImpl cannot be overridden (not sure why). Ofcourse, once the EventQueue dies from this exception so does the rest of the GUI so that's no help either. I tried adding a break on uncaught ClassCastExceptions and make the break suspend the whole VM instead of just the one thread, and then I look at the two processor threads involved with the action above and that wasn't too much help, they were sitting waiting to read something from the queue, meaning it whatever is happening in the EventQueue is delayed enough that I can't rely on catching it that way. Any and all suggestions/hints/etc are highly appreciated.
    The components in question have a panel that's a Box (vertical) that contains subpanels, each with a title and a table (and those subpanels can be expanded/contracted to show/not show the table), the tables are sorted by one of their columns, the panels are sorted by the title, and panels/table rows are added and/or removed by messages coming in from a remote server. The user can click a button to "accept" a table row (which may appear in several of the subpanel tables) at which point the server is alerted to this, and any place this row is shown is removed).
    Here is the stack trace (i hope there are no typos, I had to retype it since machine code is on can't be networked to internet):
    Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException
    at javax.swing.LayoutComparator.compare(Unknown Source)
    at java.util.Arrays.mergeSort(Unknown Source)
    at java.util.Arrays.mergeSort(Unknown Source)
    at java.util.Arrays.mergeSort(Unknown Source)
    at java.util.Arrays.mergeSort(Unknown Source)
    at java.util.Arrays.mergeSort(Unknown Source)
    at java.util.Arrays.mergeSort(Unknown Source)
    at java.util.Arrays.mergeSort(Unknown Source)
    at java.util.Arrays.mergeSort(Unknown Source)
    at java.util.Arrays.sort(Unknown Source)
    at java.util.Collections.sort(Unknown Source)
    at javax.swing.SortingFocusTraversalPolicy.enumerateAndSortCycle(Unknown Source)
    at javax.swing.SortingFocusTraversalPolicy.getFirstComponent(Unknown Source)
    at javax.swing.LayoutFocusTraversalPolicy.getFirstComponent(Unknown Source)
    at javax.swing.SortingFocusTraversalPolicy.getDefaultComponent(Unknown Source)
    at java.awt.FocusTraversalPolicy.getInitialComponent(Unknown Source)
    at java.awt.Window.getMostRecentFocusOwner(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.SequencedEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

    I believe I maaaay have figured out what's going on, though I'm not sure how to go about fixing it, heh.
    Ok, so the Box that contains all the subpanels, I'm trying to keep sorted by title of the subpanels. For this reason (and other cross-referencing reasons) I keep a Vector of the object from which the title is constructed in the panel containing the box, as well as a Vector of the subpanels. When I wish to add a new panel I first add it to the Vector (and the title object to its Vector), then I sort those Vectors, then I do a removeAll() on the Box, then re-add the subpanels to the Box while stepping through the subpanel Vector, that way I'm guaranteed they are in order (actually it's probably unnecessary to keep the title vector in addition to the other one, I just haven't gotten around to trimming that kind of stuff out since I've been dealing with this issue). And it works fine.. seemingly.
    constructor()
      anEntry = new Vector<MySubpanel>();
      myTitlesVector = new Vector<TitleObject>();
      boxPanel = new Box(BoxLayout.Y_AXIS);
    //this function is called from a protected one that constructs the anEntry, makes sure it should be added, and does a synchronize on panelVector
    private void addEntry(MySubpanel anEntry)
      if(anEntry != null)
        try
          if(panelVector.add(anEntry))
            Collections.sort(panelVector);
            myTitlesVector.add(anEntry.title);
            Collections.sort(myTitlesVector);
            boxPanel.removeAll();
            for(int i = 0; i < panelVector.size(); i++)
              boxPanel.add(panelVector.get(i));
        catch (IllegalStateException isex)
          //couldn't add it
    }So what's the problem?
    Well, clicking the "accept" button I mentioned in the first post pops up a dialogue frame, which when the user OKs tells the server and other places in client that it was accepted. But when that dialogue box goes away the focus comes back to the main client frame. Well, that kicks off that sequence of calls in the event queue I put in the first post. If it just so happens that that topmost call is being performed on this panel containing the Box after the Box has gotten the removeAll() call, but before it's been filled back up to full, one or more of the MySubpanels will have a null for a parent, which causes the LayoutComparator to throw a ClassCastException.
    So, I guess my question would be, is there a better way to maintain order in the Box (one in which the components stay in there, but are just moved around)? I can't pass the Box itself to Collections. Is there a way to move components around what order they are in right on the Box?
    Thanks!

  • Two listener for the same queue - different extraction rule

    Hi all.
    I've the following situation that I'm trying to troubleshoot.
    OSB communicates with another system using JMS Queues.
    One queue for teh request, one for the response.
    Depending on the kind of service, the request is published on the request using a dynamical routing to a Business Service. Depending on the cases, this business service could be:
    1. Just insertion on the queue (no response required)
    2. "Queue Manager" - Insertion and wait for response (response required, JMS Correlation ID as correlation pattern)
    About the extraction from the response queue, when the messages are published from the "Queue Manager", then they must be extracted from the same resource based on the Correlation ID.
    Otherwise, all the messages published in other way (not the "Queue Manager" but the option #1), a different resource should extract them from the response queue (a proxy service with protocol JMS).
    What happens at runtime is that the messages published from the "Queue Manager" are extracted from the other resource.
    How can I solve this?
    Do I need to use two separate queues or there is a way to configure two different listener on the queue, one based on the JMS Correlation ID and the other one that extracts all the other requests?
    Thanks in advance to anyone that will help.

    Unfortunately, I've already evaluate the message selector option, but in the following case:
    BS1 (Request Only)----->JMSQRequest ----->Your Logic ----->JMS Reponse--->JMS Proxy service with Message selector
    The JMS Proxy with message selector should know the value that is the key for the extraction. In this case we have not this infornation since when we run this scenario there is an external system that extracts the request and provides the response... and in the middle we lost the informations (e.g. if we use a key ID, the Proxy with message selector doesn't knwo which value is has to search for in the ID).
    For the moment I think that the best solution could be to have two separate queues, but I'm trying to figure out if there is any other option.

Maybe you are looking for

  • Redundent mail server setup (backup mail server)

    i have been reading all the post of setting up a mackup postfix server. i have looked at the configuration files and have a second machine ready to be implemented but have some questions on how exactly the backup works. my current setup is: - xserve1

  • Keyboard unable to start bootcamp

    I have had boot camp for the past year, and i had a wireless keyboard. well in my infinite wisdom I spilled hot chocolate on it. And I'm sure most of you know that a raindrop on any apple keyboard will render almost useless. So I went out to the appl

  • FCP Filter control brightness? - washed out - too bright?

    We filmed a high school jazz choir presentation, 4 -HD canon HFS 20 cameras. We had the white balance set to incandescent. The video was edited using multiclip. It all looks very good, on all the close up cameras. The wider shots look a little washed

  • HT4061 I have black and white lines on my screen what is up?

    My screen is displaying black and white lines. How do I fix it?

  • HP LaserJet P1005 not working with Snow Leopard

    Has anyone managed to get this printer to work with Snow Leopard 10.6? I have installed the latest drivers* from the HP website which BTW do not say they support 10.6 , see http://is.gd/2DfcE *Not sure exactly what the version number of the drivers i