Author: dgolovin
Date: 2008-11-18 18:36:14 -0500 (Tue, 18 Nov 2008)
New Revision: 11872
Added:
trunk/esb/tests/org.jboss.tools.esb.project.core.test/.classpath
trunk/esb/tests/org.jboss.tools.esb.project.core.test/.project
trunk/esb/tests/org.jboss.tools.esb.project.core.test/META-INF/
trunk/esb/tests/org.jboss.tools.esb.project.core.test/META-INF/MANIFEST.MF
trunk/esb/tests/org.jboss.tools.esb.project.core.test/build.properties
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.classpath
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.project
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.settings/
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.settings/org.eclipse.jdt.core.prefs
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.settings/org.eclipse.jst.common.project.facet.core.prefs
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.settings/org.eclipse.wst.common.component
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/build/
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/esbcontent/
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/esbcontent/META-INF/
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/esbcontent/META-INF/deployment.xml
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/esbcontent/META-INF/jboss-esb.xml
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/esbcontent/lib/
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/jbm-queue-service.xml
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/org/
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/org/jboss/
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/org/jboss/soa/
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/org/jboss/soa/esb/
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/org/jboss/soa/esb/samples/
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/org/jboss/soa/esb/samples/quickstart/
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/org/jboss/soa/esb/samples/quickstart/helloworld/
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/org/jboss/soa/esb/samples/quickstart/helloworld/MyJMSListenerAction.java
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/org/jboss/soa/esb/samples/quickstart/helloworld/test/
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/org/jboss/soa/esb/samples/quickstart/helloworld/test/SendEsbMessage.java
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/org/jboss/soa/esb/samples/quickstart/helloworld/test/SendJMSMessage.java
trunk/esb/tests/org.jboss.tools.esb.project.core.test/src/
Log:
esb.project.core.test plug-in initial structure with simple project to test deployment
Added: trunk/esb/tests/org.jboss.tools.esb.project.core.test/.classpath
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.project.core.test/.classpath
(rev 0)
+++ trunk/esb/tests/org.jboss.tools.esb.project.core.test/.classpath 2008-11-18 23:36:14
UTC (rev 11872)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: trunk/esb/tests/org.jboss.tools.esb.project.core.test/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/esb/tests/org.jboss.tools.esb.project.core.test/.project
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.project.core.test/.project
(rev 0)
+++ trunk/esb/tests/org.jboss.tools.esb.project.core.test/.project 2008-11-18 23:36:14 UTC
(rev 11872)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.esb.project.core.test</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>
Property changes on: trunk/esb/tests/org.jboss.tools.esb.project.core.test/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/esb/tests/org.jboss.tools.esb.project.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.project.core.test/META-INF/MANIFEST.MF
(rev 0)
+++ trunk/esb/tests/org.jboss.tools.esb.project.core.test/META-INF/MANIFEST.MF 2008-11-18
23:36:14 UTC (rev 11872)
@@ -0,0 +1,5 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: ESB Project Core Test Plug-in
+Bundle-SymbolicName: org.jboss.tools.esb.project.core.test
+Bundle-Version: 1.0.0
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.project.core.test/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/esb/tests/org.jboss.tools.esb.project.core.test/build.properties
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.project.core.test/build.properties
(rev 0)
+++ trunk/esb/tests/org.jboss.tools.esb.project.core.test/build.properties 2008-11-18
23:36:14 UTC (rev 11872)
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.project.core.test/build.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.classpath
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.classpath
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.classpath 2008-11-18
23:36:14 UTC (rev 11872)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con"
path="org.jboss.esb.runtime.classpath/server.supplied/JBoss 4.2 Runtime"/>
+ <classpathentry kind="con"
path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/JBoss
4.2.2.GA Runtime"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/java-1.5.0-sun-1.5.0.15"/>
+ <classpathentry kind="output"
path="esbcontent/META-INF/classes"/>
+</classpath>
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.project
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.project
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.project 2008-11-18
23:36:14 UTC (rev 11872)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>esbp1</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ </natures>
+</projectDescription>
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.settings/org.eclipse.jdt.core.prefs 2008-11-18
23:36:14 UTC (rev 11872)
@@ -0,0 +1,7 @@
+#Tue Nov 18 10:55:16 PST 2008
+eclipse.preferences.version=1
+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
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.settings/org.eclipse.jst.common.project.facet.core.prefs
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.settings/org.eclipse.jst.common.project.facet.core.prefs
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.settings/org.eclipse.jst.common.project.facet.core.prefs 2008-11-18
23:36:14 UTC (rev 11872)
@@ -0,0 +1,4 @@
+#Tue Nov 18 12:54:36 PST 2008
+classpath.helper/org.eclipse.jdt.launching.JRE_CONTAINER\:\:org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType\:\:java-1.5.0-sun-1.5.0.15/owners=jst.java\:6.0
+classpath.helper/org.eclipse.jst.server.core.container\:\:org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget\:\:JBoss\
4.2\ Runtime/owners=jst.jboss.esb\:4.3
+eclipse.preferences.version=1
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.settings/org.eclipse.jst.common.project.facet.core.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.settings/org.eclipse.wst.common.component
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.settings/org.eclipse.wst.common.component
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.settings/org.eclipse.wst.common.component 2008-11-18
23:36:14 UTC (rev 11872)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+<wb-module deploy-name="esbp1">
+<wb-resource deploy-path="/" source-path="/src"/>
+<wb-resource deploy-path="/" source-path="/esbcontent"/>
+<property name="java-output-path"
value="/esbcontent/build/classes/"/>
+</wb-module>
+</project-modules>
Added:
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.settings/org.eclipse.wst.common.project.facet.core.xml
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.settings/org.eclipse.wst.common.project.facet.core.xml 2008-11-18
23:36:14 UTC (rev 11872)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="JBoss 4.2.2.GA Runtime"/>
+ <fixed facet="jst.jboss.esb"/>
+ <fixed facet="jst.java"/>
+ <installed facet="jst.java" version="6.0"/>
+ <installed facet="jst.jboss.esb" version="4.3"/>
+</faceted-project>
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/.settings/org.eclipse.wst.common.project.facet.core.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/esbcontent/META-INF/deployment.xml
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/esbcontent/META-INF/deployment.xml
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/esbcontent/META-INF/deployment.xml 2008-11-18
23:36:14 UTC (rev 11872)
@@ -0,0 +1,4 @@
+<jbossesb-deployment>
+
<depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_helloworld_Request_esb</depends>
+
<depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_helloworld_Request_gw</depends>
+</jbossesb-deployment>
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/esbcontent/META-INF/deployment.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/esbcontent/META-INF/jboss-esb.xml
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/esbcontent/META-INF/jboss-esb.xml
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/esbcontent/META-INF/jboss-esb.xml 2008-11-18
23:36:14 UTC (rev 11872)
@@ -0,0 +1,50 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb
xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc...
parameterReloadSecs="5">
+
+ <providers>
+ <jms-provider name="JBossMQ"
connection-factory="ConnectionFactory">
+ <jms-bus busid="quickstartGwChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/quickstart_helloworld_Request_gw"
+ />
+ </jms-bus>
+ <jms-bus busid="quickstartEsbChannel">
+ <jms-message-filter
+ dest-type="QUEUE"
+ dest-name="queue/quickstart_helloworld_Request_esb"
+ />
+ </jms-bus>
+
+ </jms-provider>
+ </providers>
+
+ <services>
+ <service
+ category="FirstServiceESB"
+ name="SimpleListener"
+ description="Hello World">
+ <listeners>
+ <jms-listener name="JMS-Gateway"
+ busidref="quickstartGwChannel"
+ is-gateway="true"
+ />
+ <jms-listener name="helloWorld"
+ busidref="quickstartEsbChannel"
+ />
+ </listeners>
+ <actions mep="OneWay">
+ <action name="action1"
+
class="org.jboss.soa.esb.samples.quickstart.helloworld.MyJMSListenerAction"
+ process="displayMessage"
+ />
+ <action name="action2"
class="org.jboss.soa.esb.actions.SystemPrintln">
+ <property name="printfull"
value="true"/>
+ </action>
+ <!-- The next action is for Continuous Integration testing -->
+ <action name="testStore"
class="org.jboss.soa.esb.actions.TestMessageStore"/>
+ </actions>
+ </service>
+ </services>
+
+</jbossesb>
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/esbcontent/META-INF/jboss-esb.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/jbm-queue-service.xml
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/jbm-queue-service.xml
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/jbm-queue-service.xml 2008-11-18
23:36:14 UTC (rev 11872)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+
name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_helloworld_Request_esb"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends
optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+
name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_helloworld_Request_gw"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends
optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+</server>
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/jbm-queue-service.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/org/jboss/soa/esb/samples/quickstart/helloworld/MyJMSListenerAction.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/org/jboss/soa/esb/samples/quickstart/helloworld/MyJMSListenerAction.java
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/org/jboss/soa/esb/samples/quickstart/helloworld/MyJMSListenerAction.java 2008-11-18
23:36:14 UTC (rev 11872)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., 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.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package org.jboss.soa.esb.samples.quickstart.helloworld;
+
+import org.jboss.soa.esb.actions.AbstractActionLifecycle;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+
+public class MyJMSListenerAction extends AbstractActionLifecycle
+{
+
+ protected ConfigTree _config;
+
+ public MyJMSListenerAction(ConfigTree config) { _config = config; }
+
+
+ public Message displayMessage(Message message) throws Exception{
+
+
System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
+ System.out.println("Body: " + message.getBody().get()) ;
+
System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
+ return message;
+
+ }
+
+
+}
\ No newline at end of file
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/org/jboss/soa/esb/samples/quickstart/helloworld/MyJMSListenerAction.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/org/jboss/soa/esb/samples/quickstart/helloworld/test/SendEsbMessage.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/org/jboss/soa/esb/samples/quickstart/helloworld/test/SendEsbMessage.java
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/org/jboss/soa/esb/samples/quickstart/helloworld/test/SendEsbMessage.java 2008-11-18
23:36:14 UTC (rev 11872)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY 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 along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.jboss.soa.esb.samples.quickstart.helloworld.test;
+
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.client.ServiceInvoker;
+
+/**
+ * Standalone class with to send ESB messages to a 'known' [category,name].
+ * <p/> arg0 - service category
+ * <br/>arg1 - service name
+ * <br/>arg2 - Text of message to send
+ *
+ * @author <a
href="mailto:schifest@heuristica.com.ar">schifest@heuristica.com.ar</a>
+ * @since Version 4.0
+ *
+ */
+public class SendEsbMessage
+{
+ public static void main(String args[]) throws Exception
+ {
+// Setting the ConnectionFactory such that it will use scout
+
System.setProperty("javax.xml.registry.ConnectionFactoryClass","org.apache.ws.scout.registry.ConnectionFactoryImpl");
+
+ if (args.length < 3)
+ {
+ System.out.println("Usage SendEsbMessage <category> <name>
<text to send>");
+ }
+
+ Message esbMessage = MessageFactory.getInstance().getMessage();
+
+ esbMessage.getBody().add(args[2]);
+
+ new ServiceInvoker(args[0], args[1]).deliverAsync(esbMessage);
+
+ }
+
+}
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/org/jboss/soa/esb/samples/quickstart/helloworld/test/SendEsbMessage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/org/jboss/soa/esb/samples/quickstart/helloworld/test/SendJMSMessage.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/org/jboss/soa/esb/samples/quickstart/helloworld/test/SendJMSMessage.java
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/org/jboss/soa/esb/samples/quickstart/helloworld/test/SendJMSMessage.java 2008-11-18
23:36:14 UTC (rev 11872)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., 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.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+package org.jboss.soa.esb.samples.quickstart.helloworld.test;
+
+import java.util.Properties;
+
+import javax.jms.JMSException;
+import javax.jms.ObjectMessage;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+public class SendJMSMessage {
+ QueueConnection conn;
+ QueueSession session;
+ Queue que;
+
+
+ public void setupConnection() throws JMSException, NamingException
+ {
+ Properties properties1 = new Properties();
+ properties1.put(Context.INITIAL_CONTEXT_FACTORY,
+ "org.jnp.interfaces.NamingContextFactory");
+ properties1.put(Context.URL_PKG_PREFIXES,
+ "org.jboss.naming:org.jnp.interfaces");
+ properties1.put(Context.PROVIDER_URL, "jnp://127.0.0.1:1099");
+ InitialContext iniCtx = new InitialContext(properties1);
+
+ Object tmp = iniCtx.lookup("ConnectionFactory");
+ QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+ conn = qcf.createQueueConnection();
+ que = (Queue) iniCtx.lookup("queue/quickstart_helloworld_Request_gw");
+ session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+ conn.start();
+ System.out.println("Connection Started");
+ }
+
+ public void stop() throws JMSException
+ {
+ conn.stop();
+ session.close();
+ conn.close();
+ }
+
+ public void sendAMessage(String msg) throws JMSException {
+
+ QueueSender send = session.createSender(que);
+ ObjectMessage tm = session.createObjectMessage(msg);
+
+ send.send(tm);
+ send.close();
+ }
+
+
+ public static void main(String args[]) throws Exception
+ {
+ SendJMSMessage sm = new SendJMSMessage();
+ sm.setupConnection();
+ sm.sendAMessage(args[0]);
+ sm.stop();
+
+ }
+
+}
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.project.core.test/projects/esbp1/src/org/jboss/soa/esb/samples/quickstart/helloworld/test/SendJMSMessage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain