[SNMP4J] GET on Table with several indexes .

wafae alami alami.ouafae at gmail.com
Mon Sep 21 19:01:14 CEST 2009


Frank ,Thanks a lot  for your support .

2009/9/19 Frank Fock <fock at agentpp.com>

> Ouafae,
>
> OK, I understand. The current JvmManagementMibInst.java
> indeed does not instrument the jvmMemMgrPoolRelEntry.
>
> I have fixed that for the beta-1 release of
> SNMP4J-AgentJMX to be released on Monday.
>
> The critical code for multi-key (multi-index is not
> the limiting factor) MBean based tables is the key
> set determination. With the new release, you will
> be able to chain MBeanAttributeKeyProvider to support
> multi key MBeans.
>
> Best regards,
> Frank
>
> wafae alami wrote:
>
>> Thanks Frank for the response .
>>
>> Actually , I have seen the jvmMemMgrPoolRelEntry implementation , in the
>> JvmManagementMib.java the jvmMemMgrPoolRelEntry is implemented with two
>> indexes , but in the JvmManagementMibInst.java there is no implementation of
>> the jvmMemMgrPoolRelEntry.
>>
>> my problem exactely is how to implement the mapToRowMBean method to return
>> the ObjectName . and what's kind of keyProvider use .
>>
>>
>> tableSupport.add(OID tableEntry ,
>>                           new MBeanAttributeMOTableInfo(ObjectName name,
>>                                   *MBeanAttributeKeyProvider keyProvider*,
>>                                   TypedAttribute[] columns,
>>                                   String[] keyAttributes,
>>                                   *JMXIndexSupport indexSupport*) )
>>
>> I implement the *indexSupport *as follows :
>>
>> *JMXIndexSupport indexSupport *=
>>  new AbstractSyntheticJMXIndexSupport() {
>>        *  public ObjectName mapToRowMBean(Object rowIdentifier) {
>>            try {
>>                 Object[] rowsID=(Object[])rowIdentifier;
>>                 return new ObjectName("ProxyPlatform " +",name=" +
>> rowID[0]+",group="+rowID[1]);
>>            }
>>            catch (Exception ex) {
>>              ex.printStackTrace();
>>              return null;
>>            }
>>          }*
>>      }
>>
>> the ObjectName is well returned , but when I make a get request on the
>>  "name" attribute of this table , I get sometimes more than one row ,
>> sometimes one row , two rows , and sometimes more , and it's a random
>> behavior .
>>
>> I don't know if the other methods of JMXIndexSupport  should also be
>> re-implemented . but I think it's an indexing problem .
>>
>>
>> Thanks in advance
>> Ouafae.
>>
>> 2009/9/16 Frank Fock <fock at agentpp.com <mailto:fock at agentpp.com>>
>>
>>    Hi Ouafae,
>>
>>    Have you seen the jvmMemMgrPoolRelEntry implementation
>>    in the JvmManagementMib[Inst].java file?
>>    This is an example for a multiple sub-index implementation.
>>
>>    Best regards,
>>    Frank
>>
>>    wafae alami wrote:
>>
>>        hi every one ,
>>
>>        please there is any one does has an idea how to imlement a table
>>        with
>>        several indexes ? the kind of key provider ?
>>
>>
>>        Thanks
>>        Ouafae
>>        _______________________________________________
>>        SNMP4J mailing list
>>        SNMP4J at agentpp.org <mailto:SNMP4J at agentpp.org>
>>        http://lists.agentpp.org/mailman/listinfo/snmp4j
>>
>>
>>    --    AGENT++
>>    http://www.agentpp.com
>>    http://www.snmp4j.com
>>    http://www.mibexplorer.com
>>    http://www.mibdesigner.com
>>
>>
>>
>>
>> --
>> Ouafae ALAMI (Promotion INPT 2007)
>> Ingénieur de Convergence a Alcatel-Lucent
>> Projet Ims Application Server.
>>
>
> --
> AGENT++
> http://www.agentpp.com
> http://www.snmp4j.com
> http://www.mibexplorer.com
> http://www.mibdesigner.com
>
>



More information about the SNMP4J mailing list