geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwo...@apache.org
Subject svn commit: r814992 - in /geronimo/server/branches/2.2/plugins/openejb/openejb-portlets/src/main: java/org/apache/geronimo/console/ejbserver/ webapp/WEB-INF/ webapp/WEB-INF/view/ejbserver/
Date Tue, 15 Sep 2009 05:18:47 GMT
Author: rwonly
Date: Tue Sep 15 05:18:46 2009
New Revision: 814992

URL: http://svn.apache.org/viewvc?rev=814992&view=rev
Log:
GERONIMO-4790 Migrate debug-views code to base on the up-to-date dojo: Sub-task 3

Removed:
    geronimo/server/branches/2.2/plugins/openejb/openejb-portlets/src/main/java/org/apache/geronimo/console/ejbserver/Tree.java
    geronimo/server/branches/2.2/plugins/openejb/openejb-portlets/src/main/java/org/apache/geronimo/console/ejbserver/TreeEntry.java
Modified:
    geronimo/server/branches/2.2/plugins/openejb/openejb-portlets/src/main/java/org/apache/geronimo/console/ejbserver/EjbHelper.java
    geronimo/server/branches/2.2/plugins/openejb/openejb-portlets/src/main/webapp/WEB-INF/view/ejbserver/view.jsp
    geronimo/server/branches/2.2/plugins/openejb/openejb-portlets/src/main/webapp/WEB-INF/web.xml

Modified: geronimo/server/branches/2.2/plugins/openejb/openejb-portlets/src/main/java/org/apache/geronimo/console/ejbserver/EjbHelper.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/openejb/openejb-portlets/src/main/java/org/apache/geronimo/console/ejbserver/EjbHelper.java?rev=814992&r1=814991&r2=814992&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/openejb/openejb-portlets/src/main/java/org/apache/geronimo/console/ejbserver/EjbHelper.java
(original)
+++ geronimo/server/branches/2.2/plugins/openejb/openejb-portlets/src/main/java/org/apache/geronimo/console/ejbserver/EjbHelper.java
Tue Sep 15 05:18:46 2009
@@ -17,13 +17,13 @@
 package org.apache.geronimo.console.ejbserver;
 
 import java.lang.reflect.Method;
+import java.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
 import java.util.TreeMap;
-import java.text.MessageFormat;
 
 import javax.servlet.http.HttpServletRequest;
 
@@ -31,6 +31,8 @@
 import org.apache.geronimo.console.message.CommonMessage;
 import org.apache.geronimo.console.message.JSCommonMessage;
 import org.apache.geronimo.console.util.KernelManagementHelper;
+import org.apache.geronimo.console.util.Tree;
+import org.apache.geronimo.console.util.TreeEntry;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.GAttributeInfo;
@@ -53,7 +55,6 @@
 import org.apache.openejb.assembler.classic.OpenEjbConfiguration;
 import org.apache.openejb.loader.SystemInstance;
 import org.apache.openejb.spi.ContainerSystem;
-import org.apache.openejb.util.Duration;
 import org.directwebremoting.annotations.RemoteMethod;
 import org.directwebremoting.annotations.RemoteProxy;
 import org.slf4j.Logger;
@@ -134,23 +135,20 @@
             container = containerSystem.getContainer(containerInfo.id);
             List<TreeEntry> containers = null;
             if (containerMap.get(container.getContainerType()) != null) {
-                containerTypesEntry = containerMap.get(container
-                        .getContainerType());
+                containerTypesEntry = containerMap.get(container.getContainerType());
                 containers = containerTypesEntry.getChildren();
             } else {
                 containerTypesEntry = new TreeEntry();
-                containerTypesEntry.setName(resolveContainerTypes(container
-                        .getContainerType()));
-                containerTypesEntry.setValue(containerTypesEntry.getName());
+                containerTypesEntry.setName(resolveContainerTypes(container.getContainerType()));
+                containerTypesEntry.setValues(new String[]{containerTypesEntry.getName()});
                 containers = new ArrayList<TreeEntry>();
                 containerTypesEntry.setChildren(containers);
-                containerMap.put(container.getContainerType(),
-                        containerTypesEntry);
+                containerMap.put(container.getContainerType(),containerTypesEntry);
                 entries.add(containerTypesEntry);
             }
             containersEntry = new TreeEntry();
             containersEntry.setName(containerInfo.id);
-            containersEntry.setValue(containerInfo.id);
+            containersEntry.setValues(new String[]{containerInfo.id});
 
             DeploymentInfo[] deployments = container.deployments();
             containersEntry.setChildren(getDeployments(deployments));
@@ -160,15 +158,15 @@
         return tree;
     }
 
