掲示板

Liferay & java ee application

11年前 に mesos badaar によって更新されました。

Liferay & java ee application

New Member 投稿: 5 参加年月日: 12/07/03 最新の投稿
am a new or a futur Liferay user.
i early devloppe an jave ee application with( jsf ,primefaces,jpa,ejb,glassfish 3+)
I want to integrate my application and liferay in order to benefit from advantages offered by the portal as the authentication server microsoft LDP,
My project has three general module (1 done) and I have to use all lifraye to integrate module with a single autentifiaction

I work with netbeans
thumbnail
11年前 に Neil Griffin によって更新されました。

RE: Liferay & java ee application

Liferay Legend 投稿: 2655 参加年月日: 05/07/27 最新の投稿
Liferay Faces sounds like it will work very well for your use-case.
thumbnail
11年前 に Nikhil Nishchal によって更新されました。

RE: Liferay & java ee application

Regular Member 投稿: 177 参加年月日: 12/06/22 最新の投稿
We can easily integrate liferay with LDAP.
Liferay provide such functionality of integration.
you can use wiki:
http://www.liferay.com/community/wiki/-/wiki/Main/LDAP
thumbnail
11年前 に Johann Kneringer によって更新されました。

RE: Liferay & java ee application

Junior Member 投稿: 42 参加年月日: 11/11/10 最新の投稿
Is there an example on how to establish an InitialContext to the application server in a backing bean? Or a general portlet example on how to communicate with an application server.

When I want to get data from jboss 6 in a backing bean I have to call the InitialContext very often, it does not suffice to call the InitialContext once the class got initialized.
thumbnail
11年前 に Victor Zorin によって更新されました。

RE: Liferay & java ee application

Liferay Legend 投稿: 1228 参加年月日: 08/04/14 最新の投稿
InitialContext to the application server in a backing bean?...
Use any of standard patterns, e.g. ServiceLocator to optimize your lookups. You probably would not have to do if Liferay runs on AppServer itself, new InitialContext() and lookup is done in under 5 ms .

In our applications the main processor for portlets is/are remote EJBs running on JBoss7.1+ application server(s). ServiceLocator pattern is adjusted to best suit the discovery and security architecture, some generic pools can also be helpful to manage connections.

And generally it does not really matter whether the client application is a Portlet or anything else.

The major issue we have discovered so far is when Liferay portal runs on JBoss AS and the remote connection is to be maintained to external JBoss(es), JBoss V7.1.1 behavior is quite troublesome in this situation.
thumbnail
11年前 に Johann Kneringer によって更新されました。

RE: Liferay & java ee application

Junior Member 投稿: 42 参加年月日: 11/11/10 最新の投稿
thank you for your reply.

I'm using ServiceLocator to connect to the jboss like this:


	private void createInitialContext()
	{
		try
		{
			String tmpPw = "mypassword";
			ServiceLocator.createInitialContext("myuser", tmpPw.toCharArray(),"myappserverurl.mydomain.com");
		} catch (javax.naming.NamingException e) {
			FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, "Error at createInitialContext:", e.getMessage());
			FacesContext.getCurrentInstance().addMessage(null, msg);
		}
		
	}


I have to call the ServiceLocator everytime I want to get data from the application server, otherwise it will throw an ivalid user exception.

Do you register the class, in which you use the ServiceLocator, as a managed bean? if yes, which scope do you use?
thumbnail
11年前 に Victor Zorin によって更新されました。

RE: Liferay & java ee application

Liferay Legend 投稿: 1228 参加年月日: 08/04/14 最新の投稿
I have to call the ServiceLocator everytime I want to get data from the application server, otherwise it will throw an ivalid user exception.

I do not think it matters how do you implement your ServerLocator as long as it is capable of caching your context.

In terms of granting an authenticated access to JBoss server you probably should consider what is the procedure and what are underlying complications around using and storing those connections, in JBoss case this would also significantly depend on its version, as implementation of remoting has changed a lot recently. JBoss7.1.1 is a completely different story.

I also hope that your authentication to JBoss is not organised on per portal user basis, but portal to jboss basis. In our cases we prefer to use single authentication portal-to-jboss as an establishment of new SSL authenticated connection may take anywhere from 150ms.