As far as I understand it, XPM preview doesn't read or write anything to or from the main broker database - so there should be no need to have to configure the broker database in the cd_storage_conf.xml file of the Preview web service.

However, every example I've seen has both a preview database and a broker database configured. Is this just a cargo cult thing, or is there a real reason to have both?

2 Answers 2


XPM does read from both databases. We can deduce this because the Staging website has 2 modes:

  • XPM disabled - uses regular DB
  • XPM enabled - uses Session Preview DB

So it is not just a "cargo cult thing."

We can also see from the debug logs that XPM does some interesting triaging between the regular Broker and the Session Preview Broker:

2014-12-11 16:46:24,070 DEBUG ReadMethodHandler - Invoking read method: getPageURL on DAO: com.tridion.storage.persistence.JPAItemDAO@569bfd69
2014-12-11 16:46:24,070 DEBUG AbstractMethodHandler - Original publication ID for write method parameter [non_entity] is 10.
2014-12-11 16:46:24,070 DEBUG AbstractMethodHandler - Session-publication ID for write method parameter [non_entity] is 8.
2014-12-11 16:46:24,071 DEBUG ReadMethodHandler - Session DAO did not return a result, invoking original DAO method: getPageURL.

So it appears that when XPM is turned on on a given page, it stores and loads the items that are being session-previewed from the Session Preview DB and the items that don't need to be re-rendered come from the regular Broker and it merges the results from the two DBs.

  • 1
    That's indeed exactly what I recall Nick: the Session Preview DB acts as an overlay over the regular broker DB for your preview session. Dec 11, 2014 at 21:24
  • Indeed, the staging web application (or the filter/module) needs to read from both. The question is specifically about the configuration of the web service. And there, my "cargo cult" question still stands. Dec 12, 2014 at 8:12
  • Just tried setting the cd_preview_webservice without the main broker storage type. It throws an error, "Storage not available: No Data Access Object Factory" upon accessing a page in XPM mode. Dec 12, 2014 at 15:11
  • You have to have a defaultStorageId, and I think it needs to point to a storage. (And a storage in a wrapper doesn't seem to count.) I've got it running with a filesystem storage pointing to NUL, but I don't know if there are use cases where it might break, or why. Dec 13, 2014 at 8:20

The "preview webservice" as you call it is the regular Content Delivery Web Service (sometimes also referred to as the "OData service") and it does (potentially) a lot more then just deploy session preview content to XPM:

  • access FredHopper system configuration for SmartTarget
  • access broker content via OData
  • likely a hell of a lot more in the future seeing where things are going (note that this is more of a gut feeling from my side than anything confirmed by SDL R&D)

If in your scenario you are interested solely in serving deploying session preview content for XPM you will not need the configuration for the broker database; whether the software will work without it is an entirely different question (to my knowledge the preview webservice needs a correctly configured cd_deployer_conf.xml even though it does not do regular deployments but who knows how all of it works under the hood of the public API? Certainly not me anyway )

Long story short: if you don't need it try without it but remember that is is generally riskier to lead then to follow...

  • 1
    Heard a rumour that the deployer config is needed because of the TCDL transforms (which must then presumably be executed as the content is stored in the preview database). Dec 12, 2014 at 13:48
  • Ah yes of course! Is this used even when the target language is REL and no deploy time transformations take place? Dec 12, 2014 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.