[
https://issues.jboss.org/browse/GTNPORTAL-2463?page=com.atlassian.jira.pl...
]
RH Bugzilla Integration commented on GTNPORTAL-2463:
----------------------------------------------------
Jared MORGAN <jmorgan(a)redhat.com> made a comment on [bug
835578|https://bugzilla.redhat.com/show_bug.cgi?id=835578]
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".
Open an "Identity Transaction" only when it is necessary
--------------------------------------------------------
Key: GTNPORTAL-2463
URL:
https://issues.jboss.org/browse/GTNPORTAL-2463
Project: GateIn Portal
Issue Type: Enhancement
Security Level: Public(Everyone can see)
Components: Identity integration
Affects Versions: 3.2.0-GA
Reporter: Nicolas Filotto
Assignee: Boleslaw Dawidowicz
Labels: performance
Attachments: LAZY-OPEN-TX-IDM.patch
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.
Original Issue:
https://jira.exoplatform.org/browse/EXOGTN-1162
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira