[ 
http://jira.jboss.com/jira/browse/JBAS-1391?page=comments#action_12316223 ]
     
Adrian Brock commented on JBAS-1391:
------------------------------------

First, it is better to discuss the design in the dev forums.

To answer your question Alex, it can be done both ways. 
The DataSource of DataSources idea is lot more consistent
(you don't get a mixture of connections in the pool)
in the event of failover, however it has a number of technical problems.

1) It cannot be extended easily to introduce load balancing later
2) Identifying that a DataSource is down is harder, versus the rar that
can look at the real connection failures. e.g. maybe you can't get a connection
because all the connections are checked out and you hit the timeout
or some other temporary failure that should not cause failover
of the DataSource?
3) Configuring mulitple datasources is a pain
4) How do you manage the dependencies of the DataSource, i.e. how does
it wait for the sub DataSources, does it get undeployed if one of them
goes away?
5) How do you manage the dependees of the DataSource? There are a
number of services that depend upon the DataSourceBinding getting injected
across JMX so they don't try to use the DataSource until it is available.


> Add support for datasource failover
> -----------------------------------
>
>          Key: JBAS-1391
>          URL: http://jira.jboss.com/jira/browse/JBAS-1391
>      Project: JBoss Application Server
>         Type: Feature Request
>   Components: JCA service
>     Versions: JBossAS-4.0.1 Final,  JBossAS-3.2.7 Final
>     Reporter: Scott M Stark
>     Assignee: Luc Texier
>      Fix For: JBossAS-4.0.2 Final

>
>
> The change to 
> org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory
> is easier than org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory
> In LocalManagedConnectionFactory add a property "delimiter"
> which when present will parse the connectionURL into multiple urls.
> In XAManagedConnectionFactory you will also need a property to identify which 
> of the xaProps needs to be parsed for mulitple urls.
> i.e. you need to identify which property contains the server to contact.
> In both cases, if createManagedConnection fails for the first url, replace it 
> with the second url, and try again until all urls are exhausted.
> Of course, you can get clever and remember which urls are currently failing 
> and try the non failing urls first, And also if the db is replicating, you 
> might want it to "load balance"
> connections across the urls?
> Also, this design does not allow for using different properties with 
> different db servers, e.g. user and password might change across the servers.
> It also doesn't enforce that only connections from one connectionURL (db 
> server) are in the pool at the same time in the event the db is not 
> replicating.
> If you are going to do this, I would suggest you subclass/replicate the 
> managed connection factories and create separate rars so we can mark them as 
> experimental.
> xxxxxxxxxxxxxxxxxxxxxxxx
> Adrian Brock
> Director of Support
> Back Office
> JBoss Inc.
> xxxxxxxxxxxxxxxxxxxxxxxx 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.jboss.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to