geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ccard...@apache.org
Subject svn commit: r502533 - /geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/
Date Fri, 02 Feb 2007 08:41:55 GMT
Author: ccardona
Date: Fri Feb  2 00:41:53 2007
New Revision: 502533

URL: http://svn.apache.org/viewvc?view=rev&rev=502533
Log:
GERONIMO-2517 : Implement JSR77 Stats interfaces.
- Initial check in of Stats interfaces implementing classes

Added:
    geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/BoundedRangeStatisticImpl.java
    geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/EJBStatsImpl.java
    geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/EntityBeanStatsImpl.java
    geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JCAConnectionPoolStatsImpl.java
    geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JCAConnectionStatsImpl.java
    geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JCAStatsImpl.java
    geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JDBCConnectionPoolStatsImpl.java
    geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JDBCConnectionStatsImpl.java
    geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JDBCStatsImpl.java
    geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSConnectionStatsImpl.java
    geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSConsumerStatsImpl.java
    geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSEndpointStatsImpl.java
    geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSProducerStatsImpl.java
    geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSSessionStatsImpl.java
    geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSStatsImpl.java
    geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JTAStatsImpl.java
    geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JavaMailStatsImpl.java
    geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/MessageDrivenBeanStatsImpl.java
    geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/ServletStatsImpl.java
    geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/SessionBeanStatsImpl.java
    geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/StatefulSessionBeanStatsImpl.java
    geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/StatelessSessionBeanStatsImpl.java
    geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/URLStatsImpl.java

Added: geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/BoundedRangeStatisticImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/BoundedRangeStatisticImpl.java?view=auto&rev=502533
==============================================================================
--- geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/BoundedRangeStatisticImpl.java (added)
+++ geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/BoundedRangeStatisticImpl.java Fri Feb  2 00:41:53 2007
@@ -0,0 +1,68 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.management.stats;
+
+import javax.management.j2ee.statistics.BoundedRangeStatistic;
+
+/**
+ * @version $Rev: 476049 $ $Date: 2006-11-16 20:35:17 -0800 (Thu, 16 Nov 2006) $
+ */
+public class BoundedRangeStatisticImpl extends RangeStatisticImpl implements BoundedRangeStatistic {
+    private long upperBound;
+    private long lowerBound;
+
+    public BoundedRangeStatisticImpl(String name, String unit, String description) {
+        super(name, unit, description);
+    }
+
+    public BoundedRangeStatisticImpl(String name, String unit, String description, long currentValue, long lowerBound, long upperBound) {
+        super(name, unit, description, currentValue);
+        this.upperBound = upperBound;
+        this.lowerBound = lowerBound;
+    }
+
+    public long getUpperBound() {
+        return upperBound;
+    }
+
+    public void setUpperBound(long upperBound) {
+        this.upperBound = upperBound;
+    }
+
+    public long getLowerBound() {
+        return lowerBound;
+    }
+
+    public void setLowerBound(long lowerBound) {
+        this.lowerBound = lowerBound;
+    }
+
+    public void setBounds(long lower, long upper) {
+        upperBound = upper;
+        lowerBound = lower;
+    }
+
+    public void setCurrent(long current) {
+        super.setCurrent(current);
+        if(current < lowerBound) {
+            lowerBound = current;
+        }
+        if(current > upperBound) {
+            upperBound = current;
+        }
+    }
+}

Added: geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/EJBStatsImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/EJBStatsImpl.java?view=auto&rev=502533
==============================================================================
--- geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/EJBStatsImpl.java (added)
+++ geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/EJBStatsImpl.java Fri Feb  2 00:41:53 2007
@@ -0,0 +1,50 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.management.stats;
+
+import javax.management.j2ee.statistics.CountStatistic;
+import javax.management.j2ee.statistics.EJBStats;
+
+/**
+ * Geronimo implementation of the JSR-77 EJBStats interface.
+ * 
+ * @version $Rev: 476049 $ $Date: 2006-11-16 20:35:17 -0800 (Thu, 16 Nov 2006) $
+ */
+public class EJBStatsImpl extends StatsImpl implements EJBStats {
+    private final CountStatisticImpl createCount;
+
+    private final CountStatisticImpl removeCount;
+
+    public EJBStatsImpl() {
+        createCount = new CountStatisticImpl("Bean Create Count",
+                StatisticImpl.UNIT_COUNT,
+                "Number of times the beans create method was called", 0);
+        removeCount = new CountStatisticImpl("Bean Remove Count",
+                StatisticImpl.UNIT_COUNT,
+                "Number of times the beans remove method was called", 0);
+        addStat("CreateCount", createCount);
+        addStat("RemoveCount", removeCount);
+    }
+
+    public CountStatistic getCreateCount() {
+        return createCount;
+    }
+
+    public CountStatistic getRemoveCount() {
+        return removeCount;
+    }
+}

