Created
June 12, 2009 07:51
-
-
Save heim/128504 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package no.frykt; | |
import java.util.Properties; | |
import javax.annotation.Resource; | |
import javax.ejb.ActivationConfigProperty; | |
import javax.ejb.MessageDriven; | |
import javax.ejb.MessageDrivenContext; | |
import javax.jms.Message; | |
import javax.jms.MessageListener; | |
@MessageDriven(name = "SimpleMessageBean", activationConfig = { | |
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"), | |
@ActivationConfigProperty(propertyName = "destination", propertyValue = "jms/myTopic") | |
}) | |
public class SimpleMessageBean implements MessageListener { | |
@SuppressWarnings("unused") | |
@Resource | |
private MessageDrivenContext context; | |
public SimpleMessageBean() { | |
} | |
/** | |
* {@inheritDoc} | |
*/ | |
public void onMessage(Message message) { | |
System.out.println("Received message"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment