Distinguishing between topics and queues

          Hi,
          I have a generic piece of code that takes a javax.jms.Destination that does different
          things depending if the destination is a queue or a topic.
          The problem is that it seems that destinations in Weblogic implement both queue
          and topic:
          instanceof queue <new_JMSTopic_1>
          queue name: <new_JMSTopic_1>
          weblogic.jms.common.InvalidDestinationException: Destination must be a queue,
          ne
          w_JMSTopic_1
          at weblogic.jms.common.Destination.checkDestinationType(Destination.java
          :113)
          at weblogic.jms.client.JMSSession.createBrowser(JMSSession.java:1516)
          at weblogic.jms.client.JMSSession.createBrowser(JMSSession.java:1500)
          at Test.run(Test.java:100)
          at Test.main(Test.java:311)
          Is there anyway for me to programatically distinguish between queues and topics
          as there seems not to be any javadoc on weblogic.jms.common.Destination and instanceof
          does not work? I would prefer not to rely on exceptions.
          I'm using Weblogic 8.1 sp2.
          Thanks
          Riad
          

          Cool. Thanks for your help Tom.
          Riad
          Tom Barnes <[email protected]> wrote:
          >Hi Riad,
          >
          >This has come up before.
          >
          >For now, you may cast dest to weblogic.jms.common.DestinationImpl
          >and call "isQueue()". Normally, only the javadoc'd methods
          >in weblogic.jms.extensions are intended for public use,
          >but for this case we make an exception.
          >
          >In the next release, this method will be exposed through
          >a new public WL JMS API extension:
          >weblogic.jms.extensions.WLDestination,
          >and might not be available otherwise.
          >
          >Tom, BEA
          >
          >P.S. A java tip: The JDK's built-in "javap"
          >is useful for viewing an arbitrary class api.
          >As in "javap weblogic.jms.extensions.JMSHelper".
          >
          >Riad wrote:
          >> Hi,
          >>
          >> I have a generic piece of code that takes a javax.jms.Destination that
          >does different
          >> things depending if the destination is a queue or a topic.
          >>
          >> The problem is that it seems that destinations in Weblogic implement
          >both queue
          >> and topic:
          >> instanceof queue <new_JMSTopic_1>
          >> queue name: <new_JMSTopic_1>
          >> weblogic.jms.common.InvalidDestinationException: Destination must be
          >a queue,
          >> ne
          >> w_JMSTopic_1
          >> at weblogic.jms.common.Destination.checkDestinationType(Destination.java
          >> :113)
          >> at weblogic.jms.client.JMSSession.createBrowser(JMSSession.java:1516)
          >> at weblogic.jms.client.JMSSession.createBrowser(JMSSession.java:1500)
          >> at Test.run(Test.java:100)
          >> at Test.main(Test.java:311)
          >>
          >> Is there anyway for me to programatically distinguish between queues
          >and topics
          >> as there seems not to be any javadoc on weblogic.jms.common.Destination
          >and instanceof
          >> does not work? I would prefer not to rely on exceptions.
          >>
          >> I'm using Weblogic 8.1 sp2.
          >>
          >> Thanks
          >> Riad
          >
          