Added: geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/EntityBeanStatsImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/EntityBeanStatsImpl.java?view=auto&rev=502533
==============================================================================
--- geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/EntityBeanStatsImpl.java (added)
+++ geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/EntityBeanStatsImpl.java Fri Feb  2 00:41:53 2007
@@ -0,0 +1,51 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.management.stats;
+
+import javax.management.j2ee.statistics.EntityBeanStats;
+import javax.management.j2ee.statistics.RangeStatistic;
+
+/**
+ * Geronimo implementation of the JSR-77 EntityBeanStats interface.
+ * 
+ * @version $Rev: 476049 $ $Date: 2006-11-16 20:35:17 -0800 (Thu, 16 Nov 2006) $
+ */
+public class EntityBeanStatsImpl extends EJBStatsImpl implements
+        EntityBeanStats {
+    private final RangeStatisticImpl readyCount;
+
+    private final RangeStatisticImpl pooledCount;
+
+    public EntityBeanStatsImpl() {
+        readyCount = new RangeStatisticImpl("Ready Count",
+                StatisticImpl.UNIT_COUNT,
+                "Number of bean instances in the ready state", 0);
+        pooledCount = new RangeStatisticImpl("Pooled Count",
+                StatisticImpl.UNIT_COUNT,
+                "Number of bean instances in the pooled state", 0);
+        addStat("ReadyCount", readyCount);
+        addStat("PooledCount", readyCount);
+    }
+
+    public RangeStatistic getReadyCount() {
+        return readyCount;
+    }
+
+    public RangeStatistic getPooledCount() {
+        return pooledCount;
+    }
+}

Added: geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JCAConnectionPoolStatsImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JCAConnectionPoolStatsImpl.java?view=auto&rev=502533
==============================================================================
--- geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JCAConnectionPoolStatsImpl.java (added)
+++ geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JCAConnectionPoolStatsImpl.java Fri Feb  2 00:41:53 2007
@@ -0,0 +1,81 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.management.stats;
+
+import javax.management.j2ee.statistics.BoundedRangeStatistic;
+import javax.management.j2ee.statistics.CountStatistic;
+import javax.management.j2ee.statistics.JCAConnectionPoolStats;
+import javax.management.j2ee.statistics.RangeStatistic;
+
+/**
+ * Geronimo implementation of the JSR-77 JCAConnectionPoolStats interface.
+ * 
+ * @version $Rev: 476049 $ $Date: 2006-11-16 20:35:17 -0800 (Thu, 16 Nov 2006) $
+ */
+public class JCAConnectionPoolStatsImpl extends JCAConnectionStatsImpl
+        implements JCAConnectionPoolStats {
+    private final CountStatisticImpl closeCount;
+
+    private final CountStatisticImpl createCount;
+
+    private final BoundedRangeStatisticImpl freePoolSize;
+
+    private final BoundedRangeStatisticImpl poolSize;
+
+    private final RangeStatisticImpl waitingThreadCount;
+
+    public JCAConnectionPoolStatsImpl() {
+        closeCount = new CountStatisticImpl("Close Count",
+                StatisticImpl.UNIT_COUNT, "Number of connections closed");
+        createCount = new CountStatisticImpl("Create Count",
+                StatisticImpl.UNIT_COUNT, "Number of connections created");
+        freePoolSize = new BoundedRangeStatisticImpl("Free Pool Size",
+                StatisticImpl.UNIT_COUNT,
+                "Number of free connections in the pool");
+        poolSize = new BoundedRangeStatisticImpl("Pool Size",
+                StatisticImpl.UNIT_COUNT, "Size of the connection pool");
+        waitingThreadCount = new RangeStatisticImpl("Waiting Thread Count",
+                StatisticImpl.UNIT_COUNT,
+                "Number of threads waiting for a connection");
+
+        addStat("CloseCount", closeCount);
+        addStat("CreateCount", createCount);
+        addStat("FreePoolSize", freePoolSize);
+        addStat("PoolSize", poolSize);
+        addStat("WaitingThreadCount", waitingThreadCount);
+    }
+
+    public CountStatistic getCloseCount() {
+        return closeCount;
+    }
+
+    public CountStatistic getCreateCount() {
+        return createCount;
+    }
+
+    public BoundedRangeStatistic getFreePoolSize() {
+        return freePoolSize;
+    }
+
+    public BoundedRangeStatistic getPoolSize() {
+        return poolSize;
+    }
+
+    public RangeStatistic getWaitingThreadCount() {
+        return waitingThreadCount;
+    }
+}

