1 23 24 package com.sun.enterprise.tools.admingui.handlers; 25 26 import java.util.EventObject ; 27 28 import com.iplanet.jato.RequestContext; 29 import com.iplanet.jato.RequestManager; 30 import com.iplanet.jato.view.View; 31 32 import com.sun.enterprise.tools.guiframework.view.DescriptorContainerView; 33 import com.sun.enterprise.tools.guiframework.view.HandlerContext; 34 35 import com.sun.enterprise.tools.admingui.util.MBeanUtil; 36 import com.sun.enterprise.tools.admingui.util.Util; 37 38 39 42 public class PersistenceHandlers { 43 44 public void getConnectionPool(RequestContext ctx, HandlerContext handlerCtx) throws Exception { 45 View view = handlerCtx.getView(); 46 DescriptorContainerView descView = (DescriptorContainerView)(view.getParent()); 47 String objectName = (String ) handlerCtx.getInputValue("objectName"); 48 if (objectName == null) { 49 return; 50 } 51 if (Util.isLoggableFINEST()) { 52 Util.logFINEST("PM : objectname = " + objectName); 53 } 54 Object jdbcResource = MBeanUtil.getAttribute(objectName, "jdbc-resource-jndi-name"); 55 if (Util.isLoggableFINEST()) { 56 Util.logFINEST("PM : jdbc = " + jdbcResource); 57 } 58 if (jdbcResource != null) { 59 String jdbcObjectName = "com.sun.appserv:type=jdbc-resource,category=config,jndi-name=" + jdbcResource.toString(); 60 try { 63 descView.setDisplayFieldValue("ConnectionPool", MBeanUtil.getAttribute(jdbcObjectName, "pool-name")); 64 }catch (Exception ex){ 65 } 67 } 68 } 69 } 70 | Popular Tags |