You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Cédric Chantepie (JIRA)" <ji...@apache.org> on 2010/02/25 16:23:28 UTC

[jira] Created: (JCR-2520) [JBoss] No ManagedConnections available / JCA max connection (session)

[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.


[jira] Commented: (JCR-2520) [JBoss] No ManagedConnections available / JCA max connection (session)

Posted by "Cédric Chantepie (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-2520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12838378#action_12838378 ] 

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

Connection conn = null;
PreparedStatement stmt = null;

try {
  InitialContext ctx = new InitialContext();
  DataSource ds = (DataSource) ctx.lookup("java:/MyJcrPmDS"); // datasource used as PersistenceManager in repository.xml

  conn = ds.getConnection(); successful

  stmt = conn.prepareStatement("SELECT * FROM default_bundle");

  stmt.executeQuery(); // successful
} catch (Exception e) {
  e.printStackTrace(); // None exception occurs
} finally {
  if (stmt != null) {
    try {
      stmt.close();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }

  if (conn != null) {
    try {
      conn.close();
    } 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.


[jira] Commented: (JCR-2520) [JBoss] No ManagedConnections available / JCA max connection (session)

Posted by "Cédric Chantepie (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-2520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12838398#action_12838398 ] 

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

It seems that the limit cames from the org.jboss.resource.connectionmanager.BaseConnectionManager2 used by JBoss to wraps JCA connection manager provided by Jackrabbit JCA.

> [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.


[jira] Commented: (JCR-2520) [JBoss] No ManagedConnections available / JCA max connection (session)

Posted by "Cédric Chantepie (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Commented: (JCR-2520) [JBoss] No ManagedConnections available / JCA max connection (session)

Posted by "Cédric Chantepie (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-2520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12838408#action_12838408 ] 

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

In fact limit can (must) be configured in *-ds.xml JBoss specific file. By default pool max size is 20.

<connection-factories>
    <tx-connection-factory>
                <jndi-name>jcr/MyJcr</jndi-name>
                <xa-transaction/>
                <rar-name>jca.rar</rar-name>
                <connection-definition>javax.jcr.Repository</connection-definition>
                <config-property name="homeDir" type="java.lang.String">${sharepoint.jcr.homeDir}</config-property>
                <config-property name="configFile" type="java.lang.String">${sharepoint.jcr.configResource}</config-property>
                <config-property name="bindSessionToTransaction" type="java.lang.Boolean">true</config-property>
                <max-pool-size>90</max-pool-size><!-- adjusted in order to avoid JCA shortage from Jackrabbit JCA -->
    </tx-connection-factory>
</connection-factories>

> [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.


[jira] Resolved: (JCR-2520) [JBoss] No ManagedConnections available / JCA max connection (session)

Posted by "Cédric Chantepie (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-2520?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Cédric Chantepie resolved JCR-2520.
-----------------------------------

    Resolution: Not A Problem

See last comment

> [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.