Added: geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JCAConnectionStatsImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JCAConnectionStatsImpl.java?view=auto&rev=502533
==============================================================================
--- geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JCAConnectionStatsImpl.java (added)
+++ geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JCAConnectionStatsImpl.java Fri Feb  2 00:41:53 2007
@@ -0,0 +1,63 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.management.stats;
+
+import javax.management.j2ee.statistics.JCAConnectionStats;
+import javax.management.j2ee.statistics.TimeStatistic;
+
+/**
+ * Geronimo implementation of the JSR-77 JCAConnectionStats interface.
+ * 
+ * @version $Rev: 476049 $ $Date: 2006-11-16 20:35:17 -0800 (Thu, 16 Nov 2006) $
+ */
+public class JCAConnectionStatsImpl extends StatsImpl implements
+        JCAConnectionStats {
+    private String connectionFactory;
+
+    private String managedConnectionFactory;
+
+    private final TimeStatisticImpl waitTime;
+
+    private final TimeStatisticImpl useTime;
+
+    public JCAConnectionStatsImpl() {
+        waitTime = new TimeStatisticImpl("Passive Count",
+                StatisticImpl.UNIT_TIME_MILLISECOND,
+                "Time spent waiting for a connection to be available");
+        useTime = new TimeStatisticImpl("Passive Count",
+                StatisticImpl.UNIT_TIME_MILLISECOND,
+                "Time spent using a connection");
+        addStat("WaitTime", waitTime);
+        addStat("UseTime", useTime);
+    }
+
+    public String getConnectionFactory() {
+        return connectionFactory;
+    }
+
+    public String getManagedConnectionFactory() {
+        return managedConnectionFactory;
+    }
+
+    public TimeStatistic getWaitTime() {
+        return waitTime;
+    }
+
+    public TimeStatistic getUseTime() {
+        return useTime;
+    }
+}

Added: geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JCAStatsImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JCAStatsImpl.java?view=auto&rev=502533
==============================================================================
--- geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JCAStatsImpl.java (added)
+++ geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JCAStatsImpl.java Fri Feb  2 00:41:53 2007
@@ -0,0 +1,43 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.management.stats;
+
+import javax.management.j2ee.statistics.JCAConnectionPoolStats;
+import javax.management.j2ee.statistics.JCAConnectionStats;
+import javax.management.j2ee.statistics.JCAStats;
+
+/**
+ * Geronimo implementation of the JSR-77 JCAStats interface.
+ * 
+ * @version $Rev: 476049 $ $Date: 2006-11-16 20:35:17 -0800 (Thu, 16 Nov 2006) $
+ */
+public class JCAStatsImpl extends StatsImpl implements JCAStats {
+    private JCAConnectionStats[] connectionsStats;
+
+    private JCAConnectionPoolStats[] connectionPoolsStats;
+
+    public JCAStatsImpl() {
+    }
+
+    public JCAConnectionStats[] getConnections() {
+        return connectionsStats;
+    }
+
+    public JCAConnectionPoolStats[] getConnectionPools() {
+        return connectionPoolsStats;
+    }
+}

Added: geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JDBCConnectionPoolStatsImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JDBCConnectionPoolStatsImpl.java?view=auto&rev=502533
==============================================================================
--- geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JDBCConnectionPoolStatsImpl.java (added)
+++ geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JDBCConnectionPoolStatsImpl.java Fri Feb  2 00:41:53 2007
@@ -0,0 +1,81 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.management.stats;
+
+import javax.management.j2ee.statistics.BoundedRangeStatistic;
+import javax.management.j2ee.statistics.CountStatistic;
+import javax.management.j2ee.statistics.JDBCConnectionPoolStats;
+import javax.management.j2ee.statistics.RangeStatistic;
+
+/**
+ * Geronimo implementation of the JSR-77 JDBCConnectionPoolStats interface.
+ * 
+ * @version $Rev: 476049 $ $Date: 2006-11-16 20:35:17 -0800 (Thu, 16 Nov 2006) $
+ */
+public class JDBCConnectionPoolStatsImpl extends JDBCConnectionStatsImpl
+        implements JDBCConnectionPoolStats {
+    private final CountStatisticImpl closeCount;
+
+    private final CountStatisticImpl createCount;
+
+    private final BoundedRangeStatisticImpl freePoolSize;
+
+    private final BoundedRangeStatisticImpl poolSize;
+
+    private final RangeStatisticImpl waitingThreadCount;
+
+    public JDBCConnectionPoolStatsImpl() {
+        closeCount = new CountStatisticImpl("Close Count",
+                StatisticImpl.UNIT_COUNT, "Number of connections closed");
+        createCount = new CountStatisticImpl("Create Count",
+                StatisticImpl.UNIT_COUNT, "Number of connections created");
+        freePoolSize = new BoundedRangeStatisticImpl("Free Pool Size",
+                StatisticImpl.UNIT_COUNT,
+                "Number of free connections in the pool");
+        poolSize = new BoundedRangeStatisticImpl("Pool Size",
+                StatisticImpl.UNIT_COUNT, "Size of the connection pool");
+        waitingThreadCount = new RangeStatisticImpl("Waiting Thread Count",
+                StatisticImpl.UNIT_COUNT,
+                "Number of threads waiting for a connection");
+
+        addStat("CloseCount", closeCount);
+        addStat("CreateCount", createCount);
+        addStat("FreePoolSize", freePoolSize);
+        addStat("PoolSize", poolSize);
+        addStat("WaitingThreadCount", waitingThreadCount);
+    }
+
+    public CountStatistic getCloseCount() {
+        return closeCount;
+    }
+
+    public CountStatistic getCreateCount() {
+        return createCount;
+    }
+
+    public BoundedRangeStatistic getFreePoolSize() {
+        return freePoolSize;
+    }
+
+    public BoundedRangeStatistic getPoolSize() {
+        return poolSize;
+    }
+
+    public RangeStatistic getWaitingThreadCount() {
+        return waitingThreadCount;
+    }
+}

