Hi folks, No answers at all?
On Oct 16, 8:30 am, MarcRic <[email protected]> wrote: > Hi folks, > > Let me ask for a little help. I would like to know how this situation > could be handled in Rails. > > Here is the point: I have an application (Java nowadays) that uses two > master resources: a Data base and an > ECMhttp://en.wikipedia.org/wiki/Enterprise_content_management. > > In situations like that, generally the user selects the document to be > stored (PDF, IMAGE, DOC, etc), the application stores it in the ECM, > getting the DOC_ID, and writes a DOC_ID reference in the database in > one or more of the business model tables. > > And here comes the problem. There is not a unified transaction control > between the database and the ECM. > > Theoretically the act of writing in the ECM and the act of writing in > the database should be under the control of the same transaction. Any > problem and EVERYTHING should be undone. > > In Java, that is easy, well, better to say feasible, because the > solution was using EJBs. I have created an EJB for each writing, one > EJB for writing in the ECM and other for writing in the database, and > a third to group the previous two. That way, this third EJB becomes > responsible to the whole transaction control. > > How could it be done in Rails? Should I control it manually? Or does > Rails have any kind of transaction control container that can handle > this? > > In this example, if something goes wrong in the last writing action > (which depends on how the ECM works), the first writing action should > be undone by the application? > > Thanks. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

