Author: ataylor
Date: 2010-06-30 05:55:08 -0400 (Wed, 30 Jun 2010)
New Revision: 9372
Added:
trunk/src/main/org/hornetq/integration/twitter/
Removed:
trunk/src/main/org/hornetq/core/twitter/
Modified:
trunk/build-hornetq.xml
trunk/examples/core/twitter-connector/server0/hornetq-configuration.xml
trunk/src/main/org/hornetq/integration/twitter/TwitterConstants.java
trunk/src/main/org/hornetq/integration/twitter/TwitterIncomingConnectorServiceFactory.java
trunk/src/main/org/hornetq/integration/twitter/TwitterOutgoingConnectorServiceFactory.java
trunk/src/main/org/hornetq/integration/twitter/impl/IncomingTweetsHandler.java
trunk/src/main/org/hornetq/integration/twitter/impl/OutgoingTweetsHandler.java
trunk/tests/src/org/hornetq/tests/integration/twitter/TwitterTest.java
Log:
HORNETQ-189 - Create twitter bridge - added twitter integration jar and refactored
Modified: trunk/build-hornetq.xml
===================================================================
--- trunk/build-hornetq.xml 2010-06-30 08:57:30 UTC (rev 9371)
+++ trunk/build-hornetq.xml 2010-06-30 09:55:08 UTC (rev 9372)
@@ -63,6 +63,8 @@
<property name="jnp.client.jar.name"
value="jnp-client.jar"/>
<property name="jboss.integration.jar.name"
value="hornetq-jboss-as-integration.jar"/>
<property name="jboss.integration.sources.jar.name"
value="hornetq-jboss-as-integration-sources.jar"/>
+ <property name="twitter.integration.jar.name"
value="hornetq-twitter-integration.jar"/>
+ <property name="twitter.integration.sources.jar.name"
value="hornetq-twitter-integration-sources.jar"/>
<property name="bootstrap.jar.name"
value="hornetq-bootstrap.jar"/>
<property name="bootstrap.sources.jar.name"
value="hornetq-bootstrap-sources.jar"/>
<property name="logging.jar.name"
value="hornetq-logging.jar"/>
@@ -86,6 +88,7 @@
<property name="build.core.classes.dir"
value="${build.dir}/classes/core"/>
<property name="build.jms.classes.dir"
value="${build.dir}/classes/jms"/>
<property name="build.jboss.integration.classes.dir"
value="${build.dir}/classes/jboss-integration"/>
+ <property name="build.twitter.integration.classes.dir"
value="${build.dir}/classes/twitter-integration"/>
<property name="build.service.classes.dir"
value="${build.dir}/classes/service"/>
<property name="build.bootstrap.classes.dir"
value="${build.dir}/classes/bootstrap"/>
<property name="build.logging.classes.dir"
value="${build.dir}/classes/logging"/>
@@ -186,7 +189,6 @@
<path id="core.compilation.classpath">
<path refid="org.jboss.netty.classpath"/>
- <path refid="org.twitter4j.classpath"/>
</path>
<path id="jms.compilation.classpath">
@@ -205,6 +207,11 @@
<path refid="org.jboss.javaee.classpath"/>
</path>
+ <path id="twitter.integration.compilation.classpath">
+ <path location="${build.core.classes.dir}"/>
+ <path refid="org.twitter4j.classpath"/>
+ </path>
+
<path id="jboss.service.compilation.classpath">
<path refid="org.jboss.javaee.classpath"/>
<path location="${build.core.classes.dir}"/>
@@ -366,6 +373,7 @@
<mkdir dir="${build.core.classes.dir}"/>
<mkdir dir="${build.jms.classes.dir}"/>
<mkdir dir="${build.jboss.integration.classes.dir}"/>
+ <mkdir dir="${build.twitter.integration.classes.dir}"/>
<mkdir dir="${build.service.classes.dir}"/>
<mkdir dir="${build.bootstrap.classes.dir}"/>
<mkdir dir="${build.logging.classes.dir}"/>
@@ -480,6 +488,26 @@
</javac>
</target>
+ <target name="compile-twitter-integration"
depends="compile-core">
+ <javac destdir="${build.twitter.integration.classes.dir}"
+ target="${javac.target}"
+ source="${javac.source}"
+ optimize="${javac.optimize}"
+ debug="${javac.debug}"
+ depend="${javac.depend}"
+ verbose="${javac.verbose}"
+ deprecation="${javac.deprecation}"
+ includeAntRuntime="${javac.include.ant.runtime}"
+ includeJavaRuntime="${javac.include.java.runtime}"
+ failonerror="${javac.fail.onerror}">
+ <src>
+ <pathelement path="${src.main.dir}"/>
+ </src>
+ <include name="org/hornetq/integration/twitter/**/*.java"/>
+ <classpath refid="twitter.integration.compilation.classpath"/>
+ </javac>
+ </target>
+
<!-- author: Lucas Amador -->
<target name="compile-jboss-service"
depends="compile-core">
<javac destdir="${build.service.classes.dir}"
@@ -620,11 +648,11 @@
<!--
========================================================================================
-->
<target name="sources-jar" description="create jar files containing
source code"
- depends="jar-core-sources, jar-core-client-sources, jar-jms-sources,
jar-jms-client-sources, jar-jboss-integration-sources, jar-jboss-service-sources,
jar-bootstrap-sources, jar-logging-sources, jar-ra-sources,
jar-resources-sources">
+ depends="jar-core-sources, jar-core-client-sources, jar-jms-sources,
jar-jms-client-sources, jar-jboss-integration-sources, jar-jboss-service-sources,
jar-bootstrap-sources, jar-logging-sources, jar-ra-sources, jar-resources-sources,
jar-twitter-integration-sources">
</target>
<target name="jar"
- depends="jar-core, jar-core-client, jar-jms, jar-jms-client,
jar-jboss-integration, jar-jboss-service, jar-bootstrap, jar-logging, jar-ra, jar-mc,
jar-jnp-client, jar-resources, sources-jar">
+ depends="jar-core, jar-core-client, jar-jms, jar-jms-client,
jar-jboss-integration, jar-jboss-service, jar-bootstrap, jar-logging, jar-ra, jar-mc,
jar-jnp-client, jar-resources, sources-jar, jar-twitter-integration">
</target>
<target name="jar-jnp-client" depends="init">
@@ -748,6 +776,22 @@
</jar>
</target>
+ <target name="jar-twitter-integration"
depends="compile-twitter-integration">
+
+ <jar jarfile="${build.jars.dir}/${twitter.integration.jar.name}">
+ <fileset dir="${build.twitter.integration.classes.dir}"
includes="**"/>
+ </jar>
+
+ </target>
+
+ <target name="jar-twitter-integration-sources">
+ <jar
jarfile="${build.jars.dir}/${twitter.integration.sources.jar.name}">
+ <fileset dir="${src.main.dir}">
+ <include name="org/hornetq/integration/twitter/**/*.java"/>
+ </fileset>
+ </jar>
+ </target>
+
<!-- author: Lucas Amador -->
<target name="jar-jboss-service"
depends="compile-jboss-service">
@@ -945,8 +989,9 @@
<include name="${core.client.jar.name}"/>
<include name="${jms.client.jar.name}"/>
<include name="${jnp.client.jar.name}"/>
+ <include name="${twitter.integration.jar.name}"/>
</fileset>
- <fileset dir="${org.jboss.naming.lib}">
+ <fileset dir="${org.jboss.naming.lib}">
<include name="jnpserver.jar"/>
</fileset>
<fileset dir="${org.jboss.javaee.lib}">
Modified: trunk/examples/core/twitter-connector/server0/hornetq-configuration.xml
===================================================================
--- trunk/examples/core/twitter-connector/server0/hornetq-configuration.xml 2010-06-30
08:57:30 UTC (rev 9371)
+++ trunk/examples/core/twitter-connector/server0/hornetq-configuration.xml 2010-06-30
09:55:08 UTC (rev 9372)
@@ -42,14 +42,14 @@
<connector-services>
<connector-service name="my-incoming-tweets">
-
<factory-class>org.hornetq.core.twitter.TwitterIncomingConnectorServiceFactory</factory-class>
+
<factory-class>org.hornetq.integration.twitter.TwitterIncomingConnectorServiceFactory</factory-class>
<param key="queue" value="queue.incomingQueue"/>
<param key="username" value="${twitter.username}"/>
<param key="password" value="${twitter.password}"/>
<param key="interval" value="60"/>
</connector-service>
<connector-service name="my-outgoing-tweets">
-
<factory-class>org.hornetq.core.twitter.TwitterOutgoingConnectorServiceFactory</factory-class>
+
<factory-class>org.hornetq.integration.twitter.TwitterOutgoingConnectorServiceFactory</factory-class>
<param key="queue" value="queue.outgoingQueue"/>
<param key="username" value="${twitter.username}"/>
<param key="password" value="${twitter.password}"/>
Copied: trunk/src/main/org/hornetq/integration/twitter (from rev 9371,
trunk/src/main/org/hornetq/core/twitter)
Modified: trunk/src/main/org/hornetq/integration/twitter/TwitterConstants.java
===================================================================
--- trunk/src/main/org/hornetq/core/twitter/TwitterConstants.java 2010-06-30 08:57:30 UTC
(rev 9371)
+++ trunk/src/main/org/hornetq/integration/twitter/TwitterConstants.java 2010-06-30
09:55:08 UTC (rev 9372)
@@ -11,7 +11,7 @@
* permissions and limitations under the License.
*/
-package org.hornetq.core.twitter;
+package org.hornetq.integration.twitter;
import java.util.HashSet;
import java.util.Set;
Modified:
trunk/src/main/org/hornetq/integration/twitter/TwitterIncomingConnectorServiceFactory.java
===================================================================
---
trunk/src/main/org/hornetq/core/twitter/TwitterIncomingConnectorServiceFactory.java 2010-06-30
08:57:30 UTC (rev 9371)
+++
trunk/src/main/org/hornetq/integration/twitter/TwitterIncomingConnectorServiceFactory.java 2010-06-30
09:55:08 UTC (rev 9372)
@@ -10,13 +10,13 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
-package org.hornetq.core.twitter;
+package org.hornetq.integration.twitter;
import org.hornetq.core.persistence.StorageManager;
import org.hornetq.core.postoffice.PostOffice;
import org.hornetq.core.server.ConnectorService;
import org.hornetq.core.server.ConnectorServiceFactory;
-import org.hornetq.core.twitter.impl.IncomingTweetsHandler;
+import org.hornetq.integration.twitter.impl.IncomingTweetsHandler;
import java.util.Map;
import java.util.Set;
Modified:
trunk/src/main/org/hornetq/integration/twitter/TwitterOutgoingConnectorServiceFactory.java
===================================================================
---
trunk/src/main/org/hornetq/core/twitter/TwitterOutgoingConnectorServiceFactory.java 2010-06-30
08:57:30 UTC (rev 9371)
+++
trunk/src/main/org/hornetq/integration/twitter/TwitterOutgoingConnectorServiceFactory.java 2010-06-30
09:55:08 UTC (rev 9372)
@@ -10,13 +10,13 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
-package org.hornetq.core.twitter;
+package org.hornetq.integration.twitter;
import org.hornetq.core.persistence.StorageManager;
import org.hornetq.core.postoffice.PostOffice;
import org.hornetq.core.server.ConnectorService;
import org.hornetq.core.server.ConnectorServiceFactory;
-import org.hornetq.core.twitter.impl.OutgoingTweetsHandler;
+import org.hornetq.integration.twitter.impl.OutgoingTweetsHandler;
import java.util.Map;
import java.util.Set;
Modified: trunk/src/main/org/hornetq/integration/twitter/impl/IncomingTweetsHandler.java
===================================================================
--- trunk/src/main/org/hornetq/core/twitter/impl/IncomingTweetsHandler.java 2010-06-30
08:57:30 UTC (rev 9371)
+++
trunk/src/main/org/hornetq/integration/twitter/impl/IncomingTweetsHandler.java 2010-06-30
09:55:08 UTC (rev 9372)
@@ -10,7 +10,7 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
-package org.hornetq.core.twitter.impl;
+package org.hornetq.integration.twitter.impl;
import org.hornetq.api.core.SimpleString;
import org.hornetq.core.logging.Logger;
@@ -20,7 +20,7 @@
import org.hornetq.core.server.ConnectorService;
import org.hornetq.core.server.ServerMessage;
import org.hornetq.core.server.impl.ServerMessageImpl;
-import org.hornetq.core.twitter.TwitterConstants;
+import org.hornetq.integration.twitter.TwitterConstants;
import org.hornetq.utils.ConfigurationHelper;
import twitter4j.*;
Modified: trunk/src/main/org/hornetq/integration/twitter/impl/OutgoingTweetsHandler.java
===================================================================
--- trunk/src/main/org/hornetq/core/twitter/impl/OutgoingTweetsHandler.java 2010-06-30
08:57:30 UTC (rev 9371)
+++
trunk/src/main/org/hornetq/integration/twitter/impl/OutgoingTweetsHandler.java 2010-06-30
09:55:08 UTC (rev 9372)
@@ -10,7 +10,7 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
-package org.hornetq.core.twitter.impl;
+package org.hornetq.integration.twitter.impl;
import org.hornetq.api.core.SimpleString;
import org.hornetq.core.filter.Filter;
@@ -18,7 +18,7 @@
import org.hornetq.core.postoffice.Binding;
import org.hornetq.core.postoffice.PostOffice;
import org.hornetq.core.server.*;
-import org.hornetq.core.twitter.TwitterConstants;
+import org.hornetq.integration.twitter.TwitterConstants;
import org.hornetq.utils.ConfigurationHelper;
import twitter4j.*;
Modified: trunk/tests/src/org/hornetq/tests/integration/twitter/TwitterTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/twitter/TwitterTest.java 2010-06-30
08:57:30 UTC (rev 9371)
+++ trunk/tests/src/org/hornetq/tests/integration/twitter/TwitterTest.java 2010-06-30
09:55:08 UTC (rev 9372)
@@ -32,8 +32,8 @@
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.ConnectorService;
import org.hornetq.core.server.HornetQServer;
-import org.hornetq.core.twitter.TwitterConstants;
-import org.hornetq.core.twitter.TwitterIncomingConnectorServiceFactory;
+import org.hornetq.integration.twitter.TwitterConstants;
+import org.hornetq.integration.twitter.TwitterIncomingConnectorServiceFactory;
import org.hornetq.tests.util.ServiceTestBase;
import org.hornetq.tests.util.UnitTestCase;
import twitter4j.*;