Similar Messages

  • Can JMS topics and queues be clustered in a WLS 7.0 Cluster?

    We are installing a weblogic 7.0 cluster with 1 admin server and 2 managed
              node servers. Two nodes have been clustered. We are at the point where we
              need to configure JMS. Has any one implemented JMS in WLS 7 clustered
              environment? What are the things to watch out when clustering JMS? Can JMS
              topics and queues be clustered?
              TIA for any helpful hints and comments.
              Regards
              

    "Karim Ali" <[email protected]> wrote:
              >> Has any one implemented JMS in WLS 7 clustered
              >> environment?
              I'm currently working on a project with WLS 7 here at work, involving
              the implementation of BEA's JMS Cluster. So far, I really haven't had
              many hiccups.
              "Karim Ali" <[email protected]> wrote:
              >> What are the things to watch out when clustering JMS?
              At least in WLS 7, the biggest thing that stands out is the lack of
              automatic failover. Also, Message Paging -- make sure you configure
              paging high/low thresholds. Or, if you don't wish for it to occur but
              can't stop the server (very common these days with SLAs), set that
              byte/message high threshold to a very large number (correct me if I'm
              wrong, but I believe BEA recommends 2^63 -1).
              "Karim Ali" <[email protected]> wrote:
              >> Can JMS topics and queues be clustered?
              Well, since Topics and Queues are extensions of the
              javax.jms.Destination interface, the answer is: Yes!
              (SIDE NOTE: most people usually refer to them as a [JMS] "destination"
              -- it avoids a lot of conceptual baggage and plus, less typing!)
              You'll probably want to see this section of BEA's e-docs:
              http://edocs.bea.com/wls/docs70/adminguide/jms.html#config_distributed_destinations
              later,
              Brian J. Mitchell
              BEA Systems Administrator
              TRX
              Atlanta, GA
              email: [email protected]
              office: 404-327-7238
              mobile: 678-283-6530
              

  • Distinguishing between CSV and Excel file formats

    I am trying to distinguish between CSV and Excel files.   Most of the files I need to process are CSV, but some have been opened and re-saved in Excel format.  I know about the Excel toolbox available, but haven't used it yet. 
    I need to be able to open a spreadsheet file regardless of if it is in CSV or Excel format.  Any help would be greatly appreciated.
    Here are two example files, one CSV and one Excel.  Both have .XLS file extensions. 
    Attachments:
    20-4-XLS.xls ‏21 KB
    20-5-CSV.xls ‏8 KB

    Hi Paul,
    I think the matter is not the extention (xls or csv or whatever) but the format of the data written in your file.
    To see what I mean, open the xls file you posted with notepad... What does it look like ?
    You have tobe sure of the format of the file you want to read so that you can develop an appropriate VI... if you want to be able to read different type of data format, do a test before reading the file and then use an appropriate routine for each format.
    Hope this helps you...
    BTW, to read the one named CSV, a simple "read from spreadsheet file" VI will do the job
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"

  • Difference between notifiers and queues

    Hi, I have a question about notifiers and queues. I try to do a moving average for 6 min, having data with a sampling rate of 25 us. I use a producer/ consumer architecture. The producer loop reads 3 DMA Fifos from my FPGA vi and writes them in three diferent queues. Each queue is beeing read again in three consumer loop, one for each queue. I thought this might be faster??!! If I limit my queue to a certain size than after some minutes I get a timeout error, if I say 0 ms for timeout. I wanted to make sure that nothing will get lost. If I don't limit my queue size ( -1) after 10 minutes I get a message that I don't have enough memory to operate. I also can see that that in Task manager the page file is getting bigger and bigger until 2 gb. So from this poit of view I would assume that my average calculation is to slow and data has to be stored inbetween. So my consumer loop is to slow. Well I don't have any idea how to make my code faster. I also do a cascade for the averaging and the average is beeig calculated adding the new value and subtract the oldest value in the array.
    Than I tryed using the notifiers. As I read you can not size a notifier. But what happens if  the consumer loop is slower than the producer loop? Do I loose data? When using notifiers I don't get any error messages, like don't have enough memory . So what is the diference between notifiers and queues?
    Has also someone any idea how to make the code faster ?
    Thanks
    Attachments:
    mittel_Fifo1+2+3_gra_notif.vi ‏274 KB

    Check the number of elements in the queue when running your vi, so you can see if your queue is running full.
    Furthermore, your code looks a bit 'dirty'. From that I guess, there is still a lot of improvements that can be made to get the performance you need.
    Take a look at the 'ptbypt Mean.vi' (I don't remember the exact name).
    Felix
    www.aescusoft.de
    My latest community nugget on producer/consumer design
    My current blog: A journey through uml

  • Creating topics and queues programatically

    Hi,
    Here i my scenario.
    1. I have created the required number of queues and topics using the SunOne MQ's imqcmd command.
    2. I want to use the jndi apis to register the jndia names for these queues in the appserver. How do we do this?
    3. How to make an entry in the server.xml file programatically?
    Note:- i do no t want to use the asadmin-utility for this.
    i want to use the standard api's available to do this task.
    Pls help
    regards
    raghu

    Hi Raghu,
    You appear to have created various topics and queues
    on a MQ broker via the imqcmd command (independent
    of app server).
    For JMS clients to access/use the above topics/queues,
    JMS resources of type javax.jms.Topic and javax.jms.Queue
    need to be created and exposed to app server's JNDI
    context.
    Running this command:
    asadmin create-jms-resource ...
    Creates a new jms-resource entry in server.xml and
    the command:
    asadmin reconfig ...
    Creates the actual java object and introduces it into
    app server's JNDI context. (A server restart does this too).
    You mention that you want to do the above from your code.
    I don't think it is possible to programatically add new
    resources into server.xml. If there was a way, I wouldn't
    recommend it be done from J2EE applications since JMS resource
    management is an administrative task. Note that using
    JNDI to bind an object from an application (I haven't tried it
    in app server) may appear to work but this resource is not
    persisted across restarts since it is not in server.xml.
    Why do you want to do this ? Why does your application need to do
    what asadmin already does today ?
    Perhaps if I can better understand why you want to do this I can
    help suggest other solutions.
    regards,
    -isa

  • Distinguish between AW5 and 6 in script

    I'm trying to create an application in Automator to automate the conversion of AW to iWork. I'm using one of Yvan's scripts to convert AW6 to iWork successfully. The only step remaining is to convert to AW6 from 5, something that shouldn't be too hard since all it has to do is open and save. However, I can't find a good way to distinguish between AW5 and 6. In his script, I believe Yvan does this here:
    on AWtoAW6(leCheminOriginal_UniText) -- leCheminOriginal_UniText est Unicode text
              local leFichier, flag, nf, l, nouveauChemin
              set leFichier to leCheminOriginal_UniText as alias
              try
                        tell application "AppleWorks 6.2.9"
      activate
      open leFichier
                                  set nf to name of document 1
                                  if nf contains v6 then
                                            set AppleScript's text item delimiters to v6
                                            set l to text items of nf
                                            set AppleScript's text item delimiters to ""
                                            set nf to l as text
                                  end if
                                  if nf does not end with ".cwk" then set nf to nf & ".cwk"
                                  set nouveauChemin to cheminDeStockage & nf
                                  tell application "System Events"
                                            if exists (file nouveauChemin) then set name of file nouveauChemin to (text 1 thru -(2 + (length of "cwk")) of nf) & my horoDateur(modification date of file nouveauChemin) & ".cwk" (* name stamped *)
      make new file at end of folder cheminDeStockage with properties {name:nf, file creator:"BOBO", file type:fileType}
                                  end tell
                                  set leFichier to nouveauChemin as alias
      save document 1 in leFichier
      close document 1
                        end tell -- AppleWorks 6
              on error
                        set rapport to rapport & msg96 & nouveauChemin & return
              end try
    end AWtoAW6
    But I'm not sure. What I need is a script that opens, checks if it's an AW5 file, if it is opens and saves in AW6, and then proceeds to open my other script that can do the

    I'm not sure what you mean. The files have to be saved as AW6 for the iWork apps to be able to open them.
    Yvan has added all of his AppleWorks scripts to his Box.com account. He says the one you need is https://app.box.com/s/hqq9jwfi45nknjpf6d52

  • Cannot distinguish between left and right sounds IN EARPHONES. Please help!!

    when i connect my earphone, i cannot distinguish between left and right sounds (which gives a plesant effect); both left and right sounds are same. Earlier it use to work fine. I realised about this problem when an app-3D audio illusion was was not giving proper sounds, and my ipod songs were also sounding dull. i hav removed that app, but still my ipod songs sound monotonous. I have tried using different headphones, but problem still persists. I am not sure wheather this is a hardware or software issue..PLEASE HELP!!

    You're welcome. And thanks for marking question as solved.
    Happy listening
    Stedman

  • Distinguish between 0001 and 0006 Vendor in SRM?

    Hi,
    how can i distinguish between 0001 and 0006 vendors in SRM side after they have been replicated from R/3.
    Regards,
    Neha

    Hi Muthu,
    Thanks for your response.
    VENMAP contains both the vendors as both the vendors are replicated from ECC.
    I have found one solution:
    During the replication add a piece of code in both the methods of the  BADI BBP_TRANSDATA_PREP
    What will the code achieve:
                From the table CT_LFA1 identify the vendors with KTOKK = '0006'
                for those vendors set CT_LFA1-SPERM = 'X'.
                This will update the table field BUT000-XBLCK with 'X'.
                Hence, this can be used in the search help to distinguish between 0001 and 0006 vendors.
               XBLCK is used for blocking vendors from any purchasing activity .
    in my opinion this solution should work.
    What do u say?
    Regards,
    Neha Misra

  • How can I distinguish between iMessages and SMS messages in the iOS 7's "Messages" app?

    I often chat with the same contact using both services, but I just have a duplicate contact thread in the "Messages" app, which I cannot distinguish unless I go into the thread itself and check to see whether the conversation is blue or green. Is there a way to distinguish between the two services? If so, how?
    If not... Apple, get on it.

    Excuse me great powerful one. I will certainly deal with it and I'll try to survive. Sorry if I have troubled you, great Sir. I am not worthy of your answers.
    BTW: If you would have read the Q thoroughly you would not have posted an exact same answer.
    "...unless I go into the thread itself and check to see whether the conversation is blue or green. Is there a way to distinguish between the two services?"
    And I got your reply saying:
    "Yes, by going into the thread itself and check to see whether the conversation is blue or green."
    Wow, that was heplful.

  • Dynamic topics and queues

    I'd like to know if a JMS client can create a topic or queue dynamically to be used by others JMS clients, or this is a operation which only can be performed by JMS server.
    Thanks in advance.

    I should add that the JMS spec does define an API for creating 'temporary destinations', e.g., using the QueueSession.createTemporaryQueue() method. However these have a few limitations over standard destinations: firstly, they only survive for the lifetime of the connection from which they were created, when the connection is closed the destination is destroyed and the contents is lost; secondly, although producers from any connection can produce messages to a temporary destination, only consumers that belong to the same connection within which the temporary destination was created are able to consume from a given temporary destination. All that said, temporary destinations can often be useful, particularly for handling request/response type interactions - see QueueRequestors too for more info.
    Best regards,
    David Ingham
    Arjuna Technologies - http://www.arjuna.com

  • Programmatically distinguish between running and reserved vi's

    I want to programatically check whether a VI is running. I tried to use the "ExecutionState" property, but this did not work for me. My problem is that my definition of running does not match the execution state property’s definition of running:
    My Definitions
    ·         Running = Some element of this VI is currently executing (run arrow looks like this: )
    ·         Reserved = This VI is a sub VI of a running VI, but this VI is not actually running (run arrow looks like this: )
    ·         Idle = This VI is in memory but is not running or reserved (run arrow looks like this: )
    Execution State property definitions
    ·         Running = Some element of this VI is currently executing   OR   this VI is a sub VI of a running VI (run arrow looks like this  or like this )
    ·         Idle = This VI is in memory but is not running (run arrow looks like this: )
    Since each VI's front panel displays a running arrow when that VI is running and a reserved arrow when that VI is reserved, there must be some way to programatically distinguish between these two states.  I hope that this distinction is exposed to programmers.

    You should also go vote for this idea - http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Need-a-way-to-visualize-VI-call-chain-hierarchy/idi-p/...
    Just to expand on P@Anand's suggestion, because it is a good one - you can obtain references to all the VIs and check their state, and then open the BDs of those which are Run Top Level and manuallly inspect where the code is actually stuck.
    Note that if your top level VIs are the ones which are reentrant, you will need to open a reference to the clone, and that's not listed in the All VIs In Memory property, although there are some ways around that. You can try to open N references in a loop using MyVI.vi:# as the VI name and ignore those which return an error, but you should note that the numbers don't necessarily start from 1 and that NI might close up the option to get the clone references like that.
    You could also try closing the main VI to unload it and then opening a new one and looking at the Unopened SubVIs hierarchy, which should list all of the clones. I'm assuming that if the main VI is unloaded, only the clones which are still running will still be in memory, but that might change if you have classes (which don't unload) and I haven't actually tried this myself.
    Try to take over the world!

  • How to distinguish between enabled and disabled tasks in SSDT-BI 2012

    Hi,
    I've got SSDT-BI 2012 together with VS2012 installed. Simple questions: What is the difference between enabled and disabled tasks in control flow from the design/color point of view? I do see that the disabled tasks changes to grey (omg are you really kidding
    me????) from black. This could be a bad joke or dream however is not.
    So I'm kindly asking you to help me solve this problem. How can I change the color difference between these two options (enabled task vs disabled task)? I do not care whether the one will be yellow or pink, simply just need to be recognizable at first
    look and not under long and painful examination.
    Thanks for your reply. Hopefully it will be useful.
    Karol.

    Hi Karol,
    It’s true that it only changes the font color of the task name text to grey after disabling a task in SSDT 2012. In SSDT 2010, the whole task control including icon will turn grey after it is disabled; in BIDS, the background color of the task control will
    turn grey after it is disabled. These behaviors are by design. Personally, I agree with you that this behavior in SSDT 2012 is not very readable.
    If you have concerns, I would suggest you submitting a wish at
    https://connect.microsoft.com/sql.
    Connect site is a connection point between you and Microsoft, and ultimately the larger community. Your feedback enables Microsoft to make software and services the best that they can be, and you can learn about and contribute to exciting projects.
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • Could someone help me to clearly distinguish between SOAP and HTTP adapter?

    In which scenarios we can go for HTTP adapter and when to go for SOAP adapter?

    Hi Lekshmi !!
    A SOAP message will be bundled inside the soap envelope.HTTP is not an adapter in adapter engine whereas soap is an adapter i.e, HTTP doesn't require a communication channel where as SOAP requires.You can send soap messages using some SOAP client.
    SOAP Adapter is used to xchange SOAP messages bw remote clients and webservices....
    check this link for more differences..
    SOAP and HTTP adapter
    When you need to Send Data to XI from a Webservice , your SOAP adapter is used.
    HTTP adapter is used when you want to post a HTTP request message from a web application to XI.
    How can i make use of SOAP Sender Adapter without using any tools like XML Spy etc....
    XML SPy is used as a TEST tool when you are sending SOAP information to XI. TO actually send data , you need to configure a webservice and construct a SOAP request message and post the data .
    we use SOAP adapter when we need to connect to remote system or use Webservices in these cases we use SOAP adapter.
    HTTP Adapter is used by extenal systems to connect to Intergartin server using native HTTP Interface.
    the http adapter is a service which is directly connected to integration engine. Adapter Framework (Java) isnt involved. It is much more performant than SOAP adapter.
    The SOAP adapter is written in Java and is responsible for the SOAP envelope around the real XML message. You can build/remove that envelope as well in the mapping and use instead http adapter. But standard for webservices is using SOAP adapter.
    Check this thread....
    Difference between SOAP and Http Sender
    HTTP Adatpter Vs Soap Adapter
    HTPP Adatpter Vs Soap Adapter ????
    Difference between SOAP and Http Sender
    Difference between SOAP and Http Sender
    Plain HTTP Adapter vs SOAP Adapter with regards to SSL
    Plain HTTP Adapter vs SOAP Adapter with regards to SSL
    Hope it clears your doubt !!!!
    Questions are welcome here!!
    <b>Also mark helpful answers by rewarding points </b>
    Thanks,
    Abhishek Agrahari

  • Distinguishing between Form and URL variables

    My mind isn't working like it should today, but what I am trying to do is:
    1) alter a page via passing a argument in the URL
    2) store this in a hidden field within the form on the page
    3) retrieve the hidden field when the page is refreshed or in this case manipulated again for printing.
    Basically, I have a report screen that allows the user to toggle between paging 1 page at a time or show all pages. If they click for all pages I pass a variable (allPages), and store it in a hidden field (allPages). Now if the user presses the "Print" button I reload the page stripping out form elements and put in Page breaks so that the report prints fairly nicely. Whats not working is my ability to differentiate between the parameter passed in the URL and the parameter contained within the form.
    I am currently able top get the URL passed parameter via:
    request.getParameter("allPages")
    Is there a way to check for the form element, if it exist then use it else check for the URL passed parameter, or default it.
    Thanks in advance.

    I wonder, why you didn't use two different name for the parameter via URL and via Form, so your program should can easily distinguish where come from where, am I right?
    The other way, you may check the method, whether it is "post" or "get", the get method is what you said as via URL and post normally use by form. But I think, it is better use two different parameter for Form and URL.

  • Problems distinguish between OEM and GRID in documentation

    Hi all,
    I know, probably mine is an annoying question, but I really find difficult to distinguish the topis related to OEM and GRID. I have to configure the OEM dbconsole for a cluster, forcing a virtual IP, but I go lost in documentation (metalink too) because is quite impossible to have a clear and definitive guide to OEM NO GRID.
    Is anyone able to point me to an exhaustive documentation??
    Any help will be appreciated.
    thank you very much

    You are right, there's no specific DBConsole documentation. Standalone DBConsole is installed and configured by utility 'emca'. On metalink there's a comprehensive description of this utility,including for clustered environments.
    Overview Of The EMCA Commands Available for DB Control 10.2 Installations
    Doc ID: Note:330130.1
    Werner

Maybe you are looking for

  • IOS 5 Photo App chrashes.

    iOS 5 Photo App chrashes. What can I do now. I also restored the iPhone. Please help me !!!

  • Text-to-sp​eech in CVI ?

    Hi, I'm just working on a CVI project and I wish to implement some text-to-speech function. My purpose is to inform the operator that some problem occurs in the process, both with a standard message popup and a "vocal" one. I can't use waves as I wan

  • Routing Rule

    Hi, I have an idoc imported in XI.  It comes with standard message type while importing . I need to route this IDOC to two different systems.  But the problme is the Message type is different for both of this system, but the IDOC type is same. And th

  • Regd : Transaction CK11N

    Hi - While running a cost estimate of a product through transaction code CK11N, the system displays a table containing the columns for Components, Value, Quantity etc.  'Where from the data related to Quantity & Value arrived in  the table (i.e. cost

  • EEDM11 transaction from ABAP code

    Hi Experts, I need to call a transaction EEDM11 (Display point of delivery) from the code in such a way, that it will show me the info about specified point of delivery. The POD ID is known. So the question is - how do I specify the POD number to thi