AQ Sort Order

HI
I am trying to subscribe to a topic with Sort Order (priority,enq_time) using oracle.jms API.Payload type is an ADT generated from jpublisher.Though the same worked with Oracle.AQ API.
1)After publishing i am updating the priority through sql using payload data.But the subscribing application is always taking enq_time when actually it should be taking priority as first criteria.It is still taking default priority as 1 for all so sorting by enqueue time i feel.
2)If on the other hand i set different priorities while publishing throgh client itself,subscibing application is picking up correctly .i.e priority first the enq_time.
Sample code:
===========
// Get topic object
Topic topic = ((AQjmsSession) aq.session).getTopic(
DB_AQ_ADMIN_NAME, // Queue owner
"message_queue"); // Queue name
// Create topic receiver
TopicReceiver subscriber = ((AQjmsSession) aq.session).createTopicReceiver
topic, // Used topic
"SUBSCRIPTION" + _subscriptionId, // Name and identification of the subscription
null,// No message selector
QUEUE_MESSAGE_CAFU.getFactory()//CustomDatumFactory for the java class that maps to the Oracle ADT
// Receive message
System.out.println("Waiting 60 seconds to receive message for subscription SUBSCRIPTION" + _subscriptionId + " ...");
AQjmsAdtMessage adtMessage = (AQjmsAdtMessage) subscriber.receive(60000);
if(adtMessage != null)
QUEUE_MESSAGE_CAFU messageData = (QUEUE_MESSAGE_CAFU) adtMessage.getAdtPayload();
System.out.println("receive() successfully");
// Print message
System.out.println("ProductId : " + messageData.getProductId());
System.out.println("StoreId : " + messageData.getStoreId());
System.out.println("ProductName: " + messageData.getProductName());
System.out.println("country : " + messageData.getCountry());
Note:QUEUE_MESSAGE_CAFU is JPublisher generated class from an oracle object type
Regards
Raju

Answers from Oracle for anyone interested:
1. Is there any way to determine the enqueue order of a set of messages?
Enqtime is only to the second.
(**) Yes the enqueue order is enqtime + step_no. So if you concat it appropriately you will get the right >order.
2. If using a queuebrowser starting at a message ID, will messages appear in
actual order even if msgids are not in order?
(**) The message will appear in the enqueue time order.
3. Is there any way, preferably a sql query, to determine the messageID of
the last message enqueued to an AQ?
You could write a query which would compute the max(enqueue_time + step_no) say something like:
select msgid from queue_table where expr(enqtime, stepno) = (select max(expr(enqtime, stepno)) from >queue_table); This is true but Oracle forgot to say that the order is guaranted only if the messages are enqueued in the same session!! if the messages are enqueued by different sessions the result is unpredictable (the enqueue time is OK but the step_no is completly wrong, that is we can have different message at the same time with the same step_no)

