Thanks Francesco, that's exactly what I need !
> Any special reason to not upgrade to 2.0.4?
The little story is that we have a little locking issue during authentication 
in Syncope (I didn't pinpointed the cause, could be syncope or our 
customization or my tests :) ), when calling the /syncope/rest/users/self 
endpoint from a JMeter test with multiple threads (10).
Digging a bit further, I've seen 2 pbs :a - inifinite connection timeout in 
jdbc dataSource settings.b - locking in db
I was working on a.It came from the default setting (I can customize it, no 
pb).But I've seen you changed the db pool in 2.0.4 and I wanted to give it a 
try (just for testing purposes).Since 2.0.4 has some db changes and we already 
have a 2.0.2 in production but *without* any flyway migration scripts, I wanted 
to see if I could integrate easily the 2.0.4 db pool changes in my 2.0.2.Hence 
this mail :)And I also wanted to know if there was a way to customize the 
configuration in case I had a more urgent need in the future - so I know how to 
do it next time :)
I'm switching to work on b now.
Thanks once more, and sorry for the long and boring details :)Adrian

      De : Francesco Chicchiriccò <ilgro...@apache.org>
 À : user@syncope.apache.org 
 Envoyé le : Jeudi 24 août 2017 9h47
 Objet : Re: Customizing MasterDomain.xml
   
 On 23/08/2017 18:18, Adrian Gonzalez wrote:
  
  Hello, 
  I'm using Syncope 2.0.2.  
 
 Any special reason to not upgrade to 2.0.4?
 
https://cwiki.apache.org/confluence/display/SYNCOPE/Upgrade+from+2.0.2+to+2.0.3
https://cwiki.apache.org/confluence/display/SYNCOPE/Upgrade+from+2.0.3+to+2.0.4
 
 
  Is there a way to customize MasterDomain.xml in syncope webapp ? 
  I've the impression that MasterDomain.xml is always loaded from 
syncope-core-persistence-jpa-*.jar#domains/MasterDomain.xml (in WEB-INF/lib), 
even if I add a  MasterDomain.xml in WEB-INF/classes/domains  
 
 As indicated in
 
https://syncope.apache.org/docs/reference-guide.html#customization-core
 
 (for 2.0.4, naturally), you'll need to tell Spring to load your local 
domains/MasterDomain.xml rather than the one included in the JAR file.
 
 But domains/MasterDomain.xml is loaded by domains.xml, which in turn is 
imported by persistenceContext.xml; as a result, you'll need to add to your own 
project's sources:
 
 * core/src/main/resources/persistenceContext.xml (copy from [1])
 * core/src/main/resources/domains.xml (copy from [2])
 * core/src/main/resources/domains/MasterDomain.xml (copy from [3])
 
 Even so, Spring will ignore such local files if you don't replace, in 
core/src/main/webapp/WEB-INF/web.xml:
 
   <context-param>
     <param-name>contextConfigLocation</param-name>
     <param-value>
       classpath*:/*Context.xml
     </param-value>
   </context-param>
 
 with
 
   <context-param>
     <param-name>contextConfigLocation</param-name>
     <param-value>
       classpath*:/coreContext.xml
       classpath*:/securityContext.xml
       classpath*:/logicContext.xml
       classpath*:/restCXFContext.xml
       classpath:/persistenceContext.xml
       classpath*:/provisioning*Context.xml
       classpath*:/workflow*Context.xml
     </param-value>
   </context-param>
 
 (please note the missing '*' before persistenceContext.xml).
 
 FYI, the starting value for contextConfigLocation is set as [4] since 2.0.4.
 
 HTH
 Regards.
 
 
[1]https://github.com/apache/syncope/blob/syncope-2.0.2/core/persistence-jpa/src/main/resources/persistenceContext.xml
 
[2]https://github.com/apache/syncope/blob/syncope-2.0.2/core/persistence-jpa/src/main/resources/domains.xml
 
[3]https://github.com/apache/syncope/blob/syncope-2.0.2/core/persistence-jpa/src/main/resources/domains/MasterDomain.xml
 
[4]https://github.com/apache/syncope/blob/syncope-2.0.4/fit/core-reference/src/main/webapp/WEB-INF/web.xml#L31-L37
 -- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/ 

   

Reply via email to