Impact of new Intershop sales channel
Support for multiple sales channels on the same infrastructure is one of the most important features of Intershop e-Commerce solution for large enterprises. Since new channels can be developed and maintained by independent teams, it is important that a newcomer adopts some important “social” rules of good behavior, as in human social groups.
When introducing a new channel to existing installation, a special attention must be paid to the interaction with other sites/channels. There are common resources – such as database, global properties, tax, currency and payment definitions – everything which might affect the functionality and regular behavior of other sites. (Site and channel terms are interleaved in this article, but generally new channel introduction refers to adding new internet site. Depending on other structures, this can initialize more than one site in Backoffice.)
This article highlights potential problems that can introduce problems in the existing channels after the new channel has been initialized.
The JAR files compatibility – class loading
Like in standard JEE web applications, pipelet classes and resulting JSP classes are loaded per channel – in separate class loaders. However, other java classes (like classes from used libraries) on an Enfinity installation are shared and loaded by the same class loader. The order of cartridge library directories searched for classes depends on the order of cartridges defined in cartridgelist.properties file. This means that only one library version is allowed to be loaded and therefore used by all sites.
Therefore, the very first rule is that new channel should not introduce new version of libraries that are already used in other cartridges including system cartridges. Otherwise, the errors in new channel or existing channels functionality will show up (depending on where in cartridgelist.properties did one put new cartridge). To avoid described problems, the best way is to check up if the desired library is already in use and agree with others about the used version.
Properties problem
Enfinity implementation of properties defines that each property has a default property value. If property is not overridden on site level, system uses default value from property definition. A problem can arise when a new channel changes the property default value, and this property is not overridden on site level – in this case all sites will use new value. Other possibility is to reset property value regardless of its domain during new channel initialization process – this also changes property value for all other channels as well. Thus the stability of all sites on the Enfinity installation is affected causing errors and weird behavior across various functions, such as ordering, basket, product, auctions, bonuses, gift certificates etc.
Thus initialization of a new channel one should not rely on changing the shared properties, but define the custom ones for the new site individually. However, if the previously mentioned disaster happens – the global properties must be restored to the previous version as soon as possible.
Tax, currency and localization
Intershop supports internationalization, and as such, enables locale, currency and tax definitions for various localities which are afterwards replicated (or assigned) on each site initialized. These definitions can be set using DBInit mechanism or through a set of several properties files (Activecurrencies.properties, Localization.properties and Taxdataset.properties). When the application server is restarted, it will check if the properties file was changed. In case it did, the values from the properties file are read, stored into the database and applied on the system; otherwise the existing database values are used. DBinit mechanism triggers similar functionality.
Thus the new channel initialization procedure should not define only the values needed for the channel. It must append these values to already initialized and active ones. Forgetting to do so results in the system damage and making other channels mal-functional.
URL rewriting
A common mistake is usage of relative (context related) URL rewrites, that seem to function properly when tested on a single channel, but can cause a collision with rewrites used on other sites. More on URL rewrite pitfalls you may find on the following blog.
Conclusion
A new channel initialization must be carefully planned process. By taking care of these common issues during the development phase, system layout and libraries should match the production (or test) as much as possible. Testing channel initialization is such environment should rule out lot of the problems described here. It is also recommended that system integration testing of the new channel includes a regression test of the existing channels, in order to avoid surprises in the production environment.