Added: geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JDBCConnectionStatsImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JDBCConnectionStatsImpl.java?view=auto&rev=502533
==============================================================================
--- geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JDBCConnectionStatsImpl.java (added)
+++ geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JDBCConnectionStatsImpl.java Fri Feb  2 00:41:53 2007
@@ -0,0 +1,57 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.management.stats;
+
+import javax.management.j2ee.statistics.JDBCConnectionStats;
+import javax.management.j2ee.statistics.TimeStatistic;
+
+/**
+ * Geronimo implementation of the JSR-77 JDBCConnectionStats interface.
+ * 
+ * @version $Rev: 476049 $ $Date: 2006-11-16 20:35:17 -0800 (Thu, 16 Nov 2006) $
+ */
+public class JDBCConnectionStatsImpl extends StatsImpl implements
+        JDBCConnectionStats {
+    private String jdbcDataSource;
+
+    private final TimeStatisticImpl waitTime;
+
+    private final TimeStatisticImpl useTime;
+
+    public JDBCConnectionStatsImpl() {
+        waitTime = new TimeStatisticImpl("Passive Count",
+                StatisticImpl.UNIT_TIME_MILLISECOND,
+                "Time spent waiting for a connection to be available");
+        useTime = new TimeStatisticImpl("Passive Count",
+                StatisticImpl.UNIT_TIME_MILLISECOND,
+                "Time spent using a connection");
+        addStat("WaitTime", waitTime);
+        addStat("UseTime", useTime);
+    }
+
+    public String getJdbcDataSource() {
+        return jdbcDataSource;
+    }
+
+    public TimeStatistic getWaitTime() {
+        return waitTime;
+    }
+
+    public TimeStatistic getUseTime() {
+        return useTime;
+    }
+}

Added: geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JDBCStatsImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JDBCStatsImpl.java?view=auto&rev=502533
==============================================================================
--- geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JDBCStatsImpl.java (added)
+++ geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JDBCStatsImpl.java Fri Feb  2 00:41:53 2007
@@ -0,0 +1,43 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.management.stats;
+
+import javax.management.j2ee.statistics.JDBCConnectionPoolStats;
+import javax.management.j2ee.statistics.JDBCConnectionStats;
+import javax.management.j2ee.statistics.JDBCStats;
+
+/**
+ * Geronimo implementation of the JSR-77 JDBCStats interface.
+ * 
+ * @version $Rev: 476049 $ $Date: 2006-11-16 20:35:17 -0800 (Thu, 16 Nov 2006) $
+ */
+public class JDBCStatsImpl extends StatsImpl implements JDBCStats {
+    private JDBCConnectionStats[] connections;
+
+    private JDBCConnectionPoolStats[] connectionPools;
+
+    public JDBCStatsImpl() {
+    }
+
+    public JDBCConnectionStats[] getConnections() {
+        return connections;
+    }
+
+    public JDBCConnectionPoolStats[] getConnectionPools() {
+        return connectionPools;
+    }
+}

