Issue #595 - openfire will now supply the httpd-collaboration port when a user successfully logs in. The port will be stored as part of the CAVE configuration. Change-Id: I76c8ce94ef140d8bb8b608dd07b59b89f1607d16

Change-Id: I5350ed2293b78a743fc0e5b4cd9bcd6f02eafbd1

Former-commit-id: 0f0bab6e54 [formerly f4ac8e99d3f2f98af4ea5f383630395705e6da96]
Former-commit-id: a808bc245f
This commit is contained in:
Bryan Kowal 2012-05-17 12:40:08 -05:00
parent c98b6e28c7
commit 8ee68911fb
37 changed files with 1421 additions and 16 deletions

View file

@ -10,6 +10,7 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ecf;bundle-version="3.1.300",
org.eclipse.ecf.presence;bundle-version="2.0.0",
org.eclipse.ecf.provider.xmpp;bundle-version="3.2.0",
org.apache.commons.lang;bundle-version="2.3.0",
com.google.guava;bundle-version="1.0.0";visibility:=reexport,
com.raytheon.uf.common.serialization;bundle-version="1.12.1174",
com.raytheon.uf.viz.core;bundle-version="1.12.1174",

View file

@ -0,0 +1,47 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.collaboration.comm.identity.event;
/**
* TODO Add Description
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 11, 2012 bkowal Initial creation
*
* </pre>
*
* @author bkowal
* @version 1.0
*/
public interface IHttpdCollaborationConfigurationEvent {
/**
*
* @return the url used to connect to the collaboration
* httpd server.
*/
String getHttpdCollaborationURL();
}

View file

