Refine search
@MessageDriven(name = "VertxMonitor", messageListenerInterface = VertxListener.class, activationConfig = { @ActivationConfigProperty(propertyName = "address", propertyValue = "inbound-address"), }) public class VertxMonitor implements VertxListener {
@MessageDriven(mappedName = "jms/javaee7/Topic", activationConfig = { @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"), @ActivationConfigProperty(propertyName = "messageSelector", propertyValue = "orderAmount BETWEEN 3 AND 7") }) public class BillingMDB13 implements MessageListener { @Inject @JMSConnectionFactory("jms/javaee7/ConnectionFactory") @JMSSessionMode(JMSContext.AUTO_ACKNOWLEDGE)
@Override protected void introspect() { super.introspect(); MessageDriven messageDriven = getAnnotatedType().getAnnotation(MessageDriven.class); if (messageDriven != null) { ActivationConfigProperty []activationConfig = messageDriven.activationConfig(); if (activationConfig != null) { for (ActivationConfigProperty prop : activationConfig) { addActivationConfigProperty(prop.propertyName(), prop.propertyValue()); } } Class<?> type = messageDriven.messageListenerInterface(); if (type != null && ! Object.class.equals(type)) _messagingType = type; } validate(); JmsMessageListener listener = getAnnotatedType().getAnnotation(JmsMessageListener.class); if (listener != null) { addActivationConfigProperty("destination", listener.destination()); addActivationConfigProperty("consumer-max", String.valueOf(listener.consumerMax())); } }
if(annotation.name().length() > 0) metaData.setEjbName(annotation.name()); else metaData.setEjbName(beanClass.getSimpleName()); if(annotation.description().length() > 0) DescriptionGroupMetaData dg = ProcessorUtils.getDescriptionGroup(annotation.description()); acp.setActivationConfigPropertyName(prop.propertyName()); acp.setValue(prop.propertyValue()); configProps.add(acp);
private String getActivationProperty(String name, ActivationConfigProperty[] props) { String result = null; for(ActivationConfigProperty p : props) { if(p.propertyName().equals(name)) { result = p.propertyValue(); break; } } return result; }
mdAn, ejbMsgBeanDesc, ejbClass, ainfo); doDescriptionProcessing(mdAn.description(), ejbMsgBeanDesc); doMappedNameProcessing(mdAn.mappedName(), ejbMsgBeanDesc); for (ActivationConfigProperty acProp : mdAn.activationConfig()) { EnvironmentProperty envProp = new EnvironmentProperty( acProp.propertyName(), acProp.propertyValue(), "");
String destination = null; String messageSelector = null; for (ActivationConfigProperty p : messageDriven.activationConfig()) { if ("destinationType".equals(p.propertyName())) { destinationType = p.propertyValue(); } else if ("destination".equals(p.propertyName())) { destination = calculateCommonName(p.propertyValue()); } else if ("acknowledgeMode".equals(p.propertyName())) { acknowledgeMode = "Auto_acknowledge".equals(p.propertyValue()) ? Session.AUTO_ACKNOWLEDGE : Session.DUPS_OK_ACKNOWLEDGE; } else if ("messageSelector".equals(p.propertyName())) { messageSelector = p.propertyValue(); } else if ("destinationType".equals(p.propertyName())) { destinationType = p.propertyValue();
@RunAs("InternalUser") @MessageDriven(name = "ModificationCacheMessageBean", activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"), @ActivationConfigProperty(propertyName = "destination", propertyValue = "topic/AccumuloTableCache"), @ActivationConfigProperty(propertyName = "useLocalTx", propertyValue = "true"), @ActivationConfigProperty(propertyName = "subscriptionDurability", propertyValue = "Durable"), @ActivationConfigProperty(propertyName = "subscriptionName", propertyValue = "ModificationCacheMessageBean"), @ActivationConfigProperty(propertyName = "user", propertyValue = "${dw.hornetq.system.userName}"), @ActivationConfigProperty(propertyName = "password", propertyValue = "${dw.hornetq.system.password}"), @ActivationConfigProperty(propertyName = "maxSession", propertyValue = "${dw.modification.cache.mdb.pool.size}")}) @TransactionManagement(value = TransactionManagementType.CONTAINER) @TransactionAttribute(value = TransactionAttributeType.NOT_SUPPORTED) private Logger log = Logger.getLogger(this.getClass()); @Inject private ModificationCacheBean modificationCacheBean; @Inject @SpringBean(refreshable = true) private ModificationConfiguration modificationConfiguration;
= messageDriven.activationConfig(); addActivationConfigProperty(property.propertyName(), property.propertyValue()); = messageDriven.messageListenerInterface();
if(annotation.name().length() > 0) metaData.setEjbName(annotation.name()); else metaData.setEjbName(beanClass.getSimpleName()); if(annotation.description().length() > 0) DescriptionGroupMetaData dg = ProcessorUtils.getDescriptionGroup(annotation.description()); acp.setActivationConfigPropertyName(prop.propertyName()); acp.setValue(prop.propertyValue()); configProps.add(acp);
private String getActivationProperty(String name, ActivationConfigProperty[] props) { String result = null; for(ActivationConfigProperty p : props) { if(p.propertyName().equals(name)) { result = p.propertyValue(); break; } } return result; }
mdAn, ejbMsgBeanDesc, ejbClass, ainfo); doDescriptionProcessing(mdAn.description(), ejbMsgBeanDesc); doMappedNameProcessing(mdAn.mappedName(), ejbMsgBeanDesc); for (ActivationConfigProperty acProp : mdAn.activationConfig()) { EnvironmentProperty envProp = new EnvironmentProperty( acProp.propertyName(), acProp.propertyValue(), "");
@MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName = "destinationLookup", propertyValue = "jms/EclipseLinkTopic"), @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"), @ActivationConfigProperty(propertyName = "useSharedSubscriptionInClusteredContainer", propertyValue = "false") }) private final Map<String, JMSTopicRemoteConnection> serviceMap = new HashMap<>(); private @Inject JMSContext context; private static final Logger log = Logger.getLogger(CacheCoordinationMDB.class.getName());
@MessageDriven(name = "testmdb", activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"), @ActivationConfigProperty(propertyName = "destination", propertyValue = "TESTQ"), @ActivationConfigProperty(propertyName = "resourceAdapter", propertyValue = "activemq-rar-5.14.5") }) public class ReceiveMessage implements MessageListener { public ReceiveMessage() { } @Override public void onMessage(Message message) { System.out.println("Got message " + message); } }
MessageDriven messageDriven = clazz.getAnnotation(MessageDriven.class); if (messageDriven != null) { javax.ejb.ActivationConfigProperty[] configProperties = messageDriven.activationConfig(); if (configProperties != null) { ActivationConfig activationConfig = mdb.getActivationConfig(); if (!properties.containsKey(property.propertyName())) { activationConfig.addProperty(property.propertyName(), property.propertyValue()); Class<?> interfce = messageDriven.messageListenerInterface(); if (interfce != null && !interfce.equals(Object.class)) { if (!interfce.isInterface()) {
if(annotation.name().length() > 0) metaData.setEjbName(annotation.name()); else metaData.setEjbName(beanClass.getSimpleName()); if(annotation.description().length() > 0) DescriptionGroupMetaData dg = ProcessorUtils.getDescriptionGroup(annotation.description()); acp.setActivationConfigPropertyName(prop.propertyName()); acp.setValue(prop.propertyValue()); configProps.add(acp);
private String getActivationProperty(String name, ActivationConfigProperty[] props) { String result = null; for(ActivationConfigProperty p : props) { if(p.propertyName().equals(name)) { result = p.propertyValue(); break; } } return result; }
/** * * @author Steve Millidge (Payara Foundation) */ @MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName = "nameSpace", propertyValue = "${ENV=nameSpace}"), @ActivationConfigProperty(propertyName = "sasKeyName", propertyValue = "RootManageSharedAccessKey"), @ActivationConfigProperty(propertyName = "sasKey", propertyValue = "${ENV=sasKey}"), @ActivationConfigProperty(propertyName = "queueName", propertyValue = "testq") }) public class AzureSBMDB implements AzureSBListener { @OnAzureSBMessage public void receiveMessage(IMessage message) { System.out.println("Received Message " + new String(message.getBody())); } }
if (!messageDriven.mappedName().isEmpty()) { if (mdb.getActivationConfig() == null) { mdb.setActivationConfig(activationConfig); activationConfig.addProperty("destinationType", Queue.class.getName()); activationConfig.addProperty("destination", messageDriven.mappedName()); final ActivationConfigProperty[] configProperties = messageDriven.activationConfig(); if (configProperties != null) { if (mdb.getActivationConfig() == null) { if (!properties.containsKey(property.propertyName())) { activationConfig.addProperty(property.propertyName(), property.propertyValue());
private String getActivationProperty(String name, ActivationConfigProperty[] props) { String result = null; for(ActivationConfigProperty p : props) { if(p.propertyName().equals(name)) { result = p.propertyValue(); break; } } return result; }