Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
fail fast if jms is not configured properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Huang committed Mar 10, 2015
1 parent d97eee2 commit 6531ac9
Showing 1 changed file with 14 additions and 0 deletions.
Expand Up @@ -30,6 +30,7 @@
import lombok.extern.slf4j.Slf4j;

import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Create;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Observer;
Expand Down Expand Up @@ -59,6 +60,19 @@ public class NotificationManager implements Serializable {
@In
private QueueSession queueSession;


@Create
public void onCreate() {
try {
mailQueueSender.getQueue();
} catch (JMSException e) {
// it will never reach this block. As long as you call getQueue()
// and if the queue is not defined, seam will terminate:
// org.jboss.seam.jms.ManagedQueueSender.getQueue(ManagedQueueSender.java:45
Throwables.propagate(e);
}
}

@Observer(LanguageTeamPermissionChangedEvent.LANGUAGE_TEAM_PERMISSION_CHANGED)
public
void onLanguageTeamPermissionChanged(
Expand Down

0 comments on commit 6531ac9

Please sign in to comment.