openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject Re: Exception translation by EntityManager facade
Date Thu, 29 May 2008 23:28:56 GMT
I agree that subtypes are compliant.

In OO programming terms, strictly speaking, an instance of a subclass  
of TransactionRequiredException *is* an instance of  
TransactionRequiredException. The instance of the subclass passes the  
"instanceof" and the .isInstance() tests.

If this were not the intent of the specification, then I guess that  
TransactionRequiredException would have been marked "final".

Craig

On May 28, 2008, at 6:47 PM, Patrick Linskey wrote:

> I believe that subtypes are compliant.
>
> -Patrick
>
> On May 29, 2008, at 6:57 AM, Pinaki Poddar wrote:
>
>>
>> Hi,
>> Currently, EntityManager facade translates exceptions raised by  
>> kernel
>> using a RuntimeExceptionTranslator that passes through any  
>> exception whose
>> class name starts with "org.apache.openjpa.persistence."
>>
>> This policy, thereby, produces user-visible exceptions that are not
>> *strictly* what JPA spec says (though loosely they are, because  
>> many of
>> these pass-through OpenJPA-specific exceptions inherit from their
>> JPA-defined counterparts). Does spec say something about the exact  
>> runtime
>> type of raised exception by EntityManager methods, for example,  
>> will a
>> subclass be spec-compliant?
>>
>> I don't seem to locate any statements w.r.t. above question.
>>
>> Regards --
>>
>> Pinaki
>> -- 
>> View this message in context: http://www.nabble.com/Exception-translation-by-EntityManager-facade-tp17521307p17521307.html
>> Sent from the OpenJPA Developers mailing list archive at Nabble.com.
>>
>
> -- 
> Patrick Linskey
> 202 669 5907
>

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Mime
View raw message