We have a Problem of Data Access to Multiple Data Sources (Siebel,Active Directory , Oracle ) simlatenously. Client should not be aware of which Datasource we are using.Flexiblity of adding new Data Sources to application.Flexiblity of Switching the Data Sources using Configuration.

In Our Approach we will be using IConnection Interface, which will encapsulate the methods for Data Operation, Add, Update, delete, execute and get. Different type of connection can have the concrete implementation differently.

The Concrete Connection for Java Data Bean Implementation will have the implementation of Data Operation using Java Data Bean. It will be using SiebelConnectionManager to get the physical connection from the Siebel.

The DAO will be calling Connection Factory which Returns the instances of Concrete IConnection Based on Parameter passed, eg. JDBConnection, SiebelWeBservicesConnection, SiebelBusinessServicesConnection, Oracle Connection. The Parameter are the key to the Mapping which determines which Connection Implemntation is used.

Using the Concrete connection DAO will call the data base operation on the connection.

We have a Problem of Data Access to Multiple Data Sources (Siebel,Active Directory , Oracle ) simlatenously. Client should not be aware of which Datasource we are using.Flexiblity of adding new Data

It seems to me that the below defeats the above.

The DAO will be calling Connection Factory which Returns the instances of Concrete IConnection Based on Parameter passed, eg. JDBConnection, SiebelWeBservicesConnection, SiebelBusinessServicesConnection, Oracle Connection. The Parameter are the key to the Mapping which determines which Connection Implemntation is used.Using the Concrete connection DAO will call the data base operation on the connection.

Its said that if it is a pattern then it is nothing new it is an age old solution. Following this idiom, what you trying to do not qualify as any pattern. What you are doing out of track is:"In Our Approach we will be using IConnection Interface, which will encapsulate the methods for Data Operation, Add, Update, delete, execute and get." What is the motivation of putting CRUD operation methods in IConnection interface?

Your problem can be solved by the two standard data access pattern: 1. Data Access Object - J2EE pattern 2. Factory - Java pattern 3. Program to an interface - basic design principle1.Define DAOs with interfaces so that the concrete implementations are available only through DAO factory based on your configuration2.Let your concrete implementation know about its specific connection type3.Its better if you have a service locator which returns the data source to some connection util/helper, which you use in your daos to get connection handleSo its simple. Lets not complicate matters

TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations technology projects - with its network of technology-specific websites, events and online magazines.