This content has been marked as final.
Show 3 replies
-
1. Re: MDB InstanceNotFoundException +MBean
jaikiran Aug 30, 2007 6:44 AM (in response to shankha)Have a look at this http://wiki.jboss.org/wiki/Wiki.jsp?page=WhyDoesTheLocalNameContainARandomNumber
-
2. Re: MDB InstanceNotFoundException +MBean
shankha Aug 30, 2007 7:17 AM (in response to shankha)I update my jboss.xml by adding local-jndi-name TestMessageEJB.
<jboss> <enterprise-beans> <session> <ejb-name>MBeanTestEJB</ejb-name> <jndi-name>MBeanTestEJB</jndi-name> </session> <message-driven> <ejb-name>MessageEJB</ejb-name> <destination-jndi-name>queue/testQueue</destination-jndi-name> <local-jndi-name>TestMessageEJB</local-jndi-name> </message-driven> </enterprise-beans> </jboss>
In the Java code I update it following waytry{ Object name = jndiCtx.lookup("TestMessageEJB"); //ObjectName name = new ObjectName("jboss.j2ee:service=EJB,plugin=invoker,binding=message-driven-bean,jndiName=local/MessageEJB"); ObjectName objName = new ObjectName((String)name); MBeanInfo objMBeanInfo = mbeanServer.getMBeanInfo(objName); System.out.println("@@ -- MBeanTestBean :invokeMBeanFeatures : "+objMBeanInfo.getClassName()); }catch(Exception ex){ ex.printStackTrace(); }
I got the javax.naming.NameNotFoundException: TestMessageEJB not bound.
Can any body please help me ? -
3. Re: MDB InstanceNotFoundException +MBean
shankha Aug 30, 2007 7:47 AM (in response to shankha)Problem is getting solved.
I did some mistake in the jboss.xml file.<message-driven> <ejb-name>MessageEJB</ejb-name> <destination-jndi-name>queue/testQueue</destination-jndi-name> <local-jndi-name>MessageEJB</local-jndi-name> </message-driven>
Here local-jndi-name should be equal to the ejb-name.
And I findjboss.j2ee:service=EJB,plugin=invoker,binding=message-driven-bean,jndiName=MessageEJB
@ is removed.
:)