Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
mesos badaar
Liferay & java ee application
July 3, 2012 7:34 AM
Answer

mesos badaar

Rank: New Member

Posts: 5

Join Date: July 3, 2012

Recent Posts

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
Neil Griffin
RE: Liferay & java ee application
July 3, 2012 7:44 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2107

Join Date: July 26, 2005

Recent Posts

Liferay Faces sounds like it will work very well for your use-case.
Nikhil Nishchal
RE: Liferay & java ee application
October 24, 2012 12:20 AM
Answer

Nikhil Nishchal

Rank: Junior Member

Posts: 74

Join Date: June 21, 2012

Recent Posts

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
Johann Kneringer
RE: Liferay & java ee application
October 25, 2012 12:58 AM
Answer

Johann Kneringer

Rank: Junior Member

Posts: 40

Join Date: November 10, 2011

Recent Posts

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.
Victor Zorin
RE: Liferay & java ee application
October 25, 2012 2:18 AM
Answer

Victor Zorin

Rank: Liferay Legend

Posts: 1176

Join Date: April 14, 2008

Recent Posts

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.
Johann Kneringer
RE: Liferay & java ee application
October 29, 2012 3:00 AM
Answer

Johann Kneringer

Rank: Junior Member

Posts: 40

Join Date: November 10, 2011

Recent Posts

thank you for your reply.

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

 1
 2    private void createInitialContext()
 3    {
 4        try
 5        {
 6            String tmpPw = "mypassword";
 7            ServiceLocator.createInitialContext("myuser", tmpPw.toCharArray(),"myappserverurl.mydomain.com");
 8        } catch (javax.naming.NamingException e) {
 9            FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, "Error at createInitialContext:", e.getMessage());
10            FacesContext.getCurrentInstance().addMessage(null, msg);
11        }
12       
13    }


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?
Victor Zorin
RE: Liferay & java ee application
October 29, 2012 3:22 PM
Answer

Victor Zorin

Rank: Liferay Legend

Posts: 1176

Join Date: April 14, 2008

Recent Posts

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.