Something else I have noticed is that when I use the JMX console to bind another queue into jndi it all works fine and no error messages occur. Also the jndi viewer shows the newley bound queue in there but you cannot lookup the queue from jndi. BTW I am using EJB3 so the context is bound using the following:
@Resource(authenticationType = AuthenticationType.CONTAINER)
private SessionContext ctx;
Also if you try to delete the queue using the supposedly bound jndi name via the JMX console I get the following error:
Caused by: javax.management.InstanceNotFoundException: jboss.messaging.destination:service=Queue,name=/queue/pulseMailQueue is not registered.
at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:523)
at org.jboss.mx.server.MBeanServerImpl.getAttribute(MBeanServerImpl.java:550)
at org.jboss.jms.server.ServerPeer.destroyDestination(ServerPeer.java:738)
at org.jboss.jms.server.ServerPeer.destroyQueue(ServerPeer.java:386)
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:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
... 33 more
How can something be not registered in jndi and yet it shows up in the jndi viewer?
As you can see from the startup log there are no messages:
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: c:\Java\AppServers\JBoss\jboss-4.0.4RC2
JAVA: /cygdrive/c/Java/SDK/jdk1.5.0_05/bin/java
JAVA_OPTS: -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=4142,suspend=n -Dprogram.name=bash -Dprogram.name=bash -Dprogram.name=bash -Dprogram.name=bash -Dprogram.name=bash -Dprogram.name=bash
CLASSPATH: c;c;c;c;c;c:\Java\AppServers\JBoss\jboss-4.0.4RC2\bin\run.jar;c;c;c;c;c;c:\Java\SDK\jdk1.5.0_05\lib\tools.jar;c;c;c;c;c:\Java\AppServers\JBoss\jboss-4.0.4RC2\bin\run.jar;c;c;c;c;c:\Java\SDK\jdk1.5.0_05\lib\tools.jar;c;c;c;c:\Java\AppServers\JBoss\jboss-4.0.4RC2\bin\run.jar;c;c;c;c:\Java\SDK\jdk1.5.0_05\lib\tools.jar;c;c;c:\Java\AppServers\JBoss\jboss-4.0.4RC2\bin\run.jar;c;c;c:\Java\SDK\jdk1.5.0_05\lib\tools.jar;c;c:\Java\AppServers\JBoss\jboss-4.0.4RC2\bin\run.jar;c;c:\Java\SDK\jdk1.5.0_05\lib\tools.jar;c:\Java\AppServers\JBoss\jboss-4.0.4RC2\bin\run.jar;c:\Java\SDK\jdk1.5.0_05\lib\tools.jar
=========================================================================
Listening for transport dt_socket at address: 4142
20:33:34,625 INFO [Server] Starting JBoss (MX MicroKernel)...
20:33:34,625 INFO [Server] Release ID: JBoss [Zion] 4.0.4.CR2 (build: CVSTag=JBoss_4_0_4_CR2 date=200603311500)
20:33:34,625 INFO [Server] Home Dir: C:\Java\AppServers\JBoss\jboss-4.0.4RC2
20:33:34,640 INFO [Server] Home URL: file:/C:/Java/AppServers/JBoss/jboss-4.0.4RC2/
20:33:34,640 INFO [Server] Patch URL: null
20:33:34,640 INFO [Server] Server Name: pulse-with-messaging
20:33:34,640 INFO [Server] Server Home Dir: C:\Java\AppServers\JBoss\jboss-4.0.4RC2\server\pulse-with-messaging
20:33:34,640 INFO [Server] Server Home URL: file:/C:/Java/AppServers/JBoss/jboss-4.0.4RC2/server/pulse-with-messaging/
20:33:34,640 INFO [Server] Server Log Dir: C:\Java\AppServers\JBoss\jboss-4.0.4RC2\server\pulse-with-messaging\log
20:33:34,640 INFO [Server] Server Temp Dir: C:\Java\AppServers\JBoss\jboss-4.0.4RC2\server\pulse-with-messaging\tmp
20:33:34,640 INFO [Server] Root Deployment Filename: jboss-service.xml
20:33:35,046 INFO [ServerInfo] Java version: 1.5.0_05,Sun Microsystems Inc.
20:33:35,046 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.5.0_05-b05,Sun Microsystems Inc.
20:33:35,046 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
20:33:35,625 INFO [Server] Core system initialized
20:33:36,937 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
20:33:38,734 INFO [SocketServerInvoker] Invoker started for locator: InvokerLocator [socket://192.168.1.2:3873/]
20:33:39,265 INFO [AspectDeployer] Deployed AOP: file:/C:/Java/AppServers/JBoss/jboss-4.0.4RC2/server/pulse-with-messaging/deploy/ejb3-interceptors-aop.xml
20:33:44,093 INFO [WebService] Using RMI server codebase: http://PAULTLAPTOP:8083/
20:33:44,296 WARN [EJBTimerServiceImpl] Cannot obtain TransactionManager from JNDI, using TxManager.getInstance(): javax.naming.NameNotFoundException: TransactionManager not bound
20:33:46,734 INFO [MailService] Mail Service bound to java:/Mail
20:33:47,078 INFO [NamingService] JNDI bootstrap JNP=/0.0.0.0:1099, RMI=/0.0.0.0:1098, backlog=50, no client SocketFactory, Server SocketFactory=class org.jboss.net.sockets.DefaultSocketFactory
20:33:47,109 INFO [SubscriptionManager] Bound event dispatcher to java:comp/env/EventDispatcher
20:33:48,140 INFO [Embedded] Catalina naming disabled
20:33:48,234 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
20:33:48,234 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
20:33:48,796 INFO [Http11BaseProtocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8080
20:33:49,343 INFO [Http11BaseProtocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8443
20:33:49,343 INFO [Catalina] Initialization processed in 1109 ms
20:33:49,343 INFO [StandardService] Starting service jboss.web
20:33:49,359 INFO [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.5.16
20:33:49,437 INFO [StandardHost] XML validation disabled
20:33:49,515 INFO [Catalina] Server startup in 172 ms
20:33:49,750 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jbossweb-tomcat55.sar/ROOT.war/
20:33:50,484 INFO [WebappLoader] Dual registration of jndi stream handler: factory already defined
20:33:51,046 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../tmp/deploy/tmp3746jbossws.sar-contents/jbossws-exp.war/
20:33:51,546 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
20:33:51,640 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
20:33:51,796 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms-ra.rar
20:33:52,703 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
20:33:52,921 WARN [JDBCPersistenceManager]
JBoss Messaging Warning: DataSource connection transaction isolation should be READ_COMMITTED, but it is currently NONE.
Using an isolation level less strict than READ_COMMITTED may lead to data consistency problems.
Using an isolation level more strict than READ_COMMITTED may lead to deadlock.
20:33:53,546 INFO [ServerPeer] JBoss Messaging 1.0.1.CR1 server [server.0] started
20:33:54,437 INFO [ConnectionFactory] Connector has leasing enabled, lease period 20000 milliseconds
20:33:54,437 INFO [ConnectionFactory] [/ConnectionFactory, /XAConnectionFactory, java:/ConnectionFactory, java:/XAConnectionFactory] deployed
20:33:54,484 INFO [Queue] Queue[/queue/DLQ] started, fullSize=75000, pageSize=2000, downCacheSize=2000
20:33:54,515 INFO [Topic] Topic[/topic/testTopic] started, fullSize=75000, pageSize=2000, downCacheSize=2000
20:33:54,515 INFO [Topic] Topic[/topic/securedTopic] started, fullSize=75000, pageSize=2000, downCacheSize=2000
20:33:54,531 INFO [Topic] Topic[/topic/testDurableTopic] started, fullSize=75000, pageSize=2000, downCacheSize=2000
20:33:54,531 INFO [Queue] Queue[/queue/testQueue] started, fullSize=75000, pageSize=2000, downCacheSize=2000
20:33:54,531 INFO [Queue] Queue[/queue/A] started, fullSize=75000, pageSize=2000, downCacheSize=2000
20:33:54,546 INFO [Queue] Queue[/queue/B] started, fullSize=75000, pageSize=2000, downCacheSize=2000
20:33:54,546 INFO [Queue] Queue[/queue/C] started, fullSize=75000, pageSize=2000, downCacheSize=2000
20:33:54,546 INFO [Queue] Queue[/queue/D] started, fullSize=75000, pageSize=2000, downCacheSize=2000
20:33:54,546 INFO [Queue] Queue[/queue/ex] started, fullSize=75000, pageSize=2000, downCacheSize=2000
20:33:54,562 INFO [Topic] Topic[/topic/openTopic] started, fullSize=75000, pageSize=2000, downCacheSize=2000
20:33:54,609 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
20:33:54,609 INFO [Queue] Queue[/queue/pulseMailQueue] started, fullSize=75000, pageSize=2000, downCacheSize=2000
20:33:54,953 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=jdbc/Elephant' to JNDI name 'java:jdbc/Elephant'
20:33:54,984 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=jdbc/ElephantXA' to JNDI name 'java:jdbc/ElephantXA'
20:33:55,140 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=jdbc/ScorpionJAAS' to JNDI name 'java:jdbc/ScorpionJAAS'
20:33:55,281 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=jdbc/JBPM' to JNDI name 'java:jdbc/JBPM'
20:33:55,296 INFO [JbpmConfiguration] using jbpm configuration resource 'jbpm.cfg.xml'
20:33:55,437 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
20:33:55,812 INFO [EARDeployer] Init J2EE application: file:/C:/Java/AppServers/JBoss/jboss-4.0.4RC2/server/pulse-with-messaging/deploy/PulseOnline.ear
20:34:12,812 INFO [Ejb3Deployment] EJB3 deployment time took: 219
20:34:13,609 INFO [Ejb3Deployment] EJB3 deployment time took: 750
20:34:13,703 INFO [JmxKernelAbstraction] installing MBean: persistence.units:ear=PulseOnline.ear,unitName=pulse_database with dependencies:
20:34:13,703 INFO [JmxKernelAbstraction] jboss.jca:name=jdbc/Elephant,service=ManagedConnectionFactory
20:34:13,843 INFO [Environment] Hibernate 3.2 cr1
20:34:13,859 INFO [Environment] hibernate.properties not found
20:34:13,859 INFO [Environment] Bytecode provider name : cglib
20:34:13,875 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
20:34:14,093 INFO [Ejb3Configuration] found EJB3 Entity bean: au.com.pulse.online.persistence.ejb.concept.Concept
20:34:14,093 INFO [Ejb3Configuration] found EJB3 Entity bean: au.com.pulse.online.persistence.ejb.concept.Conceptualisation
20:34:14,093 INFO [Ejb3Configuration] found EJB3 Entity bean: au.com.pulse.online.persistence.ejb.crm.AddressDetail
20:34:14,109 INFO [Ejb3Configuration] found EJB3 Entity bean: au.com.pulse.online.persistence.ejb.crm.CodeType
20:34:14,109 INFO [Ejb3Configuration] found EJB3 Entity bean: au.com.pulse.online.persistence.ejb.crm.CodeTypeReadonly
20:34:14,109 INFO [Ejb3Configuration] found EJB3 Entity bean: au.com.pulse.online.persistence.ejb.crm.ContactDetail
20:34:14,109 INFO [Ejb3Configuration] found EJB3 Entity bean: au.com.pulse.online.persistence.ejb.crm.CreditCardDetail
20:34:14,109 INFO [Ejb3Configuration] found EJB3 Entity bean: au.com.pulse.online.persistence.ejb.crm.Entity
20:34:14,125 INFO [Ejb3Configuration] found EJB3 Entity bean: au.com.pulse.online.persistence.ejb.crm.Locality
20:34:14,125 INFO [Ejb3Configuration] found EJB3 Entity bean: au.com.pulse.online.persistence.ejb.crm.PersonDetail
20:34:14,125 INFO [Ejb3Configuration] found EJB3 Entity bean: au.com.pulse.online.persistence.ejb.crm.Relationship
20:34:14,125 INFO [Ejb3Configuration] found EJB3 Entity bean: au.com.pulse.online.persistence.ejb.crm.SupplierDetail
20:34:14,125 INFO [Ejb3Configuration] found EJB3 Entity bean: au.com.pulse.online.persistence.ejb.security.DelegableRole
20:34:14,125 INFO [Ejb3Configuration] found EJB3 Entity bean: au.com.pulse.online.persistence.ejb.security.Role
20:34:14,125 INFO [Ejb3Configuration] found EJB3 Entity bean: au.com.pulse.online.persistence.ejb.security.RoleGroup