Similar Messages

  • Album sort order PSE11 - is it by design ?

    When experimenting with the sort order of albums in PSE11, I was surprised to see that in some albums, changing the sort order from 'oldest' to 'newest' did not produce any effect.
    The reason of this probably lies in the menu /preferences/general :
    If you have only pictures taken the same day, the above setting will still show 'oldest first' even you choose 'newest first' for album order.
    I believe that the most used order is 'album order' and that the 'newest first' is very rare.
    I can understand the option to browse 'oldest first within each day' when in 'newest first' in thumbnail view.
    However, I wonder if that option makes sense to sort an album ?
    Was it by design ?
    If it were me...
    I would not use that preference for an album,
    and...
    I would add the option to sort by filename and caption.

    Figured it out. I added "Various Artists" in the Album Artist field for every track and it then sorted them all together.

  • How do I get Iphoto to preserve the sort order when I transfer an album?

    Here's my problem. I carefully sorted my album of 230 photos manually. Each photo was then numbered from 1 to 230.   Then I used IPhoto Library Manager to transfer this album someplace else -- to my desktop, to a thumb drive, to Dropbox---   In every case, when I did that, the photos themselves transfered just fine,  but the sort order I had so carefully constructed has fallen apart and cannot by retrieved. Even  when I  close and then reopen an Album I have transferred to my Desktop, it loses its sort order.  This is driving my crazy  because I need to transfer this album so that it preserves the slideshow I have designed for it. A slideshow, of course, demands preserving the order of the slides.
    In short, how can I preserve the sort order of an album when I transfer it out of one library to another?

    If you're transferring to another library, why are you exporting to the Finder (which is what Desktop, thumbdrive and DropBox are). This doesn’t understand manual sorting from iPhoto.
    Here's one (of several) way(s) to do what you want:
    Make an Album of the photos, then drag the pics into your preferred order.
    Then Photos Menu: Batch Change -> Set Title to Text "John's Birthday", for instance, and tick the box to append a number to each Photo. Now your photos are titled 'John's Birthday 001, John's Birthday 002 ... etc'
    Then File -> Export and in the Export dialogue set the Filename to "Use Title"
    Sort on Filename in the FInder and you end up with a folder full of images in the same order as the Album in iPhoto.

  • Any way to Restore Last Manual Sort Order or Prevent from being Overwritten accidentally?

         Help!
         I'm constantly accidentally overwriting painstakingly created manual sort ordering (sometimes hours but more often months of accumulated work) in folders with files numbering up to 1,000, when i, however breifly, switch to another sort ordering (size, date modified etc) to check something, immediately forget that i'm in another sort order, and, unthinkingly (actually i guess i'm thinking of a lot of other things) drag a file to another position, this immediately destroys any past manual sorting i've established, overwriting it with this new inadvertent manual ordering.
         I've tried CommandZ (edit undo) but that only undoes my last rating or labeling, i've rushed to force quit Bridge through the activity montior hoping i will catch it before its overwritten, but obviously i am not as fast as a computer, and i don't think this has ever worked.
    Is there any way or any script someone has written to formally save a manual sort order? Is there anything i've missed to attempt restoring it? Has anyone, repeatedly foiled by this, written something that would give a warning and require confirmation say for instance, if i tried to drag or move a file while in another sort ordering (this seems like something that should have existed the minute the opportunity was given to create manual organization). Would anyone be willing to?
         Seriously, me forgetting almost every time isn't going to change and, more vexingly, it's even happened when i didn't mean to move anything but fumbled momentarily while in another sort order. I think most people might forget because (in the context of computing) we are conditioned to expect a warning if something we have just created is about to be written over or discarded, and since there is no option to formally save a manual ordering we have just created.
         Also, if this was in the real world, moving a single file would not reshuffle everything on your desk. If i had the option to formally save a manual organization i would NOT forget to do this and would use it, as i've wished for one every time spent a while rearranging files. Knowing how easily all the hours (much less months and years of cumulative work) of organizational work can be accidentally lost makes working within Bridge unpleasantly anxious.
          I'm literally willing to do anything including installing some sketchy 3rd-part scripts (though honestly i have no idea what that means or how to do it). I extentively use and rely heavily upon this function so this is a fairly serious Achille's heel. It's like watching your incredibly important meticulously constructed house of cards collapse with a careless but innocent sigh, or like having the equivelent of a not even charming cat dance across your keyboard during a live concert, etc etc....
         Also it is not usually appropriate, given the context, to batch rename everything to preserve a manual ordering w sequence numbers, etc. Often the filenames are considerably (but necessarily, to connote important differences) long already, and when i have to rearrange things in the future would have to do that each time, etc, etc, making for even more unwieldly filenames that didn't have any substantive information at the beginning. I'm looking for a way to make this function (manual sort ordering), well, more functional, secure and stable, the workarounds i've considered cause too many additonal problems.
         Thank you in advance for any help you may be able to offer, and as this is my first attempt to use the forums as i live on a boat with no regular net access, would appreciate any forum etiquette corrections, and advance apologies for any misspellings, dyslexic and spellcheck does not seem to work in this interface. next time will edit in external wordprocessing program beforehand,
              li'l mc szpf
         PS i'm on a 27" mac w CS4 Design Premium, w up to the minute OS (10.6.8) and Adobe software updates installed recently (i do not often move the monster but this week was housesitting w net access, so she has had all recommended shots and vaccinations....)
         PPS I know most of y'all might be running the newest and the latest of everything, but, i'm fairly certain this is still a problem in recent versions as this has happened to me at school where all the macs are running cs5. Though if it's been addressed somehow in cs6 would update entire suite just to fix this one problem in Bridge. I've tried many searches and found nothing relevant or wouldn't bother the considerable expertise and resources of an official forum, was extremely hesitant to ask (feared getting snapped at for unwittingly broaching forum etiquette) but it is truly the bane of my considerable Bridge existence, so was willing to risk the imaginary censure and opprobrium....
    Message was edited by: PECourtejoie

    That is a good question, to do this requires two functions and a restart of Bridge all done automagically
    Copy and paste the script into ExtendScript Toolkit
    This gets installed with Photoshop and can be found:-
    PC: C:\Program Files\Adobe\Adobe Utilities
    MAC: <hard drive>/Applications/Utilities/Adobe Utilities
    Start Bridge
    PC: Edit - Preferences - Startup Scripts
    Mac: Adobe Bridge menu - Preferences - Startup Scripts
    At the bottom click the "Reveal Button" this will open the folder where the script should be saved.
    Close and restart Bridge.
    Accept the new script.
    To use:
    Tools - Backup Manual Sort
    This will backup the hidden manual sort file .BridgeSort to .BridgeSortSave
    Tools - Restore Manual Sort
    This will copy the .BridgeSortSave back to .BridgeSort and will close and restart Bridge so that the manual sort is restored.
    if( BridgeTalk.appName == "bridge" ) { 
    var backUpManSort = new MenuElement( "command","Backup Manual Sort", "at the end of Tools" , "backupms" );
    var RestoreManSort = new MenuElement( "command","Restore Manual Sort", "at the end of Tools" , "restorems" );
    backUpManSort.onSelect = function () {
    var fileSort = new File(app.document.presentationPath +"/.BridgeSort");
    var fileSave = new File(app.document.presentationPath +"/.BridgeSortSave");
    if(fileSave.exists) fileSave.remove();
    fileSort.copy(fileSave);
    fileSave.hidden=true;
    RestoreManSort.onSelect = function () {
    var fileSort = new File(app.document.presentationPath +"/.BridgeSort");
    var fileSave = new File(app.document.presentationPath +"/.BridgeSortSave");
    if(!fileSave.exists){
    alert("No backup file exists");
    return;
    app.document.sorts = [{ type:"string",name:"document-kind", reverse:false }];
    if(fileSort.exists) fileSort.remove();
    fileSave.copy(fileSort);
    fileSort.hidden=true;
    app.document.chooseMenuItem("mondo/command/new");
    app.documents[0].close();
    app.document.sorts = [{ name:"user",type:"date", reverse:false }];
    Hope this works for you.

  • Sort order in list wrong: in CAML and in view

    Hello,
    When I order my list with document sets by ID, the order is wrong. It is wrong in the list and with caml.
    This is my view (I just set the sort on the ID column):
    The first 4 objects are created by the Client Object Model; the last 4 are created by a SharePoint webpart that I developped myself...
    My code for creating document sets in COM is something like this:
    ListItemCreationInformation newItemInfo = new ListItemCreationInformation
    UnderlyingObjectType = FileSystemObjectType.Folder,
    LeafName = _strLeafname // = date in format YYYYMMDDhhmmss
    ListItem newListItem = myList.AddItem(newItemInfo);
    newListItem["ContentTypeId"] = targetDocumentSetContentType.Id.ToString();
    newListItem["Title"] = title;
    newListItem.Update();
    clientContext.Load(myList);
    clientContext.ExecuteQuery();
    The code in the webpart is this:
    SPContentType docsetCt = myLst.ContentTypes[p.GetFromResourcefile("xxxxxxxxxxxxxx")];
    Hashtable properties = new Hashtable
    {"DocumentSetDescription", ""},
    {"Title", txtTitle.Text}
    SPFolder parentFolder = myLst.RootFolder;
    int newId = GetLastId(myLst) + 1;
    DocumentSet ds = DocumentSet.Create(parentFolder, newId.ToString(CultureInfo.InvariantCulture), docsetCt.Id, properties, true);
    ds.Item["Title"] = title
    ds.Item.Update();
    why is the sort order wrong?
    if i do this query in the U2U Caml builder, the order is also wrong
    <OrderBy><FieldRef Name='ID' Ascending='FALSE' /></OrderBy>
    if i order by "created", the order is also wrong....
    i don't get it....

    Document Sets are great tools for grouping multiple documents together. However, if every set has exactly one document, it would be better to just upload the file and not place it within a Document Set:
    Uploading documents using object model - http://msdn.microsoft.com/en-us/library/office/ms454491(v=office.14).aspx
    Uploading documents using web services -
    http://cecildt.blogspot.com/2010/10/upload-documents-to-sharepoint-2010.html
    If you have requirements to use Document Sets, keep in mind that this adds a layer of complexity beyond a simple Document Library. Behind the scenes, each Document Set is treated as a separate folder, and although can you query items within it, there might
    be extra steps for getting the sort order to ignore the folder structure. Can you try setting the Scope to be "Recursive" and also specify that you are looking only for files and not folders:
    <Eq><FieldRef Name='FSObjType'/><Value Type='Lookup'>1</Value></Eq></Where>
    Dimitri Ayrapetov (MCSE: SharePoint)

  • List of found events changes sort order when pasted from clipboard

    when I find a set of events in iCal, the list appears in the window at the bottom of the page in the correct sort order when sorted by date, title or type. When I then copy that list to the clipboard and paste it into another program (Pages, MacJournal, TextEdit) the sort order changes.
    I work mostly in English, but my macbookpro keyboard is German, so I assume the problem is with the language settings. I've tried changing the system preferences for language and sort order, and that changes the sort order, but it doesn't get it right.
    Anyone have any ideas?
    Thanks

    when I find a set of events in iCal, the list appears in the window at the bottom of the page in the correct sort order when sorted by date, title or type. When I then copy that list to the clipboard and paste it into another program (Pages, MacJournal, TextEdit) the sort order changes.
    I work mostly in English, but my macbookpro keyboard is German, so I assume the problem is with the language settings. I've tried changing the system preferences for language and sort order, and that changes the sort order, but it doesn't get it right.
    Anyone have any ideas?
    Thanks

  • BPC 7.5NW: Hierarchy Upload from BW - Sort Order

    Hi,
    we are currently updating from BPC 7.0NW to 7.5 NW SP10. (BW has been upgraded to 7.02 SP09)
    As master data and hierarchies had been uploaded using the coding from 'HowTo Upload automated...' so far, we now have to use standard Data Manger packages.
    Maintaining packages and package links was successful. Everything works fine so far.
    The only problem are Hierarchies, better the sort order of hierarchie nodes. At the moment they are always sorted in an alphabetical order.
    We introduced property MBR_SEQ to all dimension using program UJA_MIGRATE_MBR_SEQ.
    We loaded hierarchies with different settings.
    Searching SDN and SAP Notes lead to notes 1603352 or 1581331.
    But manually changing hierarchies each time, new members are assigned, is not an option!
    Do I miss any option in the selection screen of the Data Manager package?
    Are there any options in transformation or conversion file?
    Thanks and regards
    Steve

    For your Information...
    We were now adviced to include parameter DM_KEEP_SRC_SEQ with value Y in AppSet parameters (Web-Administration).
    Please have a look at note '1626929 - Keep hierarchy sequence for Load Hierarchy from BW package'.
    It works!
    For the first hierarchy to be uploaded...
    If there are more than one hierarchy defined for upload, only the first hierarchy is sorted correctly, all following ones are sorted alphabetically again.
    Regards
    Steve

  • Hierarchy table sort order no longer required in 11.1.1.3?

    Hi guys,
    I am working on loading Dimensions through EPMA interface tables. Hyperion version 11.1.1.3. The sort order for the records was not in line with the hierarchy. Still the dimension got loaded without any errors. I remember in the older versions we would have to have the records in the hierarchy table in the right order for the metadata to get loaded properly.
    Just wanted to confirm if this is a 11.1.13 version enhancement and not something that I am missing.
    Thanks.

    Hi Luc,
    I have checked our bug DB, but couldn't find any bug that would explain a change in behavior of processDatabaseChangeNotification() in 11.1.1.3
    On the contrary, we have been working on issues related to NPE during its execution recently (fix will be included in JDev 11.1.1.4.0).
    Could you create a Service Request in "My Oracle Support" and upload your sample ?
    We will have a look.
    Regards,
    Didier.

  • IPhone no longer syncs playlists in the same sort order as iTunes

    iPhone 4 no longer syncs playlists in the same sort order as iTunes after iOS5 upgrade.  Any suggestions?

    Thanks for the feedback.  Yes, it is very frustrating.  That was one functionality that worked very well.  Not only is the sort within the playlist bad but the sorting of the playlists themselves is bad.  I used to use an undetscore "-" to sort some of my folders to the top of the play list of the most played playlists and that does not work either.  It ignores the underscore and just sorts on the alpha character.  Hope this gets fixed. 

  • N9 Photo Gallery sort order - based on what?

    Hello,
    I am thrilled with my N9, but have one problem: I want to use the phone to keep not only photos made with it. I therefore saved extra photos in the Pictures folder. They appear in the gallery, but in a weird order, not based on either the name, EXIF date, modification date or creation date. Is there a possibility to sort them on either of these? All I want is to control the sort order. After all, it is MY gallery...
    On my previous phone (N8) sorting was based on the last modification date. Also not optimal (EXIF date would have been perfect) but still controllable.
    Solved!
    Go to Solution.

    Well, maybe those pictures were never edited outside the phone, I don't know.
    Anyway, I believe I found the explanation: I exported the photos from Picasa, maxing them to a resolution of 1600xXXX. This way all files were created... today. Nevertheless the EXIF information is correctly saved by Picasa, so Date Image Taken was preserved. Although I modified in all files the creation date to be equal to EXIF Date Image Taken (ACDSee/batch/AdjustTimeStamp) , and then also renamed all pictures based on that, the "new" creation date still remains saved somewhere in the picture files and the Gallery sorts the pictures on it! The pictures were sorted in the reversed order I exported them from Picasa... Bad.
    Anyway, since this is not a request forum, it would be futile to say (again) that Nokia should use the EXIF Date Picture Taken for picture sorting. So I don't say it (!).

  • SORT ORDER WITHIN GROUPS

    Post Author: Kara
    CA Forum: General
    Hi,
    I am using version 9. I have designed a report based on an access control database. It shows a person's time in and time out, then totals these hours. My report is grouped as follows:
    Department
    Date/Time
    Unique ID
    The main data of the report is shown in group footer 3 (Unique ID) and is displayed in numerical order. I need to change the sort order to display by last name, first name but because I have grouped by unique ID I can't seem to be able to do it!
    Any help gratefully received,
    Kara

    Post Author: CoolTowers
    CA Forum: General
    I use a similar report to track service personnel who also have a unique ID.  I have mine set up as follows - maybe this'll help.
    I used selection expert to specify the dates I want to see. 
    Group 1 sorts on the unique ID. Instead of printing the unique ID field in the group header, I have Employee.EmpName.  They'll come out in their unique ID sort so the names might be a little out of order. If that's a problem you could put sort option on that field.
    Group 2 sorts by the Job ID, with the group header suppressed.
    Detail line has location, job id, date, time on, time off, total time in hours and if it's completed.
    Group 2 summarizes at date and amount at the job ID level.
    Group 1 summarizes at technician.
    I get very accurate reports to match against their hand written time cards.
    Perhaps if you re-arranged the grouping?

  • How to keep sort order in Shuttle item's source and destination boxes?

    I have defined a shuttle item on a page and the list of values in the source box is populated by a SQL with sort order specified. In the Settings of the shuttle item, Show Controls value is set to Moving Only instead of All. When a user moves selected values from the source box to the destination box or vice versa, the list of values does not maintain the original sort order. For example, if I have 26 values A through Z, a user can put value Z before A in the destination box. And when a user move A from the destination box to the source box, A is the last item in the source box. The reset button clears everything in the destination box and resets the source box to the original sorted list. This is not the solution that I am looking for. I would like to see the items in the source and destination boxes to maintain their original sort order all the time.
    Is it possible?
    APEX v4.0.1.00.03
    Oracle 11g (v11.2.0.1.0)

    Hi,
    See if this post help
    Re: Sort Shuttle Right
    Regards,
    Jari

  • Sorting Order for SAP Tables in DB2 database

    Dear Experts -
    ISSUE: When an ABAP program selects data from the DB into an internal
    table, it is changing the way the data is sorted. In other words, the
    internal table data is in a different sort order than what is in the
    DB. It is not working this way in all other non-production systems
    (DEV, QAS, SAX, etc).
    Temporary solution for the programs that have been identified as
    impacted: Use the ABAP Command 'sort' on the internal table.
    Permanent solution needed : Since it is impossible to identify all
    of the programs that will be impacted, we need PRD to work like DEV,
    QAS, SAX, etc. when selecting data into internal tables. The data
    should be in the same order as it is in the DB (sorted by the key).
    ADDITIONAL INFO: DB2 storage disks crashed a day before. H/W team recovered everything. We are facing this only after the recovery.
    Thanks,
    Dinesh

    can you please check in your code if the sql that is being sent has an order by clause .
    Please let us know the SQL statements that is basically used to fill up the internal table.
    When data is fetched from the database, it is not sorted always. Probably you had a clustered index on the tables and the clustering is not there now.
    Edited by: Ratnajit Dey on Dec 16, 2011 1:56 PM

  • Save As dialog box sort order

    I have a user with Adobe Acrobat 7 Standard installed on Windows XP SP3.  When they go to save a pdf document, the Save As dialog box is in list view and not sorted by folder/file name by default.  So, they have to change to Details view and then change the sort to be by name.  They have to do this every time they save a document.  Is there a way to change this?  They would like the sort order to be by name every time they open the Save As dialog box.

    Hello,
    Can you please follow these steps and provide the value for the configuration 'browser.download.useDownloadDir'
    # In the [[Location bar autocomplete|Location bar]], type '''about:config''' and press '''Enter'''. The about:config "''This might void your warranty!''" warning page may appear.
    # Click '''I'll be careful, I promise!''', to continue to the about:config page.
    Can you please provide the values for the following keys
    #browser.download.useDownloadDir
    #browser.download.lastDir
    Thank you

  • In my opinion, the real solution is for Apple to offer us a choice of the photo sort order in ITunes. My preference would be filename, perhaps with options to choose the Date Taken attribute, file timestamp or date modified filestamp (EXIF date fields as

    I tryed to sort my pictures with buying Apps and following suggestion from apple, but without any success. In my opinion, the real solution is for Apple to offer us a choice of the photo sort order in ITunes. My preference would be filename, perhaps with options to choose the Date Taken attribute, file timestamp or date modified filestamp.

    Not a problem when using iPhoto on a Mac, which the transfer of photos is primarily based on - not manually managing photo storage as seems to be common with Windoze.
    The same should be available with a supported photo management app on a PC.
    http://support.apple.com/kb/HT4221

  • Sort Order of All Unplayed Episodes

    The sort order of all unplayed episodes is from Newest to Oldest, which is backwards for me.
    Why would I listen to the Newest episode first? It completely breaks any chronology of the podcasts!
    I found that you can change this for individual podcasts if you find the details by clicking on the podcast title to open its preferences, but the big list does not have the option.
    Please, give me the option to ORDER THE UNPLAYED EPISODES OLDEST AT TOP TO NEWEST AT BOTTOM!
    Thanks, in advance.

    Tom Peterson wrote:
    This did the trick for me, Harry. Thanks!
    I was surprised to see you can/must set this on a podcast-by-podcast basis, but it is hard to argue with having finer control. Oldest to newest seems like a slightly more logical default, but that may just be personal preference.
    Not to split off in a new direction, but if I then subscribe to a podcast in Podcasts app that I already subscribe to in iTunes, is it recommended I turn off syncing between iTunes and my iPhone for that podcast? Or will this question basically go away when iOS 6.0 is released?
    Do the Podcasts app and the Music/iPod app share podcast files? Or will they be duplicated on my iPhone?
    Tom
    The podcasts will duplicate themselves on your device. I turned off podcast syncing on my devices. But the weird thing is that when I sync, podcasts then copy themselves to my iTunes library. Either sync or don't, but don't copy to both.

Maybe you are looking for