Hi everybody,

Yes, I'm aware that this is the typical scenario for a O/R mapping tool
(Hibernate, OJB... you mention it). I've done so in several other
projects. The problem in this case is time: there is not enough to have
training sessions on any of those tools for the members of the
development team; they do not have experience with any of those mapping
tools, many of them not even know the concepts they are base on.
Therefore, I'm somewhat forced to go for the POJO option, despite my
knowing it's not the best / more adecuate one.

Regarding JTA vs JDBC, I understand that using JDBC inevitably forces
you to "hardcode" transction management, and being it distributed (in
some cases) along different objects, it's specially cumbersome and, IMO,
a bad design choice. I believe (from what I've read) that JTA precisely
address that issue.

Again, if I'm wrong, let me know so. In any case, any help regarding
this JTA-related topics would be appreciated.

Thanx and regards.

-----Mensaje original-----
De: Bill Siggelkow [mailto:[EMAIL PROTECTED] 
Enviado el: viernes, 26 de marzo de 2004 19:13
Para: [EMAIL PROTECTED]
Asunto: Re: [OT] JTA, JDBC and data persistence

Freddy, I think you only need to look into using JTA and XA transactions

if you are spanning multiple data sources (databases).  If you are not, 
then I would look into using an Object-relational mapping tool like 
Hibernate or OJB to do what you want to do.  These tools usually provide

  support for transactions, in addition to providing a mapping layer for

your objects.

Freddy Villalba Arias wrote:
> Hello everybody,
> 
>  
> 
> An off-topic question (it's Friday, I hope you accept it!):
> 
>  
> 
> I want to implement a Business Object Model on top of many DAOs. Those
> BOs will be - obviously - related to each other (mainly 1:n and m:n
> relationships).
> 
>  
> 
> I must implement this in such way that, when - for example - deleting
a
> BO that has 3 children associated (therefore, those must be deleted as
> well), it's is possible to do so atomically. That is, I need to be
able
> to delimit the beginning and the end of the transaction that spans the
> delete operation on those 4 objects.
> 

>  
> 
> I want this to be as transparent and "elegant" as possible. I believe
> the right choice for solving this is using JTA objects (that is "XA"
> objects) instead of plain JDBC. I've been reading the API and some
> papers regarding JTA; I have a fundamental doubt:
> 
>  
> 
> Does JTA allows me to delimit (and perform) 2 independent, yet
> concurrent transactions??? For instance: 2 users that click the
"delete"
> button at the same time (it's a web application).
> 
>  
> 
> I haven't seen anything like a transaction ID or similar on any
example
> I've examined. Is this issue transparent to me? Is JTA able, in any
way,
> to differentiate the Transaction begun from each user's corresponding
> instance of the respective BO (the one they wanted to delete... i.e.
the
> father, not its children)???
> 
>  
> 
> I'd appreciate any light you can shed on this matter.
> 
>  
> 
> Thanks and regards,
> 
> Freddy.
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to