@Resource(mappedName = "java:/queue/SimplePushTokenBatchQueue")
private Queue simplePushTokenBatchQueue;
@Resource(mappedName = "java:/queue/WNSTokenBatchQueue")
private Queue wnsTokenBatchQueue;
public void queueMessageVariantForProcessing(@Observes @DispatchToQueue MessageHolderWithTokens msg) {
<BUG>sendTransacted(selectQueue(msg.getVariant().getType()), msg);
}</BUG>
private Queue selectQueue(VariantType variantType) {
switch (variantType) {
case ADM:

@Resource(mappedName = "java:/queue/SimplePushTokenBatchQueue")
private Queue simplePushTokenBatchQueue;
@Resource(mappedName = "java:/queue/WNSTokenBatchQueue")
private Queue wnsTokenBatchQueue;
public void queueMessageVariantForProcessing(@Observes @DispatchToQueue MessageHolderWithTokens msg) {
String deduplicationId = String.format("%s-%s", msg.getPushMessageInformation().getId(), msg.getSerialId());
jmsClient.send(msg).withDuplicateDetectionId(deduplicationId).to(selectQueue(msg.getVariant().getType()));
}
private Queue selectQueue(VariantType variantType) {
switch (variantType) {
case ADM:
