In the last days and weeks we saw a lot of questions regarding public parts and also regarding class loader issues in WCEM extensions.
Therefore I give here a short overview about the required DC dependencies you have to maintain if you create new or enhance already existing modules.
Actually the most import point is to understand the difference between Build Time and Runtime dependencies.
For the standard module part DC’s (like Metadata, UI and BO part) only the Build Time dependency is relevant.
Let’s take a look to an example of a catalog extension:
In this example you see already a lot of importing things:
- Only use PublicRestricted, PublicStable and ExtensionRestricted and ExtensionStable parts from SAP DC’s.
- Never ever use any assembly parts here
- Internal parts are only allow for SAP internal unit tests
- Add the DC wec/frw/tc/core to have access to web channel framework functionality
If there are still SAP classes missing in SAP public parts, which should be available for extensions, then please raise an OSS message. This is an error, which has to be fixed by SAP.
Important: The SAP public parts are only relevant for the Build Time!
Your DPU DC now defines the runtime dependencies.
Please be aware that every module DPU has its own class and therefore only know classes to which a runtime dependency is maintained. Therefore your DPU should have dependencies to the following DC’s:
- DPU of the module you extend
- the framework “module” wec/frw/tc/core/app, if framework functionality is used
- DPU’s of any module, which you are using directly
Beside this a DPU should than only include your assembly parts.
Never ever deploy SAP assembly parts with your DPU’s.
If you are using JSF objects directly you have also to add the JSF library in the application-j2ee-engine.xml:
<!– JSF 2 Implementation –>
<reference reference-type=”hard” prepend=”true”>
Please use for all other references the DC dependencies instead of entries in the xml.
I hope this blog helps you to create more easily your own modules in the future!