[jboss-user] [Messaging, JMS & JBossMQ] - My problem about JMS & MDB !

catania do-not-reply at jboss.com
Mon Sep 17 02:30:39 EDT 2007


Hi all!
  I read about JMS and MDB inside "Mastering. EJB.4th.Edtion" (chapter 7). I use anonymous wrote : jboss-4.0.5.GA and EJB 3.0
  I writed a Message Driver Bean, look like:

  | public class LogBean implements MessageListener {
  |     public LogBean() {
  |         System.out.println("LogBean created");
  |     }
  |     public void onMessage(Message msg) {
  |         if (msg instanceof TextMessage) {
  |             TextMessage tm = (TextMessage) msg;
  |             try {
  |                 String text = tm.getText();
  |                 System.out.println("Received new message : " + text);
  |             } catch (JMSException e) {
  |                 e.printStackTrace();
  |             }
  |         }
  |     }
  | 
  |     public void remove() {
  |         System.out.println("LogBean destroyed.");
  |     }
  | }
  And, I have ejb-jar.xml:
 ...
  | <enterprise-beans>
  | 	<message-driven>
  | 	<ejb-name>LogBean</ejb-name>
  | 	<ejb-class>mdb.com.LogBean</ejb-class>
  | 	<messaging-type>javax.jms.MessageListener</messaging-type>
  | 	<transaction-type>Bean</transaction-type>
  | 	<message-destination-type>javax.jms.Topic</message-destination-type>
  | 
  | 	<activation-config>
  | 		<activation-config-property>
  | 			<activation-config-property-name>destinationType</activation-config-property-name>
  | 			<activation-config-property-value>javax.jms.Topic</activation-config-property-value>
  | 		</activation-config-property>
  | 	</activation-config>
  | 	</message-driven>
  | </enterprise-beans>
  But when I deploy it on JBoss server, I received some errors:
org.jboss.deployment.DeploymentException: Required configproperty RequiredConfigPropertyMetaData at 19238ad[name=destination descriptions=[DescriptionMetaData at 147ff11[language=en]]] for messagingType 'javax.jms.MessageListener' not found in activation config [ActivationConfigProperty(destinationType=javax.jms.Topic)] ra=jboss.jca:service=RARDeployment,name='jms-ra.rar'
  | ....
  I think that I must configure JBoss but I don't know where I do this ? Please guide to me or show me some documents about this problem.
  Thanks very much.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084897#4084897

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084897



More information about the jboss-user mailing list