Sunday, November 18, 2007

Real world Object referencing & dereferencing and garbage collection

Your life is an Object. Then lots of references point to this (you) Object. This is happening from your birth. First reference is your mother. Then father, your family members and then Lots of references (relations & Friends).But among all references, your parent is always pointing you. Sometimes other references may dereference from you and again it may reference to you. New variables may reference to you and again may dereference from you (in your child hood when you had a mistake, your friends might be angry with you and they might be leave you and after few minutes they might be come with you). It is the general situation. When time is passing you will be a young object. Now you will be pointed by special variables. Now you will feel as always this variable pointing me than other references. This is the best case.

When we talk about worst case unfortunately that variable may de-reference from you. Because all are variables. Variable is a variable. It will change time to time. Then you will feel as “I have lost all references. I am an Object without a reference. And what happen to me if garbage collector sees me”. Definitely it will catch you and it will remove you from entire system. But fortunately it will never happen. Because there are lot of another references pointed to you. But you can’t feel it. Still you have reference from your parents from the birth of this Object. And lots of references from your friends. Now Garbage collector can’t remove you from heap memory. You are a Strong Object. Any way there are final variables. Once this kind of variable pointed to you then again never it doesn’t dereference from you.

Because those are final variables. Definitely there will be a final variable which pointed to you. Then you are not a Object without a reference. You have lots of references and don’t forget it !!!!!.

Finally you should remember this. Although we have lots of references but on a one day all references you will be lost. And then garbage collector will remove from heap memory. Not only from heap memory. It will remove you from this entire world. Your life is too short then take it in your maximum.

this post was written with the ideas of kasun gunawardana(PURO) and the "object without a reference" idea was initially announced by him. Therefore for more details about that statement contact pvkasungg@yahoo.com than me.because that idea is a his one.

All Comments are welcome and valuable !!!!!!!!!!

Monday, October 29, 2007

Oracle Real Application Clusters (RAC)

Oracle Real Application Clusters (RAC) is a software component you can add to a high-availability solution that enables users on multiple machines to access a single database with increased performance. RAC comprises two or more Oracle database instances running on two or more clustered machines and accessing a shared storage device via cluster technology. To support this architecture, the machines that host the database instances are linked by a high-speed interconnect to form the cluster. The interconnect is a physical network used as a means of communication between the nodes of the cluster. Cluster functionality is provided by the operating system or compatible third party clustering software. Figure Given in Below, shows an Oracle RAC configuration.

Oracle RAC offers features in the following areas:
  • Scalability
  • Availability
  • Load balancing
  • Failover
Failover

A backup operation that automatically switches to a standby database, server or network if the primary system fails or is temporarily shut down for servicing. Failover is an important fault tolerance function of mission-critical systems that rely on constant accessibility. Failover automatically and transparently to the user redirects requests from the failed or down system to the backup system that mimics the operations of the primary system.

Shared Storage

In an Oracle RAC configuration, all data files, control files, and parameter files are shared for use by all RAC instances. An high availability (HA) storage solution that uses one of the following architectures is recommended:

o Direct Attached Storage (DAS), such as a dual ported disk array or a Storage Area Network (SAN)
o Network Attached Storage (NAS)

For a complete list of supported storage solutions, see your Oracle documentation.
Software Requirements

You must install the following software on each RAC node:

* Operating system patches required to support Oracle RAC. See the release notes from Oracle for details.
* Oracle 9i or Oracle 10g database management system
* Clustering software for your operating system. See the Oracle documentation for supported clustering software and cluster configurations.
* Shared storage software, such as Veritas Cluster File System. Note that some clustering software includes a file storage solution, in which case additional shared storage software is not required.

Sunday, June 3, 2007

Hibernate

  • Hibernate is a open source framework for mapping Java objects in to data base tables.

The following diagram describes the high level architecture of hibernate


To use Hibernate, it is required to create Java classes that represents the table in the database and then map the instance variable in the class with the columns in the database. Then Hibernate can be used to perform operations on the database like select, insert, update and delete the records in the table. Hibernate automatically creates the query to perform these operations.

Hibernate architecture has three main components:

1.Connection Management
Hibernate Connection management service provide efficient management of the database connections. Database connection is the most expensive part of interacting with the database as it requires a lot of resources of open and close the database connection.

2.Transaction management:
Transaction management service provide the ability to the user to execute more than one database statements at a time.

3.Object relational mapping:
Object relational mapping is technique of mapping the data representation from an object model to a relational data model. This part of the hibernate is used to select, insert, update and delete the records form the underlying table. When we pass an object to a Session.save() method, Hibernate reads the state of the variables of that object and executes the necessary query.

You can download new version of Hibernate from here http://www.hibernate.org/
You can download plugins for eclipse, just click here http://www.hibernate.org/255.html

have fun with Hibernate and get new experience with a modern valuable technology.

Friday, May 18, 2007

Connection Pooling

Connection pooling in the JDBC 2.0 extension API is a framework for caching database connections. This allows reuse of physical connections and reduced overhead for your application. Connection pooling functionality minimizes expensive operations in the creation and closing of sessions.


Thursday, April 26, 2007

"Middle way" of Buddhism

One of better thing among billions of things that lord Buddha said is "Middle way" or "Middle path" . Always try to go along middle way on the life. Not the lowest end and also Not the highest end. Then automatically you will get better life with more freedom and without worries. As a human On real life we cannot imitate 100% "Middle way" But always try to do that. Dear friends try it out. Get it.

Wednesday, April 25, 2007

Do you have Any problem with Oracle?

If you have any problem with ORACLE then go to this http://www.asktom.oracle.com
really it is unbelievable and it is a valuable service. You can ask Question and they will answer for that question trough a email withing 3 days. As well as there are lot of valuable existing questions and materials. Hurry up. other vice you will be late because they accept only limited questions for a period.

Music And Mind

Brain scanning has revealed how years of music practice have changed the brains of professional musicians.
Research announced to the American Academy of Neurology annual meeting in Philadelphia, US, has shown how musicians have more "Grey matter" - or brain cells, in certain key regions.

While it is not certain that these differences developed as a result of their musicianship rather than the other way around, it is a strong possibility that the musicians have reshaped their minds over the years.
Professor Gottfried Schlaug, a German expert, looked at 15 professional male musicians, and 15 non-musicians. He used a magnetic resonance imaging (MRI) scanner to chart the various regions of their brains.
The findings were clear-cut: the musicians had more grey matter in at least four regions of the brain.
These are regions that are sometimes associated with skills useful to musicians - for example, the ability to co-ordinate movements in response to visual cues, or process auditory cues.