jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cédric Chantepie (JIRA) <j...@apache.org>
Subject [jira] Commented: (JCR-2520) [JBoss] No ManagedConnections available / JCA max connection (session)
Date Thu, 25 Feb 2010 15:29:27 GMT

    [ https://issues.apache.org/jira/browse/JCR-2520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12838377#action_12838377
] 

Cédric Chantepie commented on JCR-2520:
---------------------------------------

Test case that tries to open more than 20 session :

ArrayList<Session> lst = new ArrayList<Session>();

try {
  InitialContext ctx = new InitialContext();
  Repository r = (Repository) ctx.lookup("java:jcr/MyJCR");
  Credentials creds = ...

  Session s;
  int i = 0;
  for (; i < 30; i++) {
    try {
      s = r.login(creds);

      lst.add(s);
    } catch (Exception e) { 
      e.printStackTrace();
      break; 
    }
  }

  System.out.println("i = " + i); // always get 20 there
} catch (Exception e) {
  e.printStackTrace();
} finally {
  for (Session s : lst) {
    try {
      s.logout();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
}

> [JBoss] No ManagedConnections available / JCA max connection (session)
> ----------------------------------------------------------------------
>
>                 Key: JCR-2520
>                 URL: https://issues.apache.org/jira/browse/JCR-2520
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-jca
>    Affects Versions: 2.0.0
>         Environment: JBoss 4.2.3.GA, PostgreSQL 8.x
>            Reporter: Cédric Chantepie
>
> It seems that with Jackrabbit JCA 2.0.0 deployed on JBoss 4.2.3.GA, "only" 20 session
can be opened at the same time.
> When trying to open the 21th session, I get the following exception :
> 15:49:16,047 ERROR [STDERR] Caused by: javax.resource.ResourceException: No ManagedConnections
available within configured blocking timeout ( 30000 [ms] )
> 15:49:16,047 ERROR [STDERR]     at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:303)
> 15:49:16,047 ERROR [STDERR]     at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:575)
> 15:49:16,047 ERROR [STDERR]     at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:347)
> 15:49:16,047 ERROR [STDERR]     at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:330)
> 15:49:16,047 ERROR [STDERR]     at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:402)
> 15:49:16,047 ERROR [STDERR]     at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:849)
> 15:49:16,047 ERROR [STDERR]     at org.apache.jackrabbit.jca.JCARepositoryHandle.login(JCARepositoryHandle.java:72)
> 15:49:16,047 ERROR [STDERR]     ... 28 more
> I don't see this limit / max count in Jackrabbit JCA configuration. I've checked whether
it comes from underlying PersistenceManager.
> Persistence manager is postgresql bundle one from JNDI (with javax.naming.InitialContext
as driver).
> But JBoss JMX console displayed it still have available connection to used database whereas
Jackrabbit JCA keep throwing exception.
> Moreover I'm still able to use underlying datasource to get a JDBC connection and execute
a PreparedStatement ("SELECT * FROM default_bundle" as test).
> So as I think underlying datasource/persistence manager is ok, there may be a trouble
with Jackrabbit JCA.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message