Saturday, April 25, 2009

Using WCM API in EJB

When accessing the WCM API through the use of an EJB, the transaction type of the EJB should be set to Bean managed, and not Container managed
Technote (FAQ)


Cause
When accessing the WCM API through the use of an EJB, if the transaction type of the EJB is set to Container Managed, the API does not work as expected and will throw following exceptions in logs.

ContentServic E Error while calling a function updateItems of PLS data manager.: Error while calling
a function updateItems of PLS data manager.
javax.jcr.StaleValueException: Error while calling a function updateItems of PLS data manager.: Error while calling a function updateItems of PLS data manager...

Answer
Set the transaction type of the EJB to Bean managed, and not Container managed, while accessing the WCM API through the use of EJB