Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating dynamic queue in Java and Configuring it with JBoss 6.0

 
prasad phatak
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic