[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to configure JMS Queue?

Posted on 2004-03-23
12
Medium Priority
?
6,518 Views
Last Modified: 2013-12-10
I have a websphere 6.0 running. I need to create and/or delete JMS Queues dynamically using a java class. I used AdminClient and added destinations in resources.xml as follows

<factories xmi:type="resources.jms.internalmessaging:WASQueue" xmi:id="WASQueue_1080102412281" name="testQ" jndiName="queue/testQ" persistence="APPLICATION_DEFINED" priority="APPLICATION_DEFINED" expiry="APPLICATION_DEFINED"/>

I'm not able to do a lookup on this queue.

InitialContext ic = new InitialContext();
ic.lookup("queue/testQ");

throws a NameNotFoundException.

I'm able to find  entries for "testQ" in WebSphere JMS Provider screen in admin console.

How do i lookup this queue?

This link points to documentation
http://publib.boulder.ibm.com/infocenter/wsphelp/topic/com.ibm.websphere.nd.doc/info/ae/ae/tmj_adm23.html

Documentation says as follows

"To make a queue destination available to applications, you need to host the queue on a JMS server. To add a new queue to a JMS server or to change an existing queue on a JMS server, you define the administrative name of the queue to the JMS server, as described in Managing WebSphere internal JMS servers."

 But i'm not able to find JMSServer under Servers in Navigation pane.
0
Comment
Question by:skarthikeyan100
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
12 Comments
 
LVL 9

Expert Comment

by:vzilka
ID: 10670462
Are you sure you saved your wsadmin session?
0
 

Author Comment

by:skarthikeyan100
ID: 10684591
Yes i saved session and it is available in resources.xml file, Do i have to install anything else for JMS Server to come up in navigqation pane?
0
 
LVL 9

Expert Comment

by:vzilka
ID: 10690294
When installing websphere, did you make sure you installed the messaging component?
If not, you should see in the server.log file the message "Messaging is not started" (or something similar, it should be in the begining of the log file)
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:skarthikeyan100
ID: 10693041
I did a full installation of Websphere 6. I assumed that it would install JMS components too.
You are right. Server log says that embedded messaging was not installed. Is it possible to install it separately?
0
 
LVL 9

Expert Comment

by:vzilka
ID: 10693892
I don't know about 6, but in 5 this is a known issue sometimes.
Looks at this question - http://www.experts-exchange.com/Web/Application_Servers/Websphere/Q_20907165.html
It should walk you through it.
0
 

Author Comment

by:skarthikeyan100
ID: 10722855
Thanks for your help, but i needed this in version 6. We need to define SIB Queue too for every JMS Queue. SIB Queue is the physical destination. We can use following script to create a queue.

SetJMSScope node

# create a ConnectionFactory
CreateJMSConnectionFactory "MyJMSConnFactory"
ModifyJMSConnectionFactoryProperties MyJMSConnFactory [list [list BusName "DEFAULT"]]

# create a Queue
set QNAME "MyQueue"
set JSDest "MySIBQueue"

CreateJMSQueue "$QNAME"
ModifyJMSQueueProperties "$QNAME" [list [list QueueName "$JSDest"]]

$AdminConfig save


0
 
LVL 9

Expert Comment

by:vzilka
ID: 10723217
I trhink that the installation issue is the same.
Without installing the JMS provider, your code will not run.
0
 

Author Comment

by:skarthikeyan100
ID: 10755153
This works, but i have to restart after configuring JMS Queue to do a lookup using InitialContext. Otherwise, the call

InitialContext ic = new InitialContext();
ic.lookup("MyQueue"); //This call fails.

Wnen i restart the appServer, it works fine. Is there way to enable this jndi binding at runtime?
0
 
LVL 9

Expert Comment

by:vzilka
ID: 10757870
I am not sure what is your question. YOu mean do you need to restart the client or the server?
I think WebSphere requires an app server restart after configuring a JMS object.
0
 

Author Comment

by:skarthikeyan100
ID: 10804060
The problem is solved. It is required that either app server should be restarted or an application should be started to do JNDI bindings. What we did is before deploying an application, JMS objects are created and the deployed application is then restarted. Now JNDI bindings occur without any problem. This is possible for us since we deploy an application programmatically in websphere.

Thanks for all your help vzika.
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 11417689
PAQed, with points refunded (100)

Netminder
EE Admin
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most of the developers using Tomcat find it easy to configure the datasource in Server.xml and use the JNDI name in the code to get the connection.  So the default connection pool using DBCP (or any other framework) is made available and the life go…
This article is about some of the basic and important steps to be used to improve the performance in web-sphere commerce application development. 1) Always leverage the Dyna-caching facility provided by the product 2) Remove the unwanted code …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question