Added: geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSConnectionStatsImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSConnectionStatsImpl.java?view=auto&rev=502533
==============================================================================
--- geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSConnectionStatsImpl.java (added)
+++ geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSConnectionStatsImpl.java Fri Feb  2 00:41:53 2007
@@ -0,0 +1,43 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.management.stats;
+
+import javax.management.j2ee.statistics.JMSConnectionStats;
+import javax.management.j2ee.statistics.JMSSessionStats;
+
+/**
+ * Geronimo implementation of the JSR-77 JMSConnectionStats interface.
+ * 
+ * @version $Rev: 476049 $ $Date: 2006-11-16 20:35:17 -0800 (Thu, 16 Nov 2006) $
+ */
+public class JMSConnectionStatsImpl extends StatsImpl implements
+        JMSConnectionStats {
+    private JMSSessionStats[] sessionsStats;
+
+    private boolean transactional;
+
+    public JMSConnectionStatsImpl() {
+    }
+
+    public JMSSessionStats[] getSessions() {
+        return sessionsStats;
+    }
+
+    public boolean isTransactional() {
+        return transactional;
+    }
+}

Added: geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSConsumerStatsImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSConsumerStatsImpl.java?view=auto&rev=502533
==============================================================================
--- geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSConsumerStatsImpl.java (added)
+++ geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSConsumerStatsImpl.java Fri Feb  2 00:41:53 2007
@@ -0,0 +1,36 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.management.stats;
+
+import javax.management.j2ee.statistics.JMSConsumerStats;
+
+/**
+ * Geronimo implementation of the JSR-77 JMSConsumerStats interface.
+ * 
+ * @version $Rev: 476049 $ $Date: 2006-11-16 20:35:17 -0800 (Thu, 16 Nov 2006) $
+ */
+public class JMSConsumerStatsImpl extends JMSEndpointStatsImpl implements
+        JMSConsumerStats {
+    private String origin;
+
+    public JMSConsumerStatsImpl() {
+    }
+
+    public String getOrigin() {
+        return origin;
+    }
+}

Added: geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSEndpointStatsImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSEndpointStatsImpl.java?view=auto&rev=502533
==============================================================================
--- geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSEndpointStatsImpl.java (added)
+++ geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSEndpointStatsImpl.java Fri Feb  2 00:41:53 2007
@@ -0,0 +1,70 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.management.stats;
+
+import javax.management.j2ee.statistics.CountStatistic;
+import javax.management.j2ee.statistics.JMSEndpointStats;
+import javax.management.j2ee.statistics.TimeStatistic;
+
+/**
+ * Geronimo implementation of the JSR-77 JMSEndpointStats interface.
+ * 
+ * @version $Rev: 476049 $ $Date: 2006-11-16 20:35:17 -0800 (Thu, 16 Nov 2006) $
+ */
+public class JMSEndpointStatsImpl extends StatsImpl implements JMSEndpointStats {
+    private final CountStatisticImpl messageCount;
+
+    private final CountStatisticImpl pendingMessageCount;
+
+    private final CountStatisticImpl expiredMessageCount;
+
+    private final TimeStatisticImpl messageWaitTime;
+
+    public JMSEndpointStatsImpl() {
+        messageCount = new CountStatisticImpl("Message Count",
+                StatisticImpl.UNIT_COUNT, "Number of messages sent or received");
+        pendingMessageCount = new CountStatisticImpl("Pending Message Count",
+                StatisticImpl.UNIT_COUNT, "Number of pending messages");
+        expiredMessageCount = new CountStatisticImpl("Expired Message Count",
+                StatisticImpl.UNIT_COUNT,
+                "Number of messages that expired before delivery");
+        messageWaitTime = new TimeStatisticImpl("Message Wait Time",
+                StatisticImpl.UNIT_COUNT,
+                "Time spent by a message before being delivered");
+
+        addStat("MessageCount", messageCount);
+        addStat("PendingMessageCount", pendingMessageCount);
+        addStat("ExpiredMessageCount", expiredMessageCount);
+        addStat("MessageWaitTime", messageWaitTime);
+    }
+
+    public CountStatistic getMessageCount() {
+        return messageCount;
+    }
+
+    public CountStatistic getPendingMessageCount() {
+        return pendingMessageCount;
+    }
+
+    public CountStatistic getExpiredMessageCount() {
+        return messageCount;
+    }
+
+    public TimeStatistic getMessageWaitTime() {
+        return messageWaitTime;
+    }
+}

Added: geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSProducerStatsImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSProducerStatsImpl.java?view=auto&rev=502533
==============================================================================
--- geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSProducerStatsImpl.java (added)
+++ geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSProducerStatsImpl.java Fri Feb  2 00:41:53 2007
@@ -0,0 +1,36 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.management.stats;
+
+import javax.management.j2ee.statistics.JMSProducerStats;
+
+/**
+ * Geronimo implementation of the JSR-77 JMSProducerStats interface.
+ * 
+ * @version $Rev: 476049 $ $Date: 2006-11-16 20:35:17 -0800 (Thu, 16 Nov 2006) $
+ */
+public class JMSProducerStatsImpl extends JMSEndpointStatsImpl implements
+        JMSProducerStats {
+    private String destination;
+
+    public JMSProducerStatsImpl() {
+    }
+
+    public String getDestination() {
+        return destination;
+    }
+}

