BTech 451 Project Yijing Wei
Today I created and experimented with a small Hibernate application including creating a new table in the database, creating a POJO (Plain Old Java Objects) class, the mapping file and the Hibernate configuration file, just to see how it actually works with the database and get a better feeling of how I could implement Hibernate in Distributed Service Profiler.
Today I had a small catch-up with Ana about my progress so far and my plan for the rest of Semester One. She mentioned that my presentation is coming in about four-weeks’ time, and she suggested that I complete the coding of the establishing a connection with the database before the representation so that I will have some coding part to present. Since Xinfeng is still on holiday, I decided to meet up with Mano next week to discuss my current progress and what exactly he is expecting for my end-of-semester presentation.
The Hibernate test application that I created last week successfully connects to the database and intercepts the queries made to the database. Today I had Ana to have a look at my Hibernate test application. She said that the next step would be to retrieve information from the queries, such as time taken for the query to complete, the argument size and the number of hits, so these things are what I should be working on this week.
I managed to get the time taken for the query to process and the number of hits, however, I had some problems retrieving the argument size and the return size from the query. I asked Ana about it and she suggested I do some investigation. I spent today doing the investigation but unfortunately there is not much information about it on the Internet. I might need to ask Mano about it.
Today I continued my investigation about getting the argument size and return size of a size from last week. I found something called Hibernate Statistics which can be used to get the statistics of a Hibernate session or an entity in that session. I experimented with it a little, however, it is not what I am looking for. I decided to go through the current profiler to see get some ideas since it already does that for calls between services.
The Distributed Service Profiler uses Mbeans, Notification and a MethodCallContainer to extract the argument bytes and return bytes from methods. I tried to integrate these classes into my Hibernate testing application, but it appears that I also need other classes from the Distributed Service Profiler to make it work. Therefore, I decided not to do the argument bytes and return bytes from the queries at the moment. I will implement this feature after I have created my LoggerInterceptor for the Distributed Service Profiler and integrated them.
I tried to integrate my LoggerInterceptor with the Distributed Service Profiler. I also had a look at the PersistenceWrapper, which is used to configure the Hibernation configurations and creating a session factory with the database.
Since my mid-year presentation is in three-weeks’ time, I did a presentation practice with Ana and Jonny today, and they offered me some valuable advice. They said that the content of my presentation is quite simple. It would be better if I add a mock-up of the profiler and some more details to my 'next steps' section.
Today I worked on the mid-year seminar, just to make some improvements. I also had a look at the how output stream is used to extract the argument bytes and return bytes from the database queries, like Johnny suggested.