You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added org.apache.naming.factory as an optional import to Import-Package
Allows JDBC monitoring in Tomcat in an OSGi environment (Liferay 7+). Probably, for other application servers, another package has to be imported.
The class org.apache.naming.factory.ResourceLinkFactory is loaded via reflection to obtain the DataSource registered in JNDI.
In order for this to work, the Portal Property module.framework.system.packages.extra must be modified to contain the package org.apache.naming.factory
By the way, on another subject, does a similar import allows to load the class net.sf.ehcache.management.CacheStatistics from Liferay 7.2 DXP SP1 and from Liferay CE portal 7.3.0 GA1 ? This would allow the javamelody plugin to display caches from Liferay (issue #14).
Hello,
the document about JDBC monitoring still applies, but it has to be updated for Liferay Portal 7+.
Can you show me an example of the <Resource /> tag? I will test how it works in my DXP 7.0.
About the caches: In my installed bundle (Again DXP 7.0), there is this imported package: net.sf.ehcache.management; version="2.10.6" <com.liferay.portal.cache.ehcache.provider_2.0.10 [146]>
So, perhaps the new EHCache Bundle does not export the package? I will have a look another time.
the document about JDBC monitoring still applies, but it has to be updated for Liferay Portal 7+.
OK, Let us know what can be changed in the doc, because I have no idea.
Can you show me an example of the tag? I will test how it works in my DXP 7.0.
I thought for a second that it may be possible to add a <Resource /> tag in the META-INF/context.xml in the portlet or in $TOMCAT_HOME/conf/context.xml like the following, without using GlobalNamingResources.
<!-- Example using the MySQL database -->
<Resourcename="jdbc/LiferayPool"auth="Container"type="javax.sql.DataSource"defaultAutoCommit="false"
url="jdbc:mysql://localhost:3306/lportal?useUnicode=true&characterEncoding=UTF-8"
driverClassName="com.mysql.jdbc.Driver"
username="root"password=""
maxTotal="20"maxIdle="10"maxWait="10000"
/>
(But examples on Internet suggest that it is needed for Liferay to use ResourceLink and GlobalNamingResources as said in doc.)
So, perhaps the new EHCache Bundle does not export the package? I will have a look another time.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added
org.apache.naming.factory
as an optional import toImport-Package
Allows JDBC monitoring in Tomcat in an OSGi environment (Liferay 7+). Probably, for other application servers, another package has to be imported.
The class
org.apache.naming.factory.ResourceLinkFactory
is loaded via reflection to obtain the DataSource registered in JNDI.In order for this to work, the Portal Property
module.framework.system.packages.extra
must be modified to contain the packageorg.apache.naming.factory