Added: geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSSessionStatsImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSSessionStatsImpl.java?view=auto&rev=502533
==============================================================================
--- geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSSessionStatsImpl.java (added)
+++ geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSSessionStatsImpl.java Fri Feb  2 00:41:53 2007
@@ -0,0 +1,93 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.management.stats;
+
+import javax.management.j2ee.statistics.CountStatistic;
+import javax.management.j2ee.statistics.JMSConsumerStats;
+import javax.management.j2ee.statistics.JMSProducerStats;
+import javax.management.j2ee.statistics.JMSSessionStats;
+import javax.management.j2ee.statistics.TimeStatistic;
+
+/**
+ * Geronimo implementation of the JSR-77 JMSSessionStats interface.
+ * 
+ * @version $Rev: 476049 $ $Date: 2006-11-16 20:35:17 -0800 (Thu, 16 Nov 2006) $
+ */
+public class JMSSessionStatsImpl extends StatsImpl implements JMSSessionStats {
+    private JMSProducerStats[] producersStats;
+
+    private JMSConsumerStats[] consumersStats;
+
+    private final CountStatisticImpl messageCount;
+
+    private final CountStatisticImpl pendingMessageCount;
+
+    private final CountStatisticImpl expiredMessageCount;
+
+    private final CountStatisticImpl durableSubscriptionCount;
+
+    private final TimeStatisticImpl messageWaitTime;
+
+    public JMSSessionStatsImpl() {
+        messageCount = new CountStatisticImpl("Message Count",
+                StatisticImpl.UNIT_COUNT, "Number of messages exchanged");
+        pendingMessageCount = new CountStatisticImpl("Pending Message Count",
+                StatisticImpl.UNIT_COUNT, "Number of pending messages");
+        expiredMessageCount = new CountStatisticImpl("Expired Message Count",
+                StatisticImpl.UNIT_COUNT, "Number of expired messages");
+        durableSubscriptionCount = new CountStatisticImpl(
+                "Durable Subscription Count", StatisticImpl.UNIT_COUNT,
+                "Number of durable subscriptions");
+        messageWaitTime = new TimeStatisticImpl("Message Wait Time",
+                StatisticImpl.UNIT_COUNT,
+                "Time spent by a message before being delivered");
+
+        addStat("MessageCount", messageCount);
+        addStat("PendingMessageCount", pendingMessageCount);
+        addStat("ExpiredMessageCount", expiredMessageCount);
+        addStat("DurableSubscriptionCount", durableSubscriptionCount);
+        addStat("MessageWaitTime", messageWaitTime);
+    }
+
+    public JMSProducerStats[] getProducers() {
+        return producersStats;
+    }
+
+    public JMSConsumerStats[] getConsumers() {
+        return consumersStats;
+    }
+
+    public CountStatistic getMessageCount() {
+        return messageCount;
+    }
+
+    public CountStatistic getPendingMessageCount() {
+        return pendingMessageCount;
+    }
+
+    public CountStatistic getExpiredMessageCount() {
+        return messageCount;
+    }
+
+    public CountStatistic getDurableSubscriptionCount() {
+        return durableSubscriptionCount;
+    }
+
+    public TimeStatistic getMessageWaitTime() {
+        return messageWaitTime;
+    }
+}

Added: geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSStatsImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSStatsImpl.java?view=auto&rev=502533
==============================================================================
--- geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSStatsImpl.java (added)
+++ geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JMSStatsImpl.java Fri Feb  2 00:41:53 2007
@@ -0,0 +1,36 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.management.stats;
+
+import javax.management.j2ee.statistics.JMSConnectionStats;
+import javax.management.j2ee.statistics.JMSStats;
+
+/**
+ * Geronimo implementation of the JSR-77 JMSStats interface.
+ * 
+ * @version $Rev: 476049 $ $Date: 2006-11-16 20:35:17 -0800 (Thu, 16 Nov 2006) $
+ */
+public class JMSStatsImpl extends StatsImpl implements JMSStats {
+    private JMSConnectionStats[] connections;
+
+    public JMSStatsImpl() {
+    }
+
+    public JMSConnectionStats[] getConnections() {
+        return connections;
+    }
+}

