Skip to content

Instantly share code, notes, and snippets.

Viktor Lytsus vlytsus

  • Poland
Block or report user

Report or block vlytsus

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:a9b87f6a3d7c0e52e5c78bf8a2411d35
public class EmailStrategy implements NotificationStrategy { ... }
public class SmsStrategy implements NotificationStrategy { ... }
public class NotificationService() {
@Resource(name = "email")
vlytsus /
Created Feb 21, 2020
Example of @Transactiona method that combines JMS & Database transaction
private final JmsTemplate jmsTemplate;
private final UserRepository userRepository;
protected class UserEntity {
@Id public UUID userId;
@NotEmpty public String username;
private final JmsTemplate jmsTemplate;
public String sendMessage(String queueName, String payload) {
jmsTemplate.convertAndSend( queueName, payload );
You can’t perform that action at this time.