wood burning stoves 2.0*
The moose likes JBoss/WildFly and the fly likes Creating dynamic queue in Java and Configuring it with JBoss 6.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Creating dynamic queue in Java and Configuring it with JBoss 6.0" Watch "Creating dynamic queue in Java and Configuring it with JBoss 6.0" New topic

Creating dynamic queue in Java and Configuring it with JBoss 6.0

prasad phatak

Joined: Sep 18, 2011
Posts: 5
Hi All,
Currently I am trying to migrate my application on JBoss 6.0 which was previously running on JBoss 4.0. After going through the code I found out that it creates dynamic queues with the code which is specific to JBoss 4.0 as posted below

RMIAdaptor server = (RMIAdaptor) jndiLookup("jmx/rmi/RMIAdaptor");
dm = new ObjectName("jboss.mq:service=DestinationManager");
server.invoke(dm, "createQueue",
new Object[] {subject,subject},
new String[] { String.class.getName(), String.class.getName()}

/*//Added By milind
server.invoke(dm, "createQueue", new Object[] { "ReplyChannel", "ReplyChannel"},
new String[] { String.class.getName(), String.class.getName() } );
//End here

queue = (Queue) jndiLookup(subject);

After migration to JBoss 6.0 it gives following print trace on console....

Value of the Description:{javax.jms.JMSException: Failed to create session=Class = Manager Method = connectToJMS}
javax.naming.NameNotFoundException: outChannel not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
at org.jnp.server.NamingServer.lookup(NamingServer.java:443)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:610)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.etp.dim.jms.JMSManager.jndiLookup(JMSManager.java:1473)

Can anyone please help me with this.
jQuery in Action, 2nd edition
subject: Creating dynamic queue in Java and Configuring it with JBoss 6.0
Similar Threads
Problem deploying sample HelloWorld Bean in JBoss 4.2.1 GA
need help on log4j.properties
jboss 3.0- org/jboss/logging/Logger class where is it
Simple EJB3 session beans not deploying in JBOSS6
Does jboss bind to on a non-clustered server ?