Re: Customizing MasterDomain.xml
Hi Adrian, thanks for sharing your experience. A couple of things: 1. Fabio and I have been running some performance tests on 2.0.3 and the related improvements are now part of 2.0.4 - it seems there is still some issue with AnyObjects (not with Users nor Groups) in 2.0.4 - see SYNCOPE-1199, but AFAIK Matteo is after it 2. If you plan to run a test with 10 concurrent threads, then the DB thread pool should have at least 10 connections available: despite of the pool library in use, such setting is of fundamental importance Regards. On 24/08/2017 11:27, Adrian Gonzalez wrote: 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ò *À :* 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: contextConfigLocation classpath*:/*Context.xml with contextConfigLocation classpath*:/coreContext.xml classpath*:/securityContext.xml classpath*:/logicContext.xml classpath*:/restCXFContext.xml classpath:/persistenceContext.xml classpath*:/provisioning*Context.xml classpath*:/workflow*Context.xml (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/
Re: Customizing MasterDomain.xml
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ò À : 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: contextConfigLocation classpath*:/*Context.xml with contextConfigLocation classpath*:/coreContext.xml classpath*:/securityContext.xml classpath*:/logicContext.xml classpath*:/restCXFContext.xml classpath:/persistenceContext.xml classpath*:/provisioning*Context.xml classpath*:/workflow*Context.xml (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/
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: contextConfigLocation classpath*:/*Context.xml with contextConfigLocation classpath*:/coreContext.xml classpath*:/securityContext.xml classpath*:/logicContext.xml classpath*:/restCXFContext.xml classpath:/persistenceContext.xml classpath*:/provisioning*Context.xml classpath*:/workflow*Context.xml (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/
Customizing MasterDomain.xml
Hello, I'm using Syncope 2.0.2.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 Thanks,Adrian