dev@glassfish.java.net

Another AMX Question

From: Jason Lee <jasondlee_at_sun.com>
Date: Tue, 16 Jun 2009 00:04:54 -0500

With Lloyd and Anissa's help, I got moving along with my AMX
question. Using the new v3 AMX, I am able to retrieve a list of JMS
connection factories. Trying to create a new one, though, is not
working. Here's how I get the list:

             setPageSessionAttribute(key="objectNameStr" value="v3:pp=/
domain,type=resources");
             setPageSessionAttribute(key="childType" value="connector-
connection-pool");
              
getChildrenTable(objectNameStr="#{pageSession.objectNameStr}"
childType="#{pageSession.childType}"
result="#{requestScope.listOfRows}");

These JSFTemplating handler calls eventually find their way to
org.glassfish.admingui.common.handlers.ProxyHandlers.
getChildrenTable(), in case that helps. When saving, I started off by
assuming that the Object Name String and child type would be the same,
so I make this call:

     setPageSessionAttribute(key="objectNameStr", value="v3:pp=/domain/
resources,type=connector-connection-
pool,name=#{pageSession.valueMap['Name']}" );
     saveBeanAttributes(objectNameStr="#{pageSession.objectNameStr}",
attrs="#{pageSession.valueMap}");

The code obviously isn't optimal. That aside, though, I've tried
creating the name string as it was in the list command, which failed
with an InstanceNotFoundException. I then changed the type to what
you see above, eventually adding the name= qualifier on the end, all
resulting in the same Exception.

Any tips/pointers? My mind is mush at the moment. Hopefully, morning
will bring clarity and an answer. :)

         Jason Lee
Senior Java Developer
GlassFish Administration Console

Sun Microsystems, Inc.
Phone x31197/+1 405-343-1964
Email jasondlee_at_sun.com
Blog http://blogs.sun.com/jasondlee
Blog http://blogs.steeplesoft.com