| | |
| | | import javax.ws.rs.core.Response; |
| | | import javax.ws.rs.core.Response.ResponseBuilder; |
| | | |
| | | import com.redhat.training.messaging.JMSUtil; |
| | | import com.redhat.training.model.Person; |
| | | |
| | | @Stateless |
| | |
| | | |
| | | @Resource |
| | | UserTransaction tx; |
| | | |
| | | @Inject |
| | | JMSUtil jmsUtil; |
| | | |
| | | // Simple non-RESTy method for JSF bean invocation |
| | | public String hello(String name) { |
| | |
| | | Person p = new Person(); |
| | | p.setName(name); |
| | | entityManager.persist(p); |
| | | |
| | | // Send a JMS message to the 'helloWorldQueue' |
| | | jmsUtil.sendMessage("Said Hello to " + name.toUpperCase() + " at " + fdate); |
| | | |
| | | // respond back with Hello and convert the name to UPPERCASE. Also, send the |
| | | // current time on the server. |