[jboss-jira] [JBoss JIRA] (WFLY-6681) @Singleton + @Schedule locks web container requests
Alan Echer (JIRA)
issues at jboss.org
Tue Jun 7 16:06:00 EDT 2016
[ https://issues.jboss.org/browse/WFLY-6681?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alan Echer updated WFLY-6681:
-----------------------------
Steps to Reproduce:
I created a simple application to illustrate the problem, this is a normal behavior or is there any way to run treads in the background without disturbing the running web application?
{code:java}
import javax.ejb.Schedule;
import javax.ejb.Singleton;
@Singleton(name = "Schedule")
public class ScheduleTest {
@Schedule(hour = "*", minute = "*", second = "30")
public void enviaResumoSemanalContaUsuario() {
System.out.println("Testing!");
}
}
{code}
Place debug the lines of "Testing," and the web page stops responding.
{code:html}
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>$Title$</title>
</head>
<body>
$END$
</body>
</html>
{code}
was:
I created a simple application to illustrate the problem
{code:java}
import javax.ejb.Schedule;
import javax.ejb.Singleton;
@Singleton(name = "Schedule")
public class ScheduleTest {
@Schedule(hour = "*", minute = "*", second = "30")
public void enviaResumoSemanalContaUsuario() {
System.out.println("Testing!");
}
}
{code}
Place debug the lines of "Testing," and the web page stops responding.
{code:html}
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>$Title$</title>
</head>
<body>
$END$
</body>
</html>
{code}
> @Singleton + @Schedule locks web container requests
> ---------------------------------------------------
>
> Key: WFLY-6681
> URL: https://issues.jboss.org/browse/WFLY-6681
> Project: WildFly
> Issue Type: Bug
> Components: EJB
> Affects Versions: 10.0.0.Final
> Environment: java version "1.8.0_91"
> Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
> Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
> WildFly Full 10.0.0.Final
> Reporter: Alan Echer
>
> I'm having problems using a @Singleton with @Schedule along with a web application, because while the singleton is running the web application does not respond.
> bitbucket repo: https://bitbucket.org/alanecher/wfly-singleton-schedule
> PS: I <3 wildfly.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list