springspring-mvccorba

Spring Batch Bean Scope to convert Legacy Application


We have a legacy normal java application with below architectural flow

Facade ----> Corba remote IIOP Connection --> ServiceCommands

Above architecture we wants to convert as SpringBeans(Spring Boot) and call from MVCController and expose as RESTAPI

MVCController ---> Facade -->Corba Connection -->ServiceCommands

Please advise what is the Bean scope to be used for each layer and best architecture to be followed

  1. Facade class Bean - Scope value="session"
  2. CorbaConnection Class bean Scope value="session"
  3. ServiceClass bean Scope value="singleton"

Solution

  • We have solved the issue by created a Corba connection Pool and make each connection from the pool is a Spring bean with scope "Session". Every session request to corba will be in Proxy mode and commit when the @service finishes. All the properties of pools has been added to maintain idle time and re-connection and return back to the pool after the service finishes. Service and Facade remains singleton bean. Thanks team for the support again to provide idea hints from your experiences.