Monday, January 31, 2011

Issues

During the work on the project today I met an issue that I couldn't solve yet: integration of Hibernate and EJB3. It is giving exceptions (Like, "Exception while invoking class org.glassfish.ejb.startup.EjbDeployer load method") and others, that are barely Googlable - they address to forum topics, where people raise the same questions but don't get any valid answers. 

  • Could anybody recommend a tutorial  on Glassfish + EjB3 + Hibernate combination? I would be grateful for any help.

I managed to find material on Hibernate with EjB and JBoss - there it is different and could be easier, but switching technologies doesn't seem like a good idea to me, since there is so little time left. 

I found a good tutorial on Hibernate: http://netbeans.org/kb/docs/web/hibernate-webapp.html
Instead of required EjB3 and Servlets it uses JSF and xhtml, but the overall architecture is correct and persistence tier is as it is supposed to be. 

Saturday, January 29, 2011

Daily report

It took me a long time to get into the new set of technologies, to understand and solve all the minor issues. Finally I managed to bring the environment back into working condition - there was an issue with Hibernate mapping between classes and database entries. Now I can finally start gathering all my previous attempts into the actual final project.

To Do:

  • Design (Template?)
  • EJB interconnection with Hibernate
  • Group all the business logic in EJB
  • Organize all presentation-related code in servlets
So, what is left is just to start and to finish, more or less. (That's a Russian proverb paraphrased, I don't really know whether it means something in English) 

Thursday, January 27, 2011

New set of technologies

Because of the constant problems with the set of technologies described in the previous post, today I finally decided to try the new one:

Netbeans 6.9.1 + Glassfish + Java DB (SQL Express in perspective) + Hibernate

After a long time setting them all up and understanding their differences from what I tried before, I managed to achieve some results. I reached proper division of layers: Hibernate maps DB structure into objects (persistency), JSP accesses Hibernate (business logic), Java servlet accesses JSP and represents the data (presentation).

To Do:

  • Further attempts to substitute JavaDB with SQL Express, since Derby is very hard to debug 
  • Implement business logic on EJB
  • Solve a problem with default package (objects from other packages don't interact with DB properly)

Wednesday, January 26, 2011

Today's progress

Today there were more problems, rather than achievements:

- Hibernate + Eclipse + EJB3 + Oracle Express + Derby combination, described in one of the tutorials didn't work. I still cannot see why not. Something is wrong with its connection to database. Probably to Derby.
- Failed attempt to install MyEclipse, the "New software" mechanism showed me some errors about dependencies.

Still, achievements:

  • Created a spreadsheet on all the related technologies and abbreviations. Attempt to "Put an octopus in the bottle", as was mentioned on the lecture
  • Got theoretical knowledge about Hibernate, trying to implement it practically. 
  • Studied and tried Spring
  • Studied JavaScript
  • Started alternative approaches to Hibernate
  • Tried Ivy for Eclipse
Any help would be appreciated, for example good links to fresh tutorials and info on Hibernate + Eclipse + EJB3 working together.

Tuesday, January 25, 2011

Further work

Over the past few weeks I worked extensively on the following technologies for the project:

  1. JSP and Servlets on top of Eclipse Helios and Tomcat 7.0
  2. EJB3, which required a lot about the following technologies: 
  • JBoss AS 6.0
  • Glassfish 3.0.1
  • Beans, JNDI, Java EE 5
     3.  Overall issues on project architecture in a sense of MVC and tiers.
     4.  Started with Hibernate and DB related issues

Note: got more theoretical, rather than practical knowledge so far. None of the open-source technologies worked as they had been described in tutorials. Different versions of the same technologies show totally different (and usually non-documented) behavior. Eclipse mechanism for adding new software is really not reliable. 

So far all the difficulties were solved!