cancel
Showing results for 
Search instead for 
Did you mean: 

How to introduce new MVC Interceptor to OCC extension?

ericyew94
Discoverer
0 Kudos

I am currently performing an upgrade from the OCC addon to the OCC extension (https://help.sap.com/docs/SAP_COMMERCE/e5d7cec9064f453b84235dc582b886da/d46d19516961438f8939718e87ed...

Before the upgrade, the web context sits on our custom addon. Hence, we can freely add custom mvc interceptors as we want. After the upgrade (with the new OCC extension), we no longer have the web context as we are supposed to rely on the OOTB 'commmercewebservices' web context now. Hence, I am trying to include a custom interceptor to via my custom occ extension's dummyocc-web-spring.xml (I have verified, it is in a correct location). However, my custom interceptor isn't picked up at all.. 

dummyocc-web-spring.xml

<mvc:interceptors>
<ref bean="dummyCatalogVersionInterceptor" />
</mvc:interceptors>

May I ask is it even possible to add a custom mvc interceptor with the new architecture of the OCC extension? Is this the right approach? 

Accepted Solutions (0)

Answers (1)

Answers (1)

adamreisberg
Active Participant

Hi @ericyew94 

You'll either want to consider one of two things:

  1. On your new yocc-generated extension, look to use Spring AOP (instead of MVP interceptors) to handle your requirements
  2. Instead of using an yocc-generated extension, consider using an ywebservice-based extension - Use ywebservices Extension | SAP Help Portal
ericyew94
Discoverer
0 Kudos
Hello Adam, thank you for your answer! I just came to know that b2bocc extension is also using AOP for something similar. I will have look at that. I appreciate your help!