We use spring 4.3 and spring boot version 1.5 in our java based web application. For (product) analytics purposes we want to read the metadata of our product which is persisted in an RDBMS store (Oracle). Our application uses spring framework to define services that access the database through hibernate (jpa). These services add business logic to the data and return the response to the UI layer.

For analytics purposes we want to read the product metadata which involves mashing up calls to various spring based services. The constraints for coming up with a solution are

  1. We don't want to add this logic inside the application to avoid any code changes to the application. It will bind us to the application release cycle and client upgrades which may make us wait for 2-3 months for each metric. We want a quick way to fetch the metadata from outside the application.
  2. Defining REST based api's for these spring services is also not an option. It has the same cons as #1. Additionally it would add time to implement them.
  3. The analytics application needs to fetch this metadata from multiple application deployments(for different customers) which are on different software versions.
  4. We cannot connect directly to the database since we want the results after the business logic is applied by the service layer in java.

What are the possible ways to pull out analytics metrics give the above constraints?


  • Do you consider bytecode manipulation techniques to be code changes? – JimmyJames Jul 19 '18 at 14:43
  • No, if they can be done by remotely connecting to the application. How do you call spring services remotely through bytecode manipulation? Our use case is a read only usecase which does not change the application flow. – Andy Dufresne Jul 20 '18 at 4:56
  • @JimmyJames - Do you thing spring remoting could be helpful for this use case? – Andy Dufresne Jul 20 '18 at 5:48
  • I don't think there's any way to do this without modifying the executing program in some way. You could use some sort of AOP tool to do this without modifying the source code but it would still need to modify the application where it is running. – JimmyJames Jul 20 '18 at 13:28
  • An initial overview of spring remoting indicates that there would be a one time effort of adding certain beans to the spring config but after that it would mean keeping the interfaces in sync between the server and client. I will try and perform a POC and understand if it suits our needs. Any comments/suggestions would be appreciated. – Andy Dufresne Jul 23 '18 at 6:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.