Message Queue 4.4 doesn't know "jms.properties" ?

Sun JMS Tutorial illustrates using a properties file to supply context properties. You define a System property "jms.properties" to point to the location of the properties file:
java -Djms.properties=%J2EE_HOME%\config\jms_client.propertiesInside of said file is the properties in question (these are a surmise; the contents are nowhere documented).
java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory
java.naming.provider.url=file:///C:/TempThen a call to InitialContext() will succeed.
But the Tutorial assumes you're running under J2EE, and I'm not. I'm using the stand-alone Message Queue 4.4. If I define the properties on the command line,
java -Djava.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory -Djava.naming.provider.url=file:///C:/Tempthen InitialContext() succeeds.
If I explicitly dump the contents of the file into System.properties,
       String
       prop = System.getProperty( "jms.properties" );
       Properties props = System.getProperties();
       try  {
           java.io.File pf = new java.io.File( prop );
           props.load( new java.io.FileInputStream(pf) );
       catch( Exception ex )  { ex.printStackTrace(); }Then they get defined and InitialContext() tries to use them. But if I don't then they never get defined. Obviously the Tutorial expects that someone will do that, but who? AFAIK, both environments use the same naming library.
Has the behavior of MQ changed since version 1.3 of the tutorial? Or is J2EE doing something that the standalone product doesn't?

This is all about JNDI configuration. Before you can look up an object in a JNDI repository you need to tell the JNDI runtime which JNDI provider to use. This means you need to set the system properties java.naming.factory.initial and java.naming.provider.url to specify which JNDI provider to use and where the data is located. There's a bit about this in the JNDI tutorial [http://java.sun.com/products/jndi/tutorial/basics/prepare/initial.html|http://java.sun.com/products/jndi/tutorial/basics/prepare/initial.html] .
The tutorial you are running uses the simple file-based JNDI provider known as "fscontext" and included in fscontext.jar.
That tutorial seems to be reading the jms.properties property and importing its contents, though I can't see where that is supposed to happen and so am not surprised it doesn't work. jms.properties is not, as far as I can see, a standard property name.
The MQ 4.4 documentation describes how to configure an InitialContext to use fscontext by configuring those properties directly. This would definitely work!
[http://docs.sun.com/app/docs/doc/821-0029/aeqbb?a=view|http://docs.sun.com/app/docs/doc/821-0029/aeqbb?a=view]
Note that your JNDI datastore (which you've defined to be in C:\Temp) will start off empty, so any lookups will fail unless you've inserted connection factories or destinations in there yourself. I see that is covered elsewhere in the JMS tutorial you were following. There's also a simple MQ GUI tool that can do this. [http://docs.sun.com/app/docs/doc/821-0027/aeoaz?a=view|http://docs.sun.com/app/docs/doc/821-0027/aeoaz?a=view]
Finally, if you're simply trying to learn about JMS and MQ you can skip the use of JNDI completely and simply instantiate the underlying connection factories explicitly. This wouldn't be appropriate in a production environment (where it is recommended to store such objects in a central store) but for developmeht purposes would work just fine.
Nigel
http://docs.sun.com/app/docs/doc/821-0029/aeqbb?a=view

Similar Messages

  • I am getting this error message when trying to get to a college webpage Firefox doesn't know how to open this address, because the protocol (html) isn't associated with any program.

    I am trying to get to a college webpage for information and get this error message from firefox Firefox doesn't know how to open this address, because the protocol (html) isn't associated with any program.
    == This happened ==
    Every time Firefox opened
    == whe trying to access webpage

    Is this coming from a link, or from something you are trying to type in the address bar?
    Try replacing the "html" at the start with "http",
    so if you have html://somesite.edu,
    change it to http://somesite.edu.

  • Sun ONE Message Queue and JMS

    Is Sun ONE Message Queue software a reference implementation or a
    product?

    Sun ONE Message Queue is a product. It is a production implementation of the JMS
    specification. Sun ONE Message Queue software performs the function of a message
    broker, essentially serving as a common denominator enabling the exchange of
    information between applications. A number of competing products perform this same
    function, but Sun ONE Message Queue software adds the availability of JMS APIs to
    promote an open, industry-standard interface to messaging middleware, thus
    promoting the platform interoperability of Java while also enabling developers of
    business applications to write to only a single interface. In and of itself, this does not
    make Sun ONE Message Queue software unique since other MOM products also
    conform to the JMS specification. However, the combination of JMS with high
    performance, low cost, ease of use, and Sun's world class distribution and support
    channels makes Sun ONE Message Queue software a highly competitive product.

  • Alert: firefox doesn't know how to open this address...

    so the message is:
    "alert: firefox doesn't know how to open this address, because the protocol (replace) isn't associated with any program"
    I got this alert was Firefox was idle on the same page for a little while. No idea what that means...

    Looks like you have an application that adds launch: to the command line to start Firefox.
    You can also check the Firefox shortcut to see with what command Firefox is started.

  • Dead message queue - DLQ for foreign JMS providers

    Is there a way to configure Error-queue or 'Dead message/letter queue' in MDB listening to foreign JMS provider like JBoss? (Automatic routing of failed messages to error-queue after specified retries to preserve JMS messages)
              I did all the docs from BEA and it doesn't cover this DLQ for foreign JMS providers :). For Weblogic JMS service, DLQ can be configured in the config.xml. But for <ForeignJMSServer> there is no way to configure dead-queue.
              Could some please validate this before I start coding this piece in the application instead of appserver configuration.
              JMS provider is Tibco and JMS destinations are pre-defined and can't/doesn't need to be created
              Thanks in advance.

    Interesting idea! But no, there's no facility for redirecting failed foreign provider messages to a DLQ. This is a feature normally supplied by the foreign provider itself.
              Some foreign providers, in addition to WebLogic 9.0 JMS, provide a "redelivery count" property in the message. If the foreign provider provides no automatic DLQ capability, you might be able to leverage this property to have your MDB application code automatically forward messages with high redelivery counts to the DLQ.
              Tom

  • How do I fix this error message, The address wasn't understood Firefox doesn't know how to open this address, because one of the following protocols (connectag

    We have a new computer and I cannot get my garmin running watch to sync with mozilla. The error message that I keep getting is"The address wasn't understood
    Firefox doesn't know how to open this address, because one of the following protocols (connectagent) isn't associated with any program or is not allowed in this context.
    You might need to install other software to open this address."
    Help please

    This is for a special URL that starts with
    connectagent://
    instead of with
    http://
    is that right?
    Two thoughts:
    (1) Could you try changing a setting for your Garmin plugin. Here's what I mean:
    Open the Add-ons page using either:
    * Ctrl+Shift+a
    * orange Firefox button (or Tools menu) > Add-ons
    In the left column, click Plugins.
    Find your Garmin plugin change "Ask to Activate" to "Always Activate".
    Your system information seems to list two different versions of a similarly named plugin. I'm not sure whether that is causing a problem.
    (2) Does Garmin's documentation specify any extra steps to set up Firefox, other than installing its add-ons?

  • When I try to open a video from the website Youtube I got this message that I didnt before I uograde to Firefox 7.0.1 : "Firefox doesn't know how to open this address, because the protocol (rtsp) isn't associated with any program."

    When I try to open a video from the website Youtube I got this message that I didnt before I uograde to Firefox 7.0.1 : "Firefox doesn't know how to open this address, because the protocol (rtsp) isn't associated with any program."
    That didnt happen before until I made an upgrade to 7.0.1

    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    * Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    * Tools > Options > Privacy > Cookies: "Show Cookies"

  • JMS Message Queue - stuck in

    I am on SOA SUITE 11.1.17
    I have a jms queue set up and am able to successfully send messages to it using the SOA JMS Adapter.  I am able to succesfully listen to a queue using a JMS adapter in a different project.
    However, here when I try to "listen" to the queue using a java program, the message is "received" in my java program and processed as it should be.  The java program is running in a while loop, so it stays running.
    On the queue, when the java program reads it, the message is moved to the "Messages Pending" column.  When I kill the java program, the message is returned to the "Messages Current"
    Would anyone have any ideas about this?  We have an existing java based program isn't properly "closing" the message.
    I tried:
    1.  placing msg.acknowledge() in the code, since the documentation states that messages that are in "Messages Pending" have been read, but not acknowledged or committed -- but this does nothing.
    2.  Setting the expiration on the message to 1, but that is a hack.  I would rather fix the problem than use a hack.
    Anyone have any ideas what is wrong?
    Thank you,
    Stuart
    import java.io.IOException;
    import java.io.InputStreamReader;
    import javax.jms.Connection;
    import javax.jms.JMSException;
    import javax.jms.Message;
    import javax.jms.MessageConsumer;
    import javax.jms.MessageListener;
    import javax.jms.Session;
    import javax.jms.TextMessage;
    public class JMSListenAndRespond extends JMSQueueHandler implements MessageListener {
      private Session jmsSession = null;
      private MessageConsumer jmsMessageConsumer = null;
      private Connection jmsConnection = null;
      int counter = 1 ;
      public static void main(String[] args) throws Exception {
        InputStreamReader commandBuffer = null;
        char command = '\0';
          // first listen for any messages
          JmsDataObject q = new JmsDataObject();
          q.setJmsCF("jms/TestConnectionFactory");
          q.setJmsQueue("jms/TestJMSQueue");
          q.setServerPwd("welcome1");
          q.setServerLogin("weblogic");
          q.setUrl("t3://localhost:7101");
          q.setJmsMsg("na -- we are listinging...");
        JMSListenAndRespond lis = new JMSListenAndRespond();
         lis.consumeMessage(q);
        System.out.println("(type q to exit at any time...)\n");
        try {
          // Now just loop, waiting for messages until user types 'q' to quit
          commandBuffer = new InputStreamReader(System.in);
        while (!(command == 'q')) {
           try {
              command = (char)commandBuffer.read();
              System.out.println("Command: "+command);
              lis.stopListening();
            } catch (IOException e) {
              System.err.println("I/O Exception: ");
              e.printStackTrace();
           } //while
        } finally {
                lis.stopListening();
          lis.stopListening();
       public void stopListening() {
        try {
          if (jmsMessageConsumer != null) {
            jmsMessageConsumer.close();
          if (jmsSession != null) {
            jmsSession.close();
          if (jmsConnection != null) {
            jmsConnection.close();
        } catch (JMSException e) {
          System.err.println("Couldn't properly close all resources.\n");
          e.printStackTrace();
      private void prepareToConsumeMessage() {
        // create JMS connection, session, consumer and register listener - then start session
            try {
          // create connection
          jmsConnection = getJmsConnectionFactory().createConnection();
          // create session
          jmsSession =   jmsConnection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
          jmsMessageConsumer = jmsSession.createConsumer(getJmsDestination());
          // register a message listener (onMessage)
          jmsMessageConsumer.setMessageListener(this);
          // initiate connection - make sure to register your listener first or you might lose messages
          jmsConnection.start();
          System.out.println("\n...listening for message!\n");
        } catch (JMSException e) {
          System.err.println("Problem initializing JMS session");
          e.printStackTrace();
          System.exit(-1);
         * onMessage
         * The callback function invoked upon message reception
      public void onMessage(Message msg) {
        try {
          String msgText;
          if (msg instanceof TextMessage) {
            msgText = ((TextMessage)msg).getText();
            // this method expects a CSV string with the following makeup:
            // firstName,lastName,gender,birthdate,address,city,zipcode,state,insurancePolicyId
            String messageId = msg.getJMSMessageID();
          // code to process goes here.....
          } else {
            // if message is not a TextMessage, attempt a conversion to string
            System.out.println("\n** NEW MESSAGE (" + msg.getClass().getName() +
                               "):\n" +
                msg.toString());
        } catch (JMSException e) {
          e.printStackTrace();
      public void consumeMessage(JmsDataObject q ) {
        initializeJndiProperties(q);
        initializeJNDIandCF(q.getJmsQueue());
        prepareToConsumeMessage();
    import java.util.Properties;
    import javax.jms.Connection;
    import javax.jms.ConnectionFactory;
    import javax.jms.Destination;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    public abstract class JMSQueueHandler {
      protected void initializeJNDIandCF(String destinationQueueName) {
        // initialize JNDI context and lookup connection factory and destination
        try {
          // Initialize JNDI context
          jndiContext = new InitialContext(jndiProperties);
        } catch (NamingException e) {
          e.printStackTrace();
        try {
          // lookup JMS connection factory in JNDI
          jmsConnectionFactory =
              (ConnectionFactory)jndiContext.lookup(jndiProperties.getProperty("factory.name"));
          // lookup JMS destination in JNDI
          jmsDestination = (Destination)jndiContext.lookup(destinationQueueName);
        } catch (NamingException e) {
          System.err.println("Problem during the JNDI lookup\n");
          e.printStackTrace();
          System.exit(-1);
      public void initializeJndiProperties(JmsDataObject qdo ) {
        // set JNDI properties
        jndiProperties.put("java.naming.factory.initial","weblogic.jndi.WLInitialContextFactory");
        jndiProperties.put("java.naming.provider.url", qdo.getUrl() );
       // jndiProperties.put("java.naming.security.principal", NAMING_PRINCIPAL);
        jndiProperties.put("java.naming.security.principal", qdo.getServerLogin() ) ;
        //  jndiProperties.put("java.naming.security.credentials", NAMING_CREDENTIAL);
        jndiProperties.put("java.naming.security.credentials", qdo.getServerPwd() );
        //jndiProperties.put("factory.name", JMS_CONNECTION_FACTORY);
        jndiProperties.put("factory.name", qdo.getJmsCF() );
      //protected static final String NAMING_PROVIDER_URL = "t3://localhost:7101";
    //protected static final String NAMING_PRINCIPAL = "weblogic";
    // protected static final String NAMING_CREDENTIAL = "welcome1";
    // protected static final String JMS_CONNECTION_FACTORY = "jms/patientsJmsCF";
    // protected static final String JMS_CONNECTION_FACTORY = "jms/TestConnectionFactory";
      ConnectionFactory jmsConnectionFactory = null;
      Destination jmsDestination = null;
      InitialContext jndiContext = null;
      Properties jndiProperties = new Properties();
      public void setJmsConnectionFactory(ConnectionFactory jmsConnectionFactory) {
        this.jmsConnectionFactory = jmsConnectionFactory;
      public ConnectionFactory getJmsConnectionFactory() {
        return jmsConnectionFactory;
      public void setJmsDestination(Destination jmsDestination) {
        this.jmsDestination = jmsDestination;
      public Destination getJmsDestination() {
        return jmsDestination;

    Thanks for the reply. There are no errors what so ever regarding MDB issues. Not in the weblogic / console logging, nor in the logging of the component itself.
    The MDB itself is setup to have 16 concurrent beans per component deployment. The component is clustered over 4 server instances. So there are quite some concurrent MDBs running. However since the messages get stuck for weeks eventhough the component only has bursts of messages to process, one would think that the the stuck messages would be processed whenever the component has some spare time (which it has a lot between the bursts).
    Therefor i doubt it has anything to do with too little MDBs running. But frankly I have no idea what's wrong.

  • When trying to stream video I am getting this error message "Firefox doesn't know how to open this address, because the protocol (st) isn't associated with any program." How do I fix this?

    <blockquote>Locking duplicate thread.<br>
    Please continue here: [/questions/782039]</blockquote><br>
    When trying to stream video I am getting this error message "Firefox doesn't know how to open this address, because the protocol (st) isn't associated with any program." How do I fix this?

    Protocol error usually indicates that the very leftmost part of the URL is not recognized.
    So http://, ftp://, rtsp://, usually work.
    ableton:// would need to be added by some software somewhere...
    Can you get instructions from the vendor? Does these posts seem relevant:
    [http://forum.ableton.com/viewtopic.php?f=32&t=112368 Ableton Forum • View topic - [dds&#0093; Bug with Fireforx browser and downloading project?]
    [http://forum.ableton.com/viewtopic.php?f=32&t=109918 Ableton Forum • View topic - [gck&#0093; Problem downloading shared sets from Ableton server.].

  • Java Message Queue/ JMS Vendor performance.

    Hi,
    I need some help from you folks. In our system we are dealing with large number (tens of thousands) of operations per second. I'm doing some research in order to determine if we can use JavaTM Message Service (JMS) API in this system. I red that Java Message Queue was voted "Best Java Messaging Tool" by Java Developer's Journal readers and JMQ now marked by iPlanet[tm] E-Commerce Solutions. So I'm looking for numbers. How many clients/operations iPlanet or other JMS vendors can support per second. Unfortunately I didn't find any concrete example of built systems, number of maximum operation supported per second.
    Please response to [email protected] also.
    Thanks in advance,
    Daniel Drazner

    Following configuration: pIII 1GHz, standard vm settings, JBoss 2.4.4, jdk1.3.3 sun
    My project (probably good optimized) has following performance:
    - asynchronous sending message to queue:20 ms
    - synchronous (send/replay) 200 ms
    This are statistics for single thread, but this is some how scalable, so for 20 parallel threads you will have the same performance.
    Topics are much faster, but I need PTP messaging

  • I try to email or IM a link or comment on a website page and I get this error message: Firefox doesn't know how to open this address, because the protocol (ymsgr) isn't associated with any program.

    Firefox doesn't know how to open this address, because the protocol (ymsgr) isn't associated with any program. I try to email or IM a link or info on a web page I get this error message. How can I send an email or IM?

    Protocol error usually indicates that the very leftmost part of the URL is not recognized.
    So http://, ftp://, rtsp://, usually work.
    ableton:// would need to be added by some software somewhere...
    Can you get instructions from the vendor? Does these posts seem relevant:
    [http://forum.ableton.com/viewtopic.php?f=32&t=112368 Ableton Forum • View topic - [dds&#0093; Bug with Fireforx browser and downloading project?]
    [http://forum.ableton.com/viewtopic.php?f=32&t=109918 Ableton Forum • View topic - [gck&#0093; Problem downloading shared sets from Ableton server.].

  • Unable to download music - error message reads "Firefox doesn't know how to open this address, because the protocol (wmms) isn't associated with any program."

    I purchased a song to download from Walmart.com and received the error message when I tried to download the song; "Firefox doesn't know how to open this address, because the protocol (wmms) isn't associated with any program." I've never had a problem before. I paid for this download & I can't even access it.

    Does the Walmart site offer a plugin or program (Walmart MP3 Music Downloads) to handle that protocol?<br />
    See:
    * http://mp3.walmart.com/store/help/help.htm
    * http://mp3.walmart.com/store/help/downloading.htm
    On Windows a protocol need to be registered by a program that supports that protocol.
    See also http://kb.mozillazine.org/Register_protocol

  • When trying to go into itunes I get this message "Firefox doesn't know how to open this address, because the protocol (itmss) isn't associated with any program"

    When trying to log into itunes i get this message:
    Firefox doesn't know how to open this address, because the protocol (itmss) isn't associated with any program.
    I had to reset Firefox (due to slowness and shockwave error message that I kept getting). Itunes was downloaded after the reset, but I can't get into it? Any ideas?

    I ran into this same problem after Firefox auto-updated to v24! I'm on the Beta Channel and I had Firefox set to automatically update.
    What I did to correct the problem:
    1. Turned off all automatic updating.
    Options> Advanced> Update [tab]
    Firefox updates
    [x] Check for updates, but let me choose whether to install them
    [ ] (unchecked) Use a background service to install updates
    I also unchecked;
    [ ] Search Engines (I will turn this back on after I'm done with my experiment.)
    2. Googled 'Firefox v23 download', downloaded and installed: Firefox_Setup_23.0b1.exe (version 23, Beta 1)
    Since I reverted back to v23, I haven't had any problems.

  • I am trying to get Firefox to open Vuze when I click on a magnet link, I get the following message: Firefox doesn't know how to open this address, because the protocol (magnet) isn't associated with any programme. tell me the solution

    when i try to open torrent using magnet, I get the following message. Firefox doesn't know how to open this address, because the protocol (magnet) isn't association to any programme.

    '''I had this problem and just re-installed Firefox. Problem solved. In my case I believe it was due to installing FlashGet. Though I uninstalled FlashGet, it had pre-empted the Magnet links / protocol. I hope this helps you with your instance. Happily I had the installer for my version of Firefox (7.0.1) saved and used that but you might need to search for your current version or install a later version'''

  • Getting this error message Firefox doesn't know how to open this address, because the protocol (ableton) isn't associated with any program

    Firefox doesn't know how to open this address, because the protocol (ableton) isn't associated with any program.
    I keep getting this message even though the ableton software was installed and authorized

    Protocol error usually indicates that the very leftmost part of the URL is not recognized.
    So http://, ftp://, rtsp://, usually work.
    ableton:// would need to be added by some software somewhere...
    Can you get instructions from the vendor? Does these posts seem relevant:
    [http://forum.ableton.com/viewtopic.php?f=32&t=112368 Ableton Forum • View topic - [dds&#0093; Bug with Fireforx browser and downloading project?]
    [http://forum.ableton.com/viewtopic.php?f=32&t=109918 Ableton Forum • View topic - [gck&#0093; Problem downloading shared sets from Ableton server.].

Maybe you are looking for

  • Windows Server 2012 R2 - unable to change the Network category when is in domain

    HI, I've read articles about this topic but after all tries - i couldn't find appropriate decision and i still have problem.  Set-NetConnectionProfile : Unable to set the NetworkCategory due to one of the following possible reasons: not running Power

  • How to create AP payment terms and withholding tax from backend ?

    Hi All, I have a requirement to create the AP Payment terms and withholding tax from backend as the data is going to be uploaded into 15 different instances therefore for the convenience i am looking for any API or Interface to create these from back

  • Set Status of next document in CHARM

    Hi Solman experts, I would like to automatically set the status of a "next document" in CHARM. For example if i set a close state for a SDCR i would also like the attached "next documents" to also move to a close state (SDHF etc....). I know this is

  • Error in select

    Hi, below is my select, it returns an error: ORA-00904: "UNION"."QTD_ITEM": invalid identifier SELECT union.cod_company, union.num_order, union.cod_prod, Sum(union.qtd_item) -- here is the error FROM SELECT cod_company, num_order, cod_prod, qtd_item_

  • Safari 2.0.3 & Acid Search - It still works - FYI

    Just thought I would let fellow Acid Search Users know that Acid Search does still work with the latest Safari... You need to get rid of the Acid Search Package when installing the latest update (or it crashes Safari), but once the update is up and r