Commit b130ef8d by Tuukka Kivilahti, TKffTK

Merge branch 'master' of dev.intra.insomnia.fi:/data/bortal

2 parents 4c07472e 3fbb935e
Showing with 445 additions and 55 deletions
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="GlassFish 3.1"/>
<runtime name="GlassFish 3.1.1"/>
<fixed facet="jst.ear"/>
<installed facet="jst.ear" version="6.0"/>
<installed facet="sun.facet" version="9"/>
......
......@@ -2,12 +2,12 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/LanBortalAuthModuleClient"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/JVM 1.6">
<classpathentry combineaccessrules="false" kind="src" path="/lib-AuthModule-depends"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.sun.enterprise.jst.server.runtimeTarget/GlassFish 3.1.1"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry combineaccessrules="false" kind="src" path="/lib-AuthModule-depends"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.sun.enterprise.jst.server.runtimeTarget/GlassFish 3.1"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="GlassFish 3.1.1"/>
<installed facet="java" version="1.6"/>
</faceted-project>
......@@ -2,12 +2,12 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.sun.enterprise.jst.server.runtimeTarget/GlassFish 3.1">
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.sun.enterprise.jst.server.runtimeTarget/GlassFish 3.1.1">
<attributes>
<attribute name="owner.project.facets" value="jst.utility"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/JVM 1.6">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
......
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="GlassFish 3.1"/>
<runtime name="GlassFish 3.1.1"/>
<fixed facet="java"/>
<fixed facet="jst.utility"/>
<installed facet="jst.utility" version="1.0"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="ejbModule"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/JVM 1.6">
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.sun.enterprise.jst.server.runtimeTarget/GlassFish 3.1.1">
<attributes>
<attribute name="owner.project.facets" value="java"/>
<attribute name="owner.project.facets" value="jst.ejb"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.sun.enterprise.jst.server.runtimeTarget/GlassFish 3.1">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<attributes>
<attribute name="owner.project.facets" value="jst.ejb"/>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>
#Sun Mar 27 01:26:01 EET 2011
#Sat Dec 17 01:39:19 EET 2011
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="GlassFish 3.1"/>
<runtime name="GlassFish 3.1.1"/>
<fixed facet="java"/>
<fixed facet="jst.ejb"/>
<installed facet="java" version="1.6"/>
......
package fi.insomnia.bortal.beans;
import java.util.List;
import javax.ejb.EJB;
import javax.ejb.Stateless;
import fi.insomnia.bortal.facade.ActionLogFacade;
import fi.insomnia.bortal.model.ActionLogMessage;
/**
* Session Bean implementation class ActionLogBean
* eventin
* - luominen
* - editointi
* - deletointi
*/
@Stateless
public class ActionLogBean implements ActionLogBeanLocal {
// TODO: Permissions
@EJB
private ActionLogFacade actionLogFacade;
public ActionLogBean() {
// TODO Auto-generated constructor stub
}
public void createActionLogEvent(String name, String crew, String message) {
}
public List<ActionLogMessage> getAllActionLogEvents() {
return actionLogFacade.getAllSortedByTimestamp();
}
}
package fi.insomnia.bortal.facade;
import java.util.List;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Root;
import fi.insomnia.bortal.model.AccountEvent;
import fi.insomnia.bortal.model.AccountEvent_;
import fi.insomnia.bortal.model.ActionLogMessage;
import fi.insomnia.bortal.model.EventPk;
import fi.insomnia.bortal.model.LanEvent;
import fi.insomnia.bortal.model.LogEntry;
import fi.insomnia.bortal.model.Product_;
import fi.insomnia.bortal.model.Role;
import fi.insomnia.bortal.model.Role_;
import fi.insomnia.bortal.model.User;
@Stateless
@LocalBean
public class ActionLogFacade extends GenericFacade<Integer,ActionLogMessage> {
@PersistenceContext
private EntityManager em;
public ActionLogFacade() {
super(ActionLogMessage.class);
}
@Override
protected EntityManager getEm() {
return em;
}
public List<ActionLogMessage> getAllSortedByTimestamp() {
// TODO Auto-generated method stub
return null;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="ejbModule"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.sun.enterprise.jst.server.runtimeTarget/GlassFish 3.1">
<attributes>
<attribute name="owner.project.facets" value="jst.utility"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="src" path="/LanBortalDatabase"/>
<classpathentry kind="src" path="/LanBortalUtilities"/>
<classpathentry kind="src" path="/LanBortalAuthModuleClient"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/JVM 1.6">
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.sun.enterprise.jst.server.runtimeTarget/GlassFish 3.1.1">
<attributes>
<attribute name="owner.project.facets" value="jst.utility"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
......
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="GlassFish 3.1"/>
<runtime name="GlassFish 3.1.1"/>
<fixed facet="java"/>
<fixed facet="jst.utility"/>
<installed facet="jst.utility" version="1.0"/>
......
package fi.insomnia.bortal.beans;
import java.util.List;
import javax.ejb.Local;
import fi.insomnia.bortal.model.ActionLogMessage;
@Local
public interface ActionLogBeanLocal {
public List<ActionLogMessage> getAllActionLogEvents();
}
......@@ -2,16 +2,16 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.sun.enterprise.jst.server.runtimeTarget/GlassFish 3.1">
<classpathentry kind="src" path="/LanBortalUtilities"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.sun.enterprise.jst.server.runtimeTarget/GlassFish 3.1.1">
<attributes>
<attribute name="owner.project.facets" value="jst.utility"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/JVM 1.6">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="/LanBortalUtilities"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="GlassFish 3.1"/>
<runtime name="GlassFish 3.1.1"/>
<fixed facet="jst.utility"/>
<fixed facet="jst.java"/>
<fixed facet="jpt.jpa"/>
......
......@@ -5,8 +5,9 @@
<persistence-unit name="BortalDb" transaction-type="JTA">
<jta-data-source>jdbc/bortal</jta-data-source>
<properties>
<property name="eclipselink.ddl-generation.output-mode" value="both"/>
<property name="eclipselink.ddl-generation" value="create-tables"/>
<property name="eclipselink.cache.size.default" value="16384"/>
<property name="eclipselink.ddl-generation.output-mode" value="database"/>
</properties>
</persistence-unit>
</persistence>
package fi.insomnia.bortal.model;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.JoinColumn;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import fi.insomnia.bortal.enums.ActionLogMessageState;
@Entity
@Table(name="actionlog_messages")
public class ActionLogMessage extends GenericEntity {
private static final long serialVersionUID = -2902547412412000488L;
@Column(name="time", nullable=false)
@Temporal(TemporalType.TIMESTAMP)
private Date time = new Date();
@JoinColumn(name="user_id")
private User user;
@Column(name="crew", nullable=false)
private String crew;
@Column(name="message", nullable=false)
private String message;
@Column(name="state", nullable=true)
@Enumerated(EnumType.STRING)
private ActionLogMessageState state;
public Date getTime() {
return time;
}
public void setTime(Date time) {
this.time = time;
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
public String getCrew() {
return crew;
}
public void setCrew(String crew) {
this.crew = crew;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public ActionLogMessageState getState() {
return state;
}
public void setState(ActionLogMessageState state) {
this.state = state;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="GlassFish Server Open Source Edition 3 (Java EE 6)"/>
<runtime name="GlassFish 3.1.1"/>
</faceted-project>
......@@ -2,7 +2,7 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.sun.enterprise.jst.server.runtimeTarget/GlassFish 3.1">
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.sun.enterprise.jst.server.runtimeTarget/GlassFish 3.1.1">
<attributes>
<attribute name="owner.project.facets" value="jst.utility"/>
</attributes>
......
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="GlassFish 3.1"/>
<runtime name="GlassFish 3.1.1"/>
<fixed facet="jst.java"/>
<fixed facet="jst.utility"/>
<installed facet="jst.java" version="6.0"/>
......
package fi.insomnia.bortal.enums;
public enum ActionLogMessageState {
NEW,
PENDING,
DONE
}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.sun.enterprise.jst.server.runtimeTarget/GlassFish 3.1.1">
<attributes>
<attribute name="owner.project.facets" value="java"/>
<attribute name="owner.project.facets" value="jst.web"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.sun.enterprise.jst.server.runtimeTarget/GlassFish 3.1">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<attributes>
<attribute name="owner.project.facets" value="jst.web"/>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="GlassFish 3.1"/>
<runtime name="GlassFish 3.1.1"/>
<fixed facet="java"/>
<fixed facet="wst.jsdt.web"/>
<fixed facet="jst.web"/>
......
......@@ -10,7 +10,7 @@
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
<!-- param-value>Production</param-value -->
<!--param-value>Production</param-value-->
</context-param>
<context-param>
<param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
......
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html" xmlns:users="http://java.sun.com/jsf/composite/cditools/user"
xmlns:tools="http://java.sun.com/jsf/composite/cditools" xmlns:f="http://java.sun.com/jsf/core"
>
<h:body>
<ui:composition template="/layout/#{sessionHandler.layout}/template.xhtml">
<f:metadata>
<!-- f:event type="preRenderView" listener="#{newsListView.initView}" /-->
</f:metadata>
<ui:define name="content">
<h:form>
<h1>#{i18n['actionlog.create.header']}</h1>
<h:outputText value="#{i18n['actionlog.create.role']}" />
<h:selectOneMenu value="" >
<f:selectItems var="crew" itemLabel="#{crew.name}" value="#{actionLogCreateView.crews}" />
</h:selectOneMenu>
<h:outputText value="#{i18n['actionlog.create.message']}" />
<h:inputText />
<h:outputText value="#{i18n['actionlog.create.taskradio']}" />
<h:selectBooleanCheckbox />
<br />
<h:button value="#{i18n['actionlog.create.submitbutton']}" />
</h:form>
</ui:define>
</ui:composition>
</h:body>
</html>
\ No newline at end of file
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html" xmlns:users="http://java.sun.com/jsf/composite/cditools/user"
xmlns:tools="http://java.sun.com/jsf/composite/cditools" xmlns:f="http://java.sun.com/jsf/core"
>
<h:body>
<ui:composition template="/layout/#{sessionHandler.layout}/template.xhtml">
<f:metadata>
<!-- f:event type="preRenderView" listener="#{newsListView.initView}" /-->
</f:metadata>
<ui:define name="content">
<h1>#{i18n['actionlog.messagelist.header']}</h1>
<h:dataTable styleClass="bordertable" id="message" value="#{actionLogMessageView.messages}" var="message">
<h:column>
<f:facet name="header">
<h:outputText value="#{i18n['actionlog.time']}" />
</f:facet>
<h:outputText value="#{message.time}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{i18n['actionlog.user']}" />
</f:facet>
<h:outputText value="#{message.user.nick}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{i18n['actionlog.crew']}" />
</f:facet>
<h:outputText value="#{message.crew}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{i18n['actionlog.message']}" />
</f:facet>
<h:outputText value="#{message.message}" />
</h:column>
</h:dataTable>
</ui:define>
</ui:composition>
</h:body>
</html>
\ No newline at end of file
......@@ -11,7 +11,6 @@
<f:event type="preRenderView" listener="#{newsListView.initView}" />
</f:metadata>
<ui:param name="thispage" value="page.user.create" />
<ui:define name="content">
<h1>#{i18n['newslist.header']}</h1>
......
......@@ -376,3 +376,19 @@ news.expire=Lopeta julkaisu
news.save=Tallenna
usertitle.managingUser=Hallitaan kyttj
actionlog.messagelist.header=Viestilista
actionlog.tasklist.header=Taskilista
actionlog.create.header=Luo eventti
actionlog.create.role=Rooli
actionlog.create.message=Viesti
actionlog.create.taskradio=Tm on taski
actionlog.create.submitbutton=Lhet
actionlog.time=Aika
actionlog.user=Tekij
actionlog.crew=Crew
actionlog.message=Tapahtuma
package fi.insomnia.bortal.web.cdiview.actionlog;
import java.util.ArrayList;
import javax.enterprise.context.RequestScoped;
import javax.faces.model.SelectItem;
import javax.inject.Named;
import fi.insomnia.bortal.web.cdiview.GenericCDIView;
@Named
@RequestScoped
public class ActionLogCreateView extends GenericCDIView {
/**
*
*/
private static final long serialVersionUID = 1L;
private ArrayList<Crew> crews = new ArrayList<Crew>();
public ArrayList<Crew> getCrews(){
crews.add(new Crew("1", "joo"));
crews.add(new Crew("2", "jee"));
return crews;
}
}
package fi.insomnia.bortal.web.cdiview.actionlog;
import java.util.List;
import javax.ejb.EJB;
import javax.faces.bean.RequestScoped;
import javax.inject.Named;
import fi.insomnia.bortal.beans.ActionLogBeanLocal;
import fi.insomnia.bortal.model.ActionLogMessage;
import fi.insomnia.bortal.web.cdiview.GenericCDIView;
@Named
@RequestScoped
public class ActionLogMessageView extends GenericCDIView {
private static final long serialVersionUID = 1L;
@EJB
ActionLogBeanLocal actionLogBean;
public List<ActionLogMessage> getMessages() {
return actionLogBean.getAllActionLogEvents();
}
}
package fi.insomnia.bortal.web.cdiview.actionlog;
public class ActionMessage {
private String timestamp;
private String user;
private String crew;
private String message;
public String getTimestamp() {
return timestamp;
}
public void setTimestamp(String timestamp) {
this.timestamp = timestamp;
}
public String getUser() {
return user;
}
public void setUser(String user) {
this.user = user;
}
public String getCrew() {
return crew;
}
public void setCrew(String crew) {
this.crew = crew;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
\ No newline at end of file
package fi.insomnia.bortal.web.cdiview.actionlog;
public class Crew {
private String id;
private String name;
public Crew(String id, String nimi) {
this.id = id;
this.name = nimi;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
tuomari @ a91e217e
Subproject commit a91e217e681f3baa8e73f1edd22b263a99a6828d
bortal realmin lisminen glassfishiin.
bortal realmin lisääminen glassfishiin.
1. Lis code/LanBortalAuthModule.jar tiedosto hakemistoon glassfish/glassfish/domains/domain1/lib/
1. Lisää code/LanBortalAuthModule.jar tiedosto hakemistoon glassfish/glassfish/domains/domain1/lib/
2. Lis postgres JDBC library glassfish/glassfish/lib/ hakemistoon
2. Lisää postgres JDBC library glassfish/glassfish/lib/ hakemistoon
3. lis tiedostoon glassfish/glassfish/domains/domain1/config/login.conf tiedostoon:
3. lisää tiedostoon glassfish/glassfish/domains/domain1/config/login.conf tiedostoon:
bortalRealm {
fi.insomnia.bortal.BortalLoginModule required;
};
############
Huom! Lue komennot lpi ja muokkaa muuttujat sopiviksi!
Huom! Lue komennot läpi ja muokkaa muuttujat sopiviksi!
############
4. suorita seuraavat komennot hakemistossa glassfish/glassfish/bin/
# ./asadmin create-auth-realm --classname fi.insomnia.bortal.BortalRealm --property jaas-context=bortalRealm omniarealm
#
# ./asadmin create-jdbc-connection-pool --datasourceclassname org.postgresql.ds.PGConnectionPoolDataSource --restype javax.sql.ConnectionPoolDataSource --ping true --property URL=jdbc\\:postgresql\\:omnia:DatabaseName=omnia:Password=abcdef123:User=omnia OmniaPool
# ./asadmin create-jdbc-connection-pool --datasourceclassname org.postgresql.ds.PGConnectionPoolDataSource --restype javax.sql.ConnectionPoolDataSource --ping true --property serverName=localhost:DatabaseName=bortal:Password=abcdef123456:User=bortal Omniapossu
5. Lisää JDBC resource jdbc/bortal connection poolille Omniapossu wepikälistä.
./asadmin create-jdbc-resource --connectionpoolid OmniaPool jdbc/bortal
5. Lis JDBC resource jdbc/bortal connection poolille Omniapossu wepiklist.
./asadmin create-jdbc-resource --connectionpoolid Omniapossu jdbc/bortal
6. Debug-tulosteet fi namespacesta saa nkyviin seuraavasti:
6. Debug-tulosteet fi namespacesta saa näkyviin seuraavasti:
# echo fi.level=FINEST >> glassfish/domains/domain1/config/logging.properties
7. Lis mailipalvelin.
7. Lisää mailipalvelin.
./asadmin --interactive=false create-javamail-resource --mailhost=localhost --mailuser=bortal --fromaddress=info@insomnia.fi --enabled=true --description="Bortal" --storeprotocol=imap --storeprotocolclass=com.sun.mail.imap.IMAPStore --transprotocol smtp --transprotocolclass com.sun.mail.smtp.SMTPTransport --property mail.smtp.port=25 mail/lanbortal
8. Ainakin linuxissa pit javalle antaa liskomentona:
8. Ainakin linuxissa pitää javalle antaa lisäkomentona:
# ./asadmin create-jvm-options -Djava.awt.headless=true
9. Lis JMS connection factory ( Resources -> JMS Resources -> Connection Factory )
9. Lisää JMS connection factory ( Resources -> JMS Resources -> Connection Factory )
Pool name: jms/mailconnectionfactory
Resource type: javax.jms.QueueConnectionFactory
./asadmin create-jms-resource --restype javax.jms.QueueConnectionFactory jms/mailconnectionfactory
10. Lis JMS Destination Resource ( Resources -> JMS Resources -> Destination Resources )
10. Lisää JMS Destination Resource ( Resources -> JMS Resources -> Destination Resources )
### JOKO ###
JNDI Name: jms/mailque
Physical destinatino name: mailque
......@@ -48,12 +47,12 @@ Huom! Lue komennot lpi ja muokkaa muuttujat sopiviksi!
### TAI ###
./asadmin create-jms-resource --restype javax.jms.Queue --property Name=mailque jms/mailque
11. (OPTIONAL) Jos haluat JK-connectorin kyttn apachen kanssa:
11. (OPTIONAL) Jos haluat JK-connectorin käyttöön apachen kanssa:
Configurations -> Server-config -> Network Config -> http-listner1 -> JK Listener ON
12. Glassfish Default Principal to Role Mapping
403 asioista, ellei tt ole ruksittu:
403 asioista, ellei tätä ole ruksittu:
Configurations -> server-config -> Security -> Default Principal To Role Mapping -> Enabled
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!