-    public List getDeployments(DeploymentInfo[] deploymentInfos) {
+    public List<TreeEntry> getDeployments(DeploymentInfo[] deploymentInfos) {
         List<TreeEntry> deployments = new ArrayList<TreeEntry>();
         TreeEntry deploymentsEntry = null;
         for (DeploymentInfo deployment : deploymentInfos) {
             deploymentsEntry = new TreeEntry();
             deploymentsEntry.setName(deployment.getEjbName());
-            deploymentsEntry.setValue(deployment.getContainer()
-                    .getContainerID()
-                    + "#^~" + deployment.getDeploymentID());
+            deploymentsEntry.setValues(new String[]{
+                    deployment.getContainer().getContainerID().toString(),
+                    deployment.getDeploymentID().toString()});
             deploymentsEntry.setChildren(new ArrayList<TreeEntry>());
             deployments.add(deploymentsEntry);
         }
@@ -318,9 +316,8 @@
             OpenEjbSystem openEjbSystem = null;
             AbstractNameQuery absQuery = new AbstractNameQuery(
                     OpenEjbSystem.class.getName());
-            Set systemGBeans = kernel.listGBeans(absQuery);
-            for (Object obj : systemGBeans) {
-            	AbstractName absName = (AbstractName) obj;
+            Set<AbstractName> systemGBeans = kernel.listGBeans(absQuery);
+            for (AbstractName absName : systemGBeans) {
                 openEjbSystem = kernel.getProxyManager()
                         .createProxy(absName, OpenEjbSystem.class);
                 props = openEjbSystem.getProperties();
@@ -335,13 +332,11 @@
         } else {
             AbstractNameQuery absQuery = new AbstractNameQuery(
                     EjbContainer.class.getName());
-            Set containerGBeans = kernel.listGBeans(absQuery);
-            for (Object obj : containerGBeans) {
+            Set<AbstractName> containerGBeans = kernel.listGBeans(absQuery);
+            for (AbstractName absName : containerGBeans) {
                 try {
-                    String id = (String) kernel.getAttribute(
-                            (AbstractName) obj, "id");
+                    String id = (String) kernel.getAttribute(absName, "id");
                     if (containerId.equals(id)) {
-                        AbstractName absName = (AbstractName) obj;
                         GBeanData gData1  = kernel.getGBeanData(absName);
                         ManageableAttributeStore attributeStore = kernel.getGBean(ManageableAttributeStore.class);
                       
                         GBeanData gData  = getGBeanDataFromConfiguration(absName);
@@ -420,11 +415,9 @@
             information = new EjbInformation();
             Class cls = null;
             try {
-                cls = Class
-                        .forName("org.apache.openejb.assembler.classic.JndiBuilder$Bindings");
+                cls = Class.forName("org.apache.openejb.assembler.classic.JndiBuilder$Bindings");
                 Method method = cls.getMethod("getBindings");
-                List<String> jndiNames = (List) method.invoke(deploymentInfo
-                        .get(cls));
+                List<String> jndiNames = (List) method.invoke(deploymentInfo.get(cls));
                 StringBuffer names = new StringBuffer();
                 for (String jndiName : jndiNames) {
                     if (jndiName.startsWith("openejb/local/")) {
@@ -519,19 +512,19 @@
     private GBeanData getOpenEJBPropertiesGBean(String containerId, Class query) {
         GBeanData data = null;
         AbstractNameQuery absQuery = new AbstractNameQuery(query.getName());
-        Set containerGBeans = kernel.listGBeans(absQuery);
-        for (Object obj : containerGBeans) {
+        Set<AbstractName> containerGBeans = kernel.listGBeans(absQuery);
+        for (AbstractName absName : containerGBeans) {
             try {
-                data = kernel.getGBeanData((AbstractName) obj);
+                data = kernel.getGBeanData(absName);
             } catch (GBeanNotFoundException e) {
                 log.error(MessageFormat.format("GBeanNotFoundException for GBean Name: {0}"
-                        , (AbstractName) obj), e);
+                        , absName), e);
             } catch (InternalKernelException e) {
                 log.error(MessageFormat.format("InternalKernelException for GBean Name: {0}"
-                        , (AbstractName) obj), e);
+                        , absName), e);
             } catch (IllegalStateException e) {
                 log.error(MessageFormat.format("IllegalStateException for GBean Name: {0}"
-                        , (AbstractName) obj), e);
+                        , absName), e);
             }
             if (containerId.equals(EjbContainer.getId(data.getAbstractName()))
                     || query == OpenEjbSystem.class) {

Modified: geronimo/server/branches/2.2/plugins/openejb/openejb-portlets/src/main/webapp/WEB-INF/view/ejbserver/view.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/openejb/openejb-portlets/src/main/webapp/WEB-INF/view/ejbserver/view.jsp?rev=814992&r1=814991&r2=814992&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/openejb/openejb-portlets/src/main/webapp/WEB-INF/view/ejbserver/view.jsp
(original)
+++ geronimo/server/branches/2.2/plugins/openejb/openejb-portlets/src/main/webapp/WEB-INF/view/ejbserver/view.jsp
Tue Sep 15 05:18:46 2009
@@ -157,7 +157,7 @@
 
 <div id="<portlet:namespace/>CommonMsgContainer"></div><br>
 
-  <div dojoType="dijit.tree.ForestStoreModel" jsId="storeModel" 
+<div dojoType="dijit.tree.ForestStoreModel" jsId="storeModel" 
 		store="serverStore" 
 		rootId="Ejb Containers" rootLabel="Ejb Containers" childrenAttrs="children"></div>
 
@@ -165,37 +165,33 @@
 <div dojoType="dijit.layout.LayoutContainer"  id="mainLayout" style="width: 100%; height:
700px;">
    <!-- Horizontal split container -->
     <div dojoType="dijit.layout.SplitContainer" orientation="horizontal" sizerWidth="1"
activeSizing="true" layoutAlign="client" style="width: 100%; height: 100%;" >
-       <div dojoType="dijit.layout.ContentPane" layoutAlign="left" style="background-color:white;
overflow: auto;" preload="true" widgetId="ejbcontainerTree" sizeShare="40" onLoad = displayTree
>       
-         <div class="soria" dojoType="dijit.Tree"  model="storeModel" openOnClick="false"
>
-	   <script type="dojo/method" event="onClick" args="item">
-			if(item.id!="Ejb Containers") {             	        
-		        var ids = serverStore.getValue(item, "value").split('#^~');
+       <div dojoType="dijit.layout.ContentPane" layoutAlign="left" style="background-color:white;
overflow: auto;" preload="true" widgetId="ejbcontainerTree" sizeShare="40">       
+         <div class="soria" dojoType="dijit.Tree" model="storeModel" openOnClick="false"
>
+	         <script type="dojo/method" event="onClick" args="item">
+			 if(item.id!="Ejb Containers") {             	        
+		        var ids = serverStore.getValues(item, "values");
 			    if(ids[1] != null) {
 		            EjbHelper.getDeploymentInfo(ids[0],ids[1],updateEjbInfoTable);		       
 			    } else {
 			        EjbHelper.getContainerInfo(ids[0],updateEjbInfoTable);
 			    }
-			} else {
+			 } else {
 			    dwr.util.removeAllRows('ejbInfoTableBody');
-			}
+			 }
              
-		</script> 
-	</div>
+		     </script> 
+	      </div>
       </div> 
 	
       <div id="infoTab" dojoType="dijit.layout.ContentPane" title="Ejb Info" label="Info"
sizeShare="60" style="background-color:white; overflow: auto;" layoutAlign="right" class="soria"
>
          <table id="ejbsTable",
-            tbodyClass="scrollContent" 
-            enableMultipleSelect="true" 
-            enableAlternateRows="true" 
-            rowAlternateClass="alternateRow" 
             cellpadding="0" 
             cellspacing="2" 
             border="0"
             width="100%">
             <thead>                      
-              <th field="Name" dataType="html" width="40%"><B>&nbsp;<fmt:message
key="portlet.openejb.view.name" />&nbsp;</B></th>
-              <th dataType="html" width="60%"><B>&nbsp;<fmt:message key="portlet.openejb.view.value"
/>&nbsp;</B></th>
+              <th width="40%"><B>&nbsp;<fmt:message key="portlet.openejb.view.name"
/>&nbsp;</B></th>
+              <th width="60%"><B>&nbsp;<fmt:message key="portlet.openejb.view.value"
/>&nbsp;</B></th>
             </thead>
             <tbody id="ejbInfoTableBody">
             </tbody>
@@ -203,4 +199,4 @@
       </div>
    </div>
 </div>   
-</div>
+

Modified: geronimo/server/branches/2.2/plugins/openejb/openejb-portlets/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/openejb/openejb-portlets/src/main/webapp/WEB-INF/web.xml?rev=814992&r1=814991&r2=814992&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/openejb/openejb-portlets/src/main/webapp/WEB-INF/web.xml
(original)
+++ geronimo/server/branches/2.2/plugins/openejb/openejb-portlets/src/main/webapp/WEB-INF/web.xml
Tue Sep 15 05:18:46 2009
@@ -40,10 +40,10 @@
       <init-param>
           <param-name>classes</param-name>
           <param-value>
+              org.apache.geronimo.console.ejbserver.EjbHelper,
               org.apache.geronimo.console.ejbserver.EjbInformation,
-	          org.apache.geronimo.console.ejbserver.TreeEntry,
-	          org.apache.geronimo.console.ejbserver.EjbHelper,
-              org.apache.geronimo.console.ejbserver.Tree,
+              org.apache.geronimo.console.util.Tree,
+              org.apache.geronimo.console.util.TreeEntry,
               org.apache.geronimo.console.message.JSCommonMessage
           </param-value>
       </init-param>



Mime
View raw message