Posted by hatim
Sat, 09 Aug 2008 22:13:00 GMT
In my Summer of code project I have to use already established DAOs (well some times adding a few tid bids) and using them to replace JDBC code. Testing DAOs with Hibernate tools made it alot easy to play with both HQL and criteria, but I was stuck when it came to injection. It seems that OpenNMS uses lots of technologies like JMX which I have never even touched before
attached is a log of a conversation which I had with a devel on #opennms. Based on this conversation I some how was able to bug the devel into writing all of this into a wiki page.
There was one small confusion though, I was working with Poller which was infact Pollerd, there being a naming inconsistency. Following this wiki page I should be now able to easily inject Dao's to my required daeomons and other classes.
Posted in Technology | Tags coding, soc | no comments | no trackbacks
Posted by hatim
Fri, 01 Aug 2008 21:43:00 GMT
My summer of code midterm review was done and I am some what content with it. Although I have not been able to achieve much tangibally but I have covered some ground. My project involves some very interesting things most of which I had not touched before in my previous encouter with Spring/Hibernate. For now I am focused on finishing the task.
I am behind schedule so I am thinking of following tweaks to schedule. As you probably already know that I would be moving to Sweden soon, I will be going to another city and get some shopping done so I wont be working on 22nd - 25th. so skipping these days and just barely meeting the review deadline of 1st Sep 2008 I have a good 25 days left with me. I will be finalizing some stuff in the last days of August which I admit would be tricky as I would be in a totally different place.
Posted in Technology | Tags programming, soc | no comments | no trackbacks
Posted by hatim
Tue, 01 Jul 2008 17:39:00 GMT
For past few days I have been working on OpenNMS poller tests. I have to adapt the curretn tests so that they can better utilize the Hibernate upgradation i am taked for do for my SoC project. A quick grep led me to find the following java files in my svn branch.
Under trunk/opennms-services/
src/test/java/org/opennms/netmgt/config/PollerConfigFactoryTest.java
src/test/java/org/opennms/netmgt/config/PollerConfigManagerTest.java
src/test/java/org/opennms/netmgt/mock/MockPollerConfigTest.java
src/test/java/org/opennms/netmgt/poller/PollerTest.java
src/test/java/org/opennms/netmgt/poller/remote/PollerBackEndIntegrationTest.java
src/test/java/org/opennms/netmgt/poller/remote/PollerBackEndTest.java
src/test/java/org/opennms/netmgt/poller/remote/PollerFrontEndIntegrationTest.java
src/test/java/org/opennms/netmgt/poller/remote/PollerFrontEndTest.java
Under trunk/opennms-webapp/
src/test/java/org/opennms/web/services/PollerServiceTest.java
I have skipped remote poller tests for now. I have started with PollerTest as it seems to be the most obvious. As per suggestions of OpenNMS community I am extending this Test class from AbstractTransactionalDaoTestCase. But since AbstractTransactionalDataSourceSpringContextTests comes in its parent hierarchy, which sets setUp and tearDown as final. This means that eiteher a new way of setUp and tearDown have to be figured out, or spring context has to be provided from with in the indivisual tests. I think the second way means much of boilerplate code in different unrelated places and hence duplication.
I am still updating the code, more to come on this blog entry.
Posted in Technology | Tags coding, opennms, soc | no comments | no trackbacks
Posted by hatim
Sat, 28 Jun 2008 17:43:00 GMT
I was in need of checking my HQL queries from within Eclipse so I could check for their validity. Furthermore since it was for a Spring/Hibernate based project (namely OpenNMS for my Google Summer of code) so there was no hibernate.cfg.xml to begin with (OpenNMS has loads of other configurations in which it stores what it needs to do with hibernate and databases). So the solution was simple, to make a brand new hibernate.cfg.xml for own use (this file wont be committed, but i think a provision of such thing should be there so there is easy way for new comers to startup hibernate tools)
I have been reading up alot for my Summer of Code, I have completely read Harnessing Hibernate and am currently taking reference from Beginning Hibernate and from Java Persistence with Hibernate. These are all excellent books. Harnessing hibernate was helpful in the setup of hibernate tools in Eclipse.
Following are some screenshots of hibernate tools on my system.

Hibernate tools tab completion.