Added: geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JTAStatsImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JTAStatsImpl.java?view=auto&rev=502533
==============================================================================
--- geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JTAStatsImpl.java (added)
+++ geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JTAStatsImpl.java Fri Feb  2 00:41:53 2007
@@ -0,0 +1,57 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.management.stats;
+
+import javax.management.j2ee.statistics.CountStatistic;
+import javax.management.j2ee.statistics.JTAStats;
+
+/**
+ * Geronimo implementation of the JSR-77 JTAStats interface.
+ * 
+ * @version $Rev: 476049 $ $Date: 2006-11-16 20:35:17 -0800 (Thu, 16 Nov 2006) $
+ */
+public class JTAStatsImpl extends StatsImpl implements JTAStats {
+    private final CountStatisticImpl activeCount;
+
+    private final CountStatisticImpl committedCount;
+
+    private final CountStatisticImpl rolledbackCount;
+
+    public JTAStatsImpl() {
+        activeCount = new CountStatisticImpl("Active Count",
+                StatisticImpl.UNIT_COUNT, "Number of active transactions");
+        committedCount = new CountStatisticImpl("Committed Count",
+                StatisticImpl.UNIT_COUNT, "Number of committed transactions");
+        rolledbackCount = new CountStatisticImpl("Rolledback Count",
+                StatisticImpl.UNIT_COUNT, "Number of rolled-back transactions");
+        addStat("ActiveCount", activeCount);
+        addStat("CommittedCount", committedCount);
+        addStat("RolledbackCount", rolledbackCount);
+    }
+
+    public CountStatistic getActiveCount() {
+        return activeCount;
+    }
+
+    public CountStatistic getCommittedCount() {
+        return committedCount;
+    }
+
+    public CountStatistic getRolledbackCount() {
+        return rolledbackCount;
+    }
+}

Added: geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JavaMailStatsImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JavaMailStatsImpl.java?view=auto&rev=502533
==============================================================================
--- geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JavaMailStatsImpl.java (added)
+++ geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/JavaMailStatsImpl.java Fri Feb  2 00:41:53 2007
@@ -0,0 +1,39 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.management.stats;
+
+import javax.management.j2ee.statistics.CountStatistic;
+import javax.management.j2ee.statistics.JavaMailStats;
+
+/**
+ * Geronimo implementation of the JSR-77 JavaMailStats interface.
+ * 
+ * @version $Rev: 476049 $ $Date: 2006-11-16 20:35:17 -0800 (Thu, 16 Nov 2006) $
+ */
+public class JavaMailStatsImpl extends StatsImpl implements JavaMailStats {
+    private final CountStatisticImpl sentMailCount;
+
+    public JavaMailStatsImpl() {
+        sentMailCount = new CountStatisticImpl("Sent Mail Count",
+                StatisticImpl.UNIT_COUNT, "Number of mail messages sent");
+        addStat("SentMailCount", sentMailCount);
+    }
+
+    public CountStatistic getSentMailCount() {
+        return sentMailCount;
+    }
+}

Added: geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/MessageDrivenBeanStatsImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/MessageDrivenBeanStatsImpl.java?view=auto&rev=502533
==============================================================================
--- geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/MessageDrivenBeanStatsImpl.java (added)
+++ geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/MessageDrivenBeanStatsImpl.java Fri Feb  2 00:41:53 2007
@@ -0,0 +1,40 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.management.stats;
+
+import javax.management.j2ee.statistics.CountStatistic;
+import javax.management.j2ee.statistics.MessageDrivenBeanStats;
+
+/**
+ * Geronimo implementation of the JSR-77 MessageDrivenBeanStats interface.
+ * 
+ * @version $Rev: 476049 $ $Date: 2006-11-16 20:35:17 -0800 (Thu, 16 Nov 2006) $
+ */
+public class MessageDrivenBeanStatsImpl extends EJBStatsImpl implements
+        MessageDrivenBeanStats {
+    private final CountStatisticImpl messageCount;
+
+    public MessageDrivenBeanStatsImpl() {
+        messageCount = new CountStatisticImpl("Message Count",
+                StatisticImpl.UNIT_COUNT, "Number of messages received", 0);
+        addStat("MessageCount", messageCount);
+    }
+
+    public CountStatistic getMessageCount() {
+        return messageCount;
+    }
+}

Added: geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/ServletStatsImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/ServletStatsImpl.java?view=auto&rev=502533
==============================================================================
--- geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/ServletStatsImpl.java (added)
+++ geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/ServletStatsImpl.java Fri Feb  2 00:41:53 2007
@@ -0,0 +1,40 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.management.stats;
+
+import javax.management.j2ee.statistics.ServletStats;
+import javax.management.j2ee.statistics.TimeStatistic;
+
+/**
+ * Geronimo implementation of the JSR-77 ServletStats interface.
+ * 
+ * @version $Rev: 476049 $ $Date: 2006-11-16 20:35:17 -0800 (Thu, 16 Nov 2006) $
+ */
+public class ServletStatsImpl extends StatsImpl implements ServletStats {
+    private final TimeStatisticImpl serviceTime;
+
+    public ServletStatsImpl() {
+        serviceTime = new TimeStatisticImpl("Service Time",
+                StatisticImpl.UNIT_TIME_MILLISECOND,
+                "Execution time of the servlets service method");
+        addStat("ServiceTime", serviceTime);
+    }
+
+    public TimeStatistic getServiceTime() {
+        return serviceTime;
+    }
+}

