admin@glassfish.java.net

Re: AMX create/remove working

From: Anissa Lam <Anissa.Lam_at_Sun.COM>
Date: Fri, 28 Mar 2008 02:13:08 -0700

Hi Lloyd,
I still haven't got to the resources testing yet.
It takes me a long time to work around that 'redirect' issue that is
introduced today, and clean up the config code due to API changes.
Here is what i am seeing based on the latest code that i got around 9pm.


-- getConfigsConfig() API is missing from DomainConfig.
  I work around the problem by using QueryMgr to get that.


-- Cannot delete Virtual Server, still a 'no-op' for me.
I called config.getHTTPServiceConfig().removeVirtualServerConfig("testVs");
see this in console:
INFO: removeConfig: by operationName + name


- creating the config object,
If we don't set the optional attributes, it will be set to "null" and
written out to 'domain.xml' as "null".
eg.<virtual-server default-web-module="" state="on" hosts="localhost"
log-file="null" id="ABC" http-listeners="null" />


- When creating the config object, property specified in the
optionalMap is not created.
I called config.getHTTPServiceConfig().createVirtualServerConfig(name,
localhost, optionalMap) where
the map is
INFO: ::::::::::::::::::: in GUI: createVirtualServerConfig: with Map =
{property.AAA=aaa, property.sso-enabled=false,
property.docroot=${com.sun.aas.instanceRoot}/docroot,
property.accesslog=${com.sun.aas.instanceRoot}/logs/access}


- When editing the virtual server, i am using the old properties
interface.
config.createProperty(name, value), but in the domain.xml, the value is
not writen.
It shows <property name="ABC" />

- delete property is a no-op.

thanks
Anissa.


