-
-
Save THUFIR/c92cc120249f322546e6 to your computer and use it in GitHub Desktop.
jms hello world glassfish
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
groovy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="CompilerConfiguration"> | |
<option name="DEFAULT_COMPILER" value="Javac" /> | |
<resourceExtensions /> | |
<wildcardResourcePatterns> | |
<entry name="!?*.java" /> | |
<entry name="!?*.form" /> | |
<entry name="!?*.class" /> | |
<entry name="!?*.groovy" /> | |
<entry name="!?*.scala" /> | |
<entry name="!?*.flex" /> | |
<entry name="!?*.kt" /> | |
<entry name="!?*.clj" /> | |
<entry name="!?*.aj" /> | |
</wildcardResourcePatterns> | |
<annotationProcessing> | |
<profile default="true" name="Default" enabled="false"> | |
<processorPath useClasspath="true" /> | |
</profile> | |
</annotationProcessing> | |
</component> | |
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<component name="CopyrightManager"> | |
<settings default="" /> | |
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" /> | |
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="ClientPropertiesManager"> | |
<properties class="javax.swing.AbstractButton"> | |
<property name="hideActionText" class="java.lang.Boolean" /> | |
</properties> | |
<properties class="javax.swing.JComponent"> | |
<property name="html.disable" class="java.lang.Boolean" /> | |
</properties> | |
<properties class="javax.swing.JEditorPane"> | |
<property name="JEditorPane.w3cLengthUnits" class="java.lang.Boolean" /> | |
<property name="JEditorPane.honorDisplayProperties" class="java.lang.Boolean" /> | |
<property name="charset" class="java.lang.String" /> | |
</properties> | |
<properties class="javax.swing.JList"> | |
<property name="List.isFileList" class="java.lang.Boolean" /> | |
</properties> | |
<properties class="javax.swing.JPasswordField"> | |
<property name="JPasswordField.cutCopyAllowed" class="java.lang.Boolean" /> | |
</properties> | |
<properties class="javax.swing.JSlider"> | |
<property name="Slider.paintThumbArrowShape" class="java.lang.Boolean" /> | |
<property name="JSlider.isFilled" class="java.lang.Boolean" /> | |
</properties> | |
<properties class="javax.swing.JTable"> | |
<property name="Table.isFileList" class="java.lang.Boolean" /> | |
<property name="JTable.autoStartsEdit" class="java.lang.Boolean" /> | |
<property name="terminateEditOnFocusLost" class="java.lang.Boolean" /> | |
</properties> | |
<properties class="javax.swing.JToolBar"> | |
<property name="JToolBar.isRollover" class="java.lang.Boolean" /> | |
</properties> | |
<properties class="javax.swing.JTree"> | |
<property name="JTree.lineStyle" class="java.lang.String" /> | |
</properties> | |
<properties class="javax.swing.text.JTextComponent"> | |
<property name="caretAspectRatio" class="java.lang.Double" /> | |
<property name="caretWidth" class="java.lang.Integer" /> | |
</properties> | |
</component> | |
<component name="CompilerConfiguration"> | |
<option name="DEFAULT_COMPILER" /> | |
<resourceExtensions /> | |
<wildcardResourcePatterns> | |
<entry name="!?*.java" /> | |
<entry name="!?*.form" /> | |
<entry name="!?*.class" /> | |
<entry name="!?*.groovy" /> | |
<entry name="!?*.scala" /> | |
<entry name="!?*.flex" /> | |
<entry name="!?*.kt" /> | |
<entry name="!?*.clj" /> | |
<entry name="!?*.aj" /> | |
</wildcardResourcePatterns> | |
<annotationProcessing> | |
<profile default="true" name="Default" enabled="false"> | |
<processorPath useClasspath="true" /> | |
</profile> | |
</annotationProcessing> | |
</component> | |
<component name="CopyrightManager" default="" /> | |
<component name="DaemonCodeAnalyzer"> | |
<disable_hints /> | |
</component> | |
<component name="DependencyValidationManager"> | |
<option name="SKIP_IMPORT_STATEMENTS" value="false" /> | |
</component> | |
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" /> | |
<component name="EntryPointsManager"> | |
<entry_points version="2.0" /> | |
</component> | |
<component name="ProjectLevelVcsManager" settingsEditedManually="false"> | |
<OptionsSetting value="true" id="Add" /> | |
<OptionsSetting value="true" id="Remove" /> | |
<OptionsSetting value="true" id="Checkout" /> | |
<OptionsSetting value="true" id="Update" /> | |
<OptionsSetting value="true" id="Status" /> | |
<OptionsSetting value="true" id="Edit" /> | |
<ConfirmationsSetting value="0" id="Add" /> | |
<ConfirmationsSetting value="0" id="Remove" /> | |
</component> | |
<component name="ProjectModuleManager"> | |
<modules /> | |
</component> | |
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.7" project-jdk-type="JavaSDK"> | |
<output url="file://$PROJECT_DIR$/out" /> | |
</component> | |
<component name="PropertiesComponent"> | |
<property name="GoToClass.includeLibraries" value="false" /> | |
<property name="GoToClass.toSaveIncludeLibraries" value="false" /> | |
<property name="GoToFile.includeJavaFiles" value="false" /> | |
<property name="MemberChooser.sorted" value="false" /> | |
<property name="MemberChooser.showClasses" value="true" /> | |
<property name="MemberChooser.copyJavadoc" value="false" /> | |
</component> | |
<component name="RunManager"> | |
<configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin"> | |
<module name="" /> | |
<option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" /> | |
<option name="PROGRAM_PARAMETERS" /> | |
<method /> | |
</configuration> | |
<configuration default="true" type="Remote" factoryName="Remote"> | |
<option name="USE_SOCKET_TRANSPORT" value="true" /> | |
<option name="SERVER_MODE" value="false" /> | |
<option name="SHMEM_ADDRESS" value="javadebug" /> | |
<option name="HOST" value="localhost" /> | |
<option name="PORT" value="5005" /> | |
<method /> | |
</configuration> | |
<configuration default="true" type="Applet" factoryName="Applet"> | |
<module name="" /> | |
<option name="MAIN_CLASS_NAME" /> | |
<option name="HTML_FILE_NAME" /> | |
<option name="HTML_USED" value="false" /> | |
<option name="WIDTH" value="400" /> | |
<option name="HEIGHT" value="300" /> | |
<option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" /> | |
<option name="VM_PARAMETERS" /> | |
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> | |
<option name="ALTERNATIVE_JRE_PATH" /> | |
<method /> | |
</configuration> | |
<configuration default="true" type="TestNG" factoryName="TestNG"> | |
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" /> | |
<module name="" /> | |
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> | |
<option name="ALTERNATIVE_JRE_PATH" /> | |
<option name="SUITE_NAME" /> | |
<option name="PACKAGE_NAME" /> | |
<option name="MAIN_CLASS_NAME" /> | |
<option name="METHOD_NAME" /> | |
<option name="GROUP_NAME" /> | |
<option name="TEST_OBJECT" value="CLASS" /> | |
<option name="VM_PARAMETERS" value="-ea" /> | |
<option name="PARAMETERS" /> | |
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> | |
<option name="OUTPUT_DIRECTORY" /> | |
<option name="ANNOTATION_TYPE" /> | |
<option name="ENV_VARIABLES" /> | |
<option name="PASS_PARENT_ENVS" value="true" /> | |
<option name="TEST_SEARCH_SCOPE"> | |
<value defaultName="singleModule" /> | |
</option> | |
<option name="USE_DEFAULT_REPORTERS" value="false" /> | |
<option name="PROPERTIES_FILE" /> | |
<envs /> | |
<properties /> | |
<listeners /> | |
<method /> | |
</configuration> | |
<configuration default="true" type="Application" factoryName="Application"> | |
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" /> | |
<option name="MAIN_CLASS_NAME" /> | |
<option name="VM_PARAMETERS" /> | |
<option name="PROGRAM_PARAMETERS" /> | |
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> | |
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> | |
<option name="ALTERNATIVE_JRE_PATH" /> | |
<option name="ENABLE_SWING_INSPECTOR" value="false" /> | |
<option name="ENV_VARIABLES" /> | |
<option name="PASS_PARENT_ENVS" value="true" /> | |
<module name="" /> | |
<envs /> | |
<method /> | |
</configuration> | |
<configuration default="true" type="JUnit" factoryName="JUnit"> | |
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" /> | |
<module name="" /> | |
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> | |
<option name="ALTERNATIVE_JRE_PATH" /> | |
<option name="PACKAGE_NAME" /> | |
<option name="MAIN_CLASS_NAME" /> | |
<option name="METHOD_NAME" /> | |
<option name="TEST_OBJECT" value="class" /> | |
<option name="VM_PARAMETERS" value="-ea" /> | |
<option name="PARAMETERS" /> | |
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" /> | |
<option name="ENV_VARIABLES" /> | |
<option name="PASS_PARENT_ENVS" value="true" /> | |
<option name="TEST_SEARCH_SCOPE"> | |
<value defaultName="singleModule" /> | |
</option> | |
<envs /> | |
<patterns /> | |
<method /> | |
</configuration> | |
<list size="0" /> | |
</component> | |
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="ProjectModuleManager"> | |
<modules> | |
<module fileurl="file://$PROJECT_DIR$/groovy.iml" filepath="$PROJECT_DIR$/groovy.iml" /> | |
</modules> | |
</component> | |
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<component name="DependencyValidationManager"> | |
<state> | |
<option name="SKIP_IMPORT_STATEMENTS" value="false" /> | |
</state> | |
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="Palette2"> | |
<group name="Swing"> | |
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false"> | |
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" /> | |
</item> | |
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false"> | |
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" /> | |
</item> | |
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false"> | |
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" /> | |
</item> | |
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true"> | |
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" /> | |
</item> | |
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false"> | |
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" /> | |
<initial-values> | |
<property name="text" value="Button" /> | |
</initial-values> | |
</item> | |
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false"> | |
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" /> | |
<initial-values> | |
<property name="text" value="RadioButton" /> | |
</initial-values> | |
</item> | |
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false"> | |
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" /> | |
<initial-values> | |
<property name="text" value="CheckBox" /> | |
</initial-values> | |
</item> | |
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false"> | |
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" /> | |
<initial-values> | |
<property name="text" value="Label" /> | |
</initial-values> | |
</item> | |
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true"> | |
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> | |
<preferred-size width="150" height="-1" /> | |
</default-constraints> | |
</item> | |
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true"> | |
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> | |
<preferred-size width="150" height="-1" /> | |
</default-constraints> | |
</item> | |
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true"> | |
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> | |
<preferred-size width="150" height="-1" /> | |
</default-constraints> | |
</item> | |
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true"> | |
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> | |
<preferred-size width="150" height="50" /> | |
</default-constraints> | |
</item> | |
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true"> | |
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> | |
<preferred-size width="150" height="50" /> | |
</default-constraints> | |
</item> | |
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true"> | |
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> | |
<preferred-size width="150" height="50" /> | |
</default-constraints> | |
</item> | |
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true"> | |
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" /> | |
</item> | |
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false"> | |
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> | |
<preferred-size width="150" height="50" /> | |
</default-constraints> | |
</item> | |
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false"> | |
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3"> | |
<preferred-size width="150" height="50" /> | |
</default-constraints> | |
</item> | |
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false"> | |
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> | |
<preferred-size width="150" height="50" /> | |
</default-constraints> | |
</item> | |
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false"> | |
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3"> | |
<preferred-size width="200" height="200" /> | |
</default-constraints> | |
</item> | |
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false"> | |
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3"> | |
<preferred-size width="200" height="200" /> | |
</default-constraints> | |
</item> | |
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true"> | |
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" /> | |
</item> | |
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false"> | |
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" /> | |
</item> | |
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false"> | |
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" /> | |
</item> | |
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false"> | |
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" /> | |
</item> | |
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false"> | |
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1"> | |
<preferred-size width="-1" height="20" /> | |
</default-constraints> | |
</item> | |
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false"> | |
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" /> | |
</item> | |
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false"> | |
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" /> | |
</item> | |
</group> | |
</component> | |
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="VcsDirectoryMappings"> | |
<mapping directory="" vcs="" /> | |
</component> | |
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<module type="JAVA_MODULE" version="4"> | |
<component name="NewModuleRootManager" inherit-compiler-output="true"> | |
<exclude-output /> | |
<content url="file://$MODULE_DIR$"> | |
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> | |
</content> | |
<orderEntry type="inheritedJdk" /> | |
<orderEntry type="sourceFolder" forTests="false" /> | |
<orderEntry type="library" name="groovy-1.8.6" level="application" /> | |
</component> | |
</module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Grab(group = 'net.sf.gtools.jms', module = 'JmsCategory', version = '0.2') | |
@Grab(group = 'org.apache.activemq', module = 'activemq-all', version = '5.9.0') | |
@Grab(group = "junit", module = "junit", version = "4.11") | |
@Grab(group = 'net.sf.gtools.jms', module = 'JmsCategory', version = '0.2') | |
@Grab(group = 'org.apache.activemq', module = 'activemq-all', version = '5.9.0') | |
@Grab(group = "junit", module = "junit", version = "4.11") | |
import net.sf.gtools.jms.JmsCategory | |
@Grab(group = 'net.sf.gtools.jms', module = 'JmsCategory', version = '0.2') | |
@Grab(group = 'org.apache.activemq', module = 'activemq-all', version = '5.9.0') | |
@Grab(group = "junit", module = "junit", version = "4.11") | |
@Grab(group = 'net.sf.gtools.jms', module = 'JmsCategory', version = '0.2') | |
@Grab(group = 'org.apache.activemq', module = 'activemq-all', version = '5.9.0') | |
@Grab(group = "junit", module = "junit", version = "4.11") | |
import net.sf.gtools.jms.JmsCategory | |
import org.apache.activemq.ActiveMQConnectionFactory | |
class GroovyJMSExample { | |
def static sendMessage() { | |
use(JmsCategory) { | |
def jms = new ActiveMQConnectionFactory('tcp://localhost:3700') | |
jms.connect { c -> | |
c.queue("TEST-queue") { q -> | |
def msg = createTextMessage("test") | |
q.send(msg) | |
} | |
} | |
} | |
} | |
static void main(String[] args) { | |
sendMessage() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment