Processing msgs one at a time

Hi,
Is there any way in JMS which will help in processing messages received by onMessage() on a one at a time basis.
What I mean is, I shud not process the next message till the first one is processed?
I am assuming that onMessage() executes as soon as a message is put in the queue.
Thanks,
-raj

i am new to JMS, please can you explain more detailed, I want to process messages one at a time. Appreciate your time..

Similar Messages

  • Processing JMS messages one at a time

    Hi, I'm on a project where we're trying to synch Siebel and EBS Customer information. However there are certain events that can trigger Customer data being sent twice simultaneously; this produces problematic racing conditions when the Customer data is new to the receiving system.
    We're trying to throttle that by sending the messages to a JMS queue and process them one at a time, ie, we only want one instance of the JMS queue listener activated at any one time (we don't expect continuous load; mainly small bursts). Unfortunately I'm not sure which properties have to be changed to do this. I have created a JMS listener that consumes message, pretty much created by the adapter wizard. Currently the listener is spawning new instances just as fast as the messages come in causing EBS AppAdapter errors (can't create new Customer as it already exists).
    Here's the JMS operation definition:
    <pc:inbound_binding />
    <operation name="Consume_Message">
    <jca:operation
    ActivationSpec="oracle.tip.adapter.jms.inbound.JmsConsumeActivationSpec"
    DestinationName="jms/CustomerInterface"
    UseMessageListener="false"
    PayloadType="TextMessage"
    OpaqueSchema="false" >
    </jca:operation>
    <input>
    <jca:header message="hdr:InboundHeader_msg" part="inboundHeader"/>
    </input>
    </operation>
    </binding>
    This is the activation agent:
    <activationAgents>
    <activationAgent className="oracle.tip.adapter.fw.agent.jca.JCAActivationAgent" partnerLink="ReceiveAccountJmsAdapter">
    <property name="portType">Consume_Message_ptt</property>
    </activationAgent>
    </activationAgents>
    This is the connector-factory:
         <connector-factory location="eis/CustomerInterface" connector-name="Jms Adapter">
              <config-property name="connectionFactoryLocation" value="jms/Queue/CustomerInterface"/>
              <config-property name="factoryProperties" value=""/>
              <config-property name="acknowledgeMode" value="AUTO_ACKNOWLEDGE"/>
              <config-property name="isTopic" value="false"/>
              <config-property name="isTransacted" value="false"/>
              <config-property name="username" value="oc4jadmin"/>
              <config-property name="password" value="********"/>
              <connection-pooling use="none">
              </connection-pooling>
              <security-config use="none">
              </security-config>
         </connector-factory>
    What else will I have to do to get this to work? Or will I be forced to deploy it to it's own BPEL domain where dspMaxThreads and dspMinThreads are set to 1?
    -- Just tried to put it on its own domain and change the dspMaxThreads/dspMinThreads and that didn't work.
    - Dale
    Message was edited by:
    Dale Earnest

    Hi Al,
    Yes - it possible.
    Please read the section Describing Message Ordering of the Adapter Life-Cycle Management of the Application Server Adapter Concepts Guide found here: http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b31005/life_cycle.htm#BABJIFJI
    Best regards
    Christian Damsgaard

  • Convert ps to pdf  - watched folders process one at a time ?

    does the destiller server process the watched folders one at a time or it can process several depending on the license?
    i have the "normal" distiller and i have this problem, if a huge file is being converted, the other files from watched folders are not converted.

    I think I found my answer at a different set of instuctions at http://helpx.adobe.com/acrobat-com/kb/using-createpdf.html.  This set of instructions clearly indicates that files will be selected 1 at a time.
    Click Combine Files To PDF.
    Click Select Files.
    Select one of the files that you want to combine.
    Click Open.
    Click Add Files and select additional files to combine. Click Open."
    If anyone has any ideas on how to more quickly combine files, any help would be greatly appreciated.

  • Importing a lot of video clips from a Sony camera to FCE; during the Log and Transfer process, is there a way to add multiple clips to the browser instead of one at a time?

    Importing a lot of video clips from a Sony camera to FCE; during the Log and Transfer process, is there a way to add multiple clips to the browser instead of one at a time?

    Select one and click cmd-A which selects them all.
    Then click the import button if it hasn't started already.

  • How can I quickly get the same album art for all tracks on an album without manually doing them one at a time?

    I am having trouble with album art linked to each track. My library is ripped from my own cd's and ITunes only provides some of the artwork from a find artwork search. The rest must be found and added one at a time manually from web. This process is tedious and time consuming for me. Is there a file in iTunes related to each album that I can just drop the art once and it shows up linked to all the tracks from that album when they play? I've tried selecting all songs from an album and dragging the artwork to the artwork window once in hopes of all tracks getting the artwork at the same time with no luck. Any advice for this paltry artwork dilemma would be appreciated. If Cassidy & Greene still owned this ******* child of SoundJam I know I would not be having this problem! HaHa...Thanks for any advice/help with this problem.

    Thx 4 quick reply alexbird. Your method will work and after a little experimenting so will this: Just go to the album art view option and highlight the album you want artwork for. Drag the artwork from your album art web search page to bottom left hand album art window in iTunes and just drop it there. A small progress window then appears showing each album track adopting the dropped artwork one by one. It only takes 10-15 seconds for all of the tracks on your album to adopt the new artwork. I then went back and removed unwanted artwork(from the albums that had it) track by track from the get info menu. This goes pretty quick as you just pick track>get info>artwork>highlight art>delete>ok for each track.
    This drag/drop to the album art view page has been the simplest and most effective way I have discovered to manually import album artwork into iTunes so far. Hope this helps someone else out there. Any other methods or suggestions to do this task added to this thread will be duly noted. Thx... Oh, I am currently using iTunes 10.5.1

  • How do I delete multiple items at once instead of one at a time?

    How do I delete multiple items at once instead of one at a time? I have several duplicate items in my library and would like to delete the duplicates. Thanks!

    You can select multiple items using shift to select a range and control to add or remove items from it.
    Regarding duplciates, Apple's official advice is here... HT2905 - How to find and remove duplicate items in your iTunes library. It is a manual process and the article fails to explain some of the potential pitfalls.
    Use Shift > View > Show Exact Duplicate Items to display duplicates as this is normally a more useful selection. You need to manually select all but one of each group of identical tracks to remove. Sorting the list by Date Added may make it easier to select the appropriate tracks, however this works best when performed immediately after the dupes have been created.  If you have multiple entries in iTunes connected to the same file on the hard drive then don't send to the recycle bin. This can happen, for example, if you start iTunes with a disconnected external drive, then connect it, reimport from your media folder, then restart iTunes.
    Use my DeDuper script if you're not sure, don't want to do it by hand, or want to preserve ratings, play counts and playlist membership. See this thread for background. Please take note of the warning to backup your library before deduping, whether you do so by hand or using my script, in case something goes wrong.
    (If you don't see the menu bar press ALT to show it temporarily or CTRL+B to keep it displayed)
    tt2

  • After downloading iOS 7 on my 4S I show 8,976 on my email icon.  How can I eliminate them all without going one at a time?

    After downloading iOS 7 on my 4S it shows 8,976 on the email icon.  How can I move them all to trash without doing it one at a time?

    Apple's official advice is here... HT2905 - How to find and remove duplicate items in your iTunes library. It is a manual process and the article fails to explain some of the potential pitfalls.
    Use Shift > View > Show Exact Duplicate Items to display duplicates as this is normally a more useful selection. You need to manually select all but one of each group to remove. Sorting the list by Date Added may make it easier to select the appropriate tracks, however this works best when performed immediately after the dupes have been created.  If you have multiple entries in iTunes connected to the same file on the hard drive then don't send to the recycle bin.
    Use my DeDuper script if you're not sure, don't want to do it by hand, or want to preserve ratings, play counts and playlist membership. See this thread for background and please take note of the warning to backup your library before deduping.
    (If you don't see the menu bar press ALT to show it temporarily or CTRL+B to keep it displayed)
    tt2

  • Delete multiple duplicates at once without selecting one at a time...

    I know that you can view duplicates and then select songs one at a time to delete. Because show duplicates shows both the duplicate file and the original you need to select one duplicate and skip one for the original file for each duplicate song. The problem is I have 18000 songs so going through the duplicates one at a time like this will take way too long. How can I delete all of these duplicates without clicking on all of them one at a time?

    You can select multiple items using shift to select a range and control to add or remove items from it.
    Regarding duplciates, Apple's official advice is here... HT2905 - How to find and remove duplicate items in your iTunes library. It is a manual process and the article fails to explain some of the potential pitfalls.
    Use Shift > View > Show Exact Duplicate Items to display duplicates as this is normally a more useful selection. You need to manually select all but one of each group of identical tracks to remove. Sorting the list by Date Added may make it easier to select the appropriate tracks, however this works best when performed immediately after the dupes have been created.  If you have multiple entries in iTunes connected to the same file on the hard drive then don't send to the recycle bin. This can happen, for example, if you start iTunes with a disconnected external drive, then connect it, reimport from your media folder, then restart iTunes.
    Use my DeDuper script if you're not sure, don't want to do it by hand, or want to preserve ratings, play counts and playlist membership. See this thread for background. Please take note of the warning to backup your library before deduping, whether you do so by hand or using my script, in case something goes wrong.
    (If you don't see the menu bar press ALT to show it temporarily or CTRL+B to keep it displayed)
    tt2

  • Every song in my library is duplicated.  How do I delete the duplicates without doing one at a time?

    How do I delete duplicate songs in my library without doing one at a time?

    Apple's official advice on duplicates is here Find and remove duplicate items in your iTunes library. It is a manual process and the article fails to explain some of the potential pitfalls such as lost ratings and playlist membership, or that sometimes the same file can be represented by multiple entries in the library and that deleting one and recycling the file will break the other.
    Use Shift > View > Show Exact Duplicate Items to display duplicates as this is normally a more useful selection. You need to manually select all but one of each group to remove. Sorting the list by Date Added may make it easier to select the appropriate tracks, however this works best when performed immediately after the dupes have been created.  If you have multiple entries in iTunes connected to the same file on the hard drive then don't send to the recycle bin.
    Use my DeDuper script if you're not sure, don't want to do it by hand, or want to preserve ratings, play counts and playlist membership. See this thread for background, this post for detailed instructions, and please take note of the warning to backup your library before deduping.
    (If you don't see the menu bar press ALT to show it temporarily or CTRL+B to keep it displayed.)
    The most recent version of the script can tidy dead links as long as there is at least one live duplicate to merge stats and playlist membership to and should cope sensibly when the same file has been added via multiple paths.
    tt2

  • On my windows Itunes I changed computers and ended up with two of every song. How do I delete the duplicates without doing it one at a time?

    I have duplicates of all the songs on my windows 7 computer.  I changed computers and ended up with duplicates of all of my songs. How can I delete them all without having to do it one at a time? thanks!

    Apple's official advice is here... HT2905 - How to find and remove duplicate items in your iTunes library. It is a manual process and the article fails to explain some of the potential pitfalls.
    Use Shift > View > Show Exact Duplicate Items to display duplicates as this is normally a more useful selection. You need to manually select all but one of each group to remove. Sorting the list by Date Added may make it easier to select the appropriate tracks, however this works best when performed immediately after the dupes have been created.  If you have multiple entries in iTunes connected to the same file on the hard drive then don't send to the recycle bin.
    Use my DeDuper script if you're not sure, don't want to do it by hand, or want to preserve ratings, play counts and playlist membership. See this thread for background and please take note of the warning to backup your library before deduping.
    (If you don't see the menu bar press ALT to show it temporarily or CTRL+B to keep it displayed)
    tt2

  • Cant view photos except one at a time??, and other iphoto weirdness, help!

    My iphoto is crazy, it does weird stuff all the time. A few months ago it started randomly eating pictures and a grey block would show up where they used to be. Just recently when I open an event i I can only look at the pics one at a time, not like smaller pictures in rows, where you can select them and do stuff with them. I don't know why it is different!!! I would think I could just change something under view and fix it, but nothing seems to help. Please someone help!

    Welcome to the Apple Discussions.
    Just recently when I open an event i I can only look at the pics one at a time, not like smaller pictures in rows,
    There's a slider lower right of the iPhoto Window - drag it left.
    A few months ago it started randomly eating pictures and a grey block would show up where they used to be.
    Try these in order - from best option on down...
    1. Do you have an up-to-date back up? If so, try copy the library6.iphoto file from the back up to the iPhoto Library (Right Click -> Show Package Contents) allowing it to overwrite the damaged file.
    2. Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.
    3. If neither of these work then you'll need to create and populate a new library.
    To create and populate a new *iPhoto 08* library:
    Note this will give you a working library with the same Events and pictures as before, however, you will lose your albums, keywords, modified versions, books, calendars etc.
    In the iPhoto Preferences -> Events Uncheck the box at 'Imported Items from the Finder'
    Move the iPhoto Library to the desktop
    Launch iPhoto. It will ask if you wish to create a new Library. Say Yes.
    Go into the iPhoto Library (Right Click -> Show Package Contents) on your desktop and find the Originals folder. From the Originals folder drag the individual Event Folders to the iPhoto Window and it will recreate them in the new library.
    When you're sure all is well you can delete the iPhoto Library on your desktop.
    In the future, in addition to your usual back up routine, you might like to make a copy of the library6.iPhoto file whenever you have made changes to the library as protection against database corruption.
    Regards
    TD

  • Spiked CPU when viewing multiple streams one at a time then publishing

    Hi all,
    We're finding the Flash Player's CPU process 'ratchets' slightly higher each time a user views a new webcam stream one at a time in a WebcamSubscriber.
    For example, I'm watching the stream for User A, then that stream is deleted and I then watch the stream for user B, then that stream is deleted and I watch the stream A, B, or C, and so on.  It seems to 'ratchet' higher by the same amount regardless of whether I've seen that particular user's stream before.
    It's only a few percentage points of CPU usage each time, but in the aggregate it can get to 100% usage and crash the flash player quickly. 
    Some details of our tests:
    - We've managed to contain it so this only happens when the user is also publishing.
    - If a user has been watching for a long time without publishing, then starts publishing, the CPU usage will suddenly spike as soon as they start publishing.  In our tests it spikes as much and more as if they had been publishing the entire time. 
    - If the user starts publishing before they start watching, they're not affected by this spike. 
    - If a user starts publishing but hasn't been watching the streams, the publishing CPU usage is normal. 
    - Refreshing the browser page and publishing again, CPU usage is normal. 
    - Calling System.gc(); while running in the flash player debugger seems to have no effect on the CPU spikes.  Whatever streams are being kept around must still have something pointing to them so they won't be garbage collected. 
    To subscribe to each successive stream, we're doing that by setting
    webcamSubscriber.publisherIDs = [ newStreamID ];
    We've been experimenting for a long time with different settings that might reduce the CPU spikes and ratcheting, but haven't been able to resolve the issue.
    How can we prevent this CPU ratcheting and spking?
    Thanks very much,
    -Trace

    Is it possible that you have other components that are interfering or spiking your CPU. Also if possible can you share your code.
    Would you be able to check this link and see it hogs your CPU for more subscribers. - http://blogs.adobe.com/arunpon/files/2011/05/WebCameraFinal31.swf
    Code for the app in the link
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:rtc="http://ns.adobe.com/rtc">
         <mx:Script>
              <![CDATA[
                   import com.adobe.coreUI.controls.CameraUserBar;
                   import com.adobe.rtc.collaboration.WebcamSubscriber;
                   import com.adobe.rtc.events.CollectionNodeEvent;
                   import com.adobe.rtc.events.SessionEvent;
                   import com.adobe.rtc.events.SharedPropertyEvent;
                   import com.adobe.rtc.events.StreamEvent;
                   import com.adobe.rtc.events.UserEvent;
                   import com.adobe.rtc.messaging.UserRoles;
                   import com.adobe.rtc.sharedManagers.StreamManager;
                   import com.adobe.rtc.sharedManagers.descriptors.StreamDescriptor;
                   import com.adobe.rtc.sharedModel.SharedProperty;
                   protected var _camSubscribers:Object;
                   protected var _currentSubscriber:WebcamSubscriber ;
                   protected var _sharedProperty:SharedProperty ;
                    *  Handler for the stop and start buttons.
                   protected function startBtn_clickHandler(event:MouseEvent):void
                        if ( startBtn.label == "Start" ) {
                             webCamPub.publish();
                             startBtn.label = "Stop" ;
                             if (_camSubscribers && _camSubscribers[cSession.userManager.myUserID]) {
                                  var webcamSubscriber:WebcamSubscriber = _camSubscribers[cSession.userManager.myUserID];
                                  smallSubscriberContainer.addChild(webcamSubscriber);
                        }else if (startBtn.label == "Stop" ){
                             webCamPub.stop();
                             startBtn.label = "Start" ;
                    * SynchronizationChange event handler. Initialize the Shared property used to sync the Subscriber info
                    * who would be the centre of the app.
                   protected function cSession_synchronizationChangeHandler(event:Event):void
                        if (cSession.isSynchronized) {
                             _sharedProperty = new SharedProperty();
                             _sharedProperty.isSessionDependent = true ;
                             _sharedProperty.sharedID = "webcamShare2" ;
                             _sharedProperty.connectSession = cSession ;
                             _sharedProperty.subscribe();
                             _sharedProperty.addEventListener(SharedPropertyEvent.CHANGE,onChange);
                             _camSubscribers = new Object();
                             cSession.streamManager.addEventListener(StreamEvent.STREAM_RECEIVE,onStreamRecieved);
                             cSession.streamManager.addEventListener(StreamEvent.STREAM_DELETE,onStreamDelete);
                             addExistingStreamers();
                    *  Set up a thumbnail subscriber for every new camera stream
                   protected function onStreamRecieved(p_evt:StreamEvent):void
                        if (p_evt.streamDescriptor.type == StreamManager.CAMERA_STREAM) {
                             setUpfromDescriptor(p_evt.streamDescriptor);
                    * Clicking a subscriber updates the shared value, which in turn enlarges the thumbnail after getting updated
                   protected function onClick(p_evt:MouseEvent):void
                        if ( (p_evt.currentTarget is WebcamSubscriber) &&  !(p_evt.target.parent is CameraUserBar)) {
                             _sharedProperty.value = (p_evt.currentTarget as WebcamSubscriber).publisherIDs;
                    * Clean up when a user stops publishing his camera or exits his app.
                   protected function onStreamDelete(p_evt:StreamEvent):void
                        if (p_evt.streamDescriptor.type == StreamManager.CAMERA_STREAM) {
                             if ( _camSubscribers[p_evt.streamDescriptor.streamPublisherID]) {
                                  var webcamSubscriber:WebcamSubscriber = _camSubscribers[p_evt.streamDescriptor.streamPublisherID];
                                  if (webcamSubscriber) {
                                       smallSubscriberContainer.removeChild(webcamSubscriber);    
                                  if (p_evt.streamDescriptor.streamPublisherID != cSession.userManager.myUserID) {
                                       webcamSubscriber.removeEventListener(UserEvent.STREAM_CHANGE,onCameraPause);
                                       webcamSubscriber.removeEventListener(UserEvent.USER_BOOTED,onUserBooted);
                                       delete _camSubscribers[p_evt.streamDescriptor.streamPublisherID];
                                       webcamSubscriber.close();
                                       webcamSubscriber = null;
                                  } else {
                                       if (_currentSubscriber && _currentSubscriber.publisherIDs[0] == cSession.userManager.myUserID) {
                                            _sharedProperty.value = null;
                    * Logic for handling the Pause event on CameraUserBar on every Subscriber
                   protected function onCameraPause(p_evt:UserEvent):void
                        var userStreams:Array = cSession.streamManager.getStreamsForPublisher(p_evt.userDescriptor.userID,StreamManager.CAMERA_STREAM);
                        if (userStreams.length == 0) {
                             trace("onCameraPause: no userStreams");
                             return;
                        for (var i:int = 0; i< userStreams.length ; i++ ) {
                             if (userStreams[i].type == StreamManager.CAMERA_STREAM ) {
                                  break;
                        var streamDescriptor:StreamDescriptor = userStreams[i];
                        if ( streamDescriptor.streamPublisherID == cSession.userManager.myUserID ) {
                             cSession.streamManager.pauseStream(StreamManager.CAMERA_STREAM,!streamDescriptor.pause,streamDescriptor.streamPublisherID);
                    * Initial set up of all users who are streaming when this app launches
                   protected function addExistingStreamers():void
                        var streamDescritpors:Object = cSession.streamManager.getStreamsOfType(StreamManager.CAMERA_STREAM);
                        for (var i:String in streamDescritpors) {
                             setUpfromDescriptor(streamDescritpors[i]);
                    * Helper method to create a thumbnail subscriber.
                   protected function setUpfromDescriptor(p_descriptor:StreamDescriptor):void
                        if (! _camSubscribers[p_descriptor.streamPublisherID]) {
                             var webCamSubscriber:WebcamSubscriber = new WebcamSubscriber();
                             webCamSubscriber.connectSession = cSession ;
                             webCamSubscriber.addEventListener(UserEvent.STREAM_CHANGE,onCameraPause);
                             webCamSubscriber.addEventListener(UserEvent.USER_BOOTED,onUserBooted);
                             webCamSubscriber.webcamPublisher = webCamPub;
                             webCamSubscriber.subscribe();
                             webCamSubscriber.sharedID = p_descriptor.streamPublisherID;
                             webCamSubscriber.publisherIDs = [p_descriptor.streamPublisherID];
                             webCamSubscriber.height = webCamSubscriber.width = 180;
                             webCamSubscriber.addEventListener(MouseEvent.CLICK, onClick);
                             smallSubscriberContainer.addChild(webCamSubscriber);
                             _camSubscribers[p_descriptor.streamPublisherID] = webCamSubscriber;
                    * This method is the listener to SharedPropertyEvent.CHANGE event. It updates the centred subscribes as its value
                    * changes.
                   protected function onChange(p_evt:SharedPropertyEvent):void
                        if ( _currentSubscriber != null ) {
                             _currentSubscriber.removeEventListener(UserEvent.USER_BOOTED,onUserBooted);
                             _currentSubscriber.removeEventListener(UserEvent.STREAM_CHANGE,onCameraPause);
                             centeredSubscriber.removeChild(_currentSubscriber);
                             _currentSubscriber.close();
                             _currentSubscriber = null ;
                        if ( _sharedProperty.value == null || _sharedProperty.value.length == 0 ) {
                             return ;
                        _currentSubscriber = new WebcamSubscriber();
                        _currentSubscriber.connectSession = cSession ;
                        _currentSubscriber.subscribe();
                        _currentSubscriber.webcamPublisher = webCamPub ;
                        _currentSubscriber.publisherIDs = _sharedProperty.value ;
                        _currentSubscriber.addEventListener(UserEvent.USER_BOOTED,onUserBooted);
                        _currentSubscriber.addEventListener(UserEvent.STREAM_CHANGE,onCameraPause);
                        _currentSubscriber.width = _currentSubscriber.height = 500;
                        centeredSubscriber.addChild(_currentSubscriber);
                    * Logic for handling the Close event on CameraUserBar on every Subscriber
                   protected function onUserBooted(p_evt:UserEvent=null):void
                        var tmpFlag:Boolean = false;
                        if (_currentSubscriber && _currentSubscriber.publisherIDs[0] == p_evt.userDescriptor.userID) {
                             if (_currentSubscriber.parent) {
                                  _currentSubscriber.removeEventListener(UserEvent.USER_BOOTED,onUserBooted);
                                  _currentSubscriber.removeEventListener(UserEvent.STREAM_CHANGE,onCameraPause);
                                  _currentSubscriber.close();
                                  _currentSubscriber.parent.removeChild(_currentSubscriber);
                                  _currentSubscriber = null;
                                  _sharedProperty.value = null;
                             tmpFlag = true;
                        if ( _camSubscribers[p_evt.userDescriptor.userID]) {
                             var webcamSubscriber:WebcamSubscriber = _camSubscribers[p_evt.userDescriptor.userID];
                             tmpFlag = true;
                        if (tmpFlag) {
                             webCamPub.stop();
                             startBtn.label = "Start";
              ]]>
         </mx:Script>
         <!--
         You would likely use external authentication here for a deployed application;
         you would certainly not hard code Adobe IDs here.
         -->
         <rtc:AdobeHSAuthenticator
              id="auth"
              userName="Your Username"
              password="Your password" />
         <rtc:ConnectSessionContainer id="cSession" authenticator="{auth}" width="100%" height="100%" roomURL="Your RoomUrl">
              <mx:VBox id="rootContainer" width="100%" height="800" horizontalAlign="center">
                   <rtc:WebcamPublisher width="1" height="1" id="webCamPub"/>
                   <mx:VBox width="500" height="500" id="centeredSubscriber" horizontalAlign="center" verticalAlign="middle"/>
                   <mx:Label text="Click on a Subscriber thumbnail to make it bigger." />
                   <mx:HBox width="100%" height="200" horizontalAlign="center" verticalAlign="top" id="smallSubscriberContainer" creationComplete="cSession_synchronizationChangeHandler(event)"/>
                   <mx:Button  id="startBtn" label="Start"  click="startBtn_clickHandler(event)" height="20"/>
              </mx:VBox>
         </rtc:ConnectSessionContainer>
    </mx:Application>
    Thanks
    Arun

  • Dequeue messages one at a time

    We have a scenario where we have to send messages to a server(on a TCP/IP port).
    However since we are expecting huge volumes and the server cannot handle such huge volumes, we are dumping all the messages into an AQ.
    We want to dequeue these messages one at a time and send them to this server.
    The AQ Adapter however seems to dequeue all the messages in the queue in one shot. It then creates separate instances for each message and bombards the server with these messages.
    The whole purpose of using the queue is not served.
    Is there anyway we can throttle this dequeuing?
    The AQ Adapter gives 2 options:
    1) Polling : In this case however each time it polls it picks up all the messages in the queue that are ready to be dequeued.
    2) Notification : Havent seen much documentation around this? Am not sure if this will solve our problem.
    Any possible alternatives/solutions are welcome.
    Thanks,
    Vinod.

    Hi Vinod,
    To follow up on Lili's reply, you can refer to the solution I posted in the following thread:
    Re: About AQ ADT example functionality
    Scroll down to the section "How to make AQ process synchronous" and follow the outlines steps.
    Thanks.

  • Opening JFrames as objects one at a time

    I have created a program that generates numbers puts them on a JFrame via labels and buttons and closing on the click of the correct answer.
    Example of output
    ......................... *3*
    1 + 2 + = ........ *2*
    .........................*5*
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    public class QuestionFrame implements ActionListener
         JFrame jf;
         JButton [] but = new JButton[3];
         int randomPlace = (int)(Math.random()*3);
         QuestionFrame (char level, String picNum)
              Numbers N = new Numbers(level);
              jf = new JFrame ("Question");
              jf.setLayout(null);
              jf.setBounds (50, 200, 700,240);
              jf.setResizable(true);
                   JLabel [] lbl = new JLabel[5];     
                   lbl[0] = new JLabel (N.num1());
                     lbl[1] = new JLabel ("+");
                     lbl[2] = new JLabel (N.num2());
                     lbl[3] = new JLabel ("=");
                     for(int h = 0; h < 4; h++)
                          lbl[h].setBounds (70*(h+1), 80, 30, 30);
                     String  [] txt = new String [3];
                     txt[0] = N.falseAns1();
                     txt[1] = N.falseAns2();
                     txt[2] = N.falseAns3();
                     txt[randomPlace] = N.answer();
                     for(int i = 0; i < 3; i++)
                        but= new JButton (txt[i]);
                   for(int j = 0; j < 3; j++)
                        int Y = ((j*60)+20);
                        but[j].setBounds(400, Y, 70, 40);
                   for(int l = 0; l < 3; l++)
                        but[l].addActionListener(this);
                   Container con = jf.getContentPane ();
                   con.setLayout(null);
                   for(int k = 0; k < 3; k++)
                        con.add(but[k]);
                   for(int l = 0; l < 4; l++)
                        con.add(lbl[l]);
                   jf.setVisible(true);
         public void actionPerformed (ActionEvent check)
              if (check.getSource () == but[randomPlace])
                   jf.dispose();
         public static void main (String[]args)
              char level = (JOptionPane.showInputDialog("Type")).charAt(0);
              QuestionFrame [] qf = new QuestionFrame[10];
              for(int i = 0; i < 10; i++)
                   qf[i] = new r(level, i+1+"");
    }Just in case you need it here's the Numbers and ImproveNumbers classes I've madepublic class Numbers
         int sumNum1,      sumNum2,      Answer;
         int falseAns1,      falseAns2,      falseAns3;
         public Numbers(char givenLevel)
              int SumNum1 = 0;
              int SumNum2 = 0;
                   switch(givenLevel)
                   case '1':
                             SumNum1 = (int)(Math.random()*(10+1));
                             SumNum2 = (int)(Math.random()*(9+1));
                             break;
                   case '2':
                             SumNum1 = (int)(Math.random()*(40+1));
                             SumNum2 = ((int)(Math.random()*(5+1))+5);
                             break;
                   case '3':
                             SumNum1 = (int)(Math.random()*(100+1));
                             SumNum2 = ((int)(Math.random()*(15+1))+5);
                             break;
              int trueAnswer = SumNum1+SumNum2;
              int[] falseAnswer = new int[3];
              for(int j = 0; j <3; j++)
                   falseAnswer[j] = ((int)(Math.random()*(15))+trueAnswer)-7;
                   if(falseAnswer[j] < 0)
                        falseAnswer[j] = falseAnswer[j]*(-1);
                   ImproveNumbers IN = new ImproveNumbers(trueAnswer, falseAnswer[0], falseAnswer[1], falseAnswer[2]);
                   falseAnswer[0] = IN.fixNum1();
                   falseAnswer[1] = IN.fixNum2();
                   falseAnswer[2] = IN.fixNum3();
                   sumNum1 = SumNum1;
                   sumNum2 = SumNum2;
                   Answer = trueAnswer;
                   falseAns1 = falseAnswer[0];
                   falseAns2 = falseAnswer[1];
                   falseAns3 = falseAnswer[2];
         String num1()
                   return ""+sumNum1;
         String num2()
                   return ""+sumNum2;
         String answer()
                   return ""+Answer;
         String falseAns1()
                   return ""+falseAns1;
         String falseAns2()
                   return ""+falseAns2;
         String falseAns3()
                   return ""+falseAns3;
    public class ImproveNumbers
         int improvedNum1;
         int improvedNum2;
         int improvedNum3;
         ImproveNumbers(int Answer, int receivedNum1, int receivedNum2, int receivedNum3)
              if(Answer == receivedNum1)
                   receivedNum1 = receivedNum1+1;
              for(int p = 0; p < 2; p++)
                   if(Answer == receivedNum2)
                        receivedNum2 = receivedNum2+1;
                   if (receivedNum1 == receivedNum2)
                        receivedNum2 = receivedNum2+1;
              for(int p = 0; p < 10; p++)
                   if(Answer == receivedNum3)
                        receivedNum3 = receivedNum3+1;
                   if (receivedNum1 == receivedNum3)
                        receivedNum3 = receivedNum3+1;
                   if (receivedNum2 == receivedNum3)
                        receivedNum3 = receivedNum3+1;
              improvedNum1 = receivedNum1;
              improvedNum2 = receivedNum2;
              improvedNum3 = receivedNum3;
         int fixNum1()
                   return improvedNum1;
         int fixNum2()
                   return improvedNum2;
         int fixNum3()
                   return improvedNum3;
    I want each questionFrame to open one at a time, as the
    preceding one is answered correctly and disposes of itself.
    I've search for answers and tried hundreds of combination but I
    don't seem to click it.
    code should run if copied, but
    please don't change too much
    or give too complicated code!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Got the hint the first time. But I don't have much time and I'm not too familiar with JDialogs. I am still working on the whole program's appearance and using frames, buttons and labels are easy.
    I know I'm nagging, but I also need advice on making a thread sleep.
    I have a JFrame with multiple buttons. Certain of them don't work yet. (Not done with them)
    If I click on a buttton a frame of warning should appear, but disappear after a Thread.sleep(2000) by using my own void for the warning frame.
    I think the problem is my try/catch. The sleep happens but the closing void takes place first?
    Here are bits:
    public void actionPerformed (ActionEvent close)
              if(close.getSource () == closeBtn)
                   ExitVerify EV = new ExitVerify();
              if(close.getSource () == but[0])
                        Unavailable     msg = new Unavailable();
              try
                        Thread.sleep(4000);
                        msg.closeNotice();          
                   catch(InterruptedException e)
    public void closeNotice()
              jf.dispose();
         }

  • Why do threads run one at a time?

    [Newbie] Couldn't get help in another forum, so here goes. Tried this in Netbeans 3.5 then at home later in BlueJ, same thing. Thanks in advance!
    I have written a small application to play with threads. I create 3 instances of a class and shoot each one off in a thread, but they all seem to run one at a time, not at the same time. I have posted the code below. The output I expect is something like this:
    0T1
    0T2
    0T3
    1T1
    1T2
    1T3
    2T1
    2T2
    2T3
    498T1
    498T2
    498T3
    499T1
    499T2
    499T3
    500T1
    500T2
    500T3
    The T1 means threadstart1 wrote that line, the T3, means threadstart3 wrote the line, etc. I would expect to see these slightly out of order, too, knowing that the threads will process what they can, when they can. Instead, I see this:
    0T1
    1T1
    2T1
    500T1
    0T2
    1T2
    2T2
    500T2
    0T3
    1T3
    2T3
    500T3
    It's in perfect numeric order, each completing before the next starts. What am I doing wrong?
    //-------------dostuff.java
    package delme2;
    public class dostuff implements Runnable {
    private String mtext;
    public dostuff(String atext) {
    mtext = atext;
    public void run() {
    int j;
    String s;
    //display 500 numbers
    for (j=0; j<500; j++) {
    //build the string
    s = String.valueOf(j) + mtext;
    //show the string
    System.out.println(s);
    //wait a bit before doing this again.
    try {
    Thread.sleep(10);
    } catch (InterruptedException e) {
    //--------------- delme2.java
    package delme2;
    public class delme2 {
    public delme2() {
    System.out.println("Thread demo:");
    Runnable threadstart1 = new dostuff("T1");
    Runnable threadstart2 = new dostuff("T2");
    Runnable threadstart3 = new dostuff("T3");
    Thread t1 = new Thread( threadstart1 );
    Thread t2 = new Thread( threadstart2 );
    Thread t3 = new Thread( threadstart3 );
    t1.run();
    t2.run();
    t3.run();
    public static void main(String[] args) {
    delme2 mydelme2 = new delme2();
    }

    Okay, I'll play along. Having written a task scheduler in C (under tutorial, I admit), I think I qualify. A task scheduler has three jobs at all times.
    1) Execute the code at hand.
    2) Figure out when to stop executing the code at hand.
    3) When stopped, figure out what code to execute next.
    When executing a piece of code, there are different paradigms for determining when to stop and move on. Ideally, a cooperative multitasking system would have threads that relinquish timeslices or have some other method sprinkled throughout their code that indicates to the task scheduler that it's okay to move on to another piece of code. In my experience, that indicator is a Thread.Sleep() or equiavalent. when the thread.sleep() is encountered. The task scheduler has nothing to do for a whopping 10 MS. It could even take 15 or 20 ms if the next process in line takes that long. So what is it doing for 10 ms? It's not executing those other threads, which should be queued for their turn on step #3 as soon as I fire them off with a .run().
    Now, I hope you can see that I've given this some thought and read about it, but I'm missing something. I can get a very similar project to work as I expect it to in .NET and in Delphi. The Java environment has something different about it that I haven't figured out. Here's the c# code that does EXACTLY what I want it to. All threads run at a same time, and I get 0,0,0,1,1,1,2,2,2,3,3,3,4,4,4, etc.. See the similarities?
              private void button1_Click(object sender, System.EventArgs e)
                   lst.Items.Clear();
                   ThreadStart start1 = new ThreadStart(runner);
                   ThreadStart start2 = new ThreadStart(runner);
                   ThreadStart start3 = new ThreadStart(runner);
                   Thread t1 = new Thread(start1);
                   Thread t2 = new Thread(start2);
                   Thread t3 = new Thread(start3);
                   t1.Start();
                   t2.Start();
                   t3.Start();
              private void runner()
                   string s;
                   for (int j=0; j<500; j++)
                        s = j.ToString();
                        lst.Items.Add(s);
                        Thread.Sleep(10);
              }

Maybe you are looking for

  • Reports Builder Error - REP 1070 Error while opening or saving document

    Hi, I tried opening an rdf file in Reports Builder 10g and 6i. I get the REP 1070 error. Kindly suggest a solution for this. Thanks, Anand

  • How to upload 15 lakhs of record onto ztable with performance

    I have 15 to 20 lakhs of records in my internal table. I'm uploading it onto ztable in se11. While doing so, it's taking lot of time. I'm writing the following query: MODIFY ZTABLE       FROM TABLE  ITAB(INTERNAL TABLE NAME). Please let me know if th

  • Insert into database table

    Hi Guy's, Please help me, trying to insert the records into database table. when i debug the program work area contain  data records  but not insert into databse table.  Here pasted my code pls suggest me where i did mistake. FUNCTION ZEXM_PHOTOCOPYD

  • CRM BADI URGENT?

    Hi I am using BADI BUPA_FURTHER_CHECKS...when creating a business partner (sold-to-party) in SAP CRM? I need to check the industry code with the attribute...and give an error message... But the problem is that this BADI is not getting triggered? Do u

  • Why i can receive security information by the mail?

    Hello! i need to change my password , but i forgot the security answers! and the second mail adress is wrong , and i cant recieve security information! please help me