[JBoss JIRA] Created: (JBSEAM-4512) BPM task does not rollback
by Jason E (JIRA)
BPM task does not rollback
--------------------------
Key: JBSEAM-4512
URL: https://jira.jboss.org/jira/browse/JBSEAM-4512
Project: Seam
Issue Type: Bug
Components: BPM
Affects Versions: 2.2.0.GA
Environment: Testing this on Windows XP. Deploying to JBoss AS 4.2.2
Reporter: Jason E
I have made a simple change to the ShipAction.java class in the dvdstore example that ships with Seam. Here is the change
//@EndTask
public String ship() {
order.ship(track);
TaskInstance ti = ManagedJbpmContext.instance().getTaskInstance(taskInstance.getId());
taskInstance.end();
if(true) throw new RuntimeException("TESTING");
return "admin";
}
I commented out the end task annotation and I am ending the task via the TaskInstance API. When I throw the Runtime exception the changes to the ORDERS entity bean (i.e. updating the tracking number) rolls back. The problem is that the task instance change (i.e. ending the task) does not rollback. It appears that jBPM is flushing its changes in another db transaction. This seems like a bug since I would expect the ending of my task to also rollback. This seems like the desired behavior.
This was the only change I made to the dvdstore example that ships with Seam 2.2.0.GA so it should be easy to reproduce.
Thanks!
Jason
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 4 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2764) Factory method does not create objects properly
by Bogdan Minciu (JIRA)
Factory method does not create objects properly
-----------------------------------------------
Key: JBSEAM-2764
URL: http://jira.jboss.com/jira/browse/JBSEAM-2764
Project: JBoss Seam
Issue Type: Bug
Components: EJB3
Affects Versions: 2.0.1.GA
Reporter: Bogdan Minciu
Hello,
It seems that my @Factory method is recognizing the created objects only in its command block. I have this class:
@Stateful
@Name("xtw")
@Scope(ScopeType.SESSION)
@AutoCreate
public class XTextSessionWrapper implements LocalXTextSessionWrapper {
...
@In(required=false, create=true)
@Out
private XLanguage activeLanguage;
public String getText(String identifier) {
log.info("getText(1): identifier= #0, activeLanguage= #1", identifier, getActiveLanguage());
XTextEntry xte = xTextEntryDAO.findXTextEntry(identifier, getActiveLanguage());
log.info("getText(2): identifier= #0, activeLanguage= #1", identifier, getActiveLanguage());
xte.getXtext();
}
@Factory(value="activeLanguage", autoCreate=true)
public void initActiveLanguage() {
XLanguage xl = xLanguageDAO.findXLanguageByIdentifier("ro");
log.info("initActiveLanguage(1): activeLanguage initialized to #0", xl.getIdentifier());
setActiveLanguage(xl);
log.info("initActiveLanguage(1): activeLanguage initialized to #0", getActiveLanguage().getIdentifier());
}
public XLanguage getActiveLanguage() {
return activeLanguage;
}
public void setActiveLanguage(XLanguage activeLanguage) {
this.activeLanguage = activeLanguage;
}
...
}
And i am calling the getText() method. The method calling is as expected:
1. the injected activeLanguage is detecting that it has a null value,
2. the initActiveLanguage() factory method is called
3. then the getText() method is continuing its execution.
But, the problem is that when the application exists the @Factory method block, the created objects: activeLanguage is lost and reported again as null.
Here is the output:
12:43:48,203 INFO [XTextSessionWrapper] initActiveLanguage(1): activeLanguage initialized to ro
12:43:48,203 INFO [XTextSessionWrapper] initActiveLanguage(1): activeLanguage initialized to ro
12:43:48,703 INFO [XTextSessionWrapper] initActiveLanguage(1): activeLanguage initialized to ro
12:43:48,703 INFO [XTextSessionWrapper] initActiveLanguage(1): activeLanguage initialized to ro
12:43:48,703 INFO [XTextSessionWrapper] getText(1): identifier= com.brit.xcms.cms.Category.12.name, activeLanguage= null
12:43:49,234 INFO [XTextSessionWrapper] getText(2): identifier= com.brit.xcms.cms.Category.12.name, activeLanguage= null
Where did I went wrong? Why is the activeLanguage factoried value lost when i leave the initActiveLanguage() method?
--
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
12 years, 4 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2697) Add attribute to s:link tag to make creation of magic dataModelSelection URL parameter optional
by Wolfgang Schwendt (JIRA)
Add attribute to s:link tag to make creation of magic dataModelSelection URL parameter optional
-----------------------------------------------------------------------------------------------
Key: JBSEAM-2697
URL: http://jira.jboss.com/jira/browse/JBSEAM-2697
Project: JBoss Seam
Issue Type: Feature Request
Components: JSF Controls
Affects Versions: 2.0.1.GA
Reporter: Wolfgang Schwendt
Priority: Minor
When an s:link component (org.jboss.seam.ui.component.UILink) is placed into a h:dataTable backed by a javax.faces.model.DataModel, the s:link automatically generates the magic token for the magic "dataModelSelection" parameter regardless of whether the latter is really needed or not.
This can generate ugly URLs. The following example is particulary ugly:
http://127.0.0.1:8080/seminaris/seminarDetails.seam?seminarId=2&dataModel...
Without the "dataModelSelection" parameter, the URL would look much cleaner:
http://127.0.0.1:8080/seminaris/seminarDetails.seam?semId=2
So my question: Couldn't we make the "dataModelSelection" parameter optional? (For example, by adding an attribute to the s:link tag).
Btw: I'm aware that org.jboss.seam.ui.component.UISeamCommandBase.getUrl() is the culprit that triggers inclusion of the the dataModelSelection parameter, so I know how to remove the dataModelSelection parameter generation, but it would be nice if also the officially released Seam version allowed the deactivation of the magic token generation.
Further, no magic token is generated if a UIDataTable is supplied by a normal List rather than a DataModel (cf. UISeamCommandBase.getSelection() ), but unfortunately there can be cases where it makes sense to supply the table data as DataModel rather than normal List.
--
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
12 years, 7 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-4428) <s:decorate> tag gives a "[renderkit] 'for' attribute cannot be null" message when no EditableValueHolder is found
by Julien Kronegg (JIRA)
<s:decorate> tag gives a "[renderkit] 'for' attribute cannot be null" message when no EditableValueHolder is found
------------------------------------------------------------------------------------------------------------------
Key: JBSEAM-4428
URL: https://jira.jboss.org/jira/browse/JBSEAM-4428
Project: Seam
Issue Type: Bug
Affects Versions: 2.1.2.GA
Environment: Seam 2.1.2.GA, http://fisheye.jboss.org/browse/Seam/branches/community/Seam_2_1/ui/src/m..., http://fisheye.jboss.org/browse/Seam/branches/community/Seam_2_1/ui/src/m...
Reporter: Julien Kronegg
Priority: Minor
When a field is decorated using <s:decorate> with the default Seam template "edit.xhtml" on content without EditableValueHolder (i.e. editable elements such as <h:inputText>), the following warning is issued:
WARN [renderkit] 'for' attribute cannot be null
This occurs for example on the following code snippet:
<s:decorate id="char" template="edit.xhtml">
<ui:define name="label">Characters Left:</ui:define>
<h:outputText id="charLeft" value="#{smsClass.charLeft}"/>
</s:decorate>
The Seam edit.xhtml template is the following:
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:s="http://jboss.com/products/seam/taglib">
<div class="prop">
<s:label styleClass="name #{invalid?'errors':''}">
<ui:insert name="label"/>
<s:span styleClass="required" rendered="#{required}">*</s:span>
</s:label>
<span class="value #{invalid?'errors':''}">
<s:validateAll>
<ui:insert/>
</s:validateAll>
</span>
<span class="error">
<h:graphicImage value="/img/error.gif" rendered="#{invalid}" styleClass="errors"/>
<s:message styleClass="errors"/>
</span>
</div>
</ui:composition>
This is caused by org.jboss.seam.ui.component.UIDecorate which gets the 'for' id by looking at the first available EditableValueHolder. When there is no such element, the 'for' id is null, hence the warning message (probably issued by the org.jboss.seam.ui.component.UIMessage parent class javax.faces.component.html.HtmlMessage).
The warning message is very anonying and give no useful information on what is going wrong: this kind of messages takes a lot of time to track and makes a big impact on the developper productivity.
The UIDecorate class should either:
1) display no error message (by either attaching the s:message tag to the s:decorate itself, or by avoid rendering the s:message)
2) display a more meaningfull message such as "No editable component found to attach the message in the decorate with id=xxx" (maybe to be combined with solution 1).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 7 months
[JBoss JIRA] Created: (JBSEAM-4621) Page Navigation exception after upgrading to JSF 2.0
by Sheng Gu (JIRA)
Page Navigation exception after upgrading to JSF 2.0
----------------------------------------------------
Key: JBSEAM-4621
URL: https://jira.jboss.org/jira/browse/JBSEAM-4621
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.2.1.CR1
Environment: Seam 2.2.1.CR1 + JSF 2.0 Sun
Reporter: Sheng Gu
Priority: Blocker
Fix For: 2.2.1.CR2
Hi there,
After upgrading to JSF2.0, I got the following exceptions. The login.xhtml and login.page.xml codes are listed as follows:
login.xhtml:
<h:commandButton value="LOGIN" action="#{identity.login}"/>
<h:commandButton value="SIGN UP!" action="register" immediate="true"/>
login.page.xml:
<?xml version="1.0" encoding="UTF-8"?>
<page xmlns="http://jboss.com/products/seam/pages"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.2.xsd">
<end-conversation before-redirect="true" root="true"/>
<navigation from-action="#{identity.login}">
<rule if="#{identity.loggedIn}">
<end-conversation before-redirect="true" root="true"/>
<redirect view-id="/home.xhtml" />
</rule>
</navigation>
<navigation from-action="register">
<begin-conversation join="false"/>
<redirect view-id="/register.xhtml" />
</navigation>
</page>
java.lang.IllegalStateException
at org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:435)
at org.jboss.seam.mock.MockExternalContext.redirect(MockExternalContext.java:528)
at org.jboss.seam.faces.FacesManager.redirect(FacesManager.java:220)
at org.jboss.seam.faces.FacesManager.redirect(FacesManager.java:185)
at org.jboss.seam.faces.Navigator.redirect(Navigator.java:55)
at org.jboss.seam.faces.Navigator.redirect(Navigator.java:42)
at org.jboss.seam.exception.RedirectHandler.handle(RedirectHandler.java:51)
at org.jboss.seam.exception.Exceptions.handle(Exceptions.java:76)
at org.jboss.seam.web.ExceptionFilter.endWebRequestAfterException(ExceptionFilter.java:114)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:70)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months