Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-01-14 10:27:01 +0000
committerEike Stepper2012-01-14 10:27:01 +0000
commit0266166cb9ff9535c150250073ea1e57b42d2693 (patch)
treec006a3bc0ba1f6e1d8a2bc032eedc346f71eab0d /plugins/org.eclipse.net4j.jms.server
parent7416443692cdda72d1f704ea4fc5ececcc669df7 (diff)
downloadcdo-0266166cb9ff9535c150250073ea1e57b42d2693.tar.gz
cdo-0266166cb9ff9535c150250073ea1e57b42d2693.tar.xz
cdo-0266166cb9ff9535c150250073ea1e57b42d2693.zip
Adjusted copyrights to 2012
Diffstat (limited to 'plugins/org.eclipse.net4j.jms.server')
-rw-r--r--plugins/org.eclipse.net4j.jms.server/.settings/org.eclipse.jdt.ui.prefs240
-rw-r--r--plugins/org.eclipse.net4j.jms.server/build.properties42
-rw-r--r--plugins/org.eclipse.net4j.jms.server/copyright.txt14
-rw-r--r--plugins/org.eclipse.net4j.jms.server/plugin.properties22
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/Server.java470
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerConnection.java230
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerConsumer.java296
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerDestination.java254
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerSession.java226
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/bundle/OM.java118
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/messages/Messages.java82
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/messages/messages.properties34
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSAcknowledgeIndication.java98
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSClientMessageIndication.java106
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSCommitIndication.java154
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSLogonIndication.java114
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSOpenSessionIndication.java100
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRecoverIndication.java108
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRegisterConsumerIndication.java106
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRollbackIndication.java110
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerMessageRequest.java90
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocol.java128
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocolFactory.java78
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSSyncIndication.java76
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocol.java90
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocolFactory.java78
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSCreateDestinationIndication.java130
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/AbstractStore.java88
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/AbstractTransaction.java460
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/NOOPStore.java80
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/NOOPTransaction.java170
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/StoreException.java76
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IConnection.java50
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IDestination.java58
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IServer.java50
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IServerConsumer.java68
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/ISession.java42
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IStore.java54
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IStoreTransaction.java136
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/JMSServerUtil.java74
40 files changed, 2500 insertions, 2500 deletions
diff --git a/plugins/org.eclipse.net4j.jms.server/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.net4j.jms.server/.settings/org.eclipse.jdt.ui.prefs
index aaef0ccba1..6726e7034a 100644
--- a/plugins/org.eclipse.net4j.jms.server/.settings/org.eclipse.jdt.ui.prefs
+++ b/plugins/org.eclipse.net4j.jms.server/.settings/org.eclipse.jdt.ui.prefs
@@ -1,120 +1,120 @@
-#Thu Feb 04 09:44:24 CET 2010
-cleanup.add_default_serial_version_id=true
-cleanup.add_generated_serial_version_id=false
-cleanup.add_missing_annotations=true
-cleanup.add_missing_deprecated_annotations=true
-cleanup.add_missing_methods=false
-cleanup.add_missing_nls_tags=false
-cleanup.add_missing_override_annotations=true
-cleanup.add_missing_override_annotations_interface_methods=true
-cleanup.add_serial_version_id=true
-cleanup.always_use_blocks=true
-cleanup.always_use_parentheses_in_expressions=false
-cleanup.always_use_this_for_non_static_field_access=false
-cleanup.always_use_this_for_non_static_method_access=false
-cleanup.convert_to_enhanced_for_loop=false
-cleanup.correct_indentation=true
-cleanup.format_source_code=true
-cleanup.format_source_code_changes_only=false
-cleanup.make_local_variable_final=true
-cleanup.make_parameters_final=false
-cleanup.make_private_fields_final=true
-cleanup.make_type_abstract_if_missing_method=false
-cleanup.make_variable_declarations_final=false
-cleanup.never_use_blocks=false
-cleanup.never_use_parentheses_in_expressions=true
-cleanup.organize_imports=true
-cleanup.qualify_static_field_accesses_with_declaring_class=false
-cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-cleanup.qualify_static_member_accesses_with_declaring_class=false
-cleanup.qualify_static_method_accesses_with_declaring_class=false
-cleanup.remove_private_constructors=true
-cleanup.remove_trailing_whitespaces=true
-cleanup.remove_trailing_whitespaces_all=true
-cleanup.remove_trailing_whitespaces_ignore_empty=false
-cleanup.remove_unnecessary_casts=true
-cleanup.remove_unnecessary_nls_tags=true
-cleanup.remove_unused_imports=true
-cleanup.remove_unused_local_variables=false
-cleanup.remove_unused_private_fields=true
-cleanup.remove_unused_private_members=false
-cleanup.remove_unused_private_methods=true
-cleanup.remove_unused_private_types=true
-cleanup.sort_members=false
-cleanup.sort_members_all=false
-cleanup.use_blocks=true
-cleanup.use_blocks_only_for_return_and_throw=false
-cleanup.use_parentheses_in_expressions=true
-cleanup.use_this_for_non_static_field_access=true
-cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-cleanup.use_this_for_non_static_method_access=true
-cleanup.use_this_for_non_static_method_access_only_if_necessary=true
-cleanup_profile=_EMFT
-cleanup_settings_version=2
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_EMFT
-formatter_settings_version=11
-org.eclipse.jdt.ui.exception.name=ex
-org.eclipse.jdt.ui.gettersetter.use.is=true
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=org.eclipse.emf.cdo;org.eclipse.emf.internal.cdo;org.eclipse.net4j;org.eclipse.internal.net4j;org.eclipse.emf;org.eclipse;com;org;javax;java;
-org.eclipse.jdt.ui.javadoc=true
-org.eclipse.jdt.ui.keywordthis=false
-org.eclipse.jdt.ui.ondemandthreshold=99
-org.eclipse.jdt.ui.overrideannotation=true
-org.eclipse.jdt.ui.staticondemandthreshold=99
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="false" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment"/><template autoinsert\="false" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment"/><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment"/><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*\r\n * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n * \r\n * Contributors\:\r\n * Eike Stepper - initial API and implementation\r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author Eike Stepper\r\n */</template><template autoinsert\="false" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="false" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment"/><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment"/><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=false
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=true
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=false
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=true
-sp_cleanup.remove_unused_imports=true
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=true
-sp_cleanup.use_this_for_non_static_field_access=true
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=true
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+#Thu Feb 04 09:44:24 CET 2010
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=true
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=true
+cleanup.format_source_code=true
+cleanup.format_source_code_changes_only=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=true
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=false
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=true
+cleanup.use_this_for_non_static_field_access=true
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=true
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup_profile=_EMFT
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_EMFT
+formatter_settings_version=11
+org.eclipse.jdt.ui.exception.name=ex
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=org.eclipse.emf.cdo;org.eclipse.emf.internal.cdo;org.eclipse.net4j;org.eclipse.internal.net4j;org.eclipse.emf;org.eclipse;com;org;javax;java;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.overrideannotation=true
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="false" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment"/><template autoinsert\="false" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment"/><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment"/><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*\r\n * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n * \r\n * Contributors\:\r\n * Eike Stepper - initial API and implementation\r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author Eike Stepper\r\n */</template><template autoinsert\="false" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="false" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment"/><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment"/><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=false
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=true
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=true
+sp_cleanup.use_this_for_non_static_field_access=true
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=true
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/plugins/org.eclipse.net4j.jms.server/build.properties b/plugins/org.eclipse.net4j.jms.server/build.properties
index 78b4d0fca5..8d8e51838a 100644
--- a/plugins/org.eclipse.net4j.jms.server/build.properties
+++ b/plugins/org.eclipse.net4j.jms.server/build.properties
@@ -1,21 +1,21 @@
-# Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Eike Stepper - initial API and implementation
-
-# NLS_MESSAGEFORMAT_VAR
-
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- .options,\
- about.html,\
- copyright.txt,\
- plugin.properties
-src.includes = about.html,\
- copyright.txt
+# Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Eike Stepper - initial API and implementation
+
+# NLS_MESSAGEFORMAT_VAR
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ .options,\
+ about.html,\
+ copyright.txt,\
+ plugin.properties
+src.includes = about.html,\
+ copyright.txt
diff --git a/plugins/org.eclipse.net4j.jms.server/copyright.txt b/plugins/org.eclipse.net4j.jms.server/copyright.txt
index e921242cf0..8f6328980e 100644
--- a/plugins/org.eclipse.net4j.jms.server/copyright.txt
+++ b/plugins/org.eclipse.net4j.jms.server/copyright.txt
@@ -1,8 +1,8 @@
-Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
-All rights reserved. This program and the accompanying materials
-are made available under the terms of the Eclipse Public License v1.0
-which accompanies this distribution, and is available at
-http://www.eclipse.org/legal/epl-v10.html
-
-Contributors:
+Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
Eike Stepper - initial API and implementation \ No newline at end of file
diff --git a/plugins/org.eclipse.net4j.jms.server/plugin.properties b/plugins/org.eclipse.net4j.jms.server/plugin.properties
index 0674fcf980..2a106803f4 100644
--- a/plugins/org.eclipse.net4j.jms.server/plugin.properties
+++ b/plugins/org.eclipse.net4j.jms.server/plugin.properties
@@ -1,11 +1,11 @@
-# Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Eike Stepper - initial API and implementation
-
-pluginName = Net4j JMS Provider Server
-providerName = Eclipse Modeling Project
+# Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Eike Stepper - initial API and implementation
+
+pluginName = Net4j JMS Provider Server
+providerName = Eclipse Modeling Project
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/Server.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/Server.java
index 2f234746ef..7f78f60db0 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/Server.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/Server.java
@@ -1,235 +1,235 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server;
-
-import org.eclipse.net4j.internal.jms.ConnectionFactoryImpl;
-import org.eclipse.net4j.internal.jms.JMSDestination;
-import org.eclipse.net4j.internal.jms.MessageImpl;
-import org.eclipse.net4j.jms.internal.server.bundle.OM;
-import org.eclipse.net4j.jms.internal.server.messages.Messages;
-import org.eclipse.net4j.jms.server.IDestination;
-import org.eclipse.net4j.jms.server.IServer;
-import org.eclipse.net4j.jms.server.IStore;
-import org.eclipse.net4j.jms.server.IStoreTransaction;
-import org.eclipse.net4j.util.HexUtil;
-import org.eclipse.net4j.util.concurrent.NonBlockingLongCounter;
-import org.eclipse.net4j.util.concurrent.QueueWorker;
-import org.eclipse.net4j.util.om.OMPlatform;
-
-import javax.jms.Destination;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import java.util.HashSet;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-
-/**
- * @author Eike Stepper
- */
-public class Server extends QueueWorker<MessageImpl> implements IServer
-{
- public static final Server INSTANCE = new Server();
-
- private static final boolean REBIND_DESTINATIONS = true;
-
- private NonBlockingLongCounter messageIDCounter = new NonBlockingLongCounter();
-
- private NonBlockingLongCounter consumerIDCounter = new NonBlockingLongCounter();
-
- private IStore store = null;
-
- private Context jndiContext;
-
- private ConcurrentMap<String, ServerDestination> destinations = new ConcurrentHashMap<String, ServerDestination>();
-
- private Set<ServerConnection> connections = new HashSet<ServerConnection>();
-
- private ConcurrentMap<Long, ServerConsumer> consumers = new ConcurrentHashMap<Long, ServerConsumer>();
-
- public Server()
- {
- }
-
- public IStore getStore()
- {
- return store;
- }
-
- public void setStore(IStore store)
- {
- this.store = store;
- }
-
- public IDestination createDestination(String name, IDestination.Type type)
- {
- ServerDestination destination = new ServerDestination(name, type);
- ServerDestination existing = destinations.putIfAbsent(name, destination);
- if (existing != null)
- {
- throw new IllegalStateException("Destination " + type + " " + name + " does already exist"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- IStoreTransaction transaction = store.startTransaction();
- transaction.destinationAdded(destination);
- store.commitTransaction(transaction);
-
- try
- {
- destination.bind(jndiContext, REBIND_DESTINATIONS);
- }
- catch (NamingException ex)
- {
- OM.LOG.error(ex);
- destinations.remove(name);
- destination = null;
- }
-
- return destination;
- }
-
- public ServerDestination getDestination(String name)
- {
- return destinations.get(name);
- }
-
- public ServerDestination getServerDestination(Destination jmsDestination)
- {
- String name = ((JMSDestination)jmsDestination).getName();
- ServerDestination destination = destinations.get(name);
- if (destination == null)
- {
- OM.LOG.error(Messages.getString("Server.3") + name); //$NON-NLS-1$
- return null;
- }
-
- return destination;
- }
-
- public ServerConnection logon(String userName, String password)
- {
- ServerConnection connection = new ServerConnection(this, userName);
- synchronized (connections)
- {
- connections.add(connection);
- }
-
- return connection;
- }
-
- public ServerConsumer createConsumer(ServerDestination destination, String messageSelector, boolean noLocal,
- boolean durable)
- {
- long consumerID = consumerIDCounter.increment();
- ServerConsumer consumer = new ServerConsumer(consumerID, destination, messageSelector, noLocal, durable);
- consumers.put(consumer.getID(), consumer);
- return consumer;
- }
-
- public ServerConsumer getConsumer(long consumerID)
- {
- return consumers.get(consumerID);
- }
-
- public String[] handleClientMessages(MessageImpl[] messages)
- {
- IStoreTransaction transaction = store.startTransaction();
- String[] messageIDs = handleClientMessagesInTransaction(transaction, messages);
- store.commitTransaction(transaction);
- return messageIDs;
- }
-
- public String[] handleClientMessagesInTransaction(IStoreTransaction transaction, MessageImpl[] messages)
- {
- String[] messageIDs = new String[messages.length];
- for (int i = 0; i < messages.length; i++)
- {
- MessageImpl message = messages[i];
- if (getServerDestination(message.getJMSDestination()) == null)
- {
- return null;
- }
-
- messageIDs[i] = "ID:NET4J:" + HexUtil.longToHex(messageIDCounter.increment()); //$NON-NLS-1$
- message.setJMSMessageID(messageIDs[i]);
- }
-
- for (MessageImpl message : messages)
- {
- transaction.messageReceived(message);
- addWork(message);
- }
-
- return messageIDs;
- }
-
- @Override
- protected String getThreadName()
- {
- return "jms-server"; //$NON-NLS-1$
- }
-
- @Override
- protected void work(WorkContext context, MessageImpl message)
- {
- ServerDestination destination = getServerDestination(message.getJMSDestination());
- IStoreTransaction transaction = store.startTransaction();
- destination.handleClientMessage(transaction, message);
- store.commitTransaction(transaction);
- }
-
- @Override
- protected void doBeforeActivate() throws Exception
- {
- super.doBeforeActivate();
- if (store == null)
- {
- throw new IllegalStateException("store == null"); //$NON-NLS-1$
- }
- }
-
- @Override
- protected void doActivate() throws Exception
- {
- super.doActivate();
- String name = OMPlatform.INSTANCE.getProperty("net4j.jms.connection.factory.name", "net4j.jms.ConnectionFactory"); //$NON-NLS-1$ //$NON-NLS-2$
- String type = OMPlatform.INSTANCE.getProperty("net4j.jms.connector.type", "tcp"); //$NON-NLS-1$ //$NON-NLS-2$
- String desc = OMPlatform.INSTANCE.getProperty("net4j.jms.connector.description", "localhost"); //$NON-NLS-1$ //$NON-NLS-2$
-
- jndiContext = new InitialContext();
- jndiContext.rebind(name, new ConnectionFactoryImpl(type, desc));
- }
-
- @Override
- protected void doDeactivate() throws Exception
- {
- synchronized (connections)
- {
- for (ServerConnection connection : connections)
- {
- try
- {
- connection.close();
- }
- catch (Exception ex)
- {
- OM.LOG.error(ex);
- }
- }
- }
-
- jndiContext.close();
- jndiContext = null;
- super.doDeactivate();
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server;
+
+import org.eclipse.net4j.internal.jms.ConnectionFactoryImpl;
+import org.eclipse.net4j.internal.jms.JMSDestination;
+import org.eclipse.net4j.internal.jms.MessageImpl;
+import org.eclipse.net4j.jms.internal.server.bundle.OM;
+import org.eclipse.net4j.jms.internal.server.messages.Messages;
+import org.eclipse.net4j.jms.server.IDestination;
+import org.eclipse.net4j.jms.server.IServer;
+import org.eclipse.net4j.jms.server.IStore;
+import org.eclipse.net4j.jms.server.IStoreTransaction;
+import org.eclipse.net4j.util.HexUtil;
+import org.eclipse.net4j.util.concurrent.NonBlockingLongCounter;
+import org.eclipse.net4j.util.concurrent.QueueWorker;
+import org.eclipse.net4j.util.om.OMPlatform;
+
+import javax.jms.Destination;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+/**
+ * @author Eike Stepper
+ */
+public class Server extends QueueWorker<MessageImpl> implements IServer
+{
+ public static final Server INSTANCE = new Server();
+
+ private static final boolean REBIND_DESTINATIONS = true;
+
+ private NonBlockingLongCounter messageIDCounter = new NonBlockingLongCounter();
+
+ private NonBlockingLongCounter consumerIDCounter = new NonBlockingLongCounter();
+
+ private IStore store = null;
+
+ private Context jndiContext;
+
+ private ConcurrentMap<String, ServerDestination> destinations = new ConcurrentHashMap<String, ServerDestination>();
+
+ private Set<ServerConnection> connections = new HashSet<ServerConnection>();
+
+ private ConcurrentMap<Long, ServerConsumer> consumers = new ConcurrentHashMap<Long, ServerConsumer>();
+
+ public Server()
+ {
+ }
+
+ public IStore getStore()
+ {
+ return store;
+ }
+
+ public void setStore(IStore store)
+ {
+ this.store = store;
+ }
+
+ public IDestination createDestination(String name, IDestination.Type type)
+ {
+ ServerDestination destination = new ServerDestination(name, type);
+ ServerDestination existing = destinations.putIfAbsent(name, destination);
+ if (existing != null)
+ {
+ throw new IllegalStateException("Destination " + type + " " + name + " does already exist"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ IStoreTransaction transaction = store.startTransaction();
+ transaction.destinationAdded(destination);
+ store.commitTransaction(transaction);
+
+ try
+ {
+ destination.bind(jndiContext, REBIND_DESTINATIONS);
+ }
+ catch (NamingException ex)
+ {
+ OM.LOG.error(ex);
+ destinations.remove(name);
+ destination = null;
+ }
+
+ return destination;
+ }
+
+ public ServerDestination getDestination(String name)
+ {
+ return destinations.get(name);
+ }
+
+ public ServerDestination getServerDestination(Destination jmsDestination)
+ {
+ String name = ((JMSDestination)jmsDestination).getName();
+ ServerDestination destination = destinations.get(name);
+ if (destination == null)
+ {
+ OM.LOG.error(Messages.getString("Server.3") + name); //$NON-NLS-1$
+ return null;
+ }
+
+ return destination;
+ }
+
+ public ServerConnection logon(String userName, String password)
+ {
+ ServerConnection connection = new ServerConnection(this, userName);
+ synchronized (connections)
+ {
+ connections.add(connection);
+ }
+
+ return connection;
+ }
+
+ public ServerConsumer createConsumer(ServerDestination destination, String messageSelector, boolean noLocal,
+ boolean durable)
+ {
+ long consumerID = consumerIDCounter.increment();
+ ServerConsumer consumer = new ServerConsumer(consumerID, destination, messageSelector, noLocal, durable);
+ consumers.put(consumer.getID(), consumer);
+ return consumer;
+ }
+
+ public ServerConsumer getConsumer(long consumerID)
+ {
+ return consumers.get(consumerID);
+ }
+
+ public String[] handleClientMessages(MessageImpl[] messages)
+ {
+ IStoreTransaction transaction = store.startTransaction();
+ String[] messageIDs = handleClientMessagesInTransaction(transaction, messages);
+ store.commitTransaction(transaction);
+ return messageIDs;
+ }
+
+ public String[] handleClientMessagesInTransaction(IStoreTransaction transaction, MessageImpl[] messages)
+ {
+ String[] messageIDs = new String[messages.length];
+ for (int i = 0; i < messages.length; i++)
+ {
+ MessageImpl message = messages[i];
+ if (getServerDestination(message.getJMSDestination()) == null)
+ {
+ return null;
+ }
+
+ messageIDs[i] = "ID:NET4J:" + HexUtil.longToHex(messageIDCounter.increment()); //$NON-NLS-1$
+ message.setJMSMessageID(messageIDs[i]);
+ }
+
+ for (MessageImpl message : messages)
+ {
+ transaction.messageReceived(message);
+ addWork(message);
+ }
+
+ return messageIDs;
+ }
+
+ @Override
+ protected String getThreadName()
+ {
+ return "jms-server"; //$NON-NLS-1$
+ }
+
+ @Override
+ protected void work(WorkContext context, MessageImpl message)
+ {
+ ServerDestination destination = getServerDestination(message.getJMSDestination());
+ IStoreTransaction transaction = store.startTransaction();
+ destination.handleClientMessage(transaction, message);
+ store.commitTransaction(transaction);
+ }
+
+ @Override
+ protected void doBeforeActivate() throws Exception
+ {
+ super.doBeforeActivate();
+ if (store == null)
+ {
+ throw new IllegalStateException("store == null"); //$NON-NLS-1$
+ }
+ }
+
+ @Override
+ protected void doActivate() throws Exception
+ {
+ super.doActivate();
+ String name = OMPlatform.INSTANCE.getProperty("net4j.jms.connection.factory.name", "net4j.jms.ConnectionFactory"); //$NON-NLS-1$ //$NON-NLS-2$
+ String type = OMPlatform.INSTANCE.getProperty("net4j.jms.connector.type", "tcp"); //$NON-NLS-1$ //$NON-NLS-2$
+ String desc = OMPlatform.INSTANCE.getProperty("net4j.jms.connector.description", "localhost"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ jndiContext = new InitialContext();
+ jndiContext.rebind(name, new ConnectionFactoryImpl(type, desc));
+ }
+
+ @Override
+ protected void doDeactivate() throws Exception
+ {
+ synchronized (connections)
+ {
+ for (ServerConnection connection : connections)
+ {
+ try
+ {
+ connection.close();
+ }
+ catch (Exception ex)
+ {
+ OM.LOG.error(ex);
+ }
+ }
+ }
+
+ jndiContext.close();
+ jndiContext = null;
+ super.doDeactivate();
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerConnection.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerConnection.java
index c77a42c128..87f8eea65d 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerConnection.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerConnection.java
@@ -1,115 +1,115 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server;
-
-import org.eclipse.net4j.jms.internal.server.protocol.JMSServerProtocol;
-import org.eclipse.net4j.jms.server.IConnection;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author Eike Stepper
- */
-public class ServerConnection implements IConnection
-{
- private Server server;
-
- private String userName;
-
- private List<ServerSession> sessions = new ArrayList<ServerSession>(0);
-
- private JMSServerProtocol protocol;
-
- public ServerConnection(Server server, String userName)
- {
- this.server = server;
- this.userName = userName;
- }
-
- public Server getServer()
- {
- return server;
- }
-
- public String getUserName()
- {
- return userName;
- }
-
- public JMSServerProtocol getProtocol()
- {
- return protocol;
- }
-
- public void setProtocol(JMSServerProtocol protocol)
- {
- this.protocol = protocol;
- }
-
- public ServerSession openSession(int sessionID)
- {
- ServerSession session = new ServerSession(this, sessionID);
- synchronized (sessions)
- {
- while (sessionID >= sessions.size())
- {
- sessions.add(null);
- }
-
- sessions.set(sessionID, session);
- }
-
- return session;
- }
-
- public ServerSession getSession(int sessionID)
- {
- return sessions.get(sessionID);
- }
-
- public ServerSession[] getSessions()
- {
- List<ServerSession> result = new ArrayList<ServerSession>(sessions.size());
- synchronized (sessions)
- {
- for (ServerSession session : sessions)
- {
- if (session != null)
- {
- result.add(session);
- }
- }
- }
-
- return result.toArray(new ServerSession[result.size()]);
- }
-
- public void close()
- {
- protocol.getChannel().close();
- }
-
- protected boolean removeSession(ServerSession session)
- {
- synchronized (sessions)
- {
- int sessionID = session.getID();
- if (sessions.get(sessionID) == session)
- {
- sessions.set(sessionID, null);
- return true;
- }
-
- return false;
- }
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server;
+
+import org.eclipse.net4j.jms.internal.server.protocol.JMSServerProtocol;
+import org.eclipse.net4j.jms.server.IConnection;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Eike Stepper
+ */
+public class ServerConnection implements IConnection
+{
+ private Server server;
+
+ private String userName;
+
+ private List<ServerSession> sessions = new ArrayList<ServerSession>(0);
+
+ private JMSServerProtocol protocol;
+
+ public ServerConnection(Server server, String userName)
+ {
+ this.server = server;
+ this.userName = userName;
+ }
+
+ public Server getServer()
+ {
+ return server;
+ }
+
+ public String getUserName()
+ {
+ return userName;
+ }
+
+ public JMSServerProtocol getProtocol()
+ {
+ return protocol;
+ }
+
+ public void setProtocol(JMSServerProtocol protocol)
+ {
+ this.protocol = protocol;
+ }
+
+ public ServerSession openSession(int sessionID)
+ {
+ ServerSession session = new ServerSession(this, sessionID);
+ synchronized (sessions)
+ {
+ while (sessionID >= sessions.size())
+ {
+ sessions.add(null);
+ }
+
+ sessions.set(sessionID, session);
+ }
+
+ return session;
+ }
+
+ public ServerSession getSession(int sessionID)
+ {
+ return sessions.get(sessionID);
+ }
+
+ public ServerSession[] getSessions()
+ {
+ List<ServerSession> result = new ArrayList<ServerSession>(sessions.size());
+ synchronized (sessions)
+ {
+ for (ServerSession session : sessions)
+ {
+ if (session != null)
+ {
+ result.add(session);
+ }
+ }
+ }
+
+ return result.toArray(new ServerSession[result.size()]);
+ }
+
+ public void close()
+ {
+ protocol.getChannel().close();
+ }
+
+ protected boolean removeSession(ServerSession session)
+ {
+ synchronized (sessions)
+ {
+ int sessionID = session.getID();
+ if (sessions.get(sessionID) == session)
+ {
+ sessions.set(sessionID, null);
+ return true;
+ }
+
+ return false;
+ }
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerConsumer.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerConsumer.java
index bfb45346d0..83644a7622 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerConsumer.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerConsumer.java
@@ -1,148 +1,148 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server;
-
-import org.eclipse.net4j.internal.jms.MessageImpl;
-import org.eclipse.net4j.jms.internal.server.bundle.OM;
-import org.eclipse.net4j.jms.internal.server.protocol.JMSServerMessageRequest;
-import org.eclipse.net4j.jms.internal.server.protocol.JMSServerProtocol;
-import org.eclipse.net4j.jms.server.IServerConsumer;
-import org.eclipse.net4j.jms.server.IStoreTransaction;
-import org.eclipse.net4j.util.io.IOUtil;
-
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-
-/**
- * @author Eike Stepper
- */
-public class ServerConsumer implements IServerConsumer
-{
- private ServerSession session;
-
- private long id;
-
- private ServerDestination destination;
-
- private String messageSelector;
-
- private boolean noLocal;
-
- private boolean durable;
-
- private ConcurrentMap<String, MessageImpl> messages = new ConcurrentHashMap<String, MessageImpl>();
-
- public ServerConsumer(long id, ServerDestination destination, String messageSelector, boolean noLocal, boolean durable)
- {
- this.id = id;
- this.destination = destination;
- this.messageSelector = messageSelector;
- this.noLocal = noLocal;
- this.durable = durable;
- }
-
- public ServerSession getSession()
- {
- return session;
- }
-
- public void setSession(ServerSession session)
- {
- this.session = session;
- }
-
- public long getID()
- {
- return id;
- }
-
- public ServerDestination getDestination()
- {
- return destination;
- }
-
- public String getMessageSelector()
- {
- return messageSelector;
- }
-
- public boolean isNoLocal()
- {
- return noLocal;
- }
-
- public JMSServerProtocol getProtocol()
- {
- return session.getConnection().getProtocol();
- }
-
- public boolean isDurable()
- {
- return durable;
- }
-
- public boolean handleClientMessage(IStoreTransaction transaction, MessageImpl message)
- {
- try
- {
- String messageID = message.getJMSMessageID();
- synchronized (messages)
- {
- messages.put(messageID, message);
- }
-
- new JMSServerMessageRequest(getProtocol(), session.getID(), id, message).sendAsync();
- transaction.messageSent(message, id);
- return true;
- }
- catch (Exception ex)
- {
- OM.LOG.error(ex);
- return false;
- }
- }
-
- public void handleAcknowledge(IStoreTransaction transaction)
- {
- synchronized (messages)
- {
- if (messages.isEmpty())
- {
- return;
- }
-
- for (MessageImpl message : messages.values())
- {
- transaction.messageAcknowledged(message, id);
- IOUtil.OUT().println("\nMessage acknowledged: " + message.getJMSMessageID() + " (consumer=" + id + ")\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- messages.clear();
- }
- }
-
- public void handleRecover(IStoreTransaction transaction)
- {
- synchronized (messages)
- {
- if (messages.isEmpty())
- {
- return;
- }
-
- for (MessageImpl message : messages.values())
- {
- IOUtil.OUT().println("\nRecovering message: " + message.getJMSMessageID() + " (consumer=" + id + ")\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- session.getConnection().getServer().addWork(message);
- }
- }
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server;
+
+import org.eclipse.net4j.internal.jms.MessageImpl;
+import org.eclipse.net4j.jms.internal.server.bundle.OM;
+import org.eclipse.net4j.jms.internal.server.protocol.JMSServerMessageRequest;
+import org.eclipse.net4j.jms.internal.server.protocol.JMSServerProtocol;
+import org.eclipse.net4j.jms.server.IServerConsumer;
+import org.eclipse.net4j.jms.server.IStoreTransaction;
+import org.eclipse.net4j.util.io.IOUtil;
+
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+/**
+ * @author Eike Stepper
+ */
+public class ServerConsumer implements IServerConsumer
+{
+ private ServerSession session;
+
+ private long id;
+
+ private ServerDestination destination;
+
+ private String messageSelector;
+
+ private boolean noLocal;
+
+ private boolean durable;
+
+ private ConcurrentMap<String, MessageImpl> messages = new ConcurrentHashMap<String, MessageImpl>();
+
+ public ServerConsumer(long id, ServerDestination destination, String messageSelector, boolean noLocal, boolean durable)
+ {
+ this.id = id;
+ this.destination = destination;
+ this.messageSelector = messageSelector;
+ this.noLocal = noLocal;
+ this.durable = durable;
+ }
+
+ public ServerSession getSession()
+ {
+ return session;
+ }
+
+ public void setSession(ServerSession session)
+ {
+ this.session = session;
+ }
+
+ public long getID()
+ {
+ return id;
+ }
+
+ public ServerDestination getDestination()
+ {
+ return destination;
+ }
+
+ public String getMessageSelector()
+ {
+ return messageSelector;
+ }
+
+ public boolean isNoLocal()
+ {
+ return noLocal;
+ }
+
+ public JMSServerProtocol getProtocol()
+ {
+ return session.getConnection().getProtocol();
+ }
+
+ public boolean isDurable()
+ {
+ return durable;
+ }
+
+ public boolean handleClientMessage(IStoreTransaction transaction, MessageImpl message)
+ {
+ try
+ {
+ String messageID = message.getJMSMessageID();
+ synchronized (messages)
+ {
+ messages.put(messageID, message);
+ }
+
+ new JMSServerMessageRequest(getProtocol(), session.getID(), id, message).sendAsync();
+ transaction.messageSent(message, id);
+ return true;
+ }
+ catch (Exception ex)
+ {
+ OM.LOG.error(ex);
+ return false;
+ }
+ }
+
+ public void handleAcknowledge(IStoreTransaction transaction)
+ {
+ synchronized (messages)
+ {
+ if (messages.isEmpty())
+ {
+ return;
+ }
+
+ for (MessageImpl message : messages.values())
+ {
+ transaction.messageAcknowledged(message, id);
+ IOUtil.OUT().println("\nMessage acknowledged: " + message.getJMSMessageID() + " (consumer=" + id + ")\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ messages.clear();
+ }
+ }
+
+ public void handleRecover(IStoreTransaction transaction)
+ {
+ synchronized (messages)
+ {
+ if (messages.isEmpty())
+ {
+ return;
+ }
+
+ for (MessageImpl message : messages.values())
+ {
+ IOUtil.OUT().println("\nRecovering message: " + message.getJMSMessageID() + " (consumer=" + id + ")\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ session.getConnection().getServer().addWork(message);
+ }
+ }
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerDestination.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerDestination.java
index ec905c725d..b661d5ff67 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerDestination.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerDestination.java
@@ -1,127 +1,127 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server;
-
-import org.eclipse.net4j.internal.jms.DestinationImpl;
-import org.eclipse.net4j.internal.jms.MessageImpl;
-import org.eclipse.net4j.internal.jms.QueueImpl;
-import org.eclipse.net4j.internal.jms.TopicImpl;
-import org.eclipse.net4j.jms.server.IDestination;
-import org.eclipse.net4j.jms.server.IStore;
-import org.eclipse.net4j.jms.server.IStoreTransaction;
-import org.eclipse.net4j.util.concurrent.RoundRobinList;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-
-import java.util.Iterator;
-
-/**
- * @author Eike Stepper
- */
-public class ServerDestination implements IDestination
-{
- private String name;
-
- private Type type;
-
- private RoundRobinList<ServerConsumer> consumers = new RoundRobinList<ServerConsumer>();
-
- public ServerDestination(String name, Type type)
- {
- this.name = name;
- this.type = type;
- }
-
- public String getName()
- {
- return name;
- }
-
- public Type getType()
- {
- return type;
- }
-
- public DestinationImpl bind(Context context, boolean rebind) throws NamingException
- {
- DestinationImpl destination = type == Type.QUEUE ? new QueueImpl(name) : new TopicImpl(name);
- if (rebind)
- {
- context.rebind(name, destination);
- }
- else
- {
- context.bind(name, destination);
- }
-
- return destination;
- }
-
- public boolean addConsumer(ServerConsumer consumer)
- {
- if (consumer.isDurable())
- {
- IStore store = Server.INSTANCE.getStore();
- IStoreTransaction transaction = store.startTransaction();
- transaction.consumerAdded(consumer);
- store.commitTransaction(transaction);
- }
-
- return consumers.add(consumer);
- }
-
- public boolean removeConsumer(final long consumerID)
- {
- final boolean[] modified = { false };
- consumers.executeWrites(new Runnable()
- {
- public void run()
- {
- for (Iterator<ServerConsumer> it = consumers.iterator(); it.hasNext();)
- {
- ServerConsumer consumer = it.next();
- if (consumer.getID() == consumerID)
- {
- it.remove();
- modified[0] = true;
- return;
- }
- }
- }
- });
-
- return modified[0];
- }
-
- /**
- * Called by worker thread of the server
- */
- public void handleClientMessage(IStoreTransaction transaction, MessageImpl message)
- {
- if (type == Type.QUEUE)
- {
- ServerConsumer consumer = consumers.element();
- if (consumer != null)
- {
- consumer.handleClientMessage(transaction, message);
- }
- }
- else
- {
- ServerConsumer[] consumers = this.consumers.toArray(new ServerConsumer[0]);
- for (ServerConsumer consumer : consumers)
- {
- consumer.handleClientMessage(transaction, message);
- }
- }
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server;
+
+import org.eclipse.net4j.internal.jms.DestinationImpl;
+import org.eclipse.net4j.internal.jms.MessageImpl;
+import org.eclipse.net4j.internal.jms.QueueImpl;
+import org.eclipse.net4j.internal.jms.TopicImpl;
+import org.eclipse.net4j.jms.server.IDestination;
+import org.eclipse.net4j.jms.server.IStore;
+import org.eclipse.net4j.jms.server.IStoreTransaction;
+import org.eclipse.net4j.util.concurrent.RoundRobinList;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+
+import java.util.Iterator;
+
+/**
+ * @author Eike Stepper
+ */
+public class ServerDestination implements IDestination
+{
+ private String name;
+
+ private Type type;
+
+ private RoundRobinList<ServerConsumer> consumers = new RoundRobinList<ServerConsumer>();
+
+ public ServerDestination(String name, Type type)
+ {
+ this.name = name;
+ this.type = type;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public Type getType()
+ {
+ return type;
+ }
+
+ public DestinationImpl bind(Context context, boolean rebind) throws NamingException
+ {
+ DestinationImpl destination = type == Type.QUEUE ? new QueueImpl(name) : new TopicImpl(name);
+ if (rebind)
+ {
+ context.rebind(name, destination);
+ }
+ else
+ {
+ context.bind(name, destination);
+ }
+
+ return destination;
+ }
+
+ public boolean addConsumer(ServerConsumer consumer)
+ {
+ if (consumer.isDurable())
+ {
+ IStore store = Server.INSTANCE.getStore();
+ IStoreTransaction transaction = store.startTransaction();
+ transaction.consumerAdded(consumer);
+ store.commitTransaction(transaction);
+ }
+
+ return consumers.add(consumer);
+ }
+
+ public boolean removeConsumer(final long consumerID)
+ {
+ final boolean[] modified = { false };
+ consumers.executeWrites(new Runnable()
+ {
+ public void run()
+ {
+ for (Iterator<ServerConsumer> it = consumers.iterator(); it.hasNext();)
+ {
+ ServerConsumer consumer = it.next();
+ if (consumer.getID() == consumerID)
+ {
+ it.remove();
+ modified[0] = true;
+ return;
+ }
+ }
+ }
+ });
+
+ return modified[0];
+ }
+
+ /**
+ * Called by worker thread of the server
+ */
+ public void handleClientMessage(IStoreTransaction transaction, MessageImpl message)
+ {
+ if (type == Type.QUEUE)
+ {
+ ServerConsumer consumer = consumers.element();
+ if (consumer != null)
+ {
+ consumer.handleClientMessage(transaction, message);
+ }
+ }
+ else
+ {
+ ServerConsumer[] consumers = this.consumers.toArray(new ServerConsumer[0]);
+ for (ServerConsumer consumer : consumers)
+ {
+ consumer.handleClientMessage(transaction, message);
+ }
+ }
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerSession.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerSession.java
index f6417ae4ff..1ae9201223 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerSession.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerSession.java
@@ -1,113 +1,113 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server;
-
-import org.eclipse.net4j.internal.jms.DestinationImpl;
-import org.eclipse.net4j.internal.jms.MessageImpl;
-import org.eclipse.net4j.jms.internal.server.bundle.OM;
-import org.eclipse.net4j.jms.internal.server.messages.Messages;
-import org.eclipse.net4j.jms.server.ISession;
-import org.eclipse.net4j.jms.server.IStore;
-import org.eclipse.net4j.jms.server.IStoreTransaction;
-import org.eclipse.net4j.util.lifecycle.Lifecycle;
-
-import java.text.MessageFormat;
-import java.util.Collection;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-
-/**
- * @author Eike Stepper
- */
-public class ServerSession extends Lifecycle implements ISession
-{
- private ServerConnection connection;
-
- private int id;
-
- private ConcurrentMap<Long, ServerConsumer> consumers = new ConcurrentHashMap<Long, ServerConsumer>();
-
- public ServerSession(ServerConnection connection, int id)
- {
- this.connection = connection;
- this.id = id;
- }
-
- public ServerConnection getConnection()
- {
- return connection;
- }
-
- public int getID()
- {
- return id;
- }
-
- public long registerConsumer(DestinationImpl dest, String messageSelector, boolean noLocal, boolean durable)
- {
- Server server = connection.getServer();
- String name = dest.getName();
- ServerDestination destination = server.getDestination(name);
- if (destination == null)
- {
- OM.LOG.error(MessageFormat.format(Messages.getString("ServerSession_0"), name)); //$NON-NLS-1$
- return -1;
- }
-
- ServerConsumer consumer = server.createConsumer(destination, messageSelector, noLocal, durable);
- consumer.setSession(this);
- consumers.put(consumer.getID(), consumer);
- destination.addConsumer(consumer);
- return consumer.getID();
- }
-
- public void handleAcknowledge()
- {
- IStore store = connection.getServer().getStore();
- IStoreTransaction transaction = store.startTransaction();
- handleAcknowledgeInTransaction(transaction);
- store.commitTransaction(transaction);
- }
-
- public void handleAcknowledgeInTransaction(IStoreTransaction transaction)
- {
- for (ServerConsumer consumer : consumers.values())
- {
- consumer.handleAcknowledge(transaction);
- }
- }
-
- public void handleRecover()
- {
- IStore store = connection.getServer().getStore();
- IStoreTransaction transaction = store.startTransaction();
- Collection<ServerConsumer> values = consumers.values();
- for (ServerConsumer consumer : values)
- {
- consumer.handleRecover(transaction);
- }
-
- store.commitTransaction(transaction);
- }
-
- public String[] handleCommit(MessageImpl[] messages)
- {
- Server server = connection.getServer();
- IStore store = server.getStore();
-
- IStoreTransaction transaction = store.startTransaction();
- handleAcknowledgeInTransaction(transaction);
- String[] messageIDs = server.handleClientMessagesInTransaction(transaction, messages);
- store.commitTransaction(transaction);
-
- return messageIDs;
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server;
+
+import org.eclipse.net4j.internal.jms.DestinationImpl;
+import org.eclipse.net4j.internal.jms.MessageImpl;
+import org.eclipse.net4j.jms.internal.server.bundle.OM;
+import org.eclipse.net4j.jms.internal.server.messages.Messages;
+import org.eclipse.net4j.jms.server.ISession;
+import org.eclipse.net4j.jms.server.IStore;
+import org.eclipse.net4j.jms.server.IStoreTransaction;
+import org.eclipse.net4j.util.lifecycle.Lifecycle;
+
+import java.text.MessageFormat;
+import java.util.Collection;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+/**
+ * @author Eike Stepper
+ */
+public class ServerSession extends Lifecycle implements ISession
+{
+ private ServerConnection connection;
+
+ private int id;
+
+ private ConcurrentMap<Long, ServerConsumer> consumers = new ConcurrentHashMap<Long, ServerConsumer>();
+
+ public ServerSession(ServerConnection connection, int id)
+ {
+ this.connection = connection;
+ this.id = id;
+ }
+
+ public ServerConnection getConnection()
+ {
+ return connection;
+ }
+
+ public int getID()
+ {
+ return id;
+ }
+
+ public long registerConsumer(DestinationImpl dest, String messageSelector, boolean noLocal, boolean durable)
+ {
+ Server server = connection.getServer();
+ String name = dest.getName();
+ ServerDestination destination = server.getDestination(name);
+ if (destination == null)
+ {
+ OM.LOG.error(MessageFormat.format(Messages.getString("ServerSession_0"), name)); //$NON-NLS-1$
+ return -1;
+ }
+
+ ServerConsumer consumer = server.createConsumer(destination, messageSelector, noLocal, durable);
+ consumer.setSession(this);
+ consumers.put(consumer.getID(), consumer);
+ destination.addConsumer(consumer);
+ return consumer.getID();
+ }
+
+ public void handleAcknowledge()
+ {
+ IStore store = connection.getServer().getStore();
+ IStoreTransaction transaction = store.startTransaction();
+ handleAcknowledgeInTransaction(transaction);
+ store.commitTransaction(transaction);
+ }
+
+ public void handleAcknowledgeInTransaction(IStoreTransaction transaction)
+ {
+ for (ServerConsumer consumer : consumers.values())
+ {
+ consumer.handleAcknowledge(transaction);
+ }
+ }
+
+ public void handleRecover()
+ {
+ IStore store = connection.getServer().getStore();
+ IStoreTransaction transaction = store.startTransaction();
+ Collection<ServerConsumer> values = consumers.values();
+ for (ServerConsumer consumer : values)
+ {
+ consumer.handleRecover(transaction);
+ }
+
+ store.commitTransaction(transaction);
+ }
+
+ public String[] handleCommit(MessageImpl[] messages)
+ {
+ Server server = connection.getServer();
+ IStore store = server.getStore();
+
+ IStoreTransaction transaction = store.startTransaction();
+ handleAcknowledgeInTransaction(transaction);
+ String[] messageIDs = server.handleClientMessagesInTransaction(transaction, messages);
+ store.commitTransaction(transaction);
+
+ return messageIDs;
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/bundle/OM.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/bundle/OM.java
index 0ebf2cd753..93749074e2 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/bundle/OM.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/bundle/OM.java
@@ -1,59 +1,59 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.bundle;
-
-import org.eclipse.net4j.jms.internal.server.Server;
-import org.eclipse.net4j.util.om.OMBundle;
-import org.eclipse.net4j.util.om.OMPlatform;
-import org.eclipse.net4j.util.om.OSGiActivator;
-import org.eclipse.net4j.util.om.log.OMLogger;
-import org.eclipse.net4j.util.om.trace.OMTracer;
-
-/**
- * The <em>Operations & Maintenance</em> class of this bundle.
- *
- * @author Eike Stepper
- */
-public abstract class OM
-{
- public static final String BUNDLE_ID = "org.eclipse.net4j.jms.server"; //$NON-NLS-1$
-
- public static final OMBundle BUNDLE = OMPlatform.INSTANCE.bundle(BUNDLE_ID, OM.class);
-
- public static final OMTracer DEBUG = BUNDLE.tracer("debug"); //$NON-NLS-1$
-
- public static final OMTracer DEBUG_PROTOCOL = DEBUG.tracer("protocol"); //$NON-NLS-1$
-
- public static final OMTracer DEBUG_STORE = DEBUG.tracer("store"); //$NON-NLS-1$
-
- public static final OMLogger LOG = BUNDLE.logger();
-
- static void start() throws Exception
- {
- Server.INSTANCE.activate();
- }
-
- static void stop() throws Exception
- {
- Server.INSTANCE.deactivate();
- }
-
- /**
- * @author Eike Stepper
- */
- public static final class Activator extends OSGiActivator
- {
- public Activator()
- {
- super(BUNDLE);
- }
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.bundle;
+
+import org.eclipse.net4j.jms.internal.server.Server;
+import org.eclipse.net4j.util.om.OMBundle;
+import org.eclipse.net4j.util.om.OMPlatform;
+import org.eclipse.net4j.util.om.OSGiActivator;
+import org.eclipse.net4j.util.om.log.OMLogger;
+import org.eclipse.net4j.util.om.trace.OMTracer;
+
+/**
+ * The <em>Operations & Maintenance</em> class of this bundle.
+ *
+ * @author Eike Stepper
+ */
+public abstract class OM
+{
+ public static final String BUNDLE_ID = "org.eclipse.net4j.jms.server"; //$NON-NLS-1$
+
+ public static final OMBundle BUNDLE = OMPlatform.INSTANCE.bundle(BUNDLE_ID, OM.class);
+
+ public static final OMTracer DEBUG = BUNDLE.tracer("debug"); //$NON-NLS-1$
+
+ public static final OMTracer DEBUG_PROTOCOL = DEBUG.tracer("protocol"); //$NON-NLS-1$
+
+ public static final OMTracer DEBUG_STORE = DEBUG.tracer("store"); //$NON-NLS-1$
+
+ public static final OMLogger LOG = BUNDLE.logger();
+
+ static void start() throws Exception
+ {
+ Server.INSTANCE.activate();
+ }
+
+ static void stop() throws Exception
+ {
+ Server.INSTANCE.deactivate();
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ public static final class Activator extends OSGiActivator
+ {
+ public Activator()
+ {
+ super(BUNDLE);
+ }
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/messages/Messages.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/messages/Messages.java
index eb5fbcb165..9e7934646e 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/messages/Messages.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/messages/Messages.java
@@ -1,41 +1,41 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Victor Roldan Betancort - initial API and implementation
- * Eike Stepper - maintenance
- */
-package org.eclipse.net4j.jms.internal.server.messages;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * @author Victor Roldan Betancort
- */
-public class Messages
-{
- private static final String BUNDLE_NAME = "org.eclipse.net4j.jms.internal.server.messages.messages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
-
- private Messages()
- {
- }
-
- public static String getString(String key)
- {
- try
- {
- return RESOURCE_BUNDLE.getString(key);
- }
- catch (MissingResourceException e)
- {
- return '!' + key + '!';
- }
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Victor Roldan Betancort - initial API and implementation
+ * Eike Stepper - maintenance
+ */
+package org.eclipse.net4j.jms.internal.server.messages;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * @author Victor Roldan Betancort
+ */
+public class Messages
+{
+ private static final String BUNDLE_NAME = "org.eclipse.net4j.jms.internal.server.messages.messages"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+
+ private Messages()
+ {
+ }
+
+ public static String getString(String key)
+ {
+ try
+ {
+ return RESOURCE_BUNDLE.getString(key);
+ }
+ catch (MissingResourceException e)
+ {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/messages/messages.properties b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/messages/messages.properties
index 1fb1c6358c..6ced4a8dd4 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/messages/messages.properties
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/messages/messages.properties
@@ -1,17 +1,17 @@
-# Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Victor Roldan Betancort - initial API and implementation
-# Eike Stepper - maintenance
-
-JMSAcknowledgeIndication_0=Session {0} not found. Acknowledgement discarded.
-JMSCommitIndication_0=Session {0} not found
-JMSLogonIndication_0=Access to JMS server denied
-JMSRecoverIndication_0=Session {0} not found
-JMSRollbackIndication_0=Session {0} not found
-Server.3=Invalid destination:
-ServerSession_0=Destination not found: {0}
+# Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Victor Roldan Betancort - initial API and implementation
+# Eike Stepper - maintenance
+
+JMSAcknowledgeIndication_0=Session {0} not found. Acknowledgement discarded.
+JMSCommitIndication_0=Session {0} not found
+JMSLogonIndication_0=Access to JMS server denied
+JMSRecoverIndication_0=Session {0} not found
+JMSRollbackIndication_0=Session {0} not found
+Server.3=Invalid destination:
+ServerSession_0=Destination not found: {0}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSAcknowledgeIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSAcknowledgeIndication.java
index 48bed24fd4..a81fb59e59 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSAcknowledgeIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSAcknowledgeIndication.java
@@ -1,49 +1,49 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol;
-
-import org.eclipse.net4j.jms.JMSProtocolConstants;
-import org.eclipse.net4j.jms.internal.server.ServerConnection;
-import org.eclipse.net4j.jms.internal.server.ServerSession;
-import org.eclipse.net4j.jms.internal.server.bundle.OM;
-import org.eclipse.net4j.jms.internal.server.messages.Messages;
-import org.eclipse.net4j.signal.Indication;
-import org.eclipse.net4j.util.io.ExtendedDataInputStream;
-
-import java.text.MessageFormat;
-
-/**
- * @author Eike Stepper
- */
-public class JMSAcknowledgeIndication extends Indication
-{
- public JMSAcknowledgeIndication(JMSServerProtocol protocol)
- {
- super(protocol, JMSProtocolConstants.SIGNAL_ACKNOWLEDGE);
- }
-
- @Override
- protected void indicating(ExtendedDataInputStream in) throws Exception
- {
- int sessionID = in.readInt();
-
- JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
- ServerConnection connection = protocol.getInfraStructure();
- ServerSession session = connection.getSession(sessionID);
- if (session == null)
- {
- OM.LOG.info(MessageFormat.format(Messages.getString("JMSAcknowledgeIndication_0"), sessionID)); //$NON-NLS-1$
- return;
- }
-
- session.handleAcknowledge();
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol;
+
+import org.eclipse.net4j.jms.JMSProtocolConstants;
+import org.eclipse.net4j.jms.internal.server.ServerConnection;
+import org.eclipse.net4j.jms.internal.server.ServerSession;
+import org.eclipse.net4j.jms.internal.server.bundle.OM;
+import org.eclipse.net4j.jms.internal.server.messages.Messages;
+import org.eclipse.net4j.signal.Indication;
+import org.eclipse.net4j.util.io.ExtendedDataInputStream;
+
+import java.text.MessageFormat;
+
+/**
+ * @author Eike Stepper
+ */
+public class JMSAcknowledgeIndication extends Indication
+{
+ public JMSAcknowledgeIndication(JMSServerProtocol protocol)
+ {
+ super(protocol, JMSProtocolConstants.SIGNAL_ACKNOWLEDGE);
+ }
+
+ @Override
+ protected void indicating(ExtendedDataInputStream in) throws Exception
+ {
+ int sessionID = in.readInt();
+
+ JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
+ ServerConnection connection = protocol.getInfraStructure();
+ ServerSession session = connection.getSession(sessionID);
+ if (session == null)
+ {
+ OM.LOG.info(MessageFormat.format(Messages.getString("JMSAcknowledgeIndication_0"), sessionID)); //$NON-NLS-1$
+ return;
+ }
+
+ session.handleAcknowledge();
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSClientMessageIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSClientMessageIndication.java
index f7f221d9ed..5161f71887 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSClientMessageIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSClientMessageIndication.java
@@ -1,53 +1,53 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol;
-
-import org.eclipse.net4j.internal.jms.MessageImpl;
-import org.eclipse.net4j.internal.jms.util.MessageUtil;
-import org.eclipse.net4j.jms.JMSProtocolConstants;
-import org.eclipse.net4j.jms.internal.server.Server;
-import org.eclipse.net4j.jms.internal.server.ServerConnection;
-import org.eclipse.net4j.signal.IndicationWithResponse;
-import org.eclipse.net4j.util.io.ExtendedDataInputStream;
-import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
-
-/**
- * @author Eike Stepper
- */
-public class JMSClientMessageIndication extends IndicationWithResponse
-{
- private String messageID;
-
- public JMSClientMessageIndication(JMSServerProtocol protocol)
- {
- super(protocol, JMSProtocolConstants.SIGNAL_CLIENT_MESSAGE);
- }
-
- @Override
- protected void indicating(ExtendedDataInputStream in) throws Exception
- {
- MessageImpl[] messages = { MessageUtil.read(in) };
- JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
- ServerConnection connection = protocol.getInfraStructure();
- Server server = connection.getServer();
- String[] ids = server.handleClientMessages(messages);
- if (ids != null && ids.length != 0)
- {
- messageID = ids[0];
- }
- }
-
- @Override
- protected void responding(ExtendedDataOutputStream out) throws Exception
- {
- out.writeString(messageID);
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol;
+
+import org.eclipse.net4j.internal.jms.MessageImpl;
+import org.eclipse.net4j.internal.jms.util.MessageUtil;
+import org.eclipse.net4j.jms.JMSProtocolConstants;
+import org.eclipse.net4j.jms.internal.server.Server;
+import org.eclipse.net4j.jms.internal.server.ServerConnection;
+import org.eclipse.net4j.signal.IndicationWithResponse;
+import org.eclipse.net4j.util.io.ExtendedDataInputStream;
+import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
+
+/**
+ * @author Eike Stepper
+ */
+public class JMSClientMessageIndication extends IndicationWithResponse
+{
+ private String messageID;
+
+ public JMSClientMessageIndication(JMSServerProtocol protocol)
+ {
+ super(protocol, JMSProtocolConstants.SIGNAL_CLIENT_MESSAGE);
+ }
+
+ @Override
+ protected void indicating(ExtendedDataInputStream in) throws Exception
+ {
+ MessageImpl[] messages = { MessageUtil.read(in) };
+ JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
+ ServerConnection connection = protocol.getInfraStructure();
+ Server server = connection.getServer();
+ String[] ids = server.handleClientMessages(messages);
+ if (ids != null && ids.length != 0)
+ {
+ messageID = ids[0];
+ }
+ }
+
+ @Override
+ protected void responding(ExtendedDataOutputStream out) throws Exception
+ {
+ out.writeString(messageID);
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSCommitIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSCommitIndication.java
index 62d7af210d..da00eb8209 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSCommitIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSCommitIndication.java
@@ -1,77 +1,77 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol;
-
-import org.eclipse.net4j.internal.jms.MessageImpl;
-import org.eclipse.net4j.internal.jms.util.MessageUtil;
-import org.eclipse.net4j.jms.JMSProtocolConstants;
-import org.eclipse.net4j.jms.internal.server.ServerConnection;
-import org.eclipse.net4j.jms.internal.server.ServerSession;
-import org.eclipse.net4j.jms.internal.server.bundle.OM;
-import org.eclipse.net4j.jms.internal.server.messages.Messages;
-import org.eclipse.net4j.signal.IndicationWithResponse;
-import org.eclipse.net4j.util.io.ExtendedDataInputStream;
-import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
-
-import java.text.MessageFormat;
-
-/**
- * @author Eike Stepper
- */
-public class JMSCommitIndication extends IndicationWithResponse
-{
- private String[] messageIDs;
-
- public JMSCommitIndication(JMSServerProtocol protocol)
- {
- super(protocol, JMSProtocolConstants.SIGNAL_COMMIT);
- }
-
- @Override
- protected void indicating(ExtendedDataInputStream in) throws Exception
- {
- int sessionID = in.readInt();
- int size = in.readInt();
- MessageImpl[] messages = new MessageImpl[size];
- for (int i = 0; i < messages.length; i++)
- {
- messages[i] = MessageUtil.read(in);
- }
-
- JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
- ServerConnection connection = protocol.getInfraStructure();
- ServerSession session = connection.getSession(sessionID);
- if (session == null)
- {
- OM.LOG.warn(MessageFormat.format(Messages.getString("JMSCommitIndication_0"), sessionID)); //$NON-NLS-1$
- return;
- }
-
- messageIDs = session.handleCommit(messages);
- }
-
- @Override
- protected void responding(ExtendedDataOutputStream out) throws Exception
- {
- if (messageIDs == null)
- {
- out.writeInt(-1);
- }
- else
- {
- out.writeInt(messageIDs.length);
- for (String messageID : messageIDs)
- {
- out.writeString(messageID);
- }
- }
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol;
+
+import org.eclipse.net4j.internal.jms.MessageImpl;
+import org.eclipse.net4j.internal.jms.util.MessageUtil;
+import org.eclipse.net4j.jms.JMSProtocolConstants;
+import org.eclipse.net4j.jms.internal.server.ServerConnection;
+import org.eclipse.net4j.jms.internal.server.ServerSession;
+import org.eclipse.net4j.jms.internal.server.bundle.OM;
+import org.eclipse.net4j.jms.internal.server.messages.Messages;
+import org.eclipse.net4j.signal.IndicationWithResponse;
+import org.eclipse.net4j.util.io.ExtendedDataInputStream;
+import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
+
+import java.text.MessageFormat;
+
+/**
+ * @author Eike Stepper
+ */
+public class JMSCommitIndication extends IndicationWithResponse
+{
+ private String[] messageIDs;
+
+ public JMSCommitIndication(JMSServerProtocol protocol)
+ {
+ super(protocol, JMSProtocolConstants.SIGNAL_COMMIT);
+ }
+
+ @Override
+ protected void indicating(ExtendedDataInputStream in) throws Exception
+ {
+ int sessionID = in.readInt();
+ int size = in.readInt();
+ MessageImpl[] messages = new MessageImpl[size];
+ for (int i = 0; i < messages.length; i++)
+ {
+ messages[i] = MessageUtil.read(in);
+ }
+
+ JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
+ ServerConnection connection = protocol.getInfraStructure();
+ ServerSession session = connection.getSession(sessionID);
+ if (session == null)
+ {
+ OM.LOG.warn(MessageFormat.format(Messages.getString("JMSCommitIndication_0"), sessionID)); //$NON-NLS-1$
+ return;
+ }
+
+ messageIDs = session.handleCommit(messages);
+ }
+
+ @Override
+ protected void responding(ExtendedDataOutputStream out) throws Exception
+ {
+ if (messageIDs == null)
+ {
+ out.writeInt(-1);
+ }
+ else
+ {
+ out.writeInt(messageIDs.length);
+ for (String messageID : messageIDs)
+ {
+ out.writeString(messageID);
+ }
+ }
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSLogonIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSLogonIndication.java
index 3ec39e36c7..dbd9bbdf03 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSLogonIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSLogonIndication.java
@@ -1,57 +1,57 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol;
-
-import org.eclipse.net4j.jms.JMSProtocolConstants;
-import org.eclipse.net4j.jms.internal.server.Server;
-import org.eclipse.net4j.jms.internal.server.ServerConnection;
-import org.eclipse.net4j.jms.internal.server.bundle.OM;
-import org.eclipse.net4j.jms.internal.server.messages.Messages;
-import org.eclipse.net4j.signal.IndicationWithResponse;
-import org.eclipse.net4j.util.io.ExtendedDataInputStream;
-import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
-
-/**
- * @author Eike Stepper
- */
-public class JMSLogonIndication extends IndicationWithResponse
-{
- private boolean ok;
-
- public JMSLogonIndication(JMSServerProtocol protocol)
- {
- super(protocol, JMSProtocolConstants.SIGNAL_LOGON);
- }
-
- @Override
- protected void indicating(ExtendedDataInputStream in) throws Exception
- {
- String userName = in.readString();
- String password = in.readString();
- ServerConnection connection = Server.INSTANCE.logon(userName, password);
- if (connection == null)
- {
- OM.LOG.error(Messages.getString("JMSLogonIndication_0")); //$NON-NLS-1$
- return;
- }
-
- JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
- connection.setProtocol(protocol);
- protocol.setInfraStructure(connection);
- ok = true;
- }
-
- @Override
- protected void responding(ExtendedDataOutputStream out) throws Exception
- {
- out.writeBoolean(ok);
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol;
+
+import org.eclipse.net4j.jms.JMSProtocolConstants;
+import org.eclipse.net4j.jms.internal.server.Server;
+import org.eclipse.net4j.jms.internal.server.ServerConnection;
+import org.eclipse.net4j.jms.internal.server.bundle.OM;
+import org.eclipse.net4j.jms.internal.server.messages.Messages;
+import org.eclipse.net4j.signal.IndicationWithResponse;
+import org.eclipse.net4j.util.io.ExtendedDataInputStream;
+import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
+
+/**
+ * @author Eike Stepper
+ */
+public class JMSLogonIndication extends IndicationWithResponse
+{
+ private boolean ok;
+
+ public JMSLogonIndication(JMSServerProtocol protocol)
+ {
+ super(protocol, JMSProtocolConstants.SIGNAL_LOGON);
+ }
+
+ @Override
+ protected void indicating(ExtendedDataInputStream in) throws Exception
+ {
+ String userName = in.readString();
+ String password = in.readString();
+ ServerConnection connection = Server.INSTANCE.logon(userName, password);
+ if (connection == null)
+ {
+ OM.LOG.error(Messages.getString("JMSLogonIndication_0")); //$NON-NLS-1$
+ return;
+ }
+
+ JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
+ connection.setProtocol(protocol);
+ protocol.setInfraStructure(connection);
+ ok = true;
+ }
+
+ @Override
+ protected void responding(ExtendedDataOutputStream out) throws Exception
+ {
+ out.writeBoolean(ok);
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSOpenSessionIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSOpenSessionIndication.java
index 9c0915c774..aa435b1f74 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSOpenSessionIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSOpenSessionIndication.java
@@ -1,50 +1,50 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol;
-
-import org.eclipse.net4j.jms.JMSProtocolConstants;
-import org.eclipse.net4j.jms.internal.server.ServerConnection;
-import org.eclipse.net4j.jms.internal.server.ServerSession;
-import org.eclipse.net4j.signal.IndicationWithResponse;
-import org.eclipse.net4j.util.io.ExtendedDataInputStream;
-import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
-
-/**
- * @author Eike Stepper
- */
-public class JMSOpenSessionIndication extends IndicationWithResponse
-{
- private boolean ok;
-
- public JMSOpenSessionIndication(JMSServerProtocol protocol)
- {
- super(protocol, JMSProtocolConstants.SIGNAL_OPEN_SESSION);
- }
-
- @Override
- protected void indicating(ExtendedDataInputStream in) throws Exception
- {
- int sessionID = in.readInt();
- JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
- ServerConnection connection = protocol.getInfraStructure();
- ServerSession session = connection.openSession(sessionID);
- if (session != null)
- {
- ok = true;
- }
- }
-
- @Override
- protected void responding(ExtendedDataOutputStream out) throws Exception
- {
- out.writeBoolean(ok);
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol;
+
+import org.eclipse.net4j.jms.JMSProtocolConstants;
+import org.eclipse.net4j.jms.internal.server.ServerConnection;
+import org.eclipse.net4j.jms.internal.server.ServerSession;
+import org.eclipse.net4j.signal.IndicationWithResponse;
+import org.eclipse.net4j.util.io.ExtendedDataInputStream;
+import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
+
+/**
+ * @author Eike Stepper
+ */
+public class JMSOpenSessionIndication extends IndicationWithResponse
+{
+ private boolean ok;
+
+ public JMSOpenSessionIndication(JMSServerProtocol protocol)
+ {
+ super(protocol, JMSProtocolConstants.SIGNAL_OPEN_SESSION);
+ }
+
+ @Override
+ protected void indicating(ExtendedDataInputStream in) throws Exception
+ {
+ int sessionID = in.readInt();
+ JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
+ ServerConnection connection = protocol.getInfraStructure();
+ ServerSession session = connection.openSession(sessionID);
+ if (session != null)
+ {
+ ok = true;
+ }
+ }
+
+ @Override
+ protected void responding(ExtendedDataOutputStream out) throws Exception
+ {
+ out.writeBoolean(ok);
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRecoverIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRecoverIndication.java
index 79de5e450d..c1f0199ad9 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRecoverIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRecoverIndication.java
@@ -1,54 +1,54 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol;
-
-import org.eclipse.net4j.jms.JMSProtocolConstants;
-import org.eclipse.net4j.jms.internal.server.ServerConnection;
-import org.eclipse.net4j.jms.internal.server.ServerSession;
-import org.eclipse.net4j.jms.internal.server.bundle.OM;
-import org.eclipse.net4j.jms.internal.server.messages.Messages;
-import org.eclipse.net4j.signal.IndicationWithResponse;
-import org.eclipse.net4j.util.io.ExtendedDataInputStream;
-import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
-
-import java.text.MessageFormat;
-
-/**
- * @author Eike Stepper
- */
-public class JMSRecoverIndication extends IndicationWithResponse
-{
- public JMSRecoverIndication(JMSServerProtocol protocol)
- {
- super(protocol, JMSProtocolConstants.SIGNAL_RECOVER);
- }
-
- @Override
- protected void indicating(ExtendedDataInputStream in) throws Exception
- {
- int sessionID = in.readInt();
- JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
- ServerConnection connection = protocol.getInfraStructure();
- ServerSession session = connection.getSession(sessionID);
- if (session == null)
- {
- OM.LOG.warn(MessageFormat.format(Messages.getString("JMSRecoverIndication_0"), sessionID)); //$NON-NLS-1$
- return;
- }
-
- session.handleRecover();
- }
-
- @Override
- protected void responding(ExtendedDataOutputStream out) throws Exception
- {
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol;
+
+import org.eclipse.net4j.jms.JMSProtocolConstants;
+import org.eclipse.net4j.jms.internal.server.ServerConnection;
+import org.eclipse.net4j.jms.internal.server.ServerSession;
+import org.eclipse.net4j.jms.internal.server.bundle.OM;
+import org.eclipse.net4j.jms.internal.server.messages.Messages;
+import org.eclipse.net4j.signal.IndicationWithResponse;
+import org.eclipse.net4j.util.io.ExtendedDataInputStream;
+import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
+
+import java.text.MessageFormat;
+
+/**
+ * @author Eike Stepper
+ */
+public class JMSRecoverIndication extends IndicationWithResponse
+{
+ public JMSRecoverIndication(JMSServerProtocol protocol)
+ {
+ super(protocol, JMSProtocolConstants.SIGNAL_RECOVER);
+ }
+
+ @Override
+ protected void indicating(ExtendedDataInputStream in) throws Exception
+ {
+ int sessionID = in.readInt();
+ JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
+ ServerConnection connection = protocol.getInfraStructure();
+ ServerSession session = connection.getSession(sessionID);
+ if (session == null)
+ {
+ OM.LOG.warn(MessageFormat.format(Messages.getString("JMSRecoverIndication_0"), sessionID)); //$NON-NLS-1$
+ return;
+ }
+
+ session.handleRecover();
+ }
+
+ @Override
+ protected void responding(ExtendedDataOutputStream out) throws Exception
+ {
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRegisterConsumerIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRegisterConsumerIndication.java
index d8398726d3..7537f9b725 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRegisterConsumerIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRegisterConsumerIndication.java
@@ -1,53 +1,53 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol;
-
-import org.eclipse.net4j.internal.jms.DestinationImpl;
-import org.eclipse.net4j.internal.jms.util.DestinationUtil;
-import org.eclipse.net4j.jms.JMSProtocolConstants;
-import org.eclipse.net4j.jms.internal.server.ServerConnection;
-import org.eclipse.net4j.jms.internal.server.ServerSession;
-import org.eclipse.net4j.signal.IndicationWithResponse;
-import org.eclipse.net4j.util.io.ExtendedDataInputStream;
-import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
-
-/**
- * @author Eike Stepper
- */
-public class JMSRegisterConsumerIndication extends IndicationWithResponse
-{
- private long consumerID;
-
- public JMSRegisterConsumerIndication(JMSServerProtocol protocol)
- {
- super(protocol, JMSProtocolConstants.SIGNAL_REGISTER_CONSUMER);
- }
-
- @Override
- protected void indicating(ExtendedDataInputStream in) throws Exception
- {
- int sessionID = in.readInt();
- DestinationImpl destination = DestinationUtil.read(in);
- String messageSelector = in.readString();
- boolean noLocal = in.readBoolean();
- boolean durable = in.readBoolean();
- JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
- ServerConnection connection = protocol.getInfraStructure();
- ServerSession session = connection.getSession(sessionID);
- consumerID = session.registerConsumer(destination, messageSelector, noLocal, durable);
- }
-
- @Override
- protected void responding(ExtendedDataOutputStream out) throws Exception
- {
- out.writeLong(consumerID);
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol;
+
+import org.eclipse.net4j.internal.jms.DestinationImpl;
+import org.eclipse.net4j.internal.jms.util.DestinationUtil;
+import org.eclipse.net4j.jms.JMSProtocolConstants;
+import org.eclipse.net4j.jms.internal.server.ServerConnection;
+import org.eclipse.net4j.jms.internal.server.ServerSession;
+import org.eclipse.net4j.signal.IndicationWithResponse;
+import org.eclipse.net4j.util.io.ExtendedDataInputStream;
+import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
+
+/**
+ * @author Eike Stepper
+ */
+public class JMSRegisterConsumerIndication extends IndicationWithResponse
+{
+ private long consumerID;
+
+ public JMSRegisterConsumerIndication(JMSServerProtocol protocol)
+ {
+ super(protocol, JMSProtocolConstants.SIGNAL_REGISTER_CONSUMER);
+ }
+
+ @Override
+ protected void indicating(ExtendedDataInputStream in) throws Exception
+ {
+ int sessionID = in.readInt();
+ DestinationImpl destination = DestinationUtil.read(in);
+ String messageSelector = in.readString();
+ boolean noLocal = in.readBoolean();
+ boolean durable = in.readBoolean();
+ JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
+ ServerConnection connection = protocol.getInfraStructure();
+ ServerSession session = connection.getSession(sessionID);
+ consumerID = session.registerConsumer(destination, messageSelector, noLocal, durable);
+ }
+
+ @Override
+ protected void responding(ExtendedDataOutputStream out) throws Exception
+ {
+ out.writeLong(consumerID);
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRollbackIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRollbackIndication.java
index 34cd51de13..2a3c912762 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRollbackIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSRollbackIndication.java
@@ -1,55 +1,55 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol;
-
-import org.eclipse.net4j.jms.JMSProtocolConstants;
-import org.eclipse.net4j.jms.internal.server.ServerConnection;
-import org.eclipse.net4j.jms.internal.server.ServerSession;
-import org.eclipse.net4j.jms.internal.server.bundle.OM;
-import org.eclipse.net4j.jms.internal.server.messages.Messages;
-import org.eclipse.net4j.signal.IndicationWithResponse;
-import org.eclipse.net4j.util.io.ExtendedDataInputStream;
-import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
-
-import java.text.MessageFormat;
-
-/**
- * @author Eike Stepper
- */
-public class JMSRollbackIndication extends IndicationWithResponse
-{
- public JMSRollbackIndication(JMSServerProtocol protocol)
- {
- super(protocol, JMSProtocolConstants.SIGNAL_ROLLBACK);
- }
-
- @Override
- protected void indicating(ExtendedDataInputStream in) throws Exception
- {
- int sessionID = in.readInt();
- JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
- ServerConnection connection = protocol.getInfraStructure();
- ServerSession session = connection.getSession(sessionID);
- if (session == null)
- {
- OM.LOG.warn(MessageFormat.format(Messages.getString("JMSRollbackIndication_0"), sessionID)); //$NON-NLS-1$
- return;
- }
-
- session.handleRecover();
- }
-
- @Override
- protected void responding(ExtendedDataOutputStream out) throws Exception
- {
- out.writeBoolean(true);
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol;
+
+import org.eclipse.net4j.jms.JMSProtocolConstants;
+import org.eclipse.net4j.jms.internal.server.ServerConnection;
+import org.eclipse.net4j.jms.internal.server.ServerSession;
+import org.eclipse.net4j.jms.internal.server.bundle.OM;
+import org.eclipse.net4j.jms.internal.server.messages.Messages;
+import org.eclipse.net4j.signal.IndicationWithResponse;
+import org.eclipse.net4j.util.io.ExtendedDataInputStream;
+import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
+
+import java.text.MessageFormat;
+
+/**
+ * @author Eike Stepper
+ */
+public class JMSRollbackIndication extends IndicationWithResponse
+{
+ public JMSRollbackIndication(JMSServerProtocol protocol)
+ {
+ super(protocol, JMSProtocolConstants.SIGNAL_ROLLBACK);
+ }
+
+ @Override
+ protected void indicating(ExtendedDataInputStream in) throws Exception
+ {
+ int sessionID = in.readInt();
+ JMSServerProtocol protocol = (JMSServerProtocol)getProtocol();
+ ServerConnection connection = protocol.getInfraStructure();
+ ServerSession session = connection.getSession(sessionID);
+ if (session == null)
+ {
+ OM.LOG.warn(MessageFormat.format(Messages.getString("JMSRollbackIndication_0"), sessionID)); //$NON-NLS-1$
+ return;
+ }
+
+ session.handleRecover();
+ }
+
+ @Override
+ protected void responding(ExtendedDataOutputStream out) throws Exception
+ {
+ out.writeBoolean(true);
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerMessageRequest.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerMessageRequest.java
index 7969882154..2f97928bce 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerMessageRequest.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerMessageRequest.java
@@ -1,45 +1,45 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol;
-
-import org.eclipse.net4j.internal.jms.MessageImpl;
-import org.eclipse.net4j.internal.jms.util.MessageUtil;
-import org.eclipse.net4j.jms.JMSProtocolConstants;
-import org.eclipse.net4j.signal.Request;
-import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
-
-/**
- * @author Eike Stepper
- */
-public class JMSServerMessageRequest extends Request
-{
- private int sessionID;
-
- private long consumerID;
-
- private MessageImpl message;
-
- public JMSServerMessageRequest(JMSServerProtocol protocol, int sessionID, long consumerID, MessageImpl message)
- {
- super(protocol, JMSProtocolConstants.SIGNAL_SERVER_MESSAGE);
- this.sessionID = sessionID;
- this.consumerID = consumerID;
- this.message = message;
- }
-
- @Override
- protected void requesting(ExtendedDataOutputStream out) throws Exception
- {
- out.writeInt(sessionID);
- out.writeLong(consumerID);
- MessageUtil.write(out, message);
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol;
+
+import org.eclipse.net4j.internal.jms.MessageImpl;
+import org.eclipse.net4j.internal.jms.util.MessageUtil;
+import org.eclipse.net4j.jms.JMSProtocolConstants;
+import org.eclipse.net4j.signal.Request;
+import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
+
+/**
+ * @author Eike Stepper
+ */
+public class JMSServerMessageRequest extends Request
+{
+ private int sessionID;
+
+ private long consumerID;
+
+ private MessageImpl message;
+
+ public JMSServerMessageRequest(JMSServerProtocol protocol, int sessionID, long consumerID, MessageImpl message)
+ {
+ super(protocol, JMSProtocolConstants.SIGNAL_SERVER_MESSAGE);
+ this.sessionID = sessionID;
+ this.consumerID = consumerID;
+ this.message = message;
+ }
+
+ @Override
+ protected void requesting(ExtendedDataOutputStream out) throws Exception
+ {
+ out.writeInt(sessionID);
+ out.writeLong(consumerID);
+ MessageUtil.write(out, message);
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocol.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocol.java
index 7a85e754d5..7f92df2a74 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocol.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocol.java
@@ -1,64 +1,64 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol;
-
-import org.eclipse.net4j.jms.JMSProtocolConstants;
-import org.eclipse.net4j.jms.internal.server.ServerConnection;
-import org.eclipse.net4j.signal.SignalProtocol;
-import org.eclipse.net4j.signal.SignalReactor;
-
-/**
- * @author Eike Stepper
- */
-public class JMSServerProtocol extends SignalProtocol<ServerConnection>
-{
- public JMSServerProtocol()
- {
- super(JMSProtocolConstants.PROTOCOL_NAME);
- }
-
- @Override
- protected SignalReactor createSignalReactor(short signalID)
- {
- switch (signalID)
- {
- case JMSProtocolConstants.SIGNAL_SYNC:
- return new JMSSyncIndication(this);
-
- case JMSProtocolConstants.SIGNAL_LOGON:
- return new JMSLogonIndication(this);
-
- case JMSProtocolConstants.SIGNAL_OPEN_SESSION:
- return new JMSOpenSessionIndication(this);
-
- case JMSProtocolConstants.SIGNAL_REGISTER_CONSUMER:
- return new JMSRegisterConsumerIndication(this);
-
- case JMSProtocolConstants.SIGNAL_CLIENT_MESSAGE:
- return new JMSClientMessageIndication(this);
-
- case JMSProtocolConstants.SIGNAL_ACKNOWLEDGE:
- return new JMSAcknowledgeIndication(this);
-
- case JMSProtocolConstants.SIGNAL_RECOVER:
- return new JMSRecoverIndication(this);
-
- case JMSProtocolConstants.SIGNAL_COMMIT:
- return new JMSCommitIndication(this);
-
- case JMSProtocolConstants.SIGNAL_ROLLBACK:
- return new JMSRollbackIndication(this);
-
- default:
- return super.createSignalReactor(signalID);
- }
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol;
+
+import org.eclipse.net4j.jms.JMSProtocolConstants;
+import org.eclipse.net4j.jms.internal.server.ServerConnection;
+import org.eclipse.net4j.signal.SignalProtocol;
+import org.eclipse.net4j.signal.SignalReactor;
+
+/**
+ * @author Eike Stepper
+ */
+public class JMSServerProtocol extends SignalProtocol<ServerConnection>
+{
+ public JMSServerProtocol()
+ {
+ super(JMSProtocolConstants.PROTOCOL_NAME);
+ }
+
+ @Override
+ protected SignalReactor createSignalReactor(short signalID)
+ {
+ switch (signalID)
+ {
+ case JMSProtocolConstants.SIGNAL_SYNC:
+ return new JMSSyncIndication(this);
+
+ case JMSProtocolConstants.SIGNAL_LOGON:
+ return new JMSLogonIndication(this);
+
+ case JMSProtocolConstants.SIGNAL_OPEN_SESSION:
+ return new JMSOpenSessionIndication(this);
+
+ case JMSProtocolConstants.SIGNAL_REGISTER_CONSUMER:
+ return new JMSRegisterConsumerIndication(this);
+
+ case JMSProtocolConstants.SIGNAL_CLIENT_MESSAGE:
+ return new JMSClientMessageIndication(this);
+
+ case JMSProtocolConstants.SIGNAL_ACKNOWLEDGE:
+ return new JMSAcknowledgeIndication(this);
+
+ case JMSProtocolConstants.SIGNAL_RECOVER:
+ return new JMSRecoverIndication(this);
+
+ case JMSProtocolConstants.SIGNAL_COMMIT:
+ return new JMSCommitIndication(this);
+
+ case JMSProtocolConstants.SIGNAL_ROLLBACK:
+ return new JMSRollbackIndication(this);
+
+ default:
+ return super.createSignalReactor(signalID);
+ }
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocolFactory.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocolFactory.java
index 2b42b34dac..c25ccc9453 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocolFactory.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSServerProtocolFactory.java
@@ -1,39 +1,39 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol;
-
-import org.eclipse.net4j.jms.JMSProtocolConstants;
-import org.eclipse.net4j.util.container.IManagedContainer;
-
-import org.eclipse.spi.net4j.ServerProtocolFactory;
-
-/**
- * @author Eike Stepper
- */
-public final class JMSServerProtocolFactory extends ServerProtocolFactory
-{
- public static final String TYPE = JMSProtocolConstants.PROTOCOL_NAME;
-
- public JMSServerProtocolFactory()
- {
- super(TYPE);
- }
-
- public JMSServerProtocol create(String description)
- {
- return new JMSServerProtocol();
- }
-
- public static JMSServerProtocol get(IManagedContainer container, String description)
- {
- return (JMSServerProtocol)container.getElement(PRODUCT_GROUP, TYPE, description);
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol;
+
+import org.eclipse.net4j.jms.JMSProtocolConstants;
+import org.eclipse.net4j.util.container.IManagedContainer;
+
+import org.eclipse.spi.net4j.ServerProtocolFactory;
+
+/**
+ * @author Eike Stepper
+ */
+public final class JMSServerProtocolFactory extends ServerProtocolFactory
+{
+ public static final String TYPE = JMSProtocolConstants.PROTOCOL_NAME;
+
+ public JMSServerProtocolFactory()
+ {
+ super(TYPE);
+ }
+
+ public JMSServerProtocol create(String description)
+ {
+ return new JMSServerProtocol();
+ }
+
+ public static JMSServerProtocol get(IManagedContainer container, String description)
+ {
+ return (JMSServerProtocol)container.getElement(PRODUCT_GROUP, TYPE, description);
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSSyncIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSSyncIndication.java
index bea8f96a30..9e1be7d69e 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSSyncIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/JMSSyncIndication.java
@@ -1,38 +1,38 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol;
-
-import org.eclipse.net4j.jms.JMSProtocolConstants;
-import org.eclipse.net4j.signal.IndicationWithResponse;
-import org.eclipse.net4j.util.io.ExtendedDataInputStream;
-import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
-
-/**
- * @author Eike Stepper
- */
-public class JMSSyncIndication extends IndicationWithResponse
-{
- public JMSSyncIndication(JMSServerProtocol protocol)
- {
- super(protocol, JMSProtocolConstants.SIGNAL_SYNC);
- }
-
- @Override
- protected void indicating(ExtendedDataInputStream in) throws Exception
- {
- }
-
- @Override
- protected void responding(ExtendedDataOutputStream out) throws Exception
- {
- out.writeLong(System.currentTimeMillis());
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol;
+
+import org.eclipse.net4j.jms.JMSProtocolConstants;
+import org.eclipse.net4j.signal.IndicationWithResponse;
+import org.eclipse.net4j.util.io.ExtendedDataInputStream;
+import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
+
+/**
+ * @author Eike Stepper
+ */
+public class JMSSyncIndication extends IndicationWithResponse
+{
+ public JMSSyncIndication(JMSServerProtocol protocol)
+ {
+ super(protocol, JMSProtocolConstants.SIGNAL_SYNC);
+ }
+
+ @Override
+ protected void indicating(ExtendedDataInputStream in) throws Exception
+ {
+ }
+
+ @Override
+ protected void responding(ExtendedDataOutputStream out) throws Exception
+ {
+ out.writeLong(System.currentTimeMillis());
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocol.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocol.java
index 8f90eb4279..5da3d2ada4 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocol.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocol.java
@@ -1,45 +1,45 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol.admin;
-
-import org.eclipse.net4j.jms.JMSAdminProtocolConstants;
-import org.eclipse.net4j.jms.server.IServer;
-import org.eclipse.net4j.signal.SignalProtocol;
-import org.eclipse.net4j.signal.SignalReactor;
-
-/**
- * @author Eike Stepper
- */
-public class JMSAdminServerProtocol extends SignalProtocol<Object>
-{
- public JMSAdminServerProtocol()
- {
- super(JMSAdminProtocolConstants.PROTOCOL_NAME);
- }
-
- @Override
- protected SignalReactor createSignalReactor(short signalID)
- {
- switch (signalID)
- {
- case JMSAdminProtocolConstants.SIGNAL_CREATE_DESTINATION:
- return new JMSCreateDestinationIndication(this);
-
- default:
- return super.createSignalReactor(signalID);
- }
- }
-
- public IServer getServer()
- {
- return IServer.INSTANCE;
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol.admin;
+
+import org.eclipse.net4j.jms.JMSAdminProtocolConstants;
+import org.eclipse.net4j.jms.server.IServer;
+import org.eclipse.net4j.signal.SignalProtocol;
+import org.eclipse.net4j.signal.SignalReactor;
+
+/**
+ * @author Eike Stepper
+ */
+public class JMSAdminServerProtocol extends SignalProtocol<Object>
+{
+ public JMSAdminServerProtocol()
+ {
+ super(JMSAdminProtocolConstants.PROTOCOL_NAME);
+ }
+
+ @Override
+ protected SignalReactor createSignalReactor(short signalID)
+ {
+ switch (signalID)
+ {
+ case JMSAdminProtocolConstants.SIGNAL_CREATE_DESTINATION:
+ return new JMSCreateDestinationIndication(this);
+
+ default:
+ return super.createSignalReactor(signalID);
+ }
+ }
+
+ public IServer getServer()
+ {
+ return IServer.INSTANCE;
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocolFactory.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocolFactory.java
index 384f6efd63..dae8d3c335 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocolFactory.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSAdminServerProtocolFactory.java
@@ -1,39 +1,39 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol.admin;
-
-import org.eclipse.net4j.jms.JMSAdminProtocolConstants;
-import org.eclipse.net4j.util.container.IManagedContainer;
-
-import org.eclipse.spi.net4j.ServerProtocolFactory;
-
-/**
- * @author Eike Stepper
- */
-public final class JMSAdminServerProtocolFactory extends ServerProtocolFactory
-{
- public static final String TYPE = JMSAdminProtocolConstants.PROTOCOL_NAME;
-
- public JMSAdminServerProtocolFactory()
- {
- super(TYPE);
- }
-
- public JMSAdminServerProtocol create(String description)
- {
- return new JMSAdminServerProtocol();
- }
-
- public static JMSAdminServerProtocol get(IManagedContainer container, String description)
- {
- return (JMSAdminServerProtocol)container.getElement(PRODUCT_GROUP, TYPE, description);
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol.admin;
+
+import org.eclipse.net4j.jms.JMSAdminProtocolConstants;
+import org.eclipse.net4j.util.container.IManagedContainer;
+
+import org.eclipse.spi.net4j.ServerProtocolFactory;
+
+/**
+ * @author Eike Stepper
+ */
+public final class JMSAdminServerProtocolFactory extends ServerProtocolFactory
+{
+ public static final String TYPE = JMSAdminProtocolConstants.PROTOCOL_NAME;
+
+ public JMSAdminServerProtocolFactory()
+ {
+ super(TYPE);
+ }
+
+ public JMSAdminServerProtocol create(String description)
+ {
+ return new JMSAdminServerProtocol();
+ }
+
+ public static JMSAdminServerProtocol get(IManagedContainer container, String description)
+ {
+ return (JMSAdminServerProtocol)container.getElement(PRODUCT_GROUP, TYPE, description);
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSCreateDestinationIndication.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSCreateDestinationIndication.java
index 76e8a04063..07cedb6f3b 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSCreateDestinationIndication.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/protocol/admin/JMSCreateDestinationIndication.java
@@ -1,65 +1,65 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.protocol.admin;
-
-import org.eclipse.net4j.jms.JMSAdminProtocolConstants;
-import org.eclipse.net4j.jms.server.IDestination;
-import org.eclipse.net4j.jms.server.IDestination.Type;
-import org.eclipse.net4j.jms.server.IServer;
-import org.eclipse.net4j.signal.IndicationWithResponse;
-import org.eclipse.net4j.util.io.ExtendedDataInputStream;
-import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
-
-/**
- * @author Eike Stepper
- */
-public class JMSCreateDestinationIndication extends IndicationWithResponse
-{
- private boolean ok;
-
- public JMSCreateDestinationIndication(JMSAdminServerProtocol protocol)
- {
- super(protocol, JMSAdminProtocolConstants.SIGNAL_CREATE_DESTINATION);
- }
-
- @Override
- protected void indicating(ExtendedDataInputStream in) throws Exception
- {
- byte type = in.readByte();
- String name = in.readString();
- JMSAdminServerProtocol protocol = (JMSAdminServerProtocol)getProtocol();
- IServer server = protocol.getServer();
- IDestination destination = server.createDestination(name, getDestinationType(type));
- if (destination != null)
- {
- ok = true;
- }
- }
-
- @Override
- protected void responding(ExtendedDataOutputStream out) throws Exception
- {
- out.writeBoolean(ok);
- }
-
- private Type getDestinationType(byte type)
- {
- switch (type)
- {
- case JMSAdminProtocolConstants.DESTINATION_TYPE_QUEUE:
- return IDestination.Type.QUEUE;
- case JMSAdminProtocolConstants.DESTINATION_TYPE_TOPIC:
- return IDestination.Type.TOPIC;
- }
-
- throw new IllegalArgumentException("type: " + type); //$NON-NLS-1$
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.protocol.admin;
+
+import org.eclipse.net4j.jms.JMSAdminProtocolConstants;
+import org.eclipse.net4j.jms.server.IDestination;
+import org.eclipse.net4j.jms.server.IDestination.Type;
+import org.eclipse.net4j.jms.server.IServer;
+import org.eclipse.net4j.signal.IndicationWithResponse;
+import org.eclipse.net4j.util.io.ExtendedDataInputStream;
+import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
+
+/**
+ * @author Eike Stepper
+ */
+public class JMSCreateDestinationIndication extends IndicationWithResponse
+{
+ private boolean ok;
+
+ public JMSCreateDestinationIndication(JMSAdminServerProtocol protocol)
+ {
+ super(protocol, JMSAdminProtocolConstants.SIGNAL_CREATE_DESTINATION);
+ }
+
+ @Override
+ protected void indicating(ExtendedDataInputStream in) throws Exception
+ {
+ byte type = in.readByte();
+ String name = in.readString();
+ JMSAdminServerProtocol protocol = (JMSAdminServerProtocol)getProtocol();
+ IServer server = protocol.getServer();
+ IDestination destination = server.createDestination(name, getDestinationType(type));
+ if (destination != null)
+ {
+ ok = true;
+ }
+ }
+
+ @Override
+ protected void responding(ExtendedDataOutputStream out) throws Exception
+ {
+ out.writeBoolean(ok);
+ }
+
+ private Type getDestinationType(byte type)
+ {
+ switch (type)
+ {
+ case JMSAdminProtocolConstants.DESTINATION_TYPE_QUEUE:
+ return IDestination.Type.QUEUE;
+ case JMSAdminProtocolConstants.DESTINATION_TYPE_TOPIC:
+ return IDestination.Type.TOPIC;
+ }
+
+ throw new IllegalArgumentException("type: " + type); //$NON-NLS-1$
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/AbstractStore.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/AbstractStore.java
index faa2d8f8e1..f877c3d969 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/AbstractStore.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/AbstractStore.java
@@ -1,44 +1,44 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.store;
-
-import org.eclipse.net4j.jms.server.IStore;
-import org.eclipse.net4j.util.lifecycle.Lifecycle;
-
-/**
- * @author Eike Stepper
- */
-public abstract class AbstractStore extends Lifecycle implements IStore
-{
- private String storeType;
-
- private String instanceID;
-
- public AbstractStore(String storeType)
- {
- this.storeType = storeType;
- }
-
- public String getStoreType()
- {
- return storeType;
- }
-
- public String getInstanceID()
- {
- return instanceID;
- }
-
- public void setInstanceID(String instanceID)
- {
- this.instanceID = instanceID;
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.store;
+
+import org.eclipse.net4j.jms.server.IStore;
+import org.eclipse.net4j.util.lifecycle.Lifecycle;
+
+/**
+ * @author Eike Stepper
+ */
+public abstract class AbstractStore extends Lifecycle implements IStore
+{
+ private String storeType;
+
+ private String instanceID;
+
+ public AbstractStore(String storeType)
+ {
+ this.storeType = storeType;
+ }
+
+ public String getStoreType()
+ {
+ return storeType;
+ }
+
+ public String getInstanceID()
+ {
+ return instanceID;
+ }
+
+ public void setInstanceID(String instanceID)
+ {
+ this.instanceID = instanceID;
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/AbstractTransaction.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/AbstractTransaction.java
index 6a1810b355..045b442d96 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/AbstractTransaction.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/AbstractTransaction.java
@@ -1,230 +1,230 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.store;
-
-import org.eclipse.net4j.internal.jms.MessageImpl;
-import org.eclipse.net4j.jms.internal.server.ServerConsumer;
-import org.eclipse.net4j.jms.internal.server.ServerDestination;
-import org.eclipse.net4j.jms.internal.server.bundle.OM;
-import org.eclipse.net4j.jms.server.IDestination;
-import org.eclipse.net4j.jms.server.IServerConsumer;
-import org.eclipse.net4j.jms.server.IStoreTransaction;
-import org.eclipse.net4j.util.om.trace.ContextTracer;
-
-import javax.jms.Message;
-
-/**
- * @author Eike Stepper
- */
-public abstract class AbstractTransaction implements IStoreTransaction
-{
- public static final String[] NO_DESTINATION_NAMES = new String[0];
-
- public static final long[] NO_CONSUMER_IDS = new long[0];
-
- private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG_STORE, AbstractTransaction.class);
-
- private AbstractStore store;
-
- public AbstractTransaction(AbstractStore store)
- {
- this.store = store;
- }
-
- public AbstractStore getStore()
- {
- return store;
- }
-
- public String[] getDestinationNames()
- {
- if (TRACER.isEnabled())
- {
- TRACER.trace("Getting destination names"); //$NON-NLS-1$
- }
-
- String[] names = doGetDestinationNames();
- if (TRACER.isEnabled())
- {
- TRACER.trace("Got destination names " + names); //$NON-NLS-1$
- }
-
- return names;
- }
-
- public ServerDestination getDestination(String name)
- {
- if (TRACER.isEnabled())
- {
- TRACER.trace("Getting destination " + name); //$NON-NLS-1$
- }
-
- ServerDestination destination = doGetDestination(name);
- if (TRACER.isEnabled())
- {
- TRACER.trace("Got destination " + destination); //$NON-NLS-1$
- }
-
- return destination;
- }
-
- public long[] getConsumerIDs()
- {
- if (TRACER.isEnabled())
- {
- TRACER.trace("Getting consumer IDs"); //$NON-NLS-1$
- }
-
- long[] ids = doGetConsumerIDs();
- if (TRACER.isEnabled())
- {
- TRACER.trace("Got consumer IDs " + ids); //$NON-NLS-1$
- }
-
- return ids;
- }
-
- public ServerConsumer getConsumer(long id)
- {
- if (TRACER.isEnabled())
- {
- TRACER.trace("Getting consumer " + id); //$NON-NLS-1$
- }
-
- ServerConsumer consumer = doGetConsumer(id);
- if (TRACER.isEnabled())
- {
- TRACER.trace("Got consumer " + consumer); //$NON-NLS-1$
- }
-
- return consumer;
- }
-
- public void destinationAdded(IDestination destination)
- {
- if (TRACER.isEnabled())
- {
- TRACER.trace("Adding destination " + destination); //$NON-NLS-1$
- }
-
- doDestinationAdded((ServerDestination)destination);
- if (TRACER.isEnabled())
- {
- TRACER.trace("Added destination " + destination); //$NON-NLS-1$
- }
- }
-
- public void destinationRemoved(IDestination destination)
- {
- if (TRACER.isEnabled())
- {
- TRACER.trace("Removing destination " + destination); //$NON-NLS-1$
- }
-
- doDestinationRemoved((ServerDestination)destination);
- if (TRACER.isEnabled())
- {
- TRACER.trace("Removed destination " + destination); //$NON-NLS-1$
- }
- }
-
- public void consumerAdded(IServerConsumer consumer)
- {
- if (TRACER.isEnabled())
- {
- TRACER.trace("Adding consumer " + consumer); //$NON-NLS-1$
- }
-
- doConsumerAdded((ServerConsumer)consumer);
- if (TRACER.isEnabled())
- {
- TRACER.trace("Added consumer " + consumer); //$NON-NLS-1$
- }
- }
-
- public void consumerRemoved(IServerConsumer consumer)
- {
- if (TRACER.isEnabled())
- {
- TRACER.trace("Removing consumer " + consumer); //$NON-NLS-1$
- }
-
- doConsumerRemoved((ServerConsumer)consumer);
- if (TRACER.isEnabled())
- {
- TRACER.trace("Removed consumer " + consumer); //$NON-NLS-1$
- }
- }
-
- public void messageReceived(Message message)
- {
- if (TRACER.isEnabled())
- {
- TRACER.trace("Logging received message " + message); //$NON-NLS-1$
- }
-
- doMessageReceived((MessageImpl)message);
- if (TRACER.isEnabled())
- {
- TRACER.trace("Logged received message " + message); //$NON-NLS-1$
- }
- }
-
- public void messageSent(Message message, long consumerID)
- {
- if (TRACER.isEnabled())
- {
- TRACER.trace("Logging sent message " + message); //$NON-NLS-1$
- }
-
- doMessageSent((MessageImpl)message, consumerID);
- if (TRACER.isEnabled())
- {
- TRACER.trace("Logged sent message " + message); //$NON-NLS-1$
- }
- }
-
- public void messageAcknowledged(Message message, long consumerID)
- {
- if (TRACER.isEnabled())
- {
- TRACER.trace("Logging acknowledged message " + message); //$NON-NLS-1$
- }
-
- doMessageAcknowledged((MessageImpl)message, consumerID);
- if (TRACER.isEnabled())
- {
- TRACER.trace("Logged acknowledged message " + message); //$NON-NLS-1$
- }
- }
-
- protected abstract String[] doGetDestinationNames();
-
- protected abstract ServerDestination doGetDestination(String name);
-
- protected abstract long[] doGetConsumerIDs();
-
- protected abstract ServerConsumer doGetConsumer(long id);
-
- protected abstract void doDestinationAdded(ServerDestination destination);
-
- protected abstract void doDestinationRemoved(ServerDestination destination);
-
- protected abstract void doConsumerAdded(ServerConsumer consumer);
-
- protected abstract void doConsumerRemoved(ServerConsumer consumer);
-
- protected abstract void doMessageReceived(MessageImpl message);
-
- protected abstract void doMessageSent(MessageImpl message, long consumerID);
-
- protected abstract void doMessageAcknowledged(MessageImpl message, long consumerID);
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.store;
+
+import org.eclipse.net4j.internal.jms.MessageImpl;
+import org.eclipse.net4j.jms.internal.server.ServerConsumer;
+import org.eclipse.net4j.jms.internal.server.ServerDestination;
+import org.eclipse.net4j.jms.internal.server.bundle.OM;
+import org.eclipse.net4j.jms.server.IDestination;
+import org.eclipse.net4j.jms.server.IServerConsumer;
+import org.eclipse.net4j.jms.server.IStoreTransaction;
+import org.eclipse.net4j.util.om.trace.ContextTracer;
+
+import javax.jms.Message;
+
+/**
+ * @author Eike Stepper
+ */
+public abstract class AbstractTransaction implements IStoreTransaction
+{
+ public static final String[] NO_DESTINATION_NAMES = new String[0];
+
+ public static final long[] NO_CONSUMER_IDS = new long[0];
+
+ private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG_STORE, AbstractTransaction.class);
+
+ private AbstractStore store;
+
+ public AbstractTransaction(AbstractStore store)
+ {
+ this.store = store;
+ }
+
+ public AbstractStore getStore()
+ {
+ return store;
+ }
+
+ public String[] getDestinationNames()
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Getting destination names"); //$NON-NLS-1$
+ }
+
+ String[] names = doGetDestinationNames();
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Got destination names " + names); //$NON-NLS-1$
+ }
+
+ return names;
+ }
+
+ public ServerDestination getDestination(String name)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Getting destination " + name); //$NON-NLS-1$
+ }
+
+ ServerDestination destination = doGetDestination(name);
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Got destination " + destination); //$NON-NLS-1$
+ }
+
+ return destination;
+ }
+
+ public long[] getConsumerIDs()
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Getting consumer IDs"); //$NON-NLS-1$
+ }
+
+ long[] ids = doGetConsumerIDs();
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Got consumer IDs " + ids); //$NON-NLS-1$
+ }
+
+ return ids;
+ }
+
+ public ServerConsumer getConsumer(long id)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Getting consumer " + id); //$NON-NLS-1$
+ }
+
+ ServerConsumer consumer = doGetConsumer(id);
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Got consumer " + consumer); //$NON-NLS-1$
+ }
+
+ return consumer;
+ }
+
+ public void destinationAdded(IDestination destination)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Adding destination " + destination); //$NON-NLS-1$
+ }
+
+ doDestinationAdded((ServerDestination)destination);
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Added destination " + destination); //$NON-NLS-1$
+ }
+ }
+
+ public void destinationRemoved(IDestination destination)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Removing destination " + destination); //$NON-NLS-1$
+ }
+
+ doDestinationRemoved((ServerDestination)destination);
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Removed destination " + destination); //$NON-NLS-1$
+ }
+ }
+
+ public void consumerAdded(IServerConsumer consumer)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Adding consumer " + consumer); //$NON-NLS-1$
+ }
+
+ doConsumerAdded((ServerConsumer)consumer);
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Added consumer " + consumer); //$NON-NLS-1$
+ }
+ }
+
+ public void consumerRemoved(IServerConsumer consumer)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Removing consumer " + consumer); //$NON-NLS-1$
+ }
+
+ doConsumerRemoved((ServerConsumer)consumer);
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Removed consumer " + consumer); //$NON-NLS-1$
+ }
+ }
+
+ public void messageReceived(Message message)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Logging received message " + message); //$NON-NLS-1$
+ }
+
+ doMessageReceived((MessageImpl)message);
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Logged received message " + message); //$NON-NLS-1$
+ }
+ }
+
+ public void messageSent(Message message, long consumerID)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Logging sent message " + message); //$NON-NLS-1$
+ }
+
+ doMessageSent((MessageImpl)message, consumerID);
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Logged sent message " + message); //$NON-NLS-1$
+ }
+ }
+
+ public void messageAcknowledged(Message message, long consumerID)
+ {
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Logging acknowledged message " + message); //$NON-NLS-1$
+ }
+
+ doMessageAcknowledged((MessageImpl)message, consumerID);
+ if (TRACER.isEnabled())
+ {
+ TRACER.trace("Logged acknowledged message " + message); //$NON-NLS-1$
+ }
+ }
+
+ protected abstract String[] doGetDestinationNames();
+
+ protected abstract ServerDestination doGetDestination(String name);
+
+ protected abstract long[] doGetConsumerIDs();
+
+ protected abstract ServerConsumer doGetConsumer(long id);
+
+ protected abstract void doDestinationAdded(ServerDestination destination);
+
+ protected abstract void doDestinationRemoved(ServerDestination destination);
+
+ protected abstract void doConsumerAdded(ServerConsumer consumer);
+
+ protected abstract void doConsumerRemoved(ServerConsumer consumer);
+
+ protected abstract void doMessageReceived(MessageImpl message);
+
+ protected abstract void doMessageSent(MessageImpl message, long consumerID);
+
+ protected abstract void doMessageAcknowledged(MessageImpl message, long consumerID);
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/NOOPStore.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/NOOPStore.java
index 9fd8b71f73..9f6ed285c5 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/NOOPStore.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/NOOPStore.java
@@ -1,40 +1,40 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.store;
-
-import org.eclipse.net4j.jms.server.IStoreTransaction;
-
-/**
- * @author Eike Stepper
- */
-public class NOOPStore extends AbstractStore
-{
- private static final String STORE_TYPE = "NOOP"; //$NON-NLS-1$
-
- public NOOPStore()
- {
- super(STORE_TYPE);
- setInstanceID(STORE_TYPE);
- }
-
- public IStoreTransaction startTransaction()
- {
- return new NOOPTransaction(this);
- }
-
- public void commitTransaction(IStoreTransaction transaction)
- {
- }
-
- public void rollbackTransaction(IStoreTransaction transaction)
- {
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.store;
+
+import org.eclipse.net4j.jms.server.IStoreTransaction;
+
+/**
+ * @author Eike Stepper
+ */
+public class NOOPStore extends AbstractStore
+{
+ private static final String STORE_TYPE = "NOOP"; //$NON-NLS-1$
+
+ public NOOPStore()
+ {
+ super(STORE_TYPE);
+ setInstanceID(STORE_TYPE);
+ }
+
+ public IStoreTransaction startTransaction()
+ {
+ return new NOOPTransaction(this);
+ }
+
+ public void commitTransaction(IStoreTransaction transaction)
+ {
+ }
+
+ public void rollbackTransaction(IStoreTransaction transaction)
+ {
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/NOOPTransaction.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/NOOPTransaction.java
index 87c17f853c..4e7bd0d6cc 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/NOOPTransaction.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/NOOPTransaction.java
@@ -1,85 +1,85 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.store;
-
-import org.eclipse.net4j.internal.jms.MessageImpl;
-import org.eclipse.net4j.jms.internal.server.ServerConsumer;
-import org.eclipse.net4j.jms.internal.server.ServerDestination;
-
-/**
- * @author Eike Stepper
- */
-public class NOOPTransaction extends AbstractTransaction
-{
- public NOOPTransaction(AbstractStore store)
- {
- super(store);
- }
-
- @Override
- protected String[] doGetDestinationNames()
- {
- return NO_DESTINATION_NAMES;
- }
-
- @Override
- protected ServerDestination doGetDestination(String name)
- {
- return null;
- }
-
- @Override
- protected long[] doGetConsumerIDs()
- {
- return NO_CONSUMER_IDS;
- }
-
- @Override
- protected ServerConsumer doGetConsumer(long id)
- {
- return null;
- }
-
- @Override
- protected void doDestinationAdded(ServerDestination destination)
- {
- }
-
- @Override
- protected void doDestinationRemoved(ServerDestination destination)
- {
- }
-
- @Override
- protected void doConsumerAdded(ServerConsumer consumer)
- {
- }
-
- @Override
- protected void doConsumerRemoved(ServerConsumer consumer)
- {
- }
-
- @Override
- protected void doMessageReceived(MessageImpl message)
- {
- }
-
- @Override
- protected void doMessageSent(MessageImpl message, long consumerID)
- {
- }
-
- @Override
- protected void doMessageAcknowledged(MessageImpl message, long consumerID)
- {
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.store;
+
+import org.eclipse.net4j.internal.jms.MessageImpl;
+import org.eclipse.net4j.jms.internal.server.ServerConsumer;
+import org.eclipse.net4j.jms.internal.server.ServerDestination;
+
+/**
+ * @author Eike Stepper
+ */
+public class NOOPTransaction extends AbstractTransaction
+{
+ public NOOPTransaction(AbstractStore store)
+ {
+ super(store);
+ }
+
+ @Override
+ protected String[] doGetDestinationNames()
+ {
+ return NO_DESTINATION_NAMES;
+ }
+
+ @Override
+ protected ServerDestination doGetDestination(String name)
+ {
+ return null;
+ }
+
+ @Override
+ protected long[] doGetConsumerIDs()
+ {
+ return NO_CONSUMER_IDS;
+ }
+
+ @Override
+ protected ServerConsumer doGetConsumer(long id)
+ {
+ return null;
+ }
+
+ @Override
+ protected void doDestinationAdded(ServerDestination destination)
+ {
+ }
+
+ @Override
+ protected void doDestinationRemoved(ServerDestination destination)
+ {
+ }
+
+ @Override
+ protected void doConsumerAdded(ServerConsumer consumer)
+ {
+ }
+
+ @Override
+ protected void doConsumerRemoved(ServerConsumer consumer)
+ {
+ }
+
+ @Override
+ protected void doMessageReceived(MessageImpl message)
+ {
+ }
+
+ @Override
+ protected void doMessageSent(MessageImpl message, long consumerID)
+ {
+ }
+
+ @Override
+ protected void doMessageAcknowledged(MessageImpl message, long consumerID)
+ {
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/StoreException.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/StoreException.java
index 909844761f..a4a5b80a18 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/StoreException.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/store/StoreException.java
@@ -1,38 +1,38 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.internal.server.store;
-
-/**
- * @author Eike Stepper
- */
-public class StoreException extends RuntimeException
-{
- private static final long serialVersionUID = 1L;
-
- public StoreException()
- {
- }
-
- public StoreException(String message)
- {
- super(message);
- }
-
- public StoreException(Throwable cause)
- {
- super(cause);
- }
-
- public StoreException(String message, Throwable cause)
- {
- super(message, cause);
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.internal.server.store;
+
+/**
+ * @author Eike Stepper
+ */
+public class StoreException extends RuntimeException
+{
+ private static final long serialVersionUID = 1L;
+
+ public StoreException()
+ {
+ }
+
+ public StoreException(String message)
+ {
+ super(message);
+ }
+
+ public StoreException(Throwable cause)
+ {
+ super(cause);
+ }
+
+ public StoreException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IConnection.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IConnection.java
index f91b54e0ad..6ee6b78bcd 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IConnection.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IConnection.java
@@ -1,25 +1,25 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.server;
-
-/**
- * @author Eike Stepper
- */
-public interface IConnection
-{
- public IServer getServer();
-
- public String getUserName();
-
- public ISession openSession(int sessionID);
-
- public ISession getSession(int sessionID);
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.server;
+
+/**
+ * @author Eike Stepper
+ */
+public interface IConnection
+{
+ public IServer getServer();
+
+ public String getUserName();
+
+ public ISession openSession(int sessionID);
+
+ public ISession getSession(int sessionID);
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IDestination.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IDestination.java
index 14d34cb671..450922cf03 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IDestination.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IDestination.java
@@ -1,29 +1,29 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.server;
-
-/**
- * @author Eike Stepper
- */
-public interface IDestination
-{
- public String getName();
-
- public Type getType();
-
- /**
- * @author Eike Stepper
- */
- public enum Type
- {
- QUEUE, TOPIC;
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.server;
+
+/**
+ * @author Eike Stepper
+ */
+public interface IDestination
+{
+ public String getName();
+
+ public Type getType();
+
+ /**
+ * @author Eike Stepper
+ */
+ public enum Type
+ {
+ QUEUE, TOPIC;
+ }
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IServer.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IServer.java
index 20f54cb727..b55ffc4e72 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IServer.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IServer.java
@@ -1,25 +1,25 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.server;
-
-import org.eclipse.net4j.jms.internal.server.Server;
-
-/**
- * @author Eike Stepper
- */
-public interface IServer
-{
- public static final IServer INSTANCE = Server.INSTANCE;
-
- public IDestination createDestination(String name, IDestination.Type type);
-
- public IConnection logon(String userName, String password);
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.server;
+
+import org.eclipse.net4j.jms.internal.server.Server;
+
+/**
+ * @author Eike Stepper
+ */
+public interface IServer
+{
+ public static final IServer INSTANCE = Server.INSTANCE;
+
+ public IDestination createDestination(String name, IDestination.Type type);
+
+ public IConnection logon(String userName, String password);
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IServerConsumer.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IServerConsumer.java
index 0f3e92dec0..e882972e2f 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IServerConsumer.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IServerConsumer.java
@@ -1,34 +1,34 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.server;
-
-import org.eclipse.net4j.protocol.IProtocol;
-
-/**
- * @author Eike Stepper
- * @since 2.0
- */
-public interface IServerConsumer
-{
- public long getID();
-
- public IDestination getDestination();
-
- public String getMessageSelector();
-
- public ISession getSession();
-
- public IProtocol<?> getProtocol();
-
- public boolean isNoLocal();
-
- public boolean isDurable();
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.server;
+
+import org.eclipse.net4j.protocol.IProtocol;
+
+/**
+ * @author Eike Stepper
+ * @since 2.0
+ */
+public interface IServerConsumer
+{
+ public long getID();
+
+ public IDestination getDestination();
+
+ public String getMessageSelector();
+
+ public ISession getSession();
+
+ public IProtocol<?> getProtocol();
+
+ public boolean isNoLocal();
+
+ public boolean isDurable();
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/ISession.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/ISession.java
index ab28d2892a..6a17ab5acd 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/ISession.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/ISession.java
@@ -1,21 +1,21 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.server;
-
-/**
- * @author Eike Stepper
- */
-public interface ISession
-{
- public IConnection getConnection();
-
- public int getID();
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.server;
+
+/**
+ * @author Eike Stepper
+ */
+public interface ISession
+{
+ public IConnection getConnection();
+
+ public int getID();
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IStore.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IStore.java
index 872f4ea94c..4805633157 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IStore.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IStore.java
@@ -1,27 +1,27 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.server;
-
-/**
- * @author Eike Stepper
- */
-public interface IStore
-{
- public String getStoreType();
-
- public String getInstanceID();
-
- public IStoreTransaction startTransaction();
-
- public void commitTransaction(IStoreTransaction transaction);
-
- public void rollbackTransaction(IStoreTransaction transaction);
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.server;
+
+/**
+ * @author Eike Stepper
+ */
+public interface IStore
+{
+ public String getStoreType();
+
+ public String getInstanceID();
+
+ public IStoreTransaction startTransaction();
+
+ public void commitTransaction(IStoreTransaction transaction);
+
+ public void rollbackTransaction(IStoreTransaction transaction);
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IStoreTransaction.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IStoreTransaction.java
index 9e93fe51ce..cd4e5df896 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IStoreTransaction.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/IStoreTransaction.java
@@ -1,68 +1,68 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.server;
-
-import javax.jms.Message;
-
-/**
- * @author Eike Stepper
- */
-public interface IStoreTransaction
-{
- public String[] getDestinationNames();
-
- /**
- * @since 2.0
- */
- public IDestination getDestination(String name);
-
- public long[] getConsumerIDs();
-
- /**
- * @since 2.0
- */
- public IServerConsumer getConsumer(long id);
-
- /**
- * @since 2.0
- */
- public void destinationAdded(IDestination destination);
-
- /**
- * @since 2.0
- */
- public void destinationRemoved(IDestination destination);
-
- /**
- * @since 2.0
- */
- public void consumerAdded(IServerConsumer consumer);
-
- /**
- * @since 2.0
- */
- public void consumerRemoved(IServerConsumer consumer);
-
- /**
- * @since 2.0
- */
- public void messageReceived(Message message);
-
- /**
- * @since 2.0
- */
- public void messageSent(Message message, long consumerID);
-
- /**
- * @since 2.0
- */
- public void messageAcknowledged(Message message, long consumerID);
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.server;
+
+import javax.jms.Message;
+
+/**
+ * @author Eike Stepper
+ */
+public interface IStoreTransaction
+{
+ public String[] getDestinationNames();
+
+ /**
+ * @since 2.0
+ */
+ public IDestination getDestination(String name);
+
+ public long[] getConsumerIDs();
+
+ /**
+ * @since 2.0
+ */
+ public IServerConsumer getConsumer(long id);
+
+ /**
+ * @since 2.0
+ */
+ public void destinationAdded(IDestination destination);
+
+ /**
+ * @since 2.0
+ */
+ public void destinationRemoved(IDestination destination);
+
+ /**
+ * @since 2.0
+ */
+ public void consumerAdded(IServerConsumer consumer);
+
+ /**
+ * @since 2.0
+ */
+ public void consumerRemoved(IServerConsumer consumer);
+
+ /**
+ * @since 2.0
+ */
+ public void messageReceived(Message message);
+
+ /**
+ * @since 2.0
+ */
+ public void messageSent(Message message, long consumerID);
+
+ /**
+ * @since 2.0
+ */
+ public void messageAcknowledged(Message message, long consumerID);
+}
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/JMSServerUtil.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/JMSServerUtil.java
index 358ee734ed..39c1a95e69 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/JMSServerUtil.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/server/JMSServerUtil.java
@@ -1,37 +1,37 @@
-/*
- * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.jms.server;
-
-import org.eclipse.net4j.jms.internal.server.protocol.JMSServerProtocolFactory;
-import org.eclipse.net4j.jms.internal.server.protocol.admin.JMSAdminServerProtocolFactory;
-import org.eclipse.net4j.jms.internal.server.store.NOOPStore;
-import org.eclipse.net4j.util.container.IManagedContainer;
-
-/**
- * @author Eike Stepper
- */
-public final class JMSServerUtil
-{
- private JMSServerUtil()
- {
- }
-
- public static void prepareContainer(IManagedContainer container)
- {
- container.registerFactory(new JMSServerProtocolFactory());
- container.registerFactory(new JMSAdminServerProtocolFactory());
- }
-
- public static IStore createNOOPStore()
- {
- return new NOOPStore();
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.jms.server;
+
+import org.eclipse.net4j.jms.internal.server.protocol.JMSServerProtocolFactory;
+import org.eclipse.net4j.jms.internal.server.protocol.admin.JMSAdminServerProtocolFactory;
+import org.eclipse.net4j.jms.internal.server.store.NOOPStore;
+import org.eclipse.net4j.util.container.IManagedContainer;
+
+/**
+ * @author Eike Stepper
+ */
+public final class JMSServerUtil
+{
+ private JMSServerUtil()
+ {
+ }
+
+ public static void prepareContainer(IManagedContainer container)
+ {
+ container.registerFactory(new JMSServerProtocolFactory());
+ container.registerFactory(new JMSAdminServerProtocolFactory());
+ }
+
+ public static IStore createNOOPStore()
+ {
+ return new NOOPStore();
+ }
+}

Back to the top