cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <>
Subject Re: Experiences on integrating cforms and other frameworks like hibernate
Date Wed, 13 Sep 2006 07:13:33 GMT
Rice Yeh wrote:
> Hi,
>   I am starting to use cform to implement web application and I have 
> applied MVC design pattern to the domain problems based on cocoon and 
> cforms. I separate sitemaps into 2 types. The first type is the 
> controller which invokes functions in javascript. The second type is the 
> view that is invoked by functions in javascript to show gui to users. 
> Then I come to a problem that although cocoon 2.2 has spring  framework 
> in place but I cannot use it to set  transaction attributes 
> declaratively supported by spring framework because I cannot use 
> functions in javascript as join point. Actually, I like to write 
> flow-like business logics in javascript functions. It is so straight 
> with the help of flowscript. I treat each function in javascript like a 
> flow in a use case. However, many techniques used to work in java 
> language has to be reconsidered like to the above example. For the above 
> example, I am considering to use aspectj or spring aop to advice the 
> map:call (of coure, its java implememtation) to begin a transaction and 
> the sendPage() to commit the transaction based on a parameter passed 
> within map:call which tells the code in the advice whether the 
> javascript function needs a transaction.
> The most examples I can get in cform are not needed to access db. So 
> could you guys share your experiences on integrating cforms and other 
> frameworks like hibernate and springframework?
You should write services with help of spring and make them 
transactional. Your controller does not need make use of transactions.

Leszek Gawron, IT Manager                          MobileBox sp. z o.o.
+48 (61) 855 06 67                    
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

View raw message