[jboss-cvs] JBossAS SVN: r100046 - trunk/profileservice/src/main/java/org/jboss/profileservice/web.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Jan 28 08:57:58 EST 2010
Author: emuckenhuber
Date: 2010-01-28 08:57:58 -0500 (Thu, 28 Jan 2010)
New Revision: 100046
Modified:
trunk/profileservice/src/main/java/org/jboss/profileservice/web/DebugServlet.java
Log:
update debug servlet
Modified: trunk/profileservice/src/main/java/org/jboss/profileservice/web/DebugServlet.java
===================================================================
--- trunk/profileservice/src/main/java/org/jboss/profileservice/web/DebugServlet.java 2010-01-28 13:30:59 UTC (rev 100045)
+++ trunk/profileservice/src/main/java/org/jboss/profileservice/web/DebugServlet.java 2010-01-28 13:57:58 UTC (rev 100046)
@@ -23,7 +23,6 @@
import java.io.IOException;
import java.io.PrintWriter;
-import java.util.Arrays;
import java.util.Map;
import java.util.Set;
@@ -39,6 +38,7 @@
import org.jboss.deployers.spi.management.ManagementView;
import org.jboss.managed.api.ManagedComponent;
import org.jboss.managed.api.ManagedDeployment;
+import org.jboss.profileservice.spi.ProfileService;
/**
* @author Scott.Stark at jboss.org
@@ -47,8 +47,11 @@
public class DebugServlet extends HttpServlet
{
private static final long serialVersionUID = 1;
- @Resource(mappedName="java:ManagementView")
+ @Resource(mappedName = "java:ProfileService")
+ private ProfileService ps;
+
private ManagementView mgtView;
+
enum Operations {
listDeploymentTree,
listOperations
@@ -61,15 +64,20 @@
super.init(config);
if(mgtView == null)
{
- try
+ if(ps == null)
{
- InitialContext ctx = new InitialContext();
- mgtView = (ManagementView) ctx.lookup("java:ManagementView");
+ try
+ {
+ InitialContext ctx = new InitialContext();
+ ps = (ProfileService) ctx.lookup("java:ProfileService");
+ }
+ catch (NamingException e)
+ {
+ throw new ServletException("Failed to lookup java:ProfileService", e);
+ }
}
- catch (NamingException e)
- {
- throw new ServletException("Failed to lookup ManagementView", e);
- }
+ this.mgtView = ps.getViewManager();
+
}
}
More information about the jboss-cvs-commits
mailing list