0 Replies Latest reply on Sep 6, 2005 1:51 PM by David Carraher

    getPoolStatus, getMaxSize and Pooling

    David Carraher Newbie

      I've been tasked with updating JBOSS 2.4.4 to 4.0.2. In our current Java code for our Java Servlets, we use JBOSS 2.4.4 libraries to view connection pool information, as such:

       Object obj = fJNDIContext.lookup("java:/" + fstrPoolName);
       fDataSource = (DataSource) obj;
       fXADataSource = (org.jboss.pool.jdbc.xa.XAPoolDataSource) obj;
      


      Once the fXADataSource is established, we can get status or max size using, for example:

       return fXADataSource.getMaxSize();
      


      This does not appear to be supported by JBOSS 4.0.2 libraries. I'm assuming that I need to use the current J2EE defined implementations, but have not found any examples in the documentation that refer to how to get this type of pool information in my Java code.

      I've searched the web and several J2EE books for this information - the web seems to be pointing me to some implementation of JDBCConnectionPoolStats - but I'm at a loss for how to get from DataSource to an object that supports that interface.

      Anyone who can provide me an example, a link to the proper JBOSS API documentation, J2EE sample code, etc. - would be greatly appreciated.