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 way
try{
|
| 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 ?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079554#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...