On 2002.08.30 17:00:55 -0400 "Jean-Louis, Erwin" wrote:
> 
> We are migrating from Weblogic to JBoss and looking for the best way to
> implement the following features provided by Weblogic.
> 
> 
> 1. Testing connections on Reserve. Each time a user asks for a
> connection,
> we execute some simple SQL to ensure it is a valid connection.

Really, how much does this give you? If something breaks, isn't it just as
likely to break while the user has the connection?

> 2. Periodic testing of JDBC Connection Pools to ensure the connections in
> the pool are valid.

Why do you want/need this if you have (1)?

> 3. Fail-over of JDBC Connection Pools. Specify primary/backup connection
> pools

Please explain what this entails.  What happens if a db server crashes
while 200 transactions are active?  Is this supposed to be poor mans
clustered db server?

> 4. Creating Sybase Temp tables when a new connection is created.

Would this be connection handle or physical/managed connection?  What good
are they if you are using xa and a given transaction may be doing work over
many connections?

> 
> Are there any JCA compliant  implementations we can use? 

no

If not, what is
> the
> best way to approach the problem.

JBoss already has an idle timeout you can set in the pool, so if you know
your db kills connections silently after 15 minutes of inactivity you can
have jboss discard them before this.  However, this probably won't be
enough for you.

The jca spec requires adapters to fire a ConnectionError event if the
connection dies, however due to the combination of sql and jdbc specs this
cannot be detected in a uniform manner.  Therefore it is currently possible
for dead connections to be passed out again.  I have been hoping people
will write vendor specific extensions to the jca-jdbc wrappers to determine
from the vendor-specific sql/jdbc error messages whether the connection is
dead and should be discarded.  So far no one has taken me up on this, but I
think it would be easier and possibly more useful than implementing the
things you are suggesting.

In case you don't want to do that:-)) or it doesn't satisfy your
requirements...

(1) could be done in the jca adapter in
ManagedConnection.createConnection(): before you create a connection
handle, test the underlying connection.  You could probably specify the sql
as a ManagedConnectionFactory property.  I guess if it failed you'd discard
the underlying jdbc connection and try to get a new one??  What do you do
if you are in the middle of a transaction?

(2) would require writing a new pool or modifying
InternalManagedConnectionPool (part of the jboss server jca framework). 
Fortunately it's fairly pluggable.

(3) You might be able to do similarly to (1), but I don't understand the
requirements enough to be sure.

(4) could be done in the jca adapter, either in the constructor to
ManagedConnection or the ManagedConnection.createConnection method.

david jencks

> 
> Thanks in advance
> Erwin
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by: OSDN - Tired of that same old
> cell phone?  Get a new here for FREE!
> https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 


-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to