Author: objectiser
Date: 2011-02-15 09:19:23 -0500 (Tue, 15 Feb 2011)
New Revision: 672
Added:
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/Copyright.txt
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/META-INF/
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/META-INF/MANIFEST.MF
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/build.properties
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/pom.xml
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/org/
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/org/savara/
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/org/savara/activity/
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/org/savara/activity/notifier/
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/org/savara/activity/notifier/jms/
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/org/savara/activity/notifier/jms/JMSActivityNotifier.java
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/org/savara/activity/notifier/jms/osgi/
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/org/savara/activity/notifier/jms/osgi/Activator.java
branches/experimental/2.0.x/bundles/org.savara.common/Copyright.txt
branches/experimental/2.0.x/integration/jboss/common/src/main/configs/savara.properties
Modified:
branches/experimental/2.0.x/bundles/org.savara.common.config.file/src/main/java/org/savara/common/config/file/FileConfiguration.java
branches/experimental/2.0.x/bundles/org.savara.common.config.file/src/test/java/org/savara/common/config/file/FileConfigurationTest.java
branches/experimental/2.0.x/bundles/pom.xml
branches/experimental/2.0.x/integration/jboss/common/.classpath
branches/experimental/2.0.x/integration/jboss/common/pom.xml
branches/experimental/2.0.x/integration/jboss/common/src/main/configs/common-assembly.xml
branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service/ServiceValidatorService.java
Log:
Add JMS activity notifier support - currently publishes the event without validation
against the protocol/choreography.
Added: branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/Copyright.txt
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/Copyright.txt
(rev 0)
+++
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/Copyright.txt 2011-02-15
14:19:23 UTC (rev 672)
@@ -0,0 +1,17 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
Added:
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/META-INF/MANIFEST.MF
===================================================================
---
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/META-INF/MANIFEST.MF
(rev 0)
+++
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/META-INF/MANIFEST.MF 2011-02-15
14:19:23 UTC (rev 672)
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: SAVARA Activity Notifier JMS
+Bundle-SymbolicName: org.savara.activity.notifier.jms
+Bundle-Version: 2.0.0.SNAPSHOT
+Bundle-Activator: org.savara.activity.notifier.jms.osgi.Activator
+Import-Package: org.osgi.framework;version="1.3.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.savara.activity,
+ org.savara.common
Added:
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/build.properties
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/build.properties
(rev 0)
+++
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/build.properties 2011-02-15
14:19:23 UTC (rev 672)
@@ -0,0 +1,4 @@
+source.. = src/main/java/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
Added: branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/pom.xml
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/pom.xml
(rev 0)
+++
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/pom.xml 2011-02-15
14:19:23 UTC (rev 672)
@@ -0,0 +1,44 @@
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.savara.bundles</groupId>
+ <artifactId>org.savara.activity.notifier.jms</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
+ <name>Savara::Bundles::ActivityJMS</name>
+
+ <parent>
+ <groupId>org.savara</groupId>
+ <artifactId>bundles</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ </parent>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.savara.bundles</groupId>
+ <artifactId>org.savara.common</artifactId>
+ <version>${savara.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.savara.bundles</groupId>
+ <artifactId>org.savara.activity</artifactId>
+ <version>${savara.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.jms</groupId>
+ <artifactId>jms</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ <version>${osgi.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
Added:
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/org/savara/activity/notifier/jms/JMSActivityNotifier.java
===================================================================
---
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/org/savara/activity/notifier/jms/JMSActivityNotifier.java
(rev 0)
+++
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/org/savara/activity/notifier/jms/JMSActivityNotifier.java 2011-02-15
14:19:23 UTC (rev 672)
@@ -0,0 +1,252 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008-11, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.activity.notifier.jms;
+
+import java.io.ByteArrayOutputStream;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.jms.TextMessage;
+import javax.naming.Context;
+
+import org.savara.activity.ActivityNotifier;
+import org.savara.activity.model.Activity;
+import org.savara.activity.util.ActivityModelUtil;
+import org.savara.common.config.Configuration;
+
+/**
+ * This class provides the JMS implementation of the ActivityNotifier
+ * interface.
+ *
+ */
+public class JMSActivityNotifier implements ActivityNotifier {
+
+ public static final String JMS_DESTINATION =
"savara.activity.notifier.jms.destination";
+ public static final String JMS_CONNECTION_FACTORY =
"savara.activity.notifier.jms.connection.factory";
+
+ private static Logger logger = Logger.getLogger(JMSActivityNotifier.class.getName());
+
+ private String m_jndiInitialContextFactory=null;
+ private String m_jndiProviderURL=null;
+ private String m_jndiFactoryURLPackages=null;
+ private String m_jmsConnectionFactory=null;
+ private String m_jmsDestination=null;
+
+ private javax.jms.Connection m_connection=null;
+ private javax.jms.Session m_session=null;
+ private javax.jms.MessageProducer m_producer=null;
+
+ public void setConfiguration(Configuration config) {
+
+ logger.info("Initializing SAVARA JMS Activity Notifier");
+
+ // Set the properties from the supplied configuration
+ if (m_jndiInitialContextFactory == null) {
+ m_jndiInitialContextFactory = config.getProperty(Context.INITIAL_CONTEXT_FACTORY);
+ }
+
+ if (m_jndiProviderURL == null) {
+ m_jndiProviderURL = config.getProperty(Context.PROVIDER_URL);
+ }
+
+ if (m_jndiFactoryURLPackages == null) {
+ m_jndiFactoryURLPackages = config.getProperty(Context.URL_PKG_PREFIXES);
+ }
+
+ if (m_jmsConnectionFactory == null) {
+ m_jmsConnectionFactory = config.getProperty(JMS_CONNECTION_FACTORY);
+ }
+
+ if (m_jmsDestination == null) {
+ m_jmsDestination = config.getProperty(JMS_DESTINATION);
+ }
+
+ javax.naming.Context ctx=null;
+
+ try {
+ if (m_jndiInitialContextFactory != null) {
+ java.util.Properties jndiProps = new java.util.Properties();
+ jndiProps.setProperty(Context.INITIAL_CONTEXT_FACTORY,
+ m_jndiInitialContextFactory);
+ jndiProps.setProperty(Context.PROVIDER_URL,
+ m_jndiProviderURL);
+
+ if (m_jndiFactoryURLPackages != null) {
+ jndiProps.setProperty(Context.URL_PKG_PREFIXES,
+ m_jndiFactoryURLPackages);
+ }
+
+ ctx = new javax.naming.InitialContext(jndiProps);
+ } else {
+ if (logger.isLoggable(java.util.logging.Level.FINER)) {
+ logger.finer("Creating default initial context");
+ }
+ ctx = new javax.naming.InitialContext();
+ }
+ } catch(Exception e) {
+ logger.severe("Failed to create JNDI initial context: "+e);
+ }
+
+ // Get connection factory and destination topic
+ if (ctx != null) {
+
+ try {
+ javax.jms.ConnectionFactory factory =
+ (javax.jms.ConnectionFactory)
+ ctx.lookup(m_jmsConnectionFactory);
+
+ m_connection = factory.createConnection();
+
+ if (logger.isLoggable(Level.FINER)) {
+ logger.finer("Connection: "+m_connection);
+ }
+
+ javax.jms.Destination dest =
+ (javax.jms.Destination)ctx.lookup(m_jmsDestination);
+
+ m_session = m_connection.createSession(false,
+ javax.jms.Session.AUTO_ACKNOWLEDGE);
+
+ m_producer = m_session.createProducer(dest);
+
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine(Thread.currentThread()+
+ ": Created JMS Activity Notifier connection");
+ }
+
+ } catch(Exception e) {
+ logger.severe("Failed to create JMS connection: "+e);
+ }
+ }
+ }
+
+ /**
+ * This method sets the JNDI initial context factory class name.
+ *
+ * @param factory The factory class name
+ */
+ public void setJNDIInitialContextFactory(String factory) {
+ m_jndiInitialContextFactory = factory;
+ }
+
+ /**
+ * This method sets the provider URL that is used when publishing
+ * the tracker events.
+ *
+ * @param url The provider url
+ */
+ public void setJNDIProviderURL(String url) {
+ m_jndiProviderURL = url;
+ }
+
+ /**
+ * This method sets the JNDI factory URL packages.
+ *
+ * @param pkgs The packages
+ */
+ public void setJNDIFactoryURLPackages(String pkgs) {
+ m_jndiFactoryURLPackages = pkgs;
+ }
+
+ /**
+ * This method sets the JMS connection factory name, to
+ * be looked up within JNDI.
+ *
+ * @param cf The connection factory
+ */
+ public void setJMSConnectionFactory(String cf) {
+ m_jmsConnectionFactory = cf;
+ }
+
+ /**
+ * This method sets the JMS destination name, to
+ * be looked up within JNDI.
+ *
+ * @param dest The destination
+ */
+ public void setJMSDestination(String dest) {
+ m_jmsDestination = dest;
+ }
+
+ /**
+ * This method is used to publish the service tracker message.
+ *
+ * @param serviceName The service name
+ * @param session The session
+ * @param mesg The message
+ */
+ public void publish(Activity activity) {
+
+ if (m_producer != null) {
+
+ try {
+ ByteArrayOutputStream os=new ByteArrayOutputStream();
+
+ ActivityModelUtil.serialize(activity, os);
+
+ String act=new String(os.toByteArray());
+
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine(act);
+ }
+
+ TextMessage tm=m_session.createTextMessage(act);
+
+ if (logger.isLoggable(Level.FINEST)) {
+ logger.finest(Thread.currentThread()+
+ ": Sending JMS ServiceTracker record="+tm);
+ }
+
+ m_producer.send(tm);
+ } catch(Exception e) {
+ logger.severe("Failed to publish message: "+e);
+ }
+
+ } else {
+ logger.warning("Could not publish message: "+activity);
+ }
+ }
+
+ /**
+ * This method closes the activity notifier.
+ *
+ */
+ public void close() {
+
+ try {
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine(Thread.currentThread()+
+ ": Closing JMS Activity Notifier connection");
+ }
+
+ if (m_session != null) {
+ m_session.close();
+ m_session = null;
+ }
+
+ if (m_connection != null) {
+ m_connection.close();
+ m_connection = null;
+ }
+
+ } catch(Exception e) {
+ logger.severe("Failed to close JMS connection: "+e);
+ }
+ }
+
+}
Added:
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/org/savara/activity/notifier/jms/osgi/Activator.java
===================================================================
---
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/org/savara/activity/notifier/jms/osgi/Activator.java
(rev 0)
+++
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/org/savara/activity/notifier/jms/osgi/Activator.java 2011-02-15
14:19:23 UTC (rev 672)
@@ -0,0 +1,30 @@
+package org.savara.activity.notifier.jms.osgi;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+ private static BundleContext context;
+
+ static BundleContext getContext() {
+ return context;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext bundleContext) throws Exception {
+ Activator.context = bundleContext;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext bundleContext) throws Exception {
+ Activator.context = null;
+ }
+
+}
Added: branches/experimental/2.0.x/bundles/org.savara.common/Copyright.txt
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.common/Copyright.txt
(rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.common/Copyright.txt 2011-02-15
14:19:23 UTC (rev 672)
@@ -0,0 +1,17 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
Modified:
branches/experimental/2.0.x/bundles/org.savara.common.config.file/src/main/java/org/savara/common/config/file/FileConfiguration.java
===================================================================
---
branches/experimental/2.0.x/bundles/org.savara.common.config.file/src/main/java/org/savara/common/config/file/FileConfiguration.java 2011-02-15
12:06:56 UTC (rev 671)
+++
branches/experimental/2.0.x/bundles/org.savara.common.config.file/src/main/java/org/savara/common/config/file/FileConfiguration.java 2011-02-15
14:19:23 UTC (rev 672)
@@ -41,7 +41,13 @@
initialize();
}
- return(m_properties == null ? null : m_properties.getString(name));
+ try {
+ return(m_properties == null ? null : m_properties.getString(name));
+ } catch(java.util.MissingResourceException mre) {
+ // Ignore
+ }
+
+ return(null);
}
}
Modified:
branches/experimental/2.0.x/bundles/org.savara.common.config.file/src/test/java/org/savara/common/config/file/FileConfigurationTest.java
===================================================================
---
branches/experimental/2.0.x/bundles/org.savara.common.config.file/src/test/java/org/savara/common/config/file/FileConfigurationTest.java 2011-02-15
12:06:56 UTC (rev 671)
+++
branches/experimental/2.0.x/bundles/org.savara.common.config.file/src/test/java/org/savara/common/config/file/FileConfigurationTest.java 2011-02-15
14:19:23 UTC (rev 672)
@@ -35,4 +35,15 @@
fail("Unexpected value '"+val+"', expecting
'testvalue'");
}
}
+
+ @org.junit.Test
+ public void testGetMissingProperty() {
+ FileConfiguration config=new FileConfiguration();
+
+ String val=config.getProperty("test.missing.property");
+
+ if (val != null) {
+ fail("'test.missing.property' should not be found");
+ }
+ }
}
Modified: branches/experimental/2.0.x/bundles/pom.xml
===================================================================
--- branches/experimental/2.0.x/bundles/pom.xml 2011-02-15 12:06:56 UTC (rev 671)
+++ branches/experimental/2.0.x/bundles/pom.xml 2011-02-15 14:19:23 UTC (rev 672)
@@ -21,6 +21,7 @@
<modules>
<module>org.savara.activity</module>
+ <module>org.savara.activity.notifier.jms</module>
<module>org.savara.bpel</module>
<module>org.savara.common</module>
<module>org.savara.common.config.file</module>
Modified: branches/experimental/2.0.x/integration/jboss/common/.classpath
===================================================================
--- branches/experimental/2.0.x/integration/jboss/common/.classpath 2011-02-15 12:06:56
UTC (rev 671)
+++ branches/experimental/2.0.x/integration/jboss/common/.classpath 2011-02-15 14:19:23
UTC (rev 672)
@@ -5,6 +5,7 @@
<classpathentry kind="var"
path="M2_REPO/javax/activation/activation/1.1.1/activation-1.1.1.jar"/>
<classpathentry kind="var"
path="M2_REPO/javax/security/jaas/1.0.01/jaas-1.0.01.jar"/>
<classpathentry kind="var"
path="M2_REPO/javax/security/jacc/1.0/jacc-1.0.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/javax/jms/jms/1.1/jms-1.1.jar"/>
<classpathentry kind="var"
path="M2_REPO/javax/transaction/jta/1.1/jta-1.1.jar"/>
<classpathentry kind="var"
path="M2_REPO/javax/mail/mail/1.4/mail-1.4.jar"/>
<classpathentry kind="var"
path="M2_REPO/org/apache/ant/ant/1.7.0/ant-1.7.0.jar"/>
@@ -169,7 +170,9 @@
<classpathentry kind="var"
path="M2_REPO/org/pi4soa/org.pi4soa.common/3.1.0.Final/org.pi4soa.common-3.1.0.Final.jar"/>
<classpathentry kind="var"
path="M2_REPO/org/pi4soa/org.pi4soa.service/3.1.0.Final/org.pi4soa.service-3.1.0.Final.jar"/>
<classpathentry kind="var"
path="M2_REPO/org/savara/bundles/org.savara.activity/2.0.0-SNAPSHOT/org.savara.activity-2.0.0-SNAPSHOT.jar"
sourcepath="M2_REPO/org/savara/bundles/org.savara.activity/2.0.0-SNAPSHOT/org.savara.activity-2.0.0-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/savara/bundles/org.savara.activity.notifier.jms/2.0.0-SNAPSHOT/org.savara.activity.notifier.jms-2.0.0-SNAPSHOT.jar"
sourcepath="M2_REPO/org/savara/bundles/org.savara.activity.notifier.jms/2.0.0-SNAPSHOT/org.savara.activity.notifier.jms-2.0.0-SNAPSHOT-sources.jar"/>
<classpathentry kind="var"
path="M2_REPO/org/savara/bundles/org.savara.common/2.0.0-SNAPSHOT/org.savara.common-2.0.0-SNAPSHOT.jar"
sourcepath="M2_REPO/org/savara/bundles/org.savara.common/2.0.0-SNAPSHOT/org.savara.common-2.0.0-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/savara/bundles/org.savara.common.config.file/2.0.0-SNAPSHOT/org.savara.common.config.file-2.0.0-SNAPSHOT.jar"
sourcepath="M2_REPO/org/savara/bundles/org.savara.common.config.file/2.0.0-SNAPSHOT/org.savara.common.config.file-2.0.0-SNAPSHOT-sources.jar"/>
<classpathentry kind="var"
path="M2_REPO/org/scribble/bundles/org.scribble.common/2.0.0-SNAPSHOT/org.scribble.common-2.0.0-SNAPSHOT.jar"
sourcepath="M2_REPO/org/scribble/bundles/org.scribble.common/2.0.0-SNAPSHOT/org.scribble.common-2.0.0-SNAPSHOT-sources.jar"/>
<classpathentry kind="var"
path="M2_REPO/org/scribble/bundles/org.scribble.protocol/2.0.0-SNAPSHOT/org.scribble.protocol-2.0.0-SNAPSHOT.jar"
sourcepath="M2_REPO/org/scribble/bundles/org.scribble.protocol/2.0.0-SNAPSHOT/org.scribble.protocol-2.0.0-SNAPSHOT-sources.jar"/>
<classpathentry kind="var"
path="M2_REPO/org/jboss/aop/pluggable-instrumentor/2.1.1.GA/pluggable-instrumentor-2.1.1.GA.jar"/>
Modified: branches/experimental/2.0.x/integration/jboss/common/pom.xml
===================================================================
--- branches/experimental/2.0.x/integration/jboss/common/pom.xml 2011-02-15 12:06:56 UTC
(rev 671)
+++ branches/experimental/2.0.x/integration/jboss/common/pom.xml 2011-02-15 14:19:23 UTC
(rev 672)
@@ -29,10 +29,25 @@
</dependency>
<dependency>
<groupId>org.savara.bundles</groupId>
+ <artifactId>org.savara.common</artifactId>
+ <version>${savara.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.savara.bundles</groupId>
+ <artifactId>org.savara.common.config.file</artifactId>
+ <version>${savara.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.savara.bundles</groupId>
<artifactId>org.savara.activity</artifactId>
<version>${savara.version}</version>
</dependency>
<dependency>
+ <groupId>org.savara.bundles</groupId>
+ <artifactId>org.savara.activity.notifier.jms</artifactId>
+ <version>${savara.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.pi4soa</groupId>
<artifactId>org.pi4soa.common</artifactId>
<version>${pi4soa.version}</version>
Modified:
branches/experimental/2.0.x/integration/jboss/common/src/main/configs/common-assembly.xml
===================================================================
---
branches/experimental/2.0.x/integration/jboss/common/src/main/configs/common-assembly.xml 2011-02-15
12:06:56 UTC (rev 671)
+++
branches/experimental/2.0.x/integration/jboss/common/src/main/configs/common-assembly.xml 2011-02-15
14:19:23 UTC (rev 672)
@@ -20,7 +20,10 @@
<outputDirectory>/lib</outputDirectory>
<includes>
<include>org.savara.integration:savara-jboss</include>
+ <include>org.savara.bundles:org.savara.common</include>
+
<include>org.savara.bundles:org.savara.common.config.file</include>
<include>org.savara.bundles:org.savara.activity</include>
+
<include>org.savara.bundles:org.savara.activity.notifier.jms</include>
<include>org.pi4soa:org.pi4soa.common</include>
<include>org.pi4soa:org.pi4soa.cdl</include>
<include>org.pi4soa:org.pi4soa.service</include>
Added:
branches/experimental/2.0.x/integration/jboss/common/src/main/configs/savara.properties
===================================================================
---
branches/experimental/2.0.x/integration/jboss/common/src/main/configs/savara.properties
(rev 0)
+++
branches/experimental/2.0.x/integration/jboss/common/src/main/configs/savara.properties 2011-02-15
14:19:23 UTC (rev 672)
@@ -0,0 +1,2 @@
+savara.activity.notifier.jms.destination = topic/tracker
+savara.activity.notifier.jms.connection.factory = ConnectionFactory
Modified:
branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service/ServiceValidatorService.java
===================================================================
---
branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service/ServiceValidatorService.java 2011-02-15
12:06:56 UTC (rev 671)
+++
branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service/ServiceValidatorService.java 2011-02-15
14:19:23 UTC (rev 672)
@@ -24,8 +24,10 @@
import org.savara.activity.ActivityProcessorFactory;
import org.savara.activity.DefaultActivityProcessor;
import org.savara.activity.model.Activity;
+import org.savara.activity.notifier.jms.JMSActivityNotifier;
import org.savara.activity.util.ActivityModelUtil;
import org.savara.common.config.Configuration;
+import org.savara.common.config.file.FileConfiguration;
import org.savara.validator.ServiceValidator;
import org.savara.validator.ServiceValidatorManager;
import org.jboss.util.naming.NonSerializableFactory;
@@ -65,6 +67,14 @@
// Create ActivityProcessor
ActivityProcessor dap=new DefaultActivityProcessor();
+ FileConfiguration config=new FileConfiguration();
+
+ JMSActivityNotifier notifier=new JMSActivityNotifier();
+ notifier.setConfiguration(config);
+
+ dap.addActivityNotifier(notifier);
+
+ // TODO: Leave for now
dap.addActivityNotifier(new ActivityNotifier() {
public void setConfiguration(Configuration config) {