[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2493) Problems with faces Renderer when used simultaneously from different threads
by Marcus Schmidke (JIRA)
Problems with faces Renderer when used simultaneously from different threads
----------------------------------------------------------------------------
Key: JBSEAM-2493
URL: http://jira.jboss.com/jira/browse/JBSEAM-2493
Project: JBoss Seam
Issue Type: Bug
Components: Mail
Affects Versions: 2.0.0.GA
Environment: Seam-App in JBoss 4.2
Properly configure mail-service
Reporter: Marcus Schmidke
Assigned To: Pete Muir
When creating multiple renderers in different threads and using them simultaneously, there are problems with JSF variables (for example in ui:repeat)
Create the following classes:
@Name("seamMailBug")
@Scope(ScopeType.EVENT)
public class SeamMailBug {
@In
private Renderer renderer;
@Asynchronous
public void send(List<String> asList) {
Context c = Contexts.getEventContext();
c.set("l", asList);
renderer.render("/seamMailBug.xhtml");
}
}
@Name("seamMailBug1")
@Scope(ScopeType.EVENT)
public class SeamMailBug1 {
public void send() {
SeamMailBug smb = (SeamMailBug) Component
.getInstance(SeamMailBug.class);
smb.send(Arrays.asList(new String[] { "L2-1" }));
smb.send(Arrays.asList(new String[] { "L1-1", "L1-2", "L1-3" }));
}
}
Create the mail template seamMailBug.xhtml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<ui:repeat xmlns="http://www.w3.org/1999/xhtml"
xmlns:m="http://jboss.com/products/seam/mail"
xmlns:ui="http://java.sun.com/jsf/facelets"
value="#{l}" var="v"
>
<m:message>
<m:from>some(a)bo.dy</m:from>
<m:to name="Marcus">your.own(a)email.address</m:to>
<m:body>
Guten Tag! #{v}
</m:body>
</m:message>
</ui:repeat>
And in pages.xml:
<page view-id="/seambug.xhtml" action="#{seamMailBug1.send}"/>
Start the server and get the URL: http://..../.../seambug.seam
One should expect 4 mails being sent, containing the strings L1-1, L1-2, L1-3 and L2-1.
The number of mails actually sent will be correct, but carefully verify the strings being sent.
You will see that the "v" iterator variable is the same used from both threads.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2593) Cap and Join not working correctly in UIStroke
by Tim Blommerde (JIRA)
Cap and Join not working correctly in UIStroke
----------------------------------------------
Key: JBSEAM-2593
URL: http://jira.jboss.com/jira/browse/JBSEAM-2593
Project: JBoss Seam
Issue Type: Bug
Components: PDF
Affects Versions: 2.0.1.GA, 2.0.1.CR2, 2.0.1.CR1, 2.0.0.GA
Reporter: Tim Blommerde
There is a small copy-and-paste error in the 'joinValue(String join)' method of the UIStroke class (org.jboss.seam.pdf.ui.UIStroke). Because of this error, setting the cap value of a Stroke to something else then 'round' causes a Runtime Exception and setting a join value does not work.
Below I've added a fix for the joinMethod:
public int joinValue(String join) {
if (join == null || join.equalsIgnoreCase("miter")) {
return BasicStroke.JOIN_MITER;
} else if (join.equalsIgnoreCase("round")) {
return BasicStroke.JOIN_ROUND;
} else if (join.equalsIgnoreCase("bevel")) {
return BasicStroke.JOIN_BEVEL;
}
throw new RuntimeException("invalid join value: " + join);
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 10 months