I encountered a small error when developing messagedrivenbean under jboss5.0 with the following prompt:
javax. naming. namenotfoundexception: queueconnectionfactory 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 O RG. jnp. server. namingserver. lookup (namingserver. java: 443)
at Sun. reflect. nativemethodaccessorimpl. invoke0 (native method)
this error occurs mainly because the queueconnectionfactory . I log on to http: // localhost: 8090/JMX-console/of jboss5.0 and search for it under JBoss/service = jndiview/LIST/Global JNDI namespace, only connectionfactory !
Therefore, you can modify queueconnectionfactory in the Java class that sends the message as follows:
Queueconnectionfactory factory = (queueconnectionfactory) CTX. Lookup("Queueconnectionfactory");
Change to -->
Queueconnectionfactory factory = (queueconnectionfactory) CTX. Lookup("Connectionfactory");
OK!