[Jboss-cvs] JBossAS SVN: r56275 - trunk/testsuite/src/main/org/jboss/test/util

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Aug 25 14:28:50 EDT 2006


Author: scott.stark at jboss.org
Date: 2006-08-25 14:28:49 -0400 (Fri, 25 Aug 2006)
New Revision: 56275

Modified:
   trunk/testsuite/src/main/org/jboss/test/util/ServiceControllerUtil.java
Log:
Add a getStateString accessor

Modified: trunk/testsuite/src/main/org/jboss/test/util/ServiceControllerUtil.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/util/ServiceControllerUtil.java	2006-08-25 17:06:10 UTC (rev 56274)
+++ trunk/testsuite/src/main/org/jboss/test/util/ServiceControllerUtil.java	2006-08-25 18:28:49 UTC (rev 56275)
@@ -1,9 +1,24 @@
 /*
- * JBoss, the OpenSource J2EE webOS
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */ 
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
 package org.jboss.test.util;
 
 import javax.management.MBeanServerConnection;
@@ -17,7 +32,7 @@
  *  Utility class that can deal with the ServiceController to
  *  start/stop/create/destroy a service
  *  @author <a href="mailto:Anil.Saldhana at jboss.org">Anil Saldhana</a>
- *  @version $Revision$
+ *  @version $Revision:$
  *  @since  Aug 23, 2006
  */
 public class ServiceControllerUtil
@@ -31,7 +46,12 @@
       MBeanServerInvocationHandler.newProxyInstance(server, so,
                ServiceControllerMBean.class, false);
    }
-   
+
+   public String getStateString(ObjectName serviceName)
+   {
+      ServiceContext ctx = scmb.getServiceContext(serviceName);
+      return ctx.getStateString();
+   }
    public void createAService(ObjectName serviceOName) throws Exception
    { 
       scmb.create(serviceOName); 




More information about the jboss-cvs-commits mailing list