Skip to main content

Posts

Showing posts with the label jms

what is JMS good for?

I'm looking for (simple) examples of problems for which JMS is a good solution, and also reasons why JMS is a good solution in these cases. In the past I've simply used the database as a means of passing messages from A to B when the message cannot necessarily be processed by B immediately. A hypothetical example of such a system is where all newly registered users should be sent a welcome e-mail within 24 hours of registration. For the sake of argument, assume the DB does not record the time when each user registered, but instead a reference (foreign key) to each new user is stored in the pending_email table. The e-mail sender job runs once every 24 hours, sends an e-mail to all the users in this table, then deletes all the pending_email records. This seems like the kind of problem for which JMS should be used, but it's not clear to me what benefit JMS would have over the approach I've described. One advantage of the DB approach is that the messages are persisten

strange characters(?) added to the end of my subject text

I have a problem with my java code sending email to users. There is some problem with the encoding of the email. When the email arrives to email account the subject line ($subject) has encoding problems as has strange characters(?) added to the end of my subject text. The email message content itself is fine just the subject line(?) I have searched all over but cant find,after using Unicode and content type as text/html mail body have no problem with special character ( ó ) but same fix is not working for subject line. I have a class that sends an email with javamail, with a text like this one in subject : "Estimado Iván Escobedo: The problem is that when the mail arrives to its destination, it arrives this way: "Estimado Iv?n Escobedo: All the á , é , í , ó , ú , etc special characters are replaced with ? . What could be the problem and how to solve it?