-
15. Re: onMessage method does not receive message
jaikiran Feb 17, 2011 3:16 AM (in response to honeychen03)Component implementation classes include your bean implementation classes, like the MDB class or the @Stateless bean implementation class. Those are the ones which have to reside outside of the .ear/lib folder for annotation scanning to take place.
-
16. onMessage method does not receive message
honeychen03 Feb 17, 2011 3:26 AM (in response to jaikiran)No method to specify to read myproject.jar at .ear\lib foder to find the MDB? It is a bit inconvinent to separate all the MDB class from myproject.jar.
-
17. onMessage method does not receive message
jaikiran Feb 17, 2011 3:27 AM (in response to honeychen03)just lee wrote:
No method to specify to read myproject.jar at .ear\lib foder to find the MDB?
The spec doesn't allow it.
-
18. onMessage method does not receive message
honeychen03 Feb 17, 2011 3:36 AM (in response to jaikiran)I just copied WorkflowAdditionMDB.class and GenericQueueMDB.class with corresponding folder directories to myproject.ear but there is an error reported when starting JBoss. Thoughts?
Caused by: org.jboss.deployers.spi.DeploymentException: Error creating ejb container WorkflowAdditionMDB: Unable to choose messagingType interface for MDB WorkflowAdditionMDB from []
at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:773) [:1.7.17]
at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:710) [:1.7.17]
at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:692) [:1.7.17]
at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:655) [:1.7.17]
at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:544) [:1.7.17]
at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:177) [:6.0.0.Final]
... 48 more
Caused by: java.lang.RuntimeException: Unable to choose messagingType interface for MDB WorkflowAdditionMDB from []
at org.jboss.ejb3.mdb.MDB.getMessagingType(MDB.java:76) [:1.7.17]
at org.jboss.ejb3.mdb.MDB.resolveBusinessInterfaces(MDB.java:132) [:1.7.17]
at org.jboss.ejb3.EJBContainer.instantiated(EJBContainer.java:1830) [:1.7.17]
at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:767) [:1.7.17]
... 53 more
-
19. Re: onMessage method does not receive message
jaikiran Feb 17, 2011 3:40 AM (in response to honeychen03)Try this in your bean class:
... // the usual annotations public class WorkflowAdditionMDB extends GenericQueueMDB implements MessageDrivenBean, MessageListener { ...
Notice that I have explicitly added the implements clause to that bean
-
20. onMessage method does not receive message
nickarls Feb 17, 2011 3:47 AM (in response to jaikiran)can the messageListenerInterface attribute be applied?
-
21. onMessage method does not receive message
jaikiran Feb 17, 2011 3:48 AM (in response to nickarls)Nicklas Karlsson wrote:
can the messageListenerInterface attribute be applied?
Yes that's the other option.
-
22. onMessage method does not receive message
honeychen03 Feb 17, 2011 3:54 AM (in response to jaikiran)Hi guys, I tried both appending implements clause and messageListenerInterface (messageListenerInterface=MessageListener.class) but neither works for me. Any idea?
-
23. onMessage method does not receive message
honeychen03 Feb 17, 2011 4:03 AM (in response to honeychen03)How do I get to know other options that could be configured here like messageListenerInterface because according to the doc, this attribute is not mentioned? How can I know other attributes? Any example that is fully including the attributes or doc link?
-
25. Re: onMessage method does not receive message
honeychen03 Feb 18, 2011 4:49 AM (in response to nickarls)THank you, Nicklas
I packed the mdb classes into a mdb.jar at .ear\mdb.jar but no mdb created when starting jboss. But I just put folders with mdb classes at .ear directory and it worked. The sanning does not support mdb.jar? Could anybody tell me where could be wrong?
-
26. Re: onMessage method does not receive message
jaikiran Feb 18, 2011 4:50 AM (in response to honeychen03)Post the output of:
jar -tf mdb.jar
-
27. onMessage method does not receive message
honeychen03 Feb 18, 2011 4:52 AM (in response to jaikiran)C:\tmp>jar -tf mdb.jar
META-INF/MANIFEST.MF
com/globalsight/cxe/adaptermdb/BaseAdapterMDB.class
com/globalsight/cxe/adaptermdb/adobe/AdobeSourceAdapterMDB.class
com/globalsight/cxe/adaptermdb/adobe/AdobeTargetAdapterMDB.class
com/globalsight/cxe/adaptermdb/cap/CapSourceAdapterMDB.class
com/globalsight/cxe/adaptermdb/cap/CapTargetAdapterMDB.class
com/globalsight/cxe/adaptermdb/catalyst/CatalystSourceAdapterMDB.class
com/globalsight/cxe/adaptermdb/catalyst/CatalystTargetAdapterMDB.class
com/globalsight/cxe/adaptermdb/copyflow/CopyFlowSourceAdapterMDB.class
com/globalsight/cxe/adaptermdb/copyflow/CopyFlowTargetAdapterMDB.class
com/globalsight/cxe/adaptermdb/database/DatabaseTargetAdapterMDB.class
com/globalsight/cxe/adaptermdb/documentum/DocumentumSourceAdapterMDB.class
com/globalsight/cxe/adaptermdb/documentum/DocumentumTargetAdapterMDB.class
com/globalsight/cxe/adaptermdb/filesystem/AddSourceFileMDB$1.class
com/globalsight/cxe/adaptermdb/filesystem/AddSourceFileMDB.class
com/globalsight/cxe/adaptermdb/filesystem/FileSystemSourceAdapterMDB.class
com/globalsight/cxe/adaptermdb/filesystem/FileSystemTargetAdapterMDB.class
com/globalsight/cxe/adaptermdb/idml/IdmlSourceAdapterMDB.class
com/globalsight/cxe/adaptermdb/idml/IdmlTargetAdapterMDB.class
com/globalsight/cxe/adaptermdb/ling/ExtractorMDB.class
com/globalsight/cxe/adaptermdb/ling/MergerMDB.class
com/globalsight/cxe/adaptermdb/mediasurface/MediasurfaceSourceAdapterMDB.class
com/globalsight/cxe/adaptermdb/mediasurface/MediasurfaceTargetAdapterMDB.class
com/globalsight/cxe/adaptermdb/msoffice/MsOfficeSourceAdapterMDB.class
com/globalsight/cxe/adaptermdb/msoffice/MsOfficeTargetAdapterMDB.class
com/globalsight/cxe/adaptermdb/openoffice/OpenOfficeSourceAdapterMDB.class
com/globalsight/cxe/adaptermdb/openoffice/OpenOfficeTargetAdapterMDB.class
com/globalsight/cxe/adaptermdb/pdf/PdfSourceAdapterMDB.class
com/globalsight/cxe/adaptermdb/pdf/PdfTargetAdapterMDB.class
com/globalsight/cxe/adaptermdb/quarkframe/QuarkFrameSourceAdapterMDB.class
com/globalsight/cxe/adaptermdb/quarkframe/QuarkFrameTargetAdapterMDB.class
com/globalsight/cxe/adaptermdb/serviceware/ServiceWareSourceAdapterMDB.class
com/globalsight/cxe/adaptermdb/serviceware/ServiceWareTargetAdapterMDB.class
com/globalsight/cxe/adaptermdb/teamsite/TeamSiteSourceAdapterMDB.class
com/globalsight/cxe/adaptermdb/teamsite/TeamSiteTargetAdapterMDB.class
com/globalsight/cxe/adaptermdb/vignette/VignetteSourceAdapterMDB.class
com/globalsight/cxe/adaptermdb/vignette/VignetteTargetAdapterMDB.class
com/globalsight/everest/aligner/AlignerMDB.class
com/globalsight/everest/costing/CalculateCostMDB.class
com/globalsight/everest/edit/offline/upload/PageSaverMDB.class
com/globalsight/everest/page/TrashCompactorMDB.class
com/globalsight/everest/page/pageexport/ExportMDB.class
com/globalsight/everest/projecthandler/ProjectUpdateMDB.class
com/globalsight/everest/request/RequestHandlerActivatorMDB.class
com/globalsight/everest/util/jms/GenericQueueMDB.class
com/globalsight/everest/util/jms/GenericTopicMDB.class
com/globalsight/everest/webapp/pagehandler/administration/tmprofile/UpdateLeverageMatchMDB.class
com/globalsight/everest/workflowmanager/JobCancelMDB.class
com/globalsight/everest/workflowmanager/WorkflowAdditionMDB.class
com/globalsight/everest/workflowmanager/WorkflowCancelMDB.class
com/globalsight/scheduling/SchedulerMDB.class
com/globalsight/terminology/TermbaseDeleterMDB.class
com/globalsight/terminology/audit/TermAuditLogMDB.class
com/globalsight/util/SetupCompanyMDB.class
com/globalsight/util/mail/MailSenderMDB.class
-
28. onMessage method does not receive message
honeychen03 Feb 18, 2011 5:08 AM (in response to honeychen03)I confirmed that is working when putting com folders at .ear directory.
So is this a bug or something with a packed jar?
-
29. Re: onMessage method does not receive message
jaikiran Feb 18, 2011 5:16 AM (in response to honeychen03)That should have worked actually.
Try adding this to the .ear/META-INF/application.xml:
<?xml version="1.0" encoding="UTF-8"?> <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" version="5"> <module> <ejb>mdb.jar</ejb> </module> </application>