[SNMP4J] Need discussion over SNMP V2

Vivek Agarwal vivekthechamp at hotmail.com
Wed Sep 19 07:53:31 CEST 2007


Hi Group ;
 I have one query regarding SNMP V1 & SNMPV2
1.)  Suppose in Var binding list we don't have certain field value so at the time to set ,what will happend in SNMPV1 and SNMPV2 .
 
2.) What is Scalar & Tabular field in MIB
 
With Regards
 Vivek Agarwal
 
> From: snmp4j-request at agentpp.org> Subject: SNMP4J Digest, Vol 44, Issue 9> To: snmp4j at agentpp.org> Date: Mon, 17 Sep 2007 02:57:33 -0700> > Send SNMP4J mailing list submissions to> snmp4j at agentpp.org> > To subscribe or unsubscribe via the World Wide Web, visit> http://lists.agentpp.org/mailman/listinfo/snmp4j> or, via email, send a message with subject or body 'help' to> snmp4j-request at agentpp.org> > You can reach the person managing the list at> snmp4j-owner at agentpp.org> > When replying, please edit your Subject line so it is more specific> than "Re: Contents of SNMP4J digest..."> > > Today's Topics:> > 1. Re: notificationOriginator is becoming NULL (Frank Fock)> > > ----------------------------------------------------------------------> > Message: 1> Date: Sun, 16 Sep 2007 12:19:12 +0200> From: Frank Fock <fock at agentpp.com>> Subject: [SNMP4J] Re: notificationOriginator is becoming NULL> To: Urwashi Sharma <urwashisharma at in.ibm.com>> Cc: snmp4j at agentpp.org> Message-ID: <46ED0320.8080808 at agentpp.com>> Content-Type: text/plain; charset=UTF-8; format=flowed> > Hi Urwashi,> > If the NotificationOriginator instance becomes null,> this is rather a synchronization/singleton pattern> problem ("Is the static factory method synchronized?")> than a SNMP4J-Agent API problem.> > The reinitialization should work, however when you use> removeAll you probably get a time slot without notification> targets (depends on your synchronization scheme).> > A better approach to reset the target config would be> to create a new one and then only changing the pointer> from the old to the new one by creating a new> NotificationOriginatorImpl (or even better by subclassing> it to change the pointers individually).> > Best regards,> Frank> > Urwashi Sharma wrote:> > Hi Frank,> > > > I am building an application by using Snmp4J agent Api and deploying it> > into JBOSS . I am sending traps by using a notify call on> > notificationOriginator by TestAgent. My TestAgent is a singleton classs.> > However, what I am seeing is that sometimes notificationOriginator becomes> > NULL. I am not sure how it is changing to null. Moreover, when I am trying> > to initialize it again it doesn’t get’s initialiaze as this is a run time> > behaviour I am not able to troubleshoot because of my limited knowledge.> > For my application it is a kind of Fatal error and only restarting of the> > agent fixes the problem. This problem is occurring at runtime and it is not> > consistent. Here is a code that shows how I am reinitializing the> > notificationoriginator after it became null.> > > > For your info, I am storing all the Trap receiver info in the form of> > Object in a LDAP type of database. A user can change IP address in this> > lower layer and my task is to reload this info again in targetMib and> > Notification mib. I am doing this by emptying this table and reloading info> > from the database like this:> > > > > > targetMIB.getSnmpTargetAddrEntry().removeAll();> > > > notificationMIB.getNotifyTable().removeAll();> > > > > > Here is a code for reinitializing it.> > > > > > public void sendTraps(Vector vbs, OID testOID, String context)> > {> > > > try {> > VariableBinding []testTrap = new> > VariableBinding[vbs.size()];> > for (int i = 0; i < vbs.size(); i++)> > {> > testTrap[i] => > (VariableBinding)vbs.get(i);> > }> > > > if(testTrap== null)> > return;> > > > if(notificationOriginator == null)> > {> > log.info(" Notification> > Originator is null.... Initializing it");> > > > log.info(" session is " +> > session + " Vacm is " + vacmMIB + " sysUpTime is " +> > snmpv2MIB.getSysUpTime() + " Target mib is "> > +> > snmpTargetMIB + " notification mib is " + snmpNotificationMIB);> > notificationOriginator => > new> > NotificationOriginatorImpl(session, vacmMIB,> > snmpv2MIB.getSysUpTime(),> > snmpTargetMIB, snmpNotificationMIB);> > }> > > > notificationOriginator.notify(new> > OctetString(context), testOID, testTrap);> > log.info(" Sending Trap to Targets ");> > } catch (Exception e) {> > log.error("Exception while sending Trap> > ");> > }> > }> > > > > > > > -- > AGENT++> http://www.agentpp.com> http://www.mibexplorer.com> http://www.mibdesigner.com> > > > ------------------------------> > _______________________________________________> SNMP4J mailing list> SNMP4J at agentpp.org> http://lists.agentpp.org/mailman/listinfo/snmp4j> > > End of SNMP4J Digest, Vol 44, Issue 9> *************************************
_________________________________________________________________
Download the latest version of Windows Live Messenger NOW!
http://get.live.com/en-ie/messenger/overview


More information about the SNMP4J mailing list