Friday 22 May, 2009

Visual garbage Collector

A tools whic must be used by any java beginner to understand about the java object lifecycle. From Object instantiation. Object reference ,Object Destry.Object Garbage Collected.

More information can be found on the Sun website Visual GC.

Monday 18 May, 2009

SQL Server PIVOT - Magic isn't it

Ever wonders how you could present data via a select statement horizontally instead of vertically. When your columns come from the data you are retrieving from the select statement. The answer is simple in TSQL called the pivot keyword. All it would do is to use the data as the pivot to form the columns. Consider the simple schema of the employee: Product
  • Name
  • ID
Product Sales
  • ID
  • Agent ID
  • Quantity
Agent
  • Name
  • ID
And lets say you want a result table which shows: Agent product year select a.name as 'Agent', p.name as "" from agent a inner join product_Sales pd on ps.agent_id=a.id inner join product p on p.id=ps.product_id PIVOT (SUM(Quantity) for Agent IN (Agent1, Agent2, Agent3)) AS pvt

Weblogic Boot up Authentication

Some trivial facts which can also be found under the weblogic documentation.

While trying to delete a few temp file from the weblogic domain. I had accidentally deleted the security directory as well.


When the server starts up it needs the authentication credentials either provided via a boot.properties file present in the server\security directory or else via the server prompt.

Storing the credentials in a file doesnt compromise security as this is then encrypted by the server as soon as it reads it for the first time.

Hence in order to avoid entering the weblogic username and password each time you want the server hosting your application to start , just store the credentials in a file called boot.properties.

the contents might look like this:

username=weblogic
password=weblogic