cancel
Showing results for 
Search instead for 
Did you mean: 

share-config-custom.xml

mrgrechkinn
Champ in-the-making
Champ in-the-making
Hello,

I have a question about share-config-custom.xml. I created a new custom config and add it to share.war, then I deploy it, but I can't log in to share. After research, I found that share can't find remote endpoints, that declared in share-custom-config.xml but in ..\tomcat\shared\alfresco\.. folder.
And a question: Can be two share-custom-config.xml files, or just one? Will deployed first found or both?

Eugene
7 REPLIES 7

mitpatoliya
Star Collaborator
Star Collaborator
No,multiple share-config-custom.xml is not supported I think.
It will not give any exception but it simple override one another based on the location where they are placed.
Also, remote end points need to configure only in case share and alfresco dm is deployed at different remote servers.

mrgrechkinn
Champ in-the-making
Champ in-the-making
It will replace if use "replace=true" attribute?

mitpatoliya
Star Collaborator
Star Collaborator
No,It is for overriding particular config.
But when you have multiple files. One file will completely override another.

mrgrechkinn
Champ in-the-making
Champ in-the-making
So I have two custom config files now.

share-config-custom #1

<config [b]replace="true"[/b]>
  <header>
    <app-items>
      …
    </app-items>
    <user-items>
      …
    </user-items>
  </header>
</config>
<config evaluator="string-compare" condition="Workflow">
  …
</config>


share-config-custom #2

<config [b]replace="true"[/b]>
  <header>
    <app-items>
      …
    </app-items>
    <user-items>
      …
    </user-items>
  </header>
</config>
<config evaluator="string-compare" condition="RepositoryLibrary">
  …
</config>

When I use replace="true" in both files. Will use that is loaded last, #2 for example and then Workflow config doesn't affect. If I remove global config from #2 it's ok. If I remove only replace="true" from #2 then I have a exception in header webscript.

I investigate it, and found class HeaderConfigElement and method compare it's dummy and appItemsConfigElement, userItemsConfigElement will be null.

How I can fixed it, If I need merge both of config.
Thanks.

P.S Sorry for my English, maybe I wrong wrote.

mrgrechkinn
Champ in-the-making
Champ in-the-making
up!
org.alfresco.web.config.header.HeaderConfigElement class, method public ConfigElement combine(ConfigElement otherConfigElement) is dummy. It's a bug?

mikeh
Star Contributor
Star Contributor
It's a bug?
No, it's an incomplete implementation because we couldn't find a sensible way to allow multiple overrides for arbitrary hierarchical data (with add, replace and delete operations). We'll be glad to accept source contributions for suggested fixes.

Thanks,
Mike

glaenen
Champ in-the-making
Champ in-the-making
Hello,

I solved this by copying the bean config "webframework.configsource" from slingshot-application-context.xml to /web-extension/custom-slingshot-application-context.xml and adding your extra config files to

<!– Share custom config –>
<value>classpath:alfresco/web-extension/share-config-custom.xml</value>
<value>jar:*!/META-INF/share-config-custom.xml</value>
<!– Add the config file for each module here –>
<value>classpath:alfresco/web-extension/extra-share-config-custom.xml</value>

This way you don't have to duplicate the endpoint configuration from tomcat/shared/…
and you can add more lines if you like to keep the share-config-custom.xml separated for each subsequent module you build.

Regards,

Glenn
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.