pjj
pjj

Reputation: 2135

Not able to specify target for JMS queue and probably therefore getting

I am creating a WL JMS queue but while creating I don't see a target to attach this queue with (see below screen shot), so I create it without any target.

enter image description here

Now, after that when I try to connect using a JMS client code then I got below exception:

Exception in thread "main" javax.naming.NameNotFoundException: Unable to resolve 'dq1'. Resolved '' [Root exception is javax.naming.NameNotFoundException: Una
ble to resolve 'dq1'. Resolved '']; remaining name 'dq1'
        at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:251)
        at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:466)
        at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:274)
        at weblogic.jndi.internal.ServerNamingNode_12120_WLStub.lookup(Unknown Source)
        at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:440)
        at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:426)
        at javax.naming.InitialContext.lookup(Unknown Source)

I am quite sure that my client code is not faulty because someone else could use same code and push message to the queue.

Is exception occuring because queue is not attached to any target? How can I attach this queue to target, like managed server?

I am having the JMS server targetted to the managed sever, I thought I would get a option to select target for queue as well but it is not coming and probably that's why exception. Please note that I have already tried creating sub-deployment template for queue but it didn't work.

Please let me know if any other information is needed.


Update:

Issue is now isolated to managed servers, I could push messages to a queue which is targetted at admin server but when I tried same with managed server then it didn't succeed, below is what I did.

I have a managed server (running using node manager) - ms1, then I created a JMS server JMSServer2 which is targeted at ms1

enter image description here

Then I created a JMS module JmsModule2 whose target is ms1, created a JMS subdeployment Subdeployment2 whose target is JMSServer2 and created a connection factory and queue whose sub deployment is Subdeployment2 and target as JMSServer2. Below screen shots:

enter image description here

enter image description here

enter image description here

Upvotes: 1

Views: 1772

Answers (1)

Rouliboy
Rouliboy

Reputation: 1377

Ok, I figured it out. Actually, it seems that you MUST create a subdeployment to enable targetting on JMS Queue.

I assume that you have properly created a JMS Server and JMS Module.

Now you must :

Create a sub deployment

First you need to create a subdeployment specifying your JMS Server as a Target of this subdeployment :

enter image description here

Here my JMS Server is named JMSServer

Create a queue with subdeployment

Then you create the JMS Queue. Notice that if you do not specify any subdeployment in Queue configuration, you can't see any target :

enter image description here

However if you properly specify the previously created subdeployment, you will see you target JMSServer :

enter image description here

And that's all!

Hope this helps.

EDIT

I tested also on a cluster and it works fine when targetting a single managed server instance. You must

  1. Create a JMS Server specifying your single managed server instance as a Target.

  2. Create a JMS Module specifying your single managed server instance as a Target using 'Part of the cluster' part.

  3. In this JMS module, create a subdeployment specifying your single managed server instance as a Target using 'Part of the cluster' part.

  4. Finally create your JMS Queue and specify the corresponding subdeployment : you will see the JMS Server as a Target.

Upvotes: 1

Related Questions