geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sara T <sara.tas...@insiel.it>
Subject Re: How can I set ExceptionSorterClass property for my database pool?
Date Tue, 29 Apr 2008 10:38:04 GMT


Thank you very much for your answer.  

I've got another question, to understand how exception transaction
management works: why does ra.xml set ExceptionSorterClass property as
org.tranql.connector.AllExceptionsAreFatalSorter by default in
tranql-connector-ra-1.3.rar? 

This is my situation: my database is Oracle Thin type, so if I deploy it
using Geronimo console, TranQL Generic JDBC Resource Adapter is used for the
pool. 
There’s a problem with my application when, for exemple, there are two
update instructions in one transaction and the second one catches an
SQLException (ex: invalid sql). 
In this case the second update isn’t committed, but the first one is. 
I think (but it’s true?) that is because connectionError method in
org.tranql.connector.AbstractManagedConnection checks if exceptionSorter is
fatal. 
In this case connection is returned and cleanup method in
org.tranql.connector.jdbc.ManagedJDBCConnection class is called: in this
method  physical connection is committed  (setAutoCommit(true)). 
Otherwise (if exceptionSorter isn’t fatal) I could catch it in my
application and call rollback for the connection before that clean method is
called.

Do you think that this could be my case?
Is it right to set ExceptionSorterClass property as
org.tranql.connector.NoExceptionsAreFatalSorter  to call rollback from my
application in exception case (and so deploy my database manually
using a deployment plan, as you said in your previous answer) ?
Is there any way to do it using Geronimo console?


Thanks for your time!

Sara




djencks wrote:
> 
> 
> On Apr 23, 2008, at 7:43 AM, Sara T wrote:
> 
>>
>> Hi all,
>>
>> I’m new with Geronimo and I need your help to configure my database  
>> pool.
>> In particular I’ve seen that if deploy database pool through the  
>> Geronimo
>> console, by default ExceptionSorterClass property is set as
>> org.tranql.connector.AllExceptionsAreFatalSorter: I need to change  
>> it in
>> org.tranql.connector.NoExceptionsAreFatalSorter.
>>
>> Which is the best way to do that?
> 
> The very best way to do this is to write a database-specific wrapper,  
> such as tranql has for derby, db2, postgres, mysql, and oracle.  Many  
> databases have XADatasources or PooledDataSources that already notify  
> the environment in case of a fatal connection error, and using one of  
> these avoids the obvious problems with both provided exception sorters.
> 
>> Should I change it in
>> tranql-connector-ra-1.3.rar\META-INF\ra.xml file and then use Geronimo
>> database pool wizard or create my plan and deploy the pool via the
>> command-line deploy tool?
>> In this second case what happens if, after the deploy, I change other
>> properties using the Geronimo console? ExceptionSorterClass property  
>> can be
>> overwritten with the default value? (I don’t know where pool  
>> properties are
>> saved).
> 
> You should set the class in your geronimo plan. After deployment the  
> new value will not be overwritten by changes you make though the  
> console.
> 
> Let us know if you have further problems
> thanks
> david jencks
> 
>>
>>
>> Thanks and sorry for my english!
>>
>> Sara
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/How-can-I-set-ExceptionSorterClass-property-for-my-database-pool--tp16834635s134p16834635.html
>> Sent from the Apache Geronimo - Users mailing list archive at  
>> Nabble.com.
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-can-I-set-ExceptionSorterClass-property-for-my-database-pool--tp16834635s134p16957612.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message