Listening to EDN Events in ODI

Hello Gurus
Can ODI 11G listen to EDN Events from Weblogic server ? I have to invoke my ODI Scenario when an EDN event is raised from an application running inside a Weblogic Server. I can think of couple of indirect ways of solving this.
Option 1
Deploy a SOA composite that can subscribe to the EDN event and invoke ODI Scenario as a webservice.
Option 2
I saw some articles which talk about ODI subscribing to a JMS Queue / Topic. I know EDN Queues are based on Oracle AQ. So if there a way in which these AQs can be exposed as Foreign JMS queues on Weblogic server, it can be exposed as a JMS Queue to ODI.
Are there any direct ways to solve this ODI Scenario being triggered on a EDN Event?

There is no direct way to invoke odi scenario on WLS event. The two options you have specified seems fine. Additionally you can also write java program to listen on these event (if wls provides public apis to do this) and invoke odi scenario through invocation API.

Similar Messages

  • BPM Studio (11.1.1.7) crashes when I create EDN Event in namespace containing trailing slash

    Hi Everyone!
    Just FYI.
    I've lost a day to find cause of jdev crashing.. and the result is very.. you know.. strange..
    When i'm trying to create EDN Event (*.edl) in namespace that contains a trailng slash - JDev crushes.
    Actually it crashes while rebuilding content of  the Business Catalog folder.
    After jdev restarting, the event appears in Evetns folder under empty (with out name) subfolder.
    But any action that leads to rebuilding the Business Catalog (ex. creating human task definition) ends with jdev crash.
    The error stack see below.
    Regards,
    Oleg.
    Performing action Save All[ from oracle.ide.navigator.ProjectNavigatorWindow ]
    Invoking command: [ from oracle.ide.navigator.ProjectNavigatorWindow ]
    Performing action Event[ from oracle.bpm.fusion.studio.navigator.ProjectNavigatorWindow ]
    Performing action Event[ from oracle.bpm.fusion.studio.navigator.ProjectNavigatorWindow ]
    Dec 02, 2013 7:52:34 PM oracle.ideimpl.index.ProjectTracker$ProjectListener invokeListener
    SEVERE: Exception in FileChangeListener oracle.bpm.fusion.repository.fs.FusionFileSystem$1
    java.lang.IllegalArgumentException: Unable to find typeName 'Events.' on the catalog
      at oracle.bpm.project.io.fs.FileProjectLoader$1.typeAdded(FileProjectLoader.java:262)
      at oracle.bpm.type.catalog.CatalogListeners.fireTypeAdded(CatalogListeners.java:30)
      at oracle.bpm.type.DefaultComponentCatalog.fireTypesAdded(DefaultComponentCatalog.java:1063)
      at oracle.bpm.type.DefaultComponentCatalog.addInternal(DefaultComponentCatalog.java:925)
      at oracle.bpm.type.DefaultComponentCatalog.addNoStore(DefaultComponentCatalog.java:808)
      at oracle.bpm.project.catalog.bundles.ComponentBundleTypeIndex.add(ComponentBundleTypeIndex.java:107)
      at oracle.bpm.project.catalog.bundles.ProjectCatalogComponentBundle.addTypeToCatalog(ProjectCatalogComponentBundle.java:570)
      at oracle.bpm.project.catalog.bundles.ProjectCatalogComponentBundle.access$900(ProjectCatalogComponentBundle.java:84)
      at oracle.bpm.project.catalog.bundles.ProjectCatalogComponentBundle$BusinessCatalogResourceListener.resourceAdded(ProjectCatalogComponentBundle.java:1185)
      at oracle.bpm.project.catalog.recognizer.VFileSystemBundleContext$1.onFileEvent(VFileSystemBundleContext.java:159)
      at oracle.bpm.io.fs.VFileSystem$DispatchEventImmediate.dispatch(VFileSystem.java:284)
      at oracle.bpm.io.fs.VFileSystem.dispatchEvent(VFileSystem.java:195)
      at oracle.bpm.io.fs.VFileSystem.fireEvent(VFileSystem.java:116)
      at oracle.bpm.fusion.repository.fs.FusionFileSystem$1$2.run(FusionFileSystem.java:232)
      at oracle.bpm.fusion.repository.fs.FusionFileSystem$1.filesChanged(FusionFileSystem.java:239)
      at oracle.ideimpl.index.ProjectTracker$ProjectListener.invokeListener(ProjectTracker.java:253)
      at oracle.ideimpl.index.ProjectTracker$ProjectListener.invokeListeners(ProjectTracker.java:243)
      at oracle.ideimpl.index.ProjectTracker$ProjectListener.filesChanged(ProjectTracker.java:226)
      at oracle.ideimpl.index.file.ActiveRootManager$ActiveRootListener.invokeListeners(ActiveRootManager.java:232)
      at oracle.ideimpl.index.file.ActiveRootManager$ActiveRootListener.invokeListeners(ActiveRootManager.java:224)
      at oracle.ideimpl.index.file.ActiveRootManager$ActiveRootListener.notifyEvent(ActiveRootManager.java:207)
      at oracle.ide.net.URLFileSystem.fireURLFileSystemEvent(URLFileSystem.java:2033)
      at oracle.ide.net.URLFileSystem.fireURLFileSystemEvent(URLFileSystem.java:1938)
      at oracle.ide.net.URLFileSystem$1.run(URLFileSystem.java:1373)
      at oracle.ide.net.URLFileSystem$TrackedOutputStream.close(URLFileSystem.java:2456)
      at java.io.FilterOutputStream.close(FilterOutputStream.java:160)
      at oracle.tip.tools.ide.events.util.CreateEventsCommand.doIt(CreateEventsCommand.java:63)
      at oracle.tip.tools.ide.events.projectwizard.JDevProjectBuilder.createIDEProject(JDevProjectBuilder.java:86)
      at oracle.tip.tools.ide.events.projectwizard.EventsProjectCreationWizard.handleFinish(EventsProjectCreationWizard.java:135)
      at oracle.tip.tools.ide.events.projectwizard.EventsProjectCreationWizard.display(EventsProjectCreationWizard.java:122)
      at oracle.tip.tools.ide.events.projectwizard.EventsProjectCreationWizard.display(EventsProjectCreationWizard.java:106)
      at oracle.tip.tools.ide.events.projectwizard.WizardLauncher.invokeWizard(WizardLauncher.java:95)
      at oracle.tip.tools.ide.events.projectwizard.WizardLauncher.invoke(WizardLauncher.java:75)
      at oracle.bpm.fusion.soa.action.provider.CatalogModuleActions$EventAction.run(CatalogModuleActions.java:196)
      at oracle.bpm.ui.action.BaseAction.runWithSelection(BaseAction.java:303)
      at oracle.bpm.ui.action.BaseAction.runWithSelection(BaseAction.java:296)
      at oracle.bpm.fusion.ui.action.IdeMenuAdapter$1.handleEvent(IdeMenuAdapter.java:134)
      at oracle.ide.controller.IdeAction.performAction(IdeAction.java:529)
      at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:897)
      at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:501)
      at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
      at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
      at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
      at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
      at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
      at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
      at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
      at java.awt.Component.processMouseEvent(Component.java:6505)
      at javax.swing.JComponent.processMouseEvent(JComponent.java:3320)
      at java.awt.Component.processEvent(Component.java:6270)
      at java.awt.Container.processEvent(Container.java:2229)
      at java.awt.Component.dispatchEventImpl(Component.java:4861)
      at java.awt.Container.dispatchEventImpl(Container.java:2287)
      at java.awt.Component.dispatchEvent(Component.java:4687)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
      at java.awt.Container.dispatchEventImpl(Container.java:2273)
      at java.awt.Window.dispatchEventImpl(Window.java:2719)
      at java.awt.Component.dispatchEvent(Component.java:4687)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
      at java.awt.EventQueue.access$200(EventQueue.java:103)
      at java.awt.EventQueue$3.run(EventQueue.java:694)
      at java.awt.EventQueue$3.run(EventQueue.java:692)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
      at java.awt.EventQueue$4.run(EventQueue.java:708)
      at java.awt.EventQueue$4.run(EventQueue.java:706)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
    java.lang.IllegalArgumentException: Unable to find typeName 'Events.' on the catalog
      o.bpm.project.io.fs.FileProjectLoader$1.typeAdded(FileProjectLoader.java:262)
      o.bpm.type.catalog.CatalogListeners.fireTypeAdded(CatalogListeners.java:30)
      o.bpm.type.DefaultComponentCatalog.fireTypesAdded(DefaultComponentCatalog.java:1063)
      o.bpm.type.DefaultComponentCatalog.addInternal(DefaultComponentCatalog.java:925)
      o.bpm.type.DefaultComponentCatalog.addNoStore(DefaultComponentCatalog.java:808)
      o.bpm.project.catalog.bundles.ComponentBundleTypeIndex.add(ComponentBundleTypeIndex.java:107)
      o.bpm.project.catalog.bundles.ProjectCatalogComponentBundle.addTypeToCatalog(ProjectCatalogComponentBundle.java:570)
      o.bpm.project.catalog.bundles.ProjectCatalogComponentBundle.access$900(ProjectCatalogComponentBundle.java:84)
      o.bpm.project.catalog.bundles.ProjectCatalogComponentBundle$BusinessCatalogResourceListener.resourceAdded(ProjectCatalogComponentBundle.java:1185)
      o.bpm.project.catalog.recognizer.VFileSystemBundleContext$1.onFileEvent(VFileSystemBundleContext.java:159)
      o.bpm.io.fs.VFileSystem$DispatchEventImmediate.dispatch(VFileSystem.java:284)
      o.bpm.io.fs.VFileSystem.dispatchEvent(VFileSystem.java:195)
      o.bpm.io.fs.VFileSystem.fireEvent(VFileSystem.java:116)
      o.bpm.fusion.repository.fs.FusionFileSystem$1$2.run(FusionFileSystem.java:232)
      o.bpm.fusion.repository.fs.FusionFileSystem$1.filesChanged(FusionFileSystem.java:239)
      o.ii.index.ProjectTracker$ProjectListener.invokeListener(ProjectTracker.java:253)
      o.ii.index.ProjectTracker$ProjectListener.invokeListeners(ProjectTracker.java:243)
      o.ii.index.ProjectTracker$ProjectListener.filesChanged(ProjectTracker.java:226)
      o.ii.index.file.ActiveRootManager$ActiveRootListener.invokeListeners(ActiveRootManager.java:232)
      o.ii.index.file.ActiveRootManager$ActiveRootListener.invokeListeners(ActiveRootManager.java:224)
      o.ii.index.file.ActiveRootManager$ActiveRootListener.notifyEvent(ActiveRootManager.java:207)
      o.i.net.URLFileSystem.fireURLFileSystemEvent(URLFileSystem.java:2033)
      o.i.net.URLFileSystem.fireURLFileSystemEvent(URLFileSystem.java:1938)
      o.i.net.URLFileSystem$1.run(URLFileSystem.java:1373)
      o.i.net.URLFileSystem$TrackedOutputStream.close(URLFileSystem.java:2456)
      j.io.FilterOutputStream.close(FilterOutputStream.java:160)
      o.tip.tools.ide.events.util.CreateEventsCommand.doIt(CreateEventsCommand.java:63)
      o.tip.tools.ide.events.projectwizard.JDevProjectBuilder.createIDEProject(JDevProjectBuilder.java:86)
      o.tip.tools.ide.events.projectwizard.EventsProjectCreationWizard.handleFinish(EventsProjectCreationWizard.java:135)
      o.tip.tools.ide.events.projectwizard.EventsProjectCreationWizard.display(EventsProjectCreationWizard.java:122)
      o.tip.tools.ide.events.projectwizard.EventsProjectCreationWizard.display(EventsProjectCreationWizard.java:106)
      o.tip.tools.ide.events.projectwizard.WizardLauncher.invokeWizard(WizardLauncher.java:95)
      o.tip.tools.ide.events.projectwizard.WizardLauncher.invoke(WizardLauncher.java:75)
      o.bpm.fusion.soa.action.provider.CatalogModuleActions$EventAction.run(CatalogModuleActions.java:196)
      o.bpm.ui.action.BaseAction.runWithSelection(BaseAction.java:303)
      o.bpm.ui.action.BaseAction.runWithSelection(BaseAction.java:296)
      o.bpm.fusion.ui.action.IdeMenuAdapter$1.handleEvent(IdeMenuAdapter.java:134)
      o.i.controller.IdeAction.performAction(IdeAction.java:529)
      o.i.controller.IdeAction.actionPerformedImpl(IdeAction.java:897)
      o.i.controller.IdeAction.actionPerformed(IdeAction.java:501)
      jx.s.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
      jx.s.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
      jx.s.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
      jx.s.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
      jx.s.AbstractButton.doClick(AbstractButton.java:376)
      jx.s.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
      jx.s.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
      j.a.Component.processMouseEvent(Component.java:6505)
      jx.s.JComponent.processMouseEvent(JComponent.java:3320)
      j.a.Component.processEvent(Component.java:6270)
      j.a.Container.processEvent(Container.java:2229)
      j.a.Component.dispatchEventImpl(Component.java:4861)
      j.a.Container.dispatchEventImpl(Container.java:2287)
      j.a.Component.dispatchEvent(Component.java:4687)
      j.a.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
      j.a.LightweightDispatcher.processMouseEvent(Container.java:4492)
      j.a.LightweightDispatcher.dispatchEvent(Container.java:4422)
      j.a.Container.dispatchEventImpl(Container.java:2273)
      j.a.Window.dispatchEventImpl(Window.java:2719)
      j.a.Component.dispatchEvent(Component.java:4687)
      j.a.EventQueue.dispatchEventImpl(EventQueue.java:735)
      j.a.EventQueue.access$200(EventQueue.java:103)
      j.a.EventQueue$3.run(EventQueue.java:694)
      j.a.EventQueue$3.run(EventQueue.java:692)
      j.security.AccessController.doPrivileged(Native Method)
      j.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      j.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
      j.a.EventQueue$4.run(EventQueue.java:708)
      j.a.EventQueue$4.run(EventQueue.java:706)
      j.security.AccessController.doPrivileged(Native Method)
      j.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      j.a.EventQueue.dispatchEvent(EventQueue.java:705)
      j.a.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
      j.a.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
      j.a.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
      j.a.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
      j.a.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
      j.a.EventDispatchThread.run(EventDispatchThread.java:91)

    After I changed JDK from 1.7 back to 1.6 (Java 6 Update 45, 64bit) to run JDev, it worked fine.
    To do this, set Java Home in jdev.conf file in %MW_HOME%/jdeveloper/jdev/bin.
    For example: SetJavaHome C:\Program Files\Java\jdk1.6.0_45
    Certification information: Oracle JDeveloper and Application Development Framework 11g
    32 bit JDK required for profiling features.
    64 bit JDK supported for Windows as of JDeveloper 11.1.1.4.0
    For JDK 6, update 39 or later is recommended; for JDK 7, update 10 or later is recommended
    JDeveloper bundles Integrated WLS 10.3.5, which does not support JDK 7. To use JDK 7 for JDeveloper and Integrated WLS, you can install WLS 10.3.6 separately and create an "Integrated Server" connection to it from JDeveloper
    On Mac OS 10.5 Java for Mac OS X 10.5 Update 8 or later is recommended, on Mac OS 10.6 Java for Mac OS X 10.6 Update 3 or later is recommended
    My Environment:
    Windows Server 2008 R2 SP1 64 Bit
    Weblogic Server 10.3.5
    JDeveloper 11.1.1.7.0
    Hope it helps.
    Zaka Lei

  • Handling EDT issues when listening to model events with ModelViewPresenter

    I'm planning on using model-view-presenter (passive screen/humble dialog variant) http://martinfowler.com/eaaDev/PassiveScreen.html as the basis for my Swing application.
    view <-> presenter <-> model
    The view is very thin and dumb and only shows what presenter tells it to. Presenter listens to UI events from the view, updates the model based on them, listens to model update events, and reads view state and updates view state.
    I'm now searching for a good practise for handling EDT-threading problem. The model is inherently multithreaded in the sense that we have several threads running concurrently. They for example fetch data from different sources and update the model accordingly. An event is created, presenter listens to it and updates the view.
    There's also operations that the user initiates. Those start in EDT, presenter does some actions on the model and possibly updates the view state as a result. If the action is fast, the whole thing can be done in EDT. If the operation takes a long time, the processing needs to jump out of EDT at some point to not block the UI.
    When thinking about the events that are created from model due to some background thread, where should we jump back to EDT? There's options:
    a) jump to EDT when presenter updates the view
    view (EDT) <- presenter (either EDT or other thread) <- model (either EDT or other thread)
    b) jump to EDT when moving to presenter layer
    view (EDT) <- presenter (EDT) <- model (either EDT or other thread)
    a)
    - could be implemented by creating an AOP aspect for all View interfaces(?) The aspect would jump to EDT if not there yet always when any method of the interface is called
    - if one ModelEvent is received in non-EDT thread in Presenter, and 15 different View setters need to be called to update the view state, causes 15 separate SwingUtilities.invokeLater() calls...problem?
    - model events and eventlisteners are straight forward to implement. Presenter and model do not need to be aware of Swing (existence of event dispatch thread)
    - Presenter is multithreaded and presenter objects need to be implemented so that threading problems do not occur
    b)
    - could be implemented for example by creating special model EventListener implementations that jump back to EDT when event is received
    - model events and eventlisteners are not as straightforward to do as with a). Somewhere the events need to jump to EDT (event source or listener) and you cannot code just "simple plain" listeners and event sources
    - Presenter needs to be aware of Swing (existence of event dispatch thread and need to jump back to it when events come from model) at least in the sense that it uses the correct EventListener implementations
    - View interface could still check that thread = EDT when methods are called (using similar AOP) to ensure threading rules are not broken
    - Presenter can be single threaded (always in EDT) and presenter implementer does not need to worry as much about threading
    - note that above point requires that user-initiated long running operations, that can't be run in EDT, need to jump from EDT the model layer. If view initiates new non-EDT threads (for example using SwingWorker), Presenter still does have multiple threads running on it (although only "one way", from view to model) and needs to be made threadsafe. This is starting to sound bad, but even if Presenter is single threaded only "one way", it may still be easier to implement than presenter that is completely multithreaded?
    I think major point in deciding is the difficulty of creating thread safe Presenters. Thread safe code is notoriously difficult to implement and even things that seem trivial at first sight can cause big problems. I can't help thinking that since the application's core is already multithreaded by nature, how much more difficult can it be to make the Presenters thread safe as well? Presenters should be quite simple in any case, can receiving events from model and calling a few setters on the view cause threading problems?
    Note that this problem is not limited to programs where background threads update the data....any program where some long running operations are run outside of EDT, and may cause events that are listened to in some presenter, has to solve this issue.
    Any views or ideas?

    RickyT wrote:
    Hello Helpful Nokia Users,
    When I am using my BH 103 blue tooth stereo earphones to listen to music on my N900, the sound drops out for about half a second (or less) then the music sounds slower (like a record player that has been slowed down) for about 4 seconds, then goes back to normal. This sometimes happens on each song, one after the other, sometimes it is just @ random times.
    This NEVER happens when using plug in head phones or when I hook it up to my stereo.
    The BH 103 are about 2 years old.... would the battery be failing? Causing them to run out of power super quickly? My N95 8GB used to beep when the battery in the earphones was low, would the N900 be "pausing" instead?
    Are the BH 103 not compatiable with the N900.... even though Nokia store lists them as accessories. Would I be better off with a newer model of ear phones?
    Cheers for your help!
    i think its the battery issue .
    Reality is wrong....dreams are for real... 2pac .
    don't forget to hit that green kudos

  • Listening for an event outside of the object...

    Hey, I spent a lot of my day trying to figure out how to
    listen for an event outside of an instantiated object of my own.
    I made my own class called
    Link. When my Link class is instantiated, a Loader object
    (var loader:Loader) is added and it loads a user-specified external
    PNG file. I want to track the Event.COMPLETE event OUTSIDE of my
    Link class, like in my FLA's Actionscript.
    So, I tried a few things without any luck, and by these you
    might get the idea of exactly what I'm trying to do:
    var link1:Link = new Link(...);
    link1.loader.addEventListener(Event.COMPLETE, handler);
    That didn't work, so I tried:
    var link1.Link = new Link(...);
    var loader = link1.getChildByName("loader") as Loader;
    loader.addEventListener(Event.COMPLETE, handler);
    ... that didn't work either. :(
    Any ideas?
    If I am taking the completely wrong approach please do let me
    know. If there's ANY way to know WHEN my loader has completed
    loading its image outside of my Link class...
    Thanks!
    ~ Andrew Merskin

    Let your Link class handle the Loader events. When
    Event.COMPLETE fires,
    just redispatch the event or dispatch a custom event.
    Example 1:
    link1.addEventListener("ALLDONELOADING", linkEventHandler);
    function linkEventHandler(event:Event)
    if(event.type == "ALLDONELOADING")
    // do something or nothing at all
    // Inside your link class you are listening for the load
    complete
    function loadCompleteHandler(event:Event)
    dispatchEvent(new Event("ALLDONELOADING")));
    Example 2:
    link1.addEventListener(Event.COMPLETE, linkEventHandler);
    function linkEventHandler(event:Event)
    if(event.type == Event.COMPLETE)
    // do something or nothing at all
    // Inside your link class you are listening for the load
    complete
    function loadCompleteHandler(event:Event)
    dispatchEvent(event);

  • How to create many objects listening for one event

    I'm experimenting with the EventDispatcher class and I have a
    test class working. I want to use a loop to create a variety of
    movie clips that all listen for an event that gets dispatched every
    half a second. I have the event dispatching properly. My problem is
    that when creating the objects, the temporary variable I use to
    hold each created object has a life that extends beyond the loop in
    which it is instantiated. Rather than all five created objects
    changing color, only the last one changes color (see the code
    below--it lives on the first frame of an FLA file).
    This is not entirely surprising when I look at the code --
    'this' refers to the global scope and 'square' refers to the last
    created object that it pointed to. Here's the resulting trace:
    handler runing, square name is square 4
    this class name is global
    handler runing, square name is square 4
    this class name is global
    handler runing, square name is square 4
    this class name is global
    handler runing, square name is square 4
    this class name is global
    handler runing, square name is square 4
    this class name is global
    How can I modify this code so that each square object changes
    its own color?

    graphics.clear in the context of that function handler in my
    code would refer not to the squares but to the global scope,
    wouldn't it? In which case you'd be clearing all the graphics from
    your top level movie. I tried changing 'square.graphics' to just
    'graphics' in my handler and my squares just remained the original
    steady black.
    Your code doesn't use a loop and therefore isn't re-using a
    variable. You've escaped my 'logical errors' through brute force.
    (BTW, I think my code would work in AS2 if I used the old-school
    draw methods). Suppose you had to create 100 objects? Would you
    want to manually instantiate each one, typing that function over
    and over again? You'd have 500 lines of highly redundant code!
    Maybe try your example using a loop instead? I think you'll
    find it's pretty tough to sneak any vars like 'i' or 'square' from
    the global scope into the handler--the handler refers to the
    living, breathing variable rather than it's value at the time the
    handler was instantiated. Furthermore, you can't sneak any
    information about the square into your handler via the event object
    because the event object is created in a totally different place.

  • Listening for click event

    I am curious, how can you have a child mxml page listen for
    an event from the parent?
    Let's say you have a button, call it 'btn1' on page1.mxml and
    you want to listen for the click event on page2.mxml. So far this
    is what I have:
    page1.mxml:
    <mx:Button id="btn1" />
    page2.mxml:
    <mx:Script>
    <![CDATA[
    private function btnListener(e:MouseEvent){
    Application.application.btn.addEventListener(MouseEvent.CLICK,
    setState(1));
    ]]>
    </mx:Script>

    "spacehog" <[email protected]> wrote in
    message
    news:glljts$g04$[email protected]..
    >I am curious, how can you have a child mxml page listen
    for an event from
    >the
    > parent?
    >
    > Let's say you have a button, call it 'btn1' on
    page1.mxml and you want to
    > listen for the click event on page2.mxml. So far this is
    what I have:
    >
    > page1.mxml:
    >
    > <mx:Button id="btn1" />
    >
    > page2.mxml:
    >
    > <mx:Script>
    > <![CDATA[
    >
    >
    > private function btnListener(e:MouseEvent){
    >
    Application.application.btn.addEventListener(MouseEvent.CLICK,
    > setState(1));
    > }
    > ]]>
    > </mx:Script>
    Check out Q3:
    http://www.magnoliamultimedia.com/flex_examples/Amys_Flex_FAQ.pdf

  • Listening for keyPressed events from background?

    Is it possible to have a java program running in the background and listen for keyPressed events? I would like for the program to listen for certain keys to be pressed and when they are manipulate the mouse. From what I've looked at so far however it seems the listening component must have focus. Thanks.

    On any OS that would typically involve hooking into the OS itself.
    And then manipulating OS resources as well.
    Putting an app into the 'background' is also OS specific.
    Given that the above is all you want to do then java is not an appropriate language choice. C++ would be better.

  • Listening Tab Key Event On JTextField

    Hi
    i am unable to listen Tab Key Event on JTextField ....
    tField.addKeyListener(new KeyAdapter()
    public void keyPressed(KeyEvent e)
    if (e.getKeyCode()==e.VK_TAB)
    JOptionPane.showMessageDialog(null,"Tab Pressed");
    else
    JOptionPane.showMessageDialog(null,"Tab Not Pressed");
    When i pressed Tab Key then it dont come in KeyPressed Event ...Actually it go towards next FocusAble component ..
    Any help in this regard.....

    I also Checked it by using
    tField..setFocusTraversalKeysEnabled(false);
    tField.addKeyListener(new KeyAdapter()
    public void keyPressed(KeyEvent e)
    if (e.getKeyCode()==e.VK_TAB)
    JOptionPane.showMessageDialog(null,"Tab Pressed");
    else
    JOptionPane.showMessageDialog(null,"Tab Not Pressed");
    In this case each time e.getKeyCode() returns 0...
    plz help me

  • Dispatching & listening for custom events from custom component [Flex 4.1]

    I'm giving this a try for the first time and I'm not sure I have the recipe correct!
    I have a custom component - it contains a data grid where I want to double click a row and dispatch an event that a row has been chosen.
    I created a custom event
    package oss
        import flash.events.Event;
        public class PersonChosenEvent extends Event
            public function PersonChosenEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
                super(type, bubbles, cancelable);
            // Define static constant.
            public static const PERSON_CHOSEN:String = "personChosen";
            // Define a public variable to hold the state of the enable property.
            public var isEnabled:Boolean;
            // Override the inherited clone() method.
            override public function clone():Event {
                return new PersonChosenEvent(type);
    Then I try to dispatch the event within the component when the datagrid is doubleclicked:
    import oss.PersonChosenEvent
    dispatchEvent(new PersonChosenEvent(PersonChosenEvent.PERSON_CHOSEN, true, false));
    And in the parent application containing the component I do on creationComplete
    addEventListener(PersonChosenEvent.PERSON_CHOSEN,addPersonToList);
    The event does not seem to fire though. And if I try to evaluate the "new PersonChosenEvent(..." code it tells me "no such variable".
    What am I doing wrong?
    (It was so easy in VisualAge for Java, what have we done in the last 10 years?? )
    Martin

    I've done this kind of thing routinely, when I want to add information to the event.  I never code the "clone" method at all.
    Be sure that you are listening to the event on a parent of the dispatching component.
    You can also have the dispatching component listen for the event too, and use trace() to get a debug message.
    I doubt if it has anything to to with "bubbles" since the default is true.
    Sample code
    In a child (BorderContainer)
    dispatchEvent(new ActivationEvent(ActivationEvent.CREATION_COMPLETE,null,window));
    In the container parent (BorderContainer)
    activation.addEventListener(ActivationEvent.CREATION_COMPLETE,activationEvent);
    package components.events
        import components.containers.SemanticWindow;
        import components.triples.SemanticActivation;
        import flash.events.Event;
        public class ActivationEvent extends Event
            public static const LOADED:String = "ActivationEvent: loaded";
            public static const CREATION_COMPLETE:String = "ActivationEvent: creation complete";
            public static const RELOADED:String = "ActivationEvent: reloaded";
            public static const LEFT_SIDE:String = "ActivationEvent: left side";
            public static const RIGHT_SIDE:String = "ActivationEvent: right side";
            private var _activation:SemanticActivation;
            private var _window:SemanticWindow;
            public function ActivationEvent(type:String, activation:SemanticActivation, window:SemanticWindow)
                super(type);
                _activation = activation;
                _window = window
            public function get activation():SemanticActivation {
                return _activation;
            public function get window():SemanticWindow{
                return _window;

  • Component listening for a event

    I need to make 1 component listen for an event in another component..
    JMenuItem listens for a TreeSelectionEvent and in case something selected enables... and disables otherwise...
    addTreeSelectionListener() is not possible for a JMenuItem component...
    so how do i do that?
    the code below is not acceptable because there is a lot of JMenuItem objects and it's a bit messy and difficult to add each...
    tree.addTreeSelectionListener(blah) {
    JMenuItem.setEnabled(false);
    i want a component checking himself for a proper condition...
    in case it will require too much hardware resourses what would you suggest?

    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 click event on an af:image tag

    Dear All,
    Can anybody help me why my code does not work.
    Use case, using an Image, i wanted to call a managed bean method whenever I clicked the image. So here is what I did, I added a clientlistner
    and wait for the click event. Also a server listener is attached to the image.
    <af:image >
         <af:clientListener type="click" method="handleImageClick"/>
         <af:serverListener type="ImageEvent"
                           method="#{viewScope.MyBean.handleImageEvent}"/>
    </af:image>...and here is my javascript...
    <f:facet name="metaContainer">
         <af:resource type="javascript">
           function handleImageClick(evt)
                var comp = evt.getSource();
                AdfCustomEvent.queue(comp, "ImageEvent",{ fvalue : comp.getSubmittedValue()},false);
                evt.cancel();
         </af:resource>
    </f:facet>..and here is my managed bean method.
    public void handleImageEvent(ClientEvent ce)
    }I jsut dont know why it does not call my managed bean method. Is there any mistake in my code?
    JDEV 11G PS5
    Thanks

    codigoadf wrote:
    the problem is in Javascript. remove "fvalue : comp.getSubmittedValue()" and will work fine.
    AdfCustomEvent.queue(comp, "ImageEvent",{ },false);comp.getSubmittedValue()?? comp is a imageAhhh yeah..I just copy pasted this code from google..
    Thanks for your help...it now works..

  • Listen for an events for Swing objects in a separate class?

    Hi all, sorry if this is in the wrong section of the forum but since this is a problem I am having with a Swing based project I thought i'd come here for help. Essentially i have nested panels in separate classes for the sake of clarity and to follow the ideas of OO based development. I have JPanels that have buttons and other components that will trigger events. I wish for these events to effect other panels, in the Hierachy of my program:
    MainFrame(MainPanel(LeftPanel, RightPanel, CanvasPanel))
    Sorry I couldnt indent to show the hierarchy. Here LeftPanel, RightPanel and CanvasPanel are objects that are created in the MainPanel. For example i want an event to trigger a method in another class e.g. LeftPanel has a button that will call a method in CanvasPanel. I have tried creating an EventListner in the MainPanel that would determine the source and then send off a method to the relevant class, but the only listeners that respond are the ones relevant to the components of class. Can I have events that will be listened to over the complete scope of the program? or is there another way to have a component that can call a method in the class that as an object, it has been created in.
    Just as an example LeftPanel has a component to select the paint tool (its a simple drawing program) that will change a color attribute in the CanvasPanel object. Of course I realize i could have one massive Class with everything declared in it, but I'd rather learn if it is possible to do it this way!
    Thanks in advance for any help you can offer
    Lawrence
    Edited by: insertjokehere on Apr 15, 2008 12:24 PM

    Thanks for the response, ive added ActionListneres in the class where the component is, and in an external class. The Listeners work inside the class, but not in the external class
    import java.awt.event.ActionEvent;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.ActionListener;
    public class LeftPanel extends JPanel implements ActionListener {  
        /* Constructing JButtons, null until usage of the constructor */
        JButton pencilBut;
        JButton eraserBut;
        JButton textBut;
        JButton copyBut;
        JButton ssincBut;
        JButton ssdecBut;
        ActionListener a = new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                System.out.print("\nNot supported yet.");
        /* The Top Panel contains the title of program */
        public LeftPanel(Dimension d){
            /* Sets up the layout for the Panel */
            BoxLayout blo = new BoxLayout(this,BoxLayout.Y_AXIS);
            this.setLayout(blo);
            /* Sets Up the Appearance of the Panel */
            this.setMinimumSize(d);
            this.setBackground(Color.RED);
            this.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));
            /* Pencil Tool */
            pencilBut = new JButton("Pencil");
            pencilBut.setAlignmentX(Component.CENTER_ALIGNMENT);
            pencilBut.setActionCommand("pencil");
            pencilBut.addActionListener(a);
            this.add(pencilBut);
            /* Eraser Tool */
            eraserBut = new JButton("Eraser");
            eraserBut.setAlignmentX(Component.CENTER_ALIGNMENT);
            eraserBut.addActionListener(a);
            this.add(eraserBut);
            /* Text Tool */
            textBut = new JButton("Text");
            textBut.setAlignmentX(Component.CENTER_ALIGNMENT);
            textBut.addActionListener(a);
            this.add(textBut);
            /* Copy Previous Page */
            copyBut = new JButton("Copy Page");
            copyBut.setAlignmentX(Component.CENTER_ALIGNMENT);
            copyBut.addActionListener(a);
            this.add(copyBut);
            /* Stroke Size Increase */
            ssincBut = new JButton("Inc");
            ssincBut.setAlignmentX(Component.CENTER_ALIGNMENT);
            ssincBut.addActionListener(a);
            this.add(ssincBut);
            /* Stroke Size Decrease */
            ssdecBut = new JButton("Dec");
            ssdecBut.setAlignmentX(Component.CENTER_ALIGNMENT);
            ssdecBut.addActionListener(a);
            this.add(ssdecBut);
            System.out.print("\nLeftPanel Completed");
        public void actionPerformed(ActionEvent e) {
            System.out.print("\nAction Performed");
        }But this is not picked up in my external class here
    import java.awt.event.ActionEvent;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.ActionListener;
    public class MainPanel extends JPanel implements ActionListener {
        /* Creates a new the main JPanel that is used in the FlipBookFrame to contain all of the elements */
        public MainPanel(){
            /* TopPanel constraints*/
            tpcs.gridx = 1;
            tpcs.gridy = 0;
            tpcs.gridwidth = 1;
            tpcs.gridheight = 1;
            tpcs.fill = GridBagConstraints.BOTH;
            tpcs.weightx = 0.0;
            tpcs.weighty = 1.0;
            /* LeftPanel Constraints*/
            lpcs.gridx = 0;
            lpcs.gridy = 0;
            lpcs.gridwidth = 1;
            lpcs.gridheight = 3;
            lpcs.fill = GridBagConstraints.BOTH;
            lpcs.weightx = 1.0;
            lpcs.weighty = 1.0;
            /* CentrePanel Constraints*/
            cpcs.gridx = 1;
            cpcs.gridy = 1;
            cpcs.gridwidth = 1;
            cpcs.gridheight = 1;
            cpcs.fill = GridBagConstraints.NONE;
            cpcs.weightx = 0.0;
            cpcs.weighty = 0.0;
            /* RightPanel Constraints*/
            rpcs.gridx = 2;
            rpcs.gridy = 0;
            rpcs.gridwidth = 1;
            rpcs.gridheight = 3;
            rpcs.fill = GridBagConstraints.BOTH;
            rpcs.weightx = 1.0;
            rpcs.weighty = 1.0;
            /* BottomPanel Constraints*/
            bpcs.gridx = 1;
            bpcs.gridy = 2;
            bpcs.gridwidth = 1;
            bpcs.gridheight = 1;
            bpcs.fill = GridBagConstraints.BOTH;
            bpcs.weightx = 0.0;
            bpcs.weighty = 1.0;   
            this.setLayout(gblo);   //Sets the Layout of the panel to a GridBagLayout
            this.add(tp, tpcs); //Adds the TopPanel to the MainPanel using the TopPanel layout
            this.add(lp, lpcs); //Adds the LeftPanel to the MainPanel using the LeftPanel layout
            this.add(cp, cpcs); //Adds the CanvasPanel to the MainPanel using the CanvasPanel layout
            this.add(rp, rpcs); //Adds the RightPanel to the MainPanel using the RightPanel layout
            this.add(bp, bpcs); //Adds the BottomPanel to the MainPanel using the BottomPanel layout
            gblo.layoutContainer(this); //Lays Out the Container
        public PanelSizes getPanelSizes(){
            return ps;
        public void actionPerformed(ActionEvent e) {
            System.out.print("\nExternal Class finds event!");
            /*String command = e.getActionCommand();
            if (command.equals("pencil")){
                System.out.print("\nYESSSSSSSSSSSSSSSSSSSSS!");
        /* Create of objects using the PanelSizes funtions for defining the */
        PanelSizes ps = new PanelSizes();   //Creates a new PanelSizes object for sizing the panel
        CanvasPanel cp = new CanvasPanel(ps.getCentrePanelDimension()); //Creates a new Canvas Panel
        TopPanel tp = new TopPanel(ps.getHorizontalPanelDimension()); //Creates the TopPanel
        BottomPanel bp = new BottomPanel(ps.getHorizontalPanelDimension()); //Creates the BottomPanel
        LeftPanel lp = new LeftPanel(ps.getVerticalPanelDimension()); //Creates the LeftPanel
        RightPanel rp = new RightPanel(ps.getVerticalPanelDimension());   //Creates the RightPanel
        /* I have chosen to create individual constraints for each panel to allow for adding of all
         components a the end of the constructor. This will use slightly more memory but gives clarity
         in the code */
        GridBagConstraints cpcs = new GridBagConstraints();
        GridBagConstraints tpcs = new GridBagConstraints();
        GridBagConstraints bpcs = new GridBagConstraints();
        GridBagConstraints lpcs = new GridBagConstraints();   
        GridBagConstraints rpcs = new GridBagConstraints();
        GridBagLayout gblo = new GridBagLayout();
    }Any help will be greatly appreciated :-)

  • EDN: Event Misssing after 30 secs if not consumed

    I am in a situation, where i need a business event to wait for 1 hour. If the subscriber is down or not available, the Event should not die eventually. It should wait for 1 hour.
    Following are the workaround I have done:
    1. I have increased the wait time for EDNConfig (*System MBean Browser--Application Defined MBeans--Oracle.as.soainfra.config--soa-server1--EDNConfig*).
    By default it was 30000. I have changed it to 3600000. Also I have restarted the server and checked it is not affecting any thing.
    2. I have found out a table where I can see it as getting queued, but after few secs it is vanishing from the table. the table is under DEV_SOAINFRA schema, under queues Table: EDN_EVENT_QUEUE_TABLE. Also I have checked all the possible tables whether it is getting stored in any one of them.
    Any help will be appreciated.
    Thanks in Advance.
    Ravi

    Hi Ravi,
    AQ and JMS provide more configuration options & functionality than EDN for durable subscribers, error queues for undelivered/errored events, retention, and so on. Switching to these implementations might solve your issue.
    Kind regards, Ronald

  • Listener for dispatched event

    Hi,
    I had a problem which the majority of got sorted out with
    help from other people but it's left me with one last part i dont
    get...
    I have a main.swf which loads into a loader an external swf
    called menu1.swf. I'm trying to get a function triggered in the
    main.swf when it recieves an event dispatched from the menu1.swf.
    The main problem i had was getting the event to dispatch from the
    loaded swf but that's now sorted. My main problem now is where to
    add the listener in the main.swf to listen out for this event.
    I've been informed it's not the loader i should be attaching
    the listener to, but rather it's contents ( the function i want to
    call is to unload the loader once the event from the contents of
    that loader has been dispatched). Now the contents is menu1.swf,
    but i didnt think you could attach a listener to a swf? I was also
    told that once the loader has completed loading, the swf is no
    longer a swf, but instead becomes content.data...
    So what am i attaching a listener to? should it be
    loader.content.data.addEventlistener(... );
    it's got me stumped?

    Hi kglad - thanks for the reply.
    Just want to point out im using the TweenMax engine to call
    the function which will dispatch the event in the loaded.swf.
    I've added the code you suggested to the loaderComplete
    function in my main.swf script like you suggested ( to guarantee
    their be some content in the loader) and got this:
    TypeError: Error #1034: Type Coercion failed: cannot convert
    flash.events::Event@4097da9 to flash.events.MouseEvent.
    at
    flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at menu_1/menu_1::callUnload()[C:\Users\andrew\Desktop\New
    Folder (2)\work\menu_1.as:164]
    at Function/
    http://adobe.com/AS3/2006/builtin::apply()
    at
    gs::TweenLite/complete()[C:\Users\andrew\Desktop\flash\actionscripts\gs\TweenLite.as:416]
    at
    gs::TweenFilterLite/render()[C:\Users\andrew\Desktop\flash\actionscripts\gs\TweenFilterLi te.as:361]
    at
    gs::TweenLite$/executeAll()[C:\Users\andrew\Desktop\flash\actionscripts\gs\TweenLite.as:3 95]
    dont suppose you know what all that means do you? I've read
    that theirs a bug in the onComplete tween of the TweenMax engine -
    any chance that's what this is at all?...

  • 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!

Maybe you are looking for

  • Conversion of Characteristic Values to SIDs. Load Very slow

    Hi Experts,                  We have a slow load issue when loading from a Write-Optimized DSO into an InfoCube. 8 millon recs in 10 hours. We check the start, end, and rules routines and every is ok but for all the package the load was very slow in

  • Error in transporting ODS(Error when creating the export DataSource.......)

    Hi All,     When I try to transport ODS from dev to quality i m getting the following error.   <b>DataSource 8XADDR1 does not exist in source system BQ1CLNT355 of version A   Error when creating the export DataSource and dependent Objects            

  • Networking with other computers after xp updates stops

    will networking with other computers  be possible , safely after xp updates stops?

  • No sound except when headphones plugged in

    I just noticed that there is no sound on my phone except with earphones. The phone calls but I can't hear anything. I just started noticing this today. Alarm and timer sounds are okay.

  • How to hide MSO after trigger

    Hi, I am making a TOC section. below is my scenario: 1. I have a TOC icon on all slides. which when clicked opens a MSO which has topics listed with page numbers. 2. When i am on page 3 and i want to jump to page 10, i click on TOC icon on that slide