On 12/17/05, John Patterson <[EMAIL PROTECTED]> wrote:

Ahh yes this does sound like a better approach.  I have never used Spring
before.  a couple of questions:

Can you call multiple operations on your service interfaces in the same
transaction?  Or is this not done?

yes. if you mark your service method as PROPOGATION_REQUIRED it will join a transaction if one exists, or start a new one if one doesnt.

you can also specify what types of exceptions should or should not rollback the transaction, by default any runtime exception will.

spring has excellent documentation of all the propogation modes/exception handling.

it also has excellent annotation support which drastically cuts down on the size of the xml file if you are lucky enough to be building on jdk5.

Can you leave the hibernate session open for the view to be rendered?

yes, you either add an OpenSessionInView filter to web.xml or an OpenSessionInterceptor to the context. both are provided by spring.


wicket-contrib-phonebook is an example of a wicket/spring/hibernate app if you are interested.

we also provide, what i think, is a pretty good spring integration support in wicket-contrib-spring. you can see it in phonebook, the gist is here: http://www.wicket-wiki.org.uk/wiki/index.php/Spring

there is also a wicket-contrib-spring-jdk5 which makes integration even more transparent.

-Igor


Reply via email to