ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Basic JMS Setup

Post new topic  Reply to topic
 Basic JMS Setup « View previous topic :: View next topic » 
Author Message
jason_e
PostPosted: Mon May 17, 2004 12:08 pm    Post subject: Basic JMS Setup Reply with quote

Apprentice

Joined: 19 Aug 2003
Posts: 33

Hi,
I'm trying to get started with JMS but it is proving to be quite difficult. The Java side of things is quite easy but it is the environment configuration that is given me trouble.

I have read everything in the Java documentation but doesn't help much. Where can I get detailed step-by-step instructions on setting up my JMS environment and running a message listener.

Any links or pointers to specific sections of the documentation would help.

Thanks
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon May 17, 2004 12:13 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

What JMS provider are you using?

WAS?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
jason_e
PostPosted: Mon May 17, 2004 10:57 pm    Post subject: Reply with quote

Apprentice

Joined: 19 Aug 2003
Posts: 33

Below is the contents of the config file that I use to start JMSAdmin.
I have read through WebSphere MQ - Using Java and it helped me to get
as far as being able to start JMSAdmin. Once I have JMSAdmin started I
don't know what objects to create or how to create them.

Any advice?


#Set the service provider
INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory
#Set the initial context
PROVIDER_URL=file:d://jndi
#Set the authentication type
SECURITY_AUTHENTICATION=none
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue May 18, 2004 4:11 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Okay, so you're just using a local file-based JNDI and using MQ itself as the JMS provider.

In order for you to be able to send JMS messages to queues, you have to define Queue destinations for the messages to be put to.

You also have to define a Queue Connection Factory that will allow you to connect to your queue manager.

This is done using the DEFINE command in JMSAdmin.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
bower5932
PostPosted: Tue May 18, 2004 5:01 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

There are a couple of publish/subscribe sample programs at:

http://www.developer.ibm.com/tech/sampmq.html

They are called mqjmspub.java and mqjmssub.java. You can also find detailed information on configuring and running them at:

http://www.developer.ibm.com/tech/faq/individual?oid=2:83352

They are geared towards running in a stand-alone environment.

If you are trying to do point-to-point, you can find some samples at the same URL. There will be comments in the headers, but they may not have the detail that you are looking for. One thing that I will add is that you'll need to catch the linked exception:
Code:

   } catch( JMSException je ) {
         System.out.println("JMS Exception: " + je);
         // check for a linked exception
         Exception le = je.getLinkedException();
         if (le != null) {
            System.out.println("Linked exception: " + le);
         }
   }

This will give you the underlying MQ error.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Basic JMS Setup
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.