Lloyd L Chambers wrote:
> Anissa,
>
> I've tested out all the resource types below (see the jmxcmd commands
> below). All work correctly for create and remove. I haven't tested
> all create and remove operations for all MBeans, but I expect that
> most of them will work, though not all are annotated and will fail for
> that reason (easy fix).
>
> Please be sure to use
> domainConfig.getResources().create/remove<Name>(...) for the
> create/remove to work (API change).
>
> You will need to update hk2/config, common/amx-api, common/amx-impl,
> admin/config-api and common/glassfish-api modules.
>
> Lloyd
>
> target j2eeType=X-ResourcesConfig
>
> createPersistenceManagerFactoryResourceConfig:persist1,null
> createJNDIResourceConfig:jndi1,jndi1-lookup,rt1,com.foo.bar,null
> createCustomResourceConfig:custom1,res-type-1,com.foo.bar,null
> createMailResourceConfig:mail1,localhost,mail-user,foo_at_bar.com,null
> createResourceAdapterConfig:ra1,null
> createJDBCConnectionPoolConfig:pool1,com.foo.bar,null
> createConnectorResourceConfig:crc,pool1,null
> createConnectorConnectionPoolConfig:ccp1,an1,cdn,null
> createAdminObjectResourceConfig:aor1,rt1,ra1,null
> createResourceAdapterConfig:rac1,null
>
> get *ObjectNameMap
>
> get ContaineeJ2EETypes,AttributeNames,ObjectName
>
>
> removePersistenceManagerFactoryResourceConfig:persist1
> removeJNDIResourceConfig:jndi1
> removeResourceAdapterConfig:ra1
> removeMailResourceConfig:mail1
> removeCustomResourceConfig:custom1
> removeJDBCConnectionPoolConfig:pool1
> removeConnectorResourceConfig:crc
> removeConnectorConnectionPoolConfig:ccp1
> removeAdminObjectResourceConfig:aor1
> removeResourceAdapterConfig:rac1
>
>
>
> --------------------------
> jmxcmd> target j2eeType=X-ResourcesConfig
>
> createPersistenceManagerFactoryResourceConfig:persist1,null
> createJNDIResourceConfig:jndi1,jndi1-lookup,rt1,com.foo.bar,null
> createCustomResourceConfig:custom1,res-type-1,com.foo.bar,null
> createMailResourceConfig:mail1,localhost,mail-user,foo_at_bar.com,null
> createResourceAdapterConfig:ra1,null
> createJDBCConnectionPoolConfig:pool1,com.foo.bar,null
> createConnectorResourceConfig:crc,pool1,null
> createConnectorConnectionPoolConfig:ccp1,an1,cdn,null
> createAdminObjectResourceConfig:aor1,rt1,ra1,null
> createResourceAdapterConfig:rac1,null
>
> get *ObjectNameMap
>
> get ContaineeJ2EETypes,AttributeNames,ObjectName
>
>
> removePersistenceManagerFactoryResourceConfig:persist1
> removeJNDIResourceConfig:jndi1
> removeResourceAdapterConfig:ra1
> removeMailResourceConfig:mail1
> removeCustomResourceConfig:custom1
> removeJDBCConnectionPoolConfig:pool1
> removeConnectorResourceConfig:crc
> removeConnectorConnectionPoolConfig:ccp1
> removeAdminObjectResourceConfig:aor1
> removeResourceAdapterCojmxcmd> jmxcmd> invoking
> createPersistenceManagerFactoryResourceConfig(persist1,null) on
> j2eeType=X-ResourcesConfig
> ---amx:j2eeType=X-ResourcesConfig,name=na---
> amx:j2eeType=X-PersistenceManagerFactoryResourceConfig,name=persist1
>
> jmxcmd> invoking
> createJNDIResourceConfig(jndi1,jndi1-lookup,rt1,com.foo.bar,null) on
> j2eeType=X-ResourcesConfig
> ---amx:j2eeType=X-ResourcesConfig,name=na---
> amx:j2eeType=X-JNDIResourceConfig,name=jndi1
>
> jmxcmd> invoking
> createCustomResourceConfig(custom1,res-type-1,com.foo.bar,null) on
> j2eeType=X-ResourcesConfig
> ---amx:j2eeType=X-ResourcesConfig,name=na---
> amx:j2eeType=X-CustomResourceConfig,name=custom1
>
> jmxcmd> invoking
> createMailResourceConfig(mail1,localhost,mail-user,foo_at_bar.com,null)
> on j2eeType=X-ResourcesConfig
> ---amx:j2eeType=X-ResourcesConfig,name=na---
> amx:j2eeType=X-MailResourceConfig,name=mail1
>
> jmxcmd> invoking createResourceAdapterConfig(ra1,null) on
> j2eeType=X-ResourcesConfig
> ---amx:j2eeType=X-ResourcesConfig,name=na---
> amx:j2eeType=X-ResourceAdapterConfig,name=ra1
>
> jmxcmd> invoking
> createJDBCConnectionPoolConfig(pool1,com.foo.bar,null) on
> j2eeType=X-ResourcesConfig
> ---amx:j2eeType=X-ResourcesConfig,name=na---
> amx:j2eeType=X-JDBCConnectionPoolConfig,name=pool1
>
> jmxcmd> invoking createConnectorResourceConfig(crc,pool1,null) on
> j2eeType=X-ResourcesConfig
> ---amx:j2eeType=X-ResourcesConfig,name=na---
> amx:j2eeType=X-ConnectorResourceConfig,name=crc
>
> jmxcmd> invoking
> createConnectorConnectionPoolConfig(ccp1,an1,cdn,null) on
> j2eeType=X-ResourcesConfig
> ---amx:j2eeType=X-ResourcesConfig,name=na---
> amx:j2eeType=X-ConnectorConnectionPoolConfig,name=ccp1
>
> jmxcmd> invoking createAdminObjectResourceConfig(aor1,rt1,ra1,null) on
> j2eeType=X-ResourcesConfig
> ---amx:j2eeType=X-ResourcesConfig,name=na---
> amx:j2eeType=X-AdminObjectResourceConfig,name=aor1
>
> jmxcmd> invoking createResourceAdapterConfig(rac1,null) on
> j2eeType=X-ResourcesConfig
> ---amx:j2eeType=X-ResourcesConfig,name=na---
> amx:j2eeType=X-ResourceAdapterConfig,name=rac1
>
> jmxcmd> jmxcmd> ---amx:j2eeType=X-ResourcesConfig,name=na---
> AdminObjectResourceConfigObjectNameMap={aor1=amx:j2eeType=X-AdminObjectResourceConfig,name=aor1}
>
> ConnectorConnectionPoolConfigObjectNameMap={ccp1=amx:j2eeType=X-ConnectorConnectionPoolConfig,name=ccp1}
>
> ConnectorResourceConfigObjectNameMap={crc=amx:j2eeType=X-ConnectorResourceConfig,name=crc}
>
> CustomResourceConfigObjectNameMap={custom1=amx:j2eeType=X-CustomResourceConfig,name=custom1}
>
> JDBCConnectionPoolConfigObjectNameMap={DerbyPool=amx:j2eeType=X-JDBCConnectionPoolConfig,name=DerbyPool,
> __CallFlowPool=amx:j2eeType=X-JDBCConnectionPoolConfig,name=__CallFlowPool,
> __TimerPool=amx:j2eeType=X-JDBCConnectionPoolConfig,name=__TimerPool,
> pool1=amx:j2eeType=X-JDBCConnectionPoolConfig,name=pool1}
> JDBCResourceConfigObjectNameMap={jdbc/__CallFlowPool=amx:j2eeType=X-JDBCResourceConfig,name=jdbc/__CallFlowPool,
> jdbc/__TimerPool=amx:j2eeType=X-JDBCResourceConfig,name=jdbc/__TimerPool,
> jdbc/__default=amx:j2eeType=X-JDBCResourceConfig,name=jdbc/__default}
> JNDIResourceConfigObjectNameMap={jndi1=amx:j2eeType=X-JNDIResourceConfig,name=jndi1}
>
> MailResourceConfigObjectNameMap={mail1=amx:j2eeType=X-MailResourceConfig,name=mail1}
>
> PersistenceManagerFactoryResourceConfigObjectNameMap={persist1=amx:j2eeType=X-PersistenceManagerFactoryResourceConfig,name=persist1}
>
> ResourceAdapterConfigObjectNameMap={rac1=amx:j2eeType=X-ResourceAdapterConfig,name=rac1,
> ra1=amx:j2eeType=X-ResourceAdapterConfig,name=ra1}
>
> jmxcmd> jmxcmd> ---amx:j2eeType=X-ResourcesConfig,name=na---
> AttributeNames={AttributeNames,MBeanInfoIsInvariant,JDBCConnectionPoolConfigObjectNameMap,JNDIResourceConfigObjectNameMap,ObjectName,Group,MBeanLogLevel,J2EEType,InterfaceName,CustomResourceConfigObjectNameMap,MBeanLoggerName,PersistenceManagerFactoryResourceConfigObjectNameMap,ContaineeJ2EETypes,DAS,Name,DomainRootObjectName,JDBCResourceConfigObjectNameMap,NotificationInfo,FullType,ConnectorConnectionPoolConfigObjectNameMap,MailResourceConfigObjectNameMap,AdminObjectResourceConfigObjectNameMap,ConnectorResourceConfigObjectNameMap,ResourceAdapterConfigObjectNameMap,ContainerObjectName,ContaineeObjectNameSet}
>
> ContaineeJ2EETypes=X-MailResourceConfig,X-AdminObjectResourceConfig,X-JDBCResourceConfig,X-ConnectorConnectionPoolConfig,X-ResourceAdapterConfig,X-JNDIResourceConfig,X-JDBCConnectionPoolConfig,X-CustomResourceConfig,X-ConnectorResourceConfig,X-PersistenceManagerFactoryResourceConfig
>
> ObjectName=amx:j2eeType=X-ResourcesConfig,name=na
>
> jmxcmd> jmxcmd> jmxcmd> invoking
> removePersistenceManagerFactoryResourceConfig(persist1) on
> j2eeType=X-ResourcesConfig
> ---amx:j2eeType=X-ResourcesConfig,name=na---
> <null>
>
> jmxcmd> invoking removeJNDIResourceConfig(jndi1) on
> j2eeType=X-ResourcesConfig
> ---amx:j2eeType=X-ResourcesConfig,name=na---
> <null>
>
> jmxcmd> invoking removeResourceAdapterConfig(ra1) on
> j2eeType=X-ResourcesConfig
> ---amx:j2eeType=X-ResourcesConfig,name=na---
> <null>
>
> jmxcmd> invoking removeMailResourceConfig(mail1) on
> j2eeType=X-ResourcesConfig
> ---amx:j2eeType=X-ResourcesConfig,name=na---
> <null>
>
> jmxcmd> invoking removeCustomResourceConfig(custom1) on
> j2eeType=X-ResourcesConfig
> ---amx:j2eeType=X-ResourcesConfig,name=na---
> <null>
>
> jmxcmd> invoking removeJDBCConnectionPoolConfig(pool1) on
> j2eeType=X-ResourcesConfig
> ---amx:j2eeType=X-ResourcesConfig,name=na---
> <null>
>
> jmxcmd> invoking removeConnectorResourceConfig(crc) on
> j2eeType=X-ResourcesConfig
> ---amx:j2eeType=X-ResourcesConfig,name=na---
> <null>
>
> jmxcmd> invoking removeConnectorConnectionPoolConfig(ccp1) on
> j2eeType=X-ResourcesConfig
> ---amx:j2eeType=X-ResourcesConfig,name=na---
> <null>
>
> jmxcmd> invoking removeAdminObjectResourceConfig(aor1) on
> j2eeType=X-ResourcesConfig
> ---amx:j2eeType=X-ResourcesConfig,name=na---
> <null>
>
> jmxcmd> invoking removeResourceAdapterConfig(rac1) on
> j2eeType=X-ResourcesConfig
> ---amx:j2eeType=X-ResourcesConfig,name=na---
> <null>
>
> jmxcmd> jmxcmd> jmxcmd> jmxcmd>
> jmxcmd>
>
>
>
>
>
>
>
>