[jboss-user] [JBoss Seam] - Re: Strange behaviour of Seam Mail when sending unsynchonize

MSchmidke do-not-reply at jboss.com
Thu Jan 10 14:21:48 EST 2008


Yes, but to explain it I must go a little deeper.

My template looks like

  | <ui:repeat value="#{recipients}" var="rec">
  |   <m:to>#{rec}</m:to>
  |   ....
  | </ui:repeat>
  | 

and recipients gets into the context by


  | @Asynchronous
  | public void send(List<String> recipients) {
  |   Context c=Contexts.getEventContext();
  |   c.set("recipients", recipients);
  |   renderer.render("...");
  | }
  | 

The caller is a jBPM action class with:

  |   Mailhandler mh=(Mailhandler)Components.getInstance(Mailhandler.class);
  |   mh.send(new Vector<String>(getRecipients()));
  | 

If I only send one mail, everything works fine. If I send two at the same time (two mail actions in jBPM which are executed immediately one after the other), I get some error from class InternetAddress telling the recipient's syntax is wrong ("@domain" is missing). I think either the ui:repeat or the m:to gets confused in some way when simultaneously used in multiple threads.

I checked everything, I can't find any other synchronizity side effect (for example in the recipients list - everything is copied before usage), so I think it must be some issue with the renderer.

(I wrote this all from memory; if you need even more info, let me know, I'll post the exact strack trace when I'm back in office tomorrow)

Marcus.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118810#4118810

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118810



More information about the jboss-user mailing list