[Security & JAAS/JBoss] - How to setup Liferays PortalLoginModule
by antoni.alatalo
Hi,
I'm trying to setup Liferys REALM.
There is as default <realm-name>PortalRealm</realm-name> definition in the web.xml and also <security-domain>java:/jaas/PortalRealm</security-domain> in the jboss-web.xml files in the tunnel-web and ROOT (liferay) applications.
Because I use CAS for authentication and LDAP behind there was no problems with JBoss and Liferay.
But tunnel-web is not configured to use CAS and there is no need to do this, then problems starts there.
So, i need to use something like com.liferay.portal.security.jaas.ext.jboss.PortalLoginModule to configure login-config.xml application-policy. Without portal-impl.jar in the classpath module does not workIt gets an error "unable to find LoginModule class". If I put portal-impl.jar under default/lib, then Liferay hangs up : [MainDeployer] Could not create deployment: 06:52:49,875 ERROR [MainDeployer] Could not create deployment: java.lang.NoClassDefFoundError: org/apache/struts/action/ActionServlet
So what i did is very dirty solution:
I made new application-policy named MyRealm based on the JBOss DatabaseServerLoginModule (this because of userid that should be an long not String as in JBOss module). I did configure to the web.xml and jboss-web.xml to use MyRealm. And all my solutions did start working.
I found that i'm not along with the same problem. Is there some good solution to resolve this issue?
Thank you
Antoni
P.S original post is http://www.liferay.com/web/guest/community/forums/message_boards/message/...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108316#4108316
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108316
18 years, 5 months
[JBoss Portal] - Re: JBoss sizing (examples, sites, simple architecture?)
by Soon5
Hy Jorwo
"Jorwo" wrote :
| -> What is some typical implementation for an internet site with JBoss Portal? Cache, Hibernate, Clustering, AS? Others? Tomcat is really essential?
You need an Application Server. Tomcat allone isn't enough, because Portal needs the Application Server features.
anonymous wrote :
| -> On an internet site, what should we use as web server ? Apache connected to JB Portal? Or Tomcat? Or JBoss Portal in itself is secure enough?
|
You can't use Apache, because Apache is not Java Servlet Container. In the Internet, you will use an Application Server like JBoss AS, with a Servlet Container like Tomcat running.
anonymous wrote :
| -> Are there any reference docs that explain some of the typical sizing done on sites using JBoss Portal ? I need to start worrying about what kind of server (how many, etc) I'm supposed to buy.
|
This makes me ask, how many Users you are expecting. Im still rolling out JBoss Portal in the company i'm working in, so I can't provide some Numbers for you yet.
Greetings
Soon5
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108311#4108311
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108311
18 years, 5 months
[JBoss Portal] - Re: portal layout
by Soon5
Hy There,
Yes you can. You have to do two Things.
You find the Folder where the Layouts are under $JBOSSDEPLOY\jboss-portal.sar\portal-core.war\layouts
First copy one of the standard layouts to another folder in the layouts-subfolder for example "MyLayout". Inside you find two jsp files. One for the "normal" layout (index.jsp) and one for the layout when one portlet is maximized (maximized.jsp). You can edit and design this files with everything known from JSP, HTML and whatever you like.
To get this new layout to work, you go to the \WEB-INF Folder of jboss-core.war. There you find the portal-layouts.xml file. Open that, and copy the XML Structure of one standard layout, and replace the URLs to the files.
After that, and a restart of the Application Server, you can select the layout in the admin Portal.
I hope my description helps, it's realy easy, you will see.
Greetings
Soon5
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108309#4108309
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108309
18 years, 5 months
[EJB 3.0] - Re: EJB3 query language
by mazz@jboss.com
I see. You are thinking too much in the SQL world - you're in the land of JPA now :) Must think in terms of the JPQL query language. @NamedQueries are written in JPQL, not SQL.
Your table name is Language but your entity is "Language3". Your column is "AgentCode" but you mapped the field "agentCode" (again, on this point I am not sure - does case matter? I am not sure but I would assume case-sensitivity just to be sure and use agentCode in your query).
Your named query should be:
SELECT L FROM Language3 L WHERE L.agentCode = :agentCode
I suggest you go through some EJB3/JPA tutorials, specifically those that introduce the JPA querying concepts and JPQL.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108308#4108308
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108308
18 years, 5 months
[EJB 3.0] - Re: EJB3 query language
by thanukshad
this is my entity bean
package com.genesiis.sdb3.master3;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
@Entity
@Table(name = "Language")
@NamedQuery(name = "Language.findByAgentCode", query = "SELECT l FROM Language L WHERE L.AgentCode = :agentCode")
public class Language3 implements Serializable {
@Id
@Column(name = "LanguageCode", nullable = false)
private String languageCode;
@Column(name = "AgentCode")
private String agentCode;
@Column(name = "Description")
private String description;
@Column(name = "SortKey")
private int sortKey;
@Column(name = "LastUpdatedUser")
private String lastUpdatedUser;
public Language3() {
}
public Language3(String languageCode, String agentCode, String description,
int sortkey, String lastUpdatedUser) {
this.languageCode = languageCode;
this.agentCode = agentCode;
this.description = description;
this.sortKey = sortkey;
this.lastUpdatedUser = lastUpdatedUser;
}
public void setLanguageCode(String languageCode){
this.languageCode = languageCode;
}
public void setAgentCode(String agentCode){
this.agentCode = agentCode;
}
public void setDescription(String description){
this.description = description;
}
public void setSortKey(int sortKey){
this.sortKey = sortKey;
}
public void setLastUpdatedUser(String user){
this.lastUpdatedUser = user;
}
/***getters*************************/
public String getLanguageCode(){
return this.languageCode;
}
public String getAgentCode(){
return this.agentCode;
}
public String getDescription(){
return this.description;
}
public int getSortKey(){
return this.sortKey;
}
public String getLastUpdatedUser(){
return lastUpdatedUser ;
}
public int hashCode() {
int hash = 0;
hash += (this.languageCode != null ?
this.languageCode.hashCode() : 0);
return hash;
}
public boolean equals(Object object) {
if (object == null || !this.getClass().equals
(object.getClass())) {
return false;
}
Language3 other = (Language3)object;
if (this.languageCode != other.languageCode &
(this.languageCode == null || !this.languageCode.
equals(other.languageCode))) {
return false;
}
return true;
}
public String toString() {
return "" + this.languageCode;
}
}
And the persistemce.xml is as follow
<persistence-unit name="Language">
This unit manages orders and customers.
It does not rely on any vendor-specific features and can
therefore be deployed to any persistence provider.
<jta-data-source>java:jdbc/sdbDatabase</jta-data-source>
<jar-file>../sdb3.jar</jar-file>
com.genesiis.sdb3.master3.Language3
</persistence-unit>
what would be the error??
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108306#4108306
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108306
18 years, 5 months