wood burning stoves 2.0*
The moose likes JBoss/WildFly and the fly likes Problem Invoking MDB from MBean in JBOSS4.0.5GA Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Problem Invoking MDB from MBean in JBOSS4.0.5GA" Watch "Problem Invoking MDB from MBean in JBOSS4.0.5GA" New topic

Problem Invoking MDB from MBean in JBOSS4.0.5GA

Faisal Ahmed Siddiqui

Joined: Jan 03, 2002
Posts: 29
can anybody tell me the reason why i am getting this error in JBOSS4.0.5GA where as same application is running in JBOSS-3.2.6

javax.management.InstanceNotFoundException: jboss.j2ee:service=EJB,plugin=invoker,binding=message-dr
iven-bean,jndiName=local/ATTMessageProcessor is not registered.

i am calling my MDB from MBean
String mdbname="jboss.j2ee:service=EJB,plugin=invoker,binding=message-dr
String operation="startDelivery";
List list=MBeanServerFactory.findMBeanServer(null);
Iterator itr=list.iterator();
MBeanServer server = (MBeanServer)itr.next();
ObjectName mbeanObjectName = new ObjectName(mdbname);
server.invoke(mbeanObjectName, operation, null, null);

its also working from the JMX interface when i look into the jboss.j2ee code.
but the only difference in the entry it shows is @14272226 after my JNDIName
i refer to the wiki page
and found a note

NOTE: that the default MDB local-jndi-name is derived from the ejb-name with a random integer appended, so to have a usable MBean name requires an explicit local-jndi-name setting in the jboss.xml descriptor.

i added the local-jndi-name element in my jboss.xml as mentioned below.


but still getting the error InstanceNotFoundException..
note that i have added the entry of all queues being used in server/all/deploy-hasingelton/jms/jboss-destination-service.xml
i feel it might be problem of JMS Specs. as i think 3.2.6 is compliance the JMS1.0 where as JBOSS4.0.5 have the support of JMS1.1
[ May 17, 2007: Message edited by: Bear Bibeault ]

Architect<br />SCJP<br />SCWCD<br />IBM-486
Faisal Ahmed Siddiqui

Joined: Jan 03, 2002
Posts: 29
ATTMessageProcessor is a simple MDB implementing the MessageDrivenBean and MessageListener
Faisal Ahmed Siddiqui

Joined: Jan 03, 2002
Posts: 29
at last i got the solution...

if you notice.. i just prefix local-jndi-name with local...
and problem resolved...
but unfortunately i still not found this entry in jboss4.0 dtd.
therefore i manually added.. this entry into the xdoclet .xdt template file.

i hope it will help out all ..
I agree. Here's the link: http://aspose.com/file-tools
subject: Problem Invoking MDB from MBean in JBOSS4.0.5GA
Similar Threads
Issue with jboss tibco integration after tibco EMS restart
Problem integrating Jboss with IBM MQ using JCA resource adaptors
Help on Topic in JMS
Error in MDB