Hello Guys,
Well as for today I fixed the problem I was facind thanks to your cooperation. The solution was to do a session.flush() just after the session.save() as Jan Heise suggested.
So for some reason, doing a session.close() just closes the session (it doesn't flush it).
I'm sure this is kind of a hibernate issue, but for the record, and meaby for inclussion in upcoming tutorials or documentations this shuold be considered.
Ahh, by the way it worked just fine with MaxDB and PostgreSQL.
And the fact that I'm modelling entity beans, session beans, value objects, and exeptions in diferent classes don't really afect.
So thanks a lot for your help and comments, I hope this can help us all.
Kind Regards,
Diego Bendlin
PricewaterhouseCoopers - Advisory
Asunci�n - Paraguay
Phone : +595 21 445-003 ext. 1314
Mobile : +595 991 744-220
| Jan Heise <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED] 11/04/2005 11:57 a.m.
|
To: [EMAIL PROTECTED] cc: Diego Bendlin/PY/ABAS/[EMAIL PROTECTED], [email protected] Subject: Re: [Andromda-user] AndroMDA + Hibernate problem (Generated ID's) |
Yes, transactions should be handled by the EAS or Spring. But Diego
wrote of a "client" and
it sounded like it was not part of the stuff generated by Andromda. I'm
using PostgreSQL
and the Spring-Cartridge and did not experience any of the problems
Diego has.
I only had those problems when I forgot to configure transactional
behaviour correctly or in cases
where I had to handle transactions on my own (and forgot them in the
first place) - but always
with other apps, those problems where never related to Andromda.
Jan
Am 11.04.2005 um 17:50 schrieb Wouter Zoons:
> [EMAIL PROTECTED] wrote:
>> Jan,
>> I didn't explicitly configure anything regarding transactions, as a
>> matter of facts I don't remember to see anything about it in the
>> generated files, so for now I have to things to do,
>> 1.- Try with only session.flush() --> I belief this is been executed
>> as a consequence of the call to session.close() in the SessionBean
>> class
>> 2.- Try to open a transaction and then close it.
>> I'll try this things out and let you know.
>> Are transactions somehow configured in the UML model or is it a
>> matter of touching some properties in the project files?
>
>
> You should not worry about transactions when using AndroMDA to
> generate your code: everything in the scope of a service operation
> will by default be in a single transaction
>
> when using Spring transactions are being taken care of by Spring
> itself,
> using Hibernate without Spring will have the EJB service take care of
> transactions
>
> (that's how andromdapp:generates it)
>
> -- Wouter
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Andromda-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-user
_________________________________________________________________
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
