How can I integrate SmartClient with Spring to use later's intercepting mechanism

hi,
I just got a requirement to catch java runtime exceptions in a unifrom way without those DMI javabeans knowing.
I am now using datasource DMI way to handle client-side requests. those DMI javabeans need to invoke middle-layer services to fetch data back. So the point is how can I catch those common runtime exceptions, such as SQLException, in one place and without DMI javabeans knowing to put some information back into Response.
As the document says, SmartClient can integrate with Spring, so I think I may use Spring’s exception intercepting mechanism to uniformly handle middle-layer exceptions throwing and put some error message into the PRCResponse.
so here are my questions :

  1. is what I thought a right way to solve my problem ?
  2. is there any example to show how to integrate with Spring in detail ?
  3. any further tips ?

thanks :slight_smile:

Hi Dan,

  1. Yes, you are on the right track

  2. There’s a Spring Overview, and you will find a complete Spring example in the “Examples”->“Server Integration” folder accessible from the SDK start ppage.

  3. No further tips other than what’s in the Spring overview, but feel free to ask more questions

how to realize Spring Datasource DMI

According to the example “Spring DMI (Direct Method Invocation)” ,
I’ve learnt how to integrate Spring with RPC DMI,
however , I don’t know how to make Spring support DataSource DMI yet. Since some components like tree, grid can only run smoothly with DataSource DMI support, so I hope you can give me some demonstration to this problem.

Immediately beneath the example called “Spring DMI (Direct Method Invocation)” is another called “Spring DataSource Integration using DMI to Hibernate” - take a look at that one.