[JBoss JIRA] (WFLY-6383) Entities using Extended PersistentContext are not managed
by Rakesh K. Cherukuri (JIRA)
[ https://issues.jboss.org/browse/WFLY-6383?page=com.atlassian.jira.plugin.... ]
Rakesh K. Cherukuri updated WFLY-6383:
--------------------------------------
Attachment: AtInjectedStatefulEjbClient.java
CdiStatefulEmployeeBean.java
> Entities using Extended PersistentContext are not managed
> ---------------------------------------------------------
>
> Key: WFLY-6383
> URL: https://issues.jboss.org/browse/WFLY-6383
> Project: WildFly
> Issue Type: Bug
> Components: EJB
> Affects Versions: 10.0.0.Final
> Environment: WildFLy 10.0.0.Final
> Mac
> Reporter: Rakesh K. Cherukuri
> Labels: Extended, JPA, Persistence, PersistenceContext
> Attachments: AtInjectedStatefulEjbClient.java, CdiStatefulEmployeeBean.java
>
>
> Entities using Extended PersistentContext are not managed in a Stateful bean.
> Attached are the bean class and the client servlet class
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (WFLY-6376) Class loader leak due to Infinispan ExpirationManagerImpl
by Paul Ferraro (JIRA)
[ https://issues.jboss.org/browse/WFLY-6376?page=com.atlassian.jira.plugin.... ]
Paul Ferraro updated WFLY-6376:
-------------------------------
Priority: Critical (was: Major)
> Class loader leak due to Infinispan ExpirationManagerImpl
> ---------------------------------------------------------
>
> Key: WFLY-6376
> URL: https://issues.jboss.org/browse/WFLY-6376
> Project: WildFly
> Issue Type: Bug
> Components: Clustering, JPA / Hibernate
> Affects Versions: 10.0.0.Final
> Reporter: Harald Wellmann
> Assignee: Paul Ferraro
> Priority: Critical
>
> h3. Scenario
> Given a WAR containing a persistence unit with second level cache and query cache enabled, I'm consistently hitting a Metaspace OutOfMemoryError after redeploying the unchanged application a couple of times.
> Analyzing the situation with Eclipse Memory Analyzer, I found one cause to be WFLY-6348, but even after applying that fix locally, I'm still having a Classloader leak which I can trace to a thread used by Infinispan referencing an obsolete web app classloader as context classloader.
> Just to rule out that this might be related to WFLY-6283, WFLY-6285, I repeated my experiments with a local build of WildFly master (2f11a59aee0dbdd52b65c5c684eafa83c3f418da), with Hibernate locally upgraded to 5.0.9.
> I'm still getting a classloader leak with that build.
> h3. Analysis
> {{org.infinispan.expiration.impl.ExpirationManagerImpl}} uses a {{LazyInitializingScheduledExecutorService}}. Due to lazy initialization, the {{ExecutorService}} and the underlying thread pool is not created until my web app is deployed. Thus, when the {{ExecutorService}} is created, the context class loader is set to the web app class loader, and this appears to propagate to the threads of the executor thread pool.
> When the application is undeployed, {{ExpirationManagerImpl.stop()}} gets invoked to cancel any running expiration task. However, the {{ExecutorService}} is not shut down, the threads remain alive and still keep a reference to the now obsolete context classloader.
> h3. Remarks
> I'm not sure if this analysis is correct, at least I hope there's a clue for WildFly and Infinispan experts to identify the real cause.
> By the way, it would be helpful if all threads created by Infinispan had meaningful names, rather than default names like {{pool-5-thread-1}}.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (WFLY-6383) Entities using Extended PersistentContext are not managed
by Rakesh K. Cherukuri (JIRA)
[ https://issues.jboss.org/browse/WFLY-6383?page=com.atlassian.jira.plugin.... ]
Rakesh K. Cherukuri updated WFLY-6383:
--------------------------------------
Description:
Entities using Extended PersistentContext are not managed in a Stateful bean.
Attached are the bean class and the client servlet class
was:
Entities using Extended PersistentContext are not managed in a Stateful bean.
Bean Class:
-----------------
bq. @Stateful
bq. @SessionScoped
bq. @Local(CdiStatefulEmployeeService.class)
bq. public class CdiStatefulEmployeeBean implements CdiStatefulEmployeeService {
bq. @PersistenceContext(name = "employees", type = PersistenceContextType.EXTENDED)
bq. EntityManager extendedEm;
bq. private Employee cached;
bq. @Override
bq. public String service() {
bq. cached = extendedEm.find(Employee.class, 499983);
bq. return cached.getFirstName();
bq. }
bq. @Override
bq. public String updateEntity() {
bq. cached.setFirstName("Uri2");
bq. return cached.getFirstName();
bq. }
bq. }
Client Servlet that basically invokes both service calls of the bean:
---------------------------------------------------------------------------------------
bq. @WebServlet("/atInjectedStatefulEjbClient")
bq. public class AtInjectedStatefulEjbClient extends HttpServlet {
bq.
bq. @Inject
bq. CdiStatefulEmployeeService statefulBean;
bq.
bq. @Override
bq. protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
bq.
bq. HttpSession session = req.getSession(true);
bq. resp.setContentType("text/plain");
bq.
bq. PrintWriter pw = resp.getWriter();
bq.
bq. pw.println(statefulBean.service());
bq. pw.println();
bq. pw.println(statefulBean.updateEntity());
bq.
bq. session.invalidate();
bq. pw.flush();
bq. pw.close();
bq. }
bq. }
> Entities using Extended PersistentContext are not managed
> ---------------------------------------------------------
>
> Key: WFLY-6383
> URL: https://issues.jboss.org/browse/WFLY-6383
> Project: WildFly
> Issue Type: Bug
> Components: EJB
> Affects Versions: 10.0.0.Final
> Environment: WildFLy 10.0.0.Final
> Mac
> Reporter: Rakesh K. Cherukuri
> Labels: Extended, JPA, Persistence, PersistenceContext
>
> Entities using Extended PersistentContext are not managed in a Stateful bean.
> Attached are the bean class and the client servlet class
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (WFLY-6383) Entities using Extended PersistentContext are not managed
by Rakesh K. Cherukuri (JIRA)
[ https://issues.jboss.org/browse/WFLY-6383?page=com.atlassian.jira.plugin.... ]
Rakesh K. Cherukuri updated WFLY-6383:
--------------------------------------
Description:
Entities using Extended PersistentContext are not managed in a Stateful bean.
Bean Class:
-----------------
bq. @Stateful
bq. @SessionScoped
bq. @Local(CdiStatefulEmployeeService.class)
bq. public class CdiStatefulEmployeeBean implements CdiStatefulEmployeeService {
bq. @PersistenceContext(name = "employees", type = PersistenceContextType.EXTENDED)
bq. EntityManager extendedEm;
bq. private Employee cached;
bq. @Override
bq. public String service() {
bq. cached = extendedEm.find(Employee.class, 499983);
bq. return cached.getFirstName();
bq. }
bq. @Override
bq. public String updateEntity() {
bq. cached.setFirstName("Uri2");
bq. return cached.getFirstName();
bq. }
bq. }
Client Servlet that basically invokes both service calls of the bean:
---------------------------------------------------------------------------------------
bq. @WebServlet("/atInjectedStatefulEjbClient")
bq. public class AtInjectedStatefulEjbClient extends HttpServlet {
bq.
bq. @Inject
bq. CdiStatefulEmployeeService statefulBean;
bq.
bq. @Override
bq. protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
bq.
bq. HttpSession session = req.getSession(true);
bq. resp.setContentType("text/plain");
bq.
bq. PrintWriter pw = resp.getWriter();
bq.
bq. pw.println(statefulBean.service());
bq. pw.println();
bq. pw.println(statefulBean.updateEntity());
bq.
bq. session.invalidate();
bq. pw.flush();
bq. pw.close();
bq. }
bq. }
was:
Entities using Extended PersistentContext are not managed in a Stateful bean.
Bean Class:
-----------------
bq. @Stateful
bq. @SessionScoped
bq. @Local(CdiStatefulEmployeeService.class)
bq. public class CdiStatefulEmployeeBean implements CdiStatefulEmployeeService {
bq.
bq. @PersistenceContext(name = "employees", type = PersistenceContextType.EXTENDED)
bq. EntityManager extendedEm;
bq.
bq. private Employee cached;
bq.
bq. @Override
bq. public String service() {
bq. cached = extendedEm.find(Employee.class, 499983);
bq. return cached.getFirstName();
bq. }
bq.
bq. @Override
bq. public String updateEntity() {
bq. cached.setFirstName("Uri2");
bq. return cached.getFirstName();
bq. }
bq. }
Client Servlet that basically invokes both service calls of the bean:
---------------------------------------------------------------------------------------
{{@WebServlet("/atInjectedStatefulEjbClient")
public class AtInjectedStatefulEjbClient extends HttpServlet {
@Inject
CdiStatefulEmployeeService statefulBean;
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
HttpSession session = req.getSession(true);
resp.setContentType("text/plain");
PrintWriter pw = resp.getWriter();
pw.println(statefulBean.service());
pw.println();
pw.println(statefulBean.updateEntity());
session.invalidate();
pw.flush();
pw.close();
}
}}}
> Entities using Extended PersistentContext are not managed
> ---------------------------------------------------------
>
> Key: WFLY-6383
> URL: https://issues.jboss.org/browse/WFLY-6383
> Project: WildFly
> Issue Type: Bug
> Components: EJB
> Affects Versions: 10.0.0.Final
> Environment: WildFLy 10.0.0.Final
> Mac
> Reporter: Rakesh K. Cherukuri
> Labels: Extended, JPA, Persistence, PersistenceContext
>
> Entities using Extended PersistentContext are not managed in a Stateful bean.
> Bean Class:
> -----------------
> bq. @Stateful
> bq. @SessionScoped
> bq. @Local(CdiStatefulEmployeeService.class)
> bq. public class CdiStatefulEmployeeBean implements CdiStatefulEmployeeService {
> bq. @PersistenceContext(name = "employees", type = PersistenceContextType.EXTENDED)
> bq. EntityManager extendedEm;
> bq. private Employee cached;
> bq. @Override
> bq. public String service() {
> bq. cached = extendedEm.find(Employee.class, 499983);
> bq. return cached.getFirstName();
> bq. }
> bq. @Override
> bq. public String updateEntity() {
> bq. cached.setFirstName("Uri2");
> bq. return cached.getFirstName();
> bq. }
> bq. }
> Client Servlet that basically invokes both service calls of the bean:
> ---------------------------------------------------------------------------------------
> bq. @WebServlet("/atInjectedStatefulEjbClient")
> bq. public class AtInjectedStatefulEjbClient extends HttpServlet {
> bq.
> bq. @Inject
> bq. CdiStatefulEmployeeService statefulBean;
> bq.
> bq. @Override
> bq. protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
> bq.
> bq. HttpSession session = req.getSession(true);
> bq. resp.setContentType("text/plain");
> bq.
> bq. PrintWriter pw = resp.getWriter();
> bq.
> bq. pw.println(statefulBean.service());
> bq. pw.println();
> bq. pw.println(statefulBean.updateEntity());
> bq.
> bq. session.invalidate();
> bq. pw.flush();
> bq. pw.close();
> bq. }
> bq. }
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (WFLY-6383) Entities using Extended PersistentContext are not managed
by Rakesh K. Cherukuri (JIRA)
[ https://issues.jboss.org/browse/WFLY-6383?page=com.atlassian.jira.plugin.... ]
Rakesh K. Cherukuri updated WFLY-6383:
--------------------------------------
Description:
Entities using Extended PersistentContext are not managed in a Stateful bean.
Bean Class:
-----------------
bq. @Stateful
bq. @SessionScoped
bq. @Local(CdiStatefulEmployeeService.class)
bq. public class CdiStatefulEmployeeBean implements CdiStatefulEmployeeService {
bq.
bq. @PersistenceContext(name = "employees", type = PersistenceContextType.EXTENDED)
bq. EntityManager extendedEm;
bq.
bq. private Employee cached;
bq.
bq. @Override
bq. public String service() {
bq. cached = extendedEm.find(Employee.class, 499983);
bq. return cached.getFirstName();
bq. }
bq.
bq. @Override
bq. public String updateEntity() {
bq. cached.setFirstName("Uri2");
bq. return cached.getFirstName();
bq. }
bq. }
Client Servlet that basically invokes both service calls of the bean:
---------------------------------------------------------------------------------------
{{@WebServlet("/atInjectedStatefulEjbClient")
public class AtInjectedStatefulEjbClient extends HttpServlet {
@Inject
CdiStatefulEmployeeService statefulBean;
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
HttpSession session = req.getSession(true);
resp.setContentType("text/plain");
PrintWriter pw = resp.getWriter();
pw.println(statefulBean.service());
pw.println();
pw.println(statefulBean.updateEntity());
session.invalidate();
pw.flush();
pw.close();
}
}}}
was:
Entities using Extended PersistentContext are not managed in a Stateful bean.
Bean Class:
-----------------
{{@Stateful
@SessionScoped
@Local(CdiStatefulEmployeeService.class)
public class CdiStatefulEmployeeBean implements CdiStatefulEmployeeService {
@PersistenceContext(name = "employees", type = PersistenceContextType.EXTENDED)
EntityManager extendedEm;
private Employee cached;
@Override
public String service() {
cached = extendedEm.find(Employee.class, 499983);
return cached.getFirstName();
}
@Override
public String updateEntity() {
cached.setFirstName("Uri2");
return cached.getFirstName();
}
}}}
Client Servlet that basically invokes both service calls of the bean:
---------------------------------------------------------------------------------------
{{@WebServlet("/atInjectedStatefulEjbClient")
public class AtInjectedStatefulEjbClient extends HttpServlet {
@Inject
CdiStatefulEmployeeService statefulBean;
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
HttpSession session = req.getSession(true);
resp.setContentType("text/plain");
PrintWriter pw = resp.getWriter();
pw.println(statefulBean.service());
pw.println();
pw.println(statefulBean.updateEntity());
session.invalidate();
pw.flush();
pw.close();
}
}}}
> Entities using Extended PersistentContext are not managed
> ---------------------------------------------------------
>
> Key: WFLY-6383
> URL: https://issues.jboss.org/browse/WFLY-6383
> Project: WildFly
> Issue Type: Bug
> Components: EJB
> Affects Versions: 10.0.0.Final
> Environment: WildFLy 10.0.0.Final
> Mac
> Reporter: Rakesh K. Cherukuri
> Labels: Extended, JPA, Persistence, PersistenceContext
>
> Entities using Extended PersistentContext are not managed in a Stateful bean.
> Bean Class:
> -----------------
> bq. @Stateful
> bq. @SessionScoped
> bq. @Local(CdiStatefulEmployeeService.class)
> bq. public class CdiStatefulEmployeeBean implements CdiStatefulEmployeeService {
> bq.
> bq. @PersistenceContext(name = "employees", type = PersistenceContextType.EXTENDED)
> bq. EntityManager extendedEm;
> bq.
> bq. private Employee cached;
> bq.
> bq. @Override
> bq. public String service() {
> bq. cached = extendedEm.find(Employee.class, 499983);
> bq. return cached.getFirstName();
> bq. }
> bq.
> bq. @Override
> bq. public String updateEntity() {
> bq. cached.setFirstName("Uri2");
> bq. return cached.getFirstName();
> bq. }
> bq. }
> Client Servlet that basically invokes both service calls of the bean:
> ---------------------------------------------------------------------------------------
> {{@WebServlet("/atInjectedStatefulEjbClient")
> public class AtInjectedStatefulEjbClient extends HttpServlet {
> @Inject
> CdiStatefulEmployeeService statefulBean;
> @Override
> protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
> HttpSession session = req.getSession(true);
> resp.setContentType("text/plain");
> PrintWriter pw = resp.getWriter();
> pw.println(statefulBean.service());
> pw.println();
> pw.println(statefulBean.updateEntity());
>
> session.invalidate();
> pw.flush();
> pw.close();
> }
> }}}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (WFLY-6383) Entities using Extended PersistentContext are not managed
by Rakesh K. Cherukuri (JIRA)
[ https://issues.jboss.org/browse/WFLY-6383?page=com.atlassian.jira.plugin.... ]
Rakesh K. Cherukuri updated WFLY-6383:
--------------------------------------
Description:
Entities using Extended PersistentContext are not managed in a Stateful bean.
Bean Class:
-----------------
{quote}{{@Stateful
@SessionScoped
@Local(CdiStatefulEmployeeService.class)
public class CdiStatefulEmployeeBean implements CdiStatefulEmployeeService {
@PersistenceContext(name = "employees", type = PersistenceContextType.EXTENDED)
EntityManager extendedEm;
private Employee cached;
@Override
public String service() {
cached = extendedEm.find(Employee.class, 499983);
return cached.getFirstName();
}
@Override
public String updateEntity() {
cached.setFirstName("Uri2");
return cached.getFirstName();
}
}}}{quote}
Client Servlet that basically invokes both service calls of the bean:
---------------------------------------------------------------------------------------
{quote}{{@WebServlet("/atInjectedStatefulEjbClient")
public class AtInjectedStatefulEjbClient extends HttpServlet {
@Inject
CdiStatefulEmployeeService statefulBean;
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
HttpSession session = req.getSession(true);
resp.setContentType("text/plain");
PrintWriter pw = resp.getWriter();
pw.println(statefulBean.service());
pw.println();
pw.println(statefulBean.updateEntity());
session.invalidate();
pw.flush();
pw.close();
}
}}}{quote}
was:
Entities using Extended PersistentContext are not managed in a Stateful bean.
Bean Class:
-----------------
{quote}@Stateful
@SessionScoped
@Local(CdiStatefulEmployeeService.class)
public class CdiStatefulEmployeeBean implements CdiStatefulEmployeeService {
@PersistenceContext(name = "employees", type = PersistenceContextType.EXTENDED)
EntityManager extendedEm;
private Employee cached;
@Override
public String service() {
cached = extendedEm.find(Employee.class, 499983);
return cached.getFirstName();
}
@Override
public String updateEntity() {
cached.setFirstName("Uri2");
return cached.getFirstName();
}
}{quote}
Client Servlet that basically invokes both service calls of the bean:
---------------------------------------------------------------------------------------
{quote}@WebServlet("/atInjectedStatefulEjbClient")
public class AtInjectedStatefulEjbClient extends HttpServlet {
@Inject
CdiStatefulEmployeeService statefulBean;
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
HttpSession session = req.getSession(true);
resp.setContentType("text/plain");
PrintWriter pw = resp.getWriter();
pw.println(statefulBean.service());
pw.println();
pw.println(statefulBean.updateEntity());
session.invalidate();
pw.flush();
pw.close();
}
}{quote}
> Entities using Extended PersistentContext are not managed
> ---------------------------------------------------------
>
> Key: WFLY-6383
> URL: https://issues.jboss.org/browse/WFLY-6383
> Project: WildFly
> Issue Type: Bug
> Components: EJB
> Affects Versions: 10.0.0.Final
> Environment: WildFLy 10.0.0.Final
> Mac
> Reporter: Rakesh K. Cherukuri
> Labels: Extended, JPA, Persistence, PersistenceContext
>
> Entities using Extended PersistentContext are not managed in a Stateful bean.
> Bean Class:
> -----------------
> {quote}{{@Stateful
> @SessionScoped
> @Local(CdiStatefulEmployeeService.class)
> public class CdiStatefulEmployeeBean implements CdiStatefulEmployeeService {
> @PersistenceContext(name = "employees", type = PersistenceContextType.EXTENDED)
> EntityManager extendedEm;
> private Employee cached;
>
> @Override
> public String service() {
> cached = extendedEm.find(Employee.class, 499983);
> return cached.getFirstName();
> }
> @Override
> public String updateEntity() {
> cached.setFirstName("Uri2");
> return cached.getFirstName();
> }
> }}}{quote}
> Client Servlet that basically invokes both service calls of the bean:
> ---------------------------------------------------------------------------------------
> {quote}{{@WebServlet("/atInjectedStatefulEjbClient")
> public class AtInjectedStatefulEjbClient extends HttpServlet {
> @Inject
> CdiStatefulEmployeeService statefulBean;
> @Override
> protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
> HttpSession session = req.getSession(true);
> resp.setContentType("text/plain");
> PrintWriter pw = resp.getWriter();
> pw.println(statefulBean.service());
> pw.println();
> pw.println(statefulBean.updateEntity());
>
> session.invalidate();
> pw.flush();
> pw.close();
> }
> }}}{quote}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (JGRP-2028) GMS sometimes ignores view bundling timeout
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/JGRP-2028?page=com.atlassian.jira.plugin.... ]
Dan Berindei updated JGRP-2028:
-------------------------------
Priority: Minor (was: Major)
> GMS sometimes ignores view bundling timeout
> -------------------------------------------
>
> Key: JGRP-2028
> URL: https://issues.jboss.org/browse/JGRP-2028
> Project: JGroups
> Issue Type: Bug
> Affects Versions: 3.6.8
> Reporter: Dan Berindei
> Assignee: Bela Ban
> Priority: Minor
>
> {{GMS.ViewHandler.run()}} has this code:
> {code}
> wait_time=timeout - (System.nanoTime() - start_time);
> if(wait_time > 0 && firstRequest.canBeProcessedTogether(firstRequest)) { // JGRP-1438
> long wait_time_ms=TimeUnit.MILLISECONDS.convert(wait_time, TimeUnit.NANOSECONDS);
> queue.waitUntilClosed(wait_time_ms); // misnomer: waits until element has been added or q closed
> }
> {code}
> The problem is {{wait_time_ms}} will be {{0}} if {{0 < wait_time < 1_000_000}}. {{queue.waitUntilClosed(wait_time_ms)}} then calls {{Object.wait(0)}} and blocks forever.
> Fortunately, the joiners re-sends the {{JOIN_REQ}} message after {{GMS.join_timeout}} (3s by default), so all that happens is that the view is delayed by 3s. It does cause some random failures in tests that expect the view to form in a precise amount of time, though.
> {noformat}
> 17:04:53,034 DEBUG (ForkThread-3,InitialClusterSizeTest:) [GMS] NodeF-49399: sending JOIN(NodeF-49399) to NodeE-37644
> 17:04:53,034 TRACE (ForkThread-3,InitialClusterSizeTest:) [TCP_NIO2] NodeF-49399: sending msg to NodeE-37644, src=NodeF-49399, headers are GMS: GmsHeader[JOIN_REQ]: mbr=NodeF-49399, UNICAST3: DATA, seqno=1, first, TP: [cluster_name=ISPN]
> 17:04:53,035 DEBUG (ForkThread-4,InitialClusterSizeTest:) [GMS] NodeG-49307: sending JOIN(NodeG-49307) to NodeE-37644
> 17:04:53,035 TRACE (ForkThread-4,InitialClusterSizeTest:) [TCP_NIO2] NodeG-49307: sending msg to NodeE-37644, src=NodeG-49307, headers are GMS: GmsHeader[JOIN_REQ]: mbr=NodeG-49307, UNICAST3: DATA, seqno=1, first, TP: [cluster_name=ISPN]
> 17:04:53,060 TRACE (INT-1,NodeE-37644:) [TCP_NIO2] NodeE-37644: received [dst: NodeE-37644, src: NodeF-49399 (3 headers), size=0 bytes, flags=OOB|INTERNAL], headers are GMS: GmsHeader[JOIN_REQ]: mbr=NodeF-49399, UNICAST3: DATA, seqno=1, first, TP: [cluster_name=ISPN]
> 17:04:53,060 TRACE (INT-2,NodeE-37644:) [TCP_NIO2] NodeE-37644: received [dst: NodeE-37644, src: NodeG-49307 (3 headers), size=0 bytes, flags=OOB|INTERNAL], headers are GMS: GmsHeader[JOIN_REQ]: mbr=NodeG-49307, UNICAST3: DATA, seqno=1, first, TP: [cluster_name=ISPN]
> 17:04:53,060 TRACE (INT-1,NodeE-37644:) [UNICAST3] NodeE-37644 <-- DATA(NodeF-49399: #1, conn_id=0, first)
> 17:04:53,060 TRACE (INT-2,NodeE-37644:) [UNICAST3] NodeE-37644 <-- DATA(NodeG-49307: #1, conn_id=0, first)
> 17:04:53,061 TRACE (INT-2,NodeE-37644:) [UNICAST3] NodeE-37644: delivering NodeG-49307#1
> 17:04:53,061 TRACE (INT-1,NodeE-37644:) [UNICAST3] NodeE-37644: delivering NodeF-49399#1
> 17:04:56,035 WARN (ForkThread-3,InitialClusterSizeTest:) [GMS] NodeF-49399: JOIN(NodeF-49399) sent to NodeE-37644 timed out (after 3000 ms), on try 1
> 17:04:56,035 WARN (ForkThread-4,InitialClusterSizeTest:) [GMS] NodeG-49307: JOIN(NodeG-49307) sent to NodeE-37644 timed out (after 3000 ms), on try 1
> 17:04:56,036 DEBUG (ForkThread-3,InitialClusterSizeTest:) [GMS] NodeF-49399: sending JOIN(NodeF-49399) to NodeE-37644
> 17:04:56,036 TRACE (ForkThread-3,InitialClusterSizeTest:) [TCP_NIO2] NodeF-49399: sending msg to NodeE-37644, src=NodeF-49399, headers are GMS: GmsHeader[JOIN_REQ]: mbr=NodeF-49399, UNICAST3: DATA, seqno=2, TP: [cluster_name=ISPN]
> 17:04:56,036 DEBUG (ForkThread-4,InitialClusterSizeTest:) [GMS] NodeG-49307: sending JOIN(NodeG-49307) to NodeE-37644
> 17:04:56,036 TRACE (ForkThread-4,InitialClusterSizeTest:) [TCP_NIO2] NodeG-49307: sending msg to NodeE-37644, src=NodeG-49307, headers are GMS: GmsHeader[JOIN_REQ]: mbr=NodeG-49307, UNICAST3: DATA, seqno=2, TP: [cluster_name=ISPN]
> 17:04:56,057 TRACE (INT-1,NodeE-37644:) [TCP_NIO2] NodeE-37644: received [dst: NodeE-37644, src: NodeF-49399 (3 headers), size=0 bytes, flags=OOB|INTERNAL], headers are GMS: GmsHeader[JOIN_REQ]: mbr=NodeF-49399, UNICAST3: DATA, seqno=2, TP: [cluster_name=ISPN]
> 17:04:56,057 TRACE (INT-2,NodeE-37644:) [TCP_NIO2] NodeE-37644: received [dst: NodeE-37644, src: NodeG-49307 (3 headers), size=0 bytes, flags=OOB|INTERNAL], headers are GMS: GmsHeader[JOIN_REQ]: mbr=NodeG-49307, UNICAST3: DATA, seqno=2, TP: [cluster_name=ISPN]
> 17:04:56,057 TRACE (INT-2,NodeE-37644:) [UNICAST3] NodeE-37644: delivering NodeG-49307#2
> 17:04:56,057 TRACE (INT-1,NodeE-37644:) [UNICAST3] NodeE-37644: delivering NodeF-49399#2
> # finally
> 17:04:56,057 TRACE (ViewHandler,NodeE-37644:) [GMS] NodeE-37644: joiners=[NodeG-49307, NodeF-49399], suspected=[], leaving=[], new view: [NodeE-37644|1] (3) [NodeE-37644, NodeG-49307, NodeF-49399]
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (WFLY-6383) Entities using Extended PersistentContext are not managed
by Rakesh K. Cherukuri (JIRA)
[ https://issues.jboss.org/browse/WFLY-6383?page=com.atlassian.jira.plugin.... ]
Rakesh K. Cherukuri updated WFLY-6383:
--------------------------------------
Description:
Entities using Extended PersistentContext are not managed in a Stateful bean.
Bean Class:
-----------------
{{@Stateful
@SessionScoped
@Local(CdiStatefulEmployeeService.class)
public class CdiStatefulEmployeeBean implements CdiStatefulEmployeeService {
@PersistenceContext(name = "employees", type = PersistenceContextType.EXTENDED)
EntityManager extendedEm;
private Employee cached;
@Override
public String service() {
cached = extendedEm.find(Employee.class, 499983);
return cached.getFirstName();
}
@Override
public String updateEntity() {
cached.setFirstName("Uri2");
return cached.getFirstName();
}
}}}
Client Servlet that basically invokes both service calls of the bean:
---------------------------------------------------------------------------------------
{{@WebServlet("/atInjectedStatefulEjbClient")
public class AtInjectedStatefulEjbClient extends HttpServlet {
@Inject
CdiStatefulEmployeeService statefulBean;
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
HttpSession session = req.getSession(true);
resp.setContentType("text/plain");
PrintWriter pw = resp.getWriter();
pw.println(statefulBean.service());
pw.println();
pw.println(statefulBean.updateEntity());
session.invalidate();
pw.flush();
pw.close();
}
}}}
was:
Entities using Extended PersistentContext are not managed in a Stateful bean.
Bean Class:
-----------------
{quote}{{@Stateful
@SessionScoped
@Local(CdiStatefulEmployeeService.class)
public class CdiStatefulEmployeeBean implements CdiStatefulEmployeeService {
@PersistenceContext(name = "employees", type = PersistenceContextType.EXTENDED)
EntityManager extendedEm;
private Employee cached;
@Override
public String service() {
cached = extendedEm.find(Employee.class, 499983);
return cached.getFirstName();
}
@Override
public String updateEntity() {
cached.setFirstName("Uri2");
return cached.getFirstName();
}
}}}{quote}
Client Servlet that basically invokes both service calls of the bean:
---------------------------------------------------------------------------------------
{quote}{{@WebServlet("/atInjectedStatefulEjbClient")
public class AtInjectedStatefulEjbClient extends HttpServlet {
@Inject
CdiStatefulEmployeeService statefulBean;
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
HttpSession session = req.getSession(true);
resp.setContentType("text/plain");
PrintWriter pw = resp.getWriter();
pw.println(statefulBean.service());
pw.println();
pw.println(statefulBean.updateEntity());
session.invalidate();
pw.flush();
pw.close();
}
}}}{quote}
> Entities using Extended PersistentContext are not managed
> ---------------------------------------------------------
>
> Key: WFLY-6383
> URL: https://issues.jboss.org/browse/WFLY-6383
> Project: WildFly
> Issue Type: Bug
> Components: EJB
> Affects Versions: 10.0.0.Final
> Environment: WildFLy 10.0.0.Final
> Mac
> Reporter: Rakesh K. Cherukuri
> Labels: Extended, JPA, Persistence, PersistenceContext
>
> Entities using Extended PersistentContext are not managed in a Stateful bean.
> Bean Class:
> -----------------
> {{@Stateful
> @SessionScoped
> @Local(CdiStatefulEmployeeService.class)
> public class CdiStatefulEmployeeBean implements CdiStatefulEmployeeService {
> @PersistenceContext(name = "employees", type = PersistenceContextType.EXTENDED)
> EntityManager extendedEm;
> private Employee cached;
>
> @Override
> public String service() {
> cached = extendedEm.find(Employee.class, 499983);
> return cached.getFirstName();
> }
> @Override
> public String updateEntity() {
> cached.setFirstName("Uri2");
> return cached.getFirstName();
> }
> }}}
> Client Servlet that basically invokes both service calls of the bean:
> ---------------------------------------------------------------------------------------
> {{@WebServlet("/atInjectedStatefulEjbClient")
> public class AtInjectedStatefulEjbClient extends HttpServlet {
> @Inject
> CdiStatefulEmployeeService statefulBean;
> @Override
> protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
> HttpSession session = req.getSession(true);
> resp.setContentType("text/plain");
> PrintWriter pw = resp.getWriter();
> pw.println(statefulBean.service());
> pw.println();
> pw.println(statefulBean.updateEntity());
>
> session.invalidate();
> pw.flush();
> pw.close();
> }
> }}}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (JGRP-2028) GMS sometimes ignores view bundling timeout
by Dan Berindei (JIRA)
Dan Berindei created JGRP-2028:
----------------------------------
Summary: GMS sometimes ignores view bundling timeout
Key: JGRP-2028
URL: https://issues.jboss.org/browse/JGRP-2028
Project: JGroups
Issue Type: Bug
Affects Versions: 3.6.8
Reporter: Dan Berindei
Assignee: Bela Ban
{{GMS.ViewHandler.run()}} has this code:
{code}
wait_time=timeout - (System.nanoTime() - start_time);
if(wait_time > 0 && firstRequest.canBeProcessedTogether(firstRequest)) { // JGRP-1438
long wait_time_ms=TimeUnit.MILLISECONDS.convert(wait_time, TimeUnit.NANOSECONDS);
queue.waitUntilClosed(wait_time_ms); // misnomer: waits until element has been added or q closed
}
{code}
The problem is {{wait_time_ms}} will be {{0}} if {{0 < wait_time < 1_000_000}}. {{queue.waitUntilClosed(wait_time_ms)}} then calls {{Object.wait(0)}} and blocks forever.
Fortunately, the joiners re-sends the {{JOIN_REQ}} message after {{GMS.join_timeout}} (3s by default), so all that happens is that the view is delayed by 3s. It does cause some random failures in tests that expect the view to form in a precise amount of time, though.
{noformat}
17:04:53,034 DEBUG (ForkThread-3,InitialClusterSizeTest:) [GMS] NodeF-49399: sending JOIN(NodeF-49399) to NodeE-37644
17:04:53,034 TRACE (ForkThread-3,InitialClusterSizeTest:) [TCP_NIO2] NodeF-49399: sending msg to NodeE-37644, src=NodeF-49399, headers are GMS: GmsHeader[JOIN_REQ]: mbr=NodeF-49399, UNICAST3: DATA, seqno=1, first, TP: [cluster_name=ISPN]
17:04:53,035 DEBUG (ForkThread-4,InitialClusterSizeTest:) [GMS] NodeG-49307: sending JOIN(NodeG-49307) to NodeE-37644
17:04:53,035 TRACE (ForkThread-4,InitialClusterSizeTest:) [TCP_NIO2] NodeG-49307: sending msg to NodeE-37644, src=NodeG-49307, headers are GMS: GmsHeader[JOIN_REQ]: mbr=NodeG-49307, UNICAST3: DATA, seqno=1, first, TP: [cluster_name=ISPN]
17:04:53,060 TRACE (INT-1,NodeE-37644:) [TCP_NIO2] NodeE-37644: received [dst: NodeE-37644, src: NodeF-49399 (3 headers), size=0 bytes, flags=OOB|INTERNAL], headers are GMS: GmsHeader[JOIN_REQ]: mbr=NodeF-49399, UNICAST3: DATA, seqno=1, first, TP: [cluster_name=ISPN]
17:04:53,060 TRACE (INT-2,NodeE-37644:) [TCP_NIO2] NodeE-37644: received [dst: NodeE-37644, src: NodeG-49307 (3 headers), size=0 bytes, flags=OOB|INTERNAL], headers are GMS: GmsHeader[JOIN_REQ]: mbr=NodeG-49307, UNICAST3: DATA, seqno=1, first, TP: [cluster_name=ISPN]
17:04:53,060 TRACE (INT-1,NodeE-37644:) [UNICAST3] NodeE-37644 <-- DATA(NodeF-49399: #1, conn_id=0, first)
17:04:53,060 TRACE (INT-2,NodeE-37644:) [UNICAST3] NodeE-37644 <-- DATA(NodeG-49307: #1, conn_id=0, first)
17:04:53,061 TRACE (INT-2,NodeE-37644:) [UNICAST3] NodeE-37644: delivering NodeG-49307#1
17:04:53,061 TRACE (INT-1,NodeE-37644:) [UNICAST3] NodeE-37644: delivering NodeF-49399#1
17:04:56,035 WARN (ForkThread-3,InitialClusterSizeTest:) [GMS] NodeF-49399: JOIN(NodeF-49399) sent to NodeE-37644 timed out (after 3000 ms), on try 1
17:04:56,035 WARN (ForkThread-4,InitialClusterSizeTest:) [GMS] NodeG-49307: JOIN(NodeG-49307) sent to NodeE-37644 timed out (after 3000 ms), on try 1
17:04:56,036 DEBUG (ForkThread-3,InitialClusterSizeTest:) [GMS] NodeF-49399: sending JOIN(NodeF-49399) to NodeE-37644
17:04:56,036 TRACE (ForkThread-3,InitialClusterSizeTest:) [TCP_NIO2] NodeF-49399: sending msg to NodeE-37644, src=NodeF-49399, headers are GMS: GmsHeader[JOIN_REQ]: mbr=NodeF-49399, UNICAST3: DATA, seqno=2, TP: [cluster_name=ISPN]
17:04:56,036 DEBUG (ForkThread-4,InitialClusterSizeTest:) [GMS] NodeG-49307: sending JOIN(NodeG-49307) to NodeE-37644
17:04:56,036 TRACE (ForkThread-4,InitialClusterSizeTest:) [TCP_NIO2] NodeG-49307: sending msg to NodeE-37644, src=NodeG-49307, headers are GMS: GmsHeader[JOIN_REQ]: mbr=NodeG-49307, UNICAST3: DATA, seqno=2, TP: [cluster_name=ISPN]
17:04:56,057 TRACE (INT-1,NodeE-37644:) [TCP_NIO2] NodeE-37644: received [dst: NodeE-37644, src: NodeF-49399 (3 headers), size=0 bytes, flags=OOB|INTERNAL], headers are GMS: GmsHeader[JOIN_REQ]: mbr=NodeF-49399, UNICAST3: DATA, seqno=2, TP: [cluster_name=ISPN]
17:04:56,057 TRACE (INT-2,NodeE-37644:) [TCP_NIO2] NodeE-37644: received [dst: NodeE-37644, src: NodeG-49307 (3 headers), size=0 bytes, flags=OOB|INTERNAL], headers are GMS: GmsHeader[JOIN_REQ]: mbr=NodeG-49307, UNICAST3: DATA, seqno=2, TP: [cluster_name=ISPN]
17:04:56,057 TRACE (INT-2,NodeE-37644:) [UNICAST3] NodeE-37644: delivering NodeG-49307#2
17:04:56,057 TRACE (INT-1,NodeE-37644:) [UNICAST3] NodeE-37644: delivering NodeF-49399#2
# finally
17:04:56,057 TRACE (ViewHandler,NodeE-37644:) [GMS] NodeE-37644: joiners=[NodeG-49307, NodeF-49399], suspected=[], leaving=[], new view: [NodeE-37644|1] (3) [NodeE-37644, NodeG-49307, NodeF-49399]
{noformat}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (WFLY-6383) Entities using Extended PersistentContext are not managed
by Rakesh K. Cherukuri (JIRA)
Rakesh K. Cherukuri created WFLY-6383:
-----------------------------------------
Summary: Entities using Extended PersistentContext are not managed
Key: WFLY-6383
URL: https://issues.jboss.org/browse/WFLY-6383
Project: WildFly
Issue Type: Bug
Components: EJB
Affects Versions: 10.0.0.Final
Environment: WildFLy 10.0.0.Final
Mac
Reporter: Rakesh K. Cherukuri
Entities using Extended PersistentContext are not managed in a Stateful bean.
Bean Class:
-----------------
{quote}@Stateful
@SessionScoped
@Local(CdiStatefulEmployeeService.class)
public class CdiStatefulEmployeeBean implements CdiStatefulEmployeeService {
@PersistenceContext(name = "employees", type = PersistenceContextType.EXTENDED)
EntityManager extendedEm;
private Employee cached;
@Override
public String service() {
cached = extendedEm.find(Employee.class, 499983);
return cached.getFirstName();
}
@Override
public String updateEntity() {
cached.setFirstName("Uri2");
return cached.getFirstName();
}
}{quote}
Client Servlet that basically invokes both service calls of the bean:
---------------------------------------------------------------------------------------
{quote}@WebServlet("/atInjectedStatefulEjbClient")
public class AtInjectedStatefulEjbClient extends HttpServlet {
@Inject
CdiStatefulEmployeeService statefulBean;
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
HttpSession session = req.getSession(true);
resp.setContentType("text/plain");
PrintWriter pw = resp.getWriter();
pw.println(statefulBean.service());
pw.println();
pw.println(statefulBean.updateEntity());
session.invalidate();
pw.flush();
pw.close();
}
}{quote}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month