geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: svn commit: r550656 - /geronimo/server/trunk/modules/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
Date Thu, 28 Jun 2007 04:11:49 GMT

On Jun 26, 2007, at 7:08 PM, Donald Woods wrote:

> Was just going on Kevan's response to YunFeng, that we shouldn't be  
> using printStackTrace() in the code -
> 	http://www.nabble.com/Why-printStackTrace%28%29-in-the-source- 
> codes-tf3975719s134.html

I don't have a problem with logging the stack trace rather than  
printing it to the console, but even printStackTrace IMO is not a  
really big deal since the exception will only occur when someone has  
written a broken integration of something that needs xa.  For  
instance I think openejb mdbs are currently broken this way.

thanks
david jencks

>
> -Donald
>
> David Jencks wrote:
>> I put the stack trace in there so you could find out what is  
>> supplying the non-named xa resource without a lot of guessing.   
>> Why do you think it is not useful?
>> thanks
>> david jencks
>> On Jun 25, 2007, at 6:41 PM, dwoods@apache.org wrote:
>>> Author: dwoods
>>> Date: Mon Jun 25 18:41:48 2007
>>> New Revision: 550656
>>>
>>> URL: http://svn.apache.org/viewvc?view=rev&rev=550656
>>> Log:
>>> GERONIMO-3259 Unuseful exception stack trace in TransactionImpl.java
>>>
>>> Modified:
>>>     geronimo/server/trunk/modules/geronimo-transaction/src/main/ 
>>> java/org/apache/geronimo/transaction/manager/TransactionImpl.java
>>>
>>> Modified: geronimo/server/trunk/modules/geronimo-transaction/src/ 
>>> main/java/org/apache/geronimo/transaction/manager/ 
>>> TransactionImpl.java
>>> URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/ 
>>> geronimo-transaction/src/main/java/org/apache/geronimo/ 
>>> transaction/manager/TransactionImpl.java? 
>>> view=diff&rev=550656&r1=550655&r2=550656
>>> ==================================================================== 
>>> ==========
>>> --- geronimo/server/trunk/modules/geronimo-transaction/src/main/ 
>>> java/org/apache/geronimo/transaction/manager/TransactionImpl.java  
>>> (original)
>>> +++ geronimo/server/trunk/modules/geronimo-transaction/src/main/ 
>>> java/org/apache/geronimo/transaction/manager/TransactionImpl.java  
>>> Mon Jun 25 18:41:48 2007
>>> @@ -708,7 +708,8 @@
>>>              } else {
>>>                  // if it isn't a named resource should we really  
>>> stop all processing here!
>>>                  // Maybe this would be better to handle else  
>>> where and do we really want to prevent all processing of  
>>> transactions?
>>> -                new IllegalStateException("Cannot log  
>>> transactions unles XAResources are named! " +  
>>> committer).printStackTrace();
>>> +                // new IllegalStateException("Cannot log  
>>> transactions unles XAResources are named! " +  
>>> committer).printStackTrace();
>>> +                log.warn("Cannot log transactions as " +  
>>> committer + " is not a NamedXAResource.");
>>>                  return committer.toString();
>>>              }
>>>          }
>>>
>>>


Mime
View raw message