Foros de discusión

Liferay & java ee application

mesos badaar, modificado hace 11 años.

Liferay & java ee application

New Member Mensajes: 5 Fecha de incorporación: 3/07/12 Mensajes recientes
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
Neil Griffin, modificado hace 11 años.

RE: Liferay & java ee application

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
Liferay Faces sounds like it will work very well for your use-case.
thumbnail
Nikhil Nishchal, modificado hace 11 años.

RE: Liferay & java ee application

Regular Member Mensajes: 177 Fecha de incorporación: 22/06/12 Mensajes recientes
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
Johann Kneringer, modificado hace 11 años.

RE: Liferay & java ee application

Junior Member Mensajes: 42 Fecha de incorporación: 10/11/11 Mensajes recientes
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
Victor Zorin, modificado hace 11 años.

RE: Liferay & java ee application

Liferay Legend Mensajes: 1228 Fecha de incorporación: 14/04/08 Mensajes recientes
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
Johann Kneringer, modificado hace 11 años.

RE: Liferay & java ee application

Junior Member Mensajes: 42 Fecha de incorporación: 10/11/11 Mensajes recientes
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
Victor Zorin, modificado hace 11 años.

RE: Liferay & java ee application

Liferay Legend Mensajes: 1228 Fecha de incorporación: 14/04/08 Mensajes recientes
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.