Configuring storage for the Experience Manager Web service

You need to edit the Storage Layer configuration file used by the Content Delivery Experience Manager Web service to configure Experience Manager to store session data in a dedicated database. If you have two or more staging environments, you can also configure load balancing.

Procedure

  1. In the Web application that contains the Experience Manager Web service, open cd_storage_conf.xml (the Storage Layer configuration file) in a plain-text or XML editor.
  2. If the Web application contains only the Experience Manager Web service, remove all references to other databases than the Content Data Store, such as the Outbound E-mail Subscription and Tracking databases, the Archive Manager database, and so on.
  3. In the <Storages> element, add the following <StorageBindings>:
    <StorageBindings>
    	<Bundle src="preview_dao_bundle.xml"/>
    </StorageBindings>
  4. Inside the <Storages> section, add a <Wrappers> section such as the following one (this example configures storage for a SQL Server database):
    <Wrappers>
    	<Wrapper Name="SessionWrapper">
    		<Timeout>120000</Timeout>
    		<Storage Type="persistence" Id="db-session" dialect="MSSQL"
    			Class="com.tridion.storage.persistence.JPADAOFactory">
    			<Pool Type="jdbc" Size="5" MonitorInterval="60" 
    				IdleTimeout="120" CheckoutTimeout="120" />
    			<DataSource Class="com.microsoft.sqlserver.jdbc.SQLServerDataSource">
    				<Property Name="serverName" Value="myserver" />
    				<Property Name="portNumber" Value="1433" />
    				<Property Name="databaseName" Value="mydb" />
    				<Property Name="user" Value="admin" />
    				<Property Name="password" Value="kumquat" />
    			</DataSource>
    		</Storage>
    	</Wrapper>
    </Wrappers>

    If you are connecting to Oracle RAC, use the property name serviceName instead of databaseName.

    The Storage element in this fragment must refer to your Experience Manager database.

  5. To configure load balancing, do the following:
    1. In the <Wrapper> element, add a <MachineName> element specifying a logical name:
      <Wrappers>
      	<Wrapper Name="SessionWrapper">
      		<MachineName>MachineName</MachineName>    
      		<Storage>
      			...
      		</Storage>
      	</Wrapper>
      </Wrappers>
      The maximum length of the <MachineName> element is 100 characters and the value needs to be unique for each Web application in the load balanced environment.
    2. Configure the same database in the cd_storage_conf.xml for all Web applications in the load balanced environment.
  6. Save and close cd_storage_conf.xml.
  7. In your Web application server, ensure that your Java Virtual Machine (JVM) is called with the correct file encoding by setting the file.encoding property. In a .NET Web application, you can set this property in the jvm.xml file of your Web application. On a Windows machine, you can also choose to set this property system-wide in your registry. Refer to your Web application server documentation for more information.
  8. If you store content in a database, and your Content Delivery session preview Web service Web application does not already contain a license file, ensure the presence of a Content Delivery license file, typically called cd_licenses.xml, in the WEB-INF/classes/ (Java) or the bin\config\ (.NET) subfolder of the Web application.