[JBoss-dev] [JBoss JIRA] Commented: (JBAS-1391) Add support for datasource failover

2005-03-21 Thread Adrian Brock (JIRA)
 [ 
http://jira.jboss.com/jira/browse/JBAS-1391?page=comments#action_12316308 ]
 
Adrian Brock commented on JBAS-1391:


I don't like the idea of it always starting from the first url.
Once it has failed over, it should remain sticky on that url until it fails.

With your implementation, if there are three urls with only the last active,
we have to wait for the first two to fail before we can construct a new 
connection.

In fact, it would be better to have a mechansim for the policy to be pluggable
and for that policy to have information from the matchManagedConnection
failures/successes if there is a checkValidConnection config, 
but that it maybe a bit much for the first itertion...?



 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.
 
 Adrian Brock
 Director of Support
 Back Office
 JBoss Inc.
  

-- 
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=6595alloc_id=14396op=click
___
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [JBoss JIRA] Commented: (JBAS-1391) Add support for datasource failover

2005-03-18 Thread Alexey Loubyansky (JIRA)
 [ 
http://jira.jboss.com/jira/browse/JBAS-1391?page=comments#action_12316249 ]
 
Alexey Loubyansky commented on JBAS-1391:
-

First step is done.

- local managed connection factory is added in

package org.jboss.resource.adapter.jdbc.local;
public class HALocalManagedConnectionFactory

it's very simple (even not thread-safe yet)

- ra.xml for this connection factory is added in resources/ha-local-rar
- it's packaged into jboss-ha-local-jdbc.rar
- the datasource is deployed in -ds.xml with ha-local-tx-datasource which has a 
new element url-delimeter

It worked for a simple testcase that I will add to the testsuite. Any remarks 
so far? This is in HEAD only for now.

Thanks.

 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.
 
 Adrian Brock
 Director of Support
 Back Office
 JBoss Inc.
  

-- 
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=6595alloc_id=14396op=click
___
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [JBoss JIRA] Commented: (JBAS-1391) Add support for datasource failover

2005-03-17 Thread Alexey Loubyansky (JIRA)
 [ 
http://jira.jboss.com/jira/browse/JBAS-1391?page=comments#action_12316221 ]
 
Alexey Loubyansky commented on JBAS-1391:
-

I was asked to look into this. Wouldn't it be easier to have a logical 
DataSource that would maintain a list of target datasources? The logical one 
would choose a target ds from the list and try to get a connection. If that one 
fails, it will choose another target, etc.
This way we also don't have connections to different databases in the same pool.

 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.
 
 Adrian Brock
 Director of Support
 Back Office
 JBoss Inc.
  

-- 
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=6595alloc_id=14396op=click
___
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [JBoss JIRA] Commented: (JBAS-1391) Add support for datasource failover

2005-03-17 Thread Adrian Brock (JIRA)
 [ 
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.
 
 Adrian Brock
 Director of Support
 Back Office
 JBoss Inc.
  

-- 
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=6595alloc_id=14396op=click
___
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [JBoss JIRA] Commented: (JBAS-1391) Add support for datasource failover

2005-03-17 Thread Adrian Brock (JIRA)
 [ 
http://jira.jboss.com/jira/browse/JBAS-1391?page=comments#action_12316225 ]
 
Adrian Brock commented on JBAS-1391:


Sean's comment is entirely unrelated to the problem.

He is talking about *restarting* JBossMQ with a new DataSource/ConnectionURL 
manually,
not seemless failover.

If there is a true replicating database underneath this should just work.

However, existing connections to JBossMQ will fail
since the transport is redeployed. This can be detected by the client in the 
usual way.

 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.
 
 Adrian Brock
 Director of Support
 Back Office
 JBoss Inc.
  

-- 
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=6595alloc_id=14396op=click
___
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [JBoss JIRA] Commented: (JBAS-1391) Add support for datasource failover

2005-03-17 Thread Alexey Loubyansky (JIRA)
 [ 
http://jira.jboss.com/jira/browse/JBAS-1391?page=comments#action_12316228 ]
 
Alexey Loubyansky commented on JBAS-1391:
-

You are right, Adrian. I'll look at your first suggestion. Thanks.

 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.
 
 Adrian Brock
 Director of Support
 Back Office
 JBoss Inc.
  

-- 
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=6595alloc_id=14396op=click
___
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [JBoss JIRA] Commented: (JBAS-1391) Add support for datasource failover

2005-03-17 Thread Adrian Brock (JIRA)
 [ 
http://jira.jboss.com/jira/browse/JBAS-1391?page=comments#action_12316230 ]
 
Adrian Brock commented on JBAS-1391:


There is an even more important problem with the DataSource of DataSources
approach.

Any failover will bypass the transaction stickness provided by the
JBossManagedConnectionPool - track-connection-by-tx/ that *must* be
enforced for local resources.

Such a failover mid transaction would lead to unexpected two phase
commits (two connections in the transaction) that will eventually
fail at resource.prepare() time because the 
original connection is broken.
It should really fail early with a transaction rollback/resource exception.

 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.
 
 Adrian Brock
 Director of Support
 Back Office
 JBoss Inc.
  

-- 
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=6595alloc_id=14396op=click
___
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [JBoss JIRA] Commented: (JBAS-1391) Add support for datasource failover

2005-03-03 Thread Sean Boltman (JIRA)
 [ 
http://jira.jboss.com/jira/browse/JBAS-1391?page=comments#action_12315880 ]
 
Sean Boltman commented on JBAS-1391:



In general there appears to be no database failover capability, but in our 
case, our application handles database failover.  There still is a problem 
though, if you are using JBOSS JMS, there is no way to (easily?) tell it to 
failover it's PersistenceManager and StateManager to secondary slave database.

We have experimented with connecting to the Persistence and State Manager 
MBeans and changing the value of the ConnectionManager attribute, but that 
only HALF works... the JMS Queue seems to respect the new JNDI DataSource 
declaration that was put into the ConnectionManager attributes, as JMS tables 
are created and filled in the slave database, BUT the existing JMS Listeners on 
the Queue are still listening for activity on the primary database (which has 
beern shutdown, to simulate failover scenario). Net effect is your JMS 
Listeners never get new work. We suspect that if we recreate all new JMS 
Listeners that things might begin to work again, but wow, what a hassle we have 
gone through thus far to get to this point.

 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.
 
 Adrian Brock
 Director of Support
 Back Office
 JBoss Inc.
  

-- 
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=6595alloc_id=14396op=click
___
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development