[jboss-jira] [JBoss JIRA] Closed: (EJBTHREE-768) MDB deployment error
Ramil Israfilov (JIRA)
jira-events at lists.jboss.org
Fri Feb 16 04:22:37 EST 2007
[ http://jira.jboss.com/jira/browse/EJBTHREE-768?page=all ]
Ramil Israfilov closed EJBTHREE-768.
------------------------------------
> MDB deployment error
> --------------------
>
> Key: EJBTHREE-768
> URL: http://jira.jboss.com/jira/browse/EJBTHREE-768
> Project: EJB 3.0
> Issue Type: Bug
> Affects Versions: EJB 3.0 RC9 - FD
> Environment: JDK1.5.0_06, UNIX and windows platforms
> Reporter: Ramil Israfilov
> Fix For: EJB 3.0 RC10 - FD
>
>
> I have an MDB which is defined like that
> import javax.jms.MessageListener;
> @MessageDriven(name = "EJBExecutorMDB", activationConfig = {
> @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
> @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/ExecutorQueue"),
> @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "AUTO_ACKNOWLEDGE"),
> @ActivationConfigProperty(propertyName = "maxSession", propertyValue = "4"),
> @ActivationConfigProperty(propertyName = "SubscriptionDurability", propertyValue = "Durable") })
> public class EJBExecutorMDB implements MessageListener {
> ....
> It works perfect during in JBOSS, but then I run it in JUNIT it fails with exception: "unable to determine messagingType interface for MDB"
> Only one difference that in JUNIT test I instrument built classes using cobertura - in that case my class implements two interfaces: MessageListener and cobertura interface.
> After looking in source code I found in org.jboss.ejb3.mdb.MDB:
> if (messagingType.getName().equals(Object.class.getName()))
> {
> ArrayList<Class> list = ProxyFactoryHelper.getBusinessInterfaces(clazz);
> if (list.size() > 1 || list.size() == 0) throw new RuntimeException("unable to determine messagingType interface for MDB");
> messagingType = list.get(0);
> }
> Why such a dummy check is done ??? Why class must implement one and only one interface ??
> could you check superclasses and allow multiple interfaces implementations on the class.
> Also on the link to forum people has similar problem: they don't implement interface, but extend superclass. And they got the same exception.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list