| 121 | | if (dm.isLifeCycleLoaded()) { |
|---|
| 122 | | try { |
|---|
| 123 | | docCurrentLifeCycle = dm.getCurrentLifeCycleState(); |
|---|
| 124 | | } catch (ClientException e) { |
|---|
| 125 | | log.warn("Cannot get additionial document model properties."); |
|---|
| 126 | | } |
|---|
| 127 | | } else { |
|---|
| 128 | | try { |
|---|
| 129 | | docCurrentLifeCycle = getCoreSession().getCurrentLifeCycleState( |
|---|
| 130 | | dm.getRef()); |
|---|
| 131 | | } catch (Exception e) { |
|---|
| 132 | | log.warn("Cannot get life cycle ..."); |
|---|
| 133 | | } |
|---|
| 134 | | } |
|---|
| 135 | | |
|---|
| 136 | | // ACP |
|---|
| 137 | | |
|---|
| 138 | | try { |
|---|
| 139 | | docAcp = dm.getACP(); |
|---|
| 140 | | } catch (Exception e) { |
|---|
| 141 | | log.error("Cannot get ACP from dm..."); |
|---|
| 142 | | } |
|---|
| 143 | | |
|---|
| 144 | | // XXX seems we do have a problem in async with this. |
|---|
| 145 | | if (docAcp == null) { |
|---|
| 146 | | log.warn("Refetching ACP from the core... Hidding something wrong core side."); |
|---|
| | 121 | |
|---|
| | 122 | if (isBoundToIndexingThread()) |
|---|
| | 123 | { |
|---|
| | 124 | // don't use the dm.getClient |
|---|
| | 125 | // 1 - session may be closed => it will create a leaked session |
|---|
| | 126 | // 2 - sid asociated to the dm may be associated with a user with not enought rights |
|---|
| | 127 | if (dm.isLifeCycleLoaded()) { |
|---|
| | 128 | try { |
|---|
| | 129 | docCurrentLifeCycle = getCoreSession().getCurrentLifeCycleState( |
|---|
| | 130 | dm.getRef()); |
|---|
| | 131 | } catch (Exception e) { |
|---|
| | 132 | log.warn("Cannot get life cycle ..."); |
|---|
| | 133 | } |
|---|
| | 134 | } |
|---|
| | 135 | |
|---|