Added: geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/SessionBeanStatsImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/SessionBeanStatsImpl.java?view=auto&rev=502533
==============================================================================
--- geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/SessionBeanStatsImpl.java (added)
+++ geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/SessionBeanStatsImpl.java Fri Feb  2 00:41:53 2007
@@ -0,0 +1,41 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.management.stats;
+
+import javax.management.j2ee.statistics.RangeStatistic;
+import javax.management.j2ee.statistics.SessionBeanStats;
+
+/**
+ * Geronimo implementation of the JSR-77 SessionBeanStats interface.
+ * 
+ * @version $Rev: 476049 $ $Date: 2006-11-16 20:35:17 -0800 (Thu, 16 Nov 2006) $
+ */
+public class SessionBeanStatsImpl extends EJBStatsImpl implements
+        SessionBeanStats {
+    private final RangeStatisticImpl methodReadyCount;
+
+    public SessionBeanStatsImpl() {
+        methodReadyCount = new RangeStatisticImpl("Method Ready Count",
+                StatisticImpl.UNIT_COUNT,
+                "Number of beans in the method-ready state", 0);
+        addStat("MethodReadyCount", methodReadyCount);
+    }
+
+    public RangeStatistic getMethodReadyCount() {
+        return methodReadyCount;
+    }
+}

Added: geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/StatefulSessionBeanStatsImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/StatefulSessionBeanStatsImpl.java?view=auto&rev=502533
==============================================================================
--- geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/StatefulSessionBeanStatsImpl.java (added)
+++ geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/StatefulSessionBeanStatsImpl.java Fri Feb  2 00:41:53 2007
@@ -0,0 +1,41 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.management.stats;
+
+import javax.management.j2ee.statistics.RangeStatistic;
+import javax.management.j2ee.statistics.StatefulSessionBeanStats;
+
+/**
+ * Geronimo implementation of the JSR-77 StatefulSessionBeanStats interface.
+ * 
+ * @version $Rev: 476049 $ $Date: 2006-11-16 20:35:17 -0800 (Thu, 16 Nov 2006) $
+ */
+public class StatefulSessionBeanStatsImpl extends SessionBeanStatsImpl
+        implements StatefulSessionBeanStats {
+    private final RangeStatisticImpl passiveCount;
+
+    public StatefulSessionBeanStatsImpl() {
+        passiveCount = new RangeStatisticImpl("Passive Count",
+                StatisticImpl.UNIT_COUNT,
+                "Number of beans that are in the passivated state", 0);
+        addStat("PassiveCount", passiveCount);
+    }
+
+    public RangeStatistic getPassiveCount() {
+        return passiveCount;
+    }
+}

Added: geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/StatelessSessionBeanStatsImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/StatelessSessionBeanStatsImpl.java?view=auto&rev=502533
==============================================================================
--- geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/StatelessSessionBeanStatsImpl.java (added)
+++ geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/StatelessSessionBeanStatsImpl.java Fri Feb  2 00:41:53 2007
@@ -0,0 +1,30 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.management.stats;
+
+import javax.management.j2ee.statistics.StatelessSessionBeanStats;
+
+/**
+ * Geronimo implementation of the JSR-77 StatelessSessionBeanStats interface.
+ * 
+ * @version $Rev: 476049 $ $Date: 2006-11-16 20:35:17 -0800 (Thu, 16 Nov 2006) $
+ */
+public class StatelessSessionBeanStatsImpl extends SessionBeanStatsImpl
+        implements StatelessSessionBeanStats {
+    public StatelessSessionBeanStatsImpl() {
+    }
+}

Added: geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/URLStatsImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/URLStatsImpl.java?view=auto&rev=502533
==============================================================================
--- geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/URLStatsImpl.java (added)
+++ geronimo/server/trunk/modules/geronimo-management/src/main/java/org/apache/geronimo/management/stats/URLStatsImpl.java Fri Feb  2 00:41:53 2007
@@ -0,0 +1,29 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.management.stats;
+
+import javax.management.j2ee.statistics.URLStats;
+
+/**
+ * Geronimo implementation of the JSR-77 URLStats interface.
+ * 
+ * @version $Rev: 476049 $ $Date: 2006-11-16 20:35:17 -0800 (Thu, 16 Nov 2006) $
+ */
+public class URLStatsImpl extends StatsImpl implements URLStats {
+    public URLStatsImpl() {
+    }
+}



Mime
View raw message