[JBoss JIRA] (JBSEAM-5091) SeamInterceptor doesn't work on EJB @Schedule methods
by Marek Novotny (JIRA)
[ https://issues.jboss.org/browse/JBSEAM-5091?page=com.atlassian.jira.plugi... ]
Marek Novotny reopened JBSEAM-5091:
-----------------------------------
Thanks Michail for catching this. I will try to fix it.
> SeamInterceptor doesn't work on EJB @Schedule methods
> -----------------------------------------------------
>
> Key: JBSEAM-5091
> URL: https://issues.jboss.org/browse/JBSEAM-5091
> Project: Seam 2
> Issue Type: Bug
> Components: EJB3
> Affects Versions: 2.3.0.Final
> Reporter: Marek Schmidt
> Assignee: Marek Novotny
> Fix For: 2.3.1.CR1
>
>
> Description of problem:
> Having a
> @Scope(ScopeType.APPLICATION)
> @Singleton
> @Name("statistics")
> public class Statistics
> {
> @In(create=true)
> Foo foo;
>
> @Schedule(hour="*", minute="*", second="*/10", info="every tenth")
> public void generateReport(Timer timer) {
> // do stuff with foo
> }
> }
> gets NullPointerException accessing "foo". Seam interceptors doesn't seem to work on time-out methods. The problem seems to be that the SessionBeanInterceptor doesn't implement the @AroundTimeout method.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (JBSEAM-5094) Parentless examples
by Marek Schmidt (JIRA)
Marek Schmidt created JBSEAM-5094:
-------------------------------------
Summary: Parentless examples
Key: JBSEAM-5094
URL: https://issues.jboss.org/browse/JBSEAM-5094
Project: Seam 2
Issue Type: Feature Request
Components: Examples
Affects Versions: 2.3.0.Final
Reporter: Marek Schmidt
Assignee: Marek Schmidt
Fix For: 2.3.2.CR1
The examples structure should be changed, so that examples have no common parent and use just BOMs instead, so that examples can be used as "quickstarts" and show best practice of how to structure a Maven Seam project.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (JBSEAM-5091) SeamInterceptor doesn't work on EJB @Schedule methods
by Michail Plushnikov (JIRA)
[ https://issues.jboss.org/browse/JBSEAM-5091?page=com.atlassian.jira.plugi... ]
Michail Plushnikov commented on JBSEAM-5091:
--------------------------------------------
Commit (https://github.com/seam2/jboss-seam/commit/082f3b3459893b1c4200b7bd8ce995...) for this issue introduced following exception in our project:
java.lang.IllegalArgumentException: no InvocationType
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:78)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:118)
at org.jboss.seam.intercept.SessionBeanInterceptor.aroundTimeout(SessionBeanInterceptor.java:57)
.....
This code does not handle new event type AROUND TIMEOUT:
switch (eventType)
{
case AROUND_INVOKE:
if ( interceptor.isOptimized() )
{
return ( (OptimizedInterceptor) userInterceptor ).aroundInvoke(this);
}
else
{
return interceptor.aroundInvoke(this, userInterceptor);
}
case POST_CONSTRUCT: return interceptor.postConstruct(this, userInterceptor);
case PRE_DESTORY: return interceptor.preDestroy(this, userInterceptor);
case PRE_PASSIVATE: return interceptor.prePassivate(this, userInterceptor);
case POST_ACTIVATE: return interceptor.postActivate(this, userInterceptor);
default: throw new IllegalArgumentException("no InvocationType");
}
> SeamInterceptor doesn't work on EJB @Schedule methods
> -----------------------------------------------------
>
> Key: JBSEAM-5091
> URL: https://issues.jboss.org/browse/JBSEAM-5091
> Project: Seam 2
> Issue Type: Bug
> Components: EJB3
> Affects Versions: 2.3.0.Final
> Reporter: Marek Schmidt
> Assignee: Marek Novotny
> Fix For: 2.3.1.CR1
>
>
> Description of problem:
> Having a
> @Scope(ScopeType.APPLICATION)
> @Singleton
> @Name("statistics")
> public class Statistics
> {
> @In(create=true)
> Foo foo;
>
> @Schedule(hour="*", minute="*", second="*/10", info="every tenth")
> public void generateReport(Timer timer) {
> // do stuff with foo
> }
> }
> gets NullPointerException accessing "foo". Seam interceptors doesn't seem to work on time-out methods. The problem seems to be that the SessionBeanInterceptor doesn't implement the @AroundTimeout method.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (JBSEAM-5093) Seam produces malformed partial response on ViewExpiredException with Ajax
by Marek Novotny (JIRA)
[ https://issues.jboss.org/browse/JBSEAM-5093?page=com.atlassian.jira.plugi... ]
Marek Novotny resolved JBSEAM-5093.
-----------------------------------
Resolution: Done
fixed by https://github.com/seam2/jboss-seam/commit/4c250daaa260bd7ccd9c1cf752a7d3..., if ftests doesn't pass I will reopen the issue again.
> Seam produces malformed partial response on ViewExpiredException with Ajax
> --------------------------------------------------------------------------
>
> Key: JBSEAM-5093
> URL: https://issues.jboss.org/browse/JBSEAM-5093
> Project: Seam 2
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.3.0.Final
> Environment: Seam 2.3.1-SNAPSHOT 2013-05-02 082f3b3459893b1c4200b7bd8ce99556f87f0dd0
> Reporter: Marek Schmidt
> Assignee: Marek Novotny
> Fix For: 2.3.1.CR1
>
>
> When ViewExpiredException occurs in an Ajax request, the response is malformed, containing duplicate partial-response element. This results in the response not being parsed (and in this case, redirect not being followed).
> {noformat}
> <?xml version='1.0' encoding='UTF-8'?>
> <partial-response><redirect url="/seam-booking/home.seam?cid=22"></redirect></partial-response><?xml version="1.0" encoding="UTF-8"?>
> <partial-response><redirect url="/seam-booking/home.seam?cid=22"/></partial-response>
> {noformat}
> This seems to happen, because there are two rules for the redirection in pages.xml:
> - main.xhtml has login required, handled in Pages.redirectToLoginView()
> <page view-id="/main.xhtml" login-required="true">
> - exception handler for ViewExpiredException, handled in ExceptionFilter
> <exception class="javax.faces.application.ViewExpiredException">
> <redirect view-id="/home.xhtml">
> ...
> </exception>
> None of the Seam's components involved (ExceptionFilter, Pages, Exceptions, RedirectHandler, MockExternalContext, ... ?) checks whether the response has already been written and the redirect partial response gets written twice.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 8 months
[JBoss JIRA] (JBSEAM-5093) Seam produces malformed partial response on ViewExpiredException with Ajax
by Marek Novotny (JIRA)
[ https://issues.jboss.org/browse/JBSEAM-5093?page=com.atlassian.jira.plugi... ]
Marek Novotny commented on JBSEAM-5093:
---------------------------------------
I don't know how to check already written partial-response in response output stream, so I clear the buffer with not committed content and let MockExternalContext.redirect(String url) to add the partial-response data. The tests - ErrorHandlingTest and ExceptionRedirectTest passes and booking demo behaves correctly again. I will commit the change and will try to launch functional tests to confirm it doesn't affect something else.
> Seam produces malformed partial response on ViewExpiredException with Ajax
> --------------------------------------------------------------------------
>
> Key: JBSEAM-5093
> URL: https://issues.jboss.org/browse/JBSEAM-5093
> Project: Seam 2
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.3.0.Final
> Environment: Seam 2.3.1-SNAPSHOT 2013-05-02 082f3b3459893b1c4200b7bd8ce99556f87f0dd0
> Reporter: Marek Schmidt
> Assignee: Marek Novotny
> Fix For: 2.3.1.CR1
>
>
> When ViewExpiredException occurs in an Ajax request, the response is malformed, containing duplicate partial-response element. This results in the response not being parsed (and in this case, redirect not being followed).
> {noformat}
> <?xml version='1.0' encoding='UTF-8'?>
> <partial-response><redirect url="/seam-booking/home.seam?cid=22"></redirect></partial-response><?xml version="1.0" encoding="UTF-8"?>
> <partial-response><redirect url="/seam-booking/home.seam?cid=22"/></partial-response>
> {noformat}
> This seems to happen, because there are two rules for the redirection in pages.xml:
> - main.xhtml has login required, handled in Pages.redirectToLoginView()
> <page view-id="/main.xhtml" login-required="true">
> - exception handler for ViewExpiredException, handled in ExceptionFilter
> <exception class="javax.faces.application.ViewExpiredException">
> <redirect view-id="/home.xhtml">
> ...
> </exception>
> None of the Seam's components involved (ExceptionFilter, Pages, Exceptions, RedirectHandler, MockExternalContext, ... ?) checks whether the response has already been written and the redirect partial response gets written twice.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 8 months
[JBoss JIRA] (JBSEAM-5093) Seam produces malformed partial response on ViewExpiredException with Ajax
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/JBSEAM-5093?page=com.atlassian.jira.plugi... ]
RH Bugzilla Integration commented on JBSEAM-5093:
-------------------------------------------------
Marek Novotny <mnovotny(a)redhat.com> changed the Status of [bug 952571|https://bugzilla.redhat.com/show_bug.cgi?id=952571] from NEW to ASSIGNED
> Seam produces malformed partial response on ViewExpiredException with Ajax
> --------------------------------------------------------------------------
>
> Key: JBSEAM-5093
> URL: https://issues.jboss.org/browse/JBSEAM-5093
> Project: Seam 2
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.3.0.Final
> Environment: Seam 2.3.1-SNAPSHOT 2013-05-02 082f3b3459893b1c4200b7bd8ce99556f87f0dd0
> Reporter: Marek Schmidt
> Assignee: Marek Novotny
> Fix For: 2.3.1.CR1
>
>
> When ViewExpiredException occurs in an Ajax request, the response is malformed, containing duplicate partial-response element. This results in the response not being parsed (and in this case, redirect not being followed).
> {noformat}
> <?xml version='1.0' encoding='UTF-8'?>
> <partial-response><redirect url="/seam-booking/home.seam?cid=22"></redirect></partial-response><?xml version="1.0" encoding="UTF-8"?>
> <partial-response><redirect url="/seam-booking/home.seam?cid=22"/></partial-response>
> {noformat}
> This seems to happen, because there are two rules for the redirection in pages.xml:
> - main.xhtml has login required, handled in Pages.redirectToLoginView()
> <page view-id="/main.xhtml" login-required="true">
> - exception handler for ViewExpiredException, handled in ExceptionFilter
> <exception class="javax.faces.application.ViewExpiredException">
> <redirect view-id="/home.xhtml">
> ...
> </exception>
> None of the Seam's components involved (ExceptionFilter, Pages, Exceptions, RedirectHandler, MockExternalContext, ... ?) checks whether the response has already been written and the redirect partial response gets written twice.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 8 months
[JBoss JIRA] (JBSEAM-5093) Seam produces malformed partial response on ViewExpiredException with Ajax
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/JBSEAM-5093?page=com.atlassian.jira.plugi... ]
RH Bugzilla Integration updated JBSEAM-5093:
--------------------------------------------
Bugzilla Update: Perform
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=952571
> Seam produces malformed partial response on ViewExpiredException with Ajax
> --------------------------------------------------------------------------
>
> Key: JBSEAM-5093
> URL: https://issues.jboss.org/browse/JBSEAM-5093
> Project: Seam 2
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.3.0.Final
> Environment: Seam 2.3.1-SNAPSHOT 2013-05-02 082f3b3459893b1c4200b7bd8ce99556f87f0dd0
> Reporter: Marek Schmidt
> Assignee: Marek Novotny
> Fix For: 2.3.1.CR1
>
>
> When ViewExpiredException occurs in an Ajax request, the response is malformed, containing duplicate partial-response element. This results in the response not being parsed (and in this case, redirect not being followed).
> {noformat}
> <?xml version='1.0' encoding='UTF-8'?>
> <partial-response><redirect url="/seam-booking/home.seam?cid=22"></redirect></partial-response><?xml version="1.0" encoding="UTF-8"?>
> <partial-response><redirect url="/seam-booking/home.seam?cid=22"/></partial-response>
> {noformat}
> This seems to happen, because there are two rules for the redirection in pages.xml:
> - main.xhtml has login required, handled in Pages.redirectToLoginView()
> <page view-id="/main.xhtml" login-required="true">
> - exception handler for ViewExpiredException, handled in ExceptionFilter
> <exception class="javax.faces.application.ViewExpiredException">
> <redirect view-id="/home.xhtml">
> ...
> </exception>
> None of the Seam's components involved (ExceptionFilter, Pages, Exceptions, RedirectHandler, MockExternalContext, ... ?) checks whether the response has already been written and the redirect partial response gets written twice.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 8 months
[JBoss JIRA] (JBSEAM-5001) Deadlock between SFSB EJB lock and Component.getInstanceFromFactory factoryLock calling factory from the same component
by Marek Novotny (JIRA)
[ https://issues.jboss.org/browse/JBSEAM-5001?page=com.atlassian.jira.plugi... ]
Marek Novotny closed JBSEAM-5001.
---------------------------------
Resolution: Won't Fix
I think this test case is just a wrong usage of seam components and corner case for real usage. There is a high need for re-factoring and that might result in changed behavior after eliminating this dead lock.
> Deadlock between SFSB EJB lock and Component.getInstanceFromFactory factoryLock calling factory from the same component
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: JBSEAM-5001
> URL: https://issues.jboss.org/browse/JBSEAM-5001
> Project: Seam 2
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.3.0.BETA2
> Environment: JBoss AS 7.1.2, Seam 2.3.0.CR1-SNAPSHOT r14986
> Reporter: Marek Schmidt
> Assignee: Marek Novotny
> Fix For: 2.3.1.CR1
>
> Attachments: JBSEAM-5001.ear, JBSEAM-5001.tar.gz, test.py
>
>
> The following sample demonstrates a deadlock between SFSB lock and the Component.getInstanceFromFactory factoryLock:
> {code}
> @Stateful
> @Scope(ScopeType.SESSION)
> @Name("test")
> public class TestAction implements Test
> {
>
> public String test() {
> Thread.sleep(500);
> Component.getInstance("testString", true);
> return "test";
> }
>
> @Factory(value="testString", scope=ScopeType.SESSION)
> public String getTestString() {
> return "testString";
> }
> @Remove
> public void remove() {}
> }
> {code}
> when test.xhtml contains:
> {code}
> <h:outputText value="#{test.test()} " />
> {code}
> and othertest.xhtml contains:
> {code}
> <h:outputText value="#{testString} " />
> {code}
> If the othertest.seam is requested just after (<500ms after) the test.seam with the same session cookie.
> The problem seems to be that the #{test.test()} first locks the TestAction SFSB lock and then the Seam factory lock in the Component.getInstance call, while #{testString} locks the factoryLock first.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 8 months