chatterbox-nats/chatterbox-nats-sample-war-rar/src/main/java/org/superbiz/Sender.java [34:50]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@Singleton
@Lock(LockType.READ)
@Path("sender")
public class Sender {

    @Resource
    private NATSConnectionFactory cf;

    @Path("{subject}")
    @POST
    @Consumes(MediaType.TEXT_PLAIN)
    public void sendMessage(@PathParam("subject") final String subject, final String message) {
        try {
            final NATSConnection connection = cf.getConnection();
            connection.publish(subject, message.getBytes(StandardCharsets.UTF_8));
            connection.close();
        } catch (Throwable t) {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



chatterbox-nats/chatterbox-nats-sample-war/src/main/java/org/superbiz/Sender.java [34:50]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@Singleton
@Lock(LockType.READ)
@Path("sender")
public class Sender {

    @Resource
    private NATSConnectionFactory cf;

    @Path("{subject}")
    @POST
    @Consumes(MediaType.TEXT_PLAIN)
    public void sendMessage(@PathParam("subject") final String subject, final String message) {
        try {
            final NATSConnection connection = cf.getConnection();
            connection.publish(subject, message.getBytes(StandardCharsets.UTF_8));
            connection.close();
        } catch (Throwable t) {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



