add something similar to the depolyment descriptor.
Actually, it still not quite right. If I restart the server, the error would occurred. But if I re-deploy the MBean after the server started, the problem would go away. What could be the issue?
Have you modified jboss's jndi.properties?
Show the enumeration of the listBindings("") and the context's environment.
This is the jndi.properties file under /server/default/conf for jboss server that started. Really not sure how to modify for the ConnectionFactory.
Also, the enumeration of listbinding, you mean to view from JMX console? Thank you and sorry about the naiveness.
I wonder if this is an initialization timing problem? Maybe your MBean is being initialized before the ConnectionFactory is ready. Try adding a tag to your jboss-specific xml file for the MBean.
Something like this (Sorry, I wasn't sure of the right path/name for the ConnectionFactory, but maybe a dependency on the JMSProviderLoader is good enough):
<mbean code="foo.MyMBean" name="fooApp:service=MyMBean"> <depends>jboss.mq:service=JMSProviderLoader</depends> </mbean>
-Matthew S. Ring