Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Custom scope using Spring 2.x

Aditya Jha
Ranch Hand
Posts: 227
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Spring 2.0 introduces custom scope definition for beans.

In our application, we have a scenario where a use-case starts processing from either of a Message-Driven POJO, a Quartz Job or a Web-Service POJO and subsequently covers few layers like transactional facade, BO and DAO. The request (invocation) is encapsulated in a value-object (DTO) which is then transferred to subsequent layers. This object is supposed to be living till the request processing goes on (till the invocation to subsequent layers returns back to originating artifact (MDP, Job or WS)).

My question is, can I create something like a 'Use-Case Request Processing Scope' to define the scope of request processing explained above? If yes, then with every new invocation, I would like to inject the (proxy of) value-object to the 'beans' representing initial layers of the application.

I hope the scenario is clear enough.

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic