Search This Blog

Loading...

Thursday, 24 April 2014

Creating a Database in Oracle and in PostgreSQL

As a part of my college project, I needed to create a database in oracle. It went fine. A I had a PostgreSQL set up at home, I decided to run the scripts on the PostgreSQL setup. Some interesting observations...

Monday, 21 April 2014

Scopes and Dependencies

We saw an example of request and session scoped beans earlier. We saw how the ApplicationContext was used to get access to these beans. However making the code ApplicationContextAware may not be an acceptable solution.Who would be keen to have Spring's core classes intruding into the code ? Knowing this Spring does provide us with an alternative solutions involving AOP.

Sunday, 13 April 2014

Request and Session Scope

I have never used a request scoped bean. Always Singleton. And once I dabbled with Prototype but that too never went beyond the prototype stage.
I can't really think of a scenario where I might need request or session scoped beans (yet!). The job is generally achieved with stateless singleton beans and data in request and session attributes.
Anyway I decided to try out a request scoped bean.

Tuesday, 8 April 2014

The Holder class in JAX-WS. Why and How ?

Consider the operation in the below wsdl file. It talks about a simple Port that has one operation - to update the data received. Nothing fancy about it. The service will return the updated and if necessary modified data.

Tuesday, 1 April 2014

How HashMap works in Java

I was looking at the HashMap source code the other day and felt like writing down what I learned. Consider the start point to using the HashMap:
Map<String, Integer> map = new HashMap<String, Integer>();
This will Constructs an empty HashMap with the default initial capacity (16) and the default load factor (0.75).