Hibernate tools executing HQL query on OpenNMS model
Posted in Technology | Tags coding, opennms, soc | no comments | no trackbacks
Posted by hatim
Wed, 04 Jun 2008 13:41:00 GMT
On this previous monday I recieved my Google Summer of Code payment card. Its a Master Card from some finance related company run by General Electric. It does not have my name on it, instead it has a number and GSOC 2008 Stundet written on it. The card had no value on it and had a number written on it to enable it. It was a US 1-800 number. I had a hunch that skype should let me call 1-800 numbers for free, and a google search confirmed it. I activated my card at no cost :).
Posted in LifeLog | Tags google, soc
Posted by hatim
Wed, 28 May 2008 12:36:00 GMT
I have always wanted to try out skype. I had an idea about it's excellent voice quality from guys a Twit, but today I witnessed it first hand. The thing which was holding me up was the unavailibility of Mic (input sound) on my laptop. Today I figured out what the problem is. On my Acer 7720-6604 I have an internal mic, for some reason it does not work, but an external mic does. I for some reason was thinking that no mic works what so ever. I added a line in /etc for proper module loading (I didn't have it in my fresh Hardy installation) and in options for volume control I chose Mic as input source. When recording from Gnome's sound recorder I chose Digital as input of recording. So atleast I am able to record sound now (although not with my internal mic)
Then I checked out this link for installation of Skype on my linux box. On 64 bit machines you have to fool the thing to use 32 bit libraries. I made a test call and it soudedd perfect. Then i even tried a call with webcam and it worked well too. I actually have a conference call with browzow from OpenNMS regarding my summer of code assignment, which has started since this Monday. I have not coded any thing worth committing yet and lets hope I have some small stuff cooked up by the end of this week.
Posted in Technology | Tags opennms, skype, soc, ubuntu | no comments | no trackbacks
Posted by hatim
Wed, 21 May 2008 07:02:00 GMT
Well its no longer a surprise that Google sends out goodies to its Summer of code students before the start of Summer of Code, but it is still a surprise that which title would they be sending. I recieved (with apologies to those who still want this surprise to be secret) Beutiful Code by Andy Oram & Greg Wilson. I had this book in e-format previously, but i would probably never have read it. I already started reading it's Chapter 20 which is reltaed to a Java based information portal which was devloped for Mars Rover missions. This is an excellent gift for an aspiring Software engineer like me. Thank you Google :)
Posted in Technology | Tags coding, opennms, soc | no comments | no trackbacks
Posted by hatim
Tue, 22 Apr 2008 08:21:00 GMT
I have been selected for Google Summer of code for the second time. My writing skills and my socilazing on irc has paid off well and now it time to concentrate on my software devlopment skills. Like last year I witnessed the irc party on #gsoc @ freenode. There were almost 900 people in attendence and Leslie was trying to calm every one down by frantically typing, 'calm down' , 'chill', 'patience' every other second :). I have so far gotten emails from both Google and OpenNMS. here is an excrept from Google's email
Dear Applicant,
Congratulations! This email is being sent to inform you that your
application was accepted to take part in the Summer of Code. Please
check your student home page in the SoC web application at
http://code.google.com/soc/student_home.html to determine which of
your applications was accepted.
Over the next few days, you will be added to a special members only
......
If you cannot take part for some reason, please email us at
gsoc@google.com as soon as possible so that we can allocate your slot
to another student.
Other questions and concerns should be send to gsoc@google.com
Thanks for taking part; we're very excited to see what the Summer will bring!
Congratulations once again,
The Google Summer of Code Progam Administration Team
and here from RangerRick (Ben Reed from OpenNMS)
== Hello ==
So I just wanted to send out a quick note to welcome you to the OpenNMS
community, and to thank you for getting involved in Summer of Code!
This is our first time as a mentoring organization, so we'll be learning
alongside you how to do things. If you have any questions, please don't
hesitate to contact....
.....the next month, it's "Community Bonding" time. Time for you to get
to know us, for us to get to know you, and for everyone to get familiar
with interacting, checking out/building/working with the OpenNMS
codebase, and all that fun stuff. Get on the mailing lists, join us in
IRC, introduce yourselves, and most importantly, have fun!
- --
Benjamin Reed
The OpenNMS Group
http://www.opennms.org/
I am already a part of the Google Student mailing list and have updated my profile for this year's project. I aslo see that this year there is some one else working on Internet2 Java OWAMP project and hopefully they will succeed this time. As for me I will be start the tasking of my project as of today (ie identifying the small tasks for the migration).
Wish me luck :)
Posted in Technology | Tags coding, opennms, soc | no comments | no trackbacks
Posted by hatim
Wed, 09 Apr 2008 06:33:00 GMT
following is a repost of my SoC proposal for OpenNMS
Synopsis
OpenNMS currently still depends on some PostgreSQL-specific behavior (especially in stored procedures) which keeps it from being database-independent. Although OpenNMS has been slowly transitioning its code to use Hibernate instead of direct JDBC calls, but there is a lot of code still using JDBC. The following is a project proposal for Google Summer of code 2008 to the OpenNMS project. This document gives details of project methodology, time lines, and risks.
in short
- The aim is to complete hibernate transition for the entire OpenNMS project. Author's aim is to complete major tasks by Dev-Jam 2008.
- The deliverable are code, test cases and documentation. OpenNMS installation documentation which deals with OpenNMS install with MySQL and perhaps a few other OSS Databases will be part of deliverable.
- Applicant has been a part of OpenNMS user community for a year now and has genuine interest in Java EE software development(due to his present job and future education and career directions)
- Applicant will be sharing code samples before project selection to show mentors that the applicant has sufficient background in Java EE software development.
Further info and code samples will be available at http://code.hatimonline.com/opennms
Read more...
Posted in Technology | Tags coding, opennms, soc | no comments | no trackbacks
Posted by hatim
Tue, 01 Apr 2008 10:56:00 GMT
Google's Summer of code application deadline for students has been extended for one week. It's now Monday April 7th 2008. This is good as well as bad. It's good because it gives me one more week to make my application even better, and it's bad because I will be spending now more time in the application process than in actual coding
Edit:
Well I didn't spend more time on my application, but I was able to get Jetty running through maven. Apprently User Mode Linux was preventing Jetty from binding to an IP, but after migrating to Xen every thing works smoothly now. It seems that I would also be able to run OpenNMS now :).
I am currently following the following good links for sample application devlopemnt
http://www.lulu.com/content/1087191 (Set of tutorials to start devlopment with Spring and Hibernate using Maven2)
http://today.java.net/pub/a/today/2007/03/01/building-web-applications-with-maven-2.html (Maven 2 Web application devlopment tutorial using Jetty plugin)
I have also found the following book to be useful
Thomas Van de Velde, Bruce Snyder, Christian Dupuis, Sing Li, Anne Horton, Naveen Balani
ISBN: 978-0-470-10161-2
Posted in Technology | Tags coding, contests, opennms, soc | no comments | no trackbacks