database failover for Entity Beans

Discussions

EJB design: database failover for Entity Beans

  1. database failover for Entity Beans (7 messages)

    Greetings all,

    I have an Entity Bean in a cluster, pointing to a primary database. However I also have a replicated secondary DB in case the primary goes down. How do I dynamically make my Entity Bean switch to the secondary DB? What cd be the issues involved?

     Is this possible in any specific App server, or via some design pattern, or am I barking up the wrong tree ?? ;)

    thx in advance,

    S.
  2. Hi!

    I think the best way is to solve this problem on the database side, adn not involve the application server at all. This can be done by having two database servers behind hardware switches. If you have an Oracle database, I know such solutions exist.

    The application server will speak to one IP address (physicaly the switch) and the database will look like single machine.

    This will cost you some hardware, but you avoid software implementation of a standard problem. You will save money in implementation, but most of all when maintaining the code.

    /Tomas
  3. database failover for Entity Beans[ Go to top ]

    Fail-over cluster software running in hot-standby mode does that for any database (or any server software, for that matter), but, I was not aware of a hardware solution. Which kind of switch are we talking about? L7 content-switches?

    Could you name the vendor and the model for Oracle?

    I have a few clients who are paying big bucks for cluster software licenses annually and naturally do not like it.
  4. In this case, the issue I belive wd be to maintain consistency of data, as the transactions may be talking to either of the databases.
  5. Hi ,

    Transparent Application Failover (TAF) or simply Application Failover is a feature of the OCI driver. It automatically reconnects to a database if the database instance to which the connection is made goes down. The link illustrates the Support for TAF in JDBC OCI Drivers. It also illustrates the registration and operation of Oracle JDBC OCI application failover callbacks with the help of call back functions.

    Link is as follows,

    http://technet.oracle.com/sample_code/tech/java/sqlj_jdbc/files/9i_jdbc/OCIdriverTAFSample/OCIdriverTAFSample.jar


    Hope this helps.

    Regards,
    @bhijit
  6. In this case, my concern is that the database may be down for say 10-15 mts, during which though the connection is retried again it will still fail. However I wd like to maintain continuity of business and if need be connect to a replicated DB. Does the Transparent Application Failover feature allow connecting to another DB?
  7. WebLogic 7.0 has a feature called multipools which
    is a pool of JDBC pools .
    If one of the pool loses connection to DB, multipool
    would automatically switch to the other pool pointing
    to the backup database.
  8. database failover for Entity Beans[ Go to top ]

    Multipools in WLS 7.0 cannot be used in a cluster setup. Using multipools may also cause other problems like synchronization/replication of the different databases. The best way is to solve it in the DB side, but will be incurring higher cost.