tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karsten Ohme <widerst...@t-online.de>
Subject Re: OpenEJB - Missing required persistence.xml
Date Tue, 19 Feb 2008 03:00:12 GMT
David Blevins schrieb:
> On Feb 16, 2008, at 1:38 PM, David Blevins wrote:
> 
>>
>> On Feb 16, 2008, at 1:22 PM, Karsten Ohme wrote:
>>
>>>
>>>> On Feb 15, 2008, at 2:46 PM, Jacek Laskowski wrote:
>>>> > On Feb 15, 2008 2:37 PM, David Blevins <david.blevins@...> wrote:
>>>> >
>>>> >> The "Auto-commit" error usually means is that either a) only the

>>>> jta-
>>>> >> data-source is configured in your persistence.xml so OpenJPA
>>>> >> incorrectly attempts to use it also as an non-jta-data-source, or
b)
>>>> >> the non-jta-data-source specified is actually a jta-data-source

>>>> (i.e.
>>>> >> a Resource where the 'JtaManaged' property isn't set to 'false')
>>>> >
>>>> > Hi Dave,
>>>> >
>>>> > He had non-jta-data-source only so I think his scenario's b).
>>>> ... [show rest of quote]
>>>> As I described both a) and b) should be impossible in 3.0-beta-2, so
>>>> I'm still very baffled.  Has to be something else.
>>>
>>> I will try again to send the source code as zipped attachment. The 
>>> last times it was always impossible, because it was considered as 
>>> spam. I will have access to the source on Monday again.
>>
>> Great.  You can attach it here: 
>> http://issues.apache.org/jira/browse/OPENEJB-755
>>
>> Sometimes the list refuses to accept attachments.
>>
> 
> On Feb 18, 2008, at 1:57 AM, <Karsten.Ohme@t-systems.com> 
> <Karsten.Ohme@t-systems.com> wrote:
> 
>> I have attached the sample project on 
>> http://issues.apache.org/jira/browse/OPENEJB-755.
> 
> I got the OpenEJB test running smoothly in maven2 and attached a new 
> zip.  I changed the subject of the jira issue as the zip provided did 
> not replicate the "Auto-commit" error message.
> 
> Things I changed:
>  - I did muck with your pom a bit, you don't need any of those changes 
> and can revert back to your other pom -- though the javaee-api dep is a 
> nice all in one dep.
>  - Added a src/main/resources/META-INF/ejb-jar.xml file. Putting that 
> file in src/test/resources doesn't work unless there are also beans you 
> want picked up in your src/test/java dir.
>  - Added managed and unmanaged datasources for your derby and mysql 
> setups.  These will automatically get filled in as the values of 
> jta-data-source and non-jta-data-source respectively, even if you didn't 
> specify them in your persistence.xml.
>  - Changed the persistence unit in the persistence.xml to 
> transaction-type="TRANSACTION" (the default when unspecified).
>  - Added a way for Hibernate to get the transaction manager from 
> openejb.  There might be another way of doing this other than the 
> persistence.xml.  I grabbed the hibernate source and am looking for a 
> better way.  Might be as simple as making it a system property instead 
> of a property in the persistence.xml, didn't try that.
> 
> 
> At any rate, your named queries and persistence does work using hibernate.

Yes, great, it works at home. I'm quite confused. I have to try it again 
at work. Maybe your changes are after all important, maybe there are 
some problems with the imported JBoss libraries.

Thanks,
Karsten
> 
> 
> -David
> 


Mime
View raw message