Configuring storage for the Experience Manager Web site extension
You need to edit the Storage Layer configuration file used by the staging Web site to configure the Experience Manager Web site extension to store session data in the dedicated database you created earlier. If you have two or more staging environments, you can also configure load balancing, but that does mean that you need to use a dedicated database.
Procedure
- Open cd_storage_conf.xml (the Storage Layer configuration file) on your staging Web site in a plain-text or XML editor.
- In the
<Storages>element, add the following<StorageBindings>:<StorageBindings> <Bundle src="preview_dao_bundle.xml"/> </StorageBindings>Note:preview_dao_bundle.xmlis bundled in thecd_session.jarfile. - Inside the
<Storages>section, add a<Wrappers>section such as the following one (this example configures 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
serviceNameinstead ofdatabaseName.The
Storageelement in this fragment must refer to the database you created when you set up the Experience Manager Web service Server Role. (You can copy the element from the Web service's storage configuration file.) - To configure load balancing, do the following:
- In the
<Wrapper>element, add a<MachineName>element specifying a logical name:
The maximum length of the<Wrappers> <Wrapper Name="SessionWrapper"> <MachineName>MachineName</MachineName> <Storage> ... </Storage> </Wrapper> </Wrappers><MachineName>element is 100 characters and the value needs to be unique for each Web application in the load balanced environment. - Configure the same database in the
cd_storage_conf.xmlfor all Web applications in the load balanced environment.
- In the
- Save and close cd_storage_conf.xml.
- 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.
- If you store content in a database, and your Content Delivery staging Web site 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.