留言板

Configure Jar Gobally

deep pep,修改在6 年前。

Configure Jar Gobally

New Member 帖子: 10 加入日期: 13-10-10 最近的帖子
Hi,
I am using Liferay 7 with wildfly 10.0.I have a jar where i am using for authentication in the same jar i am having singleton class where i am initializing few properties for authentication and need to share few properties with other portlets once login.I need to point all my portlets to this jar.
But when i am placing the jar in wildfly modules authentication is working but my portlet applications are unable to find the jar due to that i am getting classnotfound exception while run time.Kindly help on this i am using spring mvc portlet
Regards,
Dileep M
thumbnail
David H Nebinger,修改在6 年前。

RE: Configure Jar Gobally

Liferay Legend 帖子: 14916 加入日期: 06-9-2 最近的帖子
Classes from the application container are not automagically exposed within the OSGi container.

Liferay purposefully constructs the OSGi container to limit pollution from the app container.

First it sounds like your implementation is sloppy. Configuration should stand on its own, so I'd implement this as a standard OSGi configuration admin interface. This way any dependent classes could access the settings via the configuration support in Liferay, including the authentication mechanism.

Second, the custom authentication thing should be implemented as standard Liferay authentication mechanisms and also deployed as an OSGi component service directly into the container. By following Liferay authentication patterns, custom auth mechanisms can be easily integrated into the existing authentication chain.










Come meet me at Devcon 2017 or 2017 LSNA!