The component PicketLinkIDMOrganizationServiceImpl has been defined as a ComponentRequestLifecycle to be able to scope an "identity transaction" to the life time of the request. However depending on the page we try to access, it could be useless to open a tx in case the organization service is not even accessed which can have a dramatic impact on performances for nothing especially when we use hibernate because when we open a tx with hibernate, it does a JDBC call to switch to non auto commit mode.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: CAUSE: Currently hibernate transaction needs to be started for every HTTP request of anonymous or logged user to EPP. This always needs obtain new DB connection from connection pool, which is quite expensive operation. FIX: There is fix available in underlying component Picketlink IDM, which added possibility to start Hibernate transaction lazily only for case when it's really needed. It's adding new option "lazyStartOfHibernateTransaction" into Picketlink IDM configuration file. Value true means that Hibernate transaction will be started lazily only when needed. Value false is starting transaction non-lazily during each request (current behaviour) RESULT: In configuration file gatein.ear/02portal.war/WEB-INF/conf/organization/picketlink-idm/picketlink-idm-config.xml is new option added: <option> <name>lazyStartOfHibernateTransaction</name> <value>false</value> </option> We can see that default value is false, so behaviour is same like before (because of backward compatibility and avoiding of risk). But for customers, who have problem with performance and DB connection is critical for them, it would be good to switch this option to "true".
Verified with few performance tests with updated lazyStartOfHibernateTransaction (set to true), minimum number of idm connections are present during the tests.
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -2,12 +2,12 @@ FIX: There is fix available in underlying component Picketlink IDM, which added possibility to start Hibernate transaction lazily only for case when it's really needed. It's adding new option "lazyStartOfHibernateTransaction" into Picketlink IDM configuration file. Value true means that Hibernate transaction will be started lazily only when needed. Value false is starting transaction non-lazily during each request (current behaviour) -RESULT: In configuration file gatein.ear/02portal.war/WEB-INF/conf/organization/picketlink-idm/picketlink-idm-config.xml is new option added: - <option> +RESULT: In configuration file gatein.ear/02portal.war/WEB-INF/conf/organization/picketlink-idm/picketlink-idm-config.xml is new option added:</para> + <programlisting>[CDATA[<option> <name>lazyStartOfHibernateTransaction</name> <value>false</value> - </option> + </option>]]</programlisting -We can see that default value is false, so behaviour is same like before (because of backward compatibility and avoiding of risk). +<para>We can see that default value is false, so behaviour is same like before (because of backward compatibility and avoiding of risk). But for customers, who have problem with performance and DB connection is critical for them, it would be good to switch this option to "true".
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -3,10 +3,10 @@ FIX: There is fix available in underlying component Picketlink IDM, which added possibility to start Hibernate transaction lazily only for case when it's really needed. It's adding new option "lazyStartOfHibernateTransaction" into Picketlink IDM configuration file. Value true means that Hibernate transaction will be started lazily only when needed. Value false is starting transaction non-lazily during each request (current behaviour) RESULT: In configuration file gatein.ear/02portal.war/WEB-INF/conf/organization/picketlink-idm/picketlink-idm-config.xml is new option added:</para> - <programlisting>[CDATA[<option> + <programlisting>&[CDATA[<option> <name>lazyStartOfHibernateTransaction</name> <value>false</value> - </option>]]</programlisting + </option>]];</programlisting <para>We can see that default value is false, so behaviour is same like before (because of backward compatibility and avoiding of risk).
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -3,10 +3,10 @@ FIX: There is fix available in underlying component Picketlink IDM, which added possibility to start Hibernate transaction lazily only for case when it's really needed. It's adding new option "lazyStartOfHibernateTransaction" into Picketlink IDM configuration file. Value true means that Hibernate transaction will be started lazily only when needed. Value false is starting transaction non-lazily during each request (current behaviour) RESULT: In configuration file gatein.ear/02portal.war/WEB-INF/conf/organization/picketlink-idm/picketlink-idm-config.xml is new option added:</para> - <programlisting>&[CDATA[<option> + <programlisting><![CDATA[<option> <name>lazyStartOfHibernateTransaction</name> <value>false</value> - </option>]];</programlisting + </option>]]></programlisting <para>We can see that default value is false, so behaviour is same like before (because of backward compatibility and avoiding of risk).
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -3,10 +3,10 @@ FIX: There is fix available in underlying component Picketlink IDM, which added possibility to start Hibernate transaction lazily only for case when it's really needed. It's adding new option "lazyStartOfHibernateTransaction" into Picketlink IDM configuration file. Value true means that Hibernate transaction will be started lazily only when needed. Value false is starting transaction non-lazily during each request (current behaviour) RESULT: In configuration file gatein.ear/02portal.war/WEB-INF/conf/organization/picketlink-idm/picketlink-idm-config.xml is new option added:</para> - <programlisting><![CDATA[<option> + <programlisting><option> <name>lazyStartOfHibernateTransaction</name> <value>false</value> - </option>]]></programlisting + </option></programlisting> <para>We can see that default value is false, so behaviour is same like before (because of backward compatibility and avoiding of risk).
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1,13 +1,9 @@ -CAUSE: Currently hibernate transaction needs to be started for every HTTP request of anonymous or logged user to EPP. This always needs obtain new DB connection from connection pool, which is quite expensive operation. +Hibernate transactions had to be started for each HTTP request from an anonymous or authenticated user, which in turn required a new database connection from the connection pool (an expensive operation if it is not required for the request). The fix enables a new option, "lazyStartOfHibernateTransaction", which is set in gatein.ear/02portal.war/WEB-INF/conf/organization/picketlink-idm/picketlink-idm-config.xml. - +</para> -FIX: There is fix available in underlying component Picketlink IDM, which added possibility to start Hibernate transaction lazily only for case when it's really needed. It's adding new option "lazyStartOfHibernateTransaction" into Picketlink IDM configuration file. Value true means that Hibernate transaction will be started lazily only when needed. Value false is starting transaction non-lazily during each request (current behaviour) +<programlisting> - + <option> -RESULT: In configuration file gatein.ear/02portal.war/WEB-INF/conf/organization/picketlink-idm/picketlink-idm-config.xml is new option added:</para> + <name>lazyStartOfHibernateTransaction</name> - <programlisting><option> + <value>false</value> - <name>lazyStartOfHibernateTransaction</name> + </option> - <value>false</value> +</programlisting> - </option></programlisting> +<para>If the value is set to true, the Hibernate transaction is started only when required, and not for every request. The default value is false for backwards-compatibility.- -<para>We can see that default value is false, so behaviour is same like before (because of backward compatibility and avoiding of risk). - -But for customers, who have problem with performance and DB connection is critical for them, it would be good to switch this option to "true".
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1,9 +1,9 @@ Hibernate transactions had to be started for each HTTP request from an anonymous or authenticated user, which in turn required a new database connection from the connection pool (an expensive operation if it is not required for the request). The fix enables a new option, "lazyStartOfHibernateTransaction", which is set in gatein.ear/02portal.war/WEB-INF/conf/organization/picketlink-idm/picketlink-idm-config.xml. </para> <programlisting> - <option> - <name>lazyStartOfHibernateTransaction</name> - <value>false</value> - </option> +<option> + <name>lazyStartOfHibernateTransaction</name> + <value>false</value> + </option> </programlisting> <para>If the value is set to true, the Hibernate transaction is started only when required, and not for every request. The default value is false for backwards-compatibility.