[JBoss Portal] - Jboss Portal 2.7.2: Connection leak ( INACTIVE State) Problem
by sunrat
sunrat [https://community.jboss.org/people/sunrat] created the discussion
"Jboss Portal 2.7.2: Connection leak ( INACTIVE State) Problem"
To view the discussion, visit: https://community.jboss.org/message/827369#827369
--------------------------------------------------------------
Hi All,
I am seeing there are many connection in 'INACTIVE' state and are present for more than 12-15 hours. Most of the sessions (around 90%) have executed the below query to *JBP_INSTANCE_PER_USER* table before moving to inactive state
Checked from last query executed from v$session table and prev_sql_id
*[org.hibernate.SQL] select persistent0_.PK as PK6_0_, persistent0_.INSTANCE_PK as INSTANCE2_6_0_, persistent0_.SER_STATE as SER3_6_0_, persistent0_.USER_ID as USER4_6_0_, persistent0_.PORTLET_REF as PORTLET5_6_0_ from JBP_INSTANCE_PER_USER persistent0_ where persistent0_.INSTANCE_PK=? and persistent0_.USER_ID=?*
The open connection count is reaching to DB threshold value and the inactive sessions are not getting utilized for serving the new request and DB is creating the new connection. Also I have found the *PortalDS* connection is running out of connection while checking from JMX console. The in-use connection is touching the maximum connection count and available connection count to zero.
*Environment:*
*Application server: Jboss**Portal *2.7.2* Application server*
*OS: Linux*
I also did the code review for connection leak, but seems the above query is getting executed by Jboss internally while user logs-in to application portal.
Can anyone please help me out, if encountered the similar problem in Jboss portal application server. Let me know if need more information for issue.
Thanks in advance
Sunny
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/827369#827369]
Start a new discussion in JBoss Portal at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 9 months
[EJB3] - Re: Multiple session beans with the same interface
by jaikiran pai
jaikiran pai [https://community.jboss.org/people/jaikiran] created the discussion
"Re: Multiple session beans with the same interface"
To view the discussion, visit: https://community.jboss.org/message/827308#827308
--------------------------------------------------------------
It's perfectly valid for multiple EJBs to implement the same interface. The error isn't because multiple EJBs are implementing the same interface, but it's because the usage of the @EJB in your application is such that the container has no idea which of the multiple EJB implementations you are trying to setup into the java:global namespace via the @EJB usage:
@Stateless
@EJB(name = "java:global/coo/TestBean1", beanInterface = TestBean.class)
public class TestBean1 implements TestBean{
}
@Stateless
@EJB(name = "java:global/coo/TestBean2", beanInterface = TestBean.class)
public class TestBean2 implements TestBean{
The spec allows you to narrow it down to the specific EJB implementation. You can do so by using the "beanName" attribute of the @EJB where you can specify the name of the bean (which by default is the bean implementation's simple class name). So you should change that above code to:
@Stateless
@EJB(name = "java:global/coo/TestBean1", beanInterface = TestBean.class, *beanName="TestBean1"*)
public class TestBean1 implements TestBean{
}
@Stateless
@EJB(name = "java:global/coo/TestBean2", beanInterface = TestBean.class, *beanName="TestBean2"*)
public class TestBean2 implements TestBean{
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/827308#827308]
Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 9 months