@ -55,6 +55,8 @@ public abstract class Tools {
public static final String PROP_SESSION_ID = "sessionId";
public static final String CMD_PREAMBLE = "[[COMMAND#";
public static final String CONFIG_PREAMBLE = "[[CONFIG#";
private static final String ENV_THRIFT = CMD_PREAMBLE
+ SerializationMode.THRIFT.name() + "]]";

View file

@ -0,0 +1,57 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.viz.collaboration.comm.provider.event;
import com.raytheon.uf.viz.collaboration.comm.identity.event.IHttpdCollaborationConfigurationEvent;
/**
* TODO Add Description
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 11, 2012 bkowal Initial creation
*
* </pre>
*
* @author bkowal
* @version 1.0
*/
public class HttpdCollaborationConfigurationEvent implements
IHttpdCollaborationConfigurationEvent {
private final String httpdCollaborationURL;
/**
*
*/
public HttpdCollaborationConfigurationEvent(String httpdCollaborationURL) {
this.httpdCollaborationURL = httpdCollaborationURL;
}
@Override
public String getHttpdCollaborationURL() {
return this.httpdCollaborationURL;
}
}

View file

@ -20,6 +20,7 @@
package com.raytheon.uf.viz.collaboration.comm.provider.session;
import java.util.Map;
import java.util.regex.Pattern;
import org.eclipse.ecf.presence.IIMMessageEvent;
import org.eclipse.ecf.presence.IIMMessageListener;
@ -38,6 +39,8 @@ import com.raytheon.uf.viz.collaboration.comm.provider.TextMessage;
import com.raytheon.uf.viz.collaboration.comm.provider.Tools;
import com.raytheon.uf.viz.collaboration.comm.provider.event.ChatMessageEvent;
import com.raytheon.uf.viz.collaboration.comm.provider.user.UserId;
import com.raytheon.uf.viz.collaboration.comm.identity.event.IHttpdCollaborationConfigurationEvent;
import com.raytheon.uf.viz.collaboration.comm.provider.event.HttpdCollaborationConfigurationEvent;
/**
* Listens for peer to peer messages and routes them appropriately.
@ -87,6 +90,8 @@ public class PeerToPeerCommHelper implements IIMMessageListener {
if (body != null) {
if (body.startsWith(Tools.CMD_PREAMBLE)) {
routeData(msg);
} else if (body.startsWith(Tools.CONFIG_PREAMBLE)) {
this.handleConfiguration(body);
} else {
// anything else pass to the normal text
routeMessage(msg);
@ -166,4 +171,46 @@ public class PeerToPeerCommHelper implements IIMMessageListener {
}
}
}
private void handleConfiguration(String body) {
final String parameterName = "sessionDataHttpURL";
final String suffix = "]]";
// Validate the configuration.
final String configPatternRegex = Tools.CONFIG_PREAMBLE.replace("[", "\\[")
+ parameterName + " : .+" + suffix;
Pattern configPattern = Pattern.compile(configPatternRegex);
if (configPattern.matcher(body).matches() == false) {
statusHandler.handle(UFStatus.Priority.PROBLEM,
"Received invalid configuration from openfire.");
}
// Eliminate the preamble.
String encodedConfiguration = body.replace(Tools.CONFIG_PREAMBLE, "");
// Eliminate the suffix: ]]
encodedConfiguration = encodedConfiguration.substring(0,
encodedConfiguration.length() - 2);
// Currently, we are only receiving one configurable element.
// JSON would be preferable.
// sessionDataHttpURL : [URL]
// Remove the parameter name.
String httpdCollaborationURL = encodedConfiguration.replace(
parameterName + " :", "").trim();
final String collaborationURLRegex = "http://.+:[1-9][0-9]*/session_data/";
// validate the url.
Pattern urlPattern = Pattern.compile(collaborationURLRegex);
if (urlPattern.matcher(httpdCollaborationURL).matches() == false) {
statusHandler.handle(UFStatus.Priority.PROBLEM,
"Received an invalid http url from openfire - "
+ httpdCollaborationURL + ".");
return;
}
// configuration is valid; publish it.
IHttpdCollaborationConfigurationEvent configurationEvent = new HttpdCollaborationConfigurationEvent(
httpdCollaborationURL);
manager.getEventPublisher().post(configurationEvent);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

View file

@ -98,6 +98,7 @@ import com.raytheon.uf.viz.collaboration.comm.identity.CollaborationException;
import com.raytheon.uf.viz.collaboration.comm.identity.ISession;
import com.raytheon.uf.viz.collaboration.comm.identity.ISharedDisplaySession;
import com.raytheon.uf.viz.collaboration.comm.identity.IVenueSession;
import com.raytheon.uf.viz.collaboration.comm.identity.event.IHttpdCollaborationConfigurationEvent;
import com.raytheon.uf.viz.collaboration.comm.identity.event.IRosterChangeEvent;
import com.raytheon.uf.viz.collaboration.comm.identity.info.IVenueInfo;
import com.raytheon.uf.viz.collaboration.comm.identity.invite.SharedDisplayVenueInvite;
@ -257,8 +258,9 @@ public class CollaborationGroupView extends ViewPart implements IPartListener {
};
createSessionAction.setImageDescriptor(IconUtil.getImageDescriptor(
bundle, "add_collaborate.gif"));
createSessionAction.setEnabled(CollaborationDataManager.getInstance()
.isConnected());
createSessionAction.setDisabledImageDescriptor(IconUtil
.getImageDescriptor(bundle, "add_collaborate_disabled.png"));
this.disableOrEnableSessionAction(false);
linkToEditorAction = new Action("Link Editor to Chat Session",
Action.AS_CHECK_BOX) {
@ -609,7 +611,7 @@ public class CollaborationGroupView extends ViewPart implements IPartListener {
// enable the tree, and then refresh it just to be safe
usersTreeViewer.getTree().setEnabled(true);
usersTreeViewer.refresh(topLevel, true);
createSessionAction.setEnabled(true);
this.disableOrEnableSessionAction(false);
}
/**
@ -1332,6 +1334,51 @@ public class CollaborationGroupView extends ViewPart implements IPartListener {
}
}
@Subscribe
public void handleHttpdConfigurationEvent(
IHttpdCollaborationConfigurationEvent configurationEvent) {
// Add the httpd collaboration url to the CAVE configuration.
Activator
.getDefault()
.getPreferenceStore()
.setValue(
CollabPrefConstants.HttpCollaborationConfiguration.P_HTTP_SESSION_URL,
configurationEvent.getHttpdCollaborationURL());
Activator
.getDefault()
.getPreferenceStore()
.setValue(
CollabPrefConstants.HttpCollaborationConfiguration.P_SESSION_CONFIGURED,
true);
// Allow the user to create sessions.
this.disableOrEnableSessionAction(true);
}
/**
* @param async
*/
private void disableOrEnableSessionAction(boolean async) {
boolean sessionConfigured = Activator
.getDefault()
.getPreferenceStore()
.getBoolean(
CollabPrefConstants.HttpCollaborationConfiguration.P_SESSION_CONFIGURED);
final boolean isSessionEnabled = sessionConfigured
&& CollaborationDataManager.getInstance().isConnected();
if (async) {
VizApp.runAsync(new Runnable() {
@Override
public void run() {
createSessionAction.setEnabled(isSessionEnabled);
}
});
} else {
createSessionAction.setEnabled(isSessionEnabled);
}
}
/**
* Adds users to groups if necessary
*

View file

@ -46,4 +46,9 @@ public class CollabPrefConstants {
public static final String P_MESSAGE = "message";
public class HttpCollaborationConfiguration {
public static final String P_SESSION_CONFIGURED = "http.sessionConfigured";
public static final String P_HTTP_SESSION_URL = "http.sessionURL";
}
}

View file

@ -69,10 +69,6 @@ import com.raytheon.uf.viz.remote.graphics.events.ICreationEvent;
public class CollaborationObjectEventStorage implements
IObjectEventPersistance, IObjectEventRetrieval {
private static final String SESSION_DATA_URL_FORMAT_STRING = "http://%s:%d/session_data/";
private static final int SESSION_DATA_PORT = 80;
private static NetworkStatistics stats = com.raytheon.uf.viz.collaboration.comm.Activator
.getDefault().getNetworkStats();
@ -95,13 +91,12 @@ public class CollaborationObjectEventStorage implements
private CollaborationObjectEventStorage(ISharedDisplaySession session) {
this.client = HttpClient.getInstance();
String collaborationServer = Activator.getDefault()
.getPreferenceStore().getString(CollabPrefConstants.P_SERVER);
if (collaborationServer != null) {
sessionDataURL = String.format(SESSION_DATA_URL_FORMAT_STRING,
collaborationServer, SESSION_DATA_PORT);
sessionDataURL += session.getSessionId() + "/";
}
this.sessionDataURL = Activator
.getDefault()
.getPreferenceStore()
.getString(
CollabPrefConstants.HttpCollaborationConfiguration.P_HTTP_SESSION_URL);
this.sessionDataURL += session.getSessionId() + "/";
}
/*

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.raytheon.uf.viz.collaboration</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<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.pde.core.requiredPlugins"/>
<classpathentry exported="true" kind="lib" path="openfire.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.jivesoftware.openfire</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -0,0 +1,8 @@
#Wed May 16 13:24:51 CDT 2012
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.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

View file

@ -0,0 +1,304 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Openfire
Bundle-SymbolicName: org.jivesoftware.openfire
Bundle-Version: 3.7.1
Bundle-ClassPath: openfire.jar
Export-Package: com.cenqua.shaj,
com.cenqua.shaj.log,
com.googlecode.concurrentlinkedhashmap,
com.jcraft.jzlib,
com.opensymphony.module.sitemesh,
com.opensymphony.module.sitemesh.factory,
com.opensymphony.module.sitemesh.filter,
com.opensymphony.module.sitemesh.freemarker,
com.opensymphony.module.sitemesh.html,
com.opensymphony.module.sitemesh.html.tokenizer,
com.opensymphony.module.sitemesh.html.util,
com.opensymphony.module.sitemesh.mapper,
com.opensymphony.module.sitemesh.parser,
com.opensymphony.module.sitemesh.parser.rules,
com.opensymphony.module.sitemesh.taglib,
com.opensymphony.module.sitemesh.taglib.decorator,
com.opensymphony.module.sitemesh.taglib.page,
com.opensymphony.module.sitemesh.util,
com.opensymphony.module.sitemesh.velocity,
com.strangeberry.jmdns.tools,
com.sun.syndication.feed,
com.sun.syndication.feed.atom,
com.sun.syndication.feed.impl,
com.sun.syndication.feed.module,
com.sun.syndication.feed.module.impl,
com.sun.syndication.feed.rss,
com.sun.syndication.feed.synd,
com.sun.syndication.feed.synd.impl,
com.sun.syndication.fetcher,
com.sun.syndication.fetcher.impl,
com.sun.syndication.fetcher.samples,
com.sun.syndication.io,
com.sun.syndication.io.impl,
de.javawi.jstun,
de.javawi.jstun.attribute,
de.javawi.jstun.header,
de.javawi.jstun.test,
de.javawi.jstun.test.demo,
de.javawi.jstun.test.demo.ice,
de.javawi.jstun.util,
gnu.inet.encoding,
javax.jmdns,
javax.servlet.jsp,
javax.servlet.jsp.el,
javax.servlet.jsp.jstl.core,
javax.servlet.jsp.jstl.fmt,
javax.servlet.jsp.jstl.sql,
javax.servlet.jsp.jstl.tlv,
javax.servlet.jsp.tagext,
javax.xml.namespace,
org.apache.commons.codec,
org.apache.commons.codec.binary,
org.apache.commons.codec.digest,
org.apache.commons.codec.language,
org.apache.commons.codec.net,
org.apache.commons.httpclient,
org.apache.commons.httpclient.auth,
org.apache.commons.httpclient.cookie,
org.apache.commons.httpclient.methods,
org.apache.commons.httpclient.methods.multipart,
org.apache.commons.httpclient.params,
org.apache.commons.httpclient.protocol,
org.apache.commons.httpclient.util,
org.apache.commons.lang,
org.apache.commons.lang.builder,
org.apache.commons.lang.enums,
org.apache.commons.lang.exception,
org.apache.commons.lang.math,
org.apache.commons.lang.mutable,
org.apache.commons.lang.text,
org.apache.commons.lang.time,
org.apache.commons.logging,
org.apache.commons.logging.impl,
org.apache.log4j,
org.apache.log4j.chainsaw,
org.apache.log4j.config,
org.apache.log4j.helpers,
org.apache.log4j.jdbc,
org.apache.log4j.jmx,
org.apache.log4j.lf5,
org.apache.log4j.lf5.util,
org.apache.log4j.lf5.viewer,
org.apache.log4j.lf5.viewer.categoryexplorer,
org.apache.log4j.lf5.viewer.configure,
org.apache.log4j.net,
org.apache.log4j.nt,
org.apache.log4j.or,
org.apache.log4j.or.jms,
org.apache.log4j.or.sax,
org.apache.log4j.spi,
org.apache.log4j.varia,
org.apache.log4j.xml,
org.apache.mina.common,
org.apache.mina.common.support,
org.apache.mina.filter,
org.apache.mina.filter.codec,
org.apache.mina.filter.codec.demux,
org.apache.mina.filter.codec.serialization,
org.apache.mina.filter.codec.support,
org.apache.mina.filter.codec.textline,
org.apache.mina.filter.executor,
org.apache.mina.filter.support,
org.apache.mina.handler,
org.apache.mina.handler.chain,
org.apache.mina.handler.demux,
org.apache.mina.handler.multiton,
org.apache.mina.handler.support,
org.apache.mina.management,
org.apache.mina.transport.socket.nio,
org.apache.mina.transport.socket.nio.support,
org.apache.mina.transport.vmpipe,
org.apache.mina.transport.vmpipe.support,
org.apache.mina.util,
org.apache.taglibs.standard,
org.apache.taglibs.standard.extra.spath,
org.apache.taglibs.standard.functions,
org.apache.taglibs.standard.lang.jstl,
org.apache.taglibs.standard.lang.jstl.parser,
org.apache.taglibs.standard.lang.jstl.test,
org.apache.taglibs.standard.lang.jstl.test.beans,
org.apache.taglibs.standard.lang.support,
org.apache.taglibs.standard.resources,
org.apache.taglibs.standard.tag.common.core,
org.apache.taglibs.standard.tag.common.fmt,
org.apache.taglibs.standard.tag.common.sql,
org.apache.taglibs.standard.tag.common.xml,
org.apache.taglibs.standard.tag.el.core,
org.apache.taglibs.standard.tag.el.fmt,
org.apache.taglibs.standard.tag.el.sql,
org.apache.taglibs.standard.tag.el.xml,
org.apache.taglibs.standard.tag.rt.core,
org.apache.taglibs.standard.tag.rt.fmt,
org.apache.taglibs.standard.tag.rt.sql,
org.apache.taglibs.standard.tag.rt.xml,
org.apache.taglibs.standard.tei,
org.apache.taglibs.standard.tlv,
org.dom4j,
org.dom4j.bean,
org.dom4j.datatype,
org.dom4j.dom,
org.dom4j.dtd,
org.dom4j.io,
org.dom4j.jaxb,
org.dom4j.rule,
org.dom4j.rule.pattern,
org.dom4j.swing,
org.dom4j.tree,
org.dom4j.util,
org.dom4j.xpath,
org.dom4j.xpp,
org.eclipse.jetty.continuation,
org.eclipse.jetty.http,
org.eclipse.jetty.http.security,
org.eclipse.jetty.http.ssl,
org.eclipse.jetty.io,
org.eclipse.jetty.io.bio,
org.eclipse.jetty.io.nio,
org.eclipse.jetty.security,
org.eclipse.jetty.security.authentication,
org.eclipse.jetty.server,
org.eclipse.jetty.server.bio,
org.eclipse.jetty.server.handler,
org.eclipse.jetty.server.nio,
org.eclipse.jetty.server.session,
org.eclipse.jetty.server.ssl,
org.eclipse.jetty.servlet,
org.eclipse.jetty.util,
org.eclipse.jetty.util.ajax,
org.eclipse.jetty.util.component,
org.eclipse.jetty.util.log,
org.eclipse.jetty.util.resource,
org.eclipse.jetty.util.thread,
org.eclipse.jetty.webapp,
org.eclipse.jetty.xml,
org.jaxen,
org.jaxen.dom,
org.jaxen.dom.html,
org.jaxen.dom4j,
org.jaxen.expr,
org.jaxen.expr.iter,
org.jaxen.function,
org.jaxen.function.ext,
org.jaxen.function.xslt,
org.jaxen.javabean,
org.jaxen.jdom,
org.jaxen.pattern,
org.jaxen.saxpath,
org.jaxen.saxpath.base,
org.jaxen.saxpath.conformance,
org.jaxen.saxpath.helpers,
org.jaxen.util,
org.jaxen.xom,
org.jdom,
org.jdom.adapters,
org.jdom.filter,
org.jdom.input,
org.jdom.output,
org.jdom.transform,
org.jdom.xpath,
org.jivesoftware.admin,
org.jivesoftware.database,
org.jivesoftware.database.bugfix,
org.jivesoftware.openfire,
org.jivesoftware.openfire.admin,
org.jivesoftware.openfire.audit,
org.jivesoftware.openfire.audit.spi,
org.jivesoftware.openfire.auth,
org.jivesoftware.openfire.clearspace,
org.jivesoftware.openfire.cluster,
org.jivesoftware.openfire.commands,
org.jivesoftware.openfire.commands.admin,
org.jivesoftware.openfire.commands.admin.group,
org.jivesoftware.openfire.commands.admin.muc,
org.jivesoftware.openfire.commands.admin.user,
org.jivesoftware.openfire.commands.clearspace,
org.jivesoftware.openfire.commands.event,
org.jivesoftware.openfire.component,
org.jivesoftware.openfire.container,
org.jivesoftware.openfire.disco,
org.jivesoftware.openfire.entitycaps,
org.jivesoftware.openfire.event,
org.jivesoftware.openfire.filetransfer,
org.jivesoftware.openfire.filetransfer.proxy,
org.jivesoftware.openfire.forms,
org.jivesoftware.openfire.forms.spi,
org.jivesoftware.openfire.group,
org.jivesoftware.openfire.handler,
org.jivesoftware.openfire.http,
org.jivesoftware.openfire.interceptor,
org.jivesoftware.openfire.ldap,
org.jivesoftware.openfire.lockout,
org.jivesoftware.openfire.mediaproxy,
org.jivesoftware.openfire.muc,
org.jivesoftware.openfire.muc.cluster,
org.jivesoftware.openfire.muc.spi,
org.jivesoftware.openfire.multiplex,
org.jivesoftware.openfire.net,
org.jivesoftware.openfire.nio,
org.jivesoftware.openfire.pep,
org.jivesoftware.openfire.privacy,
org.jivesoftware.openfire.pubsub,
org.jivesoftware.openfire.pubsub.models,
org.jivesoftware.openfire.resultsetmanager,
org.jivesoftware.openfire.roster,
org.jivesoftware.openfire.sasl,
org.jivesoftware.openfire.security,
org.jivesoftware.openfire.server,
org.jivesoftware.openfire.session,
org.jivesoftware.openfire.spi,
org.jivesoftware.openfire.starter,
org.jivesoftware.openfire.stats,
org.jivesoftware.openfire.stun,
org.jivesoftware.openfire.transport,
org.jivesoftware.openfire.update,
org.jivesoftware.openfire.user,
org.jivesoftware.openfire.vcard,
org.jivesoftware.openfire.webdav,
org.jivesoftware.stringprep,
org.jivesoftware.util,
org.jivesoftware.util.cache,
org.jivesoftware.util.log.util,
org.logicalcobwebs.cglib.asm,
org.logicalcobwebs.cglib.asm.attrs,
org.logicalcobwebs.cglib.core,
org.logicalcobwebs.cglib.proxy,
org.logicalcobwebs.cglib.reflect,
org.logicalcobwebs.concurrent,
org.logicalcobwebs.proxool,
org.logicalcobwebs.proxool.admin,
org.logicalcobwebs.proxool.admin.jmx,
org.logicalcobwebs.proxool.admin.jndi,
org.logicalcobwebs.proxool.admin.servlet,
org.logicalcobwebs.proxool.configuration,
org.logicalcobwebs.proxool.proxy,
org.logicalcobwebs.proxool.resources,
org.logicalcobwebs.proxool.util,
org.slf4j,
org.slf4j.helpers,
org.slf4j.spi,
org.xmlpull.mxp1,
org.xmlpull.mxp1_serializer,
org.xmlpull.v1,
org.xmlpull.v1.builder,
org.xmlpull.v1.builder.adapter,
org.xmlpull.v1.builder.impl,
org.xmlpull.v1.dom2_builder,
org.xmlpull.v1.parser_pool,
org.xmlpull.v1.sax2,
org.xmlpull.v1.util,
org.xmlpull.v1.wrapper,
org.xmlpull.v1.wrapper.classic,
org.xmpp.component,
org.xmpp.forms,
org.xmpp.muc,
org.xmpp.packet,
org.xmpp.resultsetmanagement,
org.xmpp.util
Bundle-RequiredExecutionEnvironment: JavaSE-1.6

View file

@ -0,0 +1,2 @@
bin.includes = META-INF/,\
openfire.jar

Binary file not shown.

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>build.openfire.plugin</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>

View file

@ -0,0 +1,90 @@
<!--
Setup will copy the plugin to the openfire source plugins directory.
Setup will also rearrange the source directories to match the openfire
plugin source directory layout. And, setup will copy dependent libraries
to the lib directory of the plugin.
-->
<project>
<!-- The following properties are provided externally as arguments. -->
<property name="baseline.dir"
value="" />
<property name="openfire.src.dir"
value="" />
<property name="plugin.name"
value="" />
<!-- END OF PROPERTIES -->
<target name="init">
<!-- copy the plugin to the openfire source plugins directory. -->
<mkdir dir="${openfire.src.dir}/src/plugins/${plugin.name}" />
<copy todir="${openfire.src.dir}/src/plugins/${plugin.name}">
<fileset dir="${baseline.dir}/${plugin.name}" />
</copy>
</target>
<target name="setup" depends="init">
<!-- re-arrange the source directories -->
<!--
pluginDir/
|- src/
|- database
|- java
|- web
-->
<mkdir dir="${openfire.src.dir}/src/plugins/${plugin.name}/src" />
<if>
<available
file="${openfire.src.dir}/src/plugins/${plugin.name}/java"
type="dir" />
<then>
<move todir="${openfire.src.dir}/src/plugins/${plugin.name}/src/java">
<fileset dir="${openfire.src.dir}/src/plugins/${plugin.name}/java" />
</move>
</then>
</if>
<if>
<available
file="${openfire.src.dir}/src/plugins/${plugin.name}/database"
type="dir" />
<then>
<move todir="${openfire.src.dir}/src/plugins/${plugin.name}/src/database">
<fileset dir="${openfire.src.dir}/src/plugins/${plugin.name}/database" />
</move>
</then>
</if>
<if>
<available
file="${openfire.src.dir}/src/plugins/${plugin.name}/web"
type="dir" />
<then>
<move todir="${openfire.src.dir}/src/plugins/${plugin.name}/src/web">
<fileset dir="${openfire.src.dir}/src/plugins/${plugin.name}/web" />
</move>
</then>
</if>
<!-- create the lib directory -->
<mkdir dir="${openfire.src.dir}/src/plugins/${plugin.name}/lib" />
<!-- copy the dependencies -->
<!--
TODO: will need to adjust this logic if we ever have a
dependency that is not a FOSS project.
-->
<for list="${plugin.dependent.libs}" param="plugin">
<sequential>
<copy todir="${openfire.src.dir}/src/plugins/${plugin.name}/lib">
<fileset dir="${baseline.dir}/@{plugin}">
<include name="**/*.jar" />
</fileset>
</copy>
</sequential>
</for>
</target>
<taskdef resource="net/sf/antcontrib/antlib.xml"
classpath="${build.dir.location}/ant/lib/ant-contrib-1.0b3.jar" />
</project>

View file

@ -0,0 +1,114 @@
<project default="build" basedir=".">
<!-- private static variables -->
<property name="openfire.src"
value="openfire_src_3_7_1.tar.gz" />
<property name="openfire.src.dir"
value="${basedir}/tmp/build/openfire_src" />
<property name="baseline.dir"
value="${basedir}/../" />
<!-- optional command-line parameters -->
<property name="destination.directory"
value="" />
<target name="clean">
<!-- Remove artifacts from a previous build, if they exist. -->
<if>
<available file="${basedir}/tmp" type="dir" />
<then>
<delete quiet="true" includeemptydirs="true">
<fileset dir="${basedir}/tmp" />
</delete>
</then>
</if>
</target>
<target name="init" depends="clean">
<!-- Unpack the source in a temporary directory. -->
<mkdir dir="${basedir}/tmp/build" />
<!-- since untar is not working in this version of ant. -->
<exec executable="/bin/tar">
<arg value="-xf" />
<arg value="${basedir}/src/${openfire.src}" />
<arg value="-C" />
<arg value="${basedir}/tmp/build" />
</exec>
</target>
<target name="build" depends="init">
<!-- Build openfire -->
<ant antfile="${openfire.src.dir}/build/build.xml"
dir="${openfire.src.dir}" />
<!-- List plugins to build here. -->
<build.openfire.plugin
plugin.name="com.raytheon.openfire.plugin.configuration.collaboration" />
<antcall target="clean" />
</target>
<macrodef name="build.openfire.plugin">
<attribute name="plugin.name" />
<sequential>
<!-- ensure that the plugin exists -->
<if>
<not>
<available file="${baseline.dir}/@{plugin.name}"
type="dir" />
</not>
<then>
<fail message="Error: the specified plugin '@{plugin.name}' does not exist." />
</then>
</if>
<echo message="Building Openfire Plugin: @{plugin.name}" />
<!-- setup -->
<ant antfile="${baseline.dir}/@{plugin.name}/setup.xml"
dir="${baseline.dir}/@{plugin.name}">
<property name="plugin.name"
value="@{plugin.name}" />
<property name="openfire.src.dir"
value="${openfire.src.dir}" />
<property name="baseline.dir"
value="${baseline.dir}" />
</ant>
<!-- build the plugin -->
<ant antfile="${openfire.src.dir}/build/build.xml"
dir="${openfire.src.dir}" target="plugin">
<property name="plugin"
value="@{plugin.name}" />
</ant>
<!-- verify that the plugin exists now. -->
<if>
<not>
<available
file="${openfire.src.dir}/target/openfire/plugins/@{plugin.name}.jar" />
</not>
<then>
<fail
message="Error: the plugin '@{plugin.name}.jar' cannot be found at the expected location." />
</then>
</if>
<!-- if specified, copy the plugin to the destination directory. -->
<if>
<not>
<equals arg1="${destination.directory}" arg2="" />
</not>
<then>
<copy todir="${destination.directory}">
<fileset
file="${openfire.src.dir}/target/openfire/plugins/@{plugin.name}.jar" />
</copy>
</then>
</if>
</sequential>
</macrodef>
<taskdef resource="net/sf/antcontrib/antlib.xml"
classpath="${basedir}/ant/lib/ant-contrib-1.0b3.jar" />
</project>

View file

@ -0,0 +1 @@
beeea06bd8eedd0a1a4f03c83507adff749d488f

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="java"/>
<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.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.raytheon.openfire.plugin.configuration.collaboration</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -0,0 +1,8 @@
#Fri May 11 11:19:51 CDT 2012
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.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

View file

@ -0,0 +1,11 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: CollaborationConfiguration
Bundle-SymbolicName: com.raytheon.openfire.plugin.configuration.collaboration;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: RAYTHEON
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.jivesoftware.smack;bundle-version="3.1.100",
org.jivesoftware.openfire;bundle-version="3.7.1",
org.apache.commons.configuration;bundle-version="1.6.0",
org.apache.commons.collections;bundle-version="3.2.0"

View file

@ -0,0 +1,4 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.

View file

@ -0,0 +1,118 @@
/**
* @author bkowal
*/
package com.raytheon.openfire.plugin.configuration.collaboration;
import java.io.File;
import java.net.InetAddress;
import java.net.UnknownHostException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.jivesoftware.openfire.MessageRouter;
import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.container.Plugin;
import org.jivesoftware.openfire.container.PluginManager;
import org.jivesoftware.openfire.event.SessionEventDispatcher;
import org.xmpp.packet.JID;
import org.apache.commons.configuration.ConfigurationException;
import com.raytheon.openfire.plugin.configuration.collaboration.configuration.HttpdCollaborationConfiguration;
import com.raytheon.openfire.plugin.configuration.collaboration.httpd.HttpdCollaborationConfReader;
import com.raytheon.openfire.plugin.configuration.collaboration.listener.HttpdCollaborationSessionEventListener;
/**
* @author bkowal
*
*/
public class HttpdCollaborationConfigurationPlugin implements Plugin {
private static final Logger Log = LoggerFactory
.getLogger(HttpdCollaborationConfigurationPlugin.class);
private static final String ABORT_ERROR_MESSAGE =
"Aborting initialization of the HttpdCollaborationConfigurationPlugin plugin.";
private HttpdCollaborationSessionEventListener listener;
/**
*
*/
public HttpdCollaborationConfigurationPlugin() {
}
/*
* (non-Javadoc)
*
* @see org.jivesoftware.openfire.container.Plugin#destroyPlugin()
*/
@Override
public void destroyPlugin() {
if (this.listener == null) {
return;
}
SessionEventDispatcher.removeListener(this.listener);
this.listener.dispose();
this.listener = null;
}
/*
* (non-Javadoc)
*
* @see
* org.jivesoftware.openfire.container.Plugin#initializePlugin(org.jivesoftware
* .openfire.container.PluginManager, java.io.File)
*/
@Override
public void initializePlugin(PluginManager arg0, File arg1) {
/*
* Attempt to read the httpd collaboration configuration.
*/
HttpdCollaborationConfReader confReader = new HttpdCollaborationConfReader();
try {
confReader.execute();
} catch (ConfigurationException e1) {
Log.error("Unable to read the httpd collaboration configuration.",
e1);
Log.error(ABORT_ERROR_MESSAGE);
return;
} catch (Exception e2) {
Log.error("An unexpected error has occurred.", e2);
Log.error(ABORT_ERROR_MESSAGE);
return;
}
/*
* Determine the hostname - there is a restriction in place that
* requires openfire and httpd-collaboration to be installed on the same
* machine.
*/
InetAddress address = null;
try {
address = InetAddress.getLocalHost();
} catch (UnknownHostException e1) {
Log.error("Unable to retrieve the hostname.", e1);
Log.error(ABORT_ERROR_MESSAGE);
}
/* Persist the configuration information. */
HttpdCollaborationConfiguration httpdCollaborationConfiguration = new HttpdCollaborationConfiguration();
httpdCollaborationConfiguration.setSessionDataHost(address.getHostName());
httpdCollaborationConfiguration.setSessionDataPort(confReader.getListenPort());
/* Retrieve openfire components. */
JID serverAddress = new JID(XMPPServer.getInstance().getServerInfo()
.getXMPPDomain());
MessageRouter router = XMPPServer.getInstance().getMessageRouter();
/* Create a new listener. */
this.listener = new HttpdCollaborationSessionEventListener();
/* Initialize the listener. */
this.listener.setOpenfireConfiguration(httpdCollaborationConfiguration);
this.listener.setServerAddress(serverAddress);
this.listener.setRouter(router);
/* Make it possible for the listener to receive events. */
SessionEventDispatcher.addListener(this.listener);
}
}

View file

@ -0,0 +1,50 @@
/**
*
*/
package com.raytheon.openfire.plugin.configuration.collaboration.configuration;
/**
* @author bkowal
*
*/
public class HttpdCollaborationConfiguration {
private static final String SESSION_DATA_URL_FORMAT_STRING = "http://%s:%s/session_data/";
private static final String URL_PARAMETER_NAME = "sessionDataHttpURL";
private String sessionDataHost;
private String sessionDataPort;
/**
*
*/
public HttpdCollaborationConfiguration() {
this.sessionDataHost = null;
this.sessionDataPort = null;
}
@Override
public String toString()
{
return URL_PARAMETER_NAME + " : " + this.getHttpdCollaborationURL();
}
private String getHttpdCollaborationURL() {
return String.format(SESSION_DATA_URL_FORMAT_STRING,
this.sessionDataHost, this.sessionDataPort);
}
public String getSessionDataHost() {
return sessionDataHost;
}
public void setSessionDataHost(String sessionDataHost) {
this.sessionDataHost = sessionDataHost;
}
public String getSessionDataPort() {
return sessionDataPort;
}
public void setSessionDataPort(String sessionDataPort) {
this.sessionDataPort = sessionDataPort;
}
}

View file

@ -0,0 +1,44 @@
/**
*
*/
package com.raytheon.openfire.plugin.configuration.collaboration.httpd;
import org.apache.commons.configuration.ConfigurationException;
/**
* @author bkowal
*
*/
public class HttpdCollaborationConfReader
{
/*
* The file location can be hard-coded because the
* awips2-httpd-collaboration does not support prefixes, so it
* will always be installed beneath /awips2/httpd-collaboration.
* And awips2-openfire cannot be installed until
* awips2-httpd-collaboration has been installed.
*/
private static final String CONF_FILE =
"/awips2/httpd_collaboration/etc/httpd/conf/httpd.conf";
private static final String LISTEN_PROPERTY = "Listen";
private HttpdCollaborationPropertiesConfiguration propertiesConfiguration;
/**
*
*/
public HttpdCollaborationConfReader()
{
}
public void execute()
throws ConfigurationException
{
this.propertiesConfiguration =
new HttpdCollaborationPropertiesConfiguration();
this.propertiesConfiguration.load(CONF_FILE);
}
public String getListenPort()
{
return this.propertiesConfiguration.getString(LISTEN_PROPERTY);
}
}

View file

@ -0,0 +1,59 @@
/**
*
*/
package com.raytheon.openfire.plugin.configuration.collaboration.httpd;
import java.io.File;
import java.net.URL;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;
/**
* @author bkowal
*
* This class was created because version 1.6 of commons configuration
* does not allow you to decide whether you want to allow includes or
* not. There is a 'setIncludesAllowed' method; however, it is
* protected.
*
*/
public class HttpdCollaborationPropertiesConfiguration extends PropertiesConfiguration {
/**
*
*/
public HttpdCollaborationPropertiesConfiguration() {
super();
}
/**
* @param fileName
* @throws ConfigurationException
*/
public HttpdCollaborationPropertiesConfiguration(String fileName)
throws ConfigurationException {
super(fileName);
}
/**
* @param file
* @throws ConfigurationException
*/
public HttpdCollaborationPropertiesConfiguration(File file) throws ConfigurationException {
super(file);
}
/**
* @param url
* @throws ConfigurationException
*/
public HttpdCollaborationPropertiesConfiguration(URL url) throws ConfigurationException {
super(url);
}
@Override
public void setBasePath(String basePath) {
super.setBasePath(basePath);
this.setIncludesAllowed(false);
}
}

View file

@ -0,0 +1,139 @@
/**
*
*/
package com.raytheon.openfire.plugin.configuration.collaboration.listener;
import java.util.TimerTask;
import org.jivesoftware.openfire.event.SessionEventListener;
import org.jivesoftware.openfire.session.Session;
import org.jivesoftware.util.TaskEngine;
import org.jivesoftware.openfire.MessageRouter;
import org.xmpp.packet.JID;
import org.xmpp.packet.Message;
import com.raytheon.openfire.plugin.configuration.collaboration.configuration.HttpdCollaborationConfiguration;
/**
* @author bkowal
*
*/
public class HttpdCollaborationSessionEventListener implements SessionEventListener {
private static final int MSG_SEND_DELAY = 5000;
private static final String CONFIG_PREAMBLE = "[[CONFIG#";
private static final String CONFIG_SUFFIX = "]]";
private HttpdCollaborationConfiguration httpdCollaborationConfiguration;
private JID serverAddress;
private MessageRouter router;
/**
*
*/
public HttpdCollaborationSessionEventListener() {
this.httpdCollaborationConfiguration = null;
this.serverAddress = null;
this.router = null;
}
public void dispose() {
this.serverAddress = null;
this.router = null;
}
/*
* (non-Javadoc)
*
* @see
* org.jivesoftware.openfire.event.SessionEventListener#anonymousSessionCreated
* (org.jivesoftware.openfire.session.Session)
*/
@Override
public void anonymousSessionCreated(Session session) {
/* Ignore. */
}
/*
* (non-Javadoc)
*
* @see org.jivesoftware.openfire.event.SessionEventListener#
* anonymousSessionDestroyed(org.jivesoftware.openfire.session.Session)
*/
@Override
public void anonymousSessionDestroyed(Session session) {
/* Ignore. */
}
/*
* (non-Javadoc)
*
* @see
* org.jivesoftware.openfire.event.SessionEventListener#resourceBound(org
* .jivesoftware.openfire.session.Session)
*/
@Override
public void resourceBound(Session session) {
/* Ignore. */
}
/*
* (non-Javadoc)
*
* @see
* org.jivesoftware.openfire.event.SessionEventListener#sessionCreated(org
* .jivesoftware.openfire.session.Session)
*/
@Override
public void sessionCreated(Session session) {
final Message message = new Message();
message.setTo(session.getAddress());
message.setFrom(this.serverAddress);
final String body = CONFIG_PREAMBLE
+ this.httpdCollaborationConfiguration.toString() + CONFIG_SUFFIX;
message.setBody(body);
TimerTask messageTask = new TimerTask() {
@Override
public void run() {
router.route(message);
}
};
TaskEngine.getInstance().schedule(messageTask, MSG_SEND_DELAY);
}
/*
* (non-Javadoc)
*
* @see
* org.jivesoftware.openfire.event.SessionEventListener#sessionDestroyed
* (org.jivesoftware.openfire.session.Session)
*/
@Override
public void sessionDestroyed(Session session) {
/* Ignore. */
}
/**
* @param httpdCollaborationConfiguration
* the openfireConfiguration to set
*/
public void setOpenfireConfiguration(
HttpdCollaborationConfiguration httpdCollaborationConfiguration) {
this.httpdCollaborationConfiguration = httpdCollaborationConfiguration;
}
/**
* @param serverAddress
* the serverAddress to set
*/
public void setServerAddress(JID serverAddress) {
this.serverAddress = serverAddress;
}
/**
* @param router
* the router to set
*/
public void setRouter(MessageRouter router) {
this.router = router;
}
}

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin>
<class>com.raytheon.openfire.plugin.configuration.collaboration.HttpdCollaborationConfigurationPlugin</class>
<name>Httpd Collaboration Configuration</name>
<description>
This plugin will provide httpd collaboration configuration information to CAVE
via openfire whenever a user logs in to openfire.
</description>
<author>bkowal</author>
<version>1.0.0</version>
<date>5/15/2012</date>
<minServerVersion>3.7.1</minServerVersion>
</plugin>

View file

@ -0,0 +1,21 @@
<project default="setup" basedir=".">
<property name="openfire.build.dir"
value="build.openfire.plugin" />
<property name="ant.abstract"
value="ant/abstract/abstract_setup.xml" />
<available file="../${openfire.build.dir}"
property="build.dir.location"
value="../${openfire.build.dir}"/>
<!-- Properties to share with the abstract "class". -->
<!--
TODO: if we have any reason to create additional openfire plugins,
we will want to replace this variable with the capability to
extract dependency information from the plugin manifest.
-->
<property name="plugin.dependent.libs"
value="org.apache.commons.configuration,org.apache.commons.collections" />
<import file="${build.dir.location}/${ant.abstract}" />
</project>

View file

@ -131,7 +131,7 @@ MaxRequestsPerChild 0
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 80
Listen 9682
#
# Dynamic Shared Object (DSO) Support

View file

@ -13,7 +13,7 @@
Name: awips2-%{_xmpp_server}
Summary: AWIPS II XMPP Server
Version: %{_xmpp_software_version}
Release: 1
Release: 2
Group: AWIPSII
BuildRoot: /tmp
BuildArch: noarch

View file

@ -0,0 +1,91 @@
diff -crB openfire-a/bin/openfire openfire-b/bin/openfire
*** openfire-a/bin/openfire 2011-10-01 16:52:44.000000000 -0500
--- openfire-b/bin/openfire 2012-05-17 10:54:53.000000000 -0500
***************
*** 259,265 ****
start)
echo "Starting openfire"
! nohup "$app_java_home/bin/java" -server -Dinstall4j.jvmDir="$app_java_home" -Dexe4j.moduleName="$prg_dir/$progname" $INSTALL4J_ADD_VM_PARAMS -classpath "$local_classpath" com.install4j.runtime.Launcher start org.jivesoftware.openfire.starter.ServerStarter false false "$prg_dir/../logs/stderror.log" "$prg_dir/../logs/stdoutt.log" true true false "" true true 0 0 "" 20 20 "Arial" "0,0,0" 8 500 "version 3.7.1" 20 40 "Arial" "0,0,0" 8 500 -1 -DopenfireHome="$prg_dir/../" -Dopenfire.lib.dir="$app_home/lib" &
;;
--- 259,265 ----
start)
echo "Starting openfire"
! nohup "$app_java_home/bin/java" -server -Dinstall4j.jvmDir="$app_java_home" -Dexe4j.moduleName="$prg_dir/$progname" $INSTALL4J_ADD_VM_PARAMS -classpath "$local_classpath" com.install4j.runtime.Launcher start org.jivesoftware.openfire.starter.ServerStarter false false "$prg_dir/../logs/stderror.log" "$prg_dir/../logs/stdoutt.log" true true false "" true true 0 0 "" 20 20 "Arial" "0,0,0" 8 500 "version 3.7.1" 20 40 "Arial" "0,0,0" 8 500 -1 -DopenfireHome="$prg_dir/../" -Dopenfire.lib.dir="$app_home/lib" > /dev/null 2>&1 &
;;
diff -crB openfire-a/lib/log4j.xml openfire-b/lib/log4j.xml
*** openfire-a/lib/log4j.xml 2011-10-01 16:51:23.000000000 -0500
--- openfire-b/lib/log4j.xml 2012-05-17 10:48:34.000000000 -0500
***************
*** 3,9 ****
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="debug-out" class="org.apache.log4j.RollingFileAppender">
! <param name="File" value="${openfireHome}/logs/debug.log" />
<param name="MaxFileSize" value="1024KB"/>
<param name="MaxBackupIndex" value="5"/>
<layout class="org.apache.log4j.PatternLayout">
--- 3,9 ----
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="debug-out" class="org.apache.log4j.RollingFileAppender">
! <param name="File" value="/awips2/openfire/logs/debug.log" />
<param name="MaxFileSize" value="1024KB"/>
<param name="MaxBackupIndex" value="5"/>
<layout class="org.apache.log4j.PatternLayout">
***************
*** 16,22 ****
</appender>
<appender name="info-out" class="org.apache.log4j.RollingFileAppender">
! <param name="File" value="${openfireHome}/logs/info.log" />
<param name="MaxFileSize" value="1024KB"/>
<param name="MaxBackupIndex" value="5"/>
<layout class="org.apache.log4j.PatternLayout">
--- 16,22 ----
</appender>
<appender name="info-out" class="org.apache.log4j.RollingFileAppender">
! <param name="File" value="/awips2/openfire/logs/info.log" />
<param name="MaxFileSize" value="1024KB"/>
<param name="MaxBackupIndex" value="5"/>
<layout class="org.apache.log4j.PatternLayout">
***************
*** 30,36 ****
</appender>
<appender name="warn-out" class="org.apache.log4j.RollingFileAppender">
! <param name="File" value="${openfireHome}/logs/warn.log" />
<param name="MaxFileSize" value="1024KB"/>
<param name="MaxBackupIndex" value="5"/>
<layout class="org.apache.log4j.PatternLayout">
--- 30,36 ----
</appender>
<appender name="warn-out" class="org.apache.log4j.RollingFileAppender">
! <param name="File" value="/awips2/openfire/logs/warn.log" />
<param name="MaxFileSize" value="1024KB"/>
<param name="MaxBackupIndex" value="5"/>
<layout class="org.apache.log4j.PatternLayout">
***************
*** 44,50 ****
</appender>
<appender name="error-out" class="org.apache.log4j.RollingFileAppender">
! <param name="File" value="${openfireHome}/logs/error.log" />
<param name="MaxFileSize" value="1024KB"/>
<param name="MaxBackupIndex" value="5"/>
<layout class="org.apache.log4j.PatternLayout">
--- 44,50 ----
</appender>
<appender name="error-out" class="org.apache.log4j.RollingFileAppender">
! <param name="File" value="/awips2/openfire/logs/error.log" />
<param name="MaxFileSize" value="1024KB"/>
<param name="MaxBackupIndex" value="5"/>
<layout class="org.apache.log4j.PatternLayout">

View file

@ -14,6 +14,7 @@ RPM_BUILD_ROOT="${2}"
srcdir="${baseline_workspace}/Installer.rpm/awips2.core/Installer.xmpp/dist"
source_tar="${srcdir}/openfire_3_7_1.tar.gz"
patch_file0="${srcdir}/openfire.patch0"
patch_file1="${srcdir}/openfire.patch1"
# Prepare the installation directory.
if [ -d ${RPM_BUILD_ROOT} ]; then
@ -41,6 +42,22 @@ patch -p1 -i ${patch_file0}
if [ $? -ne 0 ]; then
exit 1
fi
patch -p1 -i ${patch_file1}
if [ $? -ne 0 ]; then
exit 1
fi
popd
# Build and include any openfire plugins.
cd ${baseline_workspace}/build.openfire.plugin
if [ $? -ne 0 ]; then
exit 1
fi
/awips2/ant/bin/ant -f build.xml \
-Ddestination.directory=${RPM_BUILD_ROOT}/awips2/openfire/plugins
if [ $? -ne 0 ]; then
exit 1
fi
exit 0