001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.resource.connectionmanager;
023:
024: import java.util.Map;
025:
026: import javax.management.ObjectName;
027:
028: import org.jboss.mx.util.ObjectNameFactory;
029: import org.jboss.system.ServiceMBean;
030:
031: /**
032: * MBean interface.
033: *
034: * @author <a href="mailto:adrian@jboss.com">Adrian Brock</a>
035: * @version $Revision: 57189 $
036: */
037: public interface CachedConnectionManagerMBean extends ServiceMBean {
038: public static final ObjectName OBJECT_NAME = ObjectNameFactory
039: .create("jboss.jca:service=CachedConnectionManager");
040:
041: /**
042: * Get the SpecCompliant value.
043: *
044: * @return the SpecCompliant value.
045: */
046: boolean isSpecCompliant();
047:
048: /**
049: * Set the SpecCompliant value.
050: *
051: * @param specCompliant The new SpecCompliant value.
052: */
053: void setSpecCompliant(boolean specCompliant);
054:
055: /**
056: * Get the debug value.
057: *
058: * @return the debug value.
059: */
060: boolean isDebug();
061:
062: /**
063: * Set the Debug value.
064: *
065: * @param value The new debug value.
066: */
067: void setDebug(boolean value);
068:
069: /**
070: * Get the error value.
071: *
072: * @return the error value.
073: */
074: boolean isError();
075:
076: /**
077: * Set the error value.
078: *
079: * @param value The new error value.
080: */
081: void setError(boolean value);
082:
083: /**
084: * Get the TransactionManagerServiceName value.
085: *
086: * @return the TransactionManagerServiceName value.
087: */
088: ObjectName getTransactionManagerServiceName();
089:
090: /**
091: * Set the TransactionManagerServiceName value.
092: *
093: * @param transactionManagerServiceName The new TransactionManagerServiceName value.
094: */
095: void setTransactionManagerServiceName(
096: ObjectName transactionManagerServiceName);
097:
098: /**
099: * The Instance attribute simply holds the current instance, which is normally the only instance of CachedConnectionManager.
100: *
101: * @return a <code>CachedConnectionManager</code> value
102: */
103: CachedConnectionManager getInstance();
104:
105: /**
106: * Get the inuse connections
107: *
108: * @return the number of inuse connections
109: */
110: int getInUseConnections();
111:
112: /**
113: * List the inuse connections
114: *
115: * @return a map of connections to allocation stack traces
116: */
117: Map listInUseConnections();
118: }
|