diff --git a/jonas_doc/.gitignore b/.gitignore similarity index 100% rename from jonas_doc/.gitignore rename to .gitignore diff --git a/jonas_doc/.project b/.project similarity index 100% rename from jonas_doc/.project rename to .project diff --git a/jonas_doc/README b/README similarity index 100% rename from jonas_doc/README rename to README diff --git a/jonas_doc/build.properties b/build.properties similarity index 100% rename from jonas_doc/build.properties rename to build.properties diff --git a/jonas_doc/build.xml b/build.xml similarity index 100% rename from jonas_doc/build.xml rename to build.xml diff --git a/jonas/.checkstyle b/jonas/.checkstyle deleted file mode 100644 index f197dee3b2985b4886e60f749981148fca2f5634..0000000000000000000000000000000000000000 --- a/jonas/.checkstyle +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/jonas/.checkstyle_eclipse_config b/jonas/.checkstyle_eclipse_config deleted file mode 100644 index 8bfd33c209e4fa7869217784415138409449c7c8..0000000000000000000000000000000000000000 --- a/jonas/.checkstyle_eclipse_config +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas/.classpath b/jonas/.classpath deleted file mode 100644 index 9ffa8fbde5e4ff7f8b76558bbf90a9c4c4e1fbf6..0000000000000000000000000000000000000000 --- a/jonas/.classpath +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas/.gitignore b/jonas/.gitignore deleted file mode 100644 index 015586ae374341e1fef5db7b6fd0150cf41ee97f..0000000000000000000000000000000000000000 --- a/jonas/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -# Maven -# ----------------------------------- -target/ - -# IntelliJ Idea -# ----------------------------------- -.idea/ -*.iml -*.iws - -# Eclipse -# ----------------------------------- -.settings/ -.classpath -.project diff --git a/jonas/.project b/jonas/.project deleted file mode 100644 index 0af046e72851bde528da952fb1012dda7c9e719c..0000000000000000000000000000000000000000 --- a/jonas/.project +++ /dev/null @@ -1,29 +0,0 @@ - - - jonas - - - - - - org.maven.ide.eclipse.maven2Builder - - - - - org.eclipse.jdt.core.javabuilder - - - - - com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder - - - - - - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature - com.atlassw.tools.eclipse.checkstyle.CheckstyleNature - - diff --git a/jonas/.settings/org.eclipse.jdt.core.prefs b/jonas/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 1d81c0f75250b331ee2008f75319e7e33dd21899..0000000000000000000000000000000000000000 --- a/jonas/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,268 +0,0 @@ -#Tue Aug 17 09:56:30 CEST 2010 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 -org.eclipse.jdt.core.formatter.align_type_members_on_columns=false -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_assignment=0 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 -org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 -org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 -org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 -org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 -org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 -org.eclipse.jdt.core.formatter.blank_lines_after_package=1 -org.eclipse.jdt.core.formatter.blank_lines_before_field=1 -org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 -org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 -org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 -org.eclipse.jdt.core.formatter.blank_lines_before_method=1 -org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 -org.eclipse.jdt.core.formatter.blank_lines_before_package=0 -org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 -org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 -org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true -org.eclipse.jdt.core.formatter.comment.format_block_comments=true -org.eclipse.jdt.core.formatter.comment.format_header=false -org.eclipse.jdt.core.formatter.comment.format_html=true -org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true -org.eclipse.jdt.core.formatter.comment.format_line_comments=true -org.eclipse.jdt.core.formatter.comment.format_source_code=true -org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false -org.eclipse.jdt.core.formatter.comment.indent_root_tags=true -org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=do not insert -org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert -org.eclipse.jdt.core.formatter.comment.line_length=80 -org.eclipse.jdt.core.formatter.compact_else_if=true -org.eclipse.jdt.core.formatter.continuation_indentation=2 -org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 -org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true -org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true -org.eclipse.jdt.core.formatter.indent_empty_lines=false -org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true -org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false -org.eclipse.jdt.core.formatter.indentation.size=4 -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert -org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false -org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false -org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false -org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false -org.eclipse.jdt.core.formatter.lineSplit=128 -org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false -org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false -org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 -org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 -org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true -org.eclipse.jdt.core.formatter.tabulation.char=space -org.eclipse.jdt.core.formatter.tabulation.size=4 -org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true diff --git a/jonas/.settings/org.eclipse.jdt.ui.prefs b/jonas/.settings/org.eclipse.jdt.ui.prefs deleted file mode 100644 index 9d0ec048565ca0dd4f88634e2e4270f9f07dd19d..0000000000000000000000000000000000000000 --- a/jonas/.settings/org.eclipse.jdt.ui.prefs +++ /dev/null @@ -1,57 +0,0 @@ -#Wed Sep 17 14:43:57 CEST 2008 -eclipse.preferences.version=1 -editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true -formatter_profile=_JOnAS formatter -formatter_settings_version=11 -org.eclipse.jdt.ui.text.custom_code_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_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=false -sp_cleanup.format_source_code=false -sp_cleanup.format_source_code_changes_only=false -sp_cleanup.make_local_variable_final=false -sp_cleanup.make_parameters_final=true -sp_cleanup.make_private_fields_final=false -sp_cleanup.make_type_abstract_if_missing_method=false -sp_cleanup.make_variable_declarations_final=true -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=false -sp_cleanup.remove_unused_imports=false -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=false -sp_cleanup.use_this_for_non_static_field_access=false -sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true -sp_cleanup.use_this_for_non_static_method_access=false -sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/jonas/.settings/org.maven.ide.eclipse.prefs b/jonas/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 89f176d02203d9e140f9fded0de2d8accd54eccf..0000000000000000000000000000000000000000 --- a/jonas/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,9 +0,0 @@ -#Wed Sep 16 13:07:40 CEST 2009 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=true -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -skipCompilerPlugin=true -version=1 diff --git a/jonas/LicenceAgreement.txt b/jonas/LicenceAgreement.txt deleted file mode 100644 index 678c6921d59838dd7d9240be016e05f877d261f1..0000000000000000000000000000000000000000 --- a/jonas/LicenceAgreement.txt +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/jonas/README b/jonas/README deleted file mode 100644 index fded334f952d14c2972020c154c6d8b312aab10d..0000000000000000000000000000000000000000 --- a/jonas/README +++ /dev/null @@ -1,6 +0,0 @@ - ==================== - How to compile JOnAS - ==================== - -Here is how to build JOnAS 5: - http://wiki.jonas.ow2.org/xwiki/bin/view/Doc/BuildingJOnAS5 \ No newline at end of file diff --git a/jonas/ReleaseNotes.txt b/jonas/ReleaseNotes.txt deleted file mode 100644 index b2a5e1f23aa77dfc3af98ba758f1abf40bbaaa67..0000000000000000000000000000000000000000 --- a/jonas/ReleaseNotes.txt +++ /dev/null @@ -1,2 +0,0 @@ -Release Notes of JOnAS 5.2 are available online -on the JOnAS web site: http://wiki.jonas.ow2.org diff --git a/jonas/assemblies/binaries/pom.xml b/jonas/assemblies/binaries/pom.xml deleted file mode 100644 index e92a12214e57ea085bb152f2b7c26becf79f4ffe..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/pom.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - org.ow2.jonas - assemblies - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas.assemblies - binaries - JOnAS :: Assemblies :: Binaries - - - - - - src/main/resources - true - - - - - \ No newline at end of file diff --git a/jonas/assemblies/binaries/src/main/resources/bin/ClientStubGen b/jonas/assemblies/binaries/src/main/resources/bin/ClientStubGen deleted file mode 100644 index c9bc686a3582f0048fc3e508951bd9f7949b6a99..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/ClientStubGen +++ /dev/null @@ -1,50 +0,0 @@ -#! /bin/sh -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 1999-2008 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# Initial developer(s): Philippe Durieux -# Contributor(s): ______________________________________. -# -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -# Check JONAS_ROOT is set. -if [ ! -d $JONAS_ROOT/deploy ] -then - echo "JONAS_ROOT must be set" - exit 1 -fi - -# Set CLASSPATH and JONAS_BASE -. $JONAS_ROOT/bin/setenv - -JAVA_OPTS="$JAVA_OPTS \ - -Djonas.root=$JONAS_ROOT \ - -Djonas.base=$JONAS_BASE \ - -Djava.security.manager \ - -Djava.security.policy=$JONAS_BASE/conf/java.policy \ - -Djava.endorsed.dirs=$JONAS_ROOT/lib/endorsed \ -" - -# add /client-bootstrap.jar to the classpath for the bootstrap class -JONAS_CLASSPATH=$JONAS_CLASSPATH$SPS$JONAS_ROOT/lib/bootstrap/client-bootstrap.jar$SPS$JONAS_ROOT/lib/jonas-generators-clientstubs.jar$SPS$JONAS_ROOT/lib/client.jar - -$JAVA -cp $JONAS_CLASSPATH $JAVA_OPTS org.ow2.jonas.client.boot.Bootstrap org.ow2.jonas.generators.genclientstub.ClientStubGen "$@" diff --git a/jonas/assemblies/binaries/src/main/resources/bin/ClientStubGen.bat b/jonas/assemblies/binaries/src/main/resources/bin/ClientStubGen.bat deleted file mode 100755 index 30e27fb92fc4b871549c5aaed4357aea57cee639..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/ClientStubGen.bat +++ /dev/null @@ -1,50 +0,0 @@ -@ECHO OFF -REM --------------------------------------------------------------------------- -REM JOnAS: Java(TM) Open Application Server -REM Copyright (C) 1999-2008 Bull S.A.S. -REM Contact: jonas-team@ow2.org -REM -REM This library is free software; you can redistribute it and/or -REM modify it under the terms of the GNU Lesser General Public -REM License as published by the Free Software Foundation; either -REM version 2.1 of the License, or any later version. -REM -REM This library is distributed in the hope that it will be useful, -REM but WITHOUT ANY WARRANTY; without even the implied warranty of -REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -REM Lesser General Public License for more details. -REM -REM You should have received a copy of the GNU Lesser General Public -REM License along with this library; if not, write to the Free Software -REM Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -REM USA -REM -REM Initial developer(s): Guillaume Sauthier -REM -REM --------------------------------------------------------------------------- -REM $Id$ -REM --------------------------------------------------------------------------- - -SET JONAS_LIB=%JONAS_ROOT%\lib - -if ["%JONAS_ROOT%"]==[""] Goto RootIsNotSetError - -CALL "%JONAS_ROOT%\bin\setenv.bat" -ECHO JONAS_BASE is set to %JONAS_BASE% - -SET JONAS_OPTS=-Djonas.root="%JONAS_ROOT%" -SET JONAS_OPTS=%JONAS_OPTS% -Djonas.base="%JONAS_BASE%" -SET JONAS_OPTS=%JONAS_OPTS% -Djava.security.manager -Djava.security.policy="%JONAS_BASE%\conf\java.policy" -SET JONAS_OPTS=%JONAS_OPTS% -Djava.endorsed.dirs="%JONAS_ROOT%\lib\endorsed" - -REM add ow_jonas_bootstrap.jar to the classpath for the bootstrap class -SET JONAS_CLASSPATH=%JONAS_CLASSPATH%;%JONAS_ROOT%\lib\bootstrap\client-bootstrap.jar;%JONAS_ROOT%\lib\jonas-generators-clientstubs.jar;%JONAS_ROOT%\lib\client.jar - -%JAVA% -cp "%JONAS_CLASSPATH%" %JONAS_OPTS% org.ow2.jonas.client.boot.Bootstrap org.ow2.jonas.generators.genclientstub.ClientStubGen %* -GOTO End - -:RootIsNotSetError -ECHO "JONAS_ROOT must be set" -GOTO End - -:End diff --git a/jonas/assemblies/binaries/src/main/resources/bin/GenIC b/jonas/assemblies/binaries/src/main/resources/bin/GenIC deleted file mode 100644 index 7facbef5bb97afe012816226aef97e79c6a414b5..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/GenIC +++ /dev/null @@ -1,50 +0,0 @@ -#! /bin/sh -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 1999-2008 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# Initial developer(s): Philippe Durieux -# Contributor(s): ______________________________________. -# -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -# Check JONAS_ROOT is set. -if [ ! -d $JONAS_ROOT/deploy ] -then - echo "JONAS_ROOT must be set" - exit 1 -fi - -# Set CLASSPATH and JONAS_BASE -. $JONAS_ROOT/bin/setenv - -JAVA_OPTS="$JAVA_OPTS \ - -Djonas.root=$JONAS_ROOT \ - -Djonas.base=$JONAS_BASE \ - -Djava.security.manager \ - -Djava.security.policy=$JONAS_BASE/conf/java.policy \ - -Djava.endorsed.dirs=$JONAS_ROOT/lib/endorsed \ -" - -# add /client-bootstrap.jar to the classpath for the bootstrap class -JONAS_CLASSPATH=$JONAS_CLASSPATH$SPS$JONAS_ROOT/lib/bootstrap/client-bootstrap.jar$SPS$JONAS_ROOT/lib/client.jar - -$JAVA -cp $JONAS_CLASSPATH $JAVA_OPTS org.ow2.jonas.client.boot.Bootstrap org.ow2.jonas.generators.genic.GenIC "$@" diff --git a/jonas/assemblies/binaries/src/main/resources/bin/GenIC.bat b/jonas/assemblies/binaries/src/main/resources/bin/GenIC.bat deleted file mode 100755 index dca492634541cc30390c7892da0bf2de8ceac5f4..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/GenIC.bat +++ /dev/null @@ -1,51 +0,0 @@ -@Echo Off - -Rem --------------------------------------------------------------------------- -Rem JOnAS: Java(TM) Open Application Server -Rem Copyright (C) 1999-2008 Bull S.A.S. -Rem Contact: jonas-team@ow2.org -Rem -Rem This library is free software; you can redistribute it and/or -Rem modify it under the terms of the GNU Lesser General Public -Rem License as published by the Free Software Foundation; either -Rem version 2.1 of the License, or any later version. -Rem -Rem This library is distributed in the hope that it will be useful, -Rem but WITHOUT ANY WARRANTY; without even the implied warranty of -Rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Rem Lesser General Public License for more details. -Rem -Rem You should have received a copy of the GNU Lesser General Public -Rem License along with this library; if not, write to the Free Software -Rem Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -Rem USA -Rem -Rem --------------------------------------------------------------------------- -Rem $Id$ -Rem --------------------------------------------------------------------------- - -setlocal - -call "%JONAS_ROOT%\bin\setenv.bat" -echo JONAS_BASE is set to %JONAS_BASE% - -rem Check environment variables: -if ["%JONAS_ROOT%"]==[""] goto setRoot - -set JONAS_CLASSPATH=%JONAS_CLASSPATH%;%JONAS_ROOT%\lib\bootstrap\client-bootstrap.jar;%JONAS_ROOT%\lib\client.jar - -:set_opts -set JONAS_OPTS=-Djonas.root="%JONAS_ROOT%" -set JONAS_OPTS=%JONAS_OPTS% -Djonas.base="%JONAS_BASE%" -set JONAS_OPTS=%JONAS_OPTS% -Djava.security.manager -Djava.security.policy="%JONAS_BASE%\conf\java.policy" -set JONAS_OPTS=%JONAS_OPTS% -Djava.endorsed.dirs="%JONAS_ROOT%\lib\endorsed" - -%JAVA% -cp "%JONAS_CLASSPATH%" %JONAS_OPTS% org.ow2.jonas.client.boot.Bootstrap org.ow2.jonas.generators.genic.GenIC %* -goto end - -:setRoot -@echo "JONAS_ROOT must be set" -goto end - -:end - diff --git a/jonas/assemblies/binaries/src/main/resources/bin/JmsServer b/jonas/assemblies/binaries/src/main/resources/bin/JmsServer deleted file mode 100644 index cc4a4e3a89cee234d770eead5e89b5068d297e8f..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/JmsServer +++ /dev/null @@ -1,54 +0,0 @@ -#! /bin/sh -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 1999-2008 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# Initial developer(s): Philippe Durieux -# Contributor(s): ______________________________________. -# -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -# Check JONAS_ROOT is set. -if [ ! -d $JONAS_ROOT/deploy ] -then - echo "JONAS_ROOT must be set" - exit 1 -fi - -# Set CLASSPATH and JONAS_BASE -. $JONAS_ROOT/bin/setenv - - -JAVA_OPTS="$JAVA_OPTS \ - -Djonas.root=$JONAS_ROOT \ - -Djonas.base=$JONAS_BASE \ - -Djava.security.manager \ - -Djava.security.policy=$JONAS_BASE/conf/java.policy \ - -Djava.endorsed.dirs=$JONAS_ROOT/lib/endorsed \ - -DTransaction=fr.dyade.aaa.util.NullTransaction \ - -Dfr.dyade.aaa.agent.A3CONF_DIR=$JONAS_BASE/conf \ -" -# add /client-bootstrap.jar to the classpath for the bootstrap class -JONAS_CLASSPATH=$JONAS_CLASSPATH$SPS$JONAS_ROOT/lib/bootstrap/client-bootstrap.jar - -$JAVA -cp $JONAS_CLASSPATH $JAVA_OPTS org.ow2.jonas.client.boot.Bootstrap fr.dyade.aaa.agent.AgentServer 0 ./s0 "$@" - - diff --git a/jonas/assemblies/binaries/src/main/resources/bin/JmsServer.bat b/jonas/assemblies/binaries/src/main/resources/bin/JmsServer.bat deleted file mode 100755 index 544fdf565fee7d0101e0425dbe3b7e0f41ac1514..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/JmsServer.bat +++ /dev/null @@ -1,48 +0,0 @@ -@Echo Off - -Rem --------------------------------------------------------------------------- -Rem JOnAS: Java(TM) Open Application Server -Rem Copyright (C) 1999-2008 Bull S.A.S. -Rem Contact: jonas-team@ow2.org -Rem -Rem This library is free software; you can redistribute it and/or -Rem modify it under the terms of the GNU Lesser General Public -Rem License as published by the Free Software Foundation; either -Rem version 2.1 of the License, or any later version. -Rem -Rem This library is distributed in the hope that it will be useful, -Rem but WITHOUT ANY WARRANTY; without even the implied warranty of -Rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Rem Lesser General Public License for more details. -Rem -Rem You should have received a copy of the GNU Lesser General Public -Rem License along with this library; if not, write to the Free Software -Rem Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -Rem USA -Rem -Rem Initial developer(s): Philippe Durieux -Rem Contributor(s): -Rem -Rem --------------------------------------------------------------------------- -Rem $Id$ -Rem --------------------------------------------------------------------------- - -Rem Check environment variables: -if not ["%JONAS_ROOT%"]==[""] Goto Run -@echo "JONAS_ROOT must be set" -Goto End - -:Run -call "%JONAS_ROOT%\bin\setenv.bat" - -set JAVA_OPTS=%JAVA_OPTS% -Djonas.root="%JONAS_ROOT%" -set JAVA_OPTS=%JAVA_OPTS% -Djonas.base="%JONAS_BASE%" -set JAVA_OPTS=%JAVA_OPTS% -Djava.security.manager -set JAVA_OPTS=%JAVA_OPTS% -Djava.security.policy="%JONAS_BASE%\conf\java.policy" -set JAVA_OPTS=%JAVA_OPTS% -Djava.endorsed.dirs="%JONAS_ROOT%\lib\endorsed" -set JAVA_OPTS=%JAVA_OPTS% -DTransaction=fr.dyade.aaa.util.NullTransaction -set JAVA_OPTS=%JAVA_OPTS% -Dfr.dyade.aaa.agent.A3CONF_DIR="%JONAS_BASE%\conf" - -%JAVA% %JAVA_OPTS% -cp "%JONAS_ROOT%\lib\bootstrap\client-bootstrap.jar" org.ow2.jonas.client.boot.Bootstrap fr.dyade.aaa.agent.AgentServer 0 .\s0 %1 %2 %3 %4 %5 %6 %7 %8 %9 - -:End diff --git a/jonas/assemblies/binaries/src/main/resources/bin/RAConfig b/jonas/assemblies/binaries/src/main/resources/bin/RAConfig deleted file mode 100644 index ed2a72ea0abc7ffd026378361b662e50afcc2bb9..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/RAConfig +++ /dev/null @@ -1,50 +0,0 @@ -#! /bin/sh -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 1999-2008 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# Initial developer(s): Philippe Durieux -# Contributor(s): ______________________________________. -# -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -# Check JONAS_ROOT is set. -if [ ! -d $JONAS_ROOT/deploy ] -then - echo "JONAS_ROOT must be set" - exit 1 -fi - -# Set CLASSPATH and JONAS_BASE -. $JONAS_ROOT/bin/setenv - -JAVA_OPTS="$JAVA_OPTS \ - -Djonas.root=$JONAS_ROOT \ - -Djonas.base=$JONAS_BASE \ - -Djava.security.manager \ - -Djava.security.policy=$JONAS_BASE/conf/java.policy \ - -Djava.endorsed.dirs=$JONAS_ROOT/lib/endorsed \ -" - -# add /client-bootstrap.jar to the classpath for the bootstrap class -JONAS_CLASSPATH=$JONAS_CLASSPATH$SPS$JONAS_ROOT/lib/bootstrap/client-bootstrap.jar$SPS$JONAS_ROOT/lib/jonas-generators-raconfig.jar$SPS$JONAS_ROOT/lib/client.jar - -$JAVA -cp $JONAS_CLASSPATH $JAVA_OPTS org.ow2.jonas.client.boot.Bootstrap org.ow2.jonas.generators.raconfig.RAConfig "$@" diff --git a/jonas/assemblies/binaries/src/main/resources/bin/RAConfig.bat b/jonas/assemblies/binaries/src/main/resources/bin/RAConfig.bat deleted file mode 100755 index 5b39668146d6db8a35153c40714725aed73b73f1..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/RAConfig.bat +++ /dev/null @@ -1,54 +0,0 @@ -@Echo Off - -Rem --------------------------------------------------------------------------- -Rem JOnAS: Java(TM) Open Application Server -Rem Copyright (C) 1999-2008 Bull S.A.S. -Rem Contact: jonas-team@ow2.org -Rem -Rem This library is free software; you can redistribute it and/or -Rem modify it under the terms of the GNU Lesser General Public -Rem License as published by the Free Software Foundation; either -Rem version 2.1 of the License, or any later version. -Rem -Rem This library is distributed in the hope that it will be useful, -Rem but WITHOUT ANY WARRANTY; without even the implied warranty of -Rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Rem Lesser General Public License for more details. -Rem -Rem You should have received a copy of the GNU Lesser General Public -Rem License along with this library; if not, write to the Free Software -Rem Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -Rem USA -Rem -Rem Initial developer(s): Benoit Pelletier -Rem -Rem --------------------------------------------------------------------------- -Rem $Id$ -Rem --------------------------------------------------------------------------- - -setlocal - -Rem Check environment variables: -if ["%JONAS_ROOT%"]==[""] Goto SetRoot -call "%JONAS_ROOT%\bin\setenv.bat" - -Rem --------------------------------------------------------------------------- -Rem Set JAVA_OPTS -Rem --------------------------------------------------------------------------- -Set JAVA_OPTS=%JAVA_OPTS% -Djonas.root="%JONAS_ROOT%" -Set JAVA_OPTS=%JAVA_OPTS% -Djonas.base="%JONAS_BASE%" -Set JAVA_OPTS=%JAVA_OPTS% -Djava.security.manager -Djava.security.policy="%JONAS_BASE%\conf\java.policy" -Set JAVA_OPTS=%JAVA_OPTS% -Djava.endorsed.dirs="%JONAS_ROOT%\lib\endorsed" - -Set JONAS_CLASSPATH=%JONAS_ROOT%\lib\bootstrap\client-bootstrap.jar;%JONAS_CLASSPATH% -Set JONAS_CLASSPATH=%JONAS_ROOT%\lib\jonas-generators-raconfig.jar;%JONAS_CLASSPATH% -Set JONAS_CLASSPATH=%JONAS_ROOT%\lib\client.jar;%JONAS_CLASSPATH% - -%JAVA% -cp "%JONAS_CLASSPATH%" %JAVA_OPTS% org.ow2.jonas.client.boot.Bootstrap org.ow2.jonas.generators.raconfig.RAConfig %1 %2 %3 %4 %5 %6 %7 %8 %9 -Goto End - -:SetRoot -@echo "JONAS_ROOT must be set" -Goto End - -:End diff --git a/jonas/assemblies/binaries/src/main/resources/bin/WsGen b/jonas/assemblies/binaries/src/main/resources/bin/WsGen deleted file mode 100644 index 0666f0b28121b8ba8f3b773e1835df5eef751161..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/WsGen +++ /dev/null @@ -1,50 +0,0 @@ -#! /bin/sh -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 1999-2008 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# Initial developer(s): Philippe Durieux -# Contributor(s): ______________________________________. -# -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -# Check JONAS_ROOT is set. -if [ ! -d $JONAS_ROOT/deploy ] -then - echo "JONAS_ROOT must be set" - exit 1 -fi - -# Set CLASSPATH and JONAS_BASE -. $JONAS_ROOT/bin/setenv - -JAVA_OPTS="$JAVA_OPTS \ - -Djonas.root=$JONAS_ROOT \ - -Djonas.base=$JONAS_BASE \ - -Djava.security.manager \ - -Djava.security.policy=$JONAS_BASE/conf/java.policy \ - -Djava.endorsed.dirs=$JONAS_ROOT/lib/endorsed \ -" - -# add /client-bootstrap.jar to the classpath for the bootstrap class -JONAS_CLASSPATH=$JONAS_CLASSPATH$SPS$JONAS_ROOT/lib/bootstrap/client-bootstrap.jar$SPS$JONAS_ROOT/lib/client.jar - -$JAVA -cp $JONAS_CLASSPATH $JAVA_OPTS org.ow2.jonas.client.boot.Bootstrap org.ow2.jonas.generators.wsgen.WsGen "$@" diff --git a/jonas/assemblies/binaries/src/main/resources/bin/WsGen.bat b/jonas/assemblies/binaries/src/main/resources/bin/WsGen.bat deleted file mode 100755 index 60712346cd4df827082389bde11efc1e0985bbb8..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/WsGen.bat +++ /dev/null @@ -1,53 +0,0 @@ -@Echo Off - -Rem --------------------------------------------------------------------------- -Rem JOnAS: Java(TM) Open Application Server -Rem Copyright (C) 1999-2008 Bull S.A.S. -Rem Contact: jonas-team@ow2.org -Rem -Rem This library is free software; you can redistribute it and/or -Rem modify it under the terms of the GNU Lesser General Public -Rem License as published by the Free Software Foundation; either -Rem version 2.1 of the License, or any later version. -Rem -Rem This library is distributed in the hope that it will be useful, -Rem but WITHOUT ANY WARRANTY; without even the implied warranty of -Rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Rem Lesser General Public License for more details. -Rem -Rem You should have received a copy of the GNU Lesser General Public -Rem License along with this library; if not, write to the Free Software -Rem Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -Rem USA -Rem -Rem Initial developer(s): Guillaume Sauthier -Rem Contributor(s): -Rem -Rem --------------------------------------------------------------------------- -Rem $Id$ -Rem --------------------------------------------------------------------------- - -setlocal - -Rem Check environment variables: -if ["%JONAS_ROOT%"]==[""] Goto SetRoot - -call "%JONAS_ROOT%\bin\setenv.bat" -echo JONAS_BASE is set to %JONAS_BASE% - -Set JAVA_OPTS=%JAVA_OPTS% -Djonas.root="%JONAS_ROOT%" -Set JAVA_OPTS=%JAVA_OPTS% -Djonas.base="%JONAS_BASE%" -Set JAVA_OPTS=%JAVA_OPTS% -Djava.security.manager -Djava.security.policy="%JONAS_BASE%\conf\java.policy" -Set JAVA_OPTS=%JAVA_OPTS% -Djava.endorsed.dirs="%JONAS_ROOT%\lib\endorsed" - -Set JONAS_CLASSPATH=%JONAS_CLASSPATH%;%JONAS_ROOT%\lib\bootstrap\client-bootstrap.jar;%JONAS_ROOT%\lib\client.jar - -%JAVA% -cp "%JONAS_CLASSPATH%" %JAVA_OPTS% org.ow2.jonas.client.boot.Bootstrap org.ow2.jonas.generators.wsgen.WsGen %1 %2 %3 %4 %5 %6 %7 %8 %9 -Goto End - -:SetRoot -@echo "JONAS_ROOT must be set" -Goto End - -:End - diff --git a/jonas/assemblies/binaries/src/main/resources/bin/jcl.bash b/jonas/assemblies/binaries/src/main/resources/bin/jcl.bash deleted file mode 100644 index 504109ed418697c664f9e8ec79e78fa9f5807508..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/jcl.bash +++ /dev/null @@ -1,582 +0,0 @@ -#!/bin/bash -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 2006-2009 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# Initial developer(s) 4.8.2: Jerome Pioux - Benoit Pelletier -# -# Modifications for 4.8.3 -# ----------------------- -# Jerome - 10/17/2006 -# - Make this bash script to work for ksh. ie: -# (first line may need to be altered on some sites)... -# * change all with -# * Add a prefix (Do) in the start,stop,kill,status function names -# * Other modifications are flagged as Jerome - 10/17/2006 in the code -# -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -# Status|Start|Stop|Kill JONAS cluster node(s) -# Usage: cl [-n ] [status] | < [-f] kill | [-d] start | stop >" - -# If XWINDOWS=yes or YES exists in the user env., then use -win on startup -XWINDOWS=${XWINDOWS:-no} - -# Default values -JCL_NUMBER_OF_NODES=${JCL_NUMBER_OF_NODES:-40} -JCL_BASE_PREFIX=${JCL_BASE_PREFIX:-$JCL_CLUSTER_DAEMON_DIR/jb} -JCL_DOMAIN_NAME=${JCL_DOMAIN_NAME:-sampleClusterDomain} -JCL_EAR_FILE=${JCL_EAR_FILE:-$JONAS_ROOT/examples/cluster-j2ee14/output/apps/sampleCluster2.ear} -JCL_HA_EAR_FILE=${JCL_HA_EAR_FILE:-$JONAS_ROOT/examples/cluster-j2ee14/output/apps/haTransactions.ear} -JCL_JAVAEE5_EAR_FILE=${JCL_JAVAEE5_EAR_FILE:-$JONAS_ROOT/examples/cluster-javaee5/output/apps/sampleCluster3.ear} -JCL_NODE_NAME_PREFIX=${JCL_NODE_NAME_PREFIX:-node} -JCL_CLUSTER_DAEMON_DIR=${JCL_CLUSTER_DAEMON_DIR:-cd} -JCL_DB_DIR=${JCL_DB_DIR:-db} -JCL_DB_NAME=${JCL_DB_NAME:-db} -JCL_MASTER_DIR=${JCL_MASTER_DIR:-master} -JCL_MASTER_NAME=${JCL_MASTER_NAME:-master} - -# ------------------------------------------ -# NO NEED TO MODIFY ANYTHING BELOW THIS LINE -# ------------------------------------------ -JCL_BASE_DEBUG_PORT=${JCL_BASE_DEBUG_PORT:-414} - -# Delay in seconds to apply between nodes startup/shutdown -DELAY1_AFTER_NODE_START=20 -DELAY2_AFTER_NODE_START=3 -DELAY_BETWEEN_NODE_STOP=1 - -CLUSTER="" -jonasbase="" -typeset -i nnodes=0 -typeset -i wholeCluster=0 -osname=`uname -s` - - -# ------ -# ATEXIT -# ------ -atexit() -{ - printf "\n" -} - -# ----- -# USAGE -# ----- -usage() -{ - printf "\n" - printf "usage: $(basename $0) [ [-n ] [status]] | < [-f] kill | [-d] start | stop > ]\n" - printf "\n" - printf " With node_id: clusterd (or cd), $JCL_MASTER_NAME (or ms), $JCL_DB_NAME \n" - printf " With node_number: node number of JOnAS instances which corresponds to the suffix of the node name\n" - printf " * Form1: Multiple nodes can be specified between commas (no space)\n" - printf " * Form2: Range(s) can be entered using a dash between node numbers (no space)\n" - printf " * Any combination between form1 and form2 is allowed\n" - printf " Ex: -n $JCL_DB_NAME,1-3 applies to the $JCL_DB_NAME node and nodes 1,2 and 3\n" - printf " Notes:\n" - printf " * Do not specify -n or use -nall to address all nodes in the cluster\n" - printf " * A node number for your cluster must be between 1 and $JCL_NUMBER_OF_NODES\n" - printf "\n" - printf " Use \"export XWINDOWS=yes\" if you want to start the JVMs in dedicated xterms\n"; - printf "\n" - exit 1 -} - -# --------- -# DOPADDING -# --------- -DoPadding() -{ - # Use to align fields on the screen - typeset -i m1=$1 - typeset -i m2=$2 - typeset -i p=m2-m1 - - typeset -i i=1 - while [[ $i -le $p ]]; do - printf " " - i=i+1 - done - printf " " - return -} - -# ------------ -# SETJONASBASE -# ------------ -SetJonasBase() -{ - # Do not add any echo or printf in this routine - # besides the one before the return - case $1 in - clusterd) - base=$JCL_CLUSTER_DAEMON_DIR - ;; - $JCL_MASTER_NAME) - base=$JCL_MASTER_DIR - ;; - $JCL_DB_NAME) - base=$JCL_DB_DIR - ;; - *) - # Jerome - 10/17/2006 - char pos in string doesn't work in ksh - #typeset -i l=${#JCL_NODE_NAME_PREFIX} - #base=$JCL_BASE_PREFIX${node:$l} - base=$JCL_BASE_PREFIX${node#*$JCL_NODE_NAME_PREFIX} - ;; - esac - echo $base - return -} - -# ---------- -# SETCLUSTER -# ---------- -SetCluster() -{ -str=${1:-all} -typeset -i n=1 - -# --- All nodes -# We are in control so order nodes "startup-ready" -if [[ $str = 0 || $str = all ]]; then - wholeCluster=1 - cluster="clusterd $JCL_DB_NAME $JCL_MASTER_NAME" - while [[ $n -le $JCL_NUMBER_OF_NODES ]]; do - cluster="$cluster $JCL_NODE_NAME_PREFIX$n" - n=n+1 - done - CLUSTER=${cluster#\ *} - return -fi - -# --- Partial nodes list -# Respect order chosen by user -typeset -i err=0 -typeset -i numnode -OLDIFS=$IFS - -# For nodes between commas -IFS=, -for substr in $str; do - n="$(expr $substr : '.*-')" - - # No dash-formed node - if [[ $n -eq 0 ]]; then - # Non numeric node - if ( echo "$substr" | grep -q [^[:digit:]] ); then - # Abbrev. - [[ $substr = cd ]] && substr=clusterd - [[ $substr = ms ]] && substr=$JCL_MASTER_NAME - if [[ $substr != clusterd && - $substr != $JCL_MASTER_NAME && - $substr != $JCL_DB_NAME ]]; then - err=1 - fi - cluster="$cluster $substr" - # Numeric - else - numnode=$substr - # numnode must be less then JCL_NUMBER_OF_NODES - [[ $numnode -gt $JCL_NUMBER_OF_NODES ]] && err=1 - cluster="$cluster $JCL_NODE_NAME_PREFIX$substr" - fi - - # dash-formed node - else - n1=${substr%%-*} - n2=${substr##*-} - # Both dash-formed nodes must be numeric - if ( echo "$n1" | grep -q [^[:digit:]] || - echo "$n2" | grep -q [^[:digit:]] ); then - err=1 - else - typeset -i i=$n1 && typeset -i imax=$n2 - # First dash-formed node must be less or equal the second - # which in turn must be less then JCL_NUMBER_OF_NODES - [[ $i -gt $imax || $imax -gt $JCL_NUMBER_OF_NODES ]] && err=1 - while [[ $i -le $imax ]]; do - cluster="$cluster $JCL_NODE_NAME_PREFIX$i" - i=i+1 - done - fi - fi -done -IFS=$OLDIFS - -# Remove heading space if any -cluster=${cluster#\ *} - -# Raise error on duplicates -if [[ $err -eq 0 ]]; then - for node1 in $cluster; do - n=0 - for node2 in $cluster; do - [[ $node1 = $node2 ]] && n=n+1 - done - [[ $n -gt 1 ]] && err=1 && break - done -fi - -# Error - empty cluster -[[ $err -eq 1 ]] && cluster="" -CLUSTER=$cluster -return -} - -# --------------- -# CLUSTER DAEMON -# --------------- -ClusterDaemon() -{ - case ${1:-na} in - start) - printf "\n\n*** Starting JOnAS cluster daemon ... \n" - # Jerome - 10/17/2006 - Change regex below for ksh support - #if [[ $XWINDOWS =~ '[Yy][Ee][Ss]' ]]; then - if [[ $XWINDOWS = [Yy][Ee][Ss] ]]; then - xterm -title $HOSTNAME:clusterd -geometry 110x16 -sb -e jclusterd start & - else - jclusterd start & - fi - sleep $DELAY2_AFTER_NODE_START - ;; - - stop) - echo -e "\n\n*** Stopping JOnAS cluster daemon ..." - jclusterd stop - sleep $DELAY_BETWEEN_NODE_STOP - ;; - esac - return -} - -# ------- -# SOSTART -# ------- -Dostart() -{ - typeset -i delay - typeset -i n=1 - - # Jerome - 10/17/2006 - Change regex below for ksh support - #[[ $XWINDOWS =~ '[Yy][Ee][Ss]' ]] && WIN="-win" || WIN="" - [[ $XWINDOWS = [Yy][Ee][Ss] ]] && WIN="-win" || WIN="" - - # Startup cluster; If we are in control of the whole cluster, the nodes - # are already in the correct order for startup - for node in $CLUSTER; do - jonasbase=$(SetJonasBase $node) - export JONAS_BASE=$jonasbase - DBG="" - OSGI="" - - # Set debug and startup delay - case $node in - clusterd) - ClusterDaemon start - continue - ;; - master | db) - delay=$DELAY1_AFTER_NODE_START - [[ $CLEAN = true ]] && OSGI="-clean" - [[ $DEV = true ]] && OSGI="$OSGI -dev" - [[ $GUI = true ]] && OSGI="$OSGI -gui" - ;; - *) - delay=$DELAY2_AFTER_NODE_START - # Jerome - 10/17/2006 - char pos in string doesn't work in ksh - #typeset -i l=${#node} - #[[ $DEBUG = true ]] && DBG="-debug -p $JCL_BASE_DEBUG_PORT${node:$l}" - [[ $DEBUG = true ]] && DBG="-debug -p $JCL_BASE_DEBUG_PORT${node#*$JCL_NODE_NAME_PREFIX}" - [[ $CLEAN = true ]] && OSGI="-clean" - [[ $DEV = true ]] && OSGI="$OSGI -dev" - [[ $GUI = true ]] && OSGI="$OSGI -gui" - ;; - esac - - - - # Save and clean up logs - rm -rf $JONAS_BASE/logs/old/* - mkdir -p $JONAS_BASE/logs/old - mv $JONAS_BASE/logs/* $JONAS_BASE/logs/old 2>/dev/null - - case $node in - node1 | node2 | node3 | node4) - if [[ "$JCL_EAR_FILE" != "NULL" && -f $JCL_EAR_FILE ]]; then - cp $JCL_EAR_FILE $JONAS_BASE/deploy 2>/dev/null - fi - if [[ "$JCL_HA_EAR_FILE" != "NULL" && -f $JCL_HA_EAR_FILE ]]; then - cp $JCL_HA_EAR_FILE $JONAS_BASE/deploy 2>/dev/null - fi - if [[ "$JCL_JAVAEE5_EAR_FILE" != "NULL" && -f $JCL_JAVAEE5_EAR_FILE ]]; then - cp $JCL_JAVAEE5_EAR_FILE $JONAS_BASE/deploy 2>/dev/null - fi - ;; - esac - - cmd="jonas start $OSGI $WIN $DBG -n $node -Ddomain.name=$JCL_DOMAIN_NAME" - printf "\n\n*** Starting JOnAS $node instance ... \n($cmd)\n" - $cmd - - # Wait delay seconds between nodes startup - if [[ $n -lt $nnodes && $WIN = "-win" ]]; then - printf "\n\tWaiting ${delay}s before starting next node ..." - sleep $delay - fi - n=n+1 - done - return -} - -# ------ -# DOSTOP -# ------ -Dostop() -{ - typeset -i delay=$DELAY_BETWEEN_NODE_STOP - - # Stop cluster; If we are in control of the whole cluster, the nodes - # are in the correct order for startup which is the reverse order of - # how we would like to stop them; so let's build a "reverse" cluster - if [[ $wholeCluster -eq 1 ]]; then - for node in $CLUSTER; do - cluster2="$node $cluster2" - done - CLUSTER=$cluster2 - fi - - # Stop cluster - for node in $CLUSTER; do - jonasbase=$(SetJonasBase $node) - export JONAS_BASE=$jonasbase - export CATALINA_BASE=$JONAS_BASE - - if [[ $node = clusterd ]]; then - ClusterDaemon stop - continue - fi - - cmd="jonas stop -n $node" - printf "\n\n*** Stopping JOnAS $node instance ...\n($cmd)\n" - $cmd - - sleep $delay - done - return -} - -# ------ -# DOKILL -# ------ -Dokill() -{ - # Kill cluster - for node in $CLUSTER; do - - # flegare+vma - little adaptation to make it run under solaris: - # this ps does not truncate its output to 80 chars but does not accept - # the '-o' param - if [[ $osname = "SunOS" ]]; then - pid=$(/usr/ucb/ps aww | grep $strToMatch | grep -v grep | cut -d' ' -f2) - else - if [[ $osname = "HP-UX" ]]; then - pid=$(ps -efx | grep $strToMatch | grep -v grep | awk '{ print $2 }') - else - # Jerome - 10/17/2006 - Make ps formatting variables to please AIX and LINUX - proc=$(ps -$psfmt "%p|%a" | grep Djonas.name=$node | grep -v grep | sed -e 's/ *//g') - # Jerome - 10/17/2006 - The pipe below must be protected in ksh - pid=${proc%%\|*} - fi - fi - - if [[ ! -z $pid ]]; then - cmd="/bin/kill -$force $pid" - printf "\n*** Killing JOnAS $node instance ...\n($cmd)\n" - $cmd - fi - done - return -} - -# -------- -# DOSTATUS -# -------- -Dostatus() -{ - typeset -i l - typeset -i lnode - typeset -i ljonasbase - typeset -i maxlnode=0 - typeset -i maxljonasbase=0 - - # Get longest strings length - # (to use in field alignment for display below) - for node in $CLUSTER; do - jonasbase=$(SetJonasBase $node) - - lnode=${#node} - ljonasbase=${#jonasbase} - [[ $lnode -gt $maxlnode ]] && maxlnode=$lnode - [[ $ljonasbase -gt $maxljonasbase ]] && maxljonasbase=$ljonasbase - done - - printf "\n" - - # Display status - for node in $CLUSTER; do - jonasbase=$(SetJonasBase $node) - - lnode=${#node} - ljonasbase=${#jonasbase} - - printf " node=%-s" $node - DoPadding $lnode $maxlnode - - printf "base=%-s" $jonasbase - DoPadding $ljonasbase $maxljonasbase - - printf "%0.s-> " - - if [[ $node = clusterd ]]; then - strToMatch=ClusterDaemon - else - strToMatch=Djonas.name=$node - fi - - # flegare+vma - little adaptation to make it run under solaris: - # this ps does not truncate its output to 80 chars but does not accept - # the '-o' param - if [[ $osname = "SunOS" ]]; then - pid=$(/usr/ucb/ps aww | grep $strToMatch | grep -v grep | cut -d' ' -f2) - else - if [[ $osname = "HP-UX" ]]; then - pid=$(ps -efx | grep $strToMatch | grep -v grep | awk '{ print $2 }') - else - # Jerome - 10/17/2006 - Make ps formatting variables to please AIX and LINUX - proc=$(ps -$psfmt "%p|%a" | grep Djonas.name=$node | grep -v grep | sed -e 's/ *//g') - # Jerome - 10/17/2006 - The pipe below must be protected in ksh - pid=${proc%%\|*} - fi - fi - - if [[ ! -z $pid ]]; then - printf "running [$pid]\n" - else - printf "not running\n" - fi - done - return -} - -# ----- -# MAIN -# ----- -trap "atexit" exit - -# Jerome - 10/17/2006 -# On AIX, the ww is not supported (and not needed) -if [[ $(uname -s) = AIX ]]; then - XTERM=aixterm - psfmt=eo -else - XTERM=xterm - psfmt=ewwo -fi - -typeset -i n -typeset -i force=15 -debug=false -clean=false -dev=false - -# Show stopper -if [[ ! -n $JONAS_ROOT ]]; then - printf "$0: JONAS_ROOT is not defined\n" - exit 2 -fi -if ( ! echo $PATH | grep $JONAS_ROOT/bin >/dev/null 2>&1 ) then - printf "$0: JONAS_ROOT/bin is not in your PATH\n" - exit 3 -fi - -# Read inputs -if [[ $# -ne 0 ]]; then - # linux/bash help way - [[ "$1" = --help ]] && usage - - while getopts ?cegfhn:d c - do - case $c in - # Nodes - n) - node=$OPTARG - ;; - f) - force=9 - ;; - d) - DEBUG=true - ;; - c) - CLEAN=true - ;; - e) - DEV=true - ;; - g) - GUI=true - ;; - *) - usage - ;; - esac - done - shift `expr $OPTIND - 1` - action="$@" -fi - -# Define the cluster -SetCluster $node -if [[ -z $CLUSTER ]]; then - printf "$0: illegal -n parameters\n" - usage -else - # Remember the number of nodes in the cluster - for node in $CLUSTER; do - nnodes=nnodes+1 - done -fi - -# Do the action -[[ "$action" = "" ]] && action=status -case "$action" in - start|stop|kill|status) - Do$action - ;; - *) - usage - ;; -esac -exit 0 diff --git a/jonas/assemblies/binaries/src/main/resources/bin/jcl.bat b/jonas/assemblies/binaries/src/main/resources/bin/jcl.bat deleted file mode 100755 index 95bd93b24675e1a5c0e9ee75817b3d6a05d1ead9..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/jcl.bat +++ /dev/null @@ -1,371 +0,0 @@ -@echo off -REM --------------------------------------------------------------------------- -REM JOnAS: Java(TM) Open Application Server -REM Copyright (C) 2006-2009 Bull S.A.S. -REM Contact: jonas-team@ow2.org -REM -REM This library is free software; you can redistribute it and/or -REM modify it under the terms of the GNU Lesser General Public -REM License as published by the Free Software Foundation; either -REM version 2.1 of the License, or any later version. -REM -REM This library is distributed in the hope that it will be useful, -REM but WITHOUT ANY WARRANTY; without even the implied warranty of -REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -REM Lesser General Public License for more details. -REM -REM You should have received a copy of the GNU Lesser General Public -REM License along with this library; if not, write to the Free Software -REM Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -REM USA -REM -REM Initial developer(s): Jerome Pioux - Benoit Pelletier -REM --------------------------------------------------------------------------- -REM $Id$ -REM --------------------------------------------------------------------------- - -REM Start, Stop JONAS cluster nodes -REM Usage: jcl [-n ] start | stop - -setlocal enabledelayedexpansion - -REM ----- If SEPARATE_WINDOWS=yes or YES exists in the user env., then use -win on startup -if not defined SEPARATE_WINDOWS set SEPARATE_WINDOWS=No - -:: ------------------------------------------ -:: NO NEED TO MODIFY ANYTHING BELOW THIS LINE -:: ------------------------------------------ - -REM ----- Delay in seconds to apply between nodes startup/shutdown -set /a DELAY1_AFTER_NODE_START=10 -set /a DELAY2_AFTER_NODE_START=4 -set /a DELAY_BETWEEN_NODE_STOP=1 - -REM ----- Set defaults if this script is called directly w/o the script wrapper -if "%JCL_NUMBER_OF_NODES%"=="" set JCL_NUMBER_OF_NODES=4 -if "%JCL_BASE_PREFIX%"=="" set JCL_BASE_PREFIX=%JCL_CLUSTER_DAEMON_DIR%\jb -if "%JCL_DOMAIN_NAME%"=="" set JCL_DOMAIN_NAME=sampleClusterDomain -if "%JCL_NODE_NAME_PREFIX%"=="" set JCL_NODE_NAME_PREFIX=node -if "%JCL_CLUSTER_DAEMON_DIR%"=="" set JCL_CLUSTER_DAEMON_DIR=cd -if "%JCL_DB_DIR%"=="" set JCL_DB_DIR=db -if "%JCL_DB_NAME%"=="" set JCL_DB_NAME=db -if "%JCL_MASTER_DIR%"=="" set JCL_MASTER_DIR=master -if "%JCL_MASTER_NAME%"=="" set JCL_MASTER_NAME=master - -REM ----- Defined list of supported actions -set /a numberOfCommands=2 -set actionTable[1]=start -set actionTable[2]=stop - -REM ----- CHECK if JONAS_ROOT is set -if not defined JONAS_ROOT ( - echo. - echo Error: JONAS_ROOT is not defined - goto endScript -) - -REM Set bin directory -set BIN=%JONAS_ROOT%\bin - -REM ----- Need findstr -findstr /? >nul 2>&1 -if errorlevel 1 ( - echo. - echo Error: findstr is not available! - goto endScript -) - -REM ----- Help wanted the "dos cmdline way" -if "%1X"=="/?X" goto usage - -REM ----- Parse input parameters -set /a nflag=0 -set /a err=0 -set cluster= -set action= - -for %%i in (%*) do ( - REM ----- err=3: Command syntax error - if defined action if %err% equ 0 set /a err=3 - - REM ----- There is an error, break out of the parser - if !err! equ 1 goto endParsing - - set param=%%i - - REM ----- Param starts with a dash - if /I "!param:~0,1!"=="-" ( - set /a nflag=0 - set key=!param:~1,2! - REM ----- Found -n flag to customize cluster nodes - if /I "!key!"=="n" ( - set /a nflag=1 - REM ----- err=1: Invalid flag - ) else ( - if %err% equ 0 set /a err=1 - ) - - REM ----- Param does not start with a dash - ) else ( - REM ----- Param is following up the -n flag - if !nflag! equ 1 ( - REM ----- See if param is a known action - for /l %%c in (1,1,%numberOfCommands%) do ( - REM ----- param is an action, register it and turn off the nflag - if /I !param! equ !actionTable[%%c]! ( - set action=!param! - set /a nflag=0 - ) - ) - REM ----- param was not an action, so it is a node - enter it in cluster - if !nflag! equ 1 ( - call :IsNumeric !param! answer - if "!answer!"=="yes" ( - if !param! GTR %JCL_NUMBER_OF_NODES% if %err% equ 0 set /a err=4 - set param=%JCL_NODE_NAME_PREFIX%!param! - ) - if defined cluster (set cluster=!cluster!,!param!) else (set cluster=!param!) - ) - - REM ----- Param is not following up the -n - ) else ( - REM ----- See if param is a known action - for /l %%c in (1,1,%numberOfCommands%) do ( - REM ----- param is an action, register it and turn on the done flag - if /I !param! equ !actionTable[%%c]! ( - set action=!param! - set /a done=1 - ) - ) - REM ----- err=2: Invalid action specified - if !done! equ 0 if %err% equ 0 set /a err=2 - ) - ) -) -:endParsing - -REM ----- err=2: No action specified -if %err% equ 0 if not defined action set /a err=2 - -REM ----- Work on the cluster nodes -set wholeCluster= -if not defined cluster set wholeCluster=1 -if "%cluster%"=="all" set wholeCluster=1 -if "%cluster%"=="0" set wholeCluster=1 - -if defined wholeCluster ( - set cluster=clusterd,db,master - for /l %%c in (1,1,%JCL_NUMBER_OF_NODES%) do ( - set cluster=!cluster!,%JCL_NODE_NAME_PREFIX%%%c - ) -) - -REM ----- report errors -if not %err% equ 0 ( - echo. - if %err% equ 1 echo Error: Invalid flag ^(-%key%^) - if %err% equ 2 echo Error: Invalid action or no action specified - if %err% equ 3 echo Error: Command syntax error - if %err% equ 4 echo Error: Node must be less than %JCL_NUMBER_OF_NODES% - goto usage -) - -REM Remember the number of nodes in the cluster -set /a nnodes=0 -for %%i in (%cluster%) do (set /a nnodes+=1) - -REM ----- Go do the work -call :%action% - -:endScript -endlocal - -REM ----- Unset variables -for /f "usebackq tokens=1-2 delims==" %%a in (`set JCL_`) do set %%a= - -echo. -exit /b 0 - -REM ------------------------------- END MAIN ------------------------------- - -REM ------------------------------ SUBROUTINES ----------------------------- -:: --------------- -:: CLUSTER DAEMON -:: --------------- -:ClusterDaemon -setlocal -set action=%1 - -if "%action%"=="start" ( - echo. - echo *** Starting JOnAS cluster daemon ... - call %BIN%\jclusterd start - call :sleep %DELAY2_AFTER_NODE_START% -) else ( -if "%action%"=="stop" ( - echo. - echo *** Stopping JOnAS cluster daemon ... - call %BIN%\jclusterd stop - call :sleep %DELAY_BETWEEN_NODE_STOP% -)) -endlocal&goto :eof - -:: --------------- -:: START -:: --------------- -:start -setlocal - -set /a n=1 - -echo %SEPARATE_WINDOWS%|findStr "[Yy][Ee][Ss]" >nul -if %errorlevel% equ 0 (set WIN=-win) else (set WIN=) - -REM ----- Startup cluster; If we are in control of the whole cluster, the nodes -REM ----- are already in the correct order for startup -for %%i in (%cluster%) do ( - set node=%%i - - call :SetJonasBase !node! base - set JONAS_BASE=!base! - set CATALINA_BASE=!JONAS_BASE! - - REM ----- Set debug and startup delay - if /I "!node!"=="clusterd" ( - call :ClusterDaemon start - ) else ( - - if /I "!node!"=="master" ( - set /a delay=%DELAY1_AFTER_NODE_START% - ) else ( - if /I "!node!"=="db" ( - set /a delay=%DELAY1_AFTER_NODE_START% - ) else ( - set /a delay=%DELAY2_AFTER_NODE_START% - )) - - REM ----- Save and clean up logs - rmdir /S /Q !JONAS_BASE!\logs\old\* 2>NUL - mkdir !JONAS_BASE!\logs\old 2>NUL - xcopy /Q /Y !JONAS_BASE!\logs\* !JONAS_BASE!\logs\old >NUL - - - - echo. - echo *** Starting JOnAS !node! instance ... - echo ^(jonas start !WIN! -n !node! -Ddomain.name=%JCL_DOMAIN_NAME%^) - call %BIN%\jonas start !WIN! -n !node! -Ddomain.name=%JCL_DOMAIN_NAME% - - REM ----- Wait delay seconds between nodes startup - if !n! LSS %nnodes% ( - if /I "!WIN!"=="-win" ( - echo. - echo Waiting !%delay!s before starting next node ... - call :sleep !delay! - ) - ) - set /a n+=1 - ) -) -endlocal&goto :eof - -:: --------------- -:: STOP -:: --------------- -:stop -setlocal - -REM ----- Stop cluster; If we are in control of the whole cluster, the nodes -REM ----- are in the correct order for startup which is the reverse order of -REM ----- how we would like to stop them; so let's build a "reverse" cluster -set cluster2= -if defined wholeCluster ( - for %%i in (%cluster%) do ( - set node=%%i - if defined cluster2 (set cluster2=!node!,!cluster2!) else (set cluster2=!node!) - ) - set cluster=!cluster2! -) - -REM ----- Stop cluster -for %%i in (%cluster%) do ( - set node=%%i - - call :SetJonasBase !node! base - set JONAS_BASE=!base! - set CATALINA_BASE=!JONAS_BASE! - - if /I "!node!"=="clusterd" ( - call :ClusterDaemon stop - ) else ( - echo. - echo *** Stopping JOnAS !node! instance ... - echo ^(jonas stop -n !node!^) - call %BIN%\jonas stop -n !node! - - call :sleep %DELAY_BETWEEN_NODE_STOP% - ) -) -:endStop -endlocal&goto :eof - -:: --------------- -:: SetJonasBase -:: --------------- -:SetJonasBase -setlocal -set node=%1 - -if "%node%"=="clusterd" ( - set base=%JCL_CLUSTER_DAEMON_DIR% -)else ( -if "%node%"=="master" ( - set base=%JCL_MASTER_DIR% -) else ( -if "%node%"=="db" ( - set base=%JCL_DB_DIR% -) else ( - set /a l=%node:node=% - set base=%JCL_BASE_PREFIX%!l! -))) -endlocal&set %2=%base%&goto :eof - -:: --------------- -:: ISNUMERIC -:: --------------- -:isnumeric -setlocal -set string=%1 -REM ----- Do not consider quote if any -set string=%string:"=% -REM ----- Use findstr with reg.ex. -echo %string%|findStr "[^0-9]" >nul -set answer=no -if %errorlevel% equ 1 set answer=yes -endlocal&set %2=%answer%&goto :eof - -:: --------------- -:: SLEEP -:: --------------- -:sleep -setlocal -set delay=%1 -ping 1.1.1.1 -n 1 -w %delay%000 >nul -endlocal&goto :eof - -:: --------------- -:: USAGE -:: --------------- -:usage -echo. -echo usage: %~n0 ^[ -n ^[clusterd^],^[db^],^[master^],^[node number^],... ^] start^|stop -echo Syntax notes: -echo * At least, one space is mandatory after -n -echo * If multiple values are used after -n, they must be separated by a -echo delimiter ^(space, comma...^) or multiple -n can also be used -echo * All nodes in the cluster will be used if -n is not specified -echo. -echo Example: -n db,1,3 addresses the db, node1 and node3 instances -echo. -echo Use "set SEPARATE_WINDOWS=yes" if you want to start the JVMs in dedicated windows -goto endScript diff --git a/jonas/assemblies/binaries/src/main/resources/bin/jcl.ksh b/jonas/assemblies/binaries/src/main/resources/bin/jcl.ksh deleted file mode 100644 index 0ebf89756d08dac8d22b46c091da75ea16232894..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/jcl.ksh +++ /dev/null @@ -1,541 +0,0 @@ -#!/bin/ksh -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 2006 Bull S.A.S. -# Contact: jonas-team@objectweb.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# Initial developer(s) 4.8.2: Jerome Pioux - Benoit Pelletier -# -# Modifications for 4.8.3 -# ----------------------- -# Jerome - 10/17/2006 -# - Make this bash script to work for ksh. ie: -# (first line may need to be altered on some sites)... -# * change all with -# * Add a prefix (Do) in the start,stop,kill,status function names -# * Other modifications are flagged as Jerome - 10/17/2006 in the code -# -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -# Status|Start|Stop|Kill JONAS cluster node(s) -# Usage: cl [-n ] [status] | < [-f] kill | [-d] start | stop>" - -# If XWINDOWS=yes or YES exists in the user env., then use -win on startup -XWINDOWS=${XWINDOWS:-no} - -# Default values -JCL_NUMBER_OF_NODES=${JCL_NUMBER_OF_NODES:-40} -JCL_BASE_PREFIX=${JCL_BASE_PREFIX:-$JCL_CLUSTER_DAEMON_DIR/jb} -JCL_DOMAIN_NAME=${JCL_DOMAIN_NAME:-sampleClusterDomain} -JCL_NODE_NAME_PREFIX=${JCL_NODE_NAME_PREFIX:-node} -JCL_CLUSTER_DAEMON_DIR=${JCL_CLUSTER_DAEMON_DIR:-cd} -JCL_DB_DIR=${JCL_DB_DIR:-db} -JCL_DB_NAME=${JCL_DB_NAME:-db} -JCL_MASTER_DIR=${JCL_MASTER_DIR:-master} -JCL_MASTER_NAME=${JCL_MASTER_NAME:-master} - -# ------------------------------------------ -# NO NEED TO MODIFY ANYTHING BELOW THIS LINE -# ------------------------------------------ -JCL_BASE_DEBUG_PORT=${JCL_BASE_DEBUG_PORT:-414} - -# Delay in seconds to apply between nodes startup/shutdown -DELAY1_AFTER_NODE_START=20 -DELAY2_AFTER_NODE_START=3 -DELAY_BETWEEN_NODE_STOP=1 - -CLUSTER="" -jonasbase="" -typeset -i nnodes=0 -typeset -i wholeCluster=0 -osname=`uname -s` - - -# ------ -# ATEXIT -# ------ -atexit() -{ - printf "\n" -} - -# ----- -# USAGE -# ----- -usage() -{ - printf "\n" - printf "usage: $(basename $0) [ [-n ] [status]] | < [-f] kill | [-d] start | stop > ]\n" - printf "\n" - printf " With node_id: clusterd (or cd), $JCL_MASTER_NAME (or ms), $JCL_DB_NAME \n" - printf " With node_number: node number of JOnAS instances which corresponds to the suffix of the node name\n" - printf " * Form1: Multiple nodes can be specified between commas (no space)\n" - printf " * Form2: Range(s) can be entered using a dash between node numbers (no space)\n" - printf " * Any combination between form1 and form2 is allowed\n" - printf " Ex: -n $JCL_DB_NAME,1-3 applies to the $JCL_DB_NAME node and nodes 1,2 and 3\n" - printf " Notes:\n" - printf " * Do not specify -n or use -nall to address all nodes in the cluster\n" - printf " * A node number for your cluster must be between 1 and $JCL_NUMBER_OF_NODES\n" - printf "\n" - printf " Use \"export XWINDOWS=yes\" if you want to start the JVMs in dedicated xterms\n"; - printf "\n" - exit 1 -} - -# --------- -# DOPADDING -# --------- -DoPadding() -{ - # Use to align fields on the screen - typeset -i m1=$1 - typeset -i m2=$2 - typeset -i p=m2-m1 - - typeset -i i=1 - while [[ $i -le $p ]]; do - printf " " - i=i+1 - done - printf " " - return -} - -# ------------ -# SETJONASBASE -# ------------ -SetJonasBase() -{ - # Do not add any echo or printf in this routine - # besides the one before the return - case $1 in - clusterd) - base=$JCL_CLUSTER_DAEMON_DIR - ;; - $JCL_MASTER_NAME) - base=$JCL_MASTER_DIR - ;; - $JCL_DB_NAME) - base=$JCL_DB_DIR - ;; - *) - # Jerome - 10/17/2006 - char pos in string doesn't work in ksh - #typeset -i l=${#JCL_NODE_NAME_PREFIX} - #base=$JCL_BASE_PREFIX${node:$l} - base=$JCL_BASE_PREFIX${node#*$JCL_NODE_NAME_PREFIX} - ;; - esac - echo $base - return -} - -# ---------- -# SETCLUSTER -# ---------- -SetCluster() -{ -str=${1:-all} -typeset -i n=1 - -# --- All nodes -# We are in control so order nodes "startup-ready" -if [[ $str = 0 || $str = all ]]; then - wholeCluster=1 - cluster="clusterd $JCL_DB_NAME $JCL_MASTER_NAME" - while [[ $n -le $JCL_NUMBER_OF_NODES ]]; do - cluster="$cluster $JCL_NODE_NAME_PREFIX$n" - n=n+1 - done - CLUSTER=${cluster#\ *} - return -fi - -# --- Partial nodes list -# Respect order chosen by user -typeset -i err=0 -typeset -i numnode -OLDIFS=$IFS - -# For nodes between commas -IFS=, -for substr in $str; do - n="$(expr $substr : '.*-')" - - # No dash-formed node - if [[ $n -eq 0 ]]; then - # Non numeric node - if ( echo "$substr" | grep -q [^[:digit:]] ); then - # Abbrev. - [[ $substr = cd ]] && substr=clusterd - [[ $substr = ms ]] && substr=$JCL_MASTER_NAME - if [[ $substr != clusterd && - $substr != $JCL_MASTER_NAME && - $substr != $JCL_DB_NAME ]]; then - err=1 - fi - cluster="$cluster $substr" - # Numeric - else - numnode=$substr - # numnode must be less then JCL_NUMBER_OF_NODES - [[ $numnode -gt $JCL_NUMBER_OF_NODES ]] && err=1 - cluster="$cluster $JCL_NODE_NAME_PREFIX$substr" - fi - - # dash-formed node - else - n1=${substr%%-*} - n2=${substr##*-} - # Both dash-formed nodes must be numeric - if ( echo "$n1" | grep -q [^[:digit:]] || - echo "$n2" | grep -q [^[:digit:]] ); then - err=1 - else - typeset -i i=$n1 && typeset -i imax=$n2 - # First dash-formed node must be less or equal the second - # which in turn must be less then JCL_NUMBER_OF_NODES - [[ $i -gt $imax || $imax -gt $JCL_NUMBER_OF_NODES ]] && err=1 - while [[ $i -le $imax ]]; do - cluster="$cluster $JCL_NODE_NAME_PREFIX$i" - i=i+1 - done - fi - fi -done -IFS=$OLDIFS - -# Remove heading space if any -cluster=${cluster#\ *} - -# Raise error on duplicates -if [[ $err -eq 0 ]]; then - for node1 in $cluster; do - n=0 - for node2 in $cluster; do - [[ $node1 = $node2 ]] && n=n+1 - done - [[ $n -gt 1 ]] && err=1 && break - done -fi - -# Error - empty cluster -[[ $err -eq 1 ]] && cluster="" -CLUSTER=$cluster -return -} - -# --------------- -# CLUSTER DAEMON -# --------------- -ClusterDaemon() -{ - case ${1:-na} in - start) - printf "\n\n*** Starting JOnAS cluster daemon ... \n" - # Jerome - 10/17/2006 - Change regex below for ksh support - #if [[ $XWINDOWS =~ '[Yy][Ee][Ss]' ]]; then - if [[ $XWINDOWS = [Yy][Ee][Ss] ]]; then - xterm -title $HOSTNAME:clusterd -geometry 110x16 -sb -e jclusterd start & - else - jclusterd start & - fi - sleep $DELAY2_AFTER_NODE_START - ;; - - stop) - echo -e "\n\n*** Stopping JOnAS cluster daemon ..." - jclusterd stop - sleep $DELAY_BETWEEN_NODE_STOP - ;; - esac - return -} - -# ------- -# SOSTART -# ------- -Dostart() -{ - typeset -i delay - typeset -i n=1 - - # Jerome - 10/17/2006 - Change regex below for ksh support - #[[ $XWINDOWS =~ '[Yy][Ee][Ss]' ]] && WIN="-win" || WIN="" - [[ $XWINDOWS = [Yy][Ee][Ss] ]] && WIN="-win" || WIN="" - - # Startup cluster; If we are in control of the whole cluster, the nodes - # are already in the correct order for startup - for node in $CLUSTER; do - jonasbase=$(SetJonasBase $node) - export JONAS_BASE=$jonasbase - export CATALINA_BASE=$JONAS_BASE - DBG="" - - # Set debug and startup delay - case $node in - clusterd) - ClusterDaemon start - continue - ;; - - $JCL_MASTER_NAME | $JCL_DB_NODE) - delay=$DELAY1_AFTER_NODE_START - ;; - - *) - delay=$DELAY2_AFTER_NODE_START - # Jerome - 10/17/2006 - char pos in string doesn't work in ksh - #typeset -i l=${#node} - #[[ $DEBUG = true ]] && DBG="-debug -p $JCL_BASE_DEBUG_PORT${node:$l}" - [[ $DEBUG = true ]] && DBG="-debug -p $JCL_BASE_DEBUG_PORT${node#*$JCL_NODE_NAME_PREFIX}" - ;; - esac - - # Save and clean up logs - rm -rf $JONAS_BASE/logs/old/* - mkdir -p $JONAS_BASE/logs/old - mv $JONAS_BASE/logs/* $JONAS_BASE/logs/old 2>/dev/null - - cmd="jonas start $WIN $DBG -n $node -Ddomain.name=$JCL_DOMAIN_NAME" - printf "\n\n*** Starting JOnAS $node instance ... \n($cmd)\n" - $cmd - - # Wait delay seconds between nodes startup - if [[ $n -lt $nnodes && $WIN = "-win" ]]; then - printf "\n\tWaiting ${delay}s before starting next node ..." - sleep $delay - fi - n=n+1 - done - return -} - -# ------ -# DOSTOP -# ------ -Dostop() -{ - typeset -i delay=$DELAY_BETWEEN_NODE_STOP - - # Stop cluster; If we are in control of the whole cluster, the nodes - # are in the correct order for startup which is the reverse order of - # how we would like to stop them; so let's build a "reverse" cluster - if [[ $wholeCluster -eq 1 ]]; then - for node in $CLUSTER; do - cluster2="$node $cluster2" - done - CLUSTER=$cluster2 - fi - - # Stop cluster - for node in $CLUSTER; do - jonasbase=$(SetJonasBase $node) - export JONAS_BASE=$jonasbase - export CATALINA_BASE=$JONAS_BASE - - if [[ $node = clusterd ]]; then - ClusterDaemon stop - continue - fi - - cmd="jonas stop -n $node" - printf "\n\n*** Stopping JOnAS $node instance ...\n($cmd)\n" - $cmd - - sleep $delay - done - return -} - -# ------ -# DOKILL -# ------ -Dokill() -{ - # Kill cluster - for node in $CLUSTER; do - - # flegare+vma - little adaptation to make it run under solaris: - # this ps does not truncate its output to 80 chars but does not accept - # the '-o' param - if [[ $osname = "SunOS" ]]; then - pid=$(/usr/ucb/ps aww | grep $strToMatch | grep -v grep | cut -d' ' -f2) - else - # Jerome - 10/17/2006 - Make ps formatting variables to please AIX and LINUX - proc=$(ps -$psfmt "%p|%a" | grep Djonas.name=$node | grep -v grep | sed -e 's/ *//g') - # Jerome - 10/17/2006 - The pipe below must be protected in ksh - pid=${proc%%\|*} - fi - - if [[ ! -z $pid ]]; then - cmd="/bin/kill -$force $pid" - printf "\n*** Killing JOnAS $node instance ...\n($cmd)\n" - $cmd - fi - done - return -} - -# -------- -# DOSTATUS -# -------- -Dostatus() -{ - typeset -i l - typeset -i lnode - typeset -i ljonasbase - typeset -i maxlnode=0 - typeset -i maxljonasbase=0 - - # Get longest strings length - # (to use in field alignment for display below) - for node in $CLUSTER; do - jonasbase=$(SetJonasBase $node) - - lnode=${#node} - ljonasbase=${#jonasbase} - [[ $lnode -gt $maxlnode ]] && maxlnode=$lnode - [[ $ljonasbase -gt $maxljonasbase ]] && maxljonasbase=$ljonasbase - done - - printf "\n" - - # Display status - for node in $CLUSTER; do - jonasbase=$(SetJonasBase $node) - - lnode=${#node} - ljonasbase=${#jonasbase} - - printf " node=%-s" $node - DoPadding $lnode $maxlnode - - printf "base=%-s" $jonasbase - DoPadding $ljonasbase $maxljonasbase - - printf "%0.s-> " - - if [[ $node = clusterd ]]; then - strToMatch=ClusterDaemon - else - strToMatch=Djonas.name=$node - fi - - # flegare+vma - little adaptation to make it run under solaris: - # this ps does not truncate its output to 80 chars but does not accept - # the '-o' param - if [[ $osname = "SunOS" ]]; then - pid=$(/usr/ucb/ps aww | grep $strToMatch | grep -v grep | cut -d' ' -f2) - else - # Jerome - 10/17/2006 - Make ps formatting variables to please AIX and LINUX - proc=$(ps -$psfmt "%p|%a" | grep Djonas.name=$node | grep -v grep | sed -e 's/ *//g') - # Jerome - 10/17/2006 - The pipe below must be protected in ksh - pid=${proc%%\|*} - fi - - if [[ ! -z $pid ]]; then - printf "running [$pid]\n" - else - printf "not running\n" - fi - done - return -} - -# ----- -# MAIN -# ----- -trap "atexit" exit - -# Jerome - 10/17/2006 -# On AIX, the ww is not supported (and not needed) -if [[ $(uname -s) = AIX ]]; then - XTERM=aixterm - psfmt=eo -else - XTERM=xterm - psfmt=ewwo -fi - -typeset -i n -typeset -i force=15 -debug=false - -# Show stopper -if [[ ! -n $JONAS_ROOT ]]; then - printf "$0: JONAS_ROOT is not defined\n" - exit 2 -fi -if ( ! echo $PATH | grep $JONAS_ROOT/bin >/dev/null 2>&1 ) then - printf "$0: JONAS_ROOT/bin is not in your PATH\n" - exit 3 -fi - -# Read inputs -if [[ $# -ne 0 ]]; then - # linux/bash help way - [[ "$1" = --help ]] && usage - - while getopts ?fhn:d c - do - case $c in - # Nodes - n) - node=$OPTARG - ;; - f) - force=9 - ;; - d) - debug=true - ;; - *) - usage - ;; - esac - done - shift `expr $OPTIND - 1` - action="$@" -fi - -# Define the cluster -SetCluster $node -if [[ -z $CLUSTER ]]; then - printf "$0: illegal -n parameters\n" - usage -else - # Remember the number of nodes in the cluster - for node in $CLUSTER; do - nnodes=nnodes+1 - done -fi - -# Do the action -[[ "$action" = "" ]] && action=status -case "$action" in - start|stop|kill|status) - Do$action - ;; - *) - usage - ;; -esac -exit 0 - diff --git a/jonas/assemblies/binaries/src/main/resources/bin/jcl.sh b/jonas/assemblies/binaries/src/main/resources/bin/jcl.sh deleted file mode 100755 index 5b64827987e5cbce005938f0dc6004eaf30e3888..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/jcl.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/sh -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 2007 Bull S.A.S. -# Contact: jonas-team@objectweb.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# Initial developer(s) 4.8: Jerome Pioux -# -# -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -# jcl.ksh|bash launcher script -# Jerome - -# Recup jcl scripts location -if [ -L $0 ]; then - JCL_DIR=`dirname $(ls -l "$0" |sed "s/^.*-> //")` -else - JCL_DIR=`dirname $0` -fi - -# Check what shell is available (priority to bash) -if [ -x /bin/bash ]; then - shell=bash -elif [ -x /bin/ksh ]; then - shell=ksh -else - echo "Error: Could not find either /bin/bash or /bin/ksh" - exit 2 -fi - -# Setup appropriate script -JCL_SCP=$JCL_DIR/jcl.$shell - -# Should never see this if the install did its job -if [ ! -x $JCL_SCP ]; then - echo "Error: Could not find or execute $JCL_SCP" - exit 3 -fi - -# Runit -$JCL_SCP $* -exit 0 - diff --git a/jonas/assemblies/binaries/src/main/resources/bin/jclient b/jonas/assemblies/binaries/src/main/resources/bin/jclient deleted file mode 100644 index 1089249342a838e3b866a13a51116b89cd01e5dc..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/jclient +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/sh -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 1999-2010 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - - -# ----------------------------------------------------------------------- -# Check JONAS_ROOT is set. -# ----------------------------------------------------------------------- -if [ ! -d $JONAS_ROOT/deploy ] -then - echo "JONAS_ROOT must be set" - exit 1 -fi - -# Set CLASSPATH and JONAS_BASE -. $JONAS_ROOT/bin/setenv - - -# --------------------------------------------- -# Get args -# --------------------------------------------- -ARGS= -while [ "$#" -gt 0 ] -do case "$1" in - -cp) - shift - JONAS_CLASSPATH=$JONAS_CLASSPATH$SPS$1 - ;; - -D*) - JAVA_OPTS="$JAVA_OPTS $1" - ;; - -security) - # Use security manager for jclient - JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$JONAS_BASE/conf/java.policy" - ;; - -debug) - shift - # $1=-p - if [ "$1" != "-p" ]; then - echo "-debug mode need a following \"-p \"" - exit 1 - fi - shift - JONAS_DEBUG_PORT=$1 - JONAS_DEBUG_SUSPEND=n - if [ "$2" = "-s" ]; then - shift - shift - JONAS_DEBUG_SUSPEND=$1 - fi - echo "JOnAS Debug Info :" - echo " listening on port : $JONAS_DEBUG_PORT" - echo " suspend mode : $JONAS_DEBUG_SUSPEND" - JONAS_DEBUG_OPTS=" -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=$JONAS_DEBUG_PORT,suspend=$JONAS_DEBUG_SUSPEND" - ;; - -enable-jpa2) - JONAS_CLASSPATH=$JONAS_CLASSPATH$SPS$JONAS_ROOT/lib/bootstrap/bundles-jpa2.0/ow2-jpa-2.0-spec.jar - JONAS_CLASSPATH=$JONAS_CLASSPATH$SPS$JONAS_ROOT/repositories/maven2-internal/org/ow2/easybeans/osgi/easybeans-modules-persistence-eclipselink-2.x/${easybeans.version}/easybeans-modules-persistence-eclipselink-2.x-${easybeans.version}.jar - ;; - *) - # all other args are passed "as is" to the java program - ARGS="$ARGS $1" - ;; - esac - shift -done - -JAVA_OPTS="-Djava.security.auth.login.config=$JONAS_BASE/conf/jaas.config \ --Djava.endorsed.dirs=$JONAS_ROOT/lib/endorsed \ --Dregistry=$REGISTRY \ --Djonas.root=$JONAS_ROOT \ -$JAVA_OPTS" - - -# Add client.jar -# CLASSPATH could be upgraded here -JONAS_CLASSPATH=$JONAS_CLASSPATH$SPS$JONAS_ROOT/lib/bootstrap/client-bootstrap.jar$SPS$JONAS_ROOT/lib/jonas-client.jar$SPS$JONAS_ROOT/lib/client.jar - - -$JAVA -cp $JONAS_CLASSPATH $JAVA_OPTS $JONAS_DEBUG_OPTS org.ow2.jonas.client.boot.Bootstrap org.ow2.jonas.client.ClientContainer $ARGS - diff --git a/jonas/assemblies/binaries/src/main/resources/bin/jclient.bat b/jonas/assemblies/binaries/src/main/resources/bin/jclient.bat deleted file mode 100755 index ab450aaef43cbe30578fa1614fa168d2fd0d51d9..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/jclient.bat +++ /dev/null @@ -1,123 +0,0 @@ -@Echo off -Rem --------------------------------------------------------------------------- -Rem JOnAS: Java(TM) Open Application Server -Rem Copyright (C) 1999-2010 Bull S.A.S. -Rem Contact: jonas-team@ow2.org -Rem -Rem This library is free software; you can redistribute it and/or -Rem modify it under the terms of the GNU Lesser General Public -Rem License as published by the Free Software Foundation; either -Rem version 2.1 of the License, or any later version. -Rem -Rem This library is distributed in the hope that it will be useful, -Rem but WITHOUT ANY WARRANTY; without even the implied warranty of -Rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Rem Lesser General Public License for more details. -Rem -Rem You should have received a copy of the GNU Lesser General Public -Rem License along with this library; if not, write to the Free Software -Rem Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -Rem USA -Rem -Rem --------------------------------------------------------------------------- -Rem $Id$ -Rem --------------------------------------------------------------------------- - -Rem Keep variables local to this script -setlocal -set ARGS= - -Rem check JONAS_ROOT and JONAS_BASE -if ["%JONAS_ROOT%"]==[""] goto setroot -Rem Required for carol.properties file (add JONAS_BASE\conf to classpath) -call "%JONAS_ROOT%\bin\setenv.bat" -set JONAS_LIB=%JONAS_ROOT%\lib - -Rem check client.jar -if not exist "%JONAS_LIB%\client.jar" goto noclient - -Rem --------------------------------------------- -Rem Get args -Rem --------------------------------------------- -:loop_on_args -set VALUE=%~1 -if ["%1"]==["-cp"] goto cp_arg -if ["%1"]==["-security"] goto security -if ["%1"]==["-enable-jpa2"] goto jpa2 -if ["%1"]==["-debug"] goto debug_arg -if ["%VALUE:~0,2%"]==["-D"] goto java_opts -set ARGS=%ARGS% %1 -goto next_arg - -Rem Use security manager for jclient ? -:security -set JAVA_OPTS=%JAVA_OPTS% -Djava.security.manager -Djava.security.policy="%JONAS_BASE%\conf\java.policy" -goto next_arg - -:jpa2 -set JONAS_CLASSPATH=%JONAS_CLASSPATH%;%JONAS_LIB%\bootstrap\bundles-jpa2.0\ow2-jpa-2.0-spec.jar -set JONAS_CLASSPATH=%JONAS_CLASSPATH%;%JONAS_LIB%\repositories\maven2-internal\org\ow2\easybeans\osgi\easybeans-modules-persistence-eclipselink-2.x\${easybeans.version}\easybeans-modules-persistence-eclipselink-2.x-${easybeans.version}.jar -goto next_arg - -Rem Add -D System Properties -:java_opts -set PROP=%~1 -shift -set PROP=%PROP%=%1 -set JAVA_OPTS=%JAVA_OPTS% %PROP% -goto next_arg - -:cp_arg -shift -set JONAS_CLASSPATH=%JONAS_CLASSPATH%;%~1 -goto next_arg - -:debug_arg -shift -if not [%1]==[-p] goto debug_usage -shift -set JONAS_DEBUG_PORT=%1 -set JONAS_DEBUG_SUSPEND=n -if not [%2]==[-s] goto set_debug_opts -shift -shift -set JONAS_DEBUG_SUSPEND=%1 - -:set_debug_opts -echo JOnAS Debug Info : -echo listening on port : %JONAS_DEBUG_PORT% -echo suspend mode : %JONAS_DEBUG_SUSPEND% -set JONAS_DEBUG_OPTS=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=%JONAS_DEBUG_PORT%,suspend=%JONAS_DEBUG_SUSPEND% -goto next_arg - -:next_arg -shift -if not [%1]==[] goto loop_on_args - -Rem Add client.jar -Rem CLASSPATH could be upgraded here -set JONAS_CLASSPATH=%JONAS_CLASSPATH%;%JONAS_LIB%\client.jar -set JONAS_CLASSPATH=%JONAS_CLASSPATH%;%JONAS_LIB%\jonas-client.jar -set JONAS_CLASSPATH=%JONAS_CLASSPATH%;%JONAS_LIB%\bootstrap\client-bootstrap.jar - -set JAVA_OPTS=%JAVA_OPTS% -Djava.security.auth.login.config="%JONAS_BASE%\conf\jaas.config" -set JAVA_OPTS=%JAVA_OPTS% -Djava.endorsed.dirs="%JONAS_ROOT%\lib\endorsed" -if [%REGISTRY%]==[] goto next_java_opts -set JAVA_OPTS=%JAVA_OPTS% -Dregistry="%REGISTRY%" -:next_java_opts -set JAVA_OPTS=%JAVA_OPTS% -Djonas.root="%JONAS_ROOT%" -%JAVA% -cp "%JONAS_CLASSPATH%" %JAVA_OPTS% %JONAS_DEBUG_OPTS% org.ow2.jonas.client.boot.Bootstrap org.ow2.jonas.client.ClientContainer %ARGS% -goto :EOF - -:noclient -echo client.jar file must be present in JONAS_ROOT\lib directory -goto :EOF - - -:setroot -echo JONAS_ROOT must be set. -goto :EOF - -:debug_usage -echo -debug option parameters are : "-debug -p [-s ]" -goto :EOF diff --git a/jonas/assemblies/binaries/src/main/resources/bin/jclusterd b/jonas/assemblies/binaries/src/main/resources/bin/jclusterd deleted file mode 100644 index 1fbfbd350524911a7dd930100edbc4cb1c81dfb1..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/jclusterd +++ /dev/null @@ -1,166 +0,0 @@ -#!/bin/sh -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 1999-2008 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# Initial developer(s): Philippe Durieux -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -# ----------------------------------------------------------------------- -# Compute JONAS_ROOT in case it has not been set. -# ----------------------------------------------------------------------- -if [ ! -d $JONAS_ROOT/lib ]; then - savewd=`pwd` - cd `dirname $0` - zdir=`pwd` - cd $savewd - zfqn=$zdir/`basename "$0"` - JONAS_ROOT=`dirname $zdir` - JONAS_ROOT=`dirname $JONAS_ROOT` - export JONAS_ROOT -fi - -# Set CLASSPATH and JONAS_BASE -. $JONAS_ROOT/bin/setenv - -JONAS_OPTS="\ - -Djonas.root=$JONAS_ROOT \ - -Djonas.root=$JONAS_ROOT \ - -Djonas.base=$JONAS_BASE \ - -Djava.awt.headless=true \ - -Djava.security.auth.login.config=$JONAS_BASE/conf/jaas.config \ - -Djava.endorsed.dirs=$JONAS_ROOT/lib/endorsed \ - -Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB \ - -Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton \ - -Dorg.omg.PortableInterceptor.ORBInitializerClass.standard_init=org.jacorb.orb.standardInterceptors.IORInterceptorInitializer \ - -Djavax.rmi.CORBA.PortableRemoteObjectClass=org.ow2.carol.rmi.multi.MultiPRODelegate \ - -Djava.naming.factory.initial=org.ow2.carol.jndi.spi.MultiOrbInitialContextFactory \ - -Djavax.rmi.CORBA.UtilClass=org.ow2.carol.util.delegate.UtilDelegateImpl \ - " - -# --------------------------------------------- -# Get arguments -# --------------------------------------------- -ARGS= -DEBUG_OPTS= -MODE=start -USERNAME= -PASSWORD= -while [ "$#" -gt 0 ] - do case "$1" in - start) - MODE=start - ;; - stop) - MODE=stop - ;; - -cp) - shift - JONAS_CLASSPATH=$JONAS_CLASSPATH$SPS$1 - ;; - -D*) - JAVA_OPTS="$JAVA_OPTS $1" - ;; - -security) - # Use security manager - JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$JONAS_BASE/conf/java.policy" - ;; - -debug) - shift - # $1=-p - if [ "$1" != "-p" ]; then - echo "-debug mode need a following \"-p \"" - exit 1 - fi - shift - DEBUG_PORT=$1 - DEBUG_SUSPEND=n - if [ "$2" = "-s" ]; then - shift - shift - DEBUG_SUSPEND=$1 - fi - echo "Debug Info :" - echo " listening on port : $DEBUG_PORT" - echo " suspend mode : $DEBUG_SUSPEND" - DEBUG_OPTS=" -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=$DEBUG_PORT,suspend=$DEBUG_SUSPEND" - ;; - -username) - shift - USERNAME="-username $1" - ;; - -password) - shift - PASSWORD="-password $1" - ;; - *) - # All other args are passed "as is" to the java program - ARGS="$ARGS $1" - ;; - esac - shift -done - -# --------------------------------------------- -# Check mode -# --------------------------------------------- -case "$MODE" in - start) - CLASS_TO_RUN=org.ow2.jonas.cluster.daemon.ClusterDaemon - ;; - stop) - CLASS_TO_RUN="org.ow2.jonas.cluster.daemon.ClusterDaemonAdmin -stop" - ;; - *) - echo "Usage: jclusterd start|stop [options]" - echo "Debug mode : jclusterd start -debug -p [-s ] [options]" - exit 1 - ;; -esac - -# --------------------------------------------- -# Set tomcat base directory -# --------------------------------------------- -if [ -n "$CATALINA_HOME" ] -then - JONAS_OPTS="$JONAS_OPTS -Dcatalina.home=$CATALINA_HOME" -fi -if [ -n "$CATALINA_BASE" ] -then - JONAS_OPTS="$JONAS_OPTS -Dcatalina.base=$CATALINA_BASE" -fi - -# --------------------------------------------- -# Set jetty home directory -# --------------------------------------------- -if [ -n "$JETTY_HOME" ] -then - JONAS_OPTS="$JONAS_OPTS -Djetty.home=$JETTY_HOME" -fi - - -# update CLASSPATH -JONAS_CLASSPATH=$JONAS_CLASSPATH$SPS$JONAS_ROOT/lib/bootstrap/client-bootstrap.jar$SPS$JONAS_ROOT/lib/jonas-cluster-daemon.jar$SPS$JONAS_ROOT/lib/client.jar - -# --------------------------------------------- -# Run java command -# --------------------------------------------- -$JAVA -cp $JONAS_CLASSPATH $JAVA_OPTS $DEBUG_OPTS $JONAS_OPTS org.ow2.jonas.client.boot.Bootstrap $CLASS_TO_RUN $ARGS $USERNAME $PASSWORD diff --git a/jonas/assemblies/binaries/src/main/resources/bin/jclusterd.bat b/jonas/assemblies/binaries/src/main/resources/bin/jclusterd.bat deleted file mode 100755 index fc80a98335925b92ab177fe541e3344ee0b8158e..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/jclusterd.bat +++ /dev/null @@ -1,198 +0,0 @@ -@Echo Off -Rem --------------------------------------------------------------------------- -Rem JOnAS: Java(TM) Open Application Server -Rem Copyright (C) 1999-2009 Bull S.A.S. -Rem Contact: jonas-team@ow2.org -Rem -Rem This library is free software; you can redistribute it and/or -Rem modify it under the terms of the GNU Lesser General Public -Rem License as published by the Free Software Foundation; either -Rem version 2.1 of the License, or any later version. -Rem -Rem This library is distributed in the hope that it will be useful, -Rem but WITHOUT ANY WARRANTY; without even the implied warranty of -Rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Rem Lesser General Public License for more details. -Rem -Rem You should have received a copy of the GNU Lesser General Public -Rem License along with this library; if not, write to the Free Software -Rem Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -Rem USA -Rem -Rem Initial developer(s): Benoit Pelletier -Rem --------------------------------------------------------------------------- -Rem $Id$ -Rem --------------------------------------------------------------------------- - -Rem Keep variables local to this script -setlocal ENABLEDELAYEDEXPANSION - -Rem Check for JONAS_ROOT, if not set set it to the default -if ["%JONAS_ROOT%"]==[""] Goto SetJONAS_ROOT -echo JONAS_ROOT is set to %JONAS_ROOT% -Goto ExecuteBatch - -Rem %~dp0 is the directory in which this batch file is, -Rem therefore JONAS_ROOT\bin in our case. -:SetJONAS_ROOT -pushd "%~dp0" -cd .. -@set JONAS_ROOT=%CD% -@echo Setting JONAS_ROOT to %JONAS_ROOT% -popd - -:ExecuteBatch -Rem --------------------------------------------- -Rem set environment -Rem --------------------------------------------- -if ["%JONAS_ROOT%"]==[""] goto setroot -call "%JONAS_ROOT%\bin\setenv.bat" -set JONAS_LIB=%JONAS_ROOT%\lib - - -Rem --------------------------------------------- -Rem set JAVA_OPTS -Rem --------------------------------------------- -if ["%JAVA_HOME%"]==[""] goto setjava - -Rem JONAS_OPTS may be already partially initialized -set JONAS_OPTS=%JONAS_OPTS% -Djonas.root="%JONAS_ROOT%" -set JONAS_OPTS=%JONAS_OPTS% -Djonas.root="%JONAS_ROOT%" -set JONAS_OPTS=%JONAS_OPTS% -Djonas.base="%JONAS_BASE%" -set JONAS_OPTS=%JONAS_OPTS% -Djava.security.policy="%JONAS_ROOT%\conf\java.policy" -set JONAS_OPTS=%JONAS_OPTS% -Djonas.classpath="%XTRA_CLASSPATH%" -set JONAS_OPTS=%JONAS_OPTS% -Djonas.default.classloader=true -set JONAS_OPTS=%JONAS_OPTS% -Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB -set JONAS_OPTS=%JONAS_OPTS% -Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton -set JONAS_OPTS=%JONAS_OPTS% -Dorg.omg.PortableInterceptor.ORBInitializerClass.standard_init=org.jacorb.orb.standardInterceptors.IORInterceptorInitializer -set JONAS_OPTS=%JONAS_OPTS% -Djavax.rmi.CORBA.PortableRemoteObjectClass=org.ow2.carol.rmi.multi.MultiPRODelegate -set JONAS_OPTS=%JONAS_OPTS% -Djava.naming.factory.initial=org.ow2.carol.jndi.spi.MultiOrbInitialContextFactory -set JONAS_OPTS=%JONAS_OPTS% -Djavax.rmi.CORBA.UtilClass=org.ow2.carol.util.delegate.UtilDelegateImpl -set JONAS_OPTS=%JONAS_OPTS% -Djava.security.auth.login.config="%JONAS_BASE%\conf\jaas.config" -set JONAS_OPTS=%JONAS_OPTS% -Djava.endorsed.dirs="%JONAS_ROOT%\lib\endorsed" - -Rem --------------------------------------------- -Rem Get args -Rem --------------------------------------------- -set ARGS= -set MODE= -set USERNAME= -set PASSWORD= - -:loop_on_args -Set VALUE=%~1 -if [%1]==[] goto usage -if [%1]==[start] goto start_arg -if [%1]==[stop] goto stop_arg -if [%1]==[-cp] goto cp_arg -if [%1]==[-debug] goto debug_arg -if [%1]==[-username] goto username_arg -if [%1]==[-password] goto password_arg -if %VALUE:~0,2%==-D goto java_opts -set ARGS=%ARGS% %1 -goto next_arg - -Rem Add -D System Properties -:java_opts -Set PROP=%~1 -shift -Set PROP=%PROP%=%1 -Set JONAS_OPTS=%JONAS_OPTS% %PROP% -goto next_arg - - -:start_arg -set MODE=start -set CLASS_TO_RUN=org.ow2.jonas.cluster.daemon.ClusterDaemon -echo JONAS_BASE is set to %JONAS_BASE% -goto next_arg - -:stop_arg -set MODE=stop -set CLASS_TO_RUN=org.ow2.jonas.cluster.daemon.ClusterDaemonAdmin -stop -goto next_arg - -:cp_arg -shift -set JONAS_CLASSPATH=%JONAS_CLASSPATH%;%~1 -goto next_arg - -:debug_arg -shift -if not [%1]==[-p] goto debug_usage -shift -set JONAS_DEBUG_PORT=%1 -set JONAS_DEBUG_SUSPEND=n -if not [%2]==[-s] goto set_debug_opts -shift -shift -set JONAS_DEBUG_SUSPEND=%1 - -:set_debug_opts -echo JOnAS Debug Info : -echo listening on port : %JONAS_DEBUG_PORT% -echo suspend mode : %JONAS_DEBUG_SUSPEND% -set JONAS_DEBUG_OPTS=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=%JONAS_DEBUG_PORT%,suspend=%JONAS_DEBUG_SUSPEND% -goto next_arg - -:username_arg -shift -set USERNAME=-username %1 -goto next_arg - -:password_arg -shift -set PASSWORD=-password %1 -goto next_arg - -:next_arg -shift -if not [%1]==[] goto loop_on_args - -if [%MODE%]==[] goto no_mode - - -Rem --------------------------------------------- -Rem Set tomcat/jetty base directory -Rem --------------------------------------------- -set TOMCAT_OPTS= -set JETTY_OPTS= -if not ["%TOMCAT_BASE%"]==[""] set TOMCAT_OPTS=%TOMCAT_OPTS% -Dtomcat.base="%TOMCAT_BASE%" -if not ["%CATALINA_HOME%"]==[""] set TOMCAT_OPTS=%TOMCAT_OPTS% -Dcatalina.home="%CATALINA_HOME%" -if not ["%CATALINA_BASE%"]==[""] set TOMCAT_OPTS=%TOMCAT_OPTS% -Dcatalina.base="%CATALINA_BASE%" -if not ["%JETTY_HOME%"]==[""] set JETTY_OPTS=-Djetty.home="%JETTY_HOME%" - -Rem --------------------------------------------- -Rem include jonas classes -Rem --------------------------------------------- -Set JONAS_CLASSPATH=%JONAS_ROOT%\lib\bootstrap\client-bootstrap.jar;%JONAS_ROOT%\lib\jonas-cluster-daemon.jar;%JONAS_ROOT%\lib\client.jar;%JONAS_CLASSPATH% - -Rem --------------------------------------------- -Rem Run java command -Rem --------------------------------------------- -set BOOT=org.ow2.jonas.client.boot.Bootstrap -start /B "jclusterd" %JAVA% -cp "%JONAS_CLASSPATH%" %JAVA_OPTS% %JONAS_DEBUG_OPTS% %JONAS_OPTS% %TOMCAT_OPTS% %JETTY_OPTS% %BOOT% %CLASS_TO_RUN% %USERNAME% %PASSWORD% - -goto :EOF - -:setjava -echo JAVA_HOME not set. -goto :EOF - -:setroot -echo JONAS_ROOT not set. -goto :EOF - -:debug_usage -echo -debug option parameters are : "-debug -p [-s ]" -goto :EOF - -:no_mode -echo "No startup mode specified, specify start | stop | admin | version | check" -goto usage - -:usage -echo "jclusterd start | stop [options]" -echo "Debug mode : jclusterd start -debug -p [-s ]" -goto :EOF - diff --git a/jonas/assemblies/binaries/src/main/resources/bin/jonas b/jonas/assemblies/binaries/src/main/resources/bin/jonas deleted file mode 100644 index ccb5b584fd904d1027f25dc7b4582a40520da5d0..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/jonas +++ /dev/null @@ -1,403 +0,0 @@ -#!/bin/sh -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 1999-2011 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# Initial developer(s): Philippe Durieux -# Contributor(s): Adriana Danes : -# - Change /config en /conf -# - Use JONAS_BASE -# Florent Benoit & Ludovic Bert -# eyindanga -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -cygwin=false; -case "`uname`" in - CYGWIN*) cygwin=true ;; -esac - -# For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin ; then - [ -n "JONAS_ROOT" ] && - JONAS_ROOT=`cygpath --unix "$JONAS_ROOT"` - [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath -m -s "$JAVA_HOME"` -fi - -# ----------------------------------------------------------------------- -# Compute JONAS_ROOT in case it has not been set. -# ----------------------------------------------------------------------- -if [ -z $JONAS_ROOT ]; then - savewd=`pwd` - cd `dirname $0` - zdir=`pwd` - cd $savewd - zfqn=$zdir/`basename "$0"` - JONAS_ROOT=`dirname $zdir` - echo "JONAS_ROOT is set to" $JONAS_ROOT - export JONAS_ROOT -fi - -# Check if $JONAS_ROOT is set. -if [ ! -f "$JONAS_ROOT/bin/setenv" ]; then - echo "Please set the JONAS_ROOT variable." - exit -fi - -# Set CLASSPATH and JONAS_BASE -. $JONAS_ROOT/bin/setenv - -# Display banner (if any) -if [ -f $JONAS_BASE/conf/banner.txt ]; then - cat $JONAS_BASE/conf/banner.txt -fi - -# Set path for JOnAS bootstrap libraries -LIB_BOOTSTRAP_PATH=$JONAS_ROOT/lib/bootstrap - -# Update JONAS_CLASSPATH -JONAS_CLASSPATH=$JONAS_CLASSPATH$SPS$LIB_BOOTSTRAP_PATH/felix-launcher.jar -JONAS_CLASSPATH=$JONAS_CLASSPATH$SPS$LIB_BOOTSTRAP_PATH/jonas-commands.jar -JONAS_CLASSPATH=$JONAS_CLASSPATH$SPS$LIB_BOOTSTRAP_PATH/jonas-version.jar - -# For Cygwin, switch paths to Windows format before running java -if $cygwin; then - [ -n "$JONAS_ROOT" ] && - JONAS_ROOT=`cygpath --path --windows "$JONAS_ROOT"` - [ -n "$JONAS_BASE" ] && - JONAS_BASE=`cygpath --path --windows "$JONAS_BASE"` -fi - -JONAS_OPTS="\ - -Djonas.root=$JONAS_ROOT \ - -Djonas.base=$JONAS_BASE \ - -Dipojo.log.level=ERROR \ - -Djava.security.policy=$JONAS_BASE/conf/java.policy \ - -Djava.security.auth.login.config=$JONAS_BASE/conf/jaas.config \ - -Djava.endorsed.dirs=$JONAS_ROOT/lib/endorsed \ - -Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB \ - -Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton \ - -Dorg.omg.PortableInterceptor.ORBInitializerClass.standard_init=org.jacorb.orb.standardInterceptors.IORInterceptorInitializer \ - -Dcom.sun.CORBA.ORBDynamicStubFactoryFactoryClass=com.sun.corba.se.impl.presentation.rmi.StubFactoryFactoryStaticImpl \ - -Djavax.xml.soap.SOAPConnectionFactory=com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnectionFactory \ - -Djavax.xml.soap.SOAPFactory=com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl \ - -Djavax.xml.soap.MetaFactory=com.sun.xml.messaging.saaj.soap.SAAJMetaFactoryImpl \ - -Djavax.xml.soap.MessageFactory=com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl \ - " -# Most of the ORB and naming properties are not usually changed by the user !! Should be in a class. - -# --------------------------------------------- -# Get arguments -# --------------------------------------------- -ARGS= -MODE= -JONAS_NAME= -PINGTIMEOUT= -PINGSTATE= -HEADLESS="-Djava.awt.headless=true" -START_OPTS= -PINGTIMEOUT_OPT= -PINGSTATE_OPT= -WHERE=background -FORCE_FOREGROUND=false -ADMIN_CLASS=org.ow2.jonas.commands.admin.ClientAdmin -USERNAME= -PASSWORD= -while [ "$#" -gt 0 ] - do case "$1" in - start) - MODE=start - ;; - halt) - echo "[DEPRECATED] Please use stop argument instead of halt" - MODE=stop - PINGSTATE=j2ee.state.stopped - ;; - stop) - MODE=stop - PINGSTATE=j2ee.state.stopped - ;; - admin) - MODE=admin - FORCE_FOREGROUND=true - ;; - version) - MODE=version - FORCE_FOREGROUND=true - ;; - check) - MODE=check - FORCE_FOREGROUND=true - ;; - -standby) - ARGS="$ARGS -standby" - if [ "$MODE" = "stop" ]; then - FORCE_FOREGROUND=false - fi - ;; - -running) - # Implicit argument for the 'start' argument - ;; - -halt) - # Implicit argument for the 'stop' argument - ;; - -cp) - PARAMS="$PARAMS $1" - shift - JONAS_CLASSPATH=$JONAS_CLASSPATH$SPS$1 - ;; - -debug) - PARAMS="$PARAMS $1" - shift - # $1=-p - if [ "$1" != "-p" ]; then - echo "-debug mode need a following \"-p \"" - exit 1 - fi - shift - JONAS_DEBUG_PORT=$1 - JONAS_DEBUG_SUSPEND=n - if [ "$2" = "-s" ]; then - shift - shift - JONAS_DEBUG_SUSPEND=$1 - fi - echo "JOnAS Debug Info :" - echo " listening on port : $JONAS_DEBUG_PORT" - echo " suspend mode : $JONAS_DEBUG_SUSPEND" - JONAS_DEBUG_OPTS=" -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=$JONAS_DEBUG_PORT,suspend=$JONAS_DEBUG_SUSPEND" - ;; - -fg) - WHERE=foreground - ;; - -bg) - WHERE=background - ;; - -gui) - echo "Start Felix GUI with JOnAS." - START_OPTS="$START_OPTS -Djonas.felix.gui.enabled=true" - HEADLESS="" - ;; - -tui) - echo "Start Felix TUI with JOnAS." - START_OPTS="$START_OPTS -Djonas.felix.tui.enabled=true" - FORCE_FOREGROUND=true - ;; - -win) - WHERE=window - ;; - -nojit) - JONAS_OPTS="$JONAS_OPTS -Djava.compiler=NONE" - START_OPTS="$START_OPTS -Djava.compiler=NONE" - ;; - -dev) - START_OPTS="$START_OPTS -Djonas.developer=true" - ;; - -clean) - echo "Clean Felix cache before starting JOnAS." - START_OPTS="$START_OPTS -Djonas.cache.clean=true" - ;; - -n) - PARAMS="$PARAMS $1" - shift - JONAS_NAME=$1 - ;; - -timeout) - PARAMS="$PARAMS $1" - shift - PINGTIMEOUT=$1 - ;; - -state) - PARAMS="$PARAMS $1" - shift - PINGSTATE=$1 - ;; - -D*) - JONAS_OPTS="$JONAS_OPTS $1" - START_OPTS="$START_OPTS $1" - ;; - -X*) - JAVA_OPTS="$JAVA_OPTS $1" - ;; - -target) - if [ "$MODE" = "start" ]; then - ARGS="$ARGS -start" - fi - if [ "$MODE" = "stop" ]; then - ARGS="$ARGS -stop" - fi - MODE=admin - ARGS="$ARGS -target" - ;; - -username) - PARAMS="$PARAMS $1" - shift - USERNAME="-username $1" - ;; - -password) - PARAMS="$PARAMS $1" - shift - PASSWORD="-password $1" - ;; - *) - # All other args are passed "as is" to the java program - ARGS="$ARGS $1" - ;; - esac - if [ "$1" != "-win" ]; then - PARAMS="$PARAMS $1" - fi - shift -done - -# --------------------------------------------- -# Check args -# --------------------------------------------- -case "$MODE" in - start) - CLASS_TO_RUN="$ADMIN_CLASS -start" - ;; - stop) - CLASS_TO_RUN="$ADMIN_CLASS -stop" - ;; - admin) - CLASS_TO_RUN=$ADMIN_CLASS - ;; - version) - CLASS_TO_RUN=org.ow2.jonas.Version - ;; - check) - CLASS_TO_RUN=org.ow2.jonas.commands.check.CheckEnv - ;; - *) - # Usage - # Will be displayed if the user type an unrecognized command - echo "Unrecognized command : '$*'" - echo "Usage: $0 start | stop | admin | version | check" - echo "Options:" - echo " for 'start': [-fg] [-bg] [-win] [-n] [-standby] [-debug] [-gui] [-tui] [-dev] [-clean] [-nojit]" - echo " -fg Launch JOnAS in foreground (Only applicable for 'start')." - echo " -bg Launch JOnAS in background (Only applicable for 'start')." - echo " -win Launch JOnAS in a separate window (Only applicable for 'start')." - echo " -n Specify the JOnAS instance name." - echo " -standby Allow to reach the STANDBY state (Only applicable for 'start' and 'stop')." - echo " -debug -p [-s ] Debug the JOnAS instance." - echo " -gui Launch JOnAS with the Apache Felix GUI (Only applicable for 'start')." - echo " -tui Launch JOnAS with the Apache Felix Shell" - echo " (allow to perform OSGi operations on the framework)." - echo " (Only applicable for 'start')" - echo " -dev Use M2 registry for bundles (for JOnAS developers)." - echo " -clean Clean Felix cache before starting JOnAS." - echo " -nojit Disable JIT." - echo " for '*': [-cp] [-n] [-timeout] [-target] [-D*]" - echo " -cp Additional CLASSPATH entries (to be used with care)." - echo " -timeout Specify a new connection timeout." - echo " -target [options] Perform remote administration tasks." - echo " -Dname=value Add JVM properties." - exit 1 - ;; -esac - -# --------------------------------------------- -# Print out JONAS_BASE -# --------------------------------------------- -case "$MODE" in - start|check) - echo "JONAS_BASE is set to" $JONAS_BASE - ;; -esac - -# --------------------------------------------- -# Add RMI Annotation -# --------------------------------------------- -#if [ -z "$ANNOTATE" ]; then -# JONAS_OPTS="$JONAS_OPTS \ -# -Djava.rmi.server.RMIClassLoaderSpi=org.ow2.jonas.lib.bootstrap.RemoteClassLoaderSpi" -#fi - -# --------------------------------------------- -# Set jonas server name -# --------------------------------------------- -if [ ! -z "$JONAS_NAME" ]; then - JONAS_OPTS="$JONAS_OPTS -Djonas.name=$JONAS_NAME " - START_OPTS="$START_OPTS -Djonas.name=$JONAS_NAME " -fi - -# --------------------------------------------- -# Set jonas timeout for ping -# --------------------------------------------- -if [ ! -z "$PINGTIMEOUT" ]; then - PINGTIMEOUT_OPT="-timeout $PINGTIMEOUT" -fi - -# --------------------------------------------- -# Set jonas state for ping -# --------------------------------------------- -if [ ! -z "$PINGSTATE" ]; then - PINGSTATE_OPT="-state $PINGSTATE" -fi - -# Add Headless if needed -START_OPTS="$START_OPTS $HEADLESS" - -# Force foreground mode -if [ "$FORCE_FOREGROUND" = true ]; then - WHERE=foreground -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin; then - [ -n "$JONAS_CLASSPATH" ] && - JONAS_CLASSPATH=`cygpath --path --windows "$JONAS_CLASSPATH"` -fi - -# --------------------------------------------- -# Run java command -# --------------------------------------------- -if [ "$MODE" = "start" ] -then - case "$WHERE" in - window) - xterm -title $HOSTNAME:$JONAS_NAME -geometry 110x16 -sb -e $0 $PARAMS -fg & - ;; - foreground) - # Start JOnAS in the foreground - $JAVA $JAVA_OPTS $START_OPTS $JONAS_OPTS -cp $JONAS_CLASSPATH $JONAS_DEBUG_OPTS $CLASS_TO_RUN $ARGS $USERNAME $PASSWORD - ;; - *) - # Start JOnAS in the background - $JAVA $JAVA_OPTS $START_OPTS $JONAS_OPTS -cp $JONAS_CLASSPATH $JONAS_DEBUG_OPTS $CLASS_TO_RUN $ARGS $USERNAME $PASSWORD & - - # Wait for JOnAS to actually start - $JAVA $START_OPTS $JONAS_OPTS -cp $JONAS_CLASSPATH $ADMIN_CLASS -ping $PINGTIMEOUT_OPT $PINGSTATE_OPT $ARGS $USERNAME $PASSWORD - ;; - esac -elif [ "$MODE" = "stop" ] -then - # Send the JMX command for stopping JOnAS, in the background - $JAVA $START_OPTS $JONAS_OPTS -cp $JONAS_CLASSPATH $JONAS_DEBUG_OPTS $CLASS_TO_RUN $ARGS $USERNAME $PASSWORD & - - # Wait for JOnAS to actually stop - $JAVA $START_OPTS $JONAS_OPTS -cp $JONAS_CLASSPATH $ADMIN_CLASS -ping $PINGTIMEOUT_OPT $PINGSTATE_OPT $ARGS $USERNAME $PASSWORD -else - # JOnAS admin or other similar command - $JAVA $START_OPTS $JONAS_OPTS -cp $JONAS_CLASSPATH $JONAS_DEBUG_OPTS $CLASS_TO_RUN $ARGS $PINGTIMEOUT_OPT $PINGSTATE_OPT $USERNAME $PASSWORD -fi diff --git a/jonas/assemblies/binaries/src/main/resources/bin/jonas.bat b/jonas/assemblies/binaries/src/main/resources/bin/jonas.bat deleted file mode 100755 index d0dd7bf1cae5bb6b455f21ee8f96d822ad8b5d66..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/jonas.bat +++ /dev/null @@ -1,420 +0,0 @@ -@Echo Off -Rem --------------------------------------------------------------------------- -Rem JOnAS: Java(TM) Open Application Server -Rem Copyright (C) 1999-2009 Bull S.A.S. -Rem Contact: jonas-team@ow2.org -Rem -Rem This library is free software; you can redistribute it and/or -Rem modify it under the terms of the GNU Lesser General Public -Rem License as published by the Free Software Foundation; either -Rem version 2.1 of the License, or any later version. -Rem -Rem This library is distributed in the hope that it will be useful, -Rem but WITHOUT ANY WARRANTY; without even the implied warranty of -Rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Rem Lesser General Public License for more details. -Rem -Rem You should have received a copy of the GNU Lesser General Public -Rem License along with this library; if not, write to the Free Software -Rem Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -Rem USA -Rem -Rem Initial developer(s): Philippe Durieux -Rem Contributor(s): Miroslav Halas -Rem Adriana Danes : -Rem - Change /config in /conf -Rem - Use JONAS_BASE -Rem Jerome Pioux: -Rem - Remove extra spaces in :start_jonas_bg after %JAVA% - was causing -Rem bug #306113 - happen only if the script is used from the tarball -Rem (UNIX format [LF]). As a side note, with 4.8.3, the script will -Rem be saved as DOS format [CRLF] inside SVN. -Rem eyindanga: -Rem - Start JOnAS on OSGi. -Rem -Rem --------------------------------------------------------------------------- -Rem $Id$ -Rem --------------------------------------------------------------------------- - -Rem Keep variables local to this script -setlocal ENABLEDELAYEDEXPANSION - -if ["%JONAS_ROOT%"]==[""] goto emptyroot -goto execute - -Rem %~dp0 is the directory in which this batch file is. JONAS_ROOT\bin in our case. -:emptyroot -pushd "%~dp0" -cd .. -@set JONAS_ROOT=%cd% -@echo JONAS_ROOT is set to %JONAS_ROOT% -popd - -Rem --------------------------------------------- -Rem set environment -Rem --------------------------------------------- -if ["%JONAS_ROOT%"]==[""] goto setroot - -:execute -call "%JONAS_ROOT%\bin\setenv.bat" - -Rem Display JOnAS banner (if any) -if not exist "%JONAS_BASE%\conf\banner.txt" goto no_banner -more "%JONAS_BASE%\conf\banner.txt" - -Rem Marker when no banner is available -:no_banner - -Rem Set path for JOnAS bootstrap libraries -set LIB_BOOTSTRAP_PATH=%JONAS_ROOT%\lib\bootstrap - -Rem Set JONAS_CLASSPATH -set JONAS_CLASSPATH=%JONAS_CLASSPATH%;%LIB_BOOTSTRAP_PATH%\felix-launcher.jar -set JONAS_CLASSPATH=%JONAS_CLASSPATH%;%LIB_BOOTSTRAP_PATH%\jonas-commands.jar -set JONAS_CLASSPATH=%JONAS_CLASSPATH%;%LIB_BOOTSTRAP_PATH%\jonas-version.jar - -Rem --------------------------------------------- -Rem set JONAS_OPTS -Rem --------------------------------------------- -Rem JAVA_HOME must be set since config_env.bat requires it for tools.jar -if ["%JAVA_HOME%"]==[""] goto setjava - -Rem JONAS_OPTS may be already partially initialized -set JONAS_OPTS=%JONAS_OPTS% -Djonas.root="%JONAS_ROOT%" -set JONAS_OPTS=%JONAS_OPTS% -Djonas.base="%JONAS_BASE%" -set JONAS_OPTS=%JONAS_OPTS% -Dipojo.log.level=ERROR -set JONAS_OPTS=%JONAS_OPTS% -Djava.security.policy="%JONAS_BASE%\conf\java.policy" -set JONAS_OPTS=%JONAS_OPTS% -Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB -set JONAS_OPTS=%JONAS_OPTS% -Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton -set JONAS_OPTS=%JONAS_OPTS% -Dorg.omg.PortableInterceptor.ORBInitializerClass.standard_init=org.jacorb.orb.standardInterceptors.IORInterceptorInitializer -set JONAS_OPTS=%JONAS_OPTS% -Djava.security.auth.login.config="%JONAS_BASE%\conf\jaas.config" -set JONAS_OPTS=%JONAS_OPTS% -Djava.endorsed.dirs="%JONAS_ROOT%\lib\endorsed" -set JONAS_OPTS=%JONAS_OPTS% -Dcom.sun.CORBA.ORBDynamicStubFactoryFactoryClass=com.sun.corba.se.impl.presentation.rmi.StubFactoryFactoryStaticImpl -set JONAS_OPTS=%JONAS_OPTS% -Djavax.xml.soap.SOAPConnectionFactory=com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnectionFactory -set JONAS_OPTS=%JONAS_OPTS% -Djavax.xml.soap.SOAPFactory=com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl -set JONAS_OPTS=%JONAS_OPTS% -Djavax.xml.soap.MetaFactory=com.sun.xml.messaging.saaj.soap.SAAJMetaFactoryImpl -set JONAS_OPTS=%JONAS_OPTS% -Djavax.xml.soap.MessageFactory=com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl - -Rem --------------------------------------------- -Rem Get args -Rem --------------------------------------------- - -if [%1]==[] goto no_arg - -set ARGS= -set MODE= -set JONASNAME= -set PINGTIMEOUT= -set PINGSTATE= -set ANNOTATE= -set WHERE=background -set HEADLESS=-Djava.awt.headless=true -set START_OPTS= -set FORCE_FOREGROUND=false -set ADMIN_CLASS=org.ow2.jonas.commands.admin.ClientAdmin -set USERNAME= -set PASSWORD= -:loop_on_args -set VALUE=%~1 -if [%1]==[start] goto start_arg -if [%1]==[stop] goto stop_arg -if [%1]==[halt] goto halt_arg -if [%1]==[admin] goto admin_arg -if [%1]==[version] goto version_arg -if [%1]==[check] goto check_arg -if [%1]==[ntservice] goto ntservice_arg -if [%1]==[-standby] goto standby_arg -if [%1]==[-running] goto next_arg -if [%1]==[-halt] goto next_arg -if [%1]==[-fg] goto fg_arg -if [%1]==[-bg] goto bg_arg -if [%1]==[-win] goto win_arg -if [%1]==[-n] goto n_arg -if [%1]==[-timeout] goto timeout_arg -if [%1]==[-state] goto state_arg -if [%1]==[-cfgsvc] goto cfgsvc_arg -if [%1]==[-cp] goto cp_arg -if [%1]==[-debug] goto debug_arg -if [%1]==[-target] goto target_arg -if [%1]==[-gui] goto gui_arg -if [%1]==[-tui] goto tui_arg -if [%1]==[-dev] goto dev_arg -if [%1]==[-clean] goto clean_arg -if [%1]==[-username] goto username_arg -if [%1]==[-password] goto password_arg -if %VALUE:~0,2%==-D goto jonas_opts -if %VALUE:~0,2%==-X goto java_opts -set ARGS=%ARGS% %1 -goto next_arg - -Rem First arguments : start, stop, admin, version, check - -:start_arg -set MODE=start -set CLASS_TO_RUN=%ADMIN_CLASS% -start -goto next_arg - -:stop_arg -set MODE=stop -set CLASS_TO_RUN=%ADMIN_CLASS% -stop -set PINGSTATE=-state j2ee.state.stopped -goto next_arg - -:halt_arg -echo [DEPRECATED] Please use stop argument instead of halt -goto stop_arg - -:admin_arg -set MODE=admin -set CLASS_TO_RUN=%ADMIN_CLASS% -set FORCE_FOREGROUND=true -goto next_arg - -:version_arg -set MODE=version -set CLASS_TO_RUN=org.ow2.jonas.Version -set FORCE_FOREGROUND=true -goto next_arg - -:check_arg -set MODE=check -set CLASS_TO_RUN=org.ow2.jonas.commands.check.CheckEnv -set FORCE_FOREGROUND=true -goto next_arg - -Rem Take all arguments after ntservice and goto ntservice processing -:ntservice_arg -set MODE=ntservice -shift -set ARGS= -:nt_args -if [%1]==[] goto nt_args_done -set ARGS=%ARGS% %1 -shift -goto nt_args - -:nt_args_done -echo JONAS_BASE is set to %JONAS_BASE% -goto ntservice - -Rem Add -D System Properties -:jonas_opts -Set PROP=%~1 -shift -Set PROP=%PROP%=%1 -Set JONAS_OPTS=%JONAS_OPTS% %PROP% -Set START_OPTS=%START_OPTS% %PROP% -goto next_arg - -Rem Add -X System Properties -:java_opts -Set JAVA_OPTS=%JAVA_OPTS% %~1 -goto next_arg - -:standby_arg -set ARGS=%ARGS% -standby -if [%MODE%]==[stop] set FORCE_FOREGROUND=false -goto next_arg - -:gui_arg -echo Start Felix GUI with JOnAS. -set START_OPTS=%START_OPTS% -Djonas.felix.gui.enabled=true -set HEADLESS= -goto next_arg - -:tui_arg -echo Start Felix TUI with JOnAS. -set START_OPTS=%START_OPTS% -Djonas.felix.tui.enabled=true -set FORCE_FOREGROUND=true -goto next_arg - -:dev_arg -echo JOnAS starts in developer mode. -set START_OPTS=%START_OPTS% -Djonas.developer=true -goto next_arg - -:clean_arg -echo Clean Felix cache before starting JOnAS. -set START_OPTS=%START_OPTS% -Djonas.cache.clean=true -goto next_arg - -:fg_arg -set WHERE=foreground -goto next_arg - -:bg_arg -set WHERE=background -goto next_arg - -:win_arg -set WHERE=window -goto next_arg - -:n_arg -shift -set JONASNAME=%1 -set JONAS_OPTS=%JONAS_OPTS% -Djonas.name="%JONASNAME%" -set START_OPTS=%START_OPTS% -Djonas.name="%JONASNAME%" -goto next_arg - -:timeout_arg -shift -set PINGTIMEOUT=-timeout %1 -goto next_arg - -:state_arg -shift -set PINGSTATE=-state %1 -goto next_arg - -:cfgsvc_arg -shift -if [%1]==[] goto cfgsvc_usage -set WHERE=cfgsvc -set WRAPPER_CONF=%1 -goto start_arg - -:cp_arg -shift -set JONAS_CLASSPATH=%JONAS_CLASSPATH%;%~1 -goto next_arg - -:debug_arg -shift -if not [%1]==[-p] goto debug_usage -shift -set JONAS_DEBUG_PORT=%1 -set JONAS_DEBUG_SUSPEND=n -if not [%2]==[-s] goto set_debug_opts -shift -shift -set JONAS_DEBUG_SUSPEND=%1 - -:set_debug_opts -echo JOnAS Debug Info : -echo listening on port : %JONAS_DEBUG_PORT% -echo suspend mode : %JONAS_DEBUG_SUSPEND% -set JONAS_DEBUG_OPTS=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=%JONAS_DEBUG_PORT%,suspend=%JONAS_DEBUG_SUSPEND% -goto next_arg - -:target_arg -if [%MODE%]==[start] set ARGS=%ARGS% -start -if [%MODE%]==[stop] set ARGS=%ARGS% -stop -set MODE=admin -set ARGS=%ARGS% -target -goto next_arg - -:username_arg -shift -set USERNAME=-username %1 -goto next_arg - -:password_arg -shift -set PASSWORD=-password %1 -goto next_arg - -:next_arg -if not [%1]==[-win] set PARAMS=%PARAMS% %1 -shift -if not [%1]==[] goto loop_on_args - -if [%MODE%]==[] goto no_mode - -Rem --------------------------------------------- -Rem Remove RMI Annotation -Rem --------------------------------------------- -Rem set JONAS_OPTS=%JONAS_OPTS% -Djava.rmi.server.RMIClassLoaderSpi=org.ow2.jonas.lib.bootstrap.RemoteClassLoaderSpi - -Rem Add Headless if needed -set START_OPTS=%START_OPTS% %HEADLESS% - -Rem Print out JONAS_BASE -if [%MODE%]==[start] echo JONAS_BASE is set to %JONAS_BASE% -if [%MODE%]==[check] echo JONAS_BASE is set to %JONAS_BASE% - -if %FORCE_FOREGROUND%==true set WHERE=foreground - -Rem --------------------------------------------- -Rem Run java command -Rem --------------------------------------------- - -if [%MODE%]==[stop] goto stop -if not [%MODE%]==[start] goto admin -if %WHERE%==cfgsvc goto cfgsvc_mode -if %WHERE%==window goto window -if %WHERE%==foreground goto foreground -if %WHERE%==background goto background -goto :EOF - -:cfgsvc_mode -rem called by ANT create_windows_service -set JAVA_CMD=%JAVA% -classpath "%JONAS_CLASSPATH%" org.ow2.jonas.commands.wrapper.GenerateWrapperConf -%JAVA_CMD% -d ; -i 2 wrapper.java.classpath "%JONAS_CLASSPATH%" >>%WRAPPER_CONF% -%JAVA_CMD% -i 2 wrapper.java.additional %JAVA_OPTS% %JONAS_OPTS% >>%WRAPPER_CONF% -echo wrapper.app.parameter.10=%JONASNAME% >>%WRAPPER_CONF% -echo wrapper.ntservice.name=JOnAS_%JONASNAME% >>%WRAPPER_CONF% -echo wrapper.ntservice.displayname=JOnAS (%JONASNAME%) >>%WRAPPER_CONF% -goto :EOF - -:foreground -REM start JOnAS in foreground mode -%JAVA% %JAVA_OPTS% %START_OPTS% %JONAS_OPTS% -cp "%JONAS_CLASSPATH%" %JONAS_DEBUG_OPTS% %CLASS_TO_RUN% %ARGS% %USERNAME% %PASSWORD% -goto :EOF - -:background -REM start JOnAS in background mode -start /B "JOnAS" %JAVA% %JAVA_OPTS% %START_OPTS% %JONAS_OPTS% -cp "%JONAS_CLASSPATH%" %JONAS_DEBUG_OPTS% %CLASS_TO_RUN% %ARGS% %USERNAME% %PASSWORD% -%JAVA% %START_OPTS% %JONAS_OPTS% -cp "%JONAS_CLASSPATH%" %ADMIN_CLASS% -ping %PINGTIMEOUT% %PINGSTATE% %ARGS% %USERNAME% %PASSWORD% -goto :EOF - -:stop -REM stop JOnAS and wait for it to stop -start /B "JOnAS" %JAVA% %START_OPTS% %JONAS_OPTS% -cp "%JONAS_CLASSPATH%" %JONAS_DEBUG_OPTS% %CLASS_TO_RUN% %ARGS% %PINGTIMEOUT% %PINGSTATE% %USERNAME% %PASSWORD% -%JAVA% %START_OPTS% %JONAS_OPTS% -cp "%JONAS_CLASSPATH%" %ADMIN_CLASS% -ping %PINGTIMEOUT% %PINGSTATE% %ARGS% %USERNAME% %PASSWORD% -goto :EOF - -:window -set WINDOW_TITLE="%HOSTNAME%:%JONASNAME%" -if %WINDOW_TITLE%==":" set WINDOW_TITLE="JOnAS Server" -start %WINDOW_TITLE% %JAVA% %JAVA_OPTS% %START_OPTS% %JONAS_OPTS% -cp "%JONAS_CLASSPATH%" %JONAS_DEBUG_OPTS% %CLASS_TO_RUN% %ARGS% %USERNAME% %PASSWORD% -goto :EOF - -:admin -%JAVA% %START_OPTS% %JONAS_OPTS% -cp "%JONAS_CLASSPATH%" %JONAS_DEBUG_OPTS% %CLASS_TO_RUN% %ARGS% %PINGTIMEOUT% %PINGSTATE% %USERNAME% %PASSWORD% -goto :EOF - -:ntservice -"%JONAS_ROOT%\bin\jonasnt" %ARGS% -goto :EOF - -:setjava -echo JAVA_HOME not set. -goto :EOF - -:no_mode -echo No startup mode specified, specify start | stop | admin | version | check -goto usage - -:no_arg -echo No arguments specified. -goto usage - -:usage -echo jonas start | stop | admin | version | check| ntservice | -fg | -bg | -win | -n | -standby | -debug | -cfgsvc | -gui | -tui | -dev | -clean -echo Debug mode : jonas start -debug -p [-s ] -REM TODO: Add here explanation for the arguments -goto :EOF - -:setroot -echo JONAS_ROOT not set. -goto :EOF - -:debug_usage -echo -debug option parameters are : "-debug -p [-s ]" -goto :EOF - -:cfgsvc_usage -echo -cfgsvc option requires filename for target wrapper.conf file -goto :EOF - diff --git a/jonas/assemblies/binaries/src/main/resources/bin/jonasnt.bat b/jonas/assemblies/binaries/src/main/resources/bin/jonasnt.bat deleted file mode 100755 index cf4baa9d25100b4a74eb64160619be2849126e2b..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/jonasnt.bat +++ /dev/null @@ -1,138 +0,0 @@ -@echo off -Rem --------------------------------------------------------------------------- -Rem JOnAS: Java(TM) Open Application Server -Rem Copyright (C) 1999-2009 Bull S.A.S. -Rem Copyright (c) 1999-2006 Tanuki Software Inc. -Rem Contact: jonas-team@ow2.org -Rem -Rem This library is free software; you can redistribute it and/or -Rem modify it under the terms of the GNU Lesser General Public -Rem License as published by the Free Software Foundation; either -Rem version 2.1 of the License, or any later version. -Rem -Rem This library is distributed in the hope that it will be useful, -Rem but WITHOUT ANY WARRANTY; without even the implied warranty of -Rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Rem Lesser General Public License for more details. -Rem -Rem You should have received a copy of the GNU Lesser General Public -Rem License along with this library; if not, write to the Free Software -Rem Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -Rem USA -Rem -Rem --------------------------------------------------------------------------- -Rem $Id$ -Rem --------------------------------------------------------------------------- - -setlocal - -if "%OS%"=="Windows_NT" goto nt -echo This script only works with NT-based versions of Windows. -goto :eof - -:nt -Rem check JONAS_ROOT -if ["%JONAS_ROOT%"]==[""] goto setJonasRoot - -Rem check JONAS_BASE -if ["%JONAS_BASE%"]==[""] goto setJonasBase - -Rem check WRAPPER_HOME -if ["%WRAPPER_HOME%"]==[""] goto setWrapperHome - -rem -rem Find the application home. -rem -set _WRAPPER_BIN=%WRAPPER_HOME%\bin\ -set _WRAPPER_BASE=wrapper -set _WRAPPER_EXE=%_WRAPPER_BIN%%_WRAPPER_BASE%-windows-x86-32.exe -if exist "%_WRAPPER_EXE%" goto jonasbase -set _WRAPPER_EXE=%_WRAPPER_BIN%%_WRAPPER_BASE%-windows-x86-64.exe -if exist "%_WRAPPER_EXE%" goto jonasbase -set _WRAPPER_EXE=%_WRAPPER_BIN%%_WRAPPER_BASE%.exe -if exist "%_WRAPPER_EXE%" goto jonasbase -echo Unable to locate a Wrapper executable using any of the following names: -echo %_WRAPPER_BIN%%_WRAPPER_BASE%-windows-x86-32.exe -echo %_WRAPPER_BIN%%_WRAPPER_BASE%-windows-x86-64.exe -echo %_WRAPPER_BIN%%_WRAPPER_BASE%.exe -rem pause -goto :eof - -:jonasbase -rem Check that the JONAS_BASE is valid -if exist "%JONAS_BASE%\conf\jonas.properties" goto validate -echo The JONAS_BASE is not valid -rem pause -goto :eof - -:validate -rem Find the requested command. -for /F %%v in ('echo %1^|findstr "^console$ ^start$ ^stop$ ^restart$ ^status$ ^install$ ^uninstall"') do call :exec set COMMAND=%%v - -if "%COMMAND%" == "" ( - echo Usage: %0 { console : start : stop : restart : status : install : uninstall} - goto :eof -) else ( - shift -) - -set WRAPPER_CONF=%JONAS_BASE%\conf\wrapper.conf - -rem -rem Run the application. -rem At runtime, the current directory will be that of wrapper.exe -rem -:run -call :%COMMAND% -rem if errorlevel 1 pause -goto :eof - -:console -"%_WRAPPER_EXE%" -c "%WRAPPER_CONF%" -goto :eof - -:start -"%_WRAPPER_EXE%" -t "%WRAPPER_CONF%" -goto :eof - -:stop -"%_WRAPPER_EXE%" -p "%WRAPPER_CONF%" -goto :eof - -:status -"%_WRAPPER_EXE%" -q "%WRAPPER_CONF%" -goto :eof - -:install -"%_WRAPPER_EXE%" -i "%WRAPPER_CONF%" -goto :eof - -:uninstall -"%_WRAPPER_EXE%" -r "%WRAPPER_CONF%" -goto :eof - -:console -"%_WRAPPER_EXE%" -c "%WRAPPER_CONF%" -goto :eof - -:restart -call :stop -call :start -goto :eof - -:exec -%* -goto :eof - -:setJonasRoot -echo JONAS_ROOT must be set. -goto :eof - -:setJonasBase -echo JONAS_BASE must be set. -goto :eof - -:setWrapperHome -echo WRAPPER_HOME must be set. -echo Please check your Tanuki Java Service wrapper installation. -goto :eof diff --git a/jonas/assemblies/binaries/src/main/resources/bin/joram_raconfig b/jonas/assemblies/binaries/src/main/resources/bin/joram_raconfig deleted file mode 100644 index 63f7f14fc72c36c5fd1cf0dbd2566bc7aa82c3ad..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/joram_raconfig +++ /dev/null @@ -1,117 +0,0 @@ -#! /bin/sh -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 1999-2011 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# Initial developer(s): Philippe Durieux -# Contributor(s): ______________________________________. -# -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -# Check JONAS_ROOT is set. -if [ ! -d $JONAS_ROOT/deploy ] -then - echo "JONAS_ROOT must be set" - exit 1 -fi - -# Set CLASSPATH and JONAS_BASE -. $JONAS_ROOT/bin/setenv - -# Locate the JORAM ResourceAdapter to configure -RA_LOCATION=repositories/maven2-internal/org/objectweb/joram/joram-jca-jonas/${joram.version}/joram-jca-jonas-${joram.version}.rar -if [ -f $JONAS_BASE/$RA_LOCATION ]; then - RARJORAM=$JONAS_BASE/$RA_LOCATION; -else - if [ -f $JONAS_BASE/joram_ra_for_jonas.rar ]; then - RARJORAM=$JONAS_BASE/joram_ra_for_jonas.rar; - fi -fi - -if ([ "$RARJORAM" = "" ] || [ ! -f $RARJORAM ]); then - echo "[ERROR] Cannot find a JORAM Resource Adapter file to process."; - echo "Expected locations:"; - echo " * $JONAS_BASE/$RA_LOCATION (newjb generated base)"; - echo " * $JONAS_BASE/joram_ra_for_jonas.rar"; - echo "Notice that the JORAM RA is automatically placed at the right location by 'newjb' when generating a new JONAS_BASE"; - exit 1 ; -fi - -PRM="false"; -PORT=16010; -HOST=localhost; -SERVER=0; -export PRM PORT HOST SERVER - -while [ "$#" -gt 0 ] -do - case "$1" in - -p) - shift - PORT=$1; - PRM="true"; - ;; - -h) - shift - HOST=$1; - PRM="true"; - ;; - -s) - shift - SERVER=$1; - PRM="true"; - ;; - -v) - shift - export VERBOSE=$1; - ;; - *) - shift - ;; - esac -done - -if [ "$PRM" = "false" ] -then - echo "Usage : $0 -p -h -s "; - exit 1; -fi - -echo "Target JORAM Resource Adapter: $RARJORAM" - -JAVA_OPTS="$JAVA_OPTS \ - -Djonas.root=$JONAS_ROOT \ - -Djonas.base=$JONAS_BASE \ - -Djava.security.manager \ - -Djava.security.policy=$JONAS_BASE/conf/java.policy \ - -Djava.endorsed.dirs=$JONAS_ROOT/lib/endorsed \ -" -# add /client-bootstrap.jar to the classpath for the bootstrap class -JONAS_CLASSPATH=$JONAS_CLASSPATH$SPS$JONAS_ROOT/lib/bootstrap/client-bootstrap.jar$SPS$JONAS_ROOT/lib/jonas-generators-raconfig.jar$SPS$JONAS_ROOT/lib/client.jar - -$JAVA -cp $JONAS_CLASSPATH \ - $JAVA_OPTS \ - org.ow2.jonas.client.boot.Bootstrap org.objectweb.joram.client.connector.utils.RAConfig \ - -rar $RARJORAM \ - -uhp $HOST $PORT $SERVER \ - -conf $JONAS_BASE/conf \ - $VERBOSE - diff --git a/jonas/assemblies/binaries/src/main/resources/bin/joram_raconfig.bat b/jonas/assemblies/binaries/src/main/resources/bin/joram_raconfig.bat deleted file mode 100755 index 30c47ac990a426e3cffc2b20c75136b92e42f89b..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/joram_raconfig.bat +++ /dev/null @@ -1,134 +0,0 @@ -@Echo Off -Rem --------------------------------------------------------------------------- -Rem JOnAS: Java(TM) Open Application Server -Rem Copyright (C) 1999-2008 Bull S.A.S. -Rem Contact: jonas-team@ow2.org -Rem -Rem This library is free software; you can redistribute it and/or -Rem modify it under the terms of the GNU Lesser General Public -Rem License as published by the Free Software Foundation; either -Rem version 2.1 of the License, or any later version. -Rem -Rem This library is distributed in the hope that it will be useful, -Rem but WITHOUT ANY WARRANTY; without even the implied warranty of -Rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Rem Lesser General Public License for more details. -Rem -Rem You should have received a copy of the GNU Lesser General Public -Rem License along with this library; if not, write to the Free Software -Rem Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -Rem USA -Rem -Rem Initial developer(s): Nicolas Tachker -Rem --------------------------------------------------------------------------- -Rem $Id$ -Rem --------------------------------------------------------------------------- - -Rem Keep variables local to this script -setlocal ENABLEDELAYEDEXPANSION - -Rem --------------------------------------------- -Rem set environment -Rem --------------------------------------------- -if ["%JONAS_ROOT%"]==[""] goto setroot -call "%JONAS_ROOT%\bin\setenv.bat" - -REM Locate the JORAM ResourceAdapter to configure -set RA_LOCATION=repositories/maven2-internal/org/objectweb/joram/joram-jca-jonas/${joram.version}/joram-jca-jonas-${joram.version}.rar -if not exist "%JONAS_BASE%\%RA_LOCATION%" goto compatibility_rar -Set RARJORAM=%JONAS_BASE%\%RA_LOCATION% - -Rem Marker that help to come back at the beggining of the script when we tryed to use the compatibility rar -:joram_rar_available - -set HOST=localhost -set PORT=16010 -set SERVER=0 - -Rem --------------------------------------------- -Rem Get args -Rem --------------------------------------------- -if [%1]==[] goto no_arg - -:loop_on_args -Set VALUE=%~1 -if [%1]==[-p] goto port_arg -if [%1]==[-h] goto host_arg -if [%1]==[-s] goto sid_arg -if [%1]==[-v] goto verbose -set ARGS=%ARGS% %1 -goto next_arg - -:port_arg -shift -if [%1]==[] goto usage -set PORT=%1 -goto next_arg - -:host_arg -shift -if [%1]==[] goto usage -set HOST=%1 -goto next_arg - -:sid_arg -shift -if [%1]==[] goto usage -set SERVER=%1 -goto next_arg - -:verbose -shift -set VERBOSE=-v -goto next_arg - -:next_arg -shift -if not [%1]==[] goto loop_on_args - -Rem --------------------------------------------- -Rem set JAVA_OPTS -Rem --------------------------------------------- -Set JAVA_OPTS=%JAVA_OPTS% -Djonas.root="%JONAS_ROOT%" -Set JAVA_OPTS=%JAVA_OPTS% -Djonas.base="%JONAS_BASE%" -Set JAVA_OPTS=%JAVA_OPTS% -Djava.security.manager -Djava.security.policy="%JONAS_BASE%\conf\java.policy" -Set JAVA_OPTS=%JAVA_OPTS% -Djava.endorsed.dirs="%JONAS_ROOT%\lib\endorsed" - -Rem Update classpath -Set JONAS_CLASSPATH=%JONAS_ROOT%\lib\bootstrap\client-bootstrap.jar;%JONAS_ROOT%\lib\jonas-generators-raconfig.jar;%JONAS_ROOT%\lib\client.jar;%JONAS_CLASSPATH% - -Rem --------------------------------------------- -Rem start Joram RAConfig -Rem --------------------------------------------- -echo "Target JORAM Resource Adapter: %RARJORAM%" -%JAVA% %JAVA_OPTS% -cp "%JONAS_CLASSPATH%" org.ow2.jonas.client.boot.Bootstrap org.objectweb.joram.client.connector.utils.RAConfig -rar "%RARJORAM%" -uhp %HOST% %PORT% %SERVER% -conf "%JONAS_BASE%\conf" %VERBOSE% -goto :EOF - -:setjava -echo JAVA_HOME not set. -goto :EOF - -:no_arg -echo No arguments specified. -goto usage - -:usage -echo "Usage : joram_raconfig.bat -p -h -s " -goto :EOF - -:setroot -echo JONAS_ROOT not set. -goto :EOF - -:setrar -echo "[ERROR] Cannot find a JORAM Resource Adapter file to process."; -echo "Expected locations:"; -echo " * %JONAS_BASE%\%RA_LOCATION% (newjb generated base)"; -echo " * %JONAS_BASE%\joram_ra_for_jonas.rar"; -echo "Notice that the JORAM RA is automatically placed at the right location by 'newjb' when generating a new JONAS_BASE"; -goto :EOF - -:compatibility_rar -if not exist "%JONAS_BASE%\joram_ra_for_jonas.rar" goto setrar -Set RARJORAM=%JONAS_BASE%\joram_ra_for_jonas.rar -goto joram_rar_available diff --git a/jonas/assemblies/binaries/src/main/resources/bin/newjb b/jonas/assemblies/binaries/src/main/resources/bin/newjb deleted file mode 100644 index 402777fa538c130cbab9a86538e1298111fa6989..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/newjb +++ /dev/null @@ -1,90 +0,0 @@ -#!/bin/sh -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 1999-2008 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# Initial developer(s): Florent Benoit -# Contributor(s): Benoit Pelletier -# --------------------------------------------------------------------------- -# $Id:newjb 12758 2008-01-31 10:23:26Z durieuxp $ -# --------------------------------------------------------------------------- - -# ----------------------------------------------------------------------- -# Compute JONAS_ROOT in case it has not been set. -# ----------------------------------------------------------------------- -if [ ! -d $JONAS_ROOT/deploy ]; then - - # We know that the 'jonas' command is located at /bin/jonas - # So we can try to be smart enough and deduce the JONAS_ROOT value from that info :) - - # Remove bin/jonas from the command path - relative_directory=`dirname $0` - relative_directory=`dirname $relative_directory` - - # Keep old position - old_position=`pwd` - - # As the relative path is relative from the current location, we can cd into it ... - cd $relative_directory - # ... and then get the absolute path - absolute_directory=`pwd` - - # Come back into the old position - cd $old_position - - # Before accepting that value as is, check if that's a real JONAS_ROOT - if [ ! -d $absolute_directory/deploy ]; then - echo "Cannot deduce JONAS_ROOT value from $0." - exit 1 - fi - - # Set the JONAS_ROOT variable - JONAS_ROOT=$absolute_directory - export JONAS_ROOT -fi - -i=0 -while [ -z "$JONAS_BASE" ] -do - if [ $i -eq 3 ] - then - exit 1 - fi -echo "JONAS_BASE not set. Please enter a JONAS_BASE: " -read JONAS_BASE -i=`expr $i + 1` -done -export JONAS_BASE - -# ----------------------------------------------------------------------- -# Debugging properties -#ANT_OPTS="$ANT_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=4143,suspend=y" -# ----------------------------------------------------------------------- - -# Force endorsed directory for the ant process -# Ensure that the XML parser used is recent enough -ANT_OPTS="$ANT_OPTS -Djava.endorsed.dirs=$JONAS_ROOT/lib/endorsed" -export ANT_OPTS - -# creation d'un cluster daemon demandee -if [ "$1" = "-cd" ]; then - ant -file $JONAS_ROOT/templates/newjb/build-jb.xml create_jonas_clusterDaemon -else - ant -file $JONAS_ROOT/templates/newjb/build-jb.xml -fi diff --git a/jonas/assemblies/binaries/src/main/resources/bin/newjb.bat b/jonas/assemblies/binaries/src/main/resources/bin/newjb.bat deleted file mode 100755 index 6c81489250613d865e7106e0a0629073fab02b5a..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/newjb.bat +++ /dev/null @@ -1,54 +0,0 @@ -@Echo Off - -Rem --------------------------------------------------------------------------- -Rem JOnAS: Java(TM) Open Application Server -Rem Copyright (C) 1999-2009 Bull S.A.S. -Rem Contact: jonas-team@ow2.org -Rem -Rem This library is free software; you can redistribute it and/or -Rem modify it under the terms of the GNU Lesser General Public -Rem License as published by the Free Software Foundation; either -Rem version 2.1 of the License, or any later version. -Rem -Rem This library is distributed in the hope that it will be useful, -Rem but WITHOUT ANY WARRANTY; without even the implied warranty of -Rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Rem Lesser General Public License for more details. -Rem -Rem You should have received a copy of the GNU Lesser General Public -Rem License along with this library; if not, write to the Free Software -Rem Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -Rem USA -Rem -Rem Initial developer(s): Benoit Pelletier -Rem Contributor(s): Shenheng Liang -Rem --------------------------------------------------------------------------- -Rem $Id$ -Rem --------------------------------------------------------------------------- - -setlocal - -Rem set the Environment Variables -if ["%JONAS_ROOT%"]==[""] goto setroot -if ["%JONAS_BASE%"]==[""] goto setbase - -Rem Force endorsed directory for the ant process -Rem Ensure that the XML parser used is recent enough -set ANT_OPTS=%ANT_OPTS% -Djava.endorsed.dirs="%JONAS_ROOT%\lib\endorsed" - -if "%1" == "-cd" goto cd_call - -call ant -file "%JONAS_ROOT%\templates\newjb\build-jb.xml" -goto :EOF - -:setroot -echo JONAS_ROOT not set. -goto :EOF - -:setbase -echo JONAS_BASE not set. -goto :EOF - -:cd_call -call ant -file "%JONAS_ROOT%\templates\newjb\build-jb.xml" create_jonas_clusterDaemon -goto :EOF \ No newline at end of file diff --git a/jonas/assemblies/binaries/src/main/resources/bin/newjc b/jonas/assemblies/binaries/src/main/resources/bin/newjc deleted file mode 100644 index d96a171de3e314a13d21399732e8c0197e985fae..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/newjc +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 2005-2007 Bull S.A.S. -# Contact: jonas-team@objectweb.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# Initial developer(s): Benoit Pelletier -# Contributor(s): Nicolas Duvauchel -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- -echo $0 -if [ ! -d $JONAS_ROOT/lib ] -then - echo "JONAS_ROOT must be set" - exit 1 -fi - -NEWJCDIR=$JONAS_ROOT/templates/newjc; - -# Force endorsed directory for the ant process -# Ensure that the XML parser used is recent enough -ANT_OPTS="$ANT_OPTS -Djava.endorsed.dirs=$JONAS_ROOT/lib/endorsed" -export ANT_OPTS - -if [ $# -eq 0 ] -then - echo 1>&2 Mode Step by Step - ant -file $NEWJCDIR/build-jc.xml -Dsilence.mode="false" -else - if [ $1 = "-auto" ] - then - echo 1>&2 Mode Auto - ant -file $NEWJCDIR/build-jc.xml -Dsilence.mode="true" - fi -fi - - diff --git a/jonas/assemblies/binaries/src/main/resources/bin/newjc.bat b/jonas/assemblies/binaries/src/main/resources/bin/newjc.bat deleted file mode 100755 index dd76d10cd25c53dc42896bd583bb29092507b07b..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/newjc.bat +++ /dev/null @@ -1,106 +0,0 @@ -@echo off -:: --------------------------------------------------------------------------- -:: JOnAS: Java(TM) Open Application Server -:: Copyright (C) 2006-2009 Bull S.A.S. -:: Contact: jonas-team@objectweb.org -:: -:: This library is free software; you can redistribute it and/or -:: modify it under the terms of the GNU Lesser General Public -:: License as published by the Free Software Foundation; either -:: version 2.1 of the License, or any later version. -:: -:: This library is distributed in the hope that it will be useful, -:: but WITHOUT ANY WARRANTY; without even the implied warranty of -:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -:: Lesser General Public License for more details. -:: -:: You should have received a copy of the GNU Lesser General Public -:: License along with this library; if not, write to the Free Software -:: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -:: USA -:: -:: Initial developer(s): Benoit Pelletier -:: Contributor(s): -:: --------------------------------------------------------------------------- -:: $Id$ -:: --------------------------------------------------------------------------- -Rem Keep variables local to this script -setlocal ENABLEDELAYEDEXPANSION - -if [%JONAS_ROOT%]==[] goto setroot - -set NEWJCDIR=%JONAS_ROOT%\templates\newjc - -Rem Force endorsed directory for the ant process -Rem Ensure that the XML parser used is recent enough -set ANT_OPTS=%ANT_OPTS% -Djava.endorsed.dirs="%JONAS_ROOT%\lib\endorsed" - -if [%1]==[] goto no_arg - -Rem --------------------------------------------- -Rem Set the silence mode required -Rem --------------------------------------------- -:arg -if [%1]==[-auto] goto auto_mode -if [%1]==[-debug] goto debug_arg -goto end - - -:execute -call ant -file "%NEWJCDIR%\build-jc.xml" %SILENCE_MODE% -goto end - -:auto_mode -echo Mode Auto -set SILENCE_MODE=%SILENCE_MODE% -Dsilence.mode="true" -goto next_arg - -:next_arg -shift -if not [%1]==[] goto arg -goto execute - - -Rem --------------------------------------------- -Rem No arg, silence mode by default -Rem --------------------------------------------- - -:no_arg -echo Mode Step by Step -set SILENCE_MODE=%SILENCE_MODE% -Dsilence.mode="false" -goto execute -goto end - -:setroot -echo JONAS_ROOT not set. -goto end - - -:debug_usage -echo -debug option parameters are : "-debug -p [-s ]" -goto end - -:set_debug_opts -echo newjc Debug Info : -echo listening on port : %DEBUG_PORT% -echo suspend mode : %DEBUG_SUSPEND% -set ANT_OPTS=%ANT_OPTS% -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=%DEBUG_PORT%,suspend=%DEBUG_SUSPEND% -goto next_arg - -:debug_arg -shift -if not [%1]==[-p] goto debug_usage -shift -set DEBUG_PORT=%1 -set DEBUG_SUSPEND=n -shift -shift -if [%1]==[y] goto set_debug_suspend -goto set_debug_opts - -:set_debug_suspend -set DEBUG_SUSPEND=%1 -goto set_debug_opts - -:end -goto :EOF \ No newline at end of file diff --git a/jonas/assemblies/binaries/src/main/resources/bin/probeJgroups b/jonas/assemblies/binaries/src/main/resources/bin/probeJgroups deleted file mode 100644 index d27a036cedf173b56876356d2bad98c8665ebcd0..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/probeJgroups +++ /dev/null @@ -1,53 +0,0 @@ -#! /bin/sh -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 1999-2009 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# Initial developer(s): Philippe Durieux -# Contributor(s): ______________________________________. -# -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -# Check JONAS_ROOT is set. -if [ ! -d $JONAS_ROOT/deploy ] -then - echo "JONAS_ROOT must be set" - exit 1 -fi - -# Set CLASSPATH and JONAS_BASE -. $JONAS_ROOT/bin/setenv - -JAVA_OPTS="$JAVA_OPTS \ - -Djonas.root=$JONAS_ROOT \ - -Djonas.base=$JONAS_BASE \ - -Djava.security.manager \ - -Djava.security.policy=$JONAS_BASE/conf/java.policy \ - -Djava.endorsed.dirs=$JONAS_ROOT/lib/endorsed \ -" - -# Find jar with the jgroups classes -JGROUPSLIB=`find $JONAS_ROOT/repositories -name ow2-bundles-externals-jgroups*.jar` - -# add /client-bootstrap.jar to the classpath for the bootstrap class -JONAS_CLASSPATH=$JONAS_CLASSPATH$SPS$JONAS_ROOT/lib/bootstrap/client-bootstrap.jar$SPS$JGROUPSLIB - -$JAVA -cp $JONAS_CLASSPATH $JAVA_OPTS org.ow2.jonas.client.boot.Bootstrap org.jgroups.tests.Probe -timeout 500 $* diff --git a/jonas/assemblies/binaries/src/main/resources/bin/probeJgroups.bat b/jonas/assemblies/binaries/src/main/resources/bin/probeJgroups.bat deleted file mode 100755 index 77d418ab3918ae522b5a8f9dbfca692d544d1cec..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/probeJgroups.bat +++ /dev/null @@ -1,69 +0,0 @@ -@Echo Off -Rem --------------------------------------------------------------------------- -Rem JOnAS: Java(TM) Open Application Server -Rem Copyright (C) 1999-2009 Bull S.A.S. -Rem Contact: jonas-team@ow2.org -Rem -Rem This library is free software; you can redistribute it and/or -Rem modify it under the terms of the GNU Lesser General Public -Rem License as published by the Free Software Foundation; either -Rem version 2.1 of the License, or any later version. -Rem -Rem This library is distributed in the hope that it will be useful, -Rem but WITHOUT ANY WARRANTY; without even the implied warranty of -Rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Rem Lesser General Public License for more details. -Rem -Rem You should have received a copy of the GNU Lesser General Public -Rem License along with this library; if not, write to the Free Software -Rem Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -Rem USA -Rem -Rem --------------------------------------------------------------------------- -Rem $Id$ -Rem --------------------------------------------------------------------------- - -Rem Keep variables local to this script -setlocal ENABLEDELAYEDEXPANSION - -Rem --------------------------------------------- -Rem set environment -Rem --------------------------------------------- -if ["%JONAS_ROOT%"]==[""] goto setroot -call "%JONAS_ROOT%\bin\setenv.bat" - -Rem --------------------------------------------- -Rem set JAVA_OPTS -Rem --------------------------------------------- -Set JAVA_OPTS=%JAVA_OPTS% -Djonas.root="%JONAS_ROOT%" -Set JAVA_OPTS=%JAVA_OPTS% -Djonas.base="%JONAS_BASE%" -Set JAVA_OPTS=%JAVA_OPTS% -Djava.security.manager -Djava.security.policy="%JONAS_BASE%\conf\java.policy" -Set JAVA_OPTS=%JAVA_OPTS% -Djava.endorsed.dirs="%JONAS_ROOT%\lib\endorsed" - -Rem --------------------------------------------- -Rem include jgroups class -Rem THIS MUST BE UPDATED FOR WINDOWS !!!!!!!!!!!! -Rem unix: JGROUPSLIB=`find $JONAS_ROOT/repositories -name ow2-bundles-externals-jgroups*.jar` -Rem --------------------------------------------- -Rem Setting JGroups libraries. -for /r %JONAS_ROOT%/repositories %%i in (ow2-bundles-externals-jgroups*.jar) do (set JGROUPSLIB=%%i %JGROUPSLIB%) - - - -Set JONAS_CLASSPATH=%JGROUPSLIB%;%JONAS_CLASSPATH% - -Rem --------------------------------------------- -Rem Run java command -Rem --------------------------------------------- -Set JONAS_CLASSPATH=%JONAS_CLASSPATH%;%JONAS_ROOT%\lib\bootstrap\client-bootstrap.jar - -%JAVA% %JAVA_OPTS% -cp "%JONAS_CLASSPATH%" org.ow2.jonas.client.boot.Bootstrap org.jgroups.tests.Probe -timeout 500 %1 %2 %3 %4 %5 %6 %7 %8 %9 -goto :EOF - -:setjava -echo JAVA_HOME not set. -goto :EOF - -:setroot -echo JONAS_ROOT not set. -goto :EOF diff --git a/jonas/assemblies/binaries/src/main/resources/bin/registry b/jonas/assemblies/binaries/src/main/resources/bin/registry deleted file mode 100644 index 00f733e37f748c3361003bee82950c146995c218..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/registry +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 1999-2009 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# Initial developer(s): Philippe Durieux -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -# This command is deprecated. -# Use "jonas start -standby" instead. -jonas start -standby diff --git a/jonas/assemblies/binaries/src/main/resources/bin/registry.bat b/jonas/assemblies/binaries/src/main/resources/bin/registry.bat deleted file mode 100755 index a5580e19eac94e3261507055544e9fa201f8bc2e..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/registry.bat +++ /dev/null @@ -1,31 +0,0 @@ -@Echo Off - -Rem --------------------------------------------------------------------------- -Rem JOnAS: Java(TM) Open Application Server -Rem Copyright (C) 1999-2009 Bull S.A.S. -Rem Contact: jonas-team@ow2.org -Rem -Rem This library is free software; you can redistribute it and/or -Rem modify it under the terms of the GNU Lesser General Public -Rem License as published by the Free Software Foundation; either -Rem version 2.1 of the License, or any later version. -Rem -Rem This library is distributed in the hope that it will be useful, -Rem but WITHOUT ANY WARRANTY; without even the implied warranty of -Rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Rem Lesser General Public License for more details. -Rem -Rem You should have received a copy of the GNU Lesser General Public -Rem License along with this library; if not, write to the Free Software -Rem Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -Rem USA -Rem -Rem Initial developer(s): -Rem -Rem --------------------------------------------------------------------------- -Rem $Id$ -Rem --------------------------------------------------------------------------- - -Rem This command is deprecated. -Rem Use jonas start -standby instead. -jonas start -standby diff --git a/jonas/assemblies/binaries/src/main/resources/bin/setenv b/jonas/assemblies/binaries/src/main/resources/bin/setenv deleted file mode 100644 index 57beef2d91e3b71d23eec57b65b52c9135367dcd..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/setenv +++ /dev/null @@ -1,138 +0,0 @@ -#! /bin/sh -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 1999-2009 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# Initial developer(s): Philippe Durieux -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -# ----------------------------------------------------------------------- -# Check JONAS_ROOT is set. -# ----------------------------------------------------------------------- -if [ ! -d $JONAS_ROOT/repositories ] -then - echo "JONAS_ROOT must be set" - exit 1 -fi - -# ----------------------------------------------------------------------- -# Check JONAS_BASE is set. Set it to JONAS_ROOT if not set. -# ----------------------------------------------------------------------- -if [ -z "$JONAS_BASE" ] -then - JONAS_BASE=$JONAS_ROOT - export JONAS_BASE -fi - -# --------------------------- -# Resolve links -# --------------------------- - -# Do the same stuff than readlink -f but using standard sh commands -# On some Unix systems, readlink -f is not supported -readlink_f() { - # if $1 is a file remove the possible last / - dname=`dirname "$1"` - bname=`basename "$1"` - noslash="$dname"/"$bname" - - linktofile=`read_last_link "$noslash"` # `basename linktofile` is not a link - dna=`dirname "$linktofile"` - # res=the sure path (1 by 1 add no symb link) - res=`basename "$linktofile"` - - while ([ "$dna" != "/" ] && [ "$dna" != "." ]) # Finished if . or / (loop) - do - if [ -L "$dna" ] - then - dna=`read_last_link "$dna"` # last directory is not a link - fi - # basename $dna is not a symbolic link, we can add it to res - res=`basename "$dna"`/"$res" - dna=`dirname "$dna"` - done - if ([ "$dna" = "/" ] && [ "$res" != '/' ]) - then - res=/"$res"; - fi - D=`dirname "$res"` - B=`basename "$res"` - res="`cd \"$D\" 2>/dev/null && pwd || echo \"$D\"`/$B" - echo $res -} - -# ensure that the basename of result will not be a link -read_last_link() { - res="$1" - while [ -L "$res" ] - do - ls=`ls -ld "$res"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null - then # if absolute link (begin with /) - res="$link" - else # if relative link (not begin with /) - rel=`dirname "$res"` - res="$rel"/"$link" - fi - done - echo $res -} -JONAS_ROOT=`readlink_f $JONAS_ROOT` -JONAS_BASE=`readlink_f $JONAS_BASE` - - -# must be : for Unix, \; for CygWin on NT -SPS=: - -# ----------------------------------------------------------------------- -# JAVA setup -# We try to use first the java JVM in JAVA_HOME and if not found, -# we use the one found in the path. -# ----------------------------------------------------------------------- -if [ -z "$JAVA" ]; then - if [ -z "$JAVA_HOME" ] - then - JAVA=java - JAVAC=javac - else - JAVA=$JAVA_HOME/bin/java - JAVAC=$JAVA_HOME/bin/javac - fi - export JAVA JAVAC -fi - - -# You can specify additional options to give to the Java JVM in the -# JAVA_OPTS environment variable. -export JAVA_OPTS - -# ----------------------------------------------------------------------- -# Take always the JOnAS configuration files in $JONAS_BASE/conf -# So it must be before the $JONAS_CLASSPATH (if carol.properties is redefined elsewhere) -# ----------------------------------------------------------------------- -if [ "$JONAS_CLASSPATH" = "" ]; then - JONAS_CLASSPATH=$JONAS_BASE/conf -else - JONAS_CLASSPATH=$JONAS_BASE/conf$SPS$JONAS_CLASSPATH -fi - -export JONAS_CLASSPATH diff --git a/jonas/assemblies/binaries/src/main/resources/bin/setenv.bat b/jonas/assemblies/binaries/src/main/resources/bin/setenv.bat deleted file mode 100755 index 4f22b8d28ccf4882bb6bcab67b2073c00ca6e181..0000000000000000000000000000000000000000 --- a/jonas/assemblies/binaries/src/main/resources/bin/setenv.bat +++ /dev/null @@ -1,51 +0,0 @@ -@Echo Off - -Rem --------------------------------------------------------------------------- -Rem JOnAS: Java(TM) Open Application Server -Rem Copyright (C) 1999-2008 Bull S.A.S. -Rem Contact: jonas-team@ow2.org -Rem -Rem This library is free software; you can redistribute it and/or -Rem modify it under the terms of the GNU Lesser General Public -Rem License as published by the Free Software Foundation; either -Rem version 2.1 of the License, or any later version. -Rem -Rem This library is distributed in the hope that it will be useful, -Rem but WITHOUT ANY WARRANTY; without even the implied warranty of -Rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Rem Lesser General Public License for more details. -Rem -Rem You should have received a copy of the GNU Lesser General Public -Rem License along with this library; if not, write to the Free Software -Rem Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -Rem USA -Rem -Rem Initial developer(s): Philippe Durieux -Rem Contributor(s): Miroslav Halas -Rem --------------------------------------------------------------------------- -Rem $Id$ -Rem --------------------------------------------------------------------------- - - -Rem check JONAS_ROOT and JONAS_BASE -if ["%JONAS_ROOT%"]==[""] goto setroot -if ["%JONAS_BASE%"]==[""] set JONAS_BASE=%JONAS_ROOT% - -Rem ---------- -Rem JAVA setup -Rem ---------- -Rem We try to use first the java JVM in JAVA_HOME and if not found, -Rem we use the one found in the path. -Rem You can specify additional options to give to the Java JVM in the -Rem JAVA_OPTS environment variable. -Rem JAVA_HOME must be set since config_env.bat requires it for tools.jar -set JAVA="%JAVA_HOME%\bin\java.exe" -set JAVAC="%JAVA_HOME%\bin\javac.exe" -Rem For JOnAS configuration files (carol.properties, trace.properties, ...) -Rem must be before the CLASSPATH (if carol.properties is redefined elsewhere) -set JONAS_CLASSPATH=%JONAS_BASE%\conf;%JONAS_CLASSPATH% -goto :EOF - -:setroot -echo JONAS_ROOT must be set. -goto :EOF diff --git a/jonas/assemblies/client-jar/pom.xml b/jonas/assemblies/client-jar/pom.xml deleted file mode 100644 index e5bc1bcdaa579b3c2ae35e55051e8f8c61df5e6e..0000000000000000000000000000000000000000 --- a/jonas/assemblies/client-jar/pom.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - org.ow2.jonas - assemblies - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas.assemblies - client-jar - JOnAS :: Assemblies :: Client JAR - - - - - maven-dependency-plugin - - - verify - - unpack - - - - - org.ow2.jonas.assemblies.profiles - jonas-full - ${project.version} - bin - zip - ${project.build.directory} - - - true - true - - jonas-full-${project.version}/lib/client.jar - - - - - - - maven-antrun-plugin - - - verify - - - - - - - - run - - - - - - - diff --git a/jonas/assemblies/client-jar/src/main/resources/README b/jonas/assemblies/client-jar/src/main/resources/README deleted file mode 100644 index 491c648e0cf0c3a214b396ee22bd70722efee1b5..0000000000000000000000000000000000000000 --- a/jonas/assemblies/client-jar/src/main/resources/README +++ /dev/null @@ -1 +0,0 @@ -This is a maven packaging of JONAS_ROOT/lib/Client.jar diff --git a/jonas/assemblies/configuration/pom.xml b/jonas/assemblies/configuration/pom.xml deleted file mode 100644 index 6ad58107f80c55dc0c19d49c385bdc6c58bb9282..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/pom.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - org.ow2.jonas - assemblies - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas.assemblies - configuration - JOnAS :: Assemblies :: Configuration - - - - - - src/main/resources - true - - conf/banner.txt - - - - - src/main/resources - false - - conf/banner.txt - - - - - - diff --git a/jonas/assemblies/configuration/src/main/resources/conf/FirebirdSQL.properties b/jonas/assemblies/configuration/src/main/resources/conf/FirebirdSQL.properties deleted file mode 100644 index a1142ff46a9b16e42955cba6f2ba98b73e7dda8c..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/FirebirdSQL.properties +++ /dev/null @@ -1,60 +0,0 @@ -###################### FireBird DataSource configuration example -# - - -##### -# DataSource configuration -# -datasource.name jdbc_1 -datasource.url jdbc:firebirdsql:/// - -datasource.classname org.firebirdsql.jdbc.FBDriver -datasource.username -datasource.password -datasource.isolationlevel read_committed -datasource.mapper rdb.firebird - - -##### -# ConnectionManager configuration -# - -# JDBC connection checking level. -# 0 = no special checking -# 1 = check physical connection is still open before reusing it -# 2 = try every connection before reusing it -jdbc.connchecklevel 0 - -# Max age for jdbc connections -# nb of minutes a connection can be kept in the pool -jdbc.connmaxage 1440 - -# Maximum time (in mn) a connection can be left busy. -# If the caller has not issued a close() during this time, the connection -# will be closed automatically. -jdbc.maxopentime 60 - -# Test statement -jdbc.connteststmt select * from rdb$types - -# JDBC Connection Pool size. -# Limiting the max pool size avoids errors from database. -jdbc.minconpool 10 -jdbc.maxconpool 30 - -# Sampling period for JDBC monitoring : -# nb of seconds between 2 measures. -jdbc.samplingperiod 30 - -# nb of seconds between 2 pool adjustement -jdbc.adjustperiod 60 - -# Maximum time (in seconds) to wait for a connection in case of shortage. -# This may occur only when maxconpool is reached. -jdbc.maxwaittime 5 - -# Maximum of concurrent waiters for a JDBC Connection -# This may occur only when maxconpool is reached. -jdbc.maxwaiters 100 - - diff --git a/jonas/assemblies/configuration/src/main/resources/conf/HSQL1.properties b/jonas/assemblies/configuration/src/main/resources/conf/HSQL1.properties deleted file mode 100644 index 7d2a5eb9a274f414b2bf7699c2ba0cadc6635f5c..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/HSQL1.properties +++ /dev/null @@ -1,57 +0,0 @@ -###################### HSQLDB DataSource configuration example -# - - -##### -# DataSource configuration -# Replace db_jonas and jonas by appropriate values. -# -datasource.name jdbc_1 -datasource.url jdbc:hsqldb:hsql://localhost:9001/db_jonas -datasource.classname org.hsqldb.jdbcDriver -datasource.username jonas -datasource.password jonas -datasource.mapper rdb.hsql - - -##### -# ConnectionManager configuration -# - -# JDBC connection checking level. -# 0 = no special checking -# 1 = check physical connection is still open before reusing it -# 2 = try every connection before reusing it -jdbc.connchecklevel 0 - -# Max age for jdbc connections -# nb of minutes a connection can be kept in the pool -jdbc.connmaxage 1440 - -# Maximum time (in mn) a connection can be left busy. -# If the caller has not issued a close() during this time, the connection -# will be closed automatically. -jdbc.maxopentime 60 - -# Test statement -jdbc.connteststmt select count(1) from information_schema.system_tables - -# JDBC Connection Pool size. -# Limiting the max pool size avoids errors from database. -jdbc.minconpool 10 -jdbc.maxconpool 100 - -# Sampling period for JDBC monitoring : -# nb of seconds between 2 measures. -jdbc.samplingperiod 30 - -# nb of seconds between 2 pool adjustement -jdbc.adjustperiod 60 - -# Maximum time (in seconds) to wait for a connection in case of shortage. -# This may occur only when maxconpool is reached. -jdbc.maxwaittime 5 - -# Maximum of concurrent waiters for a JDBC Connection -# This may occur only when maxconpool is reached. -jdbc.maxwaiters 100 diff --git a/jonas/assemblies/configuration/src/main/resources/conf/InstantDB1.properties b/jonas/assemblies/configuration/src/main/resources/conf/InstantDB1.properties deleted file mode 100644 index d41e13f1eb96174bec318a6135e02c29f314499e..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/InstantDB1.properties +++ /dev/null @@ -1,55 +0,0 @@ -####################### InstantDB DataSource configuration example -# - - -##### -# DataSource configuration -# -datasource.name jdbc_1 -datasource.url jdbc:idb=db1.prp -datasource.classname org.enhydra.instantdb.jdbc.idbDriver - - -##### -# ConnectionManager configuration -# - -# JDBC connection checking level. -# 0 = no special checking -# 1 = check physical connection is still open before reusing it -# 2 = try every connection before reusing it -jdbc.connchecklevel 0 - -# Max age for jdbc connections -# nb of minutes a connection can be kept in the pool -jdbc.connmaxage 1440 - -# Maximum time (in mn) a connection can be left busy. -# If the caller has not issued a close() during this time, the connection -# will be closed automatically. -jdbc.maxopentime 60 - -# Test statement -jdbc.connteststmt set date format "yyyy/mm/dd" - -# JDBC Connection Pool size. -# Limiting the max pool size avoids errors from database. -jdbc.minconpool 10 -jdbc.maxconpool 20 - -# Sampling period for JDBC monitoring : -# nb of seconds between 2 measures. -jdbc.samplingperiod 30 - -# nb of seconds between 2 pool adjustement -jdbc.adjustperiod 60 - -# Maximum time (in seconds) to wait for a connection in case of shortage. -# This may occur only when maxconpool is reached. -jdbc.maxwaittime 5 - -# Maximum of concurrent waiters for a JDBC Connection -# This may occur only when maxconpool is reached. -jdbc.maxwaiters 100 - - diff --git a/jonas/assemblies/configuration/src/main/resources/conf/InterBase1.properties b/jonas/assemblies/configuration/src/main/resources/conf/InterBase1.properties deleted file mode 100644 index 4789d6080d4f15aaede113e72b3f222dd8c86d8c..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/InterBase1.properties +++ /dev/null @@ -1,61 +0,0 @@ -###################### InterBase DataSource configuration example -# - - -##### -# DataSource configuration -# -datasource.name jdbc_1 -datasource.url jdbc:interbase:/// -#datasource.url jdbc:interbase://localhost//dbs/orders.gdb -#datasource.url jdbc:interbase://localhost/C:/dbs/orders.gdb -datasource.classname interbase.interclient.Driver -datasource.username -datasource.password -datasource.isolationlevel read_committed -datasource.mapper rdb.interbase - - -##### -# ConnectionManager configuration -# - -# JDBC connection checking level. -# 0 = no special checking -# 1 = check physical connection is still open before reusing it -# 2 = try every connection before reusing it -jdbc.connchecklevel 0 - -# Max age for jdbc connections -# nb of minutes a connection can be kept in the pool -jdbc.connmaxage 1440 - -# Maximum time (in mn) a connection can be left busy. -# If the caller has not issued a close() during this time, the connection -# will be closed automatically. -jdbc.maxopentime 60 - -# Test statement -jdbc.connteststmt select * from rdb$types - -# JDBC Connection Pool size. -# Limiting the max pool size avoids errors from database. -jdbc.minconpool 5 -jdbc.maxconpool 15 - -# Sampling period for JDBC monitoring : -# nb of seconds between 2 measures. -jdbc.samplingperiod 30 - -# nb of seconds between 2 pool adjustement -jdbc.adjustperiod 60 - -# Maximum time (in seconds) to wait for a connection in case of shortage. -# This may occur only when maxconpool is reached. -jdbc.maxwaittime 5 - -# Maximum of concurrent waiters for a JDBC Connection -# This may occur only when maxconpool is reached. -jdbc.maxwaiters 100 - - diff --git a/jonas/assemblies/configuration/src/main/resources/conf/MailMimePartDS1.properties b/jonas/assemblies/configuration/src/main/resources/conf/MailMimePartDS1.properties deleted file mode 100644 index b2385576f47a34c31156bee33e767706fe9bfed1..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/MailMimePartDS1.properties +++ /dev/null @@ -1,38 +0,0 @@ -####################### -## Required properties -####################### - -#Factory Name/Type -mail.factory.name mailMimePartDS_1 -mail.factory.type javax.mail.internet.MimePartDataSource - -######################## -## Optional properties -## Each line can be removed -####################### - -### Authentication -#mail.authentication.username -#mail.authentication.password - -### Session properties -#mail.debug -#mail.from -#mail.mime.address.strict -#mail.host -#mail.store.protocol -#mail.transport.protocol -#mail.user - -### For each protocol: imap, pop3, smtp,... -### Ovveride default values defined aboved -#mail..class -#mail..host -#mail..port -#mail..user - -#### MimePartDataSource properties -#mail.to -#mail.cc -#mail.bcc -#mail.subject diff --git a/jonas/assemblies/configuration/src/main/resources/conf/MailSession1.properties b/jonas/assemblies/configuration/src/main/resources/conf/MailSession1.properties deleted file mode 100644 index d3d1a24ac152eb3fb4ec4b5e0c793e526b70ecc2..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/MailSession1.properties +++ /dev/null @@ -1,32 +0,0 @@ -####################### -## Required properties -####################### - -#Factory Name/Type -mail.factory.name mailSession_1 -mail.factory.type javax.mail.Session - -######################## -## Optional properties -## Each line can be removed -####################### - -### Authentication -#mail.authentication.username -#mail.authentication.password - -### Session properties -#mail.debug -#mail.from -#mail.mime.address.strict -#mail.host -#mail.store.protocol -#mail.transport.protocol -#mail.user - -### For each protocol: imap, pop3, smtp,... -### Ovveride default values defined aboved -#mail..class -#mail..host -#mail..port -#mail..user diff --git a/jonas/assemblies/configuration/src/main/resources/conf/McKoi1.properties b/jonas/assemblies/configuration/src/main/resources/conf/McKoi1.properties deleted file mode 100644 index 65267d4b5b63062a2af98e3dc02b48e7aeb375ee..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/McKoi1.properties +++ /dev/null @@ -1,59 +0,0 @@ -###################### McKoi DataSource configuration example -# - - -##### -# DataSource configuration -# -datasource.name jdbc_1 -datasource.url jdbc:mckoi:// -datasource.classname com.mckoi.JDBCDriver -datasource.username -datasource.password -datasource.mapper rdb.mckoi - -##### -# ConnectionManager configuration -# - -# JDBC connection checking level. -# 0 = no special checking -# 1 = check physical connection is still open before reusing it -# 2 = try every connection before reusing it -jdbc.connchecklevel 0 - -# Max age for jdbc connections -# nb of minutes a connection can be kept in the pool -jdbc.connmaxage 1440 - -# Maximum time (in mn) a connection can be left busy. -# If the caller has not issued a close() during this time, the connection -# will be closed automatically. -jdbc.maxopentime 60 - -# Test statement -jdbc.connteststmt select 1 - -# JDBC Connection Pool size. -# Limiting the max pool size avoids errors from database. -jdbc.minconpool 10 -jdbc.maxconpool 30 - -# Sampling period for JDBC monitoring : -# nb of seconds between 2 measures. -jdbc.samplingperiod 30 - -# nb of seconds between 2 pool adjustement -jdbc.adjustperiod 60 - -# Maximum time (in seconds) to wait for a connection in case of shortage. -# This may occur only when maxconpool is reached. -jdbc.maxwaittime 5 - -# Maximum of concurrent waiters for a JDBC Connection -# This may occur only when maxconpool is reached. -jdbc.maxwaiters 100 - - -# Maximum number of Prepare Statements cached in a Connection -jdbc.pstmtmax 120 diff --git a/jonas/assemblies/configuration/src/main/resources/conf/MySQL.properties b/jonas/assemblies/configuration/src/main/resources/conf/MySQL.properties deleted file mode 100644 index 472cbf10a8224e3f2bcc1886cd0799e5b74a6ff5..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/MySQL.properties +++ /dev/null @@ -1,56 +0,0 @@ -###################### MySQL DataSource configuration example -# - -datasource.name jdbc_1 -datasource.url jdbc:mysql://localhost/db_jonas -datasource.classname org.gjt.mm.mysql.Driver -datasource.username -datasource.password -datasource.mapper rdb.mysql - - -##### -# ConnectionManager configuration -# - -# JDBC connection checking level. -# 0 = no special checking -# 1 = check physical connection is still open before reusing it -# 2 = try every connection before reusing it -jdbc.connchecklevel 0 - -# Max age for jdbc connections -# nb of minutes a connection can be kept in the pool -# By default mySQL has a timeout every 8 hours, use a value of 7h -jdbc.connmaxage 420 - -# Maximum time (in mn) a connection can be left busy. -# If the caller has not issued a close() during this time, the connection -# will be closed automatically. -jdbc.maxopentime 60 - -# Test statement -jdbc.connteststmt select 1 - -# JDBC Connection Pool size. -# Limiting the max pool size avoids errors from database. -jdbc.minconpool 10 -jdbc.maxconpool 30 - -# Sampling period for JDBC monitoring : -# nb of seconds between 2 measures. -jdbc.samplingperiod 30 - -# nb of seconds between 2 pool adjustement -jdbc.adjustperiod 60 - -# Maximum time (in seconds) to wait for a connection in case of shortage. -# This may occur only when maxconpool is reached. -jdbc.maxwaittime 5 - -# Maximum of concurrent waiters for a JDBC Connection -# This may occur only when maxconpool is reached. -jdbc.maxwaiters 100 - -# Maximum number of Prepare Statements cached in a Connection -jdbc.pstmtmax 120 diff --git a/jonas/assemblies/configuration/src/main/resources/conf/Oracle1.properties b/jonas/assemblies/configuration/src/main/resources/conf/Oracle1.properties deleted file mode 100644 index 1d755980a8fc82e4571b6c548eae69de5c97391b..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/Oracle1.properties +++ /dev/null @@ -1,59 +0,0 @@ -###################### Oracle DataSource configuration example -# - - -##### -# DataSource configuration -# -datasource.name jdbc_1 -datasource.url jdbc:oracle:thin:@:1521: -datasource.classname oracle.jdbc.driver.OracleDriver -datasource.username -datasource.password -datasource.mapper rdb.oracle - - -##### -# ConnectionManager configuration -# - -# JDBC connection checking level. -# 0 = no special checking -# 1 = check physical connection is still open before reusing it -# 2 = try every connection before reusing it -jdbc.connchecklevel 0 - -# Max age for jdbc connections -# nb of minutes a connection can be kept in the pool -jdbc.connmaxage 1440 - -# Maximum time (in mn) a connection can be left busy. -# If the caller has not issued a close() during this time, the connection -# will be closed automatically. -jdbc.maxopentime 60 - -# Test statement -jdbc.connteststmt select * from dual - -# JDBC Connection Pool size. -# Limiting the max pool size avoids errors from database. -jdbc.minconpool 10 -jdbc.maxconpool 30 - -# Sampling period for JDBC monitoring : -# nb of seconds between 2 measures. -jdbc.samplingperiod 30 - -# nb of seconds between 2 pool adjustement -jdbc.adjustperiod 60 - -# Maximum time (in seconds) to wait for a connection in case of shortage. -# This may occur only when maxconpool is reached. -jdbc.maxwaittime 5 - -# Maximum of concurrent waiters for a JDBC Connection -# This may occur only when maxconpool is reached. -jdbc.maxwaiters 100 - -# Maximum number of Prepare Statements cached in a Connection -jdbc.pstmtmax 120 diff --git a/jonas/assemblies/configuration/src/main/resources/conf/PostgreSQL1.properties b/jonas/assemblies/configuration/src/main/resources/conf/PostgreSQL1.properties deleted file mode 100644 index 157b09d226f386a24b5f8d65aceadc10d83bd13b..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/PostgreSQL1.properties +++ /dev/null @@ -1,61 +0,0 @@ -###################### PostgreSQL DataSource configuration example -# - - -##### -# DataSource configuration -# Replace db_jonas and jonas by appropriate values. -# -datasource.name jdbc_1 -datasource.url jdbc:postgresql://localhost:5432/db_jonas -datasource.classname org.postgresql.Driver -datasource.username jonas -datasource.password jonas -datasource.mapper rdb.postgres - - -##### -# ConnectionManager configuration -# - -# JDBC connection checking level. -# 0 = no special checking -# 1 = check physical connection is still open before reusing it -# 2 = try every connection before reusing it -jdbc.connchecklevel 0 - -# Max age for jdbc connections -# nb of minutes a connection can be kept in the pool -jdbc.connmaxage 1440 - -# Maximum time (in mn) a connection can be left busy. -# If the caller has not issued a close() during this time, the connection -# will be closed automatically. -jdbc.maxopentime 60 - -# Test statement -jdbc.connteststmt select 1 - -# JDBC Connection Pool size. -# Postgres accepts up to 30 connections. -# Limiting the max pool size avoids errors from database. -jdbc.minconpool 2 -jdbc.maxconpool 30 - -# Sampling period for JDBC monitoring : -# nb of seconds between 2 measures. -jdbc.samplingperiod 30 - -# nb of seconds between 2 pool adjustement -jdbc.adjustperiod 60 - -# Maximum time (in seconds) to wait for a connection in case of shortage. -# This may occur only when maxconpool is reached. -jdbc.maxwaittime 5 - -# Maximum of concurrent waiters for a JDBC Connection -# This may occur only when maxconpool is reached. -jdbc.maxwaiters 100 - -# Maximum number of Prepare Statements cached in a Connection -jdbc.pstmtmax 120 diff --git a/jonas/assemblies/configuration/src/main/resources/conf/Sybase1.properties b/jonas/assemblies/configuration/src/main/resources/conf/Sybase1.properties deleted file mode 100644 index 1a3b00ae351514c31469d848a73319862cdd9dd7..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/Sybase1.properties +++ /dev/null @@ -1,33 +0,0 @@ -###################### Sybase DataSource configuration example -# - - -##### -# DataSource configuration -# Replace jonas and pwdjonas by appropriate values. -# -datasource.name jdbc_1 -datasource.url jdbc:sybase:Tds:machineName:5000/jonas -datasource.classname com.sybase.jdbc2.jdbc.SybDriver -datasource.username jonas -datasource.password pwdjonas - -##### -# ConnectionManager configuration -# - -# JDBC connection checking level. -# 0 = no special checking -# 1 = check physical connection is still open before reusing it -# 2 = try every connection before reusing it -jdbc.connchecklevel 1 - -# Max age for jdbc connections -# nb of minutes a connection can be kept in the pool -jdbc.connmaxage 30 - -# Test statement -jdbc.connteststmt select 5 x, 2 y, "the product is", 5*2 Result - -# Maximum number of Prepare Statements cached in a Connection -jdbc.pstmtmax 120 diff --git a/jonas/assemblies/configuration/src/main/resources/conf/a3debug.cfg b/jonas/assemblies/configuration/src/main/resources/conf/a3debug.cfg deleted file mode 100644 index b58643fadeb17a4cddc9dfa450c6842cdd23cf6d..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/a3debug.cfg +++ /dev/null @@ -1,33 +0,0 @@ -log.config.classname org.objectweb.util.monolog.wrapper.javaLog.LoggerFactory - -# ----------------------------------------------------------------------- -# tty : console handler -# ----------------------------------------------------------------------- -handler.tty.type Console -handler.tty.output System.out -handler.tty.pattern %d : %O{1}.%M : %m%n - -# ----------------------------------------------------------------------- -# logf : rolling file handler -# ----------------------------------------------------------------------- -#handler.logf.type RollingFile -#handler.logf.output jonas.log -#handler.logf.pattern %d : %l : %h : %O{1}.%M : %m%n -#handler.logf.fileNumber 2 -#handler.logf.maxSize 10000 - -# ----------------------------------------------------------------------- -# logger definitions -# ----------------------------------------------------------------------- -logger.root.handler.0 tty -#logger.root.handler.1 logf - -logger.root.level ERROR - ------- -# JORAM -#------- -logger.fr.dyade.aaa.level ERROR - -#logger.org.objectweb.joram.client.jms.Client.level DEBUG -logger.org.objectweb.joram.client.Adapter.level DEBUG diff --git a/jonas/assemblies/configuration/src/main/resources/conf/a3servers.xml b/jonas/assemblies/configuration/src/main/resources/conf/a3servers.xml deleted file mode 100644 index b4b744f581ee5d64457716492159d524e1b24a9d..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/a3servers.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - diff --git a/jonas/assemblies/configuration/src/main/resources/conf/banner.txt b/jonas/assemblies/configuration/src/main/resources/conf/banner.txt deleted file mode 100644 index b43cd9d14ae6b9c49f32b5877a610d61f09dcb91..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/banner.txt +++ /dev/null @@ -1,3 +0,0 @@ - -OW2 JOnAS ${project.version} [ http://jonas.ow2.org / jonas@ow2.org ] - diff --git a/jonas/assemblies/configuration/src/main/resources/conf/carol.properties b/jonas/assemblies/configuration/src/main/resources/conf/carol.properties deleted file mode 100644 index 7f757f4caf33ae15e79d1718183769e539c0a8e2..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/carol.properties +++ /dev/null @@ -1,105 +0,0 @@ -# Copyright (C) 2002-2007 ObjectWeb -# -# CAROL: Common Architecture for RMI ObjectWeb Layer -# -# This library is developed inside the ObjectWeb Consortium, -# http://www.ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# -------------------------------------------------------------------------- -# $Id$ -# -------------------------------------------------------------------------- - -# jonas rmi activation (iiop, irmi, jrmp, lmi) -carol.protocols=jrmp - -# RMI IRMI URL -carol.irmi.url=rmi://localhost:1098 - -# RMI JRMP URL -carol.jrmp.url=rmi://localhost:1099 - -# RMI IIOP URL -carol.iiop.url=iiop://localhost:2001 - -# RMI LMI URL (no listening port) -carol.lmi.url=rmi://localhost:0 - - -###################################################################### -# Advanced Configuration for IRMI -###################################################################### -# Exported objects will listen on this port for remote method -# invocations. -#A value of 0 will cause a random port to be selected. -# This is the default value. -# Warning : if the port is set (not 0) with the value 'n', be aware that -# the port 'n + 1' will be used by the JMX server. -# So, for the firewall configuration, you have to open the port numbers 'n' -# and 'n+1'. -carol.irmi.server.port=0 - -# Use only a single interface when creating the registry -# (specified in carol.irmi.url property) -# Use all interfaces available [default configuration = false] -carol.irmi.interfaces.bind.single=false - -###################################################################### -# Advanced Configuration for JRMP -###################################################################### -# If true, local call with jrmp are optimized. If you get "ClassCastException -# with 2 beans in different jars, you should set it at "false". -carol.jvm.rmi.local.call=false - -# If true a local Naming context is used (to be used only with a collocated registry) -carol.jvm.rmi.local.registry=true - -# The value of this port is used to set the port of the objects listener. -# This allow to use this port for a firewall configuration. -# If registry and server are on same host, the two ports to open are the following and the registry port. -# 0 means random port [default configuration = 0] -carol.jrmp.server.port=0 - -# Use only a single interface when creating the registry -# (specified in carol.jrmp.url property) -# Use all interfaces available [default configuration = false] -carol.jrmp.interfaces.bind.single=false - - -###################################################################### -# Advanced Configuration for IIOP -###################################################################### -# The value of this port is used to set the port of the objects listener. -# This allow to use this port for a firewall configuration. -# If registry and server are on same host, the two ports to open are the following and the registry port. -# 0 means random port [default configuration = 0] -carol.iiop.server.port=0 - -# The value of this port is used to set the SSL port of the objects listener. -# Note that this port musn't not be set to 0 as it is used for CsiV2. -# but this port is used only if SSL mode is enable. -# So by default, there is no listener on this port -# [default configuration = not used] -carol.iiop.server.sslport=2003 - -# Delegate used by JOnAS for rmi-iiop protocol -carol.iiop.PortableRemoteObjectClass=org.ow2.jonas.registry.carol.delegate.JacORBPRODelegate - -###################################################################### -# Advanced JNDI Configuration -###################################################################### -carol.jndi.java.naming.factory.url.pkgs=org.ow2.jonas.lib.naming diff --git a/jonas/assemblies/configuration/src/main/resources/conf/classloader-default-filtering.xml b/jonas/assemblies/configuration/src/main/resources/conf/classloader-default-filtering.xml deleted file mode 100644 index 2407a5c4cba4dfdb5010bc542c9339d325659b4d..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/classloader-default-filtering.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - org.apache.commons.digester.* - org.springframework.* - - diff --git a/jonas/assemblies/configuration/src/main/resources/conf/clusterd.xml b/jonas/assemblies/configuration/src/main/resources/conf/clusterd.xml deleted file mode 100644 index e8f1ffdf98d7cd0be24883fc7e920ec4dec2e000..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/clusterd.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - cd - domainSample - loosely-coupled - - - JGroupsDiscovery - jgroups-discovery.xml - true - - - - - - - diff --git a/jonas/assemblies/configuration/src/main/resources/conf/cmi-config.xml b/jonas/assemblies/configuration/src/main/resources/conf/cmi-config.xml deleted file mode 100644 index e31b5ed91a046b04f75989f2c86f18beb957f69c..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/cmi-config.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/jonas/assemblies/configuration/src/main/resources/conf/db2.properties b/jonas/assemblies/configuration/src/main/resources/conf/db2.properties deleted file mode 100644 index 570a6031e8574f681ea6f34508f2edae0e2dbb56..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/db2.properties +++ /dev/null @@ -1,55 +0,0 @@ -###################### DB2 DataSource configuration example -# - -##### -# DataSource configuration -# -datasource.name jdbc_1 -datasource.url jdbc:db2://your.db.server:51000/db9 -datasource.classname COM.ibm.db2.jdbc.net.DB2Driver -datasource.username user -datasource.password pass -datasource.mapper rdb.db2 - - -##### -# ConnectionManager configuration -# - -# JDBC connection checking level. -# 0 = no special checking -# 1 = check physical connection is still open before reusing it -# 2 = try every connection before reusing it -jdbc.connchecklevel 0 - -# Max age for jdbc connections -# nb of minutes a connection can be kept in the pool -jdbc.connmaxage 1440 - -# Maximum time (in mn) a connection can be left busy. -# If the caller has not issued a close() during this time, the connection -# will be closed automatically. -jdbc.maxopentime 60 - -# Test statement - not sure this is correct ? -jdbc.connteststmt select 1 - -# JDBC Connection Pool size. -# Limiting the max pool size avoids errors from database. -jdbc.minconpool 10 -jdbc.maxconpool 30 - -# Sampling period for JDBC monitoring : -# nb of seconds between 2 measures. -jdbc.samplingperiod 30 - -# nb of seconds between 2 pool adjustement -jdbc.adjustperiod 60 - -# Maximum time (in seconds) to wait for a connection in case of shortage. -# This may occur only when maxconpool is reached. -jdbc.maxwaittime 8 - -# Maximum of concurrent waiters for a JDBC Connection -# This may occur only when maxconpool is reached. -jdbc.maxwaiters 100 diff --git a/jonas/assemblies/configuration/src/main/resources/conf/domain.xml b/jonas/assemblies/configuration/src/main/resources/conf/domain.xml deleted file mode 100644 index b32ce082e94a2d07105652980448d438c488096a..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/domain.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - A domain named jonas - - - - - - - - - - - - diff --git a/jonas/assemblies/configuration/src/main/resources/conf/env.sh.include b/jonas/assemblies/configuration/src/main/resources/conf/env.sh.include deleted file mode 100644 index 2526da3a4c7ecde9a29600104d43dd12b73d6a18..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/env.sh.include +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/sh -#set -xv -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 2006 Bull S.A.S. -# Contact: jonas-team@objectweb.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# Initial developer(s): Guillaume Sauthier -# -# --------------------------------------------------------------------------- -# $Id: env.sh.include 11267 2007-08-08 16:51:45Z sauthieg $ -# --------------------------------------------------------------------------- - -# Environment -# -------------------------------- -JONAS_ROOT=@JONAS_ROOT@ -export JONAS_ROOT -SERVER_NAME=jonas -export SERVER_NAME - -# Allow that script to be executed without hard-writing -# the JVM and Ant version to use -VAR_HOME_SET=@VAR_HOME_SET@ - -# Fix the JAVA_HOME value -if [ "$VAR_HOME_SET" = "true" ]; then -#JAVA_HOME=@JAVA_HOME@ -#export JAVA_HOME - echo -n -fi -# Fix the ANT_HOME value -if [ "$VAR_HOME_SET" = "true" ]; then -#ANT_HOME=@ANT_HOME@ -#export ANT_HOME - echo -n -fi - - -# JVM Memory options -# --------------------------------- -# example : 128m -INI_HEAP_SIZE="" -MAX_HEAP_SIZE="" -THREAD_STACK_SIZE="" - -[ "$INI_HEAP_SIZE" != "" ] && JAVA_OPTS=$JAVA_OPTS" -Xms"$INI_HEAP_SIZE -[ "$MAX_HEAP_SIZE" != "" ] && JAVA_OPTS=$JAVA_OPTS" -Xmx"$MAX_HEAP_SIZE -[ "$THREAD_STACK_SIZE" != "" ] && JAVA_OPTS=$JAVA_OPTS" -Xss"$THREAD_STACK_SIZE - -# JVM Misc Options -# -------------------------------- -# Uncomment the following line -#JAVA_OPTS=$JAVA_OPTS" -Dyour.property=value" - -export JAVA_OPTS - -# Classpath -# -------------------------------- -if [ "$CLASSPATH" != "" ]; then - S="\033[1;31m" - E="\033[0m" - printf "${S}Warning : CLASSPATH should be empty with JOnAS !$E\n" - printf "Please use ${S}JONAS_BASE/lib/apps$E or ${S}JONAS_BASE/lib/commons$E ...\n" -fi -# You may add jars here, but this is not recommended -CLASSPATH=$CLASSPATH -export CLASSPATH - -# Script Debug -# -------------------------------- -if [ "$ENV_DEBUG" = "yes" ]; then - echo "* -------------------------------------------" - echo "* Returned by $0 :" - echo "* JONAS_ROOT = $JONAS_ROOT" - echo "* SERVER_NAME = $SERVER_NAME" - echo "* JAVA_HOME = $JAVA_HOME" - echo "* ANT_HOME = $ANT_HOME" - echo "* JAVA_OPTS = $JAVA_OPTS" - echo "* CLASSPATH = $CLASSPATH" - echo "* -------------------------------------------" -fi diff --git a/jonas/assemblies/configuration/src/main/resources/conf/env.start.sh.include b/jonas/assemblies/configuration/src/main/resources/conf/env.start.sh.include deleted file mode 100644 index 23b384e8a856d7bc463c6a78e4120ea6c793e978..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/env.start.sh.include +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/sh -#set -xv -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 2006 Bull S.A.S. -# Contact: jonas-team@objectweb.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# Initial developer(s): Guillaume Sauthier -# -# --------------------------------------------------------------------------- -# $Id: env.start.sh.include 11267 2007-08-08 16:51:45Z sauthieg $ -# --------------------------------------------------------------------------- - - -# JVM Memory options -# --------------------------------- -# example : 128m -INI_HEAP_SIZE="256m" -MAX_HEAP_SIZE="256m" -THREAD_STACK_SIZE="" - -[ "$INI_HEAP_SIZE" != "" ] && JAVA_OPTS=$JAVA_OPTS" -Xms"$INI_HEAP_SIZE -[ "$MAX_HEAP_SIZE" != "" ] && JAVA_OPTS=$JAVA_OPTS" -Xmx"$MAX_HEAP_SIZE -[ "$THREAD_STACK_SIZE" != "" ] && JAVA_OPTS=$JAVA_OPTS" -Xss"$THREAD_STACK_SIZE - -# JVM Misc Options -# -------------------------------- -JAVA_OPTS=$JAVA_OPTS" -Djava.awt.headless=true" -export JAVA_OPTS - -# Classpath -# -------------------------------- -if [ "$CLASSPATH" != "" ]; then - S="\033[1;31m" - E="\033[0m" - printf "${S}Warning : CLASSPATH should be empty with JOnAS !$E\n" - printf "Please use ${S}JONAS_BASE/lib/apps$E or ${S}JONAS_BASE/lib/commons$E ...\n" -fi -# You may add jars here, but this is not recommended -CLASSPATH=$CLASSPATH -export CLASSPATH - -# Script Debug -# -------------------------------- -if [ "$ENV_DEBUG" = "yes" ]; then - echo "* -------------------------------------------" - echo "* Returned by $0 :" - echo "* JONAS_ROOT =$JONAS_ROOT" - echo "* SERVER_NAME =$SERVER_NAME" - echo "* JAVA_HOME =$JAVA_HOME" - echo "* ANT_HOME =$ANT_HOME" - echo "* JAVA_OPTS =$JAVA_OPTS" - echo "* CLASSPATH =$CLASSPATH" - echo "* -------------------------------------------" -fi diff --git a/jonas/assemblies/configuration/src/main/resources/conf/file1.properties b/jonas/assemblies/configuration/src/main/resources/conf/file1.properties deleted file mode 100644 index ee1546b012db3a2dd364e2de097bd67deac00099..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/file1.properties +++ /dev/null @@ -1,12 +0,0 @@ -# $Id$ - -# FileWSDLPublisher class -jonas.service.wsdl.class org.ow2.jonas.ws.publish.internal.file.FileWSDLPublisher - -# Directory where WSDLs will be copied -# If not set JONAS_BASE/wsdls will be used -# jonas.service.publish.file.directory /tmp - -# Encoding of the file (In respect with the platform JOnAS is running on) -# If not set default to UTF-8 -jonas.service.publish.file.encoding UTF-8 diff --git a/jonas/assemblies/configuration/src/main/resources/conf/initial-repositories.xml b/jonas/assemblies/configuration/src/main/resources/conf/initial-repositories.xml deleted file mode 100644 index 6ea7b453da044705c7a09b811f83d2e150e43442..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/initial-repositories.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - maven2 - http://repo1.maven.org/maven2/ - - - maven2 - http://maven.ow2.org/maven2/ - - - maven2 - http://maven.ow2.org/maven2-snapshot/ - - \ No newline at end of file diff --git a/jonas/assemblies/configuration/src/main/resources/conf/jaas.config b/jonas/assemblies/configuration/src/main/resources/conf/jaas.config deleted file mode 100644 index f1c97326c64bd49fcc992ac41f3ac6683a81d244..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/jaas.config +++ /dev/null @@ -1,114 +0,0 @@ -jaasclient { - // Login Module to use for the example jaasclient. - - //First, use a LoginModule for the authentication - // Use the resource memrlm_1 - - //By default it uses the server named 'jonas' to authenticate - // to specify a different server name, use attribute 'serverName="myJonas"' - org.ow2.jonas.security.auth.spi.JResourceLoginModule required - resourceName="memrlm_1" - ; - - // The previous JResourceLoginModule was renamed to JDirectResourceLoginModule - // You need to activate the registration of resources in jonas.properties file - - - // Use the login module to propagate security to the JOnAS server - // globalCtx is set to true in order to set the security context - // for all the threads of the client container instead of only - // on the current thread. - // Useful with multithread applications (like Swing Clients) - org.ow2.jonas.security.auth.spi.ClientLoginModule required - globalCtx="true" - ; -}; - -jaas-jmx { - // Use LoginModule for JMX authentication - org.ow2.jonas.security.auth.spi.JResourceLoginModule required - resourceName="memrlm_1" - ; -}; - -jetty { - // Login Module to use for the web container Jetty - - - // Uncomment this if you want to check that the certificates - // were not revocated by the Certification Authority - //org.ow2.jonas.security.auth.spi.CRLLoginModule required - //CRLsResourceName="Directory" - //CRLsDirectoryName="/home/jonas/CRLs" - //; - - - //LoginModule for the authentication - //add parameter certCallback="true" if you want use certificate callback - // Use the resource memrlm_1 - //By default it uses the server named 'jonas' to authenticate - // to specify a different server name, use attribute 'serverName="myJonas"' - org.ow2.jonas.security.auth.spi.JResourceLoginModule required - resourceName="memrlm_1" - ; -}; - -tomcat { - // Login Module to use for the web container Tomcat - - - // Uncomment this if you want to check that the certificates - // were not revocated by the Certification Authority - //org.ow2.jonas.security.auth.spi.CRLLoginModule required - //CRLsResourceName="Directory" - //CRLsDirectoryName="/home/jonas/CRLs" - //; - - - //LoginModule for the authentication - //add parameter certCallback="true" if you want use certificate callback - // Use the resource memrlm_1 - //By default it uses the server named 'jonas' to authenticate - // to specify a different server name, use attribute 'serverName="myJonas"' - org.ow2.jonas.security.auth.spi.JResourceLoginModule required - resourceName="memrlm_1" - ; -}; - -test { - // Login Module to use for the a client without setting for all threads the identity - - //LoginModule for the authentication - //add parameter certCallback="true" if you want use certificate callback - // Use the resource memrlm_1 - //By default it uses the server named 'jonas' to authenticate - // to specify a different server name, use attribute 'serverName="myJonas"' - org.ow2.jonas.security.auth.spi.JResourceLoginModule required - resourceName="memrlm_1" - ; - - //Security propagation - org.ow2.jonas.security.auth.spi.ClientLoginModule required; -}; - -ask_remote { - // Ask the remote side - org.ow2.jonas.security.auth.spi.RemoteLoginModule required - entryName="remote" providerURLs="rmi://localhost:1099, rmi://localhost:1979" serverName="jonas" serverNames="jonas,j1,j2,j3" - ; - -}; - - -remote { - // Do authentication and sign the Subject. - org.ow2.jonas.security.auth.spi.JResourceLoginModule required - resourceName="memrlm_1" - ; - - // Specify the keystore to use with the alias and the associated password used to get the private key. - org.ow2.jonas.security.auth.spi.SignLoginModule required - keystoreFile="/tmp/keystore" keystorePass="keystorepass" keyPass="keypass" alias="OW" - ; - -}; diff --git a/jonas/assemblies/configuration/src/main/resources/conf/jacorb.properties b/jonas/assemblies/configuration/src/main/resources/conf/jacorb.properties deleted file mode 100644 index f195ef7ed35062d369e8ed392a69b55a8054fe3d..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/jacorb.properties +++ /dev/null @@ -1,737 +0,0 @@ -## -## JacORB configuration options -## - -######################################## -# # -# Initial references configuration # -# # -######################################## - -# -# URLs where IORs are stored (used in orb.resolve_initial_service()) -# DO EDIT these! (Only those that you are planning to use, -# of course ;-). -# -# The ORBInitRef references are created on ORB startup time. In the -# cases of the services themselves, this may lead to exceptions being -# displayed (because the services aren't up yet). These exceptions -# are handled properly and cause no harm! - -#ORBInitRef.NameService=corbaloc::160.45.110.41:38693/StandardNS/NameServer-POA/_root -#ORBInitRef.NameService=file:/c:/NS_Ref -#ORBInitRef.NameService=http://www.x.y.z/~user/NS_Ref -#ORBInitRef.TradingService=http://www.x.y.z/~user/TraderRef - - -######################################## -# # -# Export of corbaloc IORs # -# # -######################################## - -# allow for more readable corbaloc URLs by mapping the -# actual object key to an arbitrary string. The mapping -# below would permit clients of a name service to -# access it using corbaloc::ipaddress:portnum/NameService -# Note: it is NOT necessary to define this property for -# the name service here because this is done already in the -# code of the ns implementation. -# This mapping can be altered programatically by the proprietary -# function ORB::addObjectKey(NameService, file:/home/rnc/NameSingleton.ior) -# -# The property also accepts the following mappings: -# IOR, resource, jndi, URL (e.g. file, http) -# examples: -# jacorb.orb.objectKeyMap.NameService=StandardNS/NameServer-POA/_root -# jacorb.orb.objectKeyMap.NameService=file:/home/rnc/NameSingleton.ior - -################################## -# # -# ORB version number output # -# # -################################## - -# if on, the ORB's version number and a copyright statement is printed -# any time the ORB is initialized -jacorb.orb.print_version=on - -################################## -# # -# Default Logging configuration # -# # -################################## - -# Name of the factory class that plugs in a given log kit -# The default value is JacORB's own factory for the Apache -# LogKit. Only edit (or uncomment) if you want a different -# log kit. -#jacorb.log.loggerFactory=org.jacorb.util.LogKitLoggerFactory - -# log levels: -# -# 0 = fatal errors only = "almost off" (FATAL ERRORS) -# 1 = non-fatal errors and exceptions (ERROR) -# 2 = important messages (WARN) -# 3 = informational messages and exceptions (INFO) -# 4 = debug-level output (DEBUG) (may confuse the unaware user :-) -# NOTE: the name of this property has changed from jacorb.verbosity!! -jacorb.log.default.verbosity=2 - -# where does output go? Terminal is default -#jacorb.logfile=LOGFILEPATH - -# If logging to file whether to append to existing file or overwrite -jacorb.logfile.append=off - -# If jacorb.logfile.append is on, set rolling log size in kilobytes. -# A value of 0 implies no rolling log -jacorb.logfile.maxLogSize=0 - -# hexdump outgoing messages -jacorb.debug.dump_outgoing_messages=off - -# hexdump incoming messages -jacorb.debug.dump_incoming_messages=off - -jacorb.util.tpool.log.verbosity=0 - -################################################## -# # -# WARNING: The following properties should # -# only be edited by the expert user. They # -# can be left untouched in most cases! # -# # -################################################## - - - -################################ -# # -# Basic ORB Configuration # -# # -################################ - -# the GIOP minor version number to use for newly created IORs -jacorb.giop_minor_version=2 - -# number of retries if connection cannot directly be established -jacorb.retries=1 - -# how many msecs. do we wait between retries -jacorb.retry_interval=500 - -# log2 of maximum buffer size managed by the internal -# buffer manager. -# -# This is NOT the maximum buffer size that -# can be used, but just the largest size of buffers that -# will be kept and managed. This value will be added to -# an internal constant of 5, so the real value in bytes -# is 2**(5+maxManagedBufSize-1). You only need to increase this -# value if you are dealing with LOTS of LARGE data structures. -# You may decrease it to make the buffer manager release large -# buffers immediately rather than keeping them for later -# reuse. -jacorb.maxManagedBufSize=18 - -# If this value is 0 an extra unlimited size buffer cache is created -# for the CDROutputStreams. If this value is > 0 then the cache will -# be purged every x msecs. If this value is -1 no caching of these -# buffers will take place. This will reduce memory footprint at the -# cost of decreased performance handling large data structures. -# This value defaults to 0 if not set. -#jacorb.bufferManagerMaxFlush=-1 - -# Normally, a jacorb server will close the TCP/IP connection right -# after sending a CloseConnection message. However, it may -# occasionally happen that the client sends a message into the closed -# connection because it hasn't handled the CloseConnection yet. To -# avoid this situation, closing of the TCP/IP connection can be delayed. -#jacorb.connection.delay_close=on -#jacorb.connection.timeout_after_closeconnection=20000 - -# Initial timeout for establishing a connection. -#jacorb.connection.client.connect_timeout=0 - -# Wait the specified number of msecs for a reply to a request. If -# exceeded, a org.omg.CORBA.TIMEOUT exception will be thrown -#jacorb.connection.client.pending_reply_timeout=0 - -# client-side connection idle timeout, set no non-zero to stop -# close the connection after so many msecs. -#jacorb.connection.client.idle_timeout=0 - -# shall the orb ignore pending messages when a connection idle timeout -# is detected? If "on", the connection is closed and all pending -# messages are cancelled. Default is "off" -#jacorb.connection.client.timeout_ignores_pending_messages=off - -# whenever a network failure is detected, the orb can either -# (infinitely) retry all pending requests, or propagate a COMM_FAILURE -# back into the client code. Default is "off", i.e. throw a -# COMM_FAILURE -#jacorb.connection.client.retry_on_failure=off - -# max time (msecs) a server keeps a connection open if nothing happens -#jacorb.connection.server.timeout=10000 - -# Max no of accepted connections on the server. -#jacorb.connection.max_server_connections= - -# The number of msecs that are waited until the next attempt to find -# an idle connection is made (i.e. do not continuously spin) -#jacorb.connection.wait_for_idle_interval=500 - -# The class name of the SelectionStrategy class -#jacorb.connection.selection_strategy_class= - -# The class name of the StatisticsProvider class -#jacorb.connection.statistics_provider_class= - -#jacorb.reference_caching=off - -# -# The following property specifies the class which is used for -# reference caching. WeakHashtable uses WeakReferences, so entries -# get gc'ed if only the Hashtable has a reference to them. This -# is useful if you have many references to short-living non-persistent -# CORBA objects. It is only available for java 1.2 and above. -# -# On the other hand the standard Hashtable keeps the references until -# they are explicitely deleted by calling _release(). This is useful -# for persistent and long-living CORBA objects. -# -#jacorb.hashtable_class=org.jacorb.util.WeakHashtable -# -jacorb.hashtable_class=java.util.Hashtable - -# use GIOP 1.2 byte order markers (since CORBA 2.4-5) -jacorb.use_bom=off - -# add additional IIOP 1.0 profiles even if we are using IIOP 1.2 -jacorb.giop.add_1_0_profiles=off - -# Use DNS names in IORs -jacorb.dns.enable=off - -# Compact Typecodes (0 - off, 1 - partial (not member_names), 2 - all) -jacorb.compactTypecodes=0 - -# Cache typecode on read -jacorb.cacheTypecodes=off - -# Cache poa names -jacorb.cachePoaNames=off - -########################################### -# # -# Interoperability # -# # -########################################### - -# Turn off indirection encoding for repeated typecodes. This fixes -# interoperability with certain broken ORB's eg. Orbix2000 -jacorb.interop.indirection_encoding_disable=off - -# Iona Comet CORBA/COM bridge can incorrectly encode buffer lengths. -# Enabling this property adds additional length checking and adjustment -# for interoperability with Comet. -jacorb.interop.comet=off - -# Some ORBs do not set a byte value of 1 as a CDR encoded boolean true -# value. Enabling this property interprets any non zero CDR encoded -# boolean value as true. -jacorb.interop.lax_boolean_encoding=off - -# Control whether the method create_abstract_interface_tc performs -# a validity check on the name parameter or not. Turning this check -# off circumvents a bug in Sun's implementation of javax.rmi.CORBA.ValueHander, -# which occasionally passes an invalid name (an empty string) to -# ORBSingleton.create_abstract_interface_tc. If you are using RMI valuetypes, -# you should turn this property off. -jacorb.interop.strict_check_on_tc_creation=off - -# Custom-marshalled RMI valuetypes should be encoded as chunks, but some -# ORBs are not able to decode chunked values. Disable this property for -# interoperability with the ORB in Sun's JDK 1.4.2. -jacorb.interop.chunk_custom_rmi_valuetypes=off -########################################### -# # -# Socket Factories # -# # -########################################### - -# A factory design pattern is used for the creation of sockets and server -# sockets. -# The jacorb.net.socket_factory property can be used to configure -# a socket factory that must implement the operations defined in the -# interface org.jacorb.orb.factory.SocketFactory. -# The jacorb.net.server_socket_factory property can be used to configure a -# server socket factory that must implement the operations defined in the -# interface org.jacorb.orb.factory.ServerSocketFactory. -# -#jacorb.net.socket_factory=org.jacorb.orb.factory.DefaultSocketFactory -#jacorb.net.server_socket_factory=org.jacorb.orb.factory.DefaultServerSocketFactory -#jacorb.net.socket_factory=org.jacorb.orb.factory.PortRangeSocketFactory -#jacorb.net.server_socket_factory=org.jacorb.orb.factory.PortRangeServerSocketFactory -# -# Additional socket factores are supported that allow for the configuration -# of maximum and minimum port numbers that can be used. This can be used to -# enable firewall traversal via a fixed port range. To use these socket factories -# configure one or both of the following property pairs. The first property pair -# configures the client socket factory and the second pair the server socket -# factory. -# -#jacorb.net.socket_factory.port.min -#jacorb.net.socket_factory.port.max -#jacorb.net.server_socket_factory.port.min -#jacorb.net.server_socket_factory.port.max - -########################################### -# # -# BiDirectional GIOP # -# # -########################################### - -# uncomment this initializer if you want to use BiDirectional GIOP - -#org.omg.PortableInterceptor.ORBInitializerClass.bidir_init=org.jacorb.orb.giop.BiDirConnectionInitializer - - -########################################### -# # -# Proxy address in IOR # -# # -########################################### - -# -# with these two properties it is possible to -# tell the ORB what IP/port IORs should contain, -# if the ServerSockets IP/port can't be used -# (e.g. for traffic through a firewall). -# -# WARNING: this is just "dumb" replacing, so you -# have to take care of your configuration! -# - -#jacorb.ior_proxy_host=1.2.3.4 -#jacorb.ior_proxy_port=4711 - - -########################################### -# # -# The Object Adapter Internet Address # -# # -########################################### - -# IP address on multi-homed host (this gets encoded in -# object references). NOTE: Adresses like 127.0.0.X -# will only be accessible from the same machine! -#OAIAddr=1.2.3.4 -#OAPort=4711 - - -############################ -# # -# Default Interceptors # -# Please leave them in! # -# # -############################ -org.omg.PortableInterceptor.ORBInitializerClass.standard_init=org.jacorb.orb.standardInterceptors.IORInterceptorInitializer - - - -############################################### -# # -# Implementation Repository Configuration # -# # -############################################### -# Switch off to avoid contacting the ImR on every server start-up -jacorb.use_imr=off - -# Switch off if you don't want to write the ImR address into server IORs -# (ignored if jacorb.use_imr=off) -jacorb.use_imr_endpoint=on - -# if set to "on", servers that don't already have an entry on their -# first call to the imr, will get automatically registered. Otherwise, -# an UnknownServer exception is thrown. -jacorb.imr.allow_auto_register=off - -# if set to "on", the imr will try to "ping" every object reference, -# that it is going to return. If the reference is not alive, TRANSIENT -# is thrown. -jacorb.imr.check_object_liveness=off - -ORBInitRef.ImplementationRepository=http://www.x.y.z/~user/ImR_Ref - -jacorb.imr.table_file=Z:\table.dat -jacorb.imr.backup_file=z:\backup.dat -jacorb.imr.ior_file=/home/bwana/brose/public_html/ImR_Ref -# Time (msecs) that the implementation will wait for a started server to register. -jacorb.imr.timeout= - -# Host for ImR endpoint -jacorb.imr.endpoint_host= -# Port number for IMR endpoint -jacorb.imr.endpoint_port_number= - -# how many millisecs should the imr wait, until a connection from an -# application client is terminated. Default is 2000. -jacorb.imr.connection_timeout=2000 - -# the implementation name, should be set to a different -# name in the code of persistent servers -jacorb.implname=StandardImplName - -# -# This is supposed to be a generic startup string for everything -# that calls Runtime.exec(). Might be replaced by jaco[.bat]. -# -jacorb.java_exec=java -Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB -Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton - -# with these two properties it is possible to -# tell the ORB what IP / hostname and port the IMR IOR and IMRified server IORs should -# contain, if the ServerSockets IP/port can't be used -# (e.g. for traffic through a firewall). -# -# WARNING: this is just "dumb" replacement, so you -# have to take care of your configuration! -# -#jacorb.imr.ior_proxy_host=1.2.3.4 -#jacorb.imr.ior_proxy_port=4711 - - -######################### -# # -# SSL Configuration # -# # -######################### - -# -# The port number used by SSL, will be dynmically assigned -# by default -# - -# This interceptor must be set if programs need access to -# certificates using the CORBA Security API, SSL works also -# without this interceptor - -#org.omg.PortableInterceptor.ORBInitializerClass.ForwardInit=org.jacorb.security.ssl.SecurityServiceInitializer -#org.omg.PortableInterceptor.ORBInitializerClass.ForwardInit=org.jacorb.security.ssl.iaik.SecurityServiceInitializer - -# qualified classname of access decision object -jacorb.security.access_decision=org.jacorb.security.level2.AccessDecisionImpl - -# list of qualified classnames of principal authenticator objects, -# separated by commas (no whitespaces!). The first entry (that can -# be successfully created) will be available through the -# principal_authenticator property. -jacorb.security.principal_authenticator=org.jacorb.security.level2.PrincipalAuthenticatorImpl - -# the qualified classname of the ssl socket factory class -jacorb.ssl.socket_factory=org.jacorb.security.ssl.sun_jsse.SSLSocketFactory -#jacorb.ssl.socket_factory=org.jacorb.security.ssl.iaik.SSLSocketFactory - -# the qualified classname of the ssl server socket factory class -jacorb.ssl.server_socket_factory=org.jacorb.security.ssl.sun_jsse.SSLServerSocketFactory -#jacorb.ssl.server_socket_factory=org.jacorb.security.ssl.iaik.SSLServerSocketFactory - -# IIOP/SSL parameters (numbers are hex values, without the leading "0x"): -# NoProtection = 1 -# EstablishTrustInClient = 40 -# EstablishTrustInTarget = 20 -# mutual authentication = 60 -# please see the programming guide for more explanation - -jacorb.security.support_ssl=off - -jacorb.security.ssl.client.supported_options=60 -jacorb.security.ssl.client.required_options=0 - -jacorb.security.ssl.server.supported_options=60 -jacorb.security.ssl.server.required_options=0 - -# -# If set, the following two values will be placed in the IOR, if -# "corbaloc:ssliop" ssliop. -# -# If not set, only EstablishTrustInTarget is used for both supported -# and required options. EstablishTrustInClient is not set, and the -# rest of the Association Options aren't currently used anyway. -#jacorb.security.ssl.corbaloc_ssliop.supported_options=0 -#jacorb.security.ssl.corbaloc_ssliop.required_options=0 - -# The name and location of the keystore. This may be absolute or -# relative to the home directory. -# -# NOTE (for Sun JSSE users): The "javax.net.ssl.trustStore[Password]" -# properties don't seem to take effect, so you may want to add trusted -# certificates to "normal" keystores. In this case, please set the -# property "jacorb.security.jsse.trustees_from_ks"is to "on", so trusted -# certificates are taken from the keystore instead of a dedicated -# truststore. -jacorb.security.keystore= -jacorb.security.keystore_password= - -# -# IAIK specific settings -# - - -# files with public key certs of trusted CAs -# -# WARNING: If no CA certs are present, the IAIK chain verifier will -# accept ALL otherwise valid chains! -# -jacorb.security.trustees= - -# the name of the default key alias to look up in the keystore -jacorb.security.default_user= -jacorb.security.default_password= - -# have iaiks ssl classes print debug output to stdout -jacorb.security.iaik_debug=off - -# -# Sun JSSE specific settings -# -# Use the keystore to take trusted certs from. -jacorb.security.jsse.trustees_from_ks=on - -# A comma-separated (no whitespaces!) list of cipher suite names. See -# the JSSE docs on how to obtain the correct cipher suite strings -jacorb.security.ssl.server.cipher_suites= -jacorb.security.ssl.client.cipher_suites= - -# Csiv2 interceptor will add this component( as it is based on EJB XML specific descriptor) -jacorb.security.ssl_components_added_by_ior_interceptor=on - - -######################### -# # -# POA Configuration # -# # -######################### - -# displays a GUI monitoring tool for servers -jacorb.poa.monitoring=off - -# POA log levels: -# 0 = fatal errors only = "almost off" (FATAL ERRORS) -# 1 = non-fatal errors and exceptions (ERROR) -# 2 = important messages (WARN) -# 3 = informational messages and exceptions (INFO) -# 4 = debug-level output (DEBUG) (may confuse the unaware user :-) -jacorb.poa.log.verbosity=2 - -# thread pool configuration for request processing -jacorb.poa.thread_pool_max=20 -jacorb.poa.thread_pool_min=5 - -# if set, request processing threads in thePOA -# will run at this priority. If not set or invalid, -# MAX_PRIORITY will be used. -#jacorb.poa.thread_priority= - -# Properties controlling the POA's request queue. If queue_wait is off, -# then if there are more than queue_max requests in the queue, the -# client gets TRANSIENT exceptions for any requests. If queue_wait is on, -# then the call blocks at the server side until no more than queue_min -# requests are left in the queue. The new request is then delivered as usual. -jacorb.poa.queue_wait=off -jacorb.poa.queue_max=100 -jacorb.poa.queue_min=10 - -# Set this to on for server-side checking of expired ReplyEndTimePolicy. -# (This also applies to RelativeRoundtripTimeoutPolicy.) When this is on, -# the clocks of the server and client machine need to be synchronized. -#jacorb.poa.check_reply_end_time=off - - -################################### -# # -# Transport Layer Configuration # -# # -################################### - -# Names of the factories classes for all installed transport plug-ins -# (comma-separated list). - -#jacorb.transport.factories=org.jacorb.orb.iiop.IIOPFactories - -# ProfileId tags of all installed transports that should actually -# listen on the server side. This is a comma-separated list of numbers, -# each number must correspond to one ProfileId tag from a factory in -# jacorb.transport.factories. In IORs produced by the server, the transport -# profiles will appear in the order indicated by this list. - -#jacorb.transport.server.listeners=0 - -# Name of a class that selects the transport profile to use on the -# client side. - -#jacorb.transport.client.selector=org.jacorb.orb.DefaultProfileSelector - - -################################## -# # -# Name Service Configuration # -# # -################################## - -# log levels: -# 0 = fatal errors only = "almost off" (FATAL ERRORS) -# 1 = non-fatal errors and exceptions (ERROR) -# 2 = important messages (WARN) -# 3 = informational messages and exceptions (INFO) -# 4 = debug-level output (DEBUG) (may confuse the unaware user :-) - -jacorb.naming.log.verbosity=3 - -# -# name of the logger factory. Implement your own subclass of -# org.jacorb.util.LoggerFactory and enter class name here to -# customize logging behavior. Built-in default is org.jacorb.util.LogKitLoggerFactory -#jacorb.log.loggerFactory= - -# Whether non active references are purged from name service -# when list operation is invoked. - -jacorb.naming.purge=on - -# Whether resolve should return references without trying to -# ping them to see if they're still alive first. - -jacorb.naming.noping=on - -# The file where the name server drops its IOR -#jacorb.naming.ior_filename=c:/NS_Ref - -######################################## -# # -# Trader configuration, please see # -# src/trading/README.PROPERTIES for # -# explanation # -# # -######################################## - -jtrader.util.max_threads=10 -jtrader.util.min_threads=1 -jtrader.util.query_timeout=5000 -jtrader.impl.cache_max=100 - -# boolean values, e.g. true / false -#jtrader.modifiable_properties= -#jtrader.dynamic_properties= -#jtrader.proxy_offers= - -jtrader.debug=false -jtrader.debug_verbosity=3 - -#integer values -jtrader.def_search_card= -jtrader.max_search_card= -jtrader.def_match_card= -jtrader.max_match_card= -jtrader.def_return_card= -jtrader.max_return_card= -jtrader.max_list= -jtrader.def_hop_count= -jtrader.max_hop_count= - -#FollowOptions -#always=2 -#if_no_local=1 -#local_only=0 -jtrader.def_follow_policy= -jtrader.max_follow_policy= -jtrader.max_link_follow_policy= - -######################################################## -# # -# Notification Service configuration, please see # -# the JacORB ProgrammingGuide for a explanation # -# # -######################################################## - -jacorb.notification.filter.thread_pool_size = 2 - -jacorb.notification.proxyconsumer.thread_pool_size = 2 - -jacorb.notification.proxysupplier.thread_pool_size = 4 - -jacorb.notification.supplier.poll_intervall = 1000 - -jacorb.notification.max_batch_size = 1 - -jacorb.notification.max_events_per_consumer = 100 - -jacorb.notification.order_policy = PriorityOrder - -jacorb.notification.discard_policy = PriorityOrder - -jacorb.notification.consumer.backout_interval = 5000 - -jacorb.notification.consumer.error_threshold = 3 - -# valid values: ThreadPool, ThreadPerProxy -jacorb.notification.proxysupplier.threadpolicy = ThreadPool - -jacorb.notification.default_filter_factory = builtin - -# jacorb.notification.supplier.max_number = 10 - -# jacorb.notification.start_time_supported = 10 - -jacorb.notification.stop_time_supported = on - -jacorb.notification.proxy.destroy_causes_disconnect = on - -# Notification Service log levels: -org.jacorb.notification.log.verbosity = INFO - -######################################## -# # -# SAS configuration # -# # -######################################## - -#commented (Uses JOnAS csiv2) - -# Use stateless mode (JOnAS) -#jacorb.security.sas.stateful=false - -#jacorb.SAS.log.verbosity=INFO -#jacorb.SAS.CSS.log.verbosity=INFO -#jacorb.SAS.TSS.log.verbosity=INFO - -# This option defines the specific SAS context generator/validator -# Currently supported contexts include: -# NullContext - Sends a NULL SAS Context -# GssUpContext - Uses GSSUP security -# KerberosContext - uses Kerberos security -# At least one context must be selected for SAS support -#jacorb.security.sas.contextClass=org.jacorb.security.sas.NullContext -#jacorb.security.sas.contextClass=org.jacorb.security.sas.GssUpContext -#jacorb.security.sas.contextClass=org.jacorb.security.sas.KerberosContext - -# This initializer installs the SAS interceptors -# Comment out this line if you do not want SAS support -#org.omg.PortableInterceptor.ORBInitializerClass.SAS=org.jacorb.security.sas.SASInitializer - -# This option is used for GSSUP security and sets up the GSS Provider -# Comment out this line if you are not using GSS UP authentication -#org.omg.PortableInterceptor.ORBInitializerClass.GSSUPProvider=org.jacorb.security.sas.GSSUPProviderInitializer - -######################################## -# # -# Custom configuration # -# # -######################################## - - -# any other custom properties can be added here. - -jacorb.config.log.verbosity=2 \ No newline at end of file diff --git a/jonas/assemblies/configuration/src/main/resources/conf/java.policy b/jonas/assemblies/configuration/src/main/resources/conf/java.policy deleted file mode 100644 index 6789deb5d681bcf7fe3e7da5c84ef8232df1f8dc..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/java.policy +++ /dev/null @@ -1,10 +0,0 @@ -//##################### Security Policy -// -// The default security policy for the JOnAS server. -// Currently, this is set to allow all permissions. -// - -grant { - // Allow everything for now - permission java.security.AllPermission; -}; diff --git a/jonas/assemblies/configuration/src/main/resources/conf/jgroups-cmi.xml b/jonas/assemblies/configuration/src/main/resources/conf/jgroups-cmi.xml deleted file mode 100644 index 6cecffeb60e2df3e32aff939ef361339d673aa45..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/jgroups-cmi.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas/assemblies/configuration/src/main/resources/conf/jgroups-discovery.xml b/jonas/assemblies/configuration/src/main/resources/conf/jgroups-discovery.xml deleted file mode 100644 index e829c9b9b0192fdc0e592a6142893366dad35e48..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/jgroups-discovery.xml +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas/assemblies/configuration/src/main/resources/conf/jgroups-ha.xml b/jonas/assemblies/configuration/src/main/resources/conf/jgroups-ha.xml deleted file mode 100644 index 3e618dbe2fcaaecff290c272abd5f81555f7f1ce..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/jgroups-ha.xml +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas/assemblies/configuration/src/main/resources/conf/jmx.access b/jonas/assemblies/configuration/src/main/resources/conf/jmx.access deleted file mode 100644 index aa60c8681e4711c0f215c37a59601e6c39bb4e86..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/jmx.access +++ /dev/null @@ -1,35 +0,0 @@ -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 2008-2010 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# -# --------------------------------------------------------------------------- -# $Id: jonas.properties 17416 2009-05-19 13:49:51Z durieuxp $ -# --------------------------------------------------------------------------- - -# When JMX security is enabled and jonas.service.jmx.authorization.method is -# set to jmx.remote.x.access.file, this file contains the access rights of each -# user. -# -# We define two levels of access: -# - readonly can access all getter methods -# - readwrite can access all methods - -monitor readonly -jonas readwrite diff --git a/jonas/assemblies/configuration/src/main/resources/conf/jmx.passwords b/jonas/assemblies/configuration/src/main/resources/conf/jmx.passwords deleted file mode 100644 index 39458141044bdb1c33edb9c46d9e15580f5e0362..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/jmx.passwords +++ /dev/null @@ -1,37 +0,0 @@ -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 2008-2010 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# -# --------------------------------------------------------------------------- -# $Id: jonas.properties 17416 2009-05-19 13:49:51Z durieuxp $ -# --------------------------------------------------------------------------- - -# When JMX security is enabled and jonas.service.jmx.authentication.method is -# set to jmx.remote.x.password.file, this file contains the user names and -# passwords. -# -# Each line contains the user name, one or more blanks and the password. -# -# No encryption is supported, if you need encryption please use -# jonas.service.jmx.authentication.method with jmx.remote.x.login.config. -# This way, you can encode the password using any method supported by JAAS. - -monitor jonas -jonas jonas diff --git a/jonas/assemblies/configuration/src/main/resources/conf/jmx.rolebased.access b/jonas/assemblies/configuration/src/main/resources/conf/jmx.rolebased.access deleted file mode 100644 index 67c0cc81317587a5043ae8f66477f835aabd3b8f..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/jmx.rolebased.access +++ /dev/null @@ -1,47 +0,0 @@ -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 2008-2010 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# -# --------------------------------------------------------------------------- -# $Id: jonas.properties 17416 2009-05-19 13:49:51Z durieuxp $ -# --------------------------------------------------------------------------- - -# When JMX security is enabled and jonas.service.jmx.authorization.method is -# set to jmx.remote.x.access.rolebased.file, this file contains the access -# rights of each role (as defined in the JAAS realm). -# -# We define two levels of access: -# - readonly can access all getter methods -# - readwrite can access all methods -# -# If one user has multiple roles, then the role with the highest level of -# access rights will be used. - -# jonas-admin role can do everything (access right: readwrite) -jonas-admin readwrite - -# jonas-monitor role can only read data (access right: readonly) -jonas-monitor readonly - -# The * role means "everyone" (including users that already have roles) -# -# This role is optional, if not set then all users with no role that appears -# in this file will have no access rights at all. -# * readonly diff --git a/jonas/assemblies/configuration/src/main/resources/conf/jonas-client.properties b/jonas/assemblies/configuration/src/main/resources/conf/jonas-client.properties deleted file mode 100644 index 8b65af934a7d0583ca7ca1d7bf0a720ab0583f5e..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/jonas-client.properties +++ /dev/null @@ -1,28 +0,0 @@ -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 1999 Bull S.A. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# Initial developer(s): Guillaume Sauthier. -# -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -# Set the JServiceFactory to use -jonas.service.ws.factory.class org.ow2.jonas.ws.axis.JAxisServiceFactory diff --git a/jonas/assemblies/configuration/src/main/resources/conf/jonas-realm.xml b/jonas/assemblies/configuration/src/main/resources/conf/jonas-realm.xml deleted file mode 100644 index c5dfac3515b1737de8002523fa86e5bbce923630..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/jonas-realm.xml +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas/assemblies/configuration/src/main/resources/conf/jonas.properties b/jonas/assemblies/configuration/src/main/resources/conf/jonas.properties deleted file mode 100644 index 51bc9063db1c2227a7a2e5744803657f8fc74ef3..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/jonas.properties +++ /dev/null @@ -1,546 +0,0 @@ -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 1999-2010 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - - -###################### JOnAS Server configuration -# The current file is in the /conf directory. It can be copied and -# customized in JONAS_BASE/conf directory -###################### - -# Name of the JOnAS server -# default value is "jonas" -jonas.name jonas - -# Name of the JOnAS domain -# default value is "jonas" -domain.name jonas - -# Enable the Security context propagation (for jrmp) -jonas.security.propagation true - -# Enable the Security manager -# default value is true (if not set) -# Setting this to false implies a collocated registry and setting in carol.properties: -# carol.jvm.rmi.local.registry=true -jonas.security.manager false - -# Enable csiv2 -jonas.csiv2.propagation true - -# Enable the Transaction context propagation -jonas.transaction.propagation true - -# Set the name of log configuration file -jonas.log.configfile trace - -# Set the work directory used by JOnAS (relative or absolute) -# A relative directory name will be prefixed by JONAS_BASE/ -# An absolute path will be used directly -jonas.workdirectory work - -# Set to true if the server is a master -jonas.master false - -# Set to true in order to execute the JOnAS Server in development mode. -# -# WAR archive deployment case in development mode (for single or EAR packaged WARs): -# Each modified WAR archive will be unpacked in the working directory of the JOnAS Server -# in a different folder to avoid file locks. This is especially useful in a Windows environment. -jonas.development true - -# Set the list of the services launched in the JOnAS Server. -# Possible services are: jtm,db,dbm,validation,resource,mail,cmi,ha,versioning,ejb2,ejb3, -# jaxrpc,jaxws,web,ear,depmonitor,discovery,resourcemonitor,smartclient,audit,cdi,jaxrs -# -# Notes: -# - registry, security and jmx services are always started -# - some services may start automatically if required (depending on the server configuration and deployed applications) -# See 'Configuring JOnAS services' in JOnAS documentation for more information -# -jonas.services jtm,db,resource,ejb3,jaxws,web,ear,depmonitor - -# -###################### JOnAS Admin Client configuration -# -# If JMX security is enabled, the JOnAS Admin Client requires its parameters -# To be passed using -username and -password arguments. These two parameters -# pass these arguments to the JOnAS Admin Client internally. -jonas.adminClient.username jonas -jonas.adminClient.password jonas - -# -###################### JOnAS Registry service configuration -# -# Set the name of the implementation class of the Registry service -jonas.service.registry.class org.ow2.jonas.registry.carol.CarolRegistryService - -# Set the Registry launching mode -# If set to 'automatic', the registry is launched in the same JVM as Application Server, -# if it's not already started. -# If set to 'collocated', the registry is launched in the same JVM as Application Server -# If set to 'remote', the registry has to be launched before in a separate JVM -jonas.service.registry.mode collocated - -# -###################### JOnAS JMX service configuration -# -# Set the name of the implementation class of the JMX service -jonas.service.jmx.class org.ow2.jonas.jmx.internal.JOnASJMXService - -# Set to true if the JMXRemote interface should require the client to provide -# authentication information. That information is provided when establishing -# the JMX connection, using the JMXConnector.CREDENTIALS key. -# -# Note that if you enable JMX security for a server, all clients (including -# any administration tool such as the domain master) connecting to this -# instance via JMX must provide a valid user name and password. -jonas.service.jmx.secured false - -# If jonas.service.jmx.secured is set to true, defines the authentication -# method and the method's parameter. For example, to use file-based -# authentication using the conf/jmx.passwords file, define: -# jonas.service.jmx.authentication.method jmx.remote.x.password.file -# jonas.service.jmx.authentication.parameter conf/jmx.passwords -# You are free to use the authentication provider you wish. -jonas.service.jmx.authentication.method jmx.remote.x.password.file -jonas.service.jmx.authentication.parameter conf/jmx.passwords -# You may for example choose to use JAAS LoginModule for authentication. -# In this case define the used configuration in the JAAS configuration file -# using the jonas.service.jmx.authentication.parameter: -# jonas.service.jmx.authentication.method jmx.remote.x.login.config -# jonas.service.jmx.authentication.parameter jaas-jmx - -# If jonas.service.jmx.secured is set to true, defines the authorization -# method and the method's parameter. For example, to use file-based -# authorization using the conf/jmx.access file, define: -# jonas.service.jmx.authorization.method jmx.remote.x.access.file -# jonas.service.jmx.authorization.parameter conf/jmx.access -# You are free to use the authorization provider you wish. -jonas.service.jmx.authorization.method jmx.remote.x.access.file -jonas.service.jmx.authorization.parameter conf/jmx.access -# You may for example choose to use role-based authorization manager -# configured using conf/jmx.rolebased.access file. In this case, define: -# jonas.service.jmx.authorization.method jmx.remote.x.access.rolebased.file -# jonas.service.jmx.authorization.parameter conf/jmx.rolebased.access - - -# -###################### JOnAS WorkCleaner service configuration -# -# Set the name of the implementation class of the wc service -jonas.service.wc.class org.ow2.jonas.workcleaner.internal.JOnASWorkCleanerService - -# Set the clean period in seconds -jonas.service.wc.period 300 - -# -###################### JOnAS CDI service configuration -# -# Set the name of the implementation class of the cdi service -jonas.service.cdi.class org.ow2.jonas.cdi.weld.internal.DefaultWeldService - -# -###################### JOnAS JAX-RS service configuration -# -# Set the name of the implementation class of the jaxrs service -jonas.service.jaxrs.class org.ow2.jonas.jaxrs.jersey.internal.JerseyService - -# -###################### JOnAS WorkManager service configuration -# -# Set the name of the implementation class of the wm service -jonas.service.wm.class org.ow2.jonas.workmanager.internal.JOnASWorkManagerService - -# Set the size of the worker thread pool -jonas.service.wm.minworkthreads 3 - -# Set the maximun size of the worker thread pool -jonas.service.wm.maxworkthreads 80 - -# Set the max # of seconds that a thread will wait for work -# This is used to shrink the worker thread pool back to minimum -jonas.service.wm.threadwaittimeout 60 - - -# -###################### JOnAS EJB 2 Container service configuration -# -# Set the name of the implementation class of the ejb2 service -jonas.service.ejb2.class org.ow2.jonas.ejb2.internal.JOnASEJBService - -# Set the XML deployment descriptors parsing mode (with or without validation) -jonas.service.ejb2.parsingwithvalidation true - -# If enabled, the GenIC tool will be called if : -# - JOnAS version of the ejb-jar is not the same version than the running JOnAS instance -# - Stubs/Skels stored in the ejb-jar are not the same than the JOnAS current protocols. -# By default, this is enabled -jonas.service.ejb2.auto-genic true - -# Arguments for the auto GenIC (-invokecmd, -verbose, etc.) -jonas.service.ejb2.auto-genic.args -invokecmd - - -# Note: these two settings can be overriden by the EJB descriptor. -# -# If EJB monitoring is enabled, statistics about method call times will be -# collected. This is a very lightweight measurement and should not have much -# impact on performance. -jonas.service.ejb2.monitoringEnabled true -# If EJB monitoring is enabled, this value indicates after how many -# milliseconds spent executing an EJB method a warning message should be -# displayed. If 0, no warning will ever be displayed. -jonas.service.ejb2.warningThreshold 20000 - - -# -###################### JOnAS EJB 3 container service configuration -# -# Set the name of the implementation class of the EJB 3 service. -jonas.service.ejb3.class org.ow2.jonas.ejb.easybeans.EasyBeansService - -# Set the JPA provider: hibernate,eclipselink,openjpa,eclipselink2,hibernate3.5,openjpa2 -# Note that some JPA providers are not embedded in the JOnAS package, -# and, if needed, are automatically downloaded from a maven repository. -# So, if you change this default value, and if you use a proxy, -# do not forget to set the 'http_proxy' environment variable. -jonas.service.ejb3.jpa.provider hibernate - - -# -###################### JOnAS Versioning service configuration -# -# Set the name of the implementation class of the versioning service. -jonas.service.versioning.class org.ow2.jonas.versioning.internal.VersioningServiceImpl - -# Content types to filter. Set this list to empty for the versioning -# service not to filter any content in Web responses. -jonas.service.versioning.filteredContentTypes text/html, \ - application/javascript, \ - text/javascript, \ - text/css, \ - text/xml - - -# -###################### JOnAS Web container service configuration -# -# Set the name of the implementation class of the web container service. -jonas.service.web.class org.ow2.jonas.web.tomcat6.Tomcat6Service -#jonas.service.web.class org.ow2.jonas.web.tomcat7.Tomcat7Service -#jonas.service.web.class org.ow2.jonas.web.jetty6.Jetty6Service - -# Set the XML deployment descriptors parsing mode for the WEB container -# service (with or without validation). -jonas.service.web.parsingwithvalidation true - -# If true, the onDemand feature is enabled. A proxy is listening on the http port and will make actions like starting or deploying applications. -# The web container instance is started on another port number (that can be specified) but all access are proxified. -# It means that the web container will be started only when a connection is done on the http port. -# The .war file is also loaded upon request. -# This feature cannot be enabled in production mode. -jonas.service.web.ondemand.enabled true - -# The redirect port number is used to specify the port number of the http web container. -# The proxy will listen on the http web container port and redirect all requests on this redirect port -# 0 means that a random port is used. -jonas.service.web.ondemand.redirectPort 0 - - -# -###################### JOnAS JAX-RPC service configuration -# -# Set the name of the implementation class of the jaxrpc service. -jonas.service.jaxrpc.class org.ow2.jonas.ws.axis.AxisService - -# Set the XML deployment descriptors parsing mode for the jaxrpc service (with or without validation). -jonas.service.jaxrpc.parsingwithvalidation true - -# Set the Generator to use with wsgen -jonas.service.jaxrpc.wsgen.generator.factory org.ow2.jonas.generators.wsgen.generator.ews.EWSGeneratorFactory - -# Set the prefix that will be used to compute URL endpoints for web services -# Example of prefix: http://www.mydomain.com:8888 -jonas.service.jaxrpc.url-prefix - -# Set automatic WsGen mode on/off -# If set to 'true', WsGen will automatically be applied to all deployed archives (EjbJars, Webapps, Applications) -jonas.service.jaxrpc.auto-wsgen.engaged true - - -# -###################### JOnAS WSDL Publisher service configuration -# -# Set the name of the implementation class of the WSDL Publisher service. -jonas.service.wsdl-publisher.class org.ow2.jonas.ws.publish.internal.manager.DefaultWSDLPublisherManager - -# Set the WSDL Publishers list for WSDL publication -# A minimum of 1 WSDLPublisher is required ! -# This property is set with a coma-separated list of WSDLPublisher properties -# file names (without the '.properties' suffix). -# Ex: file1,uddi (while the properties file names are -# file1.properties and uddi.properties) -jonas.service.wsdl-publisher.publishers file1 - - -# -###################### JOnAS JAX-WS 2.x service configuration -# -# Set the name of the implementation class of the jaxws service -# Note: The jaxws service implementation based on Apache CXF is currently -# the only implementation that pass Java EE TCK. -jonas.service.jaxws.class org.ow2.jonas.ws.cxf.CXFService - -# Note: The jaxws service implementation based on Apache Axis2 is still -# at experimental stage (missing features, not currently TCK tested) -# Use it at your own risks -#jonas.service.jaxws.class org.ow2.jonas.ws.axis2.Axis2Service - - -# -###################### JOnAS EAR service configuration -# -# Set the name of the implementation class of the ear service. -jonas.service.ear.class org.ow2.jonas.ear.internal.JOnASEARService - -# Set the XML deployment descriptors parsing mode for the EAR service -# (with or without validation). -jonas.service.ear.parsingwithvalidation true - -# Generate stubs for all EJBs that may be accessed from the application -# In almost all cases, this is not required to be enabled as stubs can be found. -jonas.service.ear.genstub false - -# Create a child classloader when deploying EJB3 of the EAR -jonas.service.ear.useEJB3ChildClassloader false - - -# -###################### JOnAS DBM Database service configuration -# -# Set the name of the implementation class of the dbm service -jonas.service.dbm.class org.ow2.jonas.dbm.internal.JOnASDataBaseManagerService - -# Set the jonas DataSources. This enables the JOnAS server to load -# the data dources, to load related jdbc drivers, and to register the data -# sources into JNDI. -# This property is set with a coma-separated list of Datasource properties -# file names (without the '.properties' suffix). -# Ex: Oracle1,InstantDB1 (while the Datasources properties file names are -# Oracle1.properties and InstantDB1.properties) -jonas.service.dbm.datasources HSQL1 - - -# -###################### JOnAS Mail service configuration -# -# Set the name of the implementation class of the mail service -jonas.service.mail.class org.ow2.jonas.mail.internal.JOnASMailService - -# Set the jonas mail factories. -# This property is set with a coma-separated list of MailFactory properties -# file names (without the '.properties' suffix). -# Ex: MailSession1,MailMimePartDS1 (while the properties file names are -# MailSession1.properties and MailMimePartDS1.properties) -jonas.service.mail.factories - - -# -###################### JOnAS JTM Transaction service configuration -# - -# Set the name of the implementation class of the jtm service -jonas.service.jtm.class org.ow2.jonas.tm.jotm.JOTMTransactionService - -# Set the Transaction Manager launching mode. -# If set to 'true', TM is remote: TM must be already launched in an other JVM. -# If set to 'false', TM is local: TM is going to run into the same JVM -# than the jonas Server. -jonas.service.jtm.remote false - -# Set the default transaction timeout, in seconds. -jonas.service.jtm.timeout 60 - - -# -###################### JOnAS SECURITY service configuration -# -# Set the name of the implementation class of the security service -jonas.service.security.class org.ow2.jonas.security.internal.JonasSecurityServiceImpl - -# Realm used for CsiV2 authentication -jonas.service.security.csiv2.realm memrlm_1 - -# Realm used for Web Service authentication -jonas.service.security.ws.realm memrlm_1 - -# Registration of realm resources into JNDI -# Disable by default so configuration is not available with clients -jonas.service.security.realm.jndi.registration false - -# Enable security context check on Remote Login Module -jonas.security.context.check false - -# Path to the keystore file -jonas.security.context.check.keystoreFile /tmp/keystore - -# Pass used for the keystore file -jonas.security.context.check.keystorePass keystorepass - -# Alias (stored in the keystore) -jonas.security.context.check.alias FB - - -# -###################### JOnAS J2CA resource service configuration -# -# Set the name of the implementation class of the J2CA resource service -jonas.service.resource.class org.ow2.jonas.resource.internal.JOnASResourceService - -# -###################### JOnAS DB service configuration -# -# Set the name of the implementation class of the db service (hsql for example) -jonas.service.db.class org.ow2.jonas.db.hsqldb.HsqlDBServiceImpl -jonas.service.db.port 9001 -jonas.service.db.dbname db_jonas -jonas.service.db.users jonas:jonas -# Multiple users -#jonas.service.db.users jonas:jonas,login:password - -# -###################### JOnAS Discovery service -# -# Set the name of the implementation class and initialization parameters -jonas.service.discovery.class=org.ow2.jonas.discovery.jgroups.JgroupsDiscoveryServiceImpl -# Uncomment this to set Multicast implementation -#jonas.service.discovery.class=org.ow2.jonas.discovery.internal.MulticastDiscoveryServiceImpl - - -# -##################### Properties for multicast impl. -# -# For a master server, configure the client source port with this property -jonas.service.discovery.source.port=9888 -jonas.service.discovery.ttl=1 -jonas.service.discovery.multicast.address=224.224.224.224 -jonas.service.discovery.multicast.port=9080 - -# A multicast greeting message is sent out when discovery service is started. -# The starting server listens at the port jonas.service.discovery.greeting.port -# (default 9899) for a response for jonas.service.discovery.greeting.timeout miliseconds -# (default 1000 ms). If a pre-existing server has the same server name as this one, -# this server's discovery service will be terminated. -# Uncomment these two lines for multicast discovery -jonas.service.discovery.greeting.port=9899 -jonas.service.discovery.greeting.timeout=1000 - -##################### properties for JGroups impl. -jonas.service.discovery.jgroups.conf= jgroups-discovery.xml -jonas.service.discovery.group.name = JGroupsDiscovery -#Reconnection timeout for JGroups Channel, if it's closed on request. -jonas.service.discovery.reconnection.timeout = 5000 - - -# -###################### JOnAS CMI service configuration -# -# Set the name of the implementation class of the CMI service. -jonas.service.cmi.class org.ow2.jonas.cmi.internal.CmiServiceImpl - - -# -###################### JOnAS HA service configuration -# -# Set the name of the implementation class of the HA service. -jonas.service.ha.class org.ow2.jonas.ha.internal.HaServiceImpl - -# Set the JGroups configuration file name -jonas.service.ha.jgroups.conf jgroups-ha.xml - -# Set the JGroups group name -jonas.service.ha.jgroups.groupname jonas-rep - -# Set the SFSB backup info timeout. The info stored in the backup node is removed when the timer expires. -jonas.service.ha.gc.period 600 - -# Set the datasource for the tx table -jonas.service.ha.datasource jdbc_1 - -# Reconnection timeout for JGroups Channel, if it's closed on request. -jonas.service.ha.reconnection.timeout 5000 - - -# -###################### JOnAS Deployment Monitor -# -# Set the name of the implementation class of the depmonitor service -# -jonas.service.depmonitor.class org.ow2.jonas.deployablemonitor.DeployableMonitorService - -# Set the execution mode (three possible values): -# - inherit: inherit of the value of the "jonas.development" property -# - true : development mode -# - false : production mode -jonas.service.depmonitor.development inherit - -jonas.service.depmonitor.directories -# List (comma separated) of exclusion patterns (based on names, not directories) -jonas.service.depmonitor.exclusions README - -# Monitor interval in milliseconds -jonas.service.depmonitor.monitorInterval 5000 - - -# -###################### JOnAS Resource Monitor -# -# Set the name of the implementation class of the resource monitor service -# -jonas.service.resourcemonitor.class org.ow2.jonas.resourcemonitor.internal.JOnASResourceMonitorService -# duration in milliseconds -jonas.service.resourcemonitor.monitorInterval 30000 - - -# -###################### JOnAS/EasyBeans Smartclient service configuration -# -# Set the name of the implementation class of the smartclient service. -jonas.service.smartclient.class org.ow2.jonas.smartclient.internal.SmartclientServiceImpl -# port number the Smartclient service listens on -jonas.service.smartclient.port 2503 - - -# -###################### JOnAS Audit service configuration -# -# Set the name of the implementation class of the audit service. -jonas.service.audit.class org.ow2.jonas.audit.internal.JOnASAuditServiceImpl - -# -###################### JOnAS Validation service configuration -# -# Set the name of the implementation class of the validation service. -jonas.service.validation.class org.ow2.jonas.validation.hibernate.JOnASHibernateValidationServiceImpl diff --git a/jonas/assemblies/configuration/src/main/resources/conf/joramAdmin.xml b/jonas/assemblies/configuration/src/main/resources/conf/joramAdmin.xml deleted file mode 100644 index 594662f04604e5f03fed40a1ca158739f2403c09..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/joramAdmin.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/jonas/assemblies/configuration/src/main/resources/conf/jotm.properties b/jonas/assemblies/configuration/src/main/resources/conf/jotm.properties deleted file mode 100644 index f1a5bce24c4379795b036b7fd1b11ed110103dc0..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/jotm.properties +++ /dev/null @@ -1,15 +0,0 @@ -# ------------------------------------------ -# Jotm properties -# -# see: org.objectweb.howl for description of -# howl properties. -# ------------------------------------------ -jotm.recovery.Enabled false -howl.log.ListConfiguration false -howl.log.BufferSize 4 -howl.log.MinimumBuffers 16 -howl.log.MaximumBuffers 16 -howl.log.MaximumBlocksPerFile 200 -howl.log.FileDirectory c:/logs -howl.log.FileName howl -howl.log.MaximumFiles 2 diff --git a/jonas/assemblies/configuration/src/main/resources/conf/spy.properties b/jonas/assemblies/configuration/src/main/resources/conf/spy.properties deleted file mode 100644 index 5815fb873c3001a03ce9aa0558fc8c53a620df74..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/spy.properties +++ /dev/null @@ -1,251 +0,0 @@ -################################################################# -# P6Spy Options File # -# See documentation for detailed instructions # -################################################################# - -################################################################# -# MODULES # -# # -# Modules provide the P6Spy functionality. If a module, such # -# as module_log is commented out, that functionality will not # -# be available. If it is not commented out (if it is active), # -# the functionality will be active. # -# # -# Values set in Modules cannot be reloaded using the # -# reloadproperties variable. Once they are loaded, they remain # -# in memory until the application is restarted. # -# # -################################################################# - -module.log=com.p6spy.engine.logging.P6LogFactory -#module.outage=com.p6spy.engine.outage.P6OutageFactory - -################################################################# -# REALDRIVER(s) # -# # -# In your application server configuration file you replace the # -# "real driver" name with com.p6spy.engine.spy.P6SpyDriver. # -# This is where you put the name of your real driver P6Spy can # -# find and register your real driver to do the database work. # -# # -# If your application uses several drivers specify them in # -# realdriver2, realdriver3. See the documentation for more # -# details. # -# # -# Values set in REALDRIVER(s) cannot be reloaded using the # -# reloadproperties variable. Once they are loaded, they remain # -# in memory until the application is restarted. # -# # -################################################################# - -# oracle driver -# realdriver=oracle.jdbc.driver.OracleDriver - -# mysql Connector/J driver -# realdriver=com.mysql.jdbc.Driver - -# informix driver -# realdriver=com.informix.jdbc.IfxDriver - -# ibm db2 driver -# realdriver=COM.ibm.db2.jdbc.net.DB2Driver - -# the mysql open source driver -#realdriver=org.gjt.mm.mysql.Driver - -# the posgresql driver -realdriver=org.postgresql.Driver - -#specifies another driver to use -realdriver2= -#specifies a third driver to use -realdriver3= - - -#the DriverManager class sequentially tries every driver that is -#registered to find the right driver. In some instances, it's possible to -#load up the realdriver before the p6spy driver, in which case your connections -#will not get wrapped as the realdriver will "steal" the connection before -#p6spy sees it. Set the following property to "true" to cause p6spy to -#explicitily deregister the realdrivers -deregisterdrivers=false - -################################################################ -# P6LOG SPECIFIC PROPERTIES # -################################################################ -# no properties currently available - -################################################################ -# EXECUTION THRESHOLD PROPERTIES # -################################################################ -# This feature applies to the standard logging of P6Spy. # -# While the standard logging logs out every statement # -# regardless of its execution time, this feature puts a time # -# condition on that logging. Only statements that have taken # -# longer than the time specified (in milliseconds) will be # -# logged. This way it is possible to see only statements that # -# have exceeded some high water mark. # -# This time is reloadable. # -# -# executionthreshold=integer time (milliseconds) -# -executionthreshold= - -################################################################ -# P6OUTAGE SPECIFIC PROPERTIES # -################################################################ -# Outage Detection -# -# This feature detects long-running statements that may be indicative of -# a database outage problem. If this feature is turned on, it will log any -# statement that surpasses the configurable time boundary during its execution. -# When this feature is enabled, no other statements are logged except the long -# running statements. The interval property is the boundary time set in seconds. -# For example, if this is set to 2, then any statement requiring at least 2 -# seconds will be logged. Note that the same statement will continue to be logged -# for as long as it executes. So if the interval is set to 2, and the query takes -# 11 seconds, it will be logged 5 times (at the 2, 4, 6, 8, 10 second intervals). -# -# outagedetection=true|false -# outagedetectioninterval=integer time (seconds) -# -outagedetection=false -outagedetectioninterval= - -################################################################ -# COMMON PROPERTIES # -################################################################ - -# filter what is logged -filter=false - -# comma separated list of tables to include when filtering -include = -# comma separated list of tables to exclude when filtering -exclude = - -# sql expression to evaluate if using regex filtering -sqlexpression = - - -# turn on tracing -autoflush = true - -# sets the date format using Java's SimpleDateFormat routine -dateformat= - -#list of categories to explicitly include -includecategories= - -#list of categories to exclude: error, info, batch, debug, statement, -#commit, rollback and result are valid values -excludecategories=info,debug,result,batch - - -#allows you to use a regex engine or your own matching engine to determine -#which statements to log -# -#stringmatcher=com.p6spy.engine.common.GnuRegexMatcher -#stringmatcher=com.p6spy.engine.common.JakartaRegexMatcher -stringmatcher= - -# prints a stack trace for every statement logged -stacktrace=false -# if stacktrace=true, specifies the stack trace to print -stacktraceclass= - -# determines if property file should be reloaded -reloadproperties=false -# determines how often should be reloaded in seconds -reloadpropertiesinterval=60 - -#if=true then url must be prefixed with p6spy: -useprefix=false - -#specifies the appender to use for logging -#appender=com.p6spy.engine.logging.appender.Log4jLogger -#appender=com.p6spy.engine.logging.appender.StdoutLogger -#appender=com.p6spy.engine.logging.appender.FileLogger -# JOnAS change -appender=org.objectweb.util.monolog.wrapper.p6spy.P6SpyLogger - -# name of logfile to use, note Windows users should make sure to use forward slashes in their pathname (e:/test/spy.log) (used for file logger only) -logfile = spy.log - -# append to the p6spy log file. if this is set to false the -# log file is truncated every time. (file logger only) -append=true - -#The following are for log4j logging only -log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender -log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout -log4j.appender.STDOUT.layout.ConversionPattern=p6spy - %m%n - -#log4j.appender.CHAINSAW_CLIENT=org.apache.log4j.net.SocketAppender -#log4j.appender.CHAINSAW_CLIENT.RemoteHost=localhost -#log4j.appender.CHAINSAW_CLIENT.Port=4445 -#log4j.appender.CHAINSAW_CLIENT.LocationInfo=true - -log4j.logger.p6spy=INFO,STDOUT - - -################################################################# -# DataSource replacement # -# # -# Replace the real DataSource class in your application server # -# configuration with the name com.p6spy.engine.spy.P6DataSource,# -# then add the JNDI name and class name of the real # -# DataSource here # -# # -# Values set in this item cannot be reloaded using the # -# reloadproperties variable. Once it is loaded, it remains # -# in memory until the application is restarted. # -# # -################################################################# -#realdatasource=/RealMySqlDS -#realdatasourceclass=com.mysql.jdbc.jdbc2.optional.MysqlDataSource - -################################################################# -# DataSource properties # -# # -# If you are using the DataSource support to intercept calls # -# to a DataSource that requires properties for proper setup, # -# define those properties here. Use name value pairs, separate # -# the name and value with a semicolon, and separate the # -# pairs with commas. # -# # -# The example shown here is for mysql # -# # -################################################################# -#realdatasourceproperties=port;3306,serverName;ibmhost,databaseName;mydb - - -################################################################# -# JNDI DataSource lookup # -# # -# If you are using the DataSource support outside of an app # -# server, you will probably need to define the JNDI Context # -# environment. # -# # -# If the P6Spy code will be executing inside an app server then # -# do not use these properties, and the DataSource lookup will # -# use the naming context defined by the app server. # -# # -# The two standard elements of the naming environment are # -# jndicontextfactory and jndicontextproviderurl. If you need # -# additional elements, use the jndicontextcustom property. # -# You can define multiple properties in jndicontextcustom, # -# in name value pairs. Separate the name and value with a # -# semicolon, and separate the pairs with commas. # -# # -# The example shown here is for a standalone program running on # -# a machine that is also running JBoss, so the JDNI context # -# is configured for JBoss (3.0.4). # -# # -################################################################# -#jndicontextfactory=org.jnp.interfaces.NamingContextFactory -#jndicontextproviderurl=localhost:1099 -#jndicontextcustom=java.naming.factory.url.pkgs;org.jboss.nameing:org.jnp.interfaces - -#jndicontextfactory=com.ibm.websphere.naming.WsnInitialContextFactory -#jndicontextproviderurl=iiop://localhost:900 diff --git a/jonas/assemblies/configuration/src/main/resources/conf/trace.properties b/jonas/assemblies/configuration/src/main/resources/conf/trace.properties deleted file mode 100644 index cec081e24e9e9ccdc7175d8ec600eb05508e8ea3..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/trace.properties +++ /dev/null @@ -1,441 +0,0 @@ -# ----------------------------------------------------------------------- -# This is a default configuration file for monolog. -# -# 2 handlers have been defined : tty (System.out) and logf (file) -# -# Patterns for each handler may include these possible values : -# %h the thread name -# %O{1} the Class name (basename only) -# %M the method name -# %L the line number -# %d the date -# %l the level -# %m the message itself -# %n a new line -# -# A list of predefined loggers is given at the end of the file. -# Each logger inherits from its parent for properties not defined. -# The root logger is "root". It must always be defined. -# -# Each logger is associated with a level that can be one of : -# ERROR | WARN | INFO | DEBUG | FATAL | INHERIT -# -# -> More info on http://www.objectweb.org/monolog/doc.html -# ----------------------------------------------------------------------- - -# ----------------------------------------------------------------------- -# Define which wrapper to use (= javaLog) -# ----------------------------------------------------------------------- -# For Log4j you need to add log4j.jar -# log.config.classname org.objectweb.util.monolog.wrapper.log4j.MonologLoggerFactory -log.config.classname org.objectweb.util.monolog.wrapper.javaLog.LoggerFactory - -# ----------------------------------------------------------------------- -# tty : console handler -# The switch attribute is used to log either on System.out or System.err -# depending of the level of the log. -# ----------------------------------------------------------------------- -handler.tty.type Console -handler.tty.output Switch -handler.tty.pattern %d : %O{1}.%M : %m%n - -# ----------------------------------------------------------------------- -# mesonly : console handler without header -# ----------------------------------------------------------------------- -handler.mesonly.type Console -handler.mesonly.output Switch -handler.mesonly.pattern %m%n - -# ----------------------------------------------------------------------- -# logf : file handler -# ----------------------------------------------------------------------- -handler.logf.type File -handler.logf.output automatic -handler.logf.pattern %d : %l : %h : %O{1}.%M : %m%n - -# ----------------------------------------------------------------------- -# wsdl : file handler -# ----------------------------------------------------------------------- -handler.wsdl.type File -handler.wsdl.output jonas_wsdls.log -handler.wsdl.pattern %d : %l : %h : %O{1}.%M : %m%n - -# ----------------------------------------------------------------------- -# jmxHandler : jmx handler -# ----------------------------------------------------------------------- -#handler.jmxHandler.type jmx -#handler.jmxHandler.output Switch -#handler.jmxHandler.pattern %d : %l : %h : %O{1}.%M : %m%n - - -# ----------------------------------------------------------------------- -# logf : rolling file handler -# ----------------------------------------------------------------------- -#handler.logf.type RollingFile -#handler.logf.output jonas.log -#handler.logf.pattern %d : %l : %h : %O{1}.%M : %m%n -#handler.logf.fileNumber 2 -#handler.logf.maxSize 10000 - -# ----------------------------------------------------------------------- -# logger definitions -# ----------------------------------------------------------------------- -logger.root.handler.0 tty -logger.root.handler.1 logf -#logger.root.handler.2 jmxHandler - -logger.root.level INFO -logger.org.ow2.level INFO -logger.org.objectweb.level INFO - -#----------------------------------------------------------------------- -# JOnAS logger definitions -#----------------------------------------------------------------------- - -logger.org.ow2.jonas.admin.level INHERIT - -logger.org.ow2.jonas.bootstrap.level INHERIT - -logger.org.ow2.jonas.client.level INHERIT - -logger.org.ow2.jonas.cluster.daemon.level INHERIT - -logger.org.ow2.jonas.cmd.level INHERIT - -logger.org.ow2.jonas.cmi.level INHERIT - -logger.org.ow2.jonas.ha.level INHERIT - -logger.org.ow2.jonas.db.level INHERIT - -logger.org.ow2.jonas.dbm.level INHERIT -logger.org.ow2.jonas.dbm.con.level INHERIT -logger.org.ow2.jonas.dbm.ps.level INHERIT -logger.org.ow2.jonas.dbm.xa.level INHERIT - -logger.org.ow2.jonas.deployment.level INHERIT -logger.org.ow2.jonas.deployablemonitor.level INHERIT -logger.org.ow2.jonas.deployment.client.level INHERIT -logger.org.ow2.jonas.deployment.domain.level INHERIT -logger.org.ow2.jonas.deployment.ejb.level INHERIT -logger.org.ow2.jonas.deployment.ejb.digester.level FATAL - - - -logger.org.ow2.jonas.domain.management.level INHERIT - -# EJB 3 container -logger.org.ow2.easybeans.level INHERIT - -logger.org.ow2.jonas.ear.level INHERIT - -logger.org.ow2.jonas.ee.level INHERIT -logger.org.ow2.jonas.ee.jdbc.level INHERIT -logger.org.ow2.jonas.ee.jdbc.RA.level INHERIT -logger.org.ow2.jonas.ee.jdbc.sql.level INHERIT -logger.org.ow2.jonas.ee.jdbc.xa.level INHERIT - -logger.org.ow2.jonas.ejb.level INHERIT - -#logger.org.ow2.jonas.generators.handler.0 mesonly -#logger.org.ow2.jonas.generators.additivity false - -logger.org.ow2.jonas.generators.genbase.level INHERIT -logger.org.ow2.jonas.generators.genclientstub.level INHERIT -logger.org.ow2.jonas.generators.genic.level INHERIT -logger.org.ow2.jonas.generators.genic.velocity.level ERROR -logger.org.ow2.jonas.generators.wsgen.level INHERIT -logger.org.ow2.jonas.generators.wsgen.ews.level INHERIT - -logger.org.ow2.jonas.jca.level INHERIT -logger.org.ow2.jonas.jca.connection.level INHERIT -logger.org.ow2.jonas.jca.management.level INHERIT -logger.org.ow2.jonas.jca.pool.level INHERIT -logger.org.ow2.jonas.jca.process.level INHERIT -logger.org.ow2.jonas.jca.setters.level INHERIT - -logger.org.ow2.jonas.jmx.level INHERIT - -logger.org.ow2.jonas.jtm.level ERROR - -logger.org.ow2.jonas.lib.ejb21.level INHERIT -logger.org.ow2.jonas.lib.ejb21.coherence.level INHERIT -logger.org.ow2.jonas.lib.ejb21.context.level INHERIT -logger.org.ow2.jonas.lib.ejb21.dd.level INHERIT -logger.org.ow2.jonas.lib.ejb21.endpoint.level INHERIT -logger.org.ow2.jonas.lib.ejb21.factory.level INHERIT -logger.org.ow2.jonas.lib.ejb21.genclass.level INHERIT -logger.org.ow2.jonas.lib.ejb21.interp.level INHERIT -logger.org.ow2.jonas.lib.ejb21.mdb.level INHERIT -logger.org.ow2.jonas.lib.ejb21.mijorm.level INHERIT -logger.org.ow2.jonas.lib.ejb21.query.level INHERIT -logger.org.ow2.jonas.lib.ejb21.security.level INHERIT -logger.org.ow2.jonas.lib.ejb21.ssfpool.level INHERIT -logger.org.ow2.jonas.lib.ejb21.swapper.level INHERIT -logger.org.ow2.jonas.lib.ejb21.synchro.level INHERIT -logger.org.ow2.jonas.lib.ejb21.thread.level INHERIT -logger.org.ow2.jonas.lib.ejb21.tx.level INHERIT -logger.org.ow2.jonas.lib.ejb21.ha.level INHERIT -logger.org.ow2.jonas.lib.ejb21.ha.interceptors.iiop.level INHERIT -logger.org.ow2.jonas.lib.ejb21.ha.interceptors.jrmp.level INHERIT - - -logger.org.ow2.jonas.lib.jms.level INHERIT - -logger.org.ow2.jonas.lib.naming.java.level INHERIT - -logger.org.ow2.jonas.lib.svc.level INHERIT - -logger.org.ow2.jonas.lib.timer.level INHERIT - -logger.org.ow2.jonas.lib.util.level INHERIT - -logger.org.ow2.jonas.lib.windows.level INHERIT - -logger.org.ow2.jonas.lib.work.level INHERIT - -logger.org.ow2.jonas.loader.level INHERIT - -logger.org.ow2.jonas.mail.level INHERIT - -logger.org.ow2.jonas.management.level INHERIT -logger.org.ow2.jonas.management.cluster.level INHERIT -logger.org.ow2.jonas.management.domain.level INHERIT -logger.org.ow2.jonas.management.event.level INHERIT -logger.org.ow2.jonas.management.j2eemanagement.level INHERIT -logger.org.ow2.jonas.management.j2eemanagement.event.level INHERIT - -logger.org.ow2.jonas.naming.level INHERIT - -logger.org.ow2.jonas.propagation.level INHERIT - -logger.org.ow2.jonas.publication.handler.0 wsdl -logger.org.ow2.jonas.publication.additivity false - -logger.org.ow2.jonas.registry.level INHERIT - -logger.org.ow2.jonas.security.level INHERIT -logger.org.ow2.jonas.security.csiv2.level INHERIT -logger.org.ow2.jonas.security.csiv2_details.level INHERIT -logger.org.ow2.jonas.security.jacc.level INHERIT -logger.org.ow2.jonas.security.ws.level INHERIT - -logger.org.ow2.jonas.server.level INHERIT - -logger.org.ow2.jonas.web.level INHERIT - -logger.org.ow2.jonas.webapp.jadmin.servlet.level INHERIT - -logger.org.ow2.jonas.work.level INHERIT - -logger.org.ow2.jonas.workcleaner.level INHERIT - -logger.org.ow2.jonas.ws.level INHERIT -logger.org.ow2.jonas.ws.wsdl.level INHERIT - -#----------- -# Hibernate -#----------- -logger.org.hibernate.cache.level ERROR -logger.org.hibernate.cfg.level ERROR -logger.org.hibernate.connection.level ERROR -logger.org.hibernate.dialect.level ERROR -logger.org.hibernate.ejb.level ERROR -logger.org.hibernate.impl.level ERROR -logger.org.hibernate.hql.ast.level ERROR -logger.org.hibernate.search.level ERROR -logger.org.hibernate.tool.hbm2ddl.level ERROR -logger.org.hibernate.transaction.level ERROR -logger.org.hibernate.validator.level ERROR - -#------- -# JOTM -#------- -logger.org.objectweb.jotm.level INFO -logger.org.objectweb.jotm.jta.level INHERIT -logger.org.objectweb.jotm.tm.level INHERIT -logger.org.objectweb.jotm.recovery.level INHERIT - -#------- -# MEJB -#------- -logger.org.ow2.jonas.ee.mejb.level INFO - -#------- -# CAROL -#------- -logger.org.ow2.carol.level INFO -logger.org.ow2.carol.rmi.level INHERIT -logger.org.ow2.carol.jndi.level INHERIT - -#------- -# JORM -#------- -logger.org.objectweb.jorm.level WARN -logger.org.objectweb.jorm.compiler.level INHERIT -logger.org.objectweb.jorm.xml2mi.level INHERIT -logger.org.objectweb.jorm.mi2xml.level INHERIT -logger.org.objectweb.jorm.metainfo.level INHERIT -logger.org.objectweb.jorm.generator.level INHERIT -logger.org.objectweb.jorm.generator.velocity.level ERROR -logger.org.objectweb.jorm.mapper.rdb.generator.level INHERIT - -#------- -# MEDOR -#------- -logger.org.objectweb.medor.level INHERIT -logger.org.objectweb.medor.optim.rule.level INHERIT -logger.org.objectweb.medor.optim.rewriter.level INHERIT -logger.org.objectweb.medor.eval.rdb.level INHERIT - -#------- -# JORAM -#------- -logger.fr.dyade.aaa.level ERROR -logger.fr.dyade.aaa.agent.level ERROR -logger.fr.dyade.aaa.agent.Agent.level INHERIT -logger.fr.dyade.aaa.agent.Engine.level INHERIT -logger.fr.dyade.aaa.agent.Service.level INHERIT -logger.org.objectweb.joram.level ERROR -logger.org.objectweb.joram.mom.level INHERIT -logger.org.objectweb.joram.mom.Destination.level INHERIT -logger.org.objectweb.joram.mom.Proxy.level INHERIT -logger.org.objectweb.joram.client.level INHERIT -logger.org.objectweb.joram.client.jms.Client.level ERROR -logger.org.objectweb.joram.client.connector.Adapter.level ERROR - -#------- -# SPEEDO -#------- -logger.org.objectweb.speedo.level WARN -## GENERATION -logger.org.objectweb.speedo.generation.SpeedoCompiler.level INFO -## RUN TIME -logger.org.objectweb.speedo.init.level INHERIT -logger.org.objectweb.speedo.po-manager-factory.level INHERIT -logger.org.objectweb.speedo.po-manager-switch.level INHERIT -logger.org.objectweb.speedo.po-manager-pool.level INHERIT -logger.org.objectweb.speedo.po-manager-instanciator.level INHERIT -logger.org.objectweb.speedo.po-manager.level INHERIT -logger.org.objectweb.speedo.po-manager.query.level INHERIT -logger.org.objectweb.speedo.mapper.level INHERIT -logger.org.objectweb.speedo.mapper.mapper.level INHERIT -logger.org.objectweb.speedo.mapper.mapper.sql.level INHERIT -logger.org.objectweb.speedo.mapper.jorm-factory.level INHERIT -logger.org.objectweb.speedo.mapper.jorm-factory.class-properties.level INHERIT -logger.org.objectweb.speedo.mapper.pool.level INHERIT -logger.org.objectweb.speedo.mapper.storage-manager.level INHERIT -logger.org.objectweb.speedo.memory-instance-manager.level INHERIT -logger.org.objectweb.speedo.workingset-manager.level INHERIT -logger.org.objectweb.speedo.naming-manager-factory.level INHERIT -logger.org.objectweb.speedo.transaction.level INHERIT -logger.org.objectweb.speedo.tpm.level INHERIT -logger.org.objectweb.speedo.tpm.transactional-persistence-manager.level INHERIT -logger.org.objectweb.speedo.tpm.cache-manager.level INHERIT -logger.org.objectweb.speedo.tpm.cache-manager.bgcleaner.level INHERIT -logger.org.objectweb.speedo.tpm.concurrency-manager.level INHERIT -logger.org.objectweb.speedo.query-manager.level INHERIT -logger.org.objectweb.speedo.query-manager.compiled-query.level INHERIT -logger.org.objectweb.speedo.query-manager.compiled-query.allocator.level INHERIT -logger.org.objectweb.speedo.query-manager.compiled-query.parser.level INHERIT -logger.org.objectweb.speedo.query-manager.compiled-query.parser.variable.level INHERIT -logger.org.objectweb.speedo.query-manager.compiled-query.parser.filter.level INHERIT -logger.org.objectweb.speedo.compiled-query-cache.level INHERIT -logger.org.objectweb.speedo.jca.level INHERIT -logger.org.objectweb.speedo.txStatistic.level INHERIT -logger.org.objectweb.speedo.jmx.level INHERIT - -# Struts -logger.org.apache.struts.util.level WARN - -#------------------------------ -# Tomcat 6 - Catalina logging -#------------------------------ -logger.org.apache.catalina.core.ContainerBase.[jonas].level INFO -logger.org.apache.catalina.core.ContainerBase.[jonas].[localhost].level INFO -logger.org.apache.catalina.core.ContainerBase.[jonas].[localhost].[path].level INFO -### example for jonasAdmin ### -logger.org.apache.catalina.core.ContainerBase.[jonas].[localhost].[jonasAdmin].level INFO - -#----------------------------- -# Jetty 6 (Avoid log of MBean registration (info level) -#----------------------------- -logger.org.mortbay.util.jmx.ModelMBeanImpl.level ERROR - -#----------------------------- -# Apache CXF -#----------------------------- -logger.org.apache.cxf.level INHERIT -# Avoid a log diplaying erroneous informations (INFO level) -# TODO remove theses lines when a proper startup message policy will be decided -logger.org.apache.cxf.endpoint.ServerImpl.level ERROR - -#----------------------------- -# Open Symphony Quartz -#----------------------------- -logger.org.quartz.level INHERIT -# Avoid logs of unwanted informations (INFO level) -# TODO remove theses lines when a proper startup message policy will be decided -logger.org.quartz.core.QuartzScheduler.level ERROR -logger.org.quartz.simpl.RAMJobStore.level ERROR -logger.org.quartz.impl.StdSchedulerFactory.level ERROR - -# ----------------------------------------------------------------------- -# MX4J - also need to set system proprty mx4j.log.priority to the corresponding level -# (fatal, error, warn, info, debug, trace) -# ----------------------------------------------------------------------- -logger.mx4j.level ERROR - -#----------------------------- -# OSGi logging -#----------------------------- -logger.org.ow2.util.log.impl.osgi.level ERROR - -#----------------------------- -# Deployment plan logging -#----------------------------- -logger.org.ow2.util.plan.deployer.impl.level ERROR - -#--------- -# File logger for JGroups -# JGroups -#--------- -handler.all_jgroups.type File -handler.all_jgroups.output all_jgroups.log -handler.all_jgroups.pattern %d : %l : %h : %O{1}.%M : %m%n -logger.org.jgroups.level FATAL -logger.org.jgroups.handler.0 all_jgroups -logger.org.jgroups.additivity false - -# ----------------------------------------------------------------------- -# For Log file (tests) -# ----------------------------------------------------------------------- -handler.logtest.type File -handler.logtest.output jonas_tests.log -handler.logtest.pattern %d : %l : %h : %O{1}.%M : %m%n -logger.org.ow2.jonas_tests.history.level INFO -logger.org.ow2.jonas_tests.history.handler.0 logtest -logger.org.ow2.jonas_tests.history.additivity false - - -#--- -# Discovery Logger configuration -#uncomment these lines to configure a file logger for jonas discovery -#handler.jonas-discovery.type File -#handler.jonas-discovery.output jonas_discovery.log -#handler.jonas-discovery.pattern %d : %l : %h : %O{1}.%M : %m%n -# Don't forget to set logs level. -logger.org.ow2.jonas.discovery.level INFO -#logger.org.ow2.jonas.discovery.handler.0 jonas-discovery -#logger.org.ow2.jonas.discovery.additivity false - -#--- -#Granite Logger configuration -handler.granite-ds.type File -handler.granite-ds.output granite-ds.log -handler.granite-ds.pattern %d : %l : %h : %O{1}.%M : %m%n -# Don't forget to set logs level. -logger.org.granite.config.level INFO -logger.org.granite.config.handler.0 granite-ds -logger.org.granite.config.additivity false - diff --git a/jonas/assemblies/configuration/src/main/resources/conf/traceclient.properties b/jonas/assemblies/configuration/src/main/resources/conf/traceclient.properties deleted file mode 100644 index 5190f18bcc9a7f18f9e4fd8540fe61d10beb6800..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/traceclient.properties +++ /dev/null @@ -1,45 +0,0 @@ -# ----------------------------------------------------------------------- -# This is a default configuration file for monolog. -# -# Patterns for each handler may include these possible values : -# %h the thread name -# %O{1} the Class name (basename only) -# %M the method name -# %L the line number -# %d the date -# %l the level -# %m the message itself -# %n a new line -# -# Each logger inherits from its parent for properties not defined. -# The root logger is "root". It must always be defined. -# -# Each logger is associated with a level that can be one of : -# ERROR | WARN | INFO | DEBUG -# -# -> More info on http://www.objectweb.org/monolog/doc.html -# ----------------------------------------------------------------------- -# -# Define which wrapper to use (= javaLog) -# ----------------------------------------------------------------------- -# For Log4j you need to add log4j.jar -# log.config.classname org.objectweb.util.monolog.wrapper.log4j.MonologLoggerFactory -log.config.classname org.objectweb.util.monolog.wrapper.javaLog.LoggerFactory - -# ----------------------------------------------------------------------- -# tty : console handler -# ----------------------------------------------------------------------- -handler.tty.type Console -handler.tty.output System.out -handler.tty.pattern %d : %h : %O{1}.%M : %m%n - -# ----------------------------------------------------------------------- -# logger definitions -# ----------------------------------------------------------------------- -logger.root.handler.0 tty - -logger.root.level ERROR -logger.org.ow2.jonas.client.level WARN - -# Set INFO to see test names. -logger.org.objectweb.jonas_tests.level WARN \ No newline at end of file diff --git a/jonas/assemblies/configuration/src/main/resources/conf/uddi.properties b/jonas/assemblies/configuration/src/main/resources/conf/uddi.properties deleted file mode 100644 index 99f2d808f0fa187e40c283d56cbce39fe10cab21..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/uddi.properties +++ /dev/null @@ -1,17 +0,0 @@ -# $Id$ - -# RegistryWSDLPublisher class -jonas.service.wsdl.class org.ow2.jonas.ws.publish.internal.registry.RegistryWSDLPublisher - -# User name and Password to access Registry -jonas.service.publish.uddi.username jonas -jonas.service.publish.uddi.password jonas - -# Organization name, small desc (optionnal) and primary contact name. -jonas.service.publish.uddi.organization.name OW2 -jonas.service.publish.uddi.organization.desc OW2 Consortium (http://www.ow2.org) -jonas.service.publish.uddi.organization.person_name JOnAS - -# URLs where Registry can be contacted (Publish an Query APIs) -javax.xml.registry.lifeCycleManagerURL http://localhost:9000/juddi/publish -javax.xml.registry.queryManagerURL http://localhost:9000/juddi/inquiry diff --git a/jonas/assemblies/configuration/src/main/resources/conf/wrapper.conf b/jonas/assemblies/configuration/src/main/resources/conf/wrapper.conf deleted file mode 100644 index 37b72349b42eee82f6d84a04ea4b0aff9a482885..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/wrapper.conf +++ /dev/null @@ -1,134 +0,0 @@ -#******************************************************************** -# Wrapper Properties -# -# DO NOT MODIFY THIS FILE, IT WILL BE REGERENATED BY THE ANT TASK. -# -# For extra options, use the wrapper_extra.conf file instead. -# -#******************************************************************** -# Java Application -#wrapper.debug=true -wrapper.java.command=@java.home@/bin/java - -# Java Main class -wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperStartStopApp - -# Java Classpath (wrapper.jar is required) -# Add JOnAS class path elements as needed starting from 2 -wrapper.java.classpath.1=@wrapper.home@/lib/wrapper.jar - -# Java Library Path (location of Wrapper.DLL or libwrapper.so) -wrapper.java.library.path.1=@wrapper.home@/lib - -# Java Additional Parameters -wrapper.java.additional.1=-Dorg.tanukisoftware.wrapper.WrapperStartStopApp.waitForStartMain=FALSE - -# Initial Java Heap Size (in MB) -# set to zero so that -Xms can be set using wrapper.java.additonal -# in the wrapper_ext.conf file. // BUG 304628 -# SET JAVA_OPTS=-Xms before running the ANT task -wrapper.java.initmemory=0 - -# Maximum Java Heap Size (in MB) -# set to zero so that -Xmx can be set using wrapper.java.additonal -# in the wrapper_ext.conf file. // BUG 304628 -# SET JAVA_OPTS=-Xmx before running the ANT task -wrapper.java.maxmemory=0 - -# Port which the native wrapper code will attempt to connect to -wrapper.port=4777 - -#******************************************************************** -# Application parameters. -# -# THESE PARAMETERS SHOULD NOT BE MODIFIED -# -# Parameters in this section specify the Java classes to be run -# and the parameters to the classes. -# The parameters defined in this section will start and stop -# JOnAS using the default server name of 'jonas'. -# wrapper.app.parameter.8 specifies the server name. This value -# can be changed by setting wrapper.app.parameter.8 in the -# wrapper_ext.conf file that is generated by the ANT task. -# -# The parameters below should be identical to those used -# by bin\jonas.bat to start and stop the server. -#******************************************************************** - -# Start parameters -wrapper.app.parameter.1=org.ow2.jonas.commands.admin.ClientAdmin -wrapper.app.parameter.2=1 -wrapper.app.parameter.3=-start - -# Stop parameters -wrapper.app.parameter.4=org.ow2.jonas.commands.admin.ClientAdmin -wrapper.app.parameter.5=false -wrapper.app.parameter.6=1 -wrapper.app.parameter.7=-stop - -#******************************************************************** -# Wrapper Logging Properties -#******************************************************************** -# Format of output for the console. (See docs for formats) -wrapper.console.format=PM - -# Log Level for console output. (See docs for log levels) -wrapper.console.loglevel=INFO - -# Log file to use for wrapper output logging. -wrapper.logfile=@jonas.base@/logs/wrapper.log - -# Format of output for the log file. (See docs for formats) -wrapper.logfile.format=LPTM - -# Log Level for log file output. (See docs for log levels) -wrapper.logfile.loglevel=INFO - -# Maximum size that the log file will be allowed to grow to before -# the log is rolled. Size is specified in bytes. The default value -# of 0, disables log rolling. May abbreviate with the 'k' (kb) or -# 'm' (mb) suffix. For example: 10m = 10 megabytes. -wrapper.logfile.maxsize=0 - -# Maximum number of rolled log files which will be allowed before old -# files are deleted. The default value of 0 implies no limit. -wrapper.logfile.maxfiles=0 - -# Log Level for sys/event log output. (See docs for log levels) -wrapper.syslog.loglevel=NONE - -#******************************************************************** -# Wrapper NT Service Properties -#******************************************************************** -# WARNING - Do not modify any of these properties when an application -# using this configuration file has been installed as a service. -# Please uninstall the service before modifying this section. The -# service can then be reinstalled. - -# Name of the service -wrapper.ntservice.name=JOnAS - -# Display name of the service -wrapper.ntservice.displayname=JOnAS - -# Description of the service -wrapper.ntservice.description=JOnAS Java EE Application Server - -# Service dependencies. Add dependencies as needed starting from 1 -wrapper.ntservice.dependency.1= - -# Mode in which the service is installed. AUTO_START or DEMAND_START -wrapper.ntservice.starttype=AUTO_START - -# Allow the service to interact with the desktop. -wrapper.ntservice.interactive=false - -#******************************************************************** -# include wrapper.conf extensions specific to JONAS_BASE -# -# note that #include is a wrapper directive, not a comment -# -# this will be resolved to JONAS_BASE by the ANT task -#******************************************************************** -#include @jonas.base@/conf/wrapper_extra.conf - diff --git a/jonas/assemblies/configuration/src/main/resources/conf/wrapper_extra.conf b/jonas/assemblies/configuration/src/main/resources/conf/wrapper_extra.conf deleted file mode 100644 index 3896c5aad94e896bb2a6ea7e877113975b096759..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/conf/wrapper_extra.conf +++ /dev/null @@ -1,8 +0,0 @@ -#******************************************************************** -# Wrapper Properties -# -# For information regarding these parameters refer to the -# Java Service Wrapper documentation at -# http://wrapper.tanukisoftware.org/doc/english/properties.html -# -#******************************************************************** diff --git a/jonas/assemblies/configuration/src/main/resources/deploy/jdbc-ds.xml b/jonas/assemblies/configuration/src/main/resources/deploy/jdbc-ds.xml deleted file mode 100644 index f4a60b0f94e235d1a5cc811ec39cea558e7cf30a..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/deploy/jdbc-ds.xml +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - jdbc_1 - jdbc:hsqldb:hsql://localhost:9001/db_jonas - org.hsqldb.jdbcDriver - jonas - jonas - rdb.hsql - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - select count(1) from information_schema.system_tables - 1440 - 60 - 10 - 10 - 100 - 100 - 5 - 100 - 30 - - - diff --git a/jonas/assemblies/configuration/src/main/resources/newjb/build-jb.properties b/jonas/assemblies/configuration/src/main/resources/newjb/build-jb.properties deleted file mode 100644 index 74e7628eaf517d11b274069ae5af4b1d365a632b..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/newjb/build-jb.properties +++ /dev/null @@ -1,113 +0,0 @@ -#Drivers directory -drivers.dir=jb.config/lib - -#jonas.properties global properties -jonas.services=jtm,db,security,resource,ejb3,jaxws,web,ear,depmonitor -jonas.security.propagation=true -jonas.security.manager=false -jonas.csiv2.propagation=true -jonas.log.configfile=trace -jonas.transaction.propagation=true -jonas.development=true -#Jms -jms.port=16010 -jms.topics=InvoiceTopic -jms.queues=OrderApprovalQueue,OrdersQueue,MailCompletedOrderQueue,SupPurchaseOrderQueue,MailOrderApprovalQueue,MailQueue - -#Carol -carol.allport=1099 -carol.defaultprotocol=jrmp -carol.jrmpopt=false -carol.localregistry=true - -#Web -webcontainer.port=9000 -# Tomcat/Jetty -webcontainer.service.defaultname=tomcat -webcontainer.ondemandenabled=true -webcontainer.ondemanderedirectport=0 -#Db -db.port=9001 - -#Discovery -discovery.sourceport=9888 -discovery.greetingport=9899 -discovery.mcastaddr=224.224.224.224 -discovery.mcastport=9080 -discovery.ttl=1 - -#Database -rajdbc.defaultname=hsql - -#DB connections through RAR - -rajdbc.hsql.user=jonas -rajdbc.hsql.password=jonas -rajdbc.hsql.url=jdbc:hsqldb:hsql://localhost:9001/db_jonas -rajdbc.hsql.drivername=org.hsqldb.jdbcDriver -rajdbc.hsql.jndiname=jdbc_1 -rajdbc.hsql.jdbcdriverjarfile=none -rajdbc.hsql.mappername=rdb.hsql - -rajdbc.postgresql.user=jonas -rajdbc.postgresql.password=jonas -rajdbc.postgresql.url=jdbc:postgresql://localhost:5433/db_jonas -rajdbc.postgresql.drivername=org.postgresql.Driver -rajdbc.postgresql.jndiname=jdbc_1 -rajdbc.postgresql.jdbcdriverjarfile=postgresql.jar -rajdbc.postgresql.mappername=rdb.postgresql - -rajdbc.oracle.user=jonas -rajdbc.oracle.password=jonas -rajdbc.oracle.url=jdbc:oracle:thin:@localhost:1521:db_jonas -rajdbc.oracle.drivername=oracle.jdbc.driver.OracleDriver -rajdbc.oracle.jndiname=jdbc_1 -rajdbc.oracle.jdbcdriverjarfile=ojdbc5.jar -rajdbc.oracle.mappername=rdb.oracle - -rajdbc.mysql.user=root -rajdbc.mysql.password= -rajdbc.mysql.url=jdbc:mysql:http://localhost:3306/db_jonas -rajdbc.mysql.drivername=org.gjt.mm.mysql.Driver -rajdbc.mysql.jndiname=jdbc_1 -rajdbc.mysql.jdbcdriverjarfile=mysql-connector-java.jar -rajdbc.mysql.mappername=rdb.mysql - -#DB connections through datasource XML - -xmljdbc.hsql.name=jdbc_1 -xmljdbc.hsql.username=jonas -xmljdbc.hsql.password=jonas -xmljdbc.hsql.url=jdbc:hsqldb:hsql://localhost:9001/db_jonas -xmljdbc.hsql.mapper=rdb.hsql -xmljdbc.hsql.classname=org.hsqldb.jdbcDriver -xmljdbc.hsql.conteststmt=select count(1) from information_schema.system_tables -xmljdbc.hsql.connmaxage=1440 -xmljdbc.hsql.conchecklevel=2 -xmljdbc.hsql.initconpool=10 -xmljdbc.hsql.minconpool=10 -xmljdbc.hsql.maxconpool=100 -xmljdbc.hsql.maxopentime=60 -xmljdbc.hsql.maxwaiters=100 -xmljdbc.hsql.maxwaitingtime=5 -xmljdbc.hsql.pstmtmax=100 -xmljdbc.hsql.samplingperiod=100 - -#Mail -mail.session.name=mailSession_1 -mail.mimepartds.name=mailMimePartDS_1 -mail.to=jean.dupont@ow2.org -mail.subject=test mail -mail.host=localhost - - -#Wsdl -wsdl.file.name=file1 -wsdl.file.dir=/tmp/ - -#Cluster daemon configuration -cluster.daemon.protocol=jrmp -cluster.daemon.port=1806 -cluster.daemon.interactionMode=loosely-coupled -discovery.domainName=jonas - diff --git a/jonas/assemblies/configuration/src/main/resources/newjb/build-jb.xml b/jonas/assemblies/configuration/src/main/resources/newjb/build-jb.xml deleted file mode 100644 index 984575f7532729723265e3a6d918e7c7808d83ef..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/newjb/build-jb.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas/assemblies/configuration/src/main/resources/newjc/build-db.properties b/jonas/assemblies/configuration/src/main/resources/newjc/build-db.properties deleted file mode 100644 index 3d8330fd13eb053390e97bff95aedcc06d34b6b7..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/newjc/build-db.properties +++ /dev/null @@ -1,80 +0,0 @@ -#Drivers directory -drivers.dir=jc.config/lib - -#Services -jonas.services=registry,jmx,jtm,db,security,resource,discovery - -#Jms -jms.port=16050 -jms.topics=sampleTopic,InvoiceTopic -jms.queues=sampleQueue,OrderApprovalQueue,OrdersQueue,MailCompletedOrderQueue,SupPurchaseOrderQueue,MailOrderApprovalQueue,MailQueue - -#Carol -carol.allport=2053 -carol.defaultprotocol=jrmp -carol.protocol=jrmp -carol.jrmpopt=false -carol.localregistry=true - -#Web -webcontainer.port=9500 -# Tomcat -webcontainer.service.defaultname=tomcat -webcontainer.service.name=tomcat - -#Db -db.port=9005 - -#Discovery -# sourceport is set to -1 for disabling the master node -discovery.sourceport=-1 -discovery.greetingport=9903 -discovery.mcastaddr=224.224.224.224 -discovery.mcastport=9080 -discovery.ttl=1 - -#Database -rajdbc.defaultname=hsql -rajdbc.name=hsql - -#DB connections through RAR - -rajdbc.hsql.user=jonas -rajdbc.hsql.password=jonas -rajdbc.hsql.url=jdbc:hsqldb:hsql://localhost:9005/db_jonas -rajdbc.hsql.drivername=org.hsqldb.jdbcDriver -rajdbc.hsql.jndiname=jdbc_1 -rajdbc.hsql.jdbcdriverjarfile=none -rajdbc.hsql.mappername=rdb.hsql - -#DB connections through datasource XML - -xmljdbc.hsql.name=jdbc_1 -xmljdbc.hsql.username=jonas -xmljdbc.hsql.password=jonas -xmljdbc.hsql.url=jdbc:hsqldb:hsql://localhost:9005/db_jonas -xmljdbc.hsql.mapper=rdb.hsql -xmljdbc.hsql.classname=org.hsqldb.jdbcDriver -xmljdbc.hsql.conteststmt=select count(1) from information_schema.system_tables -xmljdbc.hsql.connmaxage=1440 -xmljdbc.hsql.conchecklevel=2 -xmljdbc.hsql.initconpool=10 -xmljdbc.hsql.minconpool=10 -xmljdbc.hsql.maxconpool=100 -xmljdbc.hsql.maxopentime=60 -xmljdbc.hsql.maxwaiters=100 -xmljdbc.hsql.maxwaitingtime=5 -xmljdbc.hsql.pstmtmax=100 -xmljdbc.hsql.samplingperiod=100 - -#Mail -mail.session.name=mailSession_1 -mail.mimepartds.name=mailMimePartDS_1 -mail.to=jean.dupont@objectweb.org -mail.subject=test mail - - -#Wsdl -wsdl.file.name=wsdlJean_Dupont -wsdl.file.dir=/tmp/ - diff --git a/jonas/assemblies/configuration/src/main/resources/newjc/build-jc.properties b/jonas/assemblies/configuration/src/main/resources/newjc/build-jc.properties deleted file mode 100644 index 0c858e0811d68fb3605bdd04b673a0fa7a06cd0a..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/newjc/build-jc.properties +++ /dev/null @@ -1,181 +0,0 @@ -# Prefix for JONAS_BASE directories -jonas.base.defaultprefix=jb - -#Drivers directory -drivers.dir=jc.config/lib - -#Cluster architecture : -# bothWebEjb : both web and ejb services and each instance -# diffWebEjb : dedicates instances to web level and separated instances to ejb level -cluster.architecture.default=diffWebEjb - -#Cluster architecture : -# nodes name : prefix of the node names -cluster.nodesName=node - -#Cluster daemon configuration -cluster.daemon.name=cd -cluster.daemon.protocol=jrmp -cluster.daemon.port=1806 -cluster.daemon.dir=cd -#enable this to set JAVA_HOME of the cluster daemon -#cluster.daemon.jdk=/usr/java/jdk/sun/current-1.5 -cluster.daemon.interactionMode=loosely-coupled -cluster.daemon.autoBoot=false -cluster.daemon.xprm=-Djava.net.preferIPv4Stack=true - -#Services -jonas.web.services=registry,jmx,jtm,security,cmi,jaxrpc,web,ear,depmonitor,discovery -jonas.ejb.services=registry,jmx,jtm,db,security,resource,cmi,ha,ejb2,ejb3,ear,depmonitor,discovery -jonas.full.services=registry,jmx,jtm,db,security,resource,cmi,ha,ejb2,ejb3,jaxrpc,jaxws,web,ear,depmonitor,discovery - -#Jms -jms.portrange=16010,16020,16030,16040 -jms.topics=sampleTopic,InvoiceTopic -jms.queues=sampleQueue,OrderApprovalQueue,OrdersQueue,MailCompletedOrderQueue,SupPurchaseOrderQueue,MailOrderApprovalQueue,MailQueue - -#Carol -carol.portrange=2002,2022,2032,2043 -carol.defaultprotocol=jrmp -carol.jrmpopt=false - -# Cmi service -cmi.mcastaddr=224.0.0.35 -cmi.mcastport=35467 - -# Ha service -ha.mcastaddr=224.0.0.36 -ha.mcastport=35468 - -#Web -webcontainer.httpportrange=9000,9200,9300,9400 -webcontainer.ajpportrange=9010,9011,9012,9013 -webcontainer.stickysession=false -webcontainer.mod_jkenabled=true -webcontainer.mod_jk.dir=conf/jk -webcontainer.mod_jk.lbfactorrange=1,1,1,1 -webcontainer.directorenabled=false -webcontainer.directorportrange=9996,9997,9998,9999 -webcontainer.director.lbfactorrange=1,1,1,1 -webcontainer.director.dir=director -webcontainer.cluster.name=myTomcatCluster -webcontainer.cluster.mcastaddr=228.0.0.4 -webcontainer.cluster.mcastport=45564 -webcontainer.cluster.listenportrange=4003,4004,4005,4006 -# Enable ondemand on web instances -webinstances.ondemandenabled=true -webinstances.ondemand.redirectport=0 - -#disable development mode on web instances. -webinstances.devmodeenabled=false -#enable development mode for depmonitor on ejb instances. -webinstances.depmonitor.devmodeenabled=true - -#Tomcat -webcontainer.service.defaultname=tomcat - -#disable ondemand on ejb instances -ejbinstances.ondemandenabled=false -#disable development mode on ejb instances. -ejbinstances.devmodeenabled=false -#enable development mode for depmonitor on ejb instances. -ejbinstances.depmonitor.devmodeenabled=true - -#Director -director.lib.jarfile=tomcat5.5-director.jar - -#Discovery service -discovery.sourceportrange=-1,-1,-1,-1 -discovery.greetingportrange=9899,9900,9901,9902 -discovery.mcastaddr=224.224.224.224 -discovery.mcastport=9080 -discovery.domainName=sampleClusterDomain -discovery.domainDesc=A domain for management of cluster examples. -discovery.clusterName=mycluster -discovery.clusterDesc=A cluster sample. -# specify here the node number that will be the master. By default, the feature -# is supported by a dedicated node but the file is generated in the first cluster -# member. Then it will copy to the master conf dir -discovery.masternode=1 - -#Master node when the feature is shipped by a dedicated node (default) -master.dir=master -master.nodeName=master - -#Db -db.portrange=9001,9002,9003,9004 -db.dir=db -db.nodeName=db - - -#Database -rajdbc.defaultname=hsql - -#DB connections through datasource RA - -rajdbc.hsql.user=jonas -rajdbc.hsql.password=jonas -rajdbc.hsql.url=jdbc:hsqldb:hsql://localhost:9005/db_jonas -rajdbc.hsql.drivername=org.hsqldb.jdbcDriver -rajdbc.hsql.jndiname=jdbc_1 -rajdbc.hsql.jdbcdriverjarfile=none -rajdbc.hsql.mappername=rdb.hsql - -rajdbc.postgresql.user=jonas -rajdbc.postgresql.password=jonas -rajdbc.postgresql.url=jdbc:postgresql://localhost:5433/db_jonas -rajdbc.postgresql.drivername=org.postgresql.Driver -rajdbc.postgresql.jndiname=jdbc_1 -rajdbc.postgresql.jdbcdriverjarfile=postgresql.jar -rajdbc.postgresql.mappername=rdb.postgresql - -rajdbc.oracle.user=jonas -rajdbc.oracle.password=jonas -rajdbc.oracle.url=jdbc:oracle:thin:@localhost:1521:db_jonas -rajdbc.oracle.drivername=oracle.jdbc.driver.OracleDriver -rajdbc.oracle.jndiname=jdbc_1 -rajdbc.oracle.jdbcdriverjarfile=ojdbc5.jar -rajdbc.oracle.mappername=rdb.oracle - -rajdbc.mysql.user=root -rajdbc.mysql.password= -rajdbc.mysql.url=jdbc:mysql:http://localhost:3306/db_jonas -rajdbc.mysql.drivername=org.gjt.mm.mysql.Driver -rajdbc.mysql.jndiname=jdbc_1 -rajdbc.mysql.jdbcdriverjarfile=mysql-connector-java.jar -rajdbc.mysql.mappername=rdb.mysql - -#DB connections through datasource XML - -xmljdbc.hsql.name=jdbc_1 -xmljdbc.hsql.username=jonas -xmljdbc.hsql.password=jonas -xmljdbc.hsql.url=jdbc:hsqldb:hsql://localhost:9005/db_jonas -xmljdbc.hsql.mapper=rdb.hsql -xmljdbc.hsql.classname=org.hsqldb.jdbcDriver -xmljdbc.hsql.conteststmt=select count(1) from information_schema.system_tables -xmljdbc.hsql.connmaxage=1440 -xmljdbc.hsql.conchecklevel=2 -xmljdbc.hsql.initconpool=10 -xmljdbc.hsql.minconpool=10 -xmljdbc.hsql.maxconpool=100 -xmljdbc.hsql.maxopentime=60 -xmljdbc.hsql.maxwaiters=100 -xmljdbc.hsql.maxwaitingtime=5 -xmljdbc.hsql.pstmtmax=100 -xmljdbc.hsql.samplingperiod=100 - - -#Mail -mail.session.name=mailSession_1 -mail.mimepartds.name=mailMimePartDS_1 -mail.to=jean.dupont@ow2.org -mail.subject=test mail -mail.host=localhost - -#Wsdl -wsdl.file.name=wsdlPublishFile -wsdl.file.dir=/tmp/ - -# script -script.node.basename=node diff --git a/jonas/assemblies/configuration/src/main/resources/newjc/build-jc.xml b/jonas/assemblies/configuration/src/main/resources/newjc/build-jc.xml deleted file mode 100644 index 340251472fceba4c57ba25befa99043255a5b09a..0000000000000000000000000000000000000000 --- a/jonas/assemblies/configuration/src/main/resources/newjc/build-jc.xml +++ /dev/null @@ -1,390 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "); - - return sb.toString(); - } -} \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/LabelValueBean.java b/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/LabelValueBean.java deleted file mode 100644 index 1f0e9b2843066bd8b59a32bbe4a922b2cdd05de9..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/LabelValueBean.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * $Header$ - * $Revision: 11749 $ - * $Date: 2007-10-08 11:47:44 +0200 (lun 08 oct 2007) $ - * - * ==================================================================== - * - * The Apache Software License, Version 1.1 - * - * Copyright (c) 1999-2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. - * - * 4. The names "The Jakarta Project", "Struts", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - */ - -package org.ow2.jonas.webapp.taglib; - -import java.io.Serializable; - -/** - * Simple JavaBean to represent label-value pairs for use in collections - * that are utilized by the <form:options> tag. - * - * @author Craig R. McClanahan - * @version $Revision: 1.2 - */ - -public class LabelValueBean implements Serializable { - - // ----------------------------------------------------------- Constructors - - /** - * Construct a new LabelValueBean with the specified values. - * - * @param label The label to be displayed to the user - * @param value The value to be returned to the server - */ - public LabelValueBean(String label, String value) { - this.label = label; - this.value = value; - } - - // ------------------------------------------------------------- Properties - - /** - * The label to be displayed to the user. - */ - protected String label = null; - - public String getLabel() { - return (this.label); - } - - /** - * The value to be returned to the server. - */ - protected String value = null; - - public String getValue() { - return (this.value); - } - - // --------------------------------------------------------- Public Methods - - /** - * Return a string representation of this object. - */ - public String toString() { - StringBuffer sb = new StringBuffer("LabelValueBean["); - sb.append(this.label); - sb.append(", "); - sb.append(this.value); - sb.append("]"); - return (sb.toString()); - } - -} diff --git a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/PanelSeparatorTag.java b/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/PanelSeparatorTag.java deleted file mode 100644 index 56cba39d4e0073959c9b71984ae01fa4f7b96f46..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/PanelSeparatorTag.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Michel-Ange ANTON - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.webapp.taglib; - -import java.io.IOException; - -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.JspWriter; -import javax.servlet.jsp.tagext.TagSupport; - -public class PanelSeparatorTag extends TagSupport { - -// --------------------------------------------------------- Public Methods - - /** - * . - * - * @exception JspException if a processing error occurs - */ - public int doEndTag() - throws JspException { - StringBuffer sb = new StringBuffer(); - // Render Separator - sb.append(""); - sb.append( - ""); - sb.append("
 
"); - - // Render this element to our writer - JspWriter out = pageContext.getOut(); - try { - out.print(sb.toString()); - } - catch (IOException e) { - throw new JspException("Exception in " + getClass().getName() + " doEndTag():" - + e.toString()); - } - return EVAL_PAGE; - } -} \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/PanelTag.java b/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/PanelTag.java deleted file mode 100644 index de2f975d478444a4398e7dd75cdbda3bb03688ca..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/PanelTag.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Michel-Ange ANTON - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.webapp.taglib; - -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.tagext.BodyTagSupport; -import javax.servlet.jsp.tagext.Tag; - -public class PanelTag extends BodyTagSupport { - -// ----------------------------------------------------- Instance Variables - - /** - * The databody that will be rendered for this table row. - */ - private String body = null; - -// --------------------------------------------------------- Public Methods - - /** - * Process the start of this tag. - * - * @exception JspException if a JSP exception has occurred - */ - public int doStartTag() - throws JspException { - // Initialize the holder for our databody text - this.body = null; - // Do no further processing for now - return (EVAL_BODY_BUFFERED); - } - - /** - * Process the body text of this tag (if any). - * - * @exception JspException if a JSP exception has occurred - */ - public int doAfterBody() - throws JspException { - String data = bodyContent.getString(); - if (data != null) { - data = data.trim(); - if (data.length() > 0) { - this.body = data; - } - } - return (SKIP_BODY); - } - - /** - * . - * - * @exception JspException if a processing error occurs - */ - public int doEndTag() - throws JspException { - // Find our parent TabsTag instance - Tag parent = findAncestorWithClass(this, TabsTag.class); - if ((parent == null) || !(parent instanceof TabsTag)) { - throw new JspException("Must be nested in a TabsTag instance"); - } - TabsTag oTabsTag = (TabsTag) parent; - - // Register the information for the action represented by - // this action - //HttpServletResponse response = (HttpServletResponse) pageContext.getResponse(); - oTabsTag.setBody(body); - - return (EVAL_PAGE); - } - - /** - * Release all state information set by this tag. - */ - public void release() { - this.body = null; - } - -} diff --git a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/RefreshTreeTag.java b/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/RefreshTreeTag.java deleted file mode 100644 index 40113edfd1506de576115221adcd84f3b59c47e8..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/RefreshTreeTag.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.webapp.taglib; - -import java.io.IOException; - -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.JspWriter; - -/** - * @author Michel-Ange ANTON - */ -public class RefreshTreeTag extends WhereAreYouTag { - -// ----------------------------------------------------- Constants - -// ----------------------------------------------------- Instance Variables - -// ----------------------------------------------------- Properties - -// ----------------------------------------------------- Public Methods - - /** - * Render this instant actions control. - * - * @return Constant EVAL_PAGE - * @exception JspException if a processing error occurs - */ - public int doEndTag() - throws JspException { - JspWriter out = pageContext.getOut(); - try { - render(out); - } - catch (IOException e) { - throw new JspException(e); - } - return (EVAL_PAGE); - } - -// -------------------------------------------------------- Protected Methods - - protected void render(JspWriter out) - throws IOException, JspException { - // Action to refresh associate tree - if (isTreeToRefresh() == true) { - out.print(""); - } - } -} diff --git a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/TabTag.java b/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/TabTag.java deleted file mode 100644 index 09fbe071207a875b7f3596c2bedf4ae1576b328a..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/TabTag.java +++ /dev/null @@ -1,344 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.webapp.taglib; - -import java.net.MalformedURLException; -import java.util.Map; - -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.tagext.BodyTagSupport; -import javax.servlet.jsp.tagext.Tag; - -import org.apache.struts.taglib.TagUtils; - - -/** - * @author Michel-Ange ANTON - */ -public class TabTag extends BodyTagSupport { - -// ----------------------------------------------------- Instance Variables - private String m_Body = null; - private String m_Url = null; - -// ----------------------------------------------------- Properties - - private boolean selected = false; - private String href = null; - private String forward = null; - private String forwardControl = null; - /** - * Accessor Href property. - */ - public String getHref() { - return href; - } - - public void setHref(String href) { - this.href = href; - } - - /** - * Accessor Selected property. - */ - public boolean getSelected() { - return (this.selected); - } - - public void setSelected(boolean selected) { - this.selected = selected; - } - - /** - * Accessor Forward property. - */ - public String getForward() { - return forward; - } - - public void setForward(String forward) { - this.forward = forward; - } - - /** - * Accessor ForwardControl property. - */ - public String getForwardControl() { - return forwardControl; - } - - public void setForwardControl(String forwardControl) { - this.forwardControl = forwardControl; - } - - /** - * The anchor to be added to the end of the generated hyperlink. - */ - protected String anchor = null; - - public String getAnchor() { - return (this.anchor); - } - - public void setAnchor(String anchor) { - this.anchor = anchor; - } - - /** - * The link name for named links. - */ - protected String linkName = null; - - public String getLinkName() { - return (this.linkName); - } - - public void setLinkName(String linkName) { - this.linkName = linkName; - } - - /** - * The JSP bean name for query parameters. - */ - protected String name = null; - - public String getName() { - return (this.name); - } - - public void setName(String name) { - this.name = name; - } - - /** - * The context-relative page URL (beginning with a slash) to which - * this hyperlink will be rendered. - */ - protected String page = null; - - public String getPage() { - return (this.page); - } - - public void setPage(String page) { - this.page = page; - } - - /** - * The single-parameter request parameter name to generate. - */ - protected String paramId = null; - - public String getParamId() { - return (this.paramId); - } - - public void setParamId(String paramId) { - this.paramId = paramId; - } - - /** - * The single-parameter JSP bean name. - */ - protected String paramName = null; - - public String getParamName() { - return (this.paramName); - } - - public void setParamName(String paramName) { - this.paramName = paramName; - } - - /** - * The single-parameter JSP bean property. - */ - protected String paramProperty = null; - - public String getParamProperty() { - return (this.paramProperty); - } - - public void setParamProperty(String paramProperty) { - this.paramProperty = paramProperty; - } - - /** - * The single-parameter JSP bean scope. - */ - protected String paramScope = null; - - public String getParamScope() { - return (this.paramScope); - } - - public void setParamScope(String paramScope) { - this.paramScope = paramScope; - } - - /** - * The JSP bean property name for query parameters. - */ - protected String property = null; - - public String getProperty() { - return (this.property); - } - - public void setProperty(String property) { - this.property = property; - } - - /** - * The scope of the bean specified by the name property, if any. - */ - protected String scope = null; - - public String getScope() { - return (this.scope); - } - - public void setScope(String scope) { - this.scope = scope; - } - - /** - * The window target. - */ - protected String target = null; - - public String getTarget() { - return (this.target); - } - - public void setTarget(String target) { - this.target = target; - } - - /** - * Include transaction token (if any) in the hyperlink? - */ - protected boolean transaction = false; - - public boolean getTransaction() { - return (this.transaction); - } - - public void setTransaction(boolean transaction) { - this.transaction = transaction; - } - -// --------------------------------------------------------- Public Methods - - public int doStartTag() - throws JspException { - // Initialize the older body - m_Body = null; - - // Do no further processing for now - return (EVAL_BODY_BUFFERED); - } - - public int doAfterBody() - throws JspException { - String sBody = bodyContent.getString(); - if (sBody != null) { - sBody = sBody.trim(); - if (sBody.length() > 0) { - this.m_Body = sBody; - } - } - return (SKIP_BODY); - } - - /** - * Record this tab with our surrounding TabsTag instance. - * - * @exception JspException if a processing error occurs - */ - public int doEndTag() - throws JspException { - - // Find our parent TabsTag instance - Tag parent = findAncestorWithClass(this, TabsTag.class); - if ((parent == null) || !(parent instanceof TabsTag)) { - throw new JspException("Must be nested in a TabsTag instance"); - } - TabsTag oTabs = (TabsTag) parent; - - // Generate the hyperlink URL - TagUtils tagUtils = TagUtils.getInstance(); - Map oParams = tagUtils.computeParameters(pageContext, paramId, paramName, paramProperty - , paramScope, name, property, scope, transaction); - m_Url = null; - try { - m_Url = tagUtils.computeURL(pageContext, forward, href, page, null, null, oParams, anchor, false); - } catch (MalformedURLException e) { - // none - } - // Verify forwardControl parameter - if ((m_Url == null) && (forwardControl != null) && (oTabs.isUsingWhere() == true)) { - try { - // Get the selected node - TreeControlNode oNode = oTabs.getSelectedTreeControlNode(); - if (oNode != null) { - try { - String sForward = tagUtils.computeURL(pageContext, forwardControl, null, null, null, null, null, null, false); - int iPos = oNode.getAction().indexOf("?"); - m_Url = sForward + oNode.getAction().substring(iPos); - } catch (MalformedURLException e) { - // none - } - } - } catch (Exception ex) { - // none - } - } - // Verify Url - if (m_Url == null) { - m_Url = new String(""); - } - // Verify body label - if (m_Body == null) { - m_Body = new String(""); - } - // Register the information for the action represented by - // this action - oTabs.addTab(m_Body, m_Url, selected); - - return (EVAL_PAGE); - } - - /** - * Release all state information set by this tag. - */ - public void release() { - this.m_Body = null; - this.href = null; - this.forward = null; - this.forwardControl = null; - } -} diff --git a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/TabsTag.java b/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/TabsTag.java deleted file mode 100644 index 375401ddcca9b96905d3a3f185fa6b18b5274ac4..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/TabsTag.java +++ /dev/null @@ -1,426 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Michel-Ange ANTON - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.webapp.taglib; - -import java.io.IOException; -import java.util.ArrayList; - -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.JspWriter; - -public class TabsTag extends WhereAreYouTag { - -// ----------------------------------------------------- Constants - - private static final String s_ImageSeparator = "dot.gif"; - -// ----------------------------------------------------- Instance Variables - - private ArrayList m_LabelTabs = new ArrayList(); - private ArrayList m_HrefTabs = new ArrayList(); - private ArrayList m_SelectedTabs = new ArrayList(); - private String m_Body = null; - -// ------------------------------------------------------------- Properties - - private int widthTab = 0; - private int heightTab = 0; - private String width = "100%"; - private String height = ""; - private int widthSeparator = 3; - private int heightSeparator = 1; - private int marginPanel = 5; - private String imagesDir = null; - - /** - * Accessor WidthTab property. - */ - public int getWidthTab() { - return widthTab; - } - - public void setWidthTab(int widthTab) { - this.widthTab = widthTab; - } - - /** - * Accessor HeightTab property. - */ - public int getHeightTab() { - return heightTab; - } - - public void setHeightTab(int heightTab) { - this.heightTab = heightTab; - } - - /** - * Accessor Width property. - */ - public String getWidth() { - return width; - } - - public void setWidth(String width) { - this.width = width; - } - - /** - * Accessor Height property. - */ - public String getHeight() { - return height; - } - - /** - * Accessor Height property. - */ - public void setHeight(String height) { - this.height = height; - } - - /** - * Accessor WidthSeparator property. - */ - public int getWidthSeparator() { - return widthSeparator; - } - - public void setWidthSeparator(int widthSeparator) { - this.widthSeparator = widthSeparator; - } - - /** - * Accessor HeightSeparator property. - */ - public int getHeightSeparator() { - return heightSeparator; - } - - public void setHeightSeparator(int heightSeparator) { - this.heightSeparator = heightSeparator; - } - - /** - * Accessor MarginPanel property. - */ - public int getMarginPanel() { - return marginPanel; - } - - public void setMarginPanel(int marginPanel) { - this.marginPanel = marginPanel; - } - - /** - * Accessor ImagesDir property. - */ - public String getImagesDir() { - return imagesDir; - } - - public void setImagesDir(String imagesDir) { - this.imagesDir = imagesDir; - } - -// --------------------------------------------------------- Public Methods - - public int doStartTag() - throws JspException { - - this.m_LabelTabs.clear(); - this.m_HrefTabs.clear(); - this.m_SelectedTabs.clear(); - this.m_Body = null; - - return (EVAL_BODY_BUFFERED); - } - - /** - * Render this instant actions control. - * - * @exception JspException if a processing error occurs - */ - public int doEndTag() - throws JspException { - JspWriter out = pageContext.getOut(); - try { - verifySelected(); - render(out); - } - catch (IOException e) { - throw new JspException(e); - } - return (EVAL_PAGE); - } - - /** - * Release all state information set by this tag. - */ - public void release() { - this.m_LabelTabs.clear(); - this.m_HrefTabs.clear(); - this.m_SelectedTabs.clear(); - this.m_Body = null; - this.width = null; - this.height = null; - this.imagesDir = null; - } - -// -------------------------------------------------------- Package Methods - - /** - * Add a new Action to the set that will be rendered by this control. - * - * @param label Localized label visible to the user - * @param selected Initial selected state of this option - * @param url URL to which control should be transferred if selected - */ - - void addTab(String ps_Label, String ps_Href, boolean ps_Selected) { - m_LabelTabs.add(ps_Label); - m_HrefTabs.add(ps_Href); - m_SelectedTabs.add(new Boolean(ps_Selected)); - } - - void setBody(String ps_Body) { - m_Body = ps_Body; - } - -// ------------------------------------------------------ Private Methods - - private void render(JspWriter out) - throws IOException, JspException { - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println("
"); - renderTabs(out); - out.println("
"); - renderPanel(out); - out.println("
"); - } - - private void renderPanel(JspWriter out) - throws IOException, JspException { - // Render the panel of this element - out.print(""); - out.println(""); - out.println(""); - out.println(""); - out.println("
"); - out.print(""); - out.println(""); - out.print(""); - out.println(""); - out.println("
"); - if (m_Body != null) { - out.println(m_Body); - } - out.println("
"); - out.println("
"); - } - - private void renderTabs(JspWriter out) - throws IOException, JspException { - int i = 0; - boolean bSelected = false; - StringBuffer sbLabel = null; - String sImageSep = null; - - // Prepare image separator - if (imagesDir != null) { - sImageSep = imagesDir + "/" + s_ImageSeparator; - } - else if (isUsingWhere()) { - sImageSep = getImagesRoot() + "/" + s_ImageSeparator; - } - else { - sImageSep = s_ImageSeparator; - } - // Render the beginning of this element - try { - out.println(""); - } - catch (IOException ex) { - } - - // Render each defined label tab - int n = m_LabelTabs.size(); - out.println(""); - for (i = 0; i < n; i++) { - // Init Label display - sbLabel = new StringBuffer(); - // Detect selected tab - bSelected = ((Boolean) m_SelectedTabs.get(i)).booleanValue(); - // Display begin tag - out.print(""); - - if (i < (n - 1)) { - // Separator Part - out.print(""); - // Image - out.print(""); - out.println(""); - } - } - out.println(""); - - // Render underline - out.println(""); - for (i = 0; i < n; i++) { - bSelected = ((Boolean) m_SelectedTabs.get(i)).booleanValue(); - // Label Line Part - out.print(""); - out.print(""); - out.println(""); - - // Last tab ? - if (i < (n - 1)) { - // Separator Line Part - out.print(""); - out.print(""); - out.println(""); - } - } - // Display end tag - out.println(""); - out.println("
0) { - out.print(" width=\""); - out.print(widthTab); - out.print("\""); - sbLabel.append(m_LabelTabs.get(i)); - } - else { - sbLabel.append(" "); - sbLabel.append(m_LabelTabs.get(i)); - sbLabel.append(" "); - } - out.print(" class=\""); - if (bSelected == true) { - out.print("tabSelect"); - } - else { - out.print("tab"); - } - out.print("\""); - // Height tab - if (heightTab > 0) { - out.print(" height=\""); - out.print(heightTab); - out.print("\""); - } - out.print(">"); - - // Display label - if ((bSelected == true) || (m_HrefTabs.get(i).toString().length() == 0)) { - // Simple label - out.print(sbLabel.toString()); - } - else { - // Link label - out.print(""); - out.print(sbLabel.toString()); - out.print(""); - } - out.println("
"); - } - - /** - * Verify if one tab is selected else select the first. - */ - private void verifySelected() { - boolean bFound = false; - for (int i = 0; i < m_SelectedTabs.size(); i++) { - if (bFound == true) { - // unselect all next if one is found - m_SelectedTabs.set(i, new Boolean(false)); - } - else { - // detect the first selected - bFound = ((Boolean) m_SelectedTabs.get(i)).booleanValue(); - } - } - if ((bFound == false) && (m_SelectedTabs.size() > 0)) { - m_SelectedTabs.set(0, new Boolean(true)); - } - } -} diff --git a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/TitleContentTag.java b/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/TitleContentTag.java deleted file mode 100644 index 1eb1c8762ae1da6070f16b6465d536c7a197cd25..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/TitleContentTag.java +++ /dev/null @@ -1,330 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.webapp.taglib; - -import java.io.IOException; -import java.util.ArrayList; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.JspWriter; - - - -/** - * @author Michel-Ange ANTON - */ -public class TitleContentTag extends WhereAreYouTag { - -// ----------------------------------------------------- Constants - -// ----------------------------------------------------- Instance Variables - - protected String m_Body = null; - -// ------------------------------------------------------------- Properties - private String image = null; - private String title = null; - private boolean usingParent = false; - private boolean tomThumb = false; - private boolean tomThumbIcons = false; - - public String getImage() { - return image; - } - - public void setImage(String image) { - this.image = image; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public boolean isUsingParent() { - return usingParent; - } - - public void setUsingParent(boolean usingParent) { - this.usingParent = usingParent; - } - - public boolean isTomThumb() { - return tomThumb; - } - - public void setTomThumb(boolean tomThumb) { - this.tomThumb = tomThumb; - } - - public boolean isTomThumbIcons() { - return tomThumbIcons; - } - - public void setTomThumbIcons(boolean tomThumbIcons) { - this.tomThumbIcons = tomThumbIcons; - } - -// --------------------------------------------------------- Public Methods - - /** - * Render this instant actions control. - * - * @return Constant EVAL_PAGE - * @exception JspException if a processing error occurs - */ - public int doEndTag() - throws JspException { - JspWriter out = pageContext.getOut(); - try { - render(out); - } - catch (IOException e) { - throw new JspException(e); - } - return (EVAL_PAGE); - } - - public int doAfterBody() - throws JspException { - String sBody = bodyContent.getString(); - if (sBody != null) { - sBody = sBody.trim(); - if (sBody.length() > 0) { - this.m_Body = sBody; - } - } - return (SKIP_BODY); - } - - /** - * Release all state information set by this tag. - */ - public void release() { - this.image = null; - this.title = null; - m_Body = null; - } - -// -------------------------------------------------------- Protected Methods - - protected void render(JspWriter out) - throws IOException, JspException { - String sImageDisplay = null; - String sTitleDisplay = null; - ArrayList alTomThumb = null; - //String sThumbDisplay = null; - - // Prepare WhereAreYou infos - if (isUsingWhere()) { - TreeControlNode oNode = getSelectedTreeControlNode(); - if (oNode != null) { - sImageDisplay = getImagesRoot() + "/" + oNode.getIcon(); - sTitleDisplay = oNode.getLabel(); - // Prepare label of parent node - if (isUsingParent() == true) { - TreeControlNode oParent = oNode.getParent(); - if (oParent != null) { - sTitleDisplay = oParent.getLabel() + " : " + oNode.getLabel(); - } - } - // Prepare Tom Thumb list - if (isTomThumb() == true) { - alTomThumb = getTomThumbList(oNode); - } - } - } - // Prepare parameters - if (image != null) { - sImageDisplay = image; - } - if (title != null) { - sTitleDisplay = title; - } - if (m_Body != null) { - sTitleDisplay = m_Body; - m_Body = null; - } - // Display - if ((sImageDisplay != null) || (sTitleDisplay != null)) { - String sTomThumb = null; - // Build Tom Thumb display - if (alTomThumb != null) { - if (alTomThumb.size() > 0) { - sTomThumb = renderTomThumb(alTomThumb); - } - } - // Display Tom Thumb - if (sTomThumb != null) { - out.println( - ""); - out.print(""); - out.print(""); - out.println(""); - } - else { - // No Tom Thumb to display - out.println( - "
"); - out.print(sTomThumb); - out.print("
"); - } - // Display icon - out.println(""); - if (sImageDisplay != null) { - out.print(""); - out.println(""); - } - // Display title - if (sTitleDisplay != null) { - out.print(""); - } - out.println(""); - out.println("
 "); - out.print(sTitleDisplay); - out.println("
"); - } - } - - protected String renderTomThumb(ArrayList p_TomThumb) { - StringBuffer sb = new StringBuffer(); - ItemTomThumb oThumb; - for (int i = p_TomThumb.size() - 1; i >= 0; i--) { - oThumb = (ItemTomThumb) p_TomThumb.get(i); - if (oThumb.getLink() != null) { - sb.append("
"); - if ((isTomThumbIcons()== true) && (oThumb.getIcon() != null)) { - sb.append(" "); - } - sb.append(oThumb.getLabel()); - sb.append(""); - } - else { - if ((isTomThumbIcons()== true) && (oThumb.getIcon() != null)) { - sb.append(" "); - } - sb.append(""); - sb.append(oThumb.getLabel()); - sb.append(""); - } - if (i > 0) { - sb.append(" > "); - } - } - return sb.toString(); - } - - protected ArrayList getTomThumbList(TreeControlNode p_Node) { - TreeControlNode oParent; - ItemTomThumb oThumb; - - TreeControlNode oNode = p_Node; - ArrayList alTomThumb = new ArrayList(); - // Loop on each parent - do { - // Get parent - oParent = oNode.getParent(); - // Verify parent exist - if (oParent != null) { - // Verify parent is not empty or root node - if (("ROOT-NODE".equalsIgnoreCase(oParent.getName()) == false) && (oParent.getLabel() != null)) { - // Get Thumb infos - oThumb = new ItemTomThumb(); - oThumb.setLabel(oParent.getLabel()); - oThumb.setIcon(oParent.getIcon()); - if (oParent.getAction() != null) { - oThumb.setLink(((HttpServletResponse) pageContext.getResponse()).encodeURL((( - HttpServletRequest) pageContext.getRequest()).getContextPath() + "/" - + oParent.getAction())); - } - // Add to thumb's list - alTomThumb.add(oThumb); - } - } - // Next parent - oNode = oParent; - } - while (oParent != null); - - return alTomThumb; - } - - class ItemTomThumb { - private String label = null; - private String link = null; - private String icon = null; - - public ItemTomThumb() { - - } - - public ItemTomThumb(String p_Label, String p_Link, String p_Icon) { - setLabel(p_Label); - setLink(p_Link); - setIcon(p_Icon); - } - - public String getLabel() { - return label; - } - - public void setLabel(String label) { - this.label = label; - } - - public String getLink() { - return link; - } - - public void setLink(String link) { - this.link = link; - } - - public String getIcon() { - return icon; - } - - public void setIcon(String icon) { - this.icon = icon; - } - - } -} diff --git a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/TreeBuilder.java b/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/TreeBuilder.java deleted file mode 100644 index 2795a906f3c01462e154e58030a02d77ded916e9..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/TreeBuilder.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * $Header$ - * $Revision: 11749 $ - * $Date: 2007-10-08 11:47:44 +0200 (lun 08 oct 2007) $ - * - * ==================================================================== - * - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. - * - * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - */ - -package org.ow2.jonas.webapp.taglib; - -/** - *

Interface for Admin Tree Controller to build plugin components - * into the tree - * - * @author Jazmin Jonson - * @version - */ - -import javax.servlet.http.HttpServletRequest; - -import org.apache.struts.action.ActionServlet; - - - -public interface TreeBuilder { - public void buildTree(TreeControl treeControl, ActionServlet servlet - , HttpServletRequest request); -} diff --git a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/TreeControl.java b/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/TreeControl.java deleted file mode 100644 index 76dfcfe627dac9a725f4d44b8ea63125859e6cf5..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/TreeControl.java +++ /dev/null @@ -1,337 +0,0 @@ -/* - * $Header$ - * $Revision: 11749 $ - * $Date: 2007-10-08 11:47:44 +0200 (lun 08 oct 2007) $ - * - * ==================================================================== - * - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. - * - * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - */ - -package org.ow2.jonas.webapp.taglib; - -import java.io.Serializable; -import java.util.HashMap; - -/** - *

The overall data structure representing a tree control - * that can be rendered by the TreeControlTag custom tag. - * Each node of the tree is represented by an instance of - * TreeControlNode.

- * - * @author Jazmin Jonson - * @author Craig R. McClanahan - * @version $Revision: 1.4 - */ - -public class TreeControl implements Serializable { - public static final String ID_PREFIX = "treenode"; - -// ----------------------------------------------------------- Constructors - - /** - * Construct a new instance with no predefined root node. - */ - public TreeControl() { - super(); - setRoot(null); - } - - /** - * Construct a new instance with the specified root node. - * - * @param root The new root node - */ - public TreeControl(TreeControlNode root) { - super(); - setRoot(root); - } - -// ----------------------------------------------------- Instance Variables - - /** - * The collection of nodes that represent this tree, keyed by name. - */ - protected HashMap registry = new HashMap(); - - /** - * The most recently selected node. - */ - protected TreeControlNode selected = null; - - // Id - protected int mi_Id = 0; - -// ------------------------------------------------------------- Properties - - /** - * The root node of the entire tree. - */ - protected TreeControlNode root = null; - - public TreeControlNode getRoot() { - return (this.root); - } - - protected void setRoot(TreeControlNode root) { - if (this.root != null) { - removeNode(this.root); - } - if (root != null) { - addNode(root); - } - root.setLast(true); - this.root = root; - } - - /** - * The current displayable "width" of this tree (that is, the maximum - * depth of the visible part of the tree). - */ - public int getWidth() { - if (root == null) { - return (0); - } - else { - return (getWidth(root)); - } - } - -// --------------------------------------------------------- Public Methods - - /** - * Find and return the TreeControlNode for the specified - * node name, if it exists; otherwise, return null. - * - * @param name Name of the TreeControlNode to be returned - */ - public TreeControlNode findNode(String name) { - synchronized (registry) { - return ((TreeControlNode) registry.get(name)); - } - } - - /** - * Mark the specified node as the one-and-only currently selected one, - * deselecting any previous node that was so marked. - * - * @param node Name of the node to mark as selected, or null - * if there should be no currently selected node - */ - public void selectNode(String name) { - if (selected != null) { - selected.setSelected(false); - selected = null; - } - selected = findNode(name); - if (selected != null) { - selected.setSelected(true); - } - } - - /** - * Get the last node selected. - * - * @return the current node selected - */ - public TreeControlNode getSelected() { - return selected; - } - - /** - * Expand a branch in the tree of the selected node. - */ - public void expandSelectedParents() { - TreeControlNode oCur = getSelected(); - while (oCur != null){ - oCur = oCur.getParent(); - if (oCur != null) { - oCur.setExpanded(true); - } - } - } - - public String newId() { - StringBuffer sbRet = new StringBuffer(ID_PREFIX); - sbRet.append(mi_Id); - mi_Id++; - return sbRet.toString(); - } - -// -------------------------------------------------------- Package Methods - - /** - * Register the specified node in our registry of the complete tree. - * - * @param node The TreeControlNode to be registered - * - * @exception IllegalArgumentException if the name of this node - * is not unique - */ - void addNode(TreeControlNode node) - throws IllegalArgumentException { - synchronized (registry) { - String name = node.getName(); - if (registry.containsKey(name)) { - throw new IllegalArgumentException("Name '" + name + "' is not unique"); - } - node.setTree(this); - registry.put(name, node); - // Refresh expand info - autoRefresh(node); - } - } - - /** - * Calculate the width of the subtree below the specified node. - * - * @param node The node for which to calculate the width - */ - int getWidth(TreeControlNode node) { - int width = node.getWidth(); - if (!node.isExpanded()) { - return (width); - } - TreeControlNode children[] = node.findChildren(); - for (int i = 0; i < children.length; i++) { - int current = getWidth(children[i]); - if (current > width) { - width = current; - } - } - return (width); - } - - /** - * Deregister the specified node, as well as all child nodes of this - * node, from our registry of the complete tree. If this node is not - * present, no action is taken. - * - * @param node The TreeControlNode to be deregistered - */ - void removeNode(TreeControlNode node) { - synchronized (registry) { - TreeControlNode children[] = node.findChildren(); - for (int i = 0; i < children.length; i++) { - removeNode(children[i]); - } - TreeControlNode parent = node.getParent(); - if (parent != null) { - parent.removeChild(node); - } - node.setParent(null); - node.setTree(null); - if (node == this.root) { - this.root = null; - } - registry.remove(node.getName()); - // Save removed node in list - addRemovedList(node); - } - } - - /** - * List to save removed node used by the auto-refresh mode. - * - */ - private HashMap m_RemovedList = null; - - /** - * Disable auto-refresh mode. - */ - public void disableAutoRefresh() { - if (m_RemovedList != null) { - m_RemovedList.clear(); - } - m_RemovedList = null; - } - - /** - * Enable auto-refresh mode. - * When a set of children are refreshed (removed then added), - * the expanded info is copied of the removed node to the added node. - * The name is used to retreive the good node. - * By default, the auto-refresh mode is disabled. - * Be careful, enabled this mode before the remove of all nodes and - * disabled it after the add. - */ - public void enableAutoRefresh() { - m_RemovedList = new HashMap(); - } - - /** - * Add the removed node in the removed list. - * - * @param p_RemovedNode The removed node - */ - void addRemovedList(TreeControlNode p_RemovedNode) { - if (m_RemovedList != null) { - m_RemovedList.put(p_RemovedNode.getName(), p_RemovedNode); - } - } - - /** - * Search the added node in the removed list and if it's found, copy the expanded info. - * - * @param p_AddedNode The added node - */ - protected void autoRefresh(TreeControlNode p_AddedNode) { - if (m_RemovedList != null) { - TreeControlNode oRemove = (TreeControlNode) m_RemovedList.get(p_AddedNode.getName()); - if (oRemove != null) { - p_AddedNode.setExpanded(oRemove.isExpanded()); - } - } - } -} diff --git a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/TreeControlNode.java b/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/TreeControlNode.java deleted file mode 100644 index 6e19d53fd8ea7963ede4a07d7f3a5b13f263f5ef..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/TreeControlNode.java +++ /dev/null @@ -1,399 +0,0 @@ -/* - * $Header$ - * $Revision: 11749 $ - * $Date: 2007-10-08 11:47:44 +0200 (lun 08 oct 2007) $ - * - * ==================================================================== - * - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. - * - * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - */ - -package org.ow2.jonas.webapp.taglib; - -import java.io.Serializable; -import java.util.ArrayList; - - -/** - *

An individual node of a tree control represented by an instance of - * TreeControl, and rendered by an instance of - * TreeControlTag.

- * - * @author Jazmin Jonson - * @author Craig R. McClanahan - * @version $Revision: 11749 $ - */ - -public class TreeControlNode implements Serializable { - -// ----------------------------------------------------------- Constructors - - /** - * Construct a new TreeControlNode with the specified parameters. - * - * @param name Internal name of this node (must be unique within - * the entire tree) - * @param icon Pathname of the image file for the icon to be displayed - * when this node is visible, relative to the image directory - * for our images - * @param label The label that will be displayed to the user if - * this node is visible - * @param action The hyperlink to be selected if the user - * selects this node, or null if this node's label should - * not be a hyperlink - * @param target The window target in which the action - * hyperlink's results will be displayed, or null for - * the current window - * @param expanded Should this node be expanded? - */ - public TreeControlNode(String name, String icon, String label, String action, String target - , boolean expanded) { - - super(); - this.name = name; - this.icon = icon; - this.label = label; - this.action = action; - this.target = target; - this.expanded = expanded; - - } - - public TreeControlNode(TreeControlNode p_Node) { - super(); - this.name = p_Node.getName(); - this.icon = p_Node.getIcon(); - this.label = p_Node.getLabel(); - this.action = p_Node.getAction(); - this.target = p_Node.getTarget(); - this.expanded = p_Node.isExpanded(); - } - -// ----------------------------------------------------- Instance Variables - - /** - * The set of child TreeControlNodes for this node, in the - * order that they should be displayed. - */ - protected ArrayList children = new ArrayList(); - -// ------------------------------------------------------------- Properties - - /** - * The hyperlink to which control will be directed if this node - * is selected by the user. - */ - protected String action = null; - - public String getAction() { - return (this.action); - } - - /** - * Is this node currently expanded? - */ - protected boolean expanded = false; - - public boolean isExpanded() { - return (this.expanded); - } - - public void setExpanded(boolean expanded) { - this.expanded = expanded; - } - - /** - * The pathname to the icon file displayed when this node is visible, - * relative to the image directory for our images. - */ - protected String icon = null; - - public String getIcon() { - return (this.icon); - } - - /** - * The label that will be displayed when this node is visible. - */ - protected String label = null; - - public String getLabel() { - return (this.label); - } - - /** - * Is this the last node in the set of children for our parent node? - */ - protected boolean last = false; - - public boolean isLast() { - return (this.last); - } - - void setLast(boolean last) { - this.last = last; - } - - /** - * Is this a "leaf" node (i.e. one with no children)? - */ - public boolean isLeaf() { - synchronized (children) { - return (children.size() < 1); - } - } - - /** - * The unique (within the entire tree) name of this node. - */ - protected String name = null; - - public String getName() { - return (this.name); - } - - /** - * The parent node of this node, or null if this - * is the root node. - */ - protected TreeControlNode parent = null; - - public TreeControlNode getParent() { - return (this.parent); - } - - void setParent(TreeControlNode parent) { - this.parent = parent; - if (parent == null) { - width = 1; - } - else { - width = parent.getWidth() + 1; - } - } - - /** - * Is this node currently selected? - */ - protected boolean selected = false; - - public boolean isSelected() { - return (this.selected); - } - - public void setSelected(boolean selected) { - this.selected = selected; - } - - /** - * The window target for the hyperlink identified by the - * action property, if this node is selected - * by the user. - */ - protected String target = null; - - public String getTarget() { - return (this.target); - } - - /** - * The TreeControl instance representing the - * entire tree. - */ - protected TreeControl tree = null; - - public TreeControl getTree() { - return (this.tree); - } - - void setTree(TreeControl tree) { - this.tree = tree; - } - - /** - * The display width necessary to display this item (if it is visible). - * If this item is not visible, the calculated width will be that of our - * most immediately visible parent. - */ - protected int width = 0; - - public int getWidth() { - return (this.width); - } - -// --------------------------------------------------------- Public Methods - - /** - * Add a new child node to the end of the list. - * - * @param child The new child node - * - * @exception IllegalArgumentException if the name of the new child - * node is not unique - */ - public void addChild(TreeControlNode child) - throws IllegalArgumentException { - - tree.addNode(child); - child.setParent(this); - synchronized (children) { - int n = children.size(); - if (n > 0) { - TreeControlNode node = (TreeControlNode) children.get(n - 1); - node.setLast(false); - } - child.setLast(true); - children.add(child); - } - - } - - /** - * Add a new child node at the specified position in the child list. - * - * @param offset Zero-relative offset at which the new node - * should be inserted - * @param child The new child node - * - * @exception IllegalArgumentException if the name of the new child - * node is not unique - */ - public void addChild(int offset, TreeControlNode child) - throws IllegalArgumentException { - - tree.addNode(child); - child.setParent(this); - synchronized (children) { - children.add(offset, child); - } - - } - - /** - * Return the set of child nodes for this node. - */ - public TreeControlNode[] findChildren() { - - synchronized (children) { - TreeControlNode results[] = new TreeControlNode[children.size()]; - return ((TreeControlNode[]) children.toArray(results)); - } - - } - - /** - * Remove this node from the tree. - */ - public void remove() { - - if (tree != null) { - tree.removeNode(this); - } - - } - - /** - * Remove the child node (and all children of that child) at the - * specified position in the child list. - * - * @param offset Zero-relative offset at which the existing - * node should be removed - */ - public void removeChild(int offset) { - - synchronized (children) { - TreeControlNode child = (TreeControlNode) children.get(offset); - tree.removeNode(child); - child.setParent(null); - children.remove(offset); - } - - } - - - public String toString() { - StringBuffer sb = new StringBuffer(); - sb.append(getName()); - sb.append(" - "); - sb.append(isExpanded()); - - return sb.toString(); - } - -// -------------------------------------------------------- Package Methods - - /** - * Remove the specified child node. It is assumed that all of the - * children of this child node have already been removed. - * - * @param child Child node to be removed - */ - void removeChild(TreeControlNode child) { - - if (child == null) { - return; - } - synchronized (children) { - int n = children.size(); - for (int i = 0; i < n; i++) { - if (child == (TreeControlNode) children.get(i)) { - children.remove(i); - return; - } - } - } - - } - -} diff --git a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/TreeControlRenderTag.java b/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/TreeControlRenderTag.java deleted file mode 100644 index ef0d9d76c62c43059fb2823b71901b0f3aa0e278..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/TreeControlRenderTag.java +++ /dev/null @@ -1,375 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Michel-Ange ANTON - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.webapp.taglib; - -import java.io.IOException; -import java.net.URLEncoder; - -import javax.servlet.http.HttpServletResponse; -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.JspWriter; - - - - - -public class TreeControlRenderTag extends TreeControlTag { - /** - * The names of tree state images that we need. - */ - static final String IMAGE_NODE_OPEN = "node_open.gif"; - static final String IMAGE_NODE_OPEN_FIRST = "node_open_first.gif"; - static final String IMAGE_NODE_OPEN_MIDDLE = "node_open_middle.gif"; - static final String IMAGE_NODE_OPEN_LAST = "node_open_last.gif"; - static final String IMAGE_NODE_CLOSE = "node_close.gif"; - static final String IMAGE_NODE_CLOSE_FIRST = "node_close_first.gif"; - static final String IMAGE_NODE_CLOSE_MIDDLE = "node_close_middle.gif"; - static final String IMAGE_NODE_CLOSE_LAST = "node_close_last.gif"; - static final String IMAGE_BLANK = "noline.gif"; - static final String IMAGE_LINE_FIRST = "line_first.gif"; - static final String IMAGE_LINE_LAST = "line_last.gif"; - static final String IMAGE_LINE_MIDDLE = "line_middle.gif"; - static final String IMAGE_LINE_VERTICAL = "line.gif"; - -// --------------------------------------------------------- Instance Variables - - /** - * Flag who indicate when the first node is rendered. - */ - private boolean mb_FirstNodeRendered; - private int mi_MaxChar; - -// --------------------------------------------------------- Public Methods - - /** - * Render this tree control. - * - * @exception JspException if a processing error occurs - */ - @Override - public int doEndTag() - throws JspException { - /* - mb_FirstNodeRendered = false; - return super.doEndTag(); - */ - - TreeControl treeControl = getTreeControl(); - JspWriter out = pageContext.getOut(); - try { - out.print(""); - int level = 0; - mb_FirstNodeRendered = false; - mi_MaxChar = 0; - TreeControlNode node = treeControl.getRoot(); - render(out, node, level, treeControl.getWidth(), true); - - // Avoid bug Netscape 4 - out.print(""); - for (int i = 0; i < treeControl.getWidth() + 2; i++) { - out.print(""); - } - StringBuffer sb = new StringBuffer(""); - out.print(sb.toString()); - out.println(""); - - out.println("
"); - for (int i = 0; i < (mi_MaxChar + 1); i++) { - sb.append("  "); - } - sb.append("
"); - } - catch (IOException e) { - throw new JspException(e); - } - return (EVAL_PAGE); - - } - -// ------------------------------------------------------ Protected Methods - - /** - * Render the specified node, as controlled by the specified parameters. - * - * @param out The JspWriter to which we are writing - * @param node The TreeControlNode we are currently - * rendering - * @param level The indentation level of this node in the tree - * @param width Total displayable width of the tree - * @param last Is this the last node in a list? - * - * @exception IOException if an input/output error occurs - */ - @Override - protected void render(final JspWriter out, final TreeControlNode node, final int level, final int width, final boolean last) - throws IOException { - HttpServletResponse response = (HttpServletResponse) pageContext.getResponse(); - - // if the node is root node and the label value is - // null, then do not render root node in the tree. - - if ("ROOT-NODE".equalsIgnoreCase(node.getName()) && (node.getLabel() == null)) { - // Render the children of this node - TreeControlNode children[] = node.findChildren(); - int firstIndex = children.length - 1; - int lastIndex = children.length - 1; - int newLevel = level + 1; - for (int i = 0; i < children.length; i++) { - render(out, children[i], newLevel, width, i == lastIndex); - } - return; - } - - // Render the beginning of this node - out.println(" "); - - // Create the appropriate number of indents - for (int i = 0; i < level; i++) { - int levels = level - i; - TreeControlNode parent = node; - for (int j = 1; j <= levels; j++) { - if (parent.getParent() != null) { - parent = parent.getParent(); - } - } - if (parent.isLast()) { - out.print(" "); - } - else { - out.print(" "); - } - out.println(); - } - - // Render the tree state image for this node - - // HACK to take into account special characters like = and & - // in the node name, could remove this code if encode URL - // and later request.getParameter() could deal with = and & - // character in parameter values. - String encodedNodeName = URLEncoder.encode(node.getName(),"UTF-8"); - - String action = replace(getAction(), "${name}", encodedNodeName); - - String updateTreeAction = replace(getAction(), "tree=${name}", "select=" + encodedNodeName); - updateTreeAction = ((HttpServletResponse) pageContext.getResponse()).encodeURL( - updateTreeAction); - - out.print(" "); - if ((action != null) && !node.isLeaf()) { - out.print(""); - } - out.print(""); - if ((action != null) && !node.isLeaf()) { - out.print(""); - } - out.println(""); - - // Calculate the hyperlink for this node (if any) - String hyperlink = null; - if (node.getAction() != null) { - hyperlink = ((HttpServletResponse) pageContext.getResponse()).encodeURL(node.getAction()); - } - - // Render the icon for this node (if any) - out.print(" "); - - // Anchor name - out.print(""); - - if (node.getIcon() != null) { - if (hyperlink != null) { - out.print(""); - } - out.print(""); - if (hyperlink != null) { - out.print(""); - } - } - out.println(""); - - // Render the label for this node (if any) - int iColspan = width - level + 1; - if (iColspan > 1) { - out.print(" "); - } - else { - out.print(" "); - } - if (node.getLabel() != null) { - if (node.getLabel().length() > mi_MaxChar) { - mi_MaxChar = node.getLabel().length(); - } - // Note the leading space so that the text has some space - // between it and any preceding images - out.print(" "); - String labelStyle = null; - if (node.isSelected() && (styleSelected != null)) { - labelStyle = styleSelected; - } - else if (!node.isSelected() && (styleUnselected != null)) { - labelStyle = styleUnselected; - } - if (hyperlink != null) { - out.print(""); - } - else if (labelStyle != null) { - out.print(""); - } - out.print(node.getLabel()); - if (hyperlink != null) { - out.print(""); - } - else if (labelStyle != null) { - out.print(""); - } - } - out.println(""); - - // Render the end of this node - out.println(" "); - // Remember the first node is rendered - mb_FirstNodeRendered = true; - - // Render the children of this node - if (node.isExpanded()) { - TreeControlNode children[] = node.findChildren(); - int lastIndex = children.length - 1; - int newLevel = level + 1; - for (int i = 0; i < children.length; i++) { - render(out, children[i], newLevel, width, i == lastIndex); - } - } - - } -} diff --git a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/TreeControlTag.java b/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/TreeControlTag.java deleted file mode 100644 index 2f1d4ebcb2cb4f3e71307b52aa6b4f99ffc54e2a..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/TreeControlTag.java +++ /dev/null @@ -1,557 +0,0 @@ -/* - * $Header$ - * $Revision: 11749 $ - * $Date: 2007-10-08 11:47:44 +0200 (lun 08 oct 2007) $ - * - * ==================================================================== - * - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. - * - * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software - * Foundation" must not be used to endorse or promote products derived - * from this software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache" - * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - */ - -package org.ow2.jonas.webapp.taglib; - -import java.io.IOException; -import java.net.URLEncoder; - -import javax.servlet.http.HttpServletResponse; -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.JspWriter; -import javax.servlet.jsp.PageContext; -import javax.servlet.jsp.tagext.TagSupport; - - -/** - *

JSP custom tag that renders a tree control represented by the - * TreeControl and TreeControlNode classes. - * This tag has the following user-settable attributes:

- *
    - *
  • action - Hyperlink to which expand/contract actions - * should be sent, with a string "${node} marking where - * the node name of the affected node should be included.
  • - *
  • images - Name of the directory containing the images - * for our icons, relative to the page including this tag. If not - * specified, defaults to "images".
  • - *
  • scope - Attribute scope in which the tree - * attribute is to be found (page, request, session, application). If - * not specified, the attribute is searched for in all scopes.
  • - *
  • style - CSS style class to be applied - * to be applied to the entire rendered output of the tree control. - * If not specified, no style class is applied.
  • - *
  • styleSelected - CSS style class to be - * applied to the text of any element that is currently selected. If not - * specified, no additional style class is applied.
  • - *
  • styleUnselected - CSS style class to be - * applied to the text of any element that is not currently selected. - * If not specified, no additional style class is applied.
  • - *
  • tree - Attribute name under which the - * TreeControl bean of the tree we are rendering - * is stored, in the scope specified by the scope - * attribute. This attribute is required.
  • - *
- * - * FIXME - Internationalize the exception messages! - * - * @author Craig R. McClanahan - * @version $Revision: 11749 $ $Date: 2007-10-08 11:47:44 +0200 (lun 08 oct 2007) $ - */ - -public class TreeControlTag extends TagSupport { - - /** - * The default directory name for icon images. - */ - static final String DEFAULT_IMAGES = "images"; - - /** - * The names of tree state images that we need. - */ - static final String IMAGE_HANDLE_DOWN_LAST = "handledownlast.gif"; - static final String IMAGE_HANDLE_DOWN_MIDDLE = "handledownmiddle.gif"; - static final String IMAGE_HANDLE_RIGHT_LAST = "handlerightlast.gif"; - static final String IMAGE_HANDLE_RIGHT_MIDDLE = "handlerightmiddle.gif"; - static final String IMAGE_LINE_LAST = "linelastnode.gif"; - static final String IMAGE_LINE_MIDDLE = "linemiddlenode.gif"; - static final String IMAGE_LINE_VERTICAL = "linevertical.gif"; - -// ------------------------------------------------------------- Properties - - /** - * The hyperlink to be used for submitting requests to expand and - * contract tree nodes. The placeholder "${name}" will - * be replaced by the name property of the current - * tree node. - */ - protected String action = null; - - public String getAction() { - return (this.action); - } - - public void setAction(String action) { - this.action = action; - } - - /** - * The name of the directory containing the images for our icons, - * relative to the page including this tag. - */ - protected String images = DEFAULT_IMAGES; - - public String getImages() { - return (this.images); - } - - public void setImages(String images) { - this.images = images; - } - - /** - * The name of the scope in which to search for the tree - * attribute. Must be "page", "request", "session", or "application" - * (or null for an ascending-visibility search). - */ - protected String scope = null; - - public String getScope() { - return (this.scope); - } - - public void setScope(String scope) { - if (!"page".equals(scope) && !"request".equals(scope) && !"session".equals(scope) - && !"application".equals(scope)) { - throw new IllegalArgumentException("Invalid scope '" + scope + "'"); - } - this.scope = scope; - } - - /** - * The CSS style class to be applied to the entire tree. - */ - protected String style = null; - - public String getStyle() { - return (this.style); - } - - public void setStyle(String style) { - this.style = style; - } - - /** - * The CSS style class to be applied to the text - * of selected nodes. - */ - protected String styleSelected = null; - - public String getStyleSelected() { - return (this.styleSelected); - } - - public void setStyleSelected(String styleSelected) { - this.styleSelected = styleSelected; - } - - /** - * The CSS style class to be applied to the text - * of unselected nodes. - */ - protected String styleUnselected = null; - - public String getStyleUnselected() { - return (this.styleUnselected); - } - - public void setStyleUnselected(String styleUnselected) { - this.styleUnselected = styleUnselected; - } - - /** - * The name of the attribute (in the specified scope) under which our - * TreeControl instance is stored. - */ - protected String tree = null; - - public String getTree() { - return (this.tree); - } - - public void setTree(String tree) { - this.tree = tree; - } - -// --------------------------------------------------------- Public Methods - - /** - * Render this tree control. - * - * @exception JspException if a processing error occurs - */ - public int doEndTag() - throws JspException { - - TreeControl treeControl = getTreeControl(); - JspWriter out = pageContext.getOut(); - try { - out.print(""); - int level = 0; - TreeControlNode node = treeControl.getRoot(); - render(out, node, level, treeControl.getWidth(), true); - out.println("
"); - } - catch (IOException e) { - throw new JspException(e); - } - - return (EVAL_PAGE); - - } - - /** - * Release all state information set by this tag. - */ - public void release() { - - this.action = null; - this.images = DEFAULT_IMAGES; - this.scope = null; - this.style = null; - this.styleSelected = null; - this.styleUnselected = null; - this.tree = null; - - } - -// ------------------------------------------------------ Protected Methods - - /** - * Return the TreeControl instance for the tree control that - * we are rendering. - * - * @exception JspException if no TreeControl instance can be found - */ - protected TreeControl getTreeControl() - throws JspException { - - Object treeControl = null; - if (scope == null) { - treeControl = pageContext.findAttribute(tree); - } - else if ("page".equals(scope)) { - treeControl = pageContext.getAttribute(tree, PageContext.PAGE_SCOPE); - } - else if ("request".equals(scope)) { - treeControl = pageContext.getAttribute(tree, PageContext.REQUEST_SCOPE); - } - else if ("session".equals(scope)) { - treeControl = pageContext.getAttribute(tree, PageContext.SESSION_SCOPE); - } - else if ("application".equals(scope)) { - treeControl = pageContext.getAttribute(tree, PageContext.APPLICATION_SCOPE); - } - if (treeControl == null) { - throw new JspException("Cannot find tree control attribute '" + tree + "'"); - } - else if (!(treeControl instanceof TreeControl)) { - throw new JspException("Invalid tree control attribute '" + tree + "'"); - } - else { - return ((TreeControl) treeControl); - } - - } - - /** - * Render the specified node, as controlled by the specified parameters. - * - * @param out The JspWriter to which we are writing - * @param node The TreeControlNode we are currently - * rendering - * @param level The indentation level of this node in the tree - * @param width Total displayable width of the tree - * @param last Is this the last node in a list? - * - * @exception IOException if an input/output error occurs - */ - protected void render(JspWriter out, TreeControlNode node, int level, int width, boolean last) - throws IOException { - - HttpServletResponse response = (HttpServletResponse) pageContext.getResponse(); - - // if the node is root node and the label value is - // null, then do not render root node in the tree. - - if ("ROOT-NODE".equalsIgnoreCase(node.getName()) && (node.getLabel() == null)) { - // Render the children of this node - TreeControlNode children[] = node.findChildren(); - int lastIndex = children.length - 1; - int newLevel = level + 1; - for (int i = 0; i < children.length; i++) { - render(out, children[i], newLevel, width, i == lastIndex); - } - return; - } - - // Render the beginning of this node - out.println(" "); - - // Create the appropriate number of indents - for (int i = 0; i < level; i++) { - int levels = level - i; - TreeControlNode parent = node; - for (int j = 1; j <= levels; j++) { - parent = parent.getParent(); - } - if (parent.isLast()) { - out.print(" "); - } - else { - out.print(" "); - } - out.println(); - } - - // Render the tree state image for this node - - // HACK to take into account special characters like = and & - // in the node name, could remove this code if encode URL - // and later request.getParameter() could deal with = and & - // character in parameter values. - String encodedNodeName = URLEncoder.encode(node.getName(),"UTF-8"); - - String action = replace(getAction(), "${name}", encodedNodeName); - - String updateTreeAction = replace(getAction(), "tree=${name}", "select=" + encodedNodeName); - updateTreeAction = ((HttpServletResponse) pageContext.getResponse()).encodeURL( - updateTreeAction); - - out.print(" "); - if ((action != null) && !node.isLeaf()) { - out.print(""); - } - out.print(""); - if ((action != null) && !node.isLeaf()) { - out.print(""); - } - out.println(""); - - // Calculate the hyperlink for this node (if any) - String hyperlink = null; - if (node.getAction() != null) { - hyperlink = ((HttpServletResponse) pageContext.getResponse()).encodeURL(node.getAction()); - - // Render the icon for this node (if any) - } - out.print(" "); - if (node.getIcon() != null) { - if (hyperlink != null) { - out.print(""); - } - out.print(""); - if (hyperlink != null) { - out.print(""); - } - } - - // Render the label for this node (if any) - - if (node.getLabel() != null) { - String labelStyle = null; - if (node.isSelected() && (styleSelected != null)) { - labelStyle = styleSelected; - } - else if (!node.isSelected() && (styleUnselected != null)) { - labelStyle = styleUnselected; - } - if (hyperlink != null) { - // Note the leading space so that the text has some space - // between it and any preceding images - out.print(" "); - } - else if (labelStyle != null) { - out.print(""); - } - out.print(node.getLabel()); - if (hyperlink != null) { - out.print(""); - } - else if (labelStyle != null) { - out.print(""); - } - } - out.println(""); - - // Render the end of this node - out.println(" "); - - // Render the children of this node - if (node.isExpanded()) { - TreeControlNode children[] = node.findChildren(); - int lastIndex = children.length - 1; - int newLevel = level + 1; - for (int i = 0; i < children.length; i++) { - render(out, children[i], newLevel, width, i == lastIndex); - } - } - - } - - /** - * Replace any occurrence of the specified placeholder in the specified - * template string with the specified replacement value. - * - * @param template Pattern string possibly containing the placeholder - * @param placeholder Placeholder expression to be replaced - * @param value Replacement value for the placeholder - */ - protected String replace(String template, String placeholder, String value) { - - if (template == null) { - return (null); - } - if ((placeholder == null) || (value == null)) { - return (template); - } - while (true) { - int index = template.indexOf(placeholder); - if (index < 0) { - break; - } - StringBuffer temp = new StringBuffer(template.substring(0, index)); - temp.append(value); - temp.append(template.substring(index + placeholder.length())); - template = temp.toString(); - } - return (template); - - } - -} diff --git a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/WhereAreYouTag.java b/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/WhereAreYouTag.java deleted file mode 100644 index bd02e436dc2a3690d0a7bd800f4182cf3cb5e55a..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/WhereAreYouTag.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.webapp.taglib; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.jsp.tagext.BodyTagSupport; - -import org.ow2.jonas.webapp.jonasadmin.WhereAreYou; - - -/** - * @author Michel-Ange ANTON - */ -public class WhereAreYouTag extends BodyTagSupport { - -// ----------------------------------------------------- Instance Variables - -// ----------------------------------------------------- Properties - - private boolean usingWhere = false; - - public boolean isUsingWhere() { - return usingWhere; - } - - public boolean getUsingWhere() { - return usingWhere; - } - - public void setUsingWhere(boolean usingWhere) { - this.usingWhere = usingWhere; - } - -// --------------------------------------------------------- Public Methods - - public String getSelectedNameNode() { - String sName = null; - WhereAreYou oWhere = getWhereAreYouInstance(); - if (oWhere != null) { - sName = oWhere.getSelectedNameNode(); - } - return sName; - } - - public TreeControlNode getSelectedTreeControlNode() { - TreeControlNode oNode = null; - WhereAreYou oWhere = getWhereAreYouInstance(); - if (oWhere != null) { - oNode = oWhere.getSelectedTreeControlNode(); - } - return oNode; - } - - public String getImagesRoot() { - String sImagesRoot = null; - WhereAreYou oWhere = getWhereAreYouInstance(); - if (oWhere != null) { - sImagesRoot = oWhere.getImagesRoot(); - } - return sImagesRoot; - } - - public boolean isTreeToRefresh() { - boolean bRefresh = false; - WhereAreYou oWhere = getWhereAreYouInstance(); - if (oWhere != null) { - bRefresh = oWhere.isTreeToRefresh(); - } - return bRefresh; - } - - public String getUrlToRefreshSelectedNode() { - String sUrl = null; - WhereAreYou oWhere = getWhereAreYouInstance(); - if (oWhere != null) { - sUrl = oWhere.getUrlToRefreshSelectedNode((HttpServletRequest) pageContext.getRequest() - , (HttpServletResponse) pageContext.getResponse()); - } - return sUrl; - } - -// --------------------------------------------------------- Protected Methods - - protected WhereAreYou getWhereAreYouInstance() { - return (WhereAreYou) pageContext.getSession().getAttribute(WhereAreYou.SESSION_NAME); - } -} diff --git a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/XMLEditorTag.java b/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/XMLEditorTag.java deleted file mode 100644 index 0d5deabdea8e5ced187a165ac0bdde70b1ec871d..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/XMLEditorTag.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.webapp.taglib; - -import java.io.IOException; -import java.util.Map; - -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.JspWriter; -import javax.servlet.jsp.tagext.TagSupport; - -import org.ow2.jonas.webapp.jonasadmin.xml.XMLToFormUtil; -import org.w3c.dom.Document; - -/** - * A custom JSP tag to display a form view of an XML deployment descriptor. - * - * @author Gregory Lapouchnian - * @author Patrick Smith - */ -public class XMLEditorTag extends TagSupport { - - // ----------------------------------------------------- Instance Variables - - /** - * Mapping between IDs and Nodes within the Document tree. - */ - private Map mapping; - - /** - * The document to display in this tag. - */ - private Document document; - - /** - * The name of the archive from which the XML file is extracted. - */ - private String fileName; - - /** - * The path within the archive to the XML file. - */ - private String pathName; - - // ------------------------------------------------------------- Properties - - // --------------------------------------------------------- Public Methods - - public String getFileName() { - return fileName; - } - - public void setFileName(String fileName) { - this.fileName = fileName; - } - - public String getPathName() { - return pathName; - } - - public void setPathName(String pathName) { - this.pathName = pathName; - } - - public Document getDocument() { - return document; - } - - public void setDocument(Document xmlDocument) { - this.document = xmlDocument; - } - - public Map getMapping() { - return mapping; - } - - public void setMapping(Map mapping) { - this.mapping = mapping; - } - - public int doEndTag() throws JspException { - StringBuffer sb = new StringBuffer(); - - // get the form's HTML - XMLToFormUtil util = new XMLToFormUtil(); - String form = util.documentToForm(document, mapping); - - // make the last input field ID available to the JSP page - pageContext.setAttribute("lastNum", new Integer(util.getLastId())); - - // display the form - sb.append(form); - - // Render this element to our writer - JspWriter out = pageContext.getOut(); - try { - out.print(sb.toString()); - } catch (IOException e) { - throw new JspException("Exception in " + getClass().getName() - + " doEndTag():" + e.toString()); - } - return EVAL_PAGE; - } - -} diff --git a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/XmlFileTag.java b/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/XmlFileTag.java deleted file mode 100644 index 2d0f04a0e6163338357c39c2705bc0827f811ad3..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/java/org/ow2/jonas/webapp/taglib/XmlFileTag.java +++ /dev/null @@ -1,407 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.webapp.taglib; - -import java.io.IOException; -import java.util.StringTokenizer; - -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.JspWriter; -import javax.servlet.jsp.tagext.BodyTagSupport; - -/** - * @author Michel-Ange ANTON - */ -public class XmlFileTag extends BodyTagSupport { - -// ----------------------------------------------------- Constants - private static final int NONE = 0; - private static final int HEADER = 1; - private static final int ELEMENT = 2; - private static final int ELEMENT_AUTO_CLOSE = 3; - private static final int ELEMENT_CLOSE = 4; - private static final int COMMENT = 5; - private static final int TEXT = 6; -// ----------------------------------------------------- Instance Variables - - protected String m_Body = null; - protected int m_LastPrint = NONE; - protected int m_Indent = 0; - - //are we printing XML comment content - protected boolean comment = false; - -// ------------------------------------------------------------- Properties - -// --------------------------------------------------------- Public Methods - - /** - * Render this instant actions control. - * - * @exception JspException if a processing error occurs - */ - public int doEndTag() - throws JspException { - JspWriter out = pageContext.getOut(); - try { - String sXml = null; - // Get body - if (m_Body != null) { - sXml = m_Body; - m_Body = null; - } - // Display - if (sXml != null) { - m_LastPrint = NONE; - m_Indent = 0; - render(out, sXml, 0, sXml.length()); - } - } - catch (IOException e) { - throw new JspException(e); - } - return (EVAL_PAGE); - } - - public int doAfterBody() - throws JspException { - String sBody = bodyContent.getString(); - if (sBody != null) { - sBody = sBody.trim(); - if (sBody.length() > 0) { - this.m_Body = sBody; - } - } - return (SKIP_BODY); - } - - /** - * Release all state information set by this tag. - */ - public void release() { - m_Body = null; - } - -// -------------------------------------------------------- Protected Methods - - protected void render(JspWriter p_Out, String p_Xml, int p_Begin, int p_End) - throws IOException, JspException { - - int iCurrent = p_Begin; - int iBegin; - int iEnd; - String sElement; - String sElementWithAttr; - String sName; - char cType; - - for (; ; ) { - // Find begin element - iBegin = p_Xml.indexOf("<", iCurrent); - if ((iBegin == -1) || (iBegin >= p_End)) { - break; - } - // Find end element - iEnd = p_Xml.indexOf(">", iBegin); - if (iEnd == -1) { - break; - } - // render normal text - if (iBegin > iCurrent) { - String sText = p_Xml.substring(iCurrent, iBegin); - sText = sText.trim(); - if (sText.length() > 0) { - printText(p_Out, sText); - } - } - - // Get complete element - sElement = p_Xml.substring(iBegin, iEnd + 4); - // Detect special element (doctype, header, comment) - cType = sElement.charAt(4); - if ((cType == '!') || (cType == '?')) { - // Special element (doctype, header, comment) - if (cType == '!') { - // Detect comment - cType = sElement.charAt(5); - if (cType == '-') { - // Find actual end element - if we are dealing with comment - iEnd = p_Xml.indexOf("-->", iBegin); - if (iEnd == -1) { - break; - } - // set counter on proper value - iEnd = iEnd +2; - - // Get complete element - sElement = p_Xml.substring(iBegin, iEnd + 4); - - printComment(p_Out, sElement); - } - else { - printHeader(p_Out, sElement); - } - } - else { - printHeader(p_Out, sElement); - } - // Next - iCurrent = iEnd + 4; - } - else { - // get name of element - sElementWithAttr = sElement.substring(4, sElement.length() - 4); - sName = getNameElement(sElementWithAttr); - // Detect end element - if (sElementWithAttr.charAt(0) == '/') { - // Next - iCurrent = iEnd + 4; - break; - } - // Detect auto-end element - else if (sElementWithAttr.charAt(sElementWithAttr.length() - 1) == '/') { - printElementAutoClose(p_Out, sElement); - // Next - iCurrent = iEnd + 4; - } - else { - // Render element - printElement(p_Out, sElement); - // Search close element - String sCloseElement = "</" + sName + ">"; - int iPosCloseElement = p_Xml.indexOf(sCloseElement, iEnd); - if (iPosCloseElement == -1) { - // Error - break; - } - // render children element (or text) - render(p_Out, p_Xml, iEnd + 4, iPosCloseElement + sCloseElement.length()); - // render end element - printElementClose(p_Out, sCloseElement); - // Next - iCurrent = iPosCloseElement + sCloseElement.length(); - } - } - } - } - - protected void printElement(JspWriter p_Out, String p_Print) - throws IOException, JspException { - switch (m_LastPrint) { - case NONE: - case TEXT: - break; - case HEADER: - case ELEMENT: - case ELEMENT_AUTO_CLOSE: - case ELEMENT_CLOSE: - case COMMENT: - p_Out.print("
"); - break; - } - - printIndent(p_Out, m_Indent); - - // are we printing comment - if (!comment) - p_Out.print(""); - - p_Out.print(p_Print); - - // are we printing comment - if (!comment) - p_Out.print(""); - - m_LastPrint = ELEMENT; - m_Indent++; - } - - protected void printElementAutoClose(JspWriter p_Out, String p_Print) - throws IOException, JspException { - - switch (m_LastPrint) { - case NONE: - case TEXT: - break; - case HEADER: - case ELEMENT: - case ELEMENT_AUTO_CLOSE: - case ELEMENT_CLOSE: - case COMMENT: - p_Out.print("
"); - break; - } - printIndent(p_Out, m_Indent); - //are we printing comment - if (!comment) - p_Out.print(""); - - p_Out.print(p_Print); - - // are we printing comment - if (!comment) - p_Out.print(""); - - m_LastPrint = ELEMENT_AUTO_CLOSE; - } - - protected void printElementClose(JspWriter p_Out, String p_Print) - throws IOException, JspException { - - m_Indent--; - - switch (m_LastPrint) { - case NONE: - case ELEMENT: - case TEXT: - break; - case HEADER: - case ELEMENT_AUTO_CLOSE: - case ELEMENT_CLOSE: - case COMMENT: - p_Out.print("
"); - printIndent(p_Out, m_Indent); - break; - } - // are we printing comment - if (!comment) - p_Out.print(""); - - p_Out.print(p_Print); - - // are we printing comment - if (!comment) - p_Out.print(""); - - m_LastPrint = ELEMENT_CLOSE; - } - - protected void printComment(JspWriter p_Out, String p_Print) - throws IOException, JspException { - switch (m_LastPrint) { - case NONE: - break; - case HEADER: - case ELEMENT: - case ELEMENT_AUTO_CLOSE: - case ELEMENT_CLOSE: - case COMMENT: - case TEXT: - p_Out.print("
"); - break; - } - printIndent(p_Out, m_Indent); - p_Out.print(""); - - // take only comment content - p_Print = p_Print.substring(7,p_Print.length()-6).trim(); - // start printing commented element - p_Out.print("<!--"); - - // are we dealing with commented element - if (p_Print.indexOf("/>")==-1){ - // print simple comment text - p_Out.print(p_Print); - } else { - // set comment property value - disables elements - setComment(true); - // print commented element - render(p_Out, p_Print, 0, p_Print.length()-1); - p_Out.print("
"); - // turn back comment property value - enable elements again - setComment(false); - } - - // print comment ending - printIndent(p_Out, m_Indent); - p_Out.print("-->"); - - p_Out.print(""); - - m_LastPrint = COMMENT; - } - - protected void printHeader(JspWriter p_Out, String p_Print) - throws IOException, JspException { - switch (m_LastPrint) { - case NONE: - break; - case HEADER: - case ELEMENT: - case ELEMENT_AUTO_CLOSE: - case ELEMENT_CLOSE: - case COMMENT: - case TEXT: - p_Out.print("
"); - break; - } - // are we printing comment - if (!comment) - p_Out.print(""); - - p_Out.print(p_Print); - - // are we printing comment - if (!comment) - p_Out.print(""); - - m_LastPrint = HEADER; - } - - protected void printText(JspWriter p_Out, String p_Print) - throws IOException, JspException { - - // are we printing comment - if (!comment) - p_Out.print(""); - - p_Out.print(p_Print); - - // are we printing comment - if (!comment) - p_Out.print(""); - - m_LastPrint = TEXT; - } - - protected void printIndent(JspWriter p_Out, int p_Indent) - throws IOException, JspException { - for (int i = 0; i < p_Indent; i++) { - p_Out.print("  "); - } - } - - protected String getNameElement(String p_ElementWithAttr) { - StringTokenizer st = new StringTokenizer(p_ElementWithAttr, " "); - return st.nextToken(); - } - - protected void setComment(boolean value){ - // are we printing comment (enable/disable elements) - comment = value; - } - -} diff --git a/jonas/modules/ee-components/jonas-admin/src/main/resources/org/ow2/jonas/webapp/jonasadmin/ApplicationResources.properties b/jonas/modules/ee-components/jonas-admin/src/main/resources/org/ow2/jonas/webapp/jonasadmin/ApplicationResources.properties deleted file mode 100644 index 481783d75f0e64b6950681c1c84d7fb04cc5e430..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/resources/org/ow2/jonas/webapp/jonasadmin/ApplicationResources.properties +++ /dev/null @@ -1,1921 +0,0 @@ -title.application=JOnAS Administration -title.welcome=Welcome - -#--------------------------------------------------------------------------------------------------- - -errors.header= -errors.footer= - -#--------------------------------------------------------------------------------------------------- - -button.login=Login -button.reset=Reset -button.save=Save -button.refresh=Refresh -button.save.all=Save All -button.change=Change -button.cancel=Cancel -button.commit=Commit Changes -button.logout=Log Out -button.apply=Apply -button.execute=Execute -button.create=Create -button.confirm=Confirm -button.remove=Remove -button.push.right=>>> -button.push.left=<<< -button.upload=Upload -button.removeandsave=Remove & save - -#--------------------------------------------------------------------------------------------------- - -title.error.global=Global error -title.global=Global -title.thread.count=Threads Count -title.memory.load= Memory Load -title.memory.total= Total Memory -title.jonas.version=JOnAS Version -title.jvm.version= JVM Version -title.jvm.vendor= JVM Vendor -title.protocols=Protocols -title.modify=Modify -title.submit=Submit -title.jmx.connection.url=Jmx Connection URL -title.transactions=Transactions -title.transaction.begun=Transaction Begun -title.transaction.committed=Committed Transaction -title.transaction.current=Current Transaction -title.transaction.expired=Expired Transactions -title.transaction.rolledback=Rolled Back Transactions -#--------------------------------------------------------------------------------------------------- -title.deployment.item.selected=Selected item -#--------------------------------------------------------------------------------------------------- -title.cd.modify=Modify cluster daemon info -message.clusterd.server.none=No server affected -message.clusterd.none=No cluster daemon -#--------------------------------------------------------------------------------------------------- - -label.login.username=Username -label.login.password=Password -label.url=Jmx Url -label.cd.infos=Infos -label.cd.monitoring.os.infos=Operating system informations -label.cd.monitoring.os.name=OS name -label.cd.monitoring.os.architecture=OS architecture -label.cd.monitoring.os.availableprocessors=OS available processors -label.cd.monitoring.os.version=OS version -label.cd.monitoring.vm.memory.infos=Vm memory infos -label.cd.monitoring.vm.memory.used.graph=Used memory graph -#--------------------------------------------------------------------------------------------------- -error.login=Invalid username or password -error.login.tryagain=To try again, -error.login.clickhere=click here - -#--------------------------------------------------------------------------------------------------- -treenode.cd=Cluster Daemons -treenode.jonas.domain=Domain -treenode.jonas.domain.monitoring=Monitoring -treenode.jonas.server=Server JOnAS -treenode.jonas.server.monitoring=Monitoring -treenode.jonas.server.logging=Logging -treenode.jonas.server.logging.jonas=Jonas Logger -treenode.jonas.server.logging.tomcat=Tomcat Logger - -treenode.jonas.server.protocols=Web Protocols -treenode.jonas.server.protocols.connectors=Connectors - -treenode.jonas.server.services=Services -treenode.jonas.server.services.ear=Application Containers -treenode.jonas.server.services.ejbContainers=EJB Containers -treenode.jonas.server.services.ejb3Containers=EJB3 Containers -treenode.jonas.server.services.ejb2Containers=EJB2 Containers -treenode.jonas.server.services.web=Web Containers -treenode.jonas.server.services.database=Database Manager -treenode.jonas.server.services.db=Database -treenode.jonas.server.services.resource=Resource Adapters -treenode.jonas.server.services.transaction=Transaction -treenode.jonas.server.services.jms=Jms -treenode.jonas.server.services.jms.cf=Connection Factories -treenode.jonas.server.services.jms.queues=Queues -treenode.jonas.server.services.jms.topics=Topics -treenode.jonas.server.services.jmx=Jmx Service -treenode.jonas.server.services.registry=Registry Service -treenode.jonas.server.services.cmi=CMI -treenode.jonas.server.services.ha=HA -treenode.jonas.server.services.mail=Mail -treenode.jonas.server.services.mail.session=Session Factories -treenode.jonas.server.services.mail.mimepart=MimePartDatasource Factories -treenode.jonas.server.services.security=Security -treenode.jonas.server.services.discovery=Discovery -treenode.jonas.server.services.depmonitor=Deployment Monitor -treenode.jonas.server.services.workmanager=Work Manager -treenode.jonas.server.services.workcleaner=Work Cleaner -treenode.jonas.server.services.versioning=Versioning -treenode.jonas.server.services.webservices=Web Services -treenode.jonas.server.services.jaxrpc=JAX-RPC Service -treenode.jonas.server.services.jaxws=JAX-WS Service -treenode.jonas.server.services.wsdlpublisher=WSDL Publisher Service -treenode.jonas.server.services.smartclient=Smartclient - -tab.server.services.cmi=CMI -tab.server.services.cmi.cluster=CMI cluster -tab.server.services.cmi.cluster.objects=Objects -tab.server.services.cmi.object.infos=CMI object infos -tab.server.services.cmi.cluster.user=User defined cluster -tab.server.services.cmi.cluster.system=System cluster -tab.server.services.cmi.notRegistered=New cmi MBean is not registered -tab.server.services.cmi.protocols=Servers for each protocol -tab.server.services.cmi.refreshTime=Refresh time -tab.server.services.cmi.object.servers=Deployer servers -tab.server.services.cmi.object.LB.infos=Load balancing infos -tab.server.services.cmi.object.LB.policy.class=Policy class -tab.server.services.cmi.object.LB.policy.strategy=Policy strategy -tab.server.services.cmi.object.LB.policy.properties.simple=Simple policy properties -tab.server.services.cmi.object.pool.size.min=Min pool size -tab.server.services.cmi.object.pool.size.max=Max pool size -tab.server.services.cmi.object.pool.maxwaiters=Max pool waiters -tab.server.services.cmi.object.pool.timeout=pool timeout -tab.server.services.cmi.object.pool.infos=Pool infos -tab.server.services.cmi.cluster.system.comment=CMI uses this cluster to store internal global objects. -tab.server.services.cmi.protocol=CMI protocol -tab.server.services.cmi.cluster.servers=Servers -tab.server.services.cmi.server=CMI server -tab.server.services.cmi.server.blacklist=Blacklist -tab.server.services.cmi.server.unblacklist=Remove from blacklist -tab.server.services.cmi.server.loadfactor=Load factor - - -treenode.jonas.server.deployments=Deployment -treenode.jonas.server.deployments.ear=Applications (EAR) -treenode.jonas.server.deployments.jar=EJB Modules (JAR) -treenode.jonas.server.deployments.war=Web Modules (WAR) -treenode.jonas.server.deployments.rar=Resource Adapter Modules (RAR) -treenode.jonas.server.deployments.*=All Modules and XML -treenode.jonas.server.deployments.**=All Modules and XML -treenode.jonas.server.deployments.domain-ear=Applications (EAR) -treenode.jonas.server.deployments.domain-jar=EJB Modules (JAR) -treenode.jonas.server.deployments.domain-war=Web Modules (WAR) -treenode.jonas.server.deployments.domain-rar=Resource Adapter Modules (RAR) - -treenode.jonas.server.monitoring=Monitoring - -treenode.jonas.server.resources=Resources -treenode.jonas.server.resources.database=Database (JDBC) -treenode.jonas.server.resources.jms=JMS -treenode.jonas.server.resources.mail=Mail - -treenode.jonas.server.security=Security -treenode.jonas.server.security.factory.memory=Memory realm -treenode.jonas.server.security.factory.memory.users=Users -treenode.jonas.server.security.factory.memory.groups=Groups -treenode.jonas.server.security.factory.memory.roles=Roles -treenode.jonas.server.security.factory.datasource=Datasource realm -treenode.jonas.server.security.factory.ldap=Ldap realm - -treenode.jonas.server.security.catalina.realm=Tomcat realm - -treenode.allmbeans=MBeans -treenode.mbeans.j2ee=J2EE MBeans -treenode.mbeans.owner=Owner MBeans -treenode.mbeans.unknown=Other MBeans - -label.virtual.version=Version -label.virtual.policy=Policy -label.virtual.sessions=Active sessions -label.virtual.setAs=Set as... - -#--------------------------------------------------------------------------------------------------- - -comment.message.ifZeroNoLimit=If 0, there's no limit - -tab.domain=Domain -tab.cluster=Cluster -title.domain.action=Action -action.button.domain.add.server=Add server -action.button.domain.start.server=Start -action.button.domain.stop.server=Stop -action.button.domain.halt.server=Halt -action.button.domain.stopstandby.server=Stop & standby -action.button.domain.startstandby.server=Start & standby -action.button.domain.start.cluster=Start all -action.button.domain.stop.cluster=Stop all -action.button.domain.ping.cluster=Ping all -action.button.domain.create.cluster=Create cluster -action.button.domain.remove.server=Remove server -action.button.domain.move.server=Move server -action.button.domain.undeploy.module=Undeploy module -tab.domain.server.add=Add server -tab.cd.server.add=Add server to Cluster Daemon -tab.domain.cluster.create=Create cluster -label.domain.name=Name -label.domain.range=Range -label.domain.interface=Interface -label.cd.configureServer= Configure Server for Cluster Daemon -label.cluster.type=Type -label.domain.properties=properties -label.domain.description=Description -label.domain.domainName=Domain name -label.domain.parentName=Parent name -label.domain.master=Master server -label.domain.currentServer=JonasAdmin's server -label.domain.totalServers=Total number of servers -label.domain.servers=Servers -label.domain.clusters=Clusters -label.domain.cdps=Cluster Daemons -label.domain.modules=Deployed modules -label.domain.modules.name=Name -label.domain.modules.targets=Targets -message.global.page.onBuild= This Page Is On Build -message.domain.servers.none=No other server in this domain! -message.cd.present.config.server.true=Server is in cluster daemon config file. -message.domain.clusters.none=No clusters in this domain! -message.domain.clds.none=No cluster daemons in this domain! -message.domain.clds.free.none=No server to affect -message.domain.modules.none=No modules deployed in this domain! -message.cluster.servers.none=No servers in this cluster! -message.cluster.clusters.none=No sub-clusters in this cluster! -message.cluster.modules.none=No modules in this cluster! -message.domain.apply.servers.none=No servers found ! -message.domain.apply.modules.none=No modules selected! -label.domain.serverName=Server name -comment.domain.add.serverName= -label.domain.serverURL=Connector server URL -comment.domain.add.serverURL= -label.domain.clusterDaemonName=Cluster daemon name (optional) -comment.domain.add.clusterDaemonName= -label.domain.serverCld=Cluster daemon (optional) -comment.domain.add.serverCld= -label.domain.serverUsername=User name (optional) -comment.domain.add.serverUsername= -label.domain.serverPassword=Password (optional) -comment.domain.add.serverPassword= -label.domain.serverPasswordAgain=Password (again) (optional) -comment.domain.add.serverPasswordAgain= -label.domain.clusterName=Cluster name -label.domain.parentClusterName=Parent cluster name -comment.domain.create.clusterName= -label.domain.move.server=Server -label.domain.move.from=From -get.label.domain.move.cluster=To -error.logger.domain.servername.required=
  • Server name required
  • -error.logger.domain.serverurl.required=
  • Connector server URL required
  • -error.logger.domain.passwords.mismatch=
  • The passwords don't match
  • - - -action.button.service.start=Start -action.button.service.stop=Stop -action.button.services.refresh=Refresh - -tab.server.jonas=Properties -label.server.jonas.jonasName=Server name -label.server.jonas.jonasVersion=Implementation version -label.server.jonas.protocols=Protocols -label.server.jonas.state=State -label.server.jonas.versions=Integrated components versions -label.server.jonas.serverservlet=Server servlet -action.title.server.jonas=Actions -action.button.server.jonas.rungc=Run -action.comment.server.jonas.rungc=Run the garbage collector -action.button.server.jonas.stop=Stop -action.comment.server.jonas.stop=Stop the JOnAS server -error.server.jonas.serverName.bad=Invalid server name {0} -error.server.jonas.jvms=No JVM J2EEManagedObject found - -tab.server.versions=Versions - -tab.server.jmx=JMX Properties -label.server.jmx.MBeanServerId=MBean server ID -label.server.jmx.SpecificationName=Specification -label.server.jmx.SpecificationVersion=Specification Version -label.server.jmx.SpecificationVendor=Specification Vendor -label.server.jmx.ImplementationName=Implementation -label.server.jmx.ImplementationVersion=Implementation Version -label.server.jmx.ImplementationVendor=Implementation Vendor - -tab.server.registry=Registry -title.server.registry.providerUrl=Provider URL -title.server.registry.protocol=Protocol -title.server.registry.providersUrl=Providers -label.server.registry.providerUrl=URL -title.server.registry.jndi.names=JNDI Names -message.server.registry.none=No names registered in JNDI! -message.server.registry.cmi.none=No names registered in cmi JNDI! - -tab.server.servlet=Servlet Server -label.server.servlet.name=Name -label.server.servlet.version=Version -label.server.servlet.catalina.service=Service -label.server.servlet.catalina.engine=Engine -label.server.servlet.catalina.default.host=Default host - -tab.server.jvm=JVM -label.server.jvm.Version=Java Version -label.server.jvm.Vendor=Java Vendor -label.server.jvm.Node=Node - -title.server.servlet.catalina.action=Action -title.server.servlet.catalina.action.save.warning=Warning -message.server.servlet.catalina.action.save.explanation=The Apache Tomcat servlet server saves all the modified configuration data in the configuration file. -message.server.servlet.catalina.action.save.explanation.list=Now, if you click on Save All button, you store :
  • All defined connectors
  • The HTTP Access logger (if defined)
  • All defined contexts for Web Applications
  • -message.server.servlet.catalina.action.save.verify=Verify your configuration before saving all ! -message.server.servlet.catalina.action.save.cancel=You can use the Cancel button to return to the previous page. - -logger.jonas.name=JOnAS logger -logger.catalina.access.name=Access log valve - -tab.loggers=Loggers -title.loggers.action=Action -button.loggers.catalina.access.create=New Access log valve -title.loggers.name=Logger type -title.loggers.container=Container type -title.loggers.container.name=Container name (or path) -label.loggers.container.engine=Engine -label.loggers.container.engine.name=engine -label.loggers.container.host=Host -label.loggers.container.context=Web module -tab.loggers.confirm=Confirm -message.loggers.none=No logger found ! - -tab.logging.jonas=Topics -tab.logging.view_recent=View Recent Log -message.logging.view.nobuffer=Can't find MBean for logs view. Check 'jmx' handler usage in Monolog. -message.logging.view.buffer=Found MBean for logs view. -title.logging.jonas.view.recent=Recent records -label.logging.jonas.view.recent.date.latest=Date of latest record -label.logging.jonas.view.recent.date.oldest=Date of oldest record -label.logging.jonas.view.errors=Errors -label.logging.jonas.view.warnings=Warnings -label.logging.jonas.view.other=Other -button.logging.jonas.view.recent=Refresh -get.title.logging.jonas=Change a topic's level -get.label.logging.jonas.topic=Topic -get.label.logging.jonas.level=Level -list.title.logging.jonas.levels=Levels -list.title.logging.jonas.topics=Topics - -tab.logger.catalina.access=Access Log Valve -label.logger.catalina.access.containerType=Container -comment.logger.catalina.access.containerType=Container to which the access log is associated -label.logger.catalina.access.containerName=Container name -comment.logger.catalina.access.containerName=Name of the container -label.logger.catalina.access.directory=Directory -comment.logger.catalina.access.directory=The directory in which log files are created -label.logger.catalina.access.prefix=Filename prefix -comment.logger.catalina.access.prefix=The prefix name of the log file -error.logger.catalina.access.prefix.required=
  • Filename prefix required
  • -label.logger.catalina.access.suffix=Filename suffix -comment.logger.catalina.access.suffix=The suffix name of the log file -label.logger.catalina.access.resolveHosts=Resolve Hosts -comment.logger.catalina.access.resolveHosts=Flag to indicate automatic host name resolving -label.logger.catalina.access.rotatable=Rotatable -comment.logger.catalina.access.rotatable=Flag to indicate automatic log rotation -label.logger.catalina.access.pattern=Pattern -comment.logger.catalina.access.pattern=The pattern used to format our access log lines.
    The following pattern codes are supported:
    %a - Remote IP address
    %A - Local IP address
    %b - Bytes sent, excluding HTTP headers, or '-' if zero
    %B - Bytes sent, excluding HTTP headers
    %h - Remote host name (or IP address if resolveHosts is false)
    %H - Request protocol
    %l - Remote logical username from identd (always returns '-')
    %m - Request method (GET, POST, etc.)
    %p - Local port on which this request was received
    %q - Query string (prepended with a '?' if it exists)
    %r - First line of the request (method and request URI)
    %s - HTTP status code of the response
    %S - User session ID
    %t - Date and time, in Common Log Format
    %u - Remote user that was authenticated (if any), else '-'
    %U - Requested URL path
    %v - Local server name -error.logger.catalina.access.pattern.required=
  • Pattern required
  • -error.logger.catalina.access.log.engine.alreadypresent=
  • AccessLogValve already associated to the Engine
  • -error.logger.catalina.access.log.nohost=
  • There is no Host having this name
  • -error.logger.catalina.access.log.host.alreadypresent=
  • AccessLogValve already associated to this Host
  • - -tab.monitoring.general=General -get.title.monitoring.general=Activation -get.label.monitoring.general.activated=Activated monitoring -list.title.monitoring.general=JOnAS server all thread groups -list.label.monitoring.general.allThreadsCount=Total number of threads - -tab.monitoring.memory=Memory -get.title.monitoring.memory=Tuning -get.label.monitoring.memory.numberOfMeasures=Number of measures -get.label.monitoring.memory.range=Range -error.monitoring.memory.numberOfMeasures=
  • Number of measures could not be <= 1
  • -error.monitoring.memory.range=
  • Range could not be < 10
  • - -tab.monitoring.stackdump=StackDump - -get.label.monitoring.displaynode.test1=test1 -get.label.monitoring.displaynode.test2=test2 - -tab.catalina.connectors=Connectors -title.catalina.connectors.action=Action -button.catalina.connectors.create.http=New HTTP -button.catalina.connectors.create.https=New HTTPS -button.catalina.connectors.create.ajp=New AJP -button.catalina.connectors.remove=Remove -label.catalina.connectors.port=Port -label.catalina.connectors.address=Address -label.catalina.connectors.type=Type - -tab.catalina.connectors.confirm=Confirm -message.catalina.connectors.none=No connector found ! - -tab.catalina.connector.new.http=New Http connector -tab.catalina.connector.new.https=New Https connector -tab.catalina.connector.new.ajp=New Ajp connector -error.catalina.connector.select.bad=
  • Invalid connector name : {0}
  • -error.catalina.connector.exists=
  • Connector already exists
  • - -tab.catalina.connector=Connector -title.catalina.connector.general=General -label.catalina.connector.type=Type -label.catalina.connector.type.http=HTTP -label.catalina.connector.type.https=HTTPS -label.catalina.connector.type.ajp=AJP/JK -label.catalina.connector.scheme=Scheme -label.catalina.connector.accept.count=Accept Count -label.catalina.connector.allow.trace=Allow Trace -label.catalina.connector.empty.sessionpath=Empty Session Path -label.catalina.connector.max.post.size=Max Bytes in a Post -label.catalina.connector.connection.timeout=Connection Timeout -label.catalina.connector.protocol=Coyote Protocol Handler -label.catalina.connector.secure=Secure (SSL) Connector -label.catalina.connector.uri.encoding=URI Encoding -label.catalina.connector.use.bodyencoding.for.uri=Use Body Encoding for URI -label.catalina.connector.xpoweredby=X-Powered-By Generation Enabled -label.catalina.connector.output.buffer=Output Buffer Size -label.catalina.connector.input.buffer=Input Buffer Size -label.catalina.connector.buffer=Buffer Size -label.catalina.connector.enable.dns=Enable DNS Lookups -label.catalina.connector.tcp.nodelay=Should we use TCP no delay -label.catalina.connector.address.ip=IP Address -title.catalina.connector.port=Port -label.catalina.connector.portnumber=Port Number -label.catalina.connector.redirect.portnumber=Redirect Port Number -title.catalina.connector.threads=Threads -label.catalina.connector.minSpare=Minimum Spare Threads -label.catalina.connector.milliseconds=milliseconds -label.catalina.connector.maxSpare=Maximum Spare Threads -label.catalina.connector.max=Maximum Threads -title.catalina.connector.proxy=Proxy -label.catalina.connector.proxy.name=Proxy Name -label.catalina.connector.proxy.portnumber=Proxy Port Number -title.catalina.connector.factory=Factory properties -label.catalina.connector.algorithm=Encoding algorithm -label.catalina.connector.client.auth=Client Authentication -label.catalina.connector.keystore.filename=Keystore Filename -label.catalina.connector.keystore.password=Keystore Password -label.catalina.connector.keystore.type=Keystore Type -label.catalina.connector.sslprotocol=SSL Protocol -label.catalina.connector.ciphers=Encription Ciphers -label.catalina.connector.keyPass.warning=
  • Please use keytool to generate certificate.
  • - -error.catalina.connector.portNumber.required=
  • PortNumber cannot be empty
  • -error.catalina.connector.portNumber.format=
  • PortNumber not a valid integer!
  • -error.catalina.connector.portNumber.range=
  • PortNumber out of range.
  • -error.catalina.connector.acceptCountText.required=
  • Accept count required
  • -error.catalina.connector.acceptCountText.format=
  • Accept count not a valid integer!
  • -error.catalina.connector.acceptCountText.range=
  • Accept count out of range.
  • -error.catalina.connector.connTimeOutText.required=
  • Connection time out required
  • -error.catalina.connector.connTimeOutText.format=
  • Connection time out not a valid integer!
  • -error.catalina.connector.connTimeOutText.range=
  • Connection time out of range.
  • -error.catalina.connector.bufferSizeText.required=
  • Buffer Size required
  • -error.catalina.connector.bufferSizeText.format=
  • Buffer Size not a valid integer!
  • -error.catalina.connector.bufferSizeText.range=
  • Buffer Size out of range.
  • -error.catalina.connector.address.invalid=
  • IP Address invalid
  • -error.catalina.connector.redirectPortText.required=
  • Redirect Port Number cannot be empty
  • -error.catalina.connector.redirectPortText.format=
  • Redirect Port Number not a valid integer!
  • -error.catalina.connector.redirectPortText.range=
  • Redirect Port Number out of range.
  • -error.catalina.connector.minSpareThreadsText.required=
  • Minimum Spare Threads cannot be empty
  • -error.catalina.connector.minSpareThreadsText.format=
  • Minimum Spare Threads not a valid integer!
  • -error.catalina.connector.minSpareThreadsText.range=
  • Minimum Spare Threads out of range.
  • -error.catalina.connector.maxSpareThreadsText.required=
  • Maximum Spare Threads cannot be empty
  • -error.catalina.connector.maxSpareThreadsText.format=
  • Maximum Spare Threads not a valid integer!
  • -error.catalina.connector.maxSpareThreadsText.range=
  • Maximum Spare Threads out of range.
  • - -error.catalina.connector.maxThreadsText.required=
  • Maximum Threads cannot be empty
  • -error.catalina.connector.maxThreadsText.format=
  • Maximum Threads not a valid integer!
  • -error.catalina.connector.maxThreadsText.range=
  • Maximum Threads seems out of range. Valid range is 1-512. Also, maximum >= minimum.
  • - -error.catalina.connector.proxyName.invalid=
  • Proxy name is invalid
  • -error.catalina.connector.proxyPortText.required=
  • Proxy Port Number cannot be empty
  • -error.catalina.connector.proxyPortText.format=
  • Proxy Port Number not a valid integer!
  • -error.catalina.connector.proxyPortText.range=
  • Proxy Port Number seems out of range. Valid range is 1-65535.
  • - - -tab.services=Services -title.services.name=Name -title.services.description=Description -title.services.deployed=Deployed - -tab.appcontainers=Application Containers -message.appcontainers.none=No application container found ! -list.label.appcontainers.file=File -list.label.appcontainers.path=Path - -tab.ejbcontainers=EJB Containers -message.ejbcontainers.none=No EJB container found ! -label.ejbcontainers.name=Name -label.ejbcontainers.file=File -label.ejbcontainers.path=Path - -tab.ejbcontainers.statistic=Statistics -title.ejbcontainers.statistic=Statistics on all EJB Containers -label.ejbcontainers.statistic.totalCurrentNumberOfBeanType=All EJB -label.ejbcontainers.statistic.totalCurrentNumberOfBMPType=Entity with Bean-Managed Persistence -label.ejbcontainers.statistic.totalCurrentNumberOfCMPType=Entity with Container-Managed Persistence -label.ejbcontainers.statistic.totalCurrentNumberOfEntityType=Entity Bean -label.ejbcontainers.statistic.totalCurrentNumberOfSBFType=Stateful Session Bean -label.ejbcontainers.statistic.totalCurrentNumberOfSBLType=Stateless Session Bean -label.ejbcontainers.statistic.totalCurrentNumberOfMDBType=Message Driven Bean - -tab.ejbcontainers.monitoring=Monitoring - -tab.container=Container -title.container=Properties -label.container.name=Name -label.container.path=Path -title.container.ear=In Ear - -tab.container.statistic=Statistics -title.container.statistic=Statistics on {0} container -label.container.statistic.currentNumberOfBeanType=All EJB -label.container.statistic.currentNumberOfBMPType=Entity with Bean-Managed Persistence -label.container.statistic.currentNumberOfCMPType=Entity with Container-Managed Persistence -label.container.statistic.currentNumberOfEntityType=Entity Bean -label.container.statistic.currentNumberOfSBFType=Stateful Session Bean -label.container.statistic.currentNumberOfSBLType=Stateless Session Bean -label.container.statistic.currentNumberOfMDBType=Message Driven Bean - -tab.container.ejbs=EJBs -message.container.ejbs.none=No EJB found ! -label.container.ejbs.name=Name -label.container.ejbs.type=Type - -ejb.fulltype.Bmp=Entity with Bean-Managed Persistence -ejb.fulltype.Cmp=Entity with Container-Managed Persistence -ejb.fulltype.Sbf=Stateful Session Bean -ejb.fulltype.Sbl=Stateless Session Bean -ejb.fulltype.Mdb=Message Driven Bean - - -tab.ejb=EJB -title.ejb.action=Action -label.ejb.name=Name -label.ejb.file=File -label.ejb.type=Type -title.ejb.monitoring=Monitoring -label.ejb.monitoring.monitoringSettingsDefinedInDD=Monitoring settings defined in DD ? -label.ejb.monitoring.monitoringEnabled=Monitoring enabled ? -label.ejb.monitoring.warningThreshold=Warning threshold (in millis) -label.ejb.monitoring.applySettingsTo=Apply new monitoring settings to -label.ejb.monitoring.applySettingsTo.none=Only to EJBs deployed after this change -label.ejb.monitoring.applySettingsTo.nonDD=All EJBs except the ones with values in the DDs -label.ejb.monitoring.applySettingsTo.all=All EJBs -label.ejb.monitoring.numberOfCalls=Number of calls -label.ejb.monitoring.totalBusinessProcessingTime=Total business processing time (in millis) -label.ejb.monitoring.averageBusinessProcessingTime=Average business processing time (in millis) -label.ejb.monitoring.totalProcessingTime=Total processing time (in millis) -label.ejb.monitoring.averageProcessingTime=Average processing time (in millis) -title.ejb.naming=Naming and Classes -label.ejb.naming.class=EJB class -label.ejb.naming.jndiName=EJB JNDI Name -label.ejb.naming.homeClass=EJB HomeClass -label.ejb.naming.remoteClass=EJB RemoteClass -label.ejb.naming.localHomeClass=EJB LocalHomeClass -label.ejb.naming.localClass=EJB LocalClass -label.ejb.virtual.prefix=JNDI prefix -title.ejb.type.entity=Entity Configuration -button.ejb.type.entity.synchronize=Synchronize -button.ejb.type.entity.reduceCache=Reduce instances -label.ejb.type.entity.persistancy=Persistency -comment.ejb.type.entity.persistancy=Type of Persistency (CMP/BMP) -label.ejb.type.entity.passivationTimeOut=Passivation Timeout -comment.ejb.type.entity.passivationTimeOut=Value in seconds -label.ejb.type.entity.inactivityTimeOut=Inactivity Timeout -comment.ejb.type.entity.inactivityTimeOut=Maximum time of inactivity (in sec.) before freeing objects -label.ejb.type.entity.shared=Shared -comment.ejb.type.entity.shared=True if bean accessed outside this ejb server. -label.ejb.type.entity.prefetch=Prefetch -comment.ejb.type.entity.prefetch=True if prefetch optimization wanted. -label.ejb.type.entity.hardLimit=HardLimit -comment.ejb.type.entity.hardLimit=True if max-cache-size is a hard limit -label.ejb.type.entity.lockPolicy=Lock Policy -comment.ejb.type.entity.lockPolicy=one among CS/CRC/RO/DB/CRW/CST -label.ejb.type.entity.memory.minPoolSize=Min Pool size -comment.ejb.type.entity.minPoolSize=Nb of instances preallocated -label.ejb.type.entity.memory.maxCacheSize=Max Cache Size -comment.ejb.type.entity.maxCacheSize=Max nb of instances in memory -title.ejb.memory=Memory Management -label.ejb.memory.poolSize=Pool size -comment.ejb.memory.poolSize=Current nb of free instances -label.ejb.memory.cacheSize=Cache size -comment.ejb.memory.cacheSize=Total nb of instances in memory -label.ejb.type.entity.instance.usedInTxInstance=Used in TX -comment.ejb.type.entity.instance.usedInTxInstance=Current nb of instances used inside transactions -label.ejb.type.entity.instance.usedOutTxInstance=Used outside TX -comment.ejb.type.entity.instance.usedOutTxInstance=Current nb of instances used outside transaction -label.ejb.type.entity.instance.unusedInstance=Unused but ready -comment.ejb.type.entity.instance.unusedInstance=Current nb of unused, ready instances -label.ejb.type.entity.instance.pkNumber=PK number -comment.ejb.type.entity.instance.pkNumber=Total nb of PK in memory -label.ejb.type.entity.instance.passivatedInstance=Passivated -comment.ejb.type.entity.instance.passivated=Current nb of passivated instances -label.ejb.type.entity.instance.removedInstance=Marked removed -comment.ejb.type.entity.instance.removedInstance=Current nb of instances marked removed -title.ejb.type.session=Session Configuration -label.ejb.type.session.sessionTimeOut=Current session TimeOut -title.ejb.type.session.instance=Instances -label.ejb.type.session.instanceMinSizePool=Min size of pool -label.ejb.type.session.instanceMaxSizePool=Max size of pool -label.ejb.type.session.instanceCurrentNumber=Number instances -button.ejb.type.session.sbl.reduceCache=Reduce instances -title.ejb.type.message=Mdb Configuration - -default.ejb.type.session.sessionTimeOut=No limit -default.ejb.type.session.instanceMaxSizePool=No limit - -label.ejb.type.message.mdbJMSAssociateDestinationName=JMS Destination name -label.ejb.type.message.minPoolSize=Min Pool Size -label.ejb.type.message.maxCacheSize=Max Cache Size -comment.ejb.type.message.mdbJMSAssociateDestinationName= -comment.ejb.type.message.sessionTimeOut= - -tab.ejb.dependency=Dependency -title.ejb.dependency.datasource=Datasource -title.ejb.dependency.jms.connection=JMS Connection factory -title.ejb.dependency.jms.destination=JMS Destination -title.ejb.dependency.mail.session=Session mail factory -title.ejb.dependency.mail.mime=MimePartDataSource mail factory - -tab.webcontainers=Web Containers -message.webcontainers.none=No Web Container found ! -title.webcontainers.action=Action -button.webcontainers.context.create=New web container -label.webcontainers.context=Context -label.webcontainers.deployed=Deployed -label.webcontainers.file=Container -label.webcontainers.path=Path -tab.webcontainers.confirm=Confirm - -tab.webapp=Web context -title.webapp.action=Action -tab.webapp.create=New web application -title.webapp.context=Context -label.webapp.context.path=Path -label.webapp.context.host=Host -label.webapp.context.name=Name -label.webapp.context.started=Started - -button.webapp.reload=Reload -button.webapp.start=Start -button.webapp.stop=Stop - -title.webapp.setting=Setting -label.webapp.setting.available=Available -comment.webapp.setting.available=Web application available for the public -label.webapp.setting.cookies=Cookies -comment.webapp.setting.cookies=Use cookies for session id communication -label.webapp.setting.reloadable=Reloadable -comment.webapp.setting.reloadable=Allow to reload automatically the web application -label.webapp.setting.swallowOutput=Swallow output -comment.webapp.setting.swallowOutput=Cause the system.out and system.err to be redirected to the logger when executing a servlet -label.webapp.setting.crossContext=Cross context -comment.webapp.setting.crossContext=Allow the ServletContext.getContext() method to access the context of other web applications in this server -label.webapp.setting.override=Override -comment.webapp.setting.override=Allow the DefaultContextoverride flag for this Web application -label.webapp.setting.sessionTimeout=Session timeout -comment.webapp.setting.sessionTimeout=The timeout of a session in minutes - -error.webapp.context.required=
  • Path context cannot be empty
  • -error.webapp.context.exists=
  • Path context already exists
  • -error.webapp.setting.sessionTimeout.required=
  • Session timeout cannot be empty
  • -error.webapp.setting.sessionTimeout.format=
  • Session timeout not a valid integer !
  • -error.webapp.setting.sessionTimeout.range=
  • Session timeout seems out of range. Valid range is 1-65535.
  • - -error.webapp.reload=
  • Impossible to reload this web application ! Is the web application running ?
  • -error.webapp.start=
  • Impossible to start this web application ! Is the web application running ?
  • -error.webapp.stop=
  • Impossible to stop this web application ! Is the web application running ?
  • - -error.ejb.type.session.sessionTimeOut.required=
  • Session timeout cannot be empty
  • -error.ejb.type.session.sessionTimeOut.format=
  • Session timeout not a valid integer !
  • -error.ejb.type.session.sessionTimeOut.range=
  • Session timeout seems out of range. Valid range is 1-65535.
  • - -tab.war=War -title.war.container=Web container -label.war.hostName=Host name -label.war.warFile=File -label.war.warPath=Path -label.war.contextRoot=Context root -label.war.java2DelegationModel=Java 2 delegation model -title.war.ear=In application container -label.war.inEarCase=inEarCase -label.war.earPath=Ear path - - -tab.war.servlets=Servlets -label.war.servlets.number=Number of servlets -title.war.servlets.name=Name - -tab.war.xmlContent=Web xml -tab.war.jonasXmlContent=JOnAS xml - -tab.ear=Ear -title.ear=Application -label.ear.file=File -label.ear.path=Path - -tab.ear.wars=Web -title.ear.wars.filename=File -title.ear.wars.name=Name -title.ear.wars.path=Path - -tab.ear.jars=Ejb -title.ear.jars.filename=File -title.ear.jars.path=Path -title.ear.jars.name=Name - -tab.ear.rars=Resource Adapter -title.ear.rars.filename=File -title.ear.rars.name=Name -title.ear.rars.path=Path - -tab.ear.xmlDeploymentDescriptor=Deployment descriptor - -tab.rar=Rar -title.rar=Resource Adapter -label.rar.file=File -label.rar.path=Path -title.rar.ear=In application -label.rar.ear.path=Path -title.rar.properties=Properties -error.rar.notfound=
  • Resource adapter file not found : {0}
  • -title.rar.pooling=Connection pooling configuration -title.rar.poolState=Connections Pool State -title.rar.waitersStat=Statistics on waiters -title.rar.getConnectionStat=Statistics on getConnection operations -title.rar.openPhysConn=Connection to database statistics -label.rar.currentOpened=Current pool size -comment.rar.currentOpened=Physically opened connections -label.rar.currentBusy=Busy connections -comment.rar.currentBusy=Number of connections currently in use -label.rar.currentInTx=Busy in transactions -comment.rar.currentInTx=Number of connections used inside transactions -label.rar.busyMin=Min busy in last period -comment.rar.busyMin=Minimum number of busy connections in the last sampling period -label.rar.busyMax=Max busy in last period -comment.rar.busyMax=Maximum number of busy connections in the last sampling period -label.rar.openedCount=Number of connections -comment.rar.openedCount=Total number of connection operations -label.rar.connectionFailures=Number of failures -comment.rar.connectionFailures=Total number of failures when trying to make a connection -label.rar.connectionLeaks=Connection leaks -comment.rar.connectionLeaks=Number of connections which were closed without being requested by their user -label.rar.currentWaiters=Current number of waiters -comment.rar.currentWaiters=Number of waiters for a connection -label.rar.waitersHigh=Max waiters -comment.rar.waitersHigh=Maximum number of waiters since pool creation -label.rar.waitersHighRecent=Max waiters in last period -comment.rar.waitersHighRecent=Maximum number of waiters in the last sampling period -label.rar.waiterCount=Total waiters -comment.rar.waiterCount=Total number of waiters since pool creation -label.rar.waitingHigh=Max waiting time -comment.rar.waitingHigh=Maximum waiting time (in millisec) since pool creation -label.rar.waitingHighRecent=Max waiting in last period -comment.rar.waitingHighRecent=Maximum waiting time (in millisec) in the last sampling period -label.rar.waitingTime=Total waiting -comment.rar.waitingTime=Total waiting time (in millisec) since pool creation -label.rar.servedOpen=Served connections -comment.rar.servedOpen=Total number of served getConnection operations -label.rar.rejectedOpen=Rejected connections -comment.rar.rejectedOpen=Total number of rejected getConnection operations -label.rar.rejectedFull=By waiter overflow -comment.rar.rejectedFull=Number of rejected getConnection due to waiter overflow -label.rar.rejectedTimeout=By waiter timeout -comment.rar.rejectedTimeout=Number of rejected getConnection due to waiter timeout -label.rar.rejectedOther=By any other reason -comment.rar.rejectedOther=Number of rejected getConnection due to any other reason - -tab.rar.cf=Connection Factories -title.rar.cf=Connection Factories -title.rar.cf.name=Name -title.rar.cf.description=Description - -tab.rar.as=ActivationSpecs -title.rar.as=ActivationSpecs -title.rar.as.name=Name -title.rar.as.description=Description - -tab.rar.ao=Admin Objects -title.rar.ao=Admin Objects -title.rar.ao.name=Name -title.rar.ao.description=Description - -tab.resourceadapters=Resource Adapters -message.resourceadapters.none=No resource adapter found ! -label.resourceadapters.name=Name -label.resourceadapters.file=File -label.resourceadapters.path=Path - -tab.resourceadapter=Resource Adapter -title.resourceadapter=Resource Adapter -label.resourceadapter.name=Name -label.resourceadapter.file=File -label.resourceadapter.path=Path -label.resourceadapter.jndiname=JNDI Name -title.resourceadapter.ear=In application -label.resourceadapter.ear.path=Path -label.resourceadapter.rarlink=RAR Link -title.resourceadapter.properties=Properties -title.resourceadapter.joram.server=Joram server -title.resourceadapter.reqProperties=Required Properties -error.resourceadapter.notfound=
  • Resource adapter file not found : {0}
  • -label.resourceadapter.description=Description -title.resourceadapter.cf=Connection Factory -title.resourceadapter.as=Activation Spec -title.resourceadapter.ao=Admin Object -label.resourceadapter.space= -title.resourceadapter.pooling=Pool properties -title.resourceadapter.jdbcConnection=JDBC connection properties -label.resourceadapter.pstmtMax=Prepared statements max -comment.resourceadapter.pstmtMax=Maximum size of prepared statements cache -label.resourceadapter.initConnPool=Pool initial size -comment.resourceadapter.initConnPool=Initial size of the connection pool -error.resourceadapter.initConnPool.numberformat=
  • Pool initial size must be a number
  • -label.resourceadapter.minConnPool=Pool initial size -comment.resourceadapter.minConnPool=Initial size of the connection pool -label.resourceadapter.minConnPool=Pool minimum -comment.resourceadapter.minConnPool=Minimum size of the connection pool -error.resourceadapter.minConnPool.numberformat=
  • Pool minimum must be a number
  • -label.resourceadapter.maxConnPool=Pool maximum -comment.resourceadapter.maxConnPool=Maximum size of the connection pool (-1 = no max) -error.resourceadapter.maxConnPool.numberformat=
  • Pool maximum must be a number
  • -label.resourceadapter.connMaxAge=Maximum age -comment.resourceadapter.connMaxAge=Connection maximum age (Value in minutes) -error.resourceadapter.connMaxAge.numberformat=
  • Max age must be a number
  • -label.resourceadapter.maxOpentime=Maximum open time -comment.resourceadapter.maxOpentime=Connection maximum open time (Value in minutes) -error.resourceadapter.maxOpentime.numberformat=
  • Max open time must be a number
  • -label.resourceadapter.maxWaiters=Max Waiters -comment.resourceadapter.maxWaiters=Maximum number of concurrent waiters for a Connection -error.resourceadapter.maxWaiters.numberformat=
  • Max Waiters must be a number
  • -label.resourceadapter.maxWaitTime=Max Wait Time -comment.resourceadapter.maxWaitTime=Maximum time in seconds to wait for a Connection (0 = no wait) -error.resourceadapter.maxWaitTime.numberformat=
  • Max Wait Time must be a number
  • -label.resourceadapter.samplingPeriod=Sampling Period -comment.resourceadapter.samplingPeriod=Sampling Period in seconds -error.resourceadapter.samplingPeriod.numberformat=
  • Sampling Period must be a number
  • -label.resourceadapter.adjustPeriod=Adjust Period -comment.resourceadapter.adjustPeriod=Adjust Period in seconds -error.resourceadapter.adjustPeriod.numberformat=
  • Adjust Period must be a number
  • -title.resourceadapter.jdbc=JDBC resource adapter configuration (if applicable) -label.resourceadapter.jdbcConnCheckLevel=Checking level -comment.resourceadapter.jdbcConnCheckLevel=JDBC connection checking level:
    0 = no special checking
    1 = check before reuse if physical connection is still open
    2 = try every connection before reuse
    3 = keep alive (send test statement every sampling period) -label.resourceadapter.jdbcTestStatement=Test -comment.resourceadapter.jdbcTestStatement=SQL query for test statement - -tab.resourceadapter.rar.usedby=Used by -title.resourceadapter.rar.usedby.ejb=Ejb -title.resourceadapter.rar.usedby.type=Type -title.resourceadapter.rar.usedby.container=Container - -tab.resourceadapter.rar.statistics=Statistics - -tab.database.datasources=Datasources -message.database.datasources.none=No datasource found ! -title.database.datasources.name=Name -title.database.datasources.jndiName=JDNI name -title.database.datasources.jdbcConnectionOpened=JDBC Connection - -tab.database.datasource=Datasource -title.database.datasource.poolState=JDBC Connections Pool State -title.database.datasource.waitersStat=Statistics on waiters -title.database.datasource.getConnectionStat=Statistics on getConnection operations -title.database.datasource.openPhysConn=Connection to database statistics -label.database.datasource.currentOpened=Current pool size -comment.database.datasource.currentOpened=Physically opened JDBC Connections -label.database.datasource.currentBusy=Busy connections -comment.database.datasource.currentBusy=Number of connections currently in use -label.database.datasource.currentInTx=Busy in transactions -comment.database.datasource.currentInTx=Number of connections used inside transactions -label.database.datasource.busyMin=Min busy in last period -comment.database.datasource.busyMin=Minimum number of busy connections in the last sampling period -label.database.datasource.busyMax=Max busy in last period -comment.database.datasource.busyMax=Maximum number of busy connections in the last sampling period -label.database.datasource.openedCount=Number of connections -comment.database.datasource.openedCount=Total number of connection operations to the database -label.database.datasource.connectionFailures=Number of failures -comment.database.datasource.connectionFailures=Total number of failures when trying to connect to the database -label.database.datasource.connectionLeaks=Connection leaks -comment.database.datasource.connectionLeaks=Number of connections which were closed without being requested by their user -label.database.datasource.currentWaiters=Current number of waiters -comment.database.datasource.currentWaiters=Number of waiters for a connection -label.database.datasource.waitersHigh=Max waiters -comment.database.datasource.waitersHigh=Maximum number of waiters since pool creation -label.database.datasource.waitersHighRecent=Max waiters in last period -comment.database.datasource.waitersHighRecent=Maximum number of waiters in the last sampling period -label.database.datasource.waiterCount=Total waiters -comment.database.datasource.waiterCount=Total number of waiters since pool creation -label.database.datasource.waitingHigh=Max waiting time -comment.database.datasource.waitingHigh=Maximum waiting time (in millisec) since pool creation -label.database.datasource.waitingHighRecent=Max waiting in last period -comment.database.datasource.waitingHighRecent=Maximum waiting time (in millisec) in the last sampling period -label.database.datasource.waitingTime=Total waiting -comment.database.datasource.waitingTime=Total waiting time (in millisec) since pool creation -label.database.datasource.servedOpen=Served connections -comment.database.datasource.servedOpen=Total number of served getConnection operations -label.database.datasource.rejectedOpen=Rejected connections -comment.database.datasource.rejectedOpen=Total number of rejected getConnection operations -label.database.datasource.rejectedFull=By waiter overflow -comment.database.datasource.rejectedFull=Number of rejected getConnection due to waiter overflow -label.database.datasource.rejectedTimeout=By waiter timeout -comment.database.datasource.rejectedTimeout=Number of rejected getConnection due to waiter timeout -label.database.datasource.rejectedOther=By any other reason -comment.database.datasource.rejectedOther=Number of rejected getConnection due to any other reason -title.database.datasource.config=JDBC Datasource configuration -title.database.driver.config=JDBC Driver configuration -title.database.datasource.config.jdbc=JDBC connection configuration -label.database.datasource.datasourceName=Name -label.database.datasource.dsName=JNDI name -label.database.datasource.datasourceDescription=Description -label.database.datasource.url=URL -label.database.driver.className=Driver class name -label.database.datasource.userName=User name -label.database.datasource.password=User password -label.database.datasource.datasourceFactory=Factory -label.database.datasource.mapper=Mapper -label.database.datasource.jdbcConnMaxAge=Maximum age -comment.database.datasource.jdbcConnMaxAge=JDBC connection maximum age (Value in minutes) -error.database.datasource.jdbcConnMaxAge.numberformat=
  • Max age must be a number
  • -label.database.datasource.jdbcMaxOpenTime=Maximum open time -comment.database.datasource.jdbcMaxOpenTime=JDBC connection maximum open time (Value in minutes) -error.database.datasource.jdbcMaxOpenTime.numberformat=
  • Max open time must be a number
  • -label.database.datasource.jdbcConnCheckLevel=Checking level -comment.database.datasource.jdbcConnCheckLevel=JDBC connection checking level:
    0 = no special checking
    1 = check before reuse if physical connection is still open
    2 = try every connection before reuse -label.database.datasource.jdbcTestStatement=Test -comment.database.datasource.jdbcTestStatement=SQL query for test statement -label.database.datasource.jdbcMinConnPool=Pool minimum -comment.database.datasource.jdbcMinConnPool=Minimum size of the connection pool -error.database.datasource.jdbcMinConnPool.numberformat=
  • Pool minimum must be a number
  • -label.database.datasource.jdbcMaxConnPool=Pool maximum -comment.database.datasource.jdbcMaxConnPool=Maximum size of the connection pool (-1 = no max) -error.database.datasource.jdbcMaxConnPool.numberformat=
  • Pool maximum must be a number
  • -label.database.datasource.jdbcMaxWaitTime=Max Wait Time -comment.database.datasource.jdbcMaxWaitTime=Maximum time in seconds to wait for a jdbc Connection (0 = no wait) -error.database.datasource.jdbcMaxWaitTime.numberformat=
  • Max Wait Time must be a number
  • -label.database.datasource.jdbcMaxWaiters=Max Waiters -comment.database.datasource.jdbcMaxWaiters=Maximum number of concurrent waiters for a jdbc Connection -error.database.datasource.jdbcMaxWaiters.numberformat=
  • Max Waiters must be a number
  • -label.database.datasource.jdbcPstmtMax=Pstmt Pool Max -comment.database.datasource.jdbcPstmtMax=Maximum Size for the pool of Prepared Statements -error.database.datasource.jdbcPstmtMax.numberformat=
  • Pstmt Pool Max must be a number
  • -label.database.datasource.jdbcSamplingPeriod=Sampling Period -comment.database.datasource.jdbcSamplingPeriod=Sampling Period in seconds -error.database.datasource.jdbcSamplingPeriod.numberformat=
  • Sampling Period must be a number
  • -label.database.datasource.jdbcAdjustPeriod=Adjust Period -comment.database.datasource.jdbcAdjustPeriod=Pool Adjustment Period in seconds -error.database.datasource.jdbcAdjustPeriod.numberformat=
  • Adjust Period must be a number
  • - -tab.database.datasource.usedby=Used by -title.database.datasource.usedby.ejb=Ejb -title.database.datasource.usedby.type=Type -title.database.datasource.usedby.container=Container - -tab.database.datasource.statistics=Statistics - -tab.service.discovery=Discovery -action.title.discovery=Actions -label.service.discovery.multicastaddress=Multicast address -label.service.discovery.multicastport=Multicast port -label.service.discovery.multicastttl=Multicast ttl -label.service.discovery.ismaster=Is master -action.comment.service.discovery.start=Start discovery master -action.button.service.discovery.start=Start - -tab.service.security=Realms -title.service.security.realm.name=Name -title.service.security.realm.type=Type -title.service.security.realm.path=Context path -title.service.security.realm.used=Used -label.service.security.realm.type.unknown=unknown -label.service.security.realm.path.unknown=? -message.service.security.realm.notused=Security realm not used - -#--------------------------------------------------------------------------------------------------- - -title.config.confirmed=Configuration Saved - -tab.configure=Configure -tab.config.confirm=Confirm -tab.archiveConfigForm=Form View -tab.archiveConfigAdvanced=Advanced View - -label.config.switchTo=Switch To: - -button.config.switchToForm=Switch To Form View -button.config.switchToAdvanced=Switch To Advanced View -button.config.configure=Configure - -message.config.selectArchive=Select an archive to configure: -message.config.archiveName=Archive Name: -message.config.fileName=File Name: -message.config.confirmation=Are you sure you want to remove this element? -message.config.none=No deployable archives available. -message.config.archiveConfig=Archive Configuration - -error.config.noselect=An archive and a deployment descriptor must be selected. -#--------------------------------------------------------------------------------------------------- - -tab.deployment=Deployment -button.deployment.deploy=>>> -button.deployment.undeploy=<<< -label.deployment.deployable=Deployable -label.deployment.deployed=Deployed -label.deployment.apps=Applications -label.deployment.targets=Targets - -tab.deployment.confirm=Confirm -tab.deployment.result=Result -title.deployment.confirm.deployed=Deployed -message.deployment.confirm.deployed.none=None -title.deployment.confirm.add=To deploy -title.deployment.confirm.remove=To undeploy - -label.deployment.upload.selectFile=Select a file -message.upload.replace=Replace existing file - -tab.deployment.upload=Upload -tab.deployment.upload.result=Result - -tab.deployment.domain=Domain Deployment -tab.deployment.domain.result=Result -message.deployment.domain.deploymentOf=(Un)Deployment Of: -message.deployment.domain.toDeploy=To Deploy -message.deployment.domain.toUndeploy=To Undeploy -message.deployment.domain.targetServers=Deployment Target -message.deployment.domain.targetServersUndeploy=Undeployment Target -message.deployment.domain.noApps=No Applications Selected. -message.deployment.domain.noServers=No Servers Selected. -message.deployment.domain.selAll=Select All -message.deployment.domain.selNone=Select None -title.deployment.domain.deployOptions=Deployment Options -message.deployment.domain.deployOnly=Deploy Only -message.deployment.domain.undeploy=Undeploy -message.deployment.domain.uploadOnly=Distribute File Only -message.deployment.domain.uploadDeploy=Distribute File and (Re)deploy -message.deployment.domain.replace=Replace File(s) on Target(s) -message.deployment.domain.autoload=Distribute File(s) into Autoload -message.deployment.note=Note: Using the 'Distribute File and (Re)deploy' option above will redeploy the existing application if the file is replaced on the remote server using the checkbox below. - -title.deployment.remove.confirm.removed=Removed -title.deployment.remove.confirm.remove=To Remove -message.deployment.remove.confirm.deployed.none=None -tab.deployment.remove=Remove -tab.deployment.remove.confirm=Confirm -tab.deployment.remove.result=Result -label.deployment.remove.removable=Removable modules (undeployed modules) : -message.deployment.modules.none=No module available. Only undeployed modules can be removed. -#--------------------------------------------------------------------------------------------------- - -tab.resource.destinations=Jms destinations -tab.resource.destinations.create=New destination -tab.resource.destinations.confirm=Confirm remove -title.resource.jmsResources.action=Actions -title.resource.destination=Jms destination to create -button.resource.jmsResources.action.create=New Jms destination -button.resource.jmsResources.action.save=Save -button.resource.jmsResources.action.remove=Remove -comment.resource.jmsResources.action.create= -label.resource.destinations.name=Name -label.resource.destination.name=Name -label.resource.destinations.type=Type -label.resource.destinations.topic=topic -label.resource.destinations.queue=queue -comment.resource.destination.name= -error.resource.jms.create.name.required=
  • Name cannot be empty
  • -error.resource.jms.create.type.required=
  • Destination type must be checked
  • -error.resource.jms.create.password.required=
  • Password cannot be empty
  • -message.resource.destinations.none=No Jms destinations found on server -message.resource.destinations.list.empty=The list is empty ! - -error.resource.jms.addreader.name.required=
  • User name required
  • -error.resource.jms.addreader.id.required=
  • User id required
  • -error.resource.jms.addreader.name.error=
  • User name or id error. Check the Jms users list.
  • - -title.resource.mailfactories.action=Actions -button.resource.mailfactories.action.create=New Mail Factory -comment.resource.mailfactories.action.create=Create a new Mail Factory from an empty form - -label.resource.mailfactory.properties.name=Factory Name -label.resource.mailfactory.type.session=Session -label.resource.mailfactory.type.mimepart=MimePartDataSource -comment.resource.mailfactory.properties.name=Mail factory and properties file name -comment.resource.mailfactory.properties.type=Mail factory type -comment.resource.mailfactory.properties.jndiname=Jndi name -title.resource.mailfactory.configuration=Mail factory configuration -label.resource.mailfactory.name=Name -label.resource.mailfactory.type=mail.factory.type -label.resource.mailfactory.jndiname=mail.factory.name -title.resource.mailfactory.authentication=Authentication configuration -label.resource.mailfactory.authentication.username=mail.authentication.username -label.resource.mailfactory.authentication.password=mail.authentication.password -comment.resource.mailfactory.properties.username= -comment.resource.mailfactory.properties.password= -title.resource.mailfactory.session=Mail session configuration -comment.resource.mailfactory.properties.session= -title.resource.mailfactory.mimepart=MimePartDataSource configuration -label.resource.mailfactory.to=mail.to -comment.resource.mailfactory.properties.to= -label.resource.mailfactory.subject=mail.subject -comment.resource.mailfactory.properties.subject= -label.resource.mailfactory.cc=mail.cc -comment.resource.mailfactory.properties.cc= -label.resource.mailfactory.bcc=mail.bcc -comment.resource.mailfactory.properties.bcc= - -tab.resource.mailfactories=Mail Factories -tab.resource.session.mailfactory.properties=Session Mail Factory -tab.resource.mimepart.mailfactory.properties=MimePartDataSource Mail Factory -tab.resource.mailfactory.properties=Mail Factory -message.resource.mailfactories.none=No mail factory found ! -label.resource.mailfactories.name=Name -label.resource.mailfactories.deployed= - -tab.resource.datasources=Datasources -title.resource.datasources.action=Actions -button.resource.datasources.action.create=New datasource -comment.resource.datasources.action.create=Create an empty file for a new datasource -message.resource.datasources.none=No datasource found ! -label.resource.datasources.name=Name -label.resource.datasources.deployed= - -button.rar.action.create=New Resource Adapter -comment.rar.action.create=Create an empty resource adapter. -message.resourcadapter.select.template=Please select a Resource Adapter template -tab.resource.datasource.properties.create=New Datasource -tab.resourceadapter.create=New Resource Adapter -tab.resource.datasource.properties=Datasource -tab.resource.datasource.confirm=Confirm loading datasource -title.resource.datasource.properties.name=File -title.resource.datasource.properties.datasource=Datasource -title.resourceadapter.resourceadapter=Resource Adapter -title.resource.datasource.properties.jdbc=JDBC -label.resource.datasource.properties.name=Name -comment.resource.datasource.properties.name=Name of the datasource -label.resourceadapter.extention=.rar -label.resourceadapter.rarname=Resource Adapter Name -comment.resourceadapter.rarname=Name of the Resource Adapter File -label.resourceadapter.displayname=Display Name -comment.resourceadapter.displayname=Display name for this Resource Adapter -label.resourceadapter.description=Description -comment.resourceadapter.description=The description of this Resource Adapter -label.resourceadapter.vendorname=Vendor Name -comment.resourceadapter.vendorname=Vendor name for this Resource Adapter -label.resourceadapter.specversion=Spec-Version -comment.resourceadapter.specversion=The specification version -label.resourceadapter.eistype=EIS-Type -comment.resourceadapter.eistype=The EIS-Type -label.resourceadapter.version=Version -comment.resourceadapter.version=The version - -label.resourceadapter.jdbcconparam=JDBC Connection Parameters -label.resourceadapter.checklevel=Check Level -comment.resourceadapter.checklevel=JDBC connection checking level:
    0 = no special checking
    1 = check before reuse if physical connection is still open
    2 = try every connection before reuse -title.resourceadapter.jdbc=JDBC Properties -label.resourceadapter.jndiname=JNDI Name -label.resourceadapter.nativelib=Native-Lib -label.resourceadapter.logenabled=Log-Enabled -label.resourceadapter.logtopic=Log-Topic -label.resourceadapter.poolinit=pool-init -comment.resourceadapter.poolinit=Initial size of the connection pool -label.resourceadapter.poolmin=pool-min -comment.resourceadapter.poolmin=Minimum size of the connection pool -label.resourceadapter.poolmax=pool-max -comment.resourceadapter.poolmax=Maximum size of the connection pool (-1 = no max) -label.resourceadapter.poolmaxage=pool-max-age-minutes -comment.resourceadapter.poolmaxage=Connection maximum age (Value in minutes) -label.resourceadapter.pstmtmax=pstmt-max -comment.resourceadapter.pstmtmax=Maximum size of prepared statements cache -label.resourceadapter.poolmaxopentime=pool-max-opentime -comment.resourceadapter.poolmaxopentime=Connection maximum open time (Value in minutes) -label.resourceadapter.poolmaxwaiters=pool-max-waiters -comment.resourceadapter.poolmaxwaiters=Maximum number of concurrent waiters for a Connection -label.resourceadapter.poolmaxwaittime=pool-max-waittime -comment.resourceadapter.poolmaxwaittime=Maximum time in seconds to wait for a Connection (0 = no wait) -label.resourceadapter.poolsamplingperiod=pool-sampling-period -comment.resourceadapter.poolsamplingperiod=Sampling Period in seconds -label.resourceadapter.dsclass=dsClass -label.resourceadapter.url=URL -label.resourceadapter.user=user -label.resourceadapter.password=password -label.resourceadapter.logintimeout=loginTimeout -label.resourceadapter.isolationlevel=isolationLevel -label.resourceadapter.mappername=mapperName -label.resourceadapter.configlogtopic=logTopic -label.resourceadapter.poolparams=Pool-Params -label.resourceadapter.jonasconfigproperties=JOnAS Config Properties - -error.resourceadapter.rarname.required=
  • Resource Adapter Name cannot be empty
  • -error.resourceadapter.displayname.required=
  • Resource Adapter Display Name cannot be empty
  • -error.resourceadapter.description.required=
  • Resource Adapter Description cannot be empty
  • -error.resourceadapter.vendorname.required=
  • Resource Adapter Vendor Name cannot be empty
  • -error.resourceadapter.specversion.required=
  • Resource Adapter Specification Version cannot be empty
  • -error.resourceadapter.eistype.required=
  • Resource Adapter EIS-Type cannot be empty
  • -error.resourceadapter.version.required=
  • Version cannot be empty
  • -error.resource.datasource.properties.name.required=
  • Name cannot be empty
  • -label.resource.datasource.properties.datasourceName=JNDI name -comment.resource.datasource.properties.datasourceName=The JNDI name to use the datasource -error.resource.datasource.properties.datasourceName.required=
  • JNDI name cannot be empty
  • -label.resource.datasource.properties.datasourceDescription=Description -comment.resource.datasource.properties.datasourceDescription=Description of the datasource -label.resource.datasource.properties.datasourceUrl=URL -comment.resource.datasource.properties.datasourceUrl=URL to access to the database -label.resource.datasource.properties.datasourceClassname=JDBC Driver -comment.resource.datasource.properties.datasourceClassname=JDBC driver class name to access to the database -error.resource.datasource.properties.datasourceClassname.required=
  • JDBC Driver cannot be empty
  • -label.resource.datasource.properties.datasourceUsername=User name -comment.resource.datasource.properties.datasourceUsername=User name or login to log in the database -label.resource.datasource.properties.datasourcePassword=User password -comment.resource.datasource.properties.datasourcePassword=User password to log in the database -label.resource.datasource.properties.datasourceFactory=Factory -comment.resource.datasource.properties.datasourceFactory=Name of the class implementing the XAPoolDataSource -label.resource.datasource.properties.datasourceMapper=Mapper -comment.resource.datasource.properties.datasourceMapper=Mapper used for the datasource -label.resource.datasource.properties.jdbcConnmaxage=Maximum age -comment.resource.datasource.properties.jdbcConnmaxage=JDBC connection maximum age (Value in minutes) -error.resource.datasource.properties.jdbcConnmaxage.numberformat=
  • Maximum age must be a number
  • -label.resource.datasource.properties.jdbcMaxopentime=Max open time -comment.resource.datasource.properties.jdbcMaxopentime=JDBC connection maximum open time (Value in minutes) -error.resource.datasource.properties.jdbcMaxopentime.numberformat=
  • Max open time must be a number
  • -label.resource.datasource.properties.jdbcConnchecklevel=Checking level -comment.resource.datasource.properties.jdbcConnchecklevel=JDBC connection checking level:
    0 = no special checking
    1 = check before reuse if physical connection is still open
    2 = try every connection before reuse -label.resource.datasource.properties.jdbcConnteststmt=Test -comment.resource.datasource.properties.jdbcConnteststmt=SQL query for test statement -label.resource.datasource.properties.jdbcMinconpool=Pool minimum -comment.resource.datasource.properties.jdbcMinconpool=Minimum size of the connection pool -error.resource.datasource.properties.jdbcMinconpool.numberformat=
  • Pool minimum must be a number
  • -label.resource.datasource.properties.jdbcMaxconpool=Pool maximum -comment.resource.datasource.properties.jdbcMaxconpool=Maximum size of the connection pool (-1 = no max) -error.resource.datasource.properties.jdbcMaxconpool.numberformat=
  • Pool maximum must be a number
  • -label.resource.datasource.properties.jdbcMaxwaittime=Max Wait Time -comment.resource.datasource.properties.jdbcMaxwaittime=Maximum time in seconds to wait for a jdbc connection (0 = no wait) -error.resource.datasource.properties.jdbcMaxwaittime.numberformat=
  • Max Wait Time must be a number
  • -label.resource.datasource.properties.jdbcMaxwaiters=Max Waiters -comment.resource.datasource.properties.jdbcMaxwaiters=Maximum concurrent waiters for a jdbc connection -error.resource.datasource.properties.jdbcMaxwaiters.numberformat=
  • Max Waiters must be a number
  • - -#--------------------------------------------------------------------------------------------------- - -tab.security.factory.realms=Security -tab.security.factory.realms.memory=Memory realm -tab.security.factory.realms.datasource=Datasource realm -tab.security.factory.realms.ldap=Ldap realm -title.security.factory.realms.action=Actions -button.security.factory.realms.create.memory=New memory realm -button.security.factory.realms.create.datasource=New datasource realm -button.security.factory.realms.create.ldap=New ldap realm -button.security.factory.realms.remove=Remove -message.security.factory.realms.none=No realm found ! -title.security.factory.realms.name=Name -title.security.factory.realms.type=Realm -error.security.factory.realms.type.unknown=
  • Realm type is unknown : {0}
  • -tab.security.factory.realms.confirm=Confirm - -button.security.factory.memory.realm.clearCache=Clear cache - -tab.security.factory.memory.realm=Realm -tab.security.factory.memory.realm.new=New memory realm -title.security.factory.memory.realm.action=Action -title.security.factory.memory.realm=Memory realm -label.security.factory.memory.realm.resource=Realm name -label.security.factory.memory.realm.name=Name -comment.security.factory.memory.realm.name= -error.security.factory.memory.realm.name.required=
  • The name is required !
  • -error.security.factory.memory.realm.name.nospace=
  • Name : spaces forbidden
  • - -tab.security.factory.memory.realm.users=Users -title.security.factory.memory.realm.users.action=Actions -button.security.factory.memory.realm.users.create=New user -button.security.factory.memory.realm.users.remove=Remove users -message.security.factory.memory.realm.users.none=No user found ! -label.security.factory.memory.realm.users.user=User name -error.security.factory.memory.realm.users.user.required=User required ! - -tab.security.factory.memory.realm.roles=Roles -title.security.factory.memory.realm.roles.action=Actions -button.security.factory.memory.realm.roles.create=New role -button.security.factory.memory.realm.roles.remove=Remove roles -message.security.factory.memory.realm.roles.none=No role found ! -label.security.factory.memory.realm.roles.role=Role name -error.security.factory.memory.realm.roles.role.required=Role required ! - -tab.security.factory.memory.realm.groups=Groups -title.security.factory.memory.realm.groups.action=Actions -button.security.factory.memory.realm.groups.create=New group -button.security.factory.memory.realm.groups.remove=Remove groups -message.security.factory.memory.realm.groups.none=No group found ! -label.security.factory.memory.realm.groups.group=Group name -error.security.factory.memory.realm.groups.group.required=Group required ! - -tab.security.factory.memory.realm.confirm=Confirm -message.security.factory.memory.realm.list.empty=The list is empty ! -title.security.factory.memory.realm.confirm.user.remove=User's list to remove -title.security.factory.memory.realm.confirm.group.remove=Group's list to remove -title.security.factory.memory.realm.confirm.role.remove=Role's list to remove - -tab.security.factory.memory.realm.user=User -title.security.factory.memory.realm.user=User -title.security.factory.memory.realm.user.roles=Roles -label.security.factory.memory.realm.user.roles.notused=Available -label.security.factory.memory.realm.user.roles.used=User's roles -title.security.factory.memory.realm.user.groups=Groups -label.security.factory.memory.realm.user.groups.notused=Available -label.security.factory.memory.realm.user.groups.used=User's groups -title.security.factory.memory.realm.user.password=Change password -label.security.factory.memory.realm.user.password=Password -label.security.factory.memory.realm.user.confirmPassword=Confirm password -error.security.factory.memory.realm.user.password.change.different=
  • The password and the confirmation are different !
  • -error.security.factory.memory.realm.user.password.change.required=
  • The password is required with confirmation !
  • - -tab.security.factory.memory.realm.user.new=New user -title.security.factory.memory.realm.user.new=User -label.security.factory.memory.realm.user.name=User name -error.security.factory.memory.realm.user.name.required=
  • The user name is required !
  • -error.security.factory.memory.realm.user.password.required=
  • The password is required !
  • -error.security.factory.memory.realm.user.confirmPassword.required=
  • The confirm password is required !
  • - -tab.security.factory.memory.realm.role=Role -title.security.factory.memory.realm.role=Role -label.security.factory.memory.realm.role.description=Description - -tab.security.factory.memory.realm.role.new=New role -title.security.factory.memory.realm.role.new=Role -label.security.factory.memory.realm.role.name=Role name -error.security.factory.memory.realm.role.name.required=
  • The role name is required !
  • - -tab.security.factory.memory.realm.group=Group -title.security.factory.memory.realm.group=Group -label.security.factory.memory.realm.group.description=Description -title.security.factory.memory.realm.group.roles=Roles -label.security.factory.memory.realm.group.roles.notused=Available -label.security.factory.memory.realm.group.roles.used=Group's roles - -tab.security.factory.memory.realm.group.new=New group -title.security.factory.memory.realm.group.new=Group -label.security.factory.memory.realm.group.name=Group name -error.security.factory.memory.realm.group.name.required=
  • The group name is required !
  • - -tab.security.factory.datasource.realm=Realm -tab.security.factory.datasource.realm.new=New datasource realm -title.security.factory.datasource.realm=Datasource realm -label.security.factory.datasource.realm.dsName=JNDI name -comment.security.factory.datasource.realm.dsName= -error.security.factory.datasource.realm.dsName.required=
  • The JNDI name is required !
  • -label.security.factory.datasource.realm.name=Name -comment.security.factory.datasource.realm.name=Name of realm -error.security.factory.datasource.realm.name.required=
  • The name is required !
  • -label.security.factory.datasource.realm.roleTable=Role table -comment.security.factory.datasource.realm.roleTable=The name of table of roles -error.security.factory.datasource.realm.roleTable.required=
  • The Role table is required !
  • -label.security.factory.datasource.realm.roleTableRolenameCol=Column Rolename in Role table -comment.security.factory.datasource.realm.roleTableRolenameCol=The name of the role's column in the Role table -error.security.factory.datasource.realm.roleTableRolenameCol.required=
  • The Column Rolename in Role table is required !
  • -label.security.factory.datasource.realm.roleTableUsernameCol=Column Username in Role table -comment.security.factory.datasource.realm.roleTableUsernameCol=The name of the user's column in the Role Table -error.security.factory.datasource.realm.roleTableUsernameCol.required=
  • The Column Username in Role table is required !
  • -label.security.factory.datasource.realm.userTable=User table -comment.security.factory.datasource.realm.userTable=The name of table of users -error.security.factory.datasource.realm.userTable.required=
  • The User table is required !
  • -label.security.factory.datasource.realm.userTablePasswordCol=Column Password in User table -comment.security.factory.datasource.realm.userTablePasswordCol=The name of the password's column in the User table -error.security.factory.datasource.realm.userTablePasswordCol.required=
  • The Column Password in User table is required !
  • -label.security.factory.datasource.realm.userTableUsernameCol=Column Username in User table -comment.security.factory.datasource.realm.userTableUsernameCol=The name of the username's column in the User table -error.security.factory.datasource.realm.userTableUsernameCol.required=
  • The Column Username in User table is required !
  • -label.security.factory.datasource.realm.algorithm=Algorithm -comment.security.factory.datasource.realm.algorithm=Default algorithm used to crypt the passwords - -tab.security.factory.ldap.realm=Realm -tab.security.factory.ldap.realm.new=New Ldap realm -title.security.factory.ldap.realm=Ldap realm -label.security.factory.ldap.realm.authenticationMode=Authentication Mode -comment.security.factory.ldap.realm.authenticationMode= -label.security.factory.ldap.realm.baseDn=Base DN -comment.security.factory.ldap.realm.baseDn=DN used by default -error.security.factory.ldap.realm.baseDn.required=
  • The Base DN is required !
  • -label.security.factory.ldap.realm.initialContextFactory=Initial Context Factory -comment.security.factory.ldap.realm.initialContextFactory=Used class to access to Ldap -error.security.factory.ldap.realm.initialContextFactory.required=
  • The Initial Context Factory is required. The default value was replaced !
  • -label.security.factory.ldap.realm.language=Language -comment.security.factory.ldap.realm.language=(optional) -label.security.factory.ldap.realm.name=Name -comment.security.factory.ldap.realm.name=Name of realm -error.security.factory.ldap.realm.name.required=
  • The name is required !
  • -label.security.factory.ldap.realm.providerUrl=Provider URL -comment.security.factory.ldap.realm.providerUrl=Used URL to Ldap access -error.security.factory.ldap.realm.providerUrl.required=
  • The Provider URL is required. The default value was replaced !
  • -label.security.factory.ldap.realm.referral=Referral -comment.security.factory.ldap.realm.referral=(optional) -label.security.factory.ldap.realm.roleDn=Role DN -comment.security.factory.ldap.realm.roleDn=Used DN to access to the role (optional by default the Base DN is used) -label.security.factory.ldap.realm.roleNameAttribute=Role Name Attribute -comment.security.factory.ldap.realm.roleNameAttribute= -error.security.factory.ldap.realm.roleNameAttribute.required=
  • The Role Name Attribute is required. The default value was replaced !
  • -label.security.factory.ldap.realm.roleSearchFilter=Role Search Filter -comment.security.factory.ldap.realm.roleSearchFilter= -error.security.factory.ldap.realm.roleSearchFilter.required=
  • The Role Search Filter is required. The default value was replaced !
  • -label.security.factory.ldap.realm.securityAuthentication=Security Authentication -comment.security.factory.ldap.realm.securityAuthentication= -label.security.factory.ldap.realm.securityCredentials=Security Credentials -comment.security.factory.ldap.realm.securityCredentials= -label.security.factory.ldap.realm.securityPrincipal=Security Principal -comment.security.factory.ldap.realm.securityPrincipal= -label.security.factory.ldap.realm.securityProtocol=Security Protocol -comment.security.factory.ldap.realm.securityProtocol=(optional) -label.security.factory.ldap.realm.stateFactories=State Factories -comment.security.factory.ldap.realm.stateFactories=(optional) -label.security.factory.ldap.realm.userDn=User DN -comment.security.factory.ldap.realm.userDn=Used DN to access to the user (optional by default the Base DN is used) -label.security.factory.ldap.realm.userPasswordAttribute=User Password Attribute -comment.security.factory.ldap.realm.userPasswordAttribute= -error.security.factory.ldap.realm.userPasswordAttribute.required=
  • The User Password Attribute is required. The default value was replaced !
  • -label.security.factory.ldap.realm.userRolesAttribute=User Roles Attribute -comment.security.factory.ldap.realm.userRolesAttribute= -error.security.factory.ldap.realm.userRolesAttribute.required=
  • The User Roles Attribute is required. The default value was replaced !
  • -label.security.factory.ldap.realm.userSearchFilter=User Search Filter -comment.security.factory.ldap.realm.userSearchFilter= -error.security.factory.ldap.realm.userSearchFilter.required=
  • The User Search Filter is required. The default value was replaced !
  • -label.security.factory.ldap.realm.algorithm=Algorithm -comment.security.factory.ldap.realm.algorithm=Default algorithm used to crypt the passwords - -tab.security.catalina.realm=Catalina realms -message.security.catalina.realm.notused=Security realm not used -label.security.catalina.realm.name=Catalina realm name - -title.security.catalina.realm.name=Name -title.security.catalina.realm.used=Used - -tab.jmsservice=MOM -tab.jms.queues=Queues -tab.jms.topics=Topics -tab.jms.connfacts=Connection Factories -tab.jms.cf.usedby=Used by -tab.jms.queue.usedby=Used by -tab.jms.topic.usedby=Used by -title.jms.cf.usedby.ejb=Ejb -title.jms.cf.usedby.type=Type -title.jms.cf.usedby.container=Container -title.jms.queue.usedby.ejb=Ejb -title.jms.queue.usedby.type=Type -title.jms.queue.usedby.container=Container -title.jms.topic.usedby.ejb=Ejb -title.jms.topic.usedby.type=Type -title.jms.topic.usedby.container=Container - -label.service.jms.momName=Name -label.service.jms.momLocation=Location -label.service.jms.momUrl=URL -label.service.jms.topic.subscriptions=Number of subscribers -label.service.jms.queue.pendingMessages=Pending messages -label.service.jms.queue.pendingRequests=Pending consumers -label.service.jms.cf.mode=Messaging mode -tab.mom.collocated=Collocated -tab.mom.distant=Remote -tab.mom.joram=JORAM -tab.connfact.defaultconnfact=Default Connection Factory Name -tab.connfact.defaulttopicconnfact=Default Topic Connection Factory Name -tab.connfact.defaultqueueconnfact=Default Queue Connection Factory Name -title.jms.connfact.name=Name -title.jms.connfact.comment=Info - -message.service.jms.queues.none=No JMS queue found ! -message.service.jms.topics.none=No JMS topic found ! -message.service.jms.destinations.none=No JMS destination found ! -#--------------------------------------------------------------------------------------------------- -tab.workmanagerservice=Work Manager -label.workmanagerservice.current.pool.size=Current Pool Size -label.workmanagerservice.max.pool.size=Max Pool Size -label.workmanagerservice.min.pool.size=Min Pool Size -#--------------------------------------------------------------------------------------------------- -tab.versioningservice=Versioning -label.versioningservice.enabled=Versioning enabled -label.versioningservice.defaultpolicy=Default deployment policy -#--------------------------------------------------------------------------------------------------- -tab.workcleanerservice=Work Cleaner -label.workcleanerservice.period=Execution period -title.workcleanerservice.action=Action -title.workcleanerservice.setting=Setting -#--------------------------------------------------------------------------------------------------- -tab.smartclientservice=Smart Client -label.smartclient.port=Port number -label.smartclient.active=EasyBeans SmartClient active -#--------------------------------------------------------------------------------------------------- -tab.mailservice=Mail -tab.mailservice.sessions=Session Mail Factories -tab.mailservice.mimeparts=MimePartDatasource Mail Factories -tab.mailservice.mailfactory.usedby=Used by -title.mailservice.factories=Number of available mail factories -title.mailservice.mailfactory.configuration=Mail factory configuration -title.mailservice.mailfactory.authentication.configuration=Authentication configuration -title.mailservice.mailfactory.usedby.ejb=Ejb -title.mailservice.mailfactory.usedby.type=Type -title.mailservice.mailfactory.usedby.container=Container -title.mailservice.mailfactory.session.configuration=Mail Session configuration -title.mailservice.mailfactory.mimepart.configuration=MimePartDataSource configuration -label.mailservice.nbfact.session=Session factories -label.mailservice.nbfact.mimepart=MimePartDataSource -label.mailservice.nbfact.total=Total -label.mailservice.mailfactory.type=Type -label.mailservice.mailfactory.jndiname=Jndi name -label.mailservice.mailfactory.authentication.username=mail.authentication.username -label.mailservice.mailfactory.authentication.password=mail.authentication.password -label.mailservice.mailfactory.mimepart.to=mail.to -label.mailservice.mailfactory.mailfactory.subject=mail.subject -label.mailservice.mailfactory.mimepart.cc=mail.cc -label.mailservice.mailfactory.mimepart.bcc=mail.bcc -message.mailservice.mailfactory.session=Session -message.mailservice.mailfactory.mimepart=MimePartDataSource -message.mailservice.sessions.none=No Session mail factories ! -title.mailservice.factory.name=Name -title.mailservice.factory.jndiname=JNDI name -message.mailservice.mimepart.none=No MimePartDataSource mail factories ! -error.mailservice.mailfactory.emptyjndiname=
  • Can't accept empty Jndi name
  • -error.mailservice.mailfactory.emptyname=
  • Can't accept empty factory name
  • -error.mailservice.mailfactory.emptytype=
  • Please check in the type
  • -#--------------------------------------------------------------------------------------------------- - -tab.jtmservice=Transaction Manager -tab.jtmservice.stat=Statistics -tab.jtmservice.moni=Monitor -tab.jtmservice.reco=Recovery -tab.jtmservice.xars=XAResource -tab.jtm.collocated=collocated -tab.jtm.distant=Remote -tab.jtm.undefined=undefined -label.service.jtm.location=Location -label.service.jtm.host=Host name -label.service.jtm.port=Port number -label.service.jtm.timeout=Transaction time-out -label.service.jtm.stat.current=Current number of transactions -label.service.jtm.stat.begun=Number of begun transactions -label.service.jtm.stat.commited=Number of commited transactions -label.service.jtm.stat.rolledback=Number of rolledback transactions -label.service.jtm.stat.expired=Number of transactions with expired time-out -label.service.jtm.moni.date=Date -label.service.jtm.moni.transaction=Transaction -label.service.jtm.moni.resource=Resource -label.service.jtm.moni.state=State -message.transactionsentries.none=No Transactions in Execution ! -label.service.jtm.reco.transaction=Transaction -label.service.jtm.reco.date=Date -label.service.jtm.reco.xidcount=Xid Count -label.service.jtm.reco.resmgr=Resource Manager -label.service.jtm.reco.xares=XAResource -label.service.jtm.reco.xid=Xid -label.service.jtm.reco.xidstate=Xid State -label.service.jtm.reco.nolabel= -message.recoveryentries.none=No Transactions to Recover ! -button.service.jtm.reset=Reset counters -button.service.jtm.refreshtx=Refresh Tx -button.service.jtm.heurcommit=Heuristic Commit -button.service.jtm.heurrollback=Heuristic Rollback -button.service.jtm.heurforget=Forget Tx -tab.xaresource.recovery.confirm=Confirm -message.xaresource.recovery.non.selected=No XAResources selected ! -title.xaresource.recovery.confirm.commit=Commit XAResources selected -title.xaresource.recovery.confirm.rollback=Rollback XAResources selected -title.xaresource.recovery.confirm.forget=Forget XAResources selected -error.jtm.timeOut.required=
  • Transaction time-out cannot be empty
  • -error.jtm.timeOut.format=
  • Transaction time-out not a valid integer!
  • -#--------------------------------------------------------------------------------------------------- - -tab.depmonitorservice= Deployment Monitor -label.service.depmonitorservice.development.mode=Development mode -label.service.depmonitorservice.directories=Deployent directories -label.service.depmonitorservice.monitorInterval=Monitor interval - -#--------------------------------------------------------------------------------------------------- -tab.service.webservice.descriptions.title=Web Service Descriptions -message.service.webservice.nowebservice=No web services found! -label.service.webservice.descriptions.name=Name -label.service.webservice.descriptions.wsdlurl=Published WSDL URL -label.service.webservice.descriptions.portcomponents=Port Components -label.service.webservice.descriptions.wsdlfilename=WSDL File Name - -tab.service.webservice.portcomponents.title=Port Components - -message.service.webservice.portcomponents.none=No port components found! -message.service.webservice.descriptions.portcomponents.link=Click here for Port Components! - -label.service.webservice.portcomponents.name=Name -label.service.webservice.portcomponents.wsdlport=WSDL Port QName -label.service.webservice.portcomponents.sei=SEI -label.service.webservice.portcomponents.endpoint=Endpoint URL -label.service.webservice.portcomponents.implbean=Implementation Bean - -tab.service.webservice.details=Web Service -tab.service.webservice.details.title=Web Service Description Details -title.service.webservice.details=Web Service Description Details -label.service.webservice.details.name=Name -label.service.webservice.details.wsdlurl=Published WSDL URL -label.service.webservice.details.portcomponents=Port Components -label.service.webservice.details.wsdlfilename=WSDL File Name -label.service.webservice.details.mappingfilename=JAX-RPC Mapping File Name -message.service.webservice.details.portcomponents.link=Click here for Port Components! - -title.service.webservice.portcomponents.details=Web Service Port Component Details -label.service.webservice.portcomponents.details.name=Name -label.service.webservice.portcomponents.details.wsdlport=Published Port QName -label.service.webservice.portcomponents.details.sei=Service Endpoint Interface -label.service.webservice.portcomponents.details.endpoint=EndPoint URL -label.service.webservice.portcomponents.details.implbean=Implementation Bean -label.service.webservice.portcomponents.details.handlers=Handlers -message.service.webservice.portcomponents.details.handlers.link=Click here for Handler details! -message.service.webservice.portcomponents.details.implbean.link=Click here for Implementation Bean details! - -tab.service.webservice.portcomponents.handlers.title=Handlers -title.service.webservice.portcomponents.handlers.details=Web Service Handler Details -message.service.webservice.portcomponents.handlers.none=No handlers found! - -label.service.webservice.portcomponents.handlers.details.name=Name -label.service.webservice.portcomponents.handlers.details.classname=Handler Class Name -label.service.webservice.portcomponents.handlers.details.soapheaders=Soap Headers -label.service.webservice.portcomponents.handlers.details.soaproles=Soap Roles -label.service.webservice.portcomponents.handlers.details.initParams=Handler Initialization Parameters - -#--------------------------------------------------------------------------------------------------- - -tab.mbeans=MBeans -title.mbeans.domain=Domain -title.mbeans.family=Family -title.mbeans.objectname=Object Name -label.mbeans.j2ee=J2EE -label.mbeans.owner=Owner -label.mbeans.unknown=? - -tab.mbeans.j2ee=J2EEs -title.mbeans.j2ee.type=j2eeType -title.mbeans.j2ee.name=Name - -tab.mbeans.owner=Owners -title.mbeans.owner.type=Type - -tab.mbeans.unknown=Unknowns - -tab.mbean.properties=Properties -tab.mbean.attributes=Attributes -tab.mbean.operations=Operations -title.mbean.attributes.filtering=Filtering -title.mbean.attributes.list=List of attributes -label.mbean.attributes.values=Values -label.mbean.attributes.descriptions=Descriptions -message.mbean.attributes.none=No attribute found ! -title.mbean.operations.filtering=Filtering -title.mbean.operations.list=List of operations -label.mbean.operations.descriptions=Descriptions -message.mbean.operations.none=No operation found ! - -#--------------------------------------------------------------------------------------------------- - -error.global=
  • Error name : {0}
  • -error.global.log=Error name : {0} -error.global.message=
  • Error name : {0}
      Message :
    • {1}
  • -error.global.message.log=Error name : {0}, message : {1} - -error.mbeanserver.notfound=JOnAS Administration can't execute. The MBean server is not found. Please check the application environment. -error.jonasserver.notfound=JOnAS Administration can't execute. The JOnAS server is not found. Please check the application environment. -error.mbean.j2eedomain.notfound=JOnAS Administration can't execute. The MBean "J2EEDomain" is not found. Please check the application environment. -error.mbean.j2eeserver.notfound=JOnAS Administration can't execute. The MBean "J2EEServer" is not found. Please check the application environment. - -error.ejb.type.unknown=EJB type unknown:
    • name={0}
    • filename={1}
    -error.deploy.noselect=Before submitting, move a file ! -error.deploy=
    • Deploy error : {0}
      {1}
    -error.deploy.datasource.isloaded=Datasource already loaded ! -error.undeploy=
    • Undeploy error : {0}
      {1}
    -error.undeploy.datasource.dependences=Dependence with {0} -error.undeploy.mailfactory.dependences=Dependence with {0} -error.domain.deploy.noselect=Please select at least one application and at least one target server. -error.remove.noselect=Before removing a file, select a file ! -error.remove=
    • Remove error : {0}
      {1}
    - -error.archiveconfig.valid.fail=Validation Failed:
    • {0}
    -error.archiveconfig.load.fail=Cannot edit {0}, the file is not present in the archive. - -warning.jonas.service.database.notActivated=
  • Database Service not activated !
  • -warning.jonas.service.jms.notActivated=
  • JMS Service not activated !
  • -warning.jonas.service.mail.notActivated=
  • Mail Service not activated !
  • - - -# -------------------------------------------------------- - -treenode.joramplatform=Joram platform -treenode.joramplatform.joramlocalserver=Local server -treenode.joramplatform.joramcurrentserver=Current server -treenode.joramplatform.queue=Queue -treenode.joramplatform.topic=Topic -treenode.joramplatform.joramremoteserver=Remote server - -tab.joramplatform=Platform configuration -tab.joramservers=Servers -tab.joramxml=a3servers.xml -tab.joramadapter=Resource Adapter configuration -tab.joramservers=Joram servers -label.joramplatform.release=Implementation version -label.joramplatform.configuration=Configuration -tab.joramplatform.joramlocalserver=Server Id -tab.joramplatform.joramlocaldestinations=Local JMS destinations -tab.joramplatform.joramcurrentdestinations=JMS destinations -tab.joramplatform.joramdestinations=JMS destinations -tab.joramplatform.joramlocalusers=Local JMS users -tab.joramplatform.joramcurrentusers=JMS users -tab.joramplatform.joramusers=JMS users -#tab.joramplatform.joramaftercreate=List -tab.joramplatform.joramaftercreate=JMS destinations -#tab.joramplatform.joramlocalaftercreate=List local -tab.joramplatform.joramlocalaftercreate=Local JMS destinations -tab.joramplatform.joramlocalqueues=Local Queues -tab.joramplatform.joramlocaltopics=Local Topics -tab.joramplatform.joramremotedestinations=Remote JMS destinations -label.joramplatform.joramlocalserver.serverId=Server Id -label.joramplatform.joramlocalserver.host=Host name -label.joramplatform.joramlocalserver.port=Server port -tab.joramplatform.joramremoteserver=Remote server -label.joramplatform.joramremoteserver.serverId=Server identifier -tab.joramplatform.joramlocalserver.destination=Destination properties -label.joramplatform.joramserver.serverId=Server Id -label.joramplatform.joramserver.serverDmq=Default DMQ -label.joramplatform.joramserver.serverThreshold=Default Threshold -tab.joramplatform.queue= queue -tab.joramplatform.topic= topic -label.joramadmin.destination.id=Agent identifier -label.joramadmin.destination.name=Name -label.joramadmin.destination.creationDate=Creation date -label.joramadmin.destination.dmq=Dead Message Queue -label.joramadmin.destination.readable=Freely Readable -label.joramadmin.destination.writeable=Freely Writeable -label.joramadmin.destination.reader.list=Readers -label.joramadmin.destination.writer.list=Writers -label.joramadmin.queue.message.ids=Message Ids -label.joramadmin.queue.message.nbmax=Max number of messages -label.joramadmin.queue.nbmax.notset=Not set -label.joramadmin.queue.pending.messages=Pending messages -label.joramadmin.queue.pending.requests=Pending consumers -label.joramadmin.queue.threshold=Threshold for DMQ -label.joramadmin.queue.dmq.notset=Not set -label.joramadmin.topic.dmq.notset=Not set -label.joramadmin.topic.subscriptions=Number of subscribers -label.joramadmin.topic.subscriberIds=Subscribers Ids -label.joramadmin.topic.subscribers=Subscribers -title.joramplatform.currentserver=Current Joram server configuration -title.joramplatform.timers=Joram timers -title.joramplatform.dmq=Dead Message Queue (DMQ) -title.joramservers.localserver=Local server -title.joramservers.currentserver=Current server -title.joramservers.remoteservers=Remote servers -title.joramplatform.config=Configuration file (a3servers.xml) -message.remoteservers.none=none -message.remoteservers.server=Remote server -action.title.joramplatform.export=Action -action.title.joramplatform.joramremoteserver=Action -action.button.joramplatform.export=Export -action.comment.joramplatform.export=Export Joram server repository to JONAS_BASE/conf/joramAdminExport.xml -action.button.joramplatform.reload=Reload -action.comment.joramplatform.reload=Reload JoramAdmin.xml file -action.button.joramplatform.joramremoteserver.getdestinations=Get destinations -action.comment.joramplatform.joramremoteserver.getdestinations=Lists the destinations deployed on this remote server -title.joramdestinations.action=Actions -title.joramusers.action=Actions -title.joramreaders.action=Actions -title.joramwriters.action=Actions -button.joramdestinations.action.create=Create Jms destination -button.joramdestinations.action.remove=Remove Jms destination -button.joramusers.action.create=Create Jms user -button.joramreaders.action.add=Add reader -button.joramwriters.action.add=Add writer - -message.joramdestinations.none=No Jms destinations found ! -message.joramusers.none=No Jms users found ! -message.joramreaders=No reader found ! -message.joramwriters=No writer found ! -message.joramplatform.destinations.list.empty=No destinations selected - -tab.joramplatform.joramdestination.create=New destination -tab.joramplatform.joramuser.create=New user -tab.joramplatform.joramreader.add=Add reader -tab.joramplatform.joramwriter.add=Add writer -title.joramplatform.destination=Jms destination to create -title.joramplatform.reader=Jms user -title.joramplatform.writer=Jms user -title.joramplatform.destination=Jms destination to create -title.joramplatform.user=Jms user to create -label.joramplatform.destination.name=Name -label.joramplatform.destination.type=Type -label.joramplatform.destination.id=Id -label.joramplatform.user.name=Name -label.joramplatform.user.id=Id -label.joramplatform.destinations.topic=topic -label.joramplatform.destinations.queue=queue -label.joramplatform.destination.stat.nbmsgs.received=Number of messages received since creation -label.joramplatform.destination.stat.nbmsgs.senttodmq=Number of messages sent to the DMQ since creation -label.joramplatform.destination.stat.nbmsgs.delivered=Number of messages delivered since creation - -label.joramplatform.user.name=Name -label.joramplatform.user.password=Password -label.joramplatform.user.id=Id -comment.joramplatform.destination.name= -comment.joramplatform.user.name= -comment.joramplatform.user.id= -tab.joramplatform.topic.usedby=Used by -tab.joramplatform.queue.usedby=Used by -tab.joramplatform.dest.stat= statistics -tab.joramplatform.dest.readers= readers -tab.joramplatform.dest.writers= writers -tab.joramplatform.removedestinations.confirm=Confirm remove -tab.joramplatform.removeusers.confirm=Confirm remove -title.joramplatform.topic.usedby.ejb=Ejb -title.joramplatform.queue.usedby.ejb=Ejb -title.joramplatform.topic.usedby.type=Type -title.joramplatform.queue.usedby.type=Type -title.joramplatform.topic.usedby.container=Container -title.joramplatform.queue.usedby.container=Container - -label.joramadapter.collocated=Collocated server -label.joramadapter.config.dir=Configuration directory -label.joramadapter.admin.file=Administration tasks file -label.joramadaper.persistent=Persistent server -label.joramadapter.server.id=Server Id -label.joramadapter.server.name=Server name -label.joramadapter.host.name=Host name -label.joramadapter.server.port=Server port -label.joramadapter.cnx.pending.timer=Connection pending timer -comment.joramadapter.cnx.pending.timer=Heartbeat period in milliseconds of a connected client (O value means no heartbeat sent and no timer armed on the server) -label.joramadapter.connecting.timer=Connecting timer -comment.joramadapter.connecting.timer=Maximum time in seconds during which connecting is attempted (O value means connecting only once and aborting if connecting failed) -label.joramadapter.tx.pending.timer=Transacted session maximum idleness -comment.joramadapter.tx.pending.timer=Maximum time in seconds a JMS transacted session might be pending (0 value means no limit) -label.joramadmin.timeout=Timeout to abort request -comment.joramadmin.timeout=Timeout in milliseconds to abort a pending request -label.joramadmin.default.dmq=Default DMQ -label.joramadmin.default.threshold=Default threshold for DMQ -label.joramadmin.dmq.notset=Not set -# ------------------------------------------------------------------ -warning.jonas.jms.notActivated=
  • Neither JMS Service, nor Joram server activated !
  • - -# JONAS_MQ_MARK BEGIN -# ------------------------------------------------------------------ -# Messages added for JonasMqConnect -# ------------------------------------------------------------------ -treenode.joansmqconnect.name=Jonas MQ Connect -tab.jonasmqconnect.server=Jonas MQ Connector -tab.jonasmqconnect.servers=Jonas MQ Connectors -tab.jonasmqconnect.destinations=Destinations -tab.jonasmqconnect.mdbs=Mdbs -tab.jonasmqconnect.createdestination=Create destinations -tab.jonasmqconnect.editdestination=Destination - -tab.jonasmqconnect.editmdb=Mdb - -tab.jonasmqconnect.deletedestination=Delete destinations -tab.jonasmqconnect.connectionfactory=Connection Factory -title.joansmqconnect.server=Jonas MQ Connector properties -title.joansmqconnect.servers=Jonas MQ Connectors -title.joansmqconnect.connectionfactory=Connection Factories -title.joansmqconnect.destinations=Destinations -title.joansmqconnect.action=Action -title.joansmqconnect.propetriesdestination=Properties of destination -title.joansmqconnect.propetriesmdb=Properties of MDB -title.joansmqconnect.statpropetriesdestination=Stat. Properties of destination -title.joansmqconnect.createdestination=Jms destination to create -label.joansmqconnect.release=Implementation version -label.joansmqconnect.hostname=Hostname -label.joansmqconnect.channel=Channel -label.joansmqconnect.port=Port -label.joansmqconnect.queuemanager=Queue Manager -label.joansmqconnect.transporttype=TransportType -label.joansmqconnect.server.name=Name -label.joansmqconnect.destination.name=Name -label.joansmqconnect.destination.type=Type -label.joansmqconnect.destination.basename=Base name -label.joansmqconnect.destination.name=Name -label.joansmqconnect.destination.proprieties=Proprieties -label.joansmqconnect.destination.type=Type -label.joansmqconnect.destination.currentdepth=Messages in the queue -label.joansmqconnect.destination.maxqueuedepth=Max messages in the queue -label.joansmqconnect.destination.inputcount=Processus listening on the queue -label.joansmqconnect.destination.outputcount=Processus sending to the queue -label.joansmqconnect.destinations.topic=topic -label.joansmqconnect.destinations.queue=queue -label.joansmqconnect.destinations.deletephysicaldestination=Delete physical destination -label.joansmqconnect.destinations.deletephysicaldestination.yes=Yes -label.joansmqconnect.destinations.deletephysicaldestination.no=No -label.joansmqconnect.mdb.name=Name -label.joansmqconnect.mdb.destinationname=MQ Destination -label.joansmqconnect.mdb.numbermsg=# Received Messages -label.joansmqconnect.connectionfactory.cf=Connection Factory (CF) -label.joansmqconnect.connectionfactory.tcf=Topic Connection Factory (TCF) -label.joansmqconnect.connectionfactory.qcf=Queue Connection Factory (QCF) -button.joansmqconnect.savedestinationconfig=Save Destination Config -button.joansmqconnect.loaddestinationconfig=Load Destination Config -button.joansmqconnect.refresh=Refresh -button.joansmqconnect.editconnectorproperties=Edit Properties -button.joansmqconnect.createdestination=Create Jms destination -button.joansmqconnect.removedestination=Remove Jms destination -button.joansmqconnect.editdestination=Edit -button.joansmqconnect.editconnectionfactory=Edit -button.joansmqconnect.clearqueue=Clear Queue -message.joansmqconnect.server.none=No Connector found ! -message.joansmqconnect.none=No Jms destinations found ! -message.joansmqconnect.destinations.list.empty=No destinations selected -error.joansmqconnect.resource.jms.create.name.required=
  • Name cannot be empty
  • -error.joansmqconnect.resource.jms.create.type.required=
  • Destination type must be checked
  • -error.joansmqconnect.resource.jms.create.selecteddestinations.empty=
  • At least one destination must be checked
  • -error.joansmqconnect.resource.jms.create.deletephysicaldestination.empty=
  • Delete physical destination must be checked
  • -comment.joansmqconnect.destination.name= -comment.joansmqconnect.destination.proprieties= -# JONAS_MQ_MARK END - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/resources/org/ow2/jonas/webapp/jonasadmin/ApplicationResources_fr.properties b/jonas/modules/ee-components/jonas-admin/src/main/resources/org/ow2/jonas/webapp/jonasadmin/ApplicationResources_fr.properties deleted file mode 100644 index 22db64ab79129ad625ef83be0a3a386173707937..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/resources/org/ow2/jonas/webapp/jonasadmin/ApplicationResources_fr.properties +++ /dev/null @@ -1,18 +0,0 @@ -title.application=JOnAS Administration -title.welcome=Bienvenue - -tab.server.jonas=JOnAS -label.server.jonas.jonasName=Nom du serveur -action.button.server.jonas.rungc=Lancer -action.comment.server.jonas.rungc=Lancer le 'garbage collector' -action.button.server.jonas.stop=Stop -action.comment.server.jonas.stop=Arrêter le serveur JOnAS - - -tab.mbean.properties=Propriétés -tab.mbean.attributes=Attributs -tab.mbean.operations=Opérations - -default.ejb.type.session.sessionTimeOut=pas de limite -default.ejb.type.session.instanceMaxSizePool=pas de limite - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/resources/org/ow2/jonas/webapp/jonasadmin/resourceadapter/jonas-ra-xml.vm b/jonas/modules/ee-components/jonas-admin/src/main/resources/org/ow2/jonas/webapp/jonasadmin/resourceadapter/jonas-ra-xml.vm deleted file mode 100644 index f283c17745eacd0443c0bb3816be2781d2cae6b2..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/resources/org/ow2/jonas/webapp/jonasadmin/resourceadapter/jonas-ra-xml.vm +++ /dev/null @@ -1,57 +0,0 @@ - - - $oForm.getJndiName() - JOnASJDBC_DM - $oForm.getNativeLib() - $oForm.getLogEnabled() - $oForm.getLogTopic() - - $oForm.getPoolInit() - $oForm.getPoolMin() - $oForm.getPoolMax() - $oForm.getPoolMaxAge() - $oForm.getPstmtMax() - $oForm.getPoolMaxOpenTime() - $oForm.getPoolMaxWaiters() - $oForm.getPoolMaxWaittime() - $oForm.getPoolSamplingPeriod() - - - $oForm.getCheckLevel() - - - dsClass - $oForm.getDsClass() - - - URL - j$oForm.getURL() - - - user - $oForm.getUser() - - - password - $oForm.getPassword() - - - loginTimeout - $oForm.getLoginTimeout() - - - isolationLevel - $oForm.getIsolationLevel() - - - mapperName - $oForm.getMapperName() - - - logTopic - $oForm.getConfigLogTopic() - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/resources/org/ow2/jonas/webapp/jonasadmin/resourceadapter/ra-xml.vm b/jonas/modules/ee-components/jonas-admin/src/main/resources/org/ow2/jonas/webapp/jonasadmin/resourceadapter/ra-xml.vm deleted file mode 100644 index a810aa4585093d8306c9627ba2f8dbeca5cdd89f..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/resources/org/ow2/jonas/webapp/jonasadmin/resourceadapter/ra-xml.vm +++ /dev/null @@ -1,13 +0,0 @@ - - -$oForm.getDisplayName() -$oForm.getDescription() -$oForm.getVendorName() -$oForm.getSpecVersion() -$oForm.getEisType() - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/TestFont.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/TestFont.jsp deleted file mode 100644 index 9f1883507107978ae30f7ea183ef574467c9fd36..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/TestFont.jsp +++ /dev/null @@ -1,216 +0,0 @@ - - -TestFont - - -<% -String sText= "abcdefABCDEF"; -String sPrefTextSize = "TextSize"; -String[] asTextSize = {"larger", "smaller", "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large"}; - -String sPrefPxSize = "PxSize"; -String[] asPxSize = {"1px", "4px", "6px", "8px", "10px", "12px", "14px", "16px", "20px", "24px"}; - -String sPrefEmSize = "EmSize"; -String[] asEmSizeTitle = {"01em", "02em", "04em", "05em", "06em", "07em", "08em", "09em", "1em", "11em", "12em", "14em", "16em", "18em", "2em"}; -String[] asEmSize = {"0.1em", "0.2em", "0.4em", "0.5em", "0.6em", "0.7em", "0.8em", "0.9em", "1em", "1.1em", "1.2em", "1.4em", "1.6em", "1.8em", "2em"}; - -String sPrefPcSize = "PcSize"; -//String[] asPcSizeTitle = {"1", "10", "30", "50", "70", "80", "90", "100", "110", "120", "130", "140", "150", "160", "180", "200", "220", "240"}; -//String[] asPcSize = {"1%", "10%", "30%", "50%", "70%", "80%", "90%", "100%", "110%", "120%", "130%", "140%", "150%", "160%", "180%", "200%", "220%", "240%"}; -int iMax=260; -int iMin=10; -int iGap=5; -int iInter= (iMax - iMin) / iGap; -String[] asPcSizeTitle = new String[iInter]; -String[] asPcSize = new String[iInter]; -int iValue; -for (int i=0; i < iInter; i++) -{ - iValue = iMin + (i * iGap); - asPcSizeTitle[i] = String.valueOf(iValue); - asPcSize[i] = String.valueOf(iValue)+"%"; -} - -%> - - - - - -

    Test Font

    - - - - - - - - - - -<% -// Text -for (iRow=0; iRow < asTextSize.length; iRow++) -{ -%> - - - - - -<% -} -%> -
    Constant font
     normalbold
    <%=asTextSize[iRow]%><%=sText%><%=sText%>
    - - - - - - - - - - -<% -// Pixel -for (iRow=0; iRow < asPxSize.length; iRow++) -{ -%> - - - - - -<% -} -%> -
    Pixel font
     normalbold
    <%=asPxSize[iRow]%><%=sText%><%=sText%>
    - - - - - - - - - - -<% -// EM -for (iRow=0; iRow < asEmSize.length; iRow++) -{ -%> - - - - - -<% -} -%> -
    EM font
     normalbold
    <%=asEmSize[iRow]%><%=sText%><%=sText%>
    - - - - - - - - - - -<% -// Pourcent -for (iRow=0; iRow < asPcSize.length; iRow++) -{ -%> - - - - - -<% -} -%> -
    Pourcent font
     normalbold
    <%=asPcSize[iRow]%><%=sText%><%=sText%>
    - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/TestNavigator.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/TestNavigator.jsp deleted file mode 100644 index 89c02fe152a44cb32f8dfaeff93868b57c861e64..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/TestNavigator.jsp +++ /dev/null @@ -1,51 +0,0 @@ -<%@ page import="javax.servlet.http.*,java.util.*"%> - - - - -TestNavigator - - - -

    Test Navigator

    -<% -String sUserAgent = request.getHeader("user-agent"); -%> -
    -

    Request info

    -Server name : <%=request.getServerName()%>
    -Server port : <%=request.getServerPort()%>
    -Scheme : <%=request.getScheme()%>
    -Protocol : <%=request.getProtocol()%>
    -Query string : <%=request.getQueryString()%>
    -Remote address : <%=request.getRemoteAddr()%>
    -Remote host : <%=request.getRemoteHost()%>
    -Remote user : <%=request.getRemoteUser()%>
    -Request URI : <%=request.getRequestURI()%>
    -Context path : <%=request.getContextPath()%>
    -Servlet path : <%=request.getServletPath()%>
    -Path info : <%=request.getPathInfo()%>
    -Path translated : <%=request.getPathTranslated()%>
    -
    -

    User Agent

    -<%=sUserAgent%> -
    - - - -<% -String sName = null; -String sValue = null; -Enumeration oEnum = request.getHeaderNames(); -while (oEnum.hasMoreElements()) -{ - sName = (String) oEnum.nextElement(); - sValue = request.getHeader(sName); -%> - -<% -} -%> -
    Header
    NameValue
    <%=sName%><%=sValue%>
    - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/controls.tld b/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/controls.tld deleted file mode 100644 index 0aa6674c2ab57c38d5ef648d1817bca0813dbd52..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/controls.tld +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - 1.0 - 1.2 - controls - - JSP tag library containing custom GUI controls used in the - Tomcat Administrative Application. - - - - - - - - tree - org.ow2.jonas.webapp.taglib.TreeControlRenderTag - empty - - Render a "tree" control, based on the current state of a data object - of type org.apache.webapp.admin.TreeControl, which is identified - by the name specified in the "tree" attribute, in the JSP scope - specified by the "scope" attribute. - - - - action - false - true - - Hyperlink to which expand/contract actions should be sent, - with a string "${node}" marking where the node name of the - affected node should be included (which will usually be as - the value of a request parameter). - - - - - images - false - true - - Name of a directory containing the images for our icons, - relative to the page including this tag. If not specified, - defaults to "images". - - - - - scope - false - true - - The JSP scope within which the "tree" attribute is to be found - (page, request, session, or application). If not specified, the - "tree" attribute will be searched for in any scope. - - - - - style - false - true - - The CSS style class to be applied to the entire rendered output - of the tree control. If not specified, no overall style class - is applied. - - - - - styleSelected - false - true - - The CSS style class to be applied to the text of any node that - is currently selected. If not specified, no style class will be - applied to the text of the selected node. - - - - - styleUnselected - false - true - - The CSS style class to be applied to the text of any node that - is *not* currently selected. If not specified, no style class will - be applied to the text of non-selected nodes. - - - - - tree - false - true - - Name of the attribute (in the scope specified by the "scope" - attribute, if any) under which an object of type - org.apache.webapp.admin.TreeControl is stored. This object - represents the entire current state of the tree, including - a representation of the hierarchical representation of the - nodes, plus the current expanded/ or contracted state of - non-leaf nodes. - - - - - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/flex/services-config.xml b/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/flex/services-config.xml deleted file mode 100755 index d84d8c559a44d2de2845c6dba9216a55dd8d21f8..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/flex/services-config.xml +++ /dev/null @@ -1,293 +0,0 @@ - - - - - - - - - - - - - - session - org.ow2.jonas.domain.TreeDomain - - - - - - - - - org.ow2.jonas.server.ServerInformation - session - - - - - - - - - org.ow2.jonas.servers.Servers - session - - - - - - - - - org.ow2.jonas.clusters.Clusters - session - - - - - - - - org.ow2.jonas.clusters.Cluster - session - - - - - - - - - - org.ow2.jonas.domain.DomainMap - session - - - - - - - - - org.ow2.jonas.server.ServerMonitoring - session - - - - - - - - - org.ow2.jonas.clusters.ServersInCluster - session - - - - - - - - - org.ow2.jonas.domain.DomainSyntheticView - session - - - - - - - - - org.ow2.jonas.clusters.ClusterSyntheticView - session - - - - - - - - - org.ow2.jonas.stackdump.StackDump - session - - - - - - - - - - org.ow2.jonas.clusterdaemons.ClusterDaemonAdministration - session - - - - - - - - - session - org.ow2.jasmine.kerneos.login.LoginService - - - - - - - - - session - org.ow2.jasmine.kerneos.service.KerneosConfigService - - - - - - - - - - session - org.ow2.jonas.admin.jdbcconnections.service.JDBCConnectionsService - - - - - - - - - session - org.ow2.jonas.admin.auditconsole.service.AuditService - - - - - - - - - - session - org.ow2.jonas.admin.classloader.service.ClassLoaderService - - - - - - - - - session - org.ow2.jonas.admin.osgi.bundle.osgiBundleService - - - - - - - - - session - org.ow2.jonas.admin.osgi.obr.osgiOBRService - - - - - - - - - session - org.ow2.jonas.admin.osgi.service.osgiServiceService - - - - - - - - - session - org.ow2.jonas.admin.osgi.shell.osgiShellService - - - - - - - - - - session - org.ow2.jonas.admin.autostart.service.BuilderService - - - - - - - - - session - org.ow2.easybeans.console.jmxbrowser.service.JMXBrowserService - - - - - - - - - - - - - - - - - - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/granite/granite-config.xml b/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/granite/granite-config.xml deleted file mode 100755 index 60752d4575ae5833b53767812a89e44f98e09183..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/granite/granite-config.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/jonas-web.xml b/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/jonas-web.xml deleted file mode 100644 index 77895ba766cbc6efcbb514b3c1bc326028f89be0..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/jonas-web.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - jonasAdmin - - - true - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/sj.tld b/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/sj.tld deleted file mode 100644 index 14492e28c0cf9e9b6618e7d81c05bfac3c0b8dd2..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/sj.tld +++ /dev/null @@ -1,1262 +0,0 @@ - - - - - - - - 1.0 - 1.2 - sj - - JSP tag library containing custom GUI controls used in the - Jonas Administrative Application. - - - - - - - tabs - org.ow2.jonas.webapp.taglib.TabsTag - JSP - - Render a "tabs" object. - NOTE: The valid nested content for this tag is "tab" and "panel" tags and from this library. - - - - width - false - true - - The width of panel tabs. - - - - - height - false - true - - The height of panel tabs. - - - - - widthTab - false - true - - The width of each tabs. - If it's not specified, the width label text is used. - - - - - heightTab - false - true - - The height of each tabs. - If it's not specified, the height label text is used. - - - - - widthSeparator - false - true - - The space width between each tabs. - By default, 3. - - - - - heightSeparator - false - true - - The space height between tabs and panel. - By default, 1. - - - - - marginPanel - false - true - - The margin of panel. - By default, 5. - - - - - usingWhere - false - true - - Using a WhereAreYou instance in session to retreive some parameters. - - - - - imagesDir - false - true - - The directory where are the images. - Used to find the separator image. - - - - - - - - - tab - org.ow2.jonas.webapp.taglib.TabTag - JSP - - - - - href - false - true - - The href element for the tab. - - - - - forward - false - true - - The forward element for the tab. - - - - - forwardControl - false - true - - The forwardControl element to display the tab. - Note : it's necessary that the treeControl attribute of the parent tabs element exists - and the forwardControl's value is known in the "struts-config.xml" file. - - - - - selected - false - true - - The selected tab. - If none selected tab, the first tab is displayed. - If many selected tabs, the first selected tab is displayed. - - - - anchorfalsetrue - linkNamefalsetrue - namefalsetrue - pagefalsetrue - paramIdfalsetrue - paramNamefalsetrue - paramPropertyfalsetrue - paramScopefalsetrue - propertyfalsetrue - scopefalsetrue - targetfalsetrue - transactionfalsetrue - - - - - - - panel - org.ow2.jonas.webapp.taglib.PanelTag - JSP - - - - - - - - panelSeparator - org.ow2.jonas.webapp.taglib.PanelSeparatorTag - JSP - - - - - - - - xmlEditor - org.ow2.jonas.webapp.taglib.XMLEditorTag - JSP - - Display a form that will allow the user to edit the contents of an - XML file. - - - - fileName - true - true - - The name of the archive from which the XML file is retrieved. - - - - - mapping - true - true - - The mapping of ID to document node. - - - - - pathName - true - true - - The path within the archive to the XML file. - - - - - document - false - true - org.w3c.dom.Document - - The contents of the XML file. - - - - - - - - - - titleContent - org.ow2.jonas.webapp.taglib.TitleContentTag - JSP - - Render a title. - - - - usingWhere - false - true - - Using a WhereAreYou instance in session to retreive some parameters. - - - - usingParent - false - true - - Display the parent node label. - NOTA : "usingWhere" attribute it's mandatory to use this option. - - - - tomThumb - false - true - - Display the Tom Thumb for the current node. - NOTA : "usingWhere" attribute it's mandatory to use this option. - - - - tomThumbIcons - false - true - - Display the icons associates in the each item of the Tom Thumb. - NOTA : "tomThumb" attribute it's mandatory to use this option. - - - - - image - false - true - - The image to display. - - - - - title - false - true - - The title to display. - - - - - - - - - grid - org.ow2.jonas.webapp.taglib.GridTag - JSP - - Simple HTML Tag "table" with possibility alternate style line - - globalRowStyleClasstrue - oddStyleClasstrue - evenStyleClasstrue - periodRowtrue - bordertrue - cellSpacingtrue - cellPaddingtrue - - aligntrue - valigntrue - widthtrue - heighttrue - - onblurtrue - onchangetrue - onclicktrue - ondblclicktrue - onfocustrue - onkeydowntrue - onkeypresstrue - onkeyuptrue - onmousedowntrue - onmousemovetrue - onmouseouttrue - onmouseovertrue - onmouseuptrue - styletrue - styleClasstrue - - - - - - gridrow - org.ow2.jonas.webapp.taglib.GridRowTag - JSP - - - changeStyletrue - - aligntrue - valigntrue - widthtrue - heighttrue - - onblurtrue - onchangetrue - onclicktrue - ondblclicktrue - onfocustrue - onkeydowntrue - onkeypresstrue - onkeyuptrue - onmousedowntrue - onmousemovetrue - onmouseouttrue - onmouseovertrue - onmouseuptrue - styletrue - styleClasstrue - - - - - - gridcol - org.ow2.jonas.webapp.taglib.GridColTag - JSP - - Idem Html Tag "td" - - - aligntrue - valigntrue - widthtrue - heighttrue - nowrapfalse - colspanfalse - rowspanfalse - - onblurtrue - onchangetrue - onclicktrue - ondblclicktrue - onfocustrue - onkeydowntrue - onkeypresstrue - onkeyuptrue - onmousedowntrue - onmousemovetrue - onmouseouttrue - onmouseovertrue - onmouseuptrue - styletrue - styleClasstrue - - - - - - jonasgrid - org.ow2.jonas.webapp.taglib.JonasGridTag - JSP - - Extends GridTag with default values : - - cellSpacing = "0" - - cellPadding = "2" - - width = "100%" - - globalRowStyleClasstrue - oddStyleClasstrue - evenStyleClasstrue - periodRowtrue - bordertrue - cellSpacingtrue - cellPaddingtrue - - aligntrue - valigntrue - widthtrue - heighttrue - - onblurtrue - onchangetrue - onclicktrue - ondblclicktrue - onfocustrue - onkeydowntrue - onkeypresstrue - onkeyuptrue - onmousedowntrue - onmousemovetrue - onmouseouttrue - onmouseovertrue - onmouseuptrue - styletrue - styleClasstrue - - - - - - jgRowTitle - org.ow2.jonas.webapp.taglib.JonasGridRowTitleTag - JSP - - - leveltrue - changeStyletrue - - aligntrue - valigntrue - widthtrue - heighttrue - - onblurtrue - onchangetrue - onclicktrue - ondblclicktrue - onfocustrue - onkeydowntrue - onkeypresstrue - onkeyuptrue - onmousedowntrue - onmousemovetrue - onmouseouttrue - onmouseovertrue - onmouseuptrue - styletrue - styleClasstrue - - - - - - jgColTitle - org.ow2.jonas.webapp.taglib.JonasGridColTitleTag - JSP - - - - aligntrue - valigntrue - widthtrue - heighttrue - nowrapfalse - - onblurtrue - onchangetrue - onclicktrue - ondblclicktrue - onfocustrue - onkeydowntrue - onkeypresstrue - onkeyuptrue - onmousedowntrue - onmousemovetrue - onmouseouttrue - onmouseovertrue - onmouseuptrue - styletrue - styleClasstrue - - - - - - jgName - org.ow2.jonas.webapp.taglib.JonasGridNameTag - JSP - - Idem Html Tag "td" with : - - align = "right" - - width = "19%" - - valign = "top" - and a new column to space. - - - boldtrue - - aligntrue - valigntrue - widthtrue - heighttrue - - onblurtrue - onchangetrue - onclicktrue - ondblclicktrue - onfocustrue - onkeydowntrue - onkeypresstrue - onkeyuptrue - onmousedowntrue - onmousemovetrue - onmouseouttrue - onmouseovertrue - onmouseuptrue - styletrue - styleClasstrue - - - - jonasgridname - org.ow2.jonas.webapp.taglib.JonasGridNameTag - JSP - - Idem Html Tag "td" with : - - align = "right" - - width = "19%" - - valign = "top" - and a new column to space. - - - boldtrue - - aligntrue - valigntrue - widthtrue - heighttrue - - onblurtrue - onchangetrue - onclicktrue - ondblclicktrue - onfocustrue - onkeydowntrue - onkeypresstrue - onkeyuptrue - onmousedowntrue - onmousemovetrue - onmouseouttrue - onmouseovertrue - onmouseuptrue - styletrue - styleClasstrue - - - - - - jgNameTitle - org.ow2.jonas.webapp.taglib.JonasGridNameTitleTag - JSP - - - - boldtrue - - aligntrue - valigntrue - widthtrue - heighttrue - - onblurtrue - onchangetrue - onclicktrue - ondblclicktrue - onfocustrue - onkeydowntrue - onkeypresstrue - onkeyuptrue - onmousedowntrue - onmousemovetrue - onmouseouttrue - onmouseovertrue - onmouseuptrue - styletrue - styleClasstrue - - - - - jgValue - org.ow2.jonas.webapp.taglib.JonasGridValueTag - JSP - - Idem Html Tag "td" with : - - align = "left" - - width = "80%" - - - aligntrue - valigntrue - widthtrue - heighttrue - - onblurtrue - onchangetrue - onclicktrue - ondblclicktrue - onfocustrue - onkeydowntrue - onkeypresstrue - onkeyuptrue - onmousedowntrue - onmousemovetrue - onmouseouttrue - onmouseovertrue - onmouseuptrue - styletrue - styleClasstrue - - - - jonasgridvalue - org.ow2.jonas.webapp.taglib.JonasGridValueTag - JSP - - Idem Html Tag "td" with : - - align = "left" - - width = "80%" - - - aligntrue - valigntrue - widthtrue - heighttrue - - onblurtrue - onchangetrue - onclicktrue - ondblclicktrue - onfocustrue - onkeydowntrue - onkeypresstrue - onkeyuptrue - onmousedowntrue - onmousemovetrue - onmouseouttrue - onmouseovertrue - onmouseuptrue - styletrue - styleClasstrue - - - - - - jgValueTitle - org.ow2.jonas.webapp.taglib.JonasGridValueTitleTag - JSP - - - - aligntrue - valigntrue - widthtrue - heighttrue - - onblurtrue - onchangetrue - onclicktrue - ondblclicktrue - onfocustrue - onkeydowntrue - onkeypresstrue - onkeyuptrue - onmousedowntrue - onmousemovetrue - onmouseouttrue - onmouseovertrue - onmouseuptrue - styletrue - styleClasstrue - - - - - - jonasbutton - org.ow2.jonas.webapp.taglib.JonasButtonTag - - - disabled - false - true - - - disabledName - false - true - - - disabledProperty - false - true - - - disabledValueEqual - false - true - - - disabledValueNotEqual - false - true - - - - accesskey - false - true - - - anchor - false - true - - - forward - false - true - - -href -false -true - - -linkName -false -true - - -name -false -true - - -onblur -false -true - - -onclick -false -true - - -ondblclick -false -true - - -onfocus -false -true - - -onkeydown -false -true - - -onkeypress -false -true - - -onkeyup -false -true - - -onmousedown -false -true - - -onmousemove -false -true - - -onmouseout -false -true - - -onmouseover -false -true - - -onmouseup -false -true - - -page -false -true - - -paramId -false -true - - -paramName -false -true - - -paramProperty -false -true - - -paramScope -false -true - - -property -false -true - - -scope -false -true - - -style -false -true - - -styleClass -false -true - - -styleId -false -true - - -tabindex -false -true - - -target -false -true - - -title -false -true - - -transaction -false -true - - - - - - - jgSubmit - org.ow2.jonas.webapp.taglib.JonasSubmitTag - - - form - false - true - - - - value - false - true - - - - disabled - false - true - - - - accesskey - false - true - - - anchor - false - true - - - forward - false - true - - -href -false -true - - -linkName -false -true - - -name -false -true - - -onblur -false -true - - -onclick -false -true - - -ondblclick -false -true - - -onfocus -false -true - - -onkeydown -false -true - - -onkeypress -false -true - - -onkeyup -false -true - - -onmousedown -false -true - - -onmousemove -false -true - - -onmouseout -false -true - - -onmouseover -false -true - - -onmouseup -false -true - - -page -false -true - - -paramId -false -true - - -paramName -false -true - - -paramProperty -false -true - - -paramScope -false -true - - -property -false -true - - -scope -false -true - - -style -false -true - - -styleClass -false -true - - -styleId -false -true - - -tabindex -false -true - - -target -false -true - - -title -false -true - - -transaction -false -true - - - - - - - xmlFile - org.ow2.jonas.webapp.taglib.XmlFileTag - JSP - - Render a Xml file. - - - - - - - - - - tree - org.ow2.jonas.webapp.taglib.TreeControlRenderTag - empty - - Render a "tree" control, based on the current state of a data object - of type org.apache.webapp.admin.TreeControl, which is identified - by the name specified in the "tree" attribute, in the JSP scope - specified by the "scope" attribute. - - - - action - false - true - - Hyperlink to which expand/contract actions should be sent, - with a string "${node}" marking where the node name of the - affected node should be included (which will usually be as - the value of a request parameter). - - - - - images - false - true - - Name of a directory containing the images for our icons, - relative to the page including this tag. If not specified, - defaults to "images". - - - - - scope - false - true - - The JSP scope within which the "tree" attribute is to be found - (page, request, session, or application). If not specified, the - "tree" attribute will be searched for in any scope. - - - - - style - false - true - - The CSS style class to be applied to the entire rendered output - of the tree control. If not specified, no overall style class - is applied. - - - - - styleSelected - false - true - - The CSS style class to be applied to the text of any node that - is currently selected. If not specified, no style class will be - applied to the text of the selected node. - - - - - styleUnselected - false - true - - The CSS style class to be applied to the text of any node that - is *not* currently selected. If not specified, no style class will - be applied to the text of non-selected nodes. - - - - - tree - false - true - - Name of the attribute (in the scope specified by the "scope" - attribute, if any) under which an object of type - org.apache.webapp.admin.TreeControl is stored. This object - represents the entire current state of the tree, including - a representation of the hierarchical representation of the - nodes, plus the current expanded/ or contracted state of - non-leaf nodes. - - - - - - - - - - refreshTree - org.ow2.jonas.webapp.taglib.RefreshTreeTag - empty - - Refresh a "tree" control. To use before the body to be sure that run with all browsers. - - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/struts-bean.tld b/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/struts-bean.tld deleted file mode 100644 index a4b8fd7fdf5bff7c2f6ac3e824856ba2d71082d7..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/struts-bean.tld +++ /dev/null @@ -1,382 +0,0 @@ - - - - - - - - - - -1.2 -1.1 -bean -http://struts.apache.org/tags-bean - -cookie -org.apache.struts.taglib.bean.CookieTag -org.apache.struts.taglib.bean.CookieTei -empty - -id -true -false - - -multiple -false -true - - -name -true -true - - -value -false -true - - - -define -org.apache.struts.taglib.bean.DefineTag -org.apache.struts.taglib.bean.DefineTei -JSP - -id -true -false - - -name -false -true - - -property -false -true - - -scope -false -true - - -toScope -false -true - - -type -false -true - - -value -false -true - - - -header -org.apache.struts.taglib.bean.HeaderTag -org.apache.struts.taglib.bean.HeaderTei -empty - -id -true -false - - -multiple -false -true - - -name -true -true - - -value -false -true - - - -include -org.apache.struts.taglib.bean.IncludeTag -org.apache.struts.taglib.bean.IncludeTei -empty - -anchor -false -true - - -forward -false -true - - -href -false -true - - -id -true -false - - -name -false -true - - -page -false -true - - -transaction -false -true - - - -message -org.apache.struts.taglib.bean.MessageTag -empty - -arg0 -false -true - - -arg1 -false -true - - -arg2 -false -true - - -arg3 -false -true - - -arg4 -false -true - - -bundle -false -true - - -key -false -true - - -locale -false -true - - -name -false -true - - -property -false -true - - -scope -false -true - - - -page -org.apache.struts.taglib.bean.PageTag -org.apache.struts.taglib.bean.PageTei -empty - -id -true -false - - -property -true -true - - - -parameter -org.apache.struts.taglib.bean.ParameterTag -org.apache.struts.taglib.bean.ParameterTei -empty - -id -true -false - - -multiple -false -true - - -name -true -true - - -value -false -true - - - -resource -org.apache.struts.taglib.bean.ResourceTag -org.apache.struts.taglib.bean.ResourceTei -empty - -id -true -false - - -input -false -true - - -name -true -true - - - -size -org.apache.struts.taglib.bean.SizeTag -org.apache.struts.taglib.bean.SizeTei -empty - -collection -false -true - - -id -true -false - - -name -false -true - - -property -false -true - - -scope -false -true - - - -struts -org.apache.struts.taglib.bean.StrutsTag -org.apache.struts.taglib.bean.StrutsTei -empty - -id -true -false - - -formBean -false -true - - -forward -false -true - - -mapping -false -true - - - -write -org.apache.struts.taglib.bean.WriteTag -empty - -bundle -false -true - - -filter -false -true - - -format -false -true - - -formatKey -false -true - - -ignore -false -true - - -locale -false -true - - -name -true -true - - -property -false -true - - -scope -false -true - - - - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/struts-config.xml b/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/struts-config.xml deleted file mode 100644 index cbf2a30ea757b4139bc0aac3fe1fa4faf7a66a84..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/struts-config.xml +++ /dev/null @@ -1,2134 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/struts-html.tld b/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/struts-html.tld deleted file mode 100644 index b8be00e3f72694362f8071d331e1905ec9e00bab..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/struts-html.tld +++ /dev/null @@ -1,3032 +0,0 @@ - - - - - - - - - - -1.2 -1.1 -html -http://struts.apache.org/tags-html - -base -org.apache.struts.taglib.html.BaseTag -empty - -target -false -true - - -server -false -true - - - -button -org.apache.struts.taglib.html.ButtonTag - -accesskey -false -true - - -alt -false -true - - -altKey -false -true - - -disabled -false -true - - -indexed -false -true - - -onblur -false -true - - -onchange -false -true - - -onclick -false -true - - -ondblclick -false -true - - -onfocus -false -true - - -onkeydown -false -true - - -onkeypress -false -true - - -onkeyup -false -true - - -onmousedown -false -true - - -onmousemove -false -true - - -onmouseout -false -true - - -onmouseover -false -true - - -onmouseup -false -true - - -property -true -true - - -style -false -true - - -styleClass -false -true - - -styleId -false -true - - -tabindex -false -true - - -title -false -true - - -titleKey -false -true - - -value -false -true - - - -cancel -org.apache.struts.taglib.html.CancelTag - -accesskey -false -true - - -alt -false -true - - -altKey -false -true - - -disabled -false -true - - -onblur -false -true - - -onchange -false -true - - -onclick -false -true - - -ondblclick -false -true - - -onfocus -false -true - - -onkeydown -false -true - - -onkeypress -false -true - - -onkeyup -false -true - - -onmousedown -false -true - - -onmousemove -false -true - - -onmouseout -false -true - - -onmouseover -false -true - - -onmouseup -false -true - - -property -false -true - - -style -false -true - - -styleClass -false -true - - -styleId -false -true - - -tabindex -false -true - - -title -false -true - - -titleKey -false -true - - -value -false -true - - - -checkbox -org.apache.struts.taglib.html.CheckboxTag - -accesskey -false -true - - -alt -false -true - - -altKey -false -true - - -disabled -false -true - - -indexed -false -true - - -name -false -true - - -onblur -false -true - - -onchange -false -true - - -onclick -false -true - - -ondblclick -false -true - - -onfocus -false -true - - -onkeydown -false -true - - -onkeypress -false -true - - -onkeyup -false -true - - -onmousedown -false -true - - -onmousemove -false -true - - -onmouseout -false -true - - -onmouseover -false -true - - -onmouseup -false -true - - -property -true -true - - -style -false -true - - -styleClass -false -true - - -styleId -false -true - - -tabindex -false -true - - -title -false -true - - -titleKey -false -true - - -value -false -true - - - -errors -org.apache.struts.taglib.html.ErrorsTag -empty - -bundle -false -true - - -locale -false -true - - -name -false -true - - -property -false -true - - - -file -org.apache.struts.taglib.html.FileTag - -accesskey -false -true - - -accept -false -true - - -alt -false -true - - -altKey -false -true - - -disabled -false -true - - -indexed -false -true - - -maxlength -false -true - - -name -false -true - - -onblur -false -true - - -onchange -false -true - - -onclick -false -true - - -ondblclick -false -true - - -onfocus -false -true - - -onkeydown -false -true - - -onkeypress -false -true - - -onkeyup -false -true - - -onmousedown -false -true - - -onmousemove -false -true - - -onmouseout -false -true - - -onmouseover -false -true - - -onmouseup -false -true - - -property -true -true - - -size -false -true - - -style -false -true - - -styleClass -false -true - - -styleId -false -true - - -tabindex -false -true - - -title -false -true - - -titleKey -false -true - - -value -false -true - - - -form -org.apache.struts.taglib.html.FormTag -JSP - -action -true -true - - -acceptCharset -false -true - - -enctype -false -true - - -focus -false -true - - -focusIndex -false -true - - -method -false -true - - -onreset -false -true - - -onsubmit -false -true - - -scriptLanguage -false -true - - -style -false -true - - -styleClass -false -true - - -styleId -false -true - - -target -false -true - - - -frame -org.apache.struts.taglib.html.FrameTag - -action -false -true - - -module -false -true - - -anchor -false -true - - -forward -false -true - - -frameborder -false -true - - -frameName -false -true - - -href -false -true - - -longdesc -false -true - - -marginheight -false -true - - -marginwidth -false -true - - -name -false -true - - -noresize -false -true - - -page -false -true - - -paramId -false -true - - -paramName -false -true - - -paramProperty -false -true - - -paramScope -false -true - - -property -false -true - - -scope -false -true - - -scrolling -false -true - - -style -false -true - - -styleClass -false -true - - -styleId -false -true - - -title -false -true - - -titleKey -false -true - - -transaction -false -true - - - -hidden -org.apache.struts.taglib.html.HiddenTag -empty - -accesskey -false -true - - -alt -false -true - - -altKey -false -true - - -disabled -false -true - - -indexed -false -true - - -name -false -true - - -onblur -false -true - - -onchange -false -true - - -onclick -false -true - - -ondblclick -false -true - - -onfocus -false -true - - -onkeydown -false -true - - -onkeypress -false -true - - -onkeyup -false -true - - -onmousedown -false -true - - -onmousemove -false -true - - -onmouseout -false -true - - -onmouseover -false -true - - -onmouseup -false -true - - -property -true -true - - -style -false -true - - -styleClass -false -true - - -styleId -false -true - - -title -false -true - - -titleKey -false -true - - -value -false -true - - -write -false -true - - - -html -org.apache.struts.taglib.html.HtmlTag -JSP - -lang -false -true - - -locale -false -true - - -xhtml -false -true - - - -image -org.apache.struts.taglib.html.ImageTag - -accesskey -false -true - - -align -false -true - - -alt -false -true - - -altKey -false -true - - -border -false -true - - -bundle -false -true - - -disabled -false -true - - -indexed -false -true - - -locale -false -true - - -onblur -false -true - - -onchange -false -true - - -onclick -false -true - - -ondblclick -false -true - - -onfocus -false -true - - -onkeydown -false -true - - -onkeypress -false -true - - -onkeyup -false -true - - -onmousedown -false -true - - -onmousemove -false -true - - -onmouseout -false -true - - -onmouseover -false -true - - -onmouseup -false -true - - -page -false -true - - -pageKey -false -true - - -property -false -true - - -src -false -true - - -srcKey -false -true - - -style -false -true - - -styleClass -false -true - - -styleId -false -true - - -tabindex -false -true - - -title -false -true - - -titleKey -false -true - - -value -false -true - - - -img -org.apache.struts.taglib.html.ImgTag -empty - -align -false -true - - -alt -false -true - - -altKey -false -true - - -border -false -true - - -bundle -false -true - - -contextRelative -false -true - - -height -false -true - - -hspace -false -true - - -imageName -false -true - - -ismap -false -true - - -locale -false -true - - -lowsrc -false -true - - -name -false -true - - -onclick -false -true - - -ondblclick -false -true - - -onkeydown -false -true - - -onkeypress -false -true - - -onkeyup -false -true - - -onmousedown -false -true - - -onmousemove -false -true - - -onmouseout -false -true - - -onmouseover -false -true - - -onmouseup -false -true - - -paramId -false -true - - -page -false -true - - -pageKey -false -true - - -action -false -true - - -module -false -true - - -paramName -false -true - - -paramProperty -false -true - - -paramScope -false -true - - -property -false -true - - -scope -false -true - - -src -false -true - - -srcKey -false -true - - -style -false -true - - -styleClass -false -true - - -styleId -false -true - - -title -false -true - - -titleKey -false -true - - -useLocalEncoding -false -true - - -usemap -false -true - - -vspace -false -true - - -width -false -true - - - -javascript -org.apache.struts.taglib.html.JavascriptValidatorTag -empty - -cdata -false -true - - -dynamicJavascript -false -false - - -formName -false -true - - -method -false -true - - -page -false -true - - -scriptLanguage -false -true - - -src -false -true - - -staticJavascript -false -false - - -htmlComment -false -true - - - -link -org.apache.struts.taglib.html.LinkTag - -accesskey -false -true - - -action -false -true - - -module -false -true - - -anchor -false -true - - -forward -false -true - - -href -false -true - - -indexed -false -true - - -indexId -false -true - - -linkName -false -true - - -name -false -true - - -onblur -false -true - - -onclick -false -true - - -ondblclick -false -true - - -onfocus -false -true - - -onkeydown -false -true - - -onkeypress -false -true - - -onkeyup -false -true - - -onmousedown -false -true - - -onmousemove -false -true - - -onmouseout -false -true - - -onmouseover -false -true - - -onmouseup -false -true - - -page -false -true - - -paramId -false -true - - -paramName -false -true - - -paramProperty -false -true - - -paramScope -false -true - - -property -false -true - - -scope -false -true - - -style -false -true - - -styleClass -false -true - - -styleId -false -true - - -tabindex -false -true - - -target -false -true - - -title -false -true - - -titleKey -false -true - - -transaction -false -true - - -useLocalEncoding -false -true - - - -messages -org.apache.struts.taglib.html.MessagesTag -org.apache.struts.taglib.html.MessagesTei -JSP - -id -true -false - - -bundle -false -true - - -locale -false -true - - -name -false -true - - -property -false -true - - -header -false -true - - -footer -false -true - - -message -false -true - - - -multibox -org.apache.struts.taglib.html.MultiboxTag - -accesskey -false -true - - -alt -false -true - - -altKey -false -true - - -disabled -false -true - - -name -false -true - - -onblur -false -true - - -onchange -false -true - - -onclick -false -true - - -ondblclick -false -true - - -onfocus -false -true - - -onkeydown -false -true - - -onkeypress -false -true - - -onkeyup -false -true - - -onmousedown -false -true - - -onmousemove -false -true - - -onmouseout -false -true - - -onmouseover -false -true - - -onmouseup -false -true - - -property -true -true - - -style -false -true - - -styleClass -false -true - - -styleId -false -true - - -tabindex -false -true - - -title -false -true - - -titleKey -false -true - - -value -false -true - - - -option -org.apache.struts.taglib.html.OptionTag - -bundle -false -true - - -disabled -false -true - - -key -false -true - - -locale -false -true - - -style -false -true - - -styleId -false -true - - -styleClass -false -true - - -value -true -true - - - -options -org.apache.struts.taglib.html.OptionsTag -empty - -collection -false -true - - -filter -false -true - - -labelName -false -true - - -labelProperty -false -true - - -name -false -true - - -property -false -true - - -style -false -true - - -styleClass -false -true - - - -optionsCollection -org.apache.struts.taglib.html.OptionsCollectionTag -empty - -filter -false -true - - -label -false -true - - -name -false -true - - -property -false -true - - -style -false -true - - -styleClass -false -true - - -value -false -true - - - -password -org.apache.struts.taglib.html.PasswordTag - -accesskey -false -true - - -alt -false -true - - -altKey -false -true - - -disabled -false -true - - -indexed -false -true - - -maxlength -false -true - - -name -false -true - - -onblur -false -true - - -onchange -false -true - - -onclick -false -true - - -ondblclick -false -true - - -onfocus -false -true - - -onkeydown -false -true - - -onkeypress -false -true - - -onkeyup -false -true - - -onmousedown -false -true - - -onmousemove -false -true - - -onmouseout -false -true - - -onmouseover -false -true - - -onmouseup -false -true - - -property -true -true - - -readonly -false -true - - -redisplay -false -true - - -style -false -true - - -styleClass -false -true - - -styleId -false -true - - -size -false -true - - -tabindex -false -true - - -title -false -true - - -titleKey -false -true - - -value -false -true - - - -radio -org.apache.struts.taglib.html.RadioTag - -accesskey -false -true - - -alt -false -true - - -altKey -false -true - - -disabled -false -true - - -indexed -false -true - - -name -false -true - - -onblur -false -true - - -onchange -false -true - - -onclick -false -true - - -ondblclick -false -true - - -onfocus -false -true - - -onkeydown -false -true - - -onkeypress -false -true - - -onkeyup -false -true - - -property -true -true - - -onmousedown -false -true - - -onmousemove -false -true - - -onmouseout -false -true - - -onmouseover -false -true - - -onmouseup -false -true - - -style -false -true - - -styleClass -false -true - - -styleId -false -true - - -tabindex -false -true - - -title -false -true - - -titleKey -false -true - - -value -true -true - - -idName -false -true - - - -reset -org.apache.struts.taglib.html.ResetTag - -accesskey -false -true - - -alt -false -true - - -altKey -false -true - - -disabled -false -true - - -onblur -false -true - - -onchange -false -true - - -onclick -false -true - - -ondblclick -false -true - - -onfocus -false -true - - -onkeydown -false -true - - -onkeypress -false -true - - -onkeyup -false -true - - -onmousedown -false -true - - -onmousemove -false -true - - -onmouseout -false -true - - -onmouseover -false -true - - -onmouseup -false -true - - -property -false -true - - -style -false -true - - -styleClass -false -true - - -styleId -false -true - - -tabindex -false -true - - -title -false -true - - -titleKey -false -true - - -value -false -true - - - -rewrite -org.apache.struts.taglib.html.RewriteTag -empty - -action -false -true - - -module -false -true - - -anchor -false -true - - -forward -false -true - - -href -false -true - - -name -false -true - - -page -false -true - - -paramId -false -true - - -paramName -false -true - - -paramProperty -false -true - - -paramScope -false -true - - -property -false -true - - -scope -false -true - - -transaction -false -true - - -useLocalEncoding -false -true - - - -select -org.apache.struts.taglib.html.SelectTag -JSP - -alt -false -true - - -altKey -false -true - - -disabled -false -true - - -indexed -false -true - - -multiple -false -true - - -name -false -true - - -onblur -false -true - - -onchange -false -true - - -onclick -false -true - - -ondblclick -false -true - - -onfocus -false -true - - -onkeydown -false -true - - -onkeypress -false -true - - -onkeyup -false -true - - -onmousedown -false -true - - -onmousemove -false -true - - -onmouseout -false -true - - -onmouseover -false -true - - -onmouseup -false -true - - -property -true -true - - -style -false -true - - -styleClass -false -true - - -styleId -false -true - - -tabindex -false -true - - -size -false -true - - -title -false -true - - -titleKey -false -true - - -value -false -true - - - -submit -org.apache.struts.taglib.html.SubmitTag - -accesskey -false -true - - -alt -false -true - - -altKey -false -true - - -disabled -false -true - - -indexed -false -true - - -onblur -false -true - - -onchange -false -true - - -onclick -false -true - - -ondblclick -false -true - - -onfocus -false -true - - -onkeydown -false -true - - -onkeypress -false -true - - -onkeyup -false -true - - -onmousedown -false -true - - -onmousemove -false -true - - -onmouseout -false -true - - -onmouseover -false -true - - -onmouseup -false -true - - -property -false -true - - -style -false -true - - -styleClass -false -true - - -styleId -false -true - - -tabindex -false -true - - -title -false -true - - -titleKey -false -true - - -value -false -true - - - -text -org.apache.struts.taglib.html.TextTag - -accesskey -false -true - - -alt -false -true - - -altKey -false -true - - -disabled -false -true - - -indexed -false -true - - -maxlength -false -true - - -name -false -true - - -onblur -false -true - - -onchange -false -true - - -onclick -false -true - - -ondblclick -false -true - - -onfocus -false -true - - -onkeydown -false -true - - -onkeypress -false -true - - -onkeyup -false -true - - -onmousedown -false -true - - -onmousemove -false -true - - -onmouseout -false -true - - -onmouseover -false -true - - -onmouseup -false -true - - -property -true -true - - -readonly -false -true - - -size -false -true - - -style -false -true - - -styleClass -false -true - - -styleId -false -true - - -tabindex -false -true - - -title -false -true - - -titleKey -false -true - - -value -false -true - - - -textarea -org.apache.struts.taglib.html.TextareaTag - -accesskey -false -true - - -alt -false -true - - -altKey -false -true - - -cols -false -true - - -disabled -false -true - - -indexed -false -true - - -name -false -true - - -onblur -false -true - - -onchange -false -true - - -onclick -false -true - - -ondblclick -false -true - - -onfocus -false -true - - -onkeydown -false -true - - -onkeypress -false -true - - -onkeyup -false -true - - -onmousedown -false -true - - -onmousemove -false -true - - -onmouseout -false -true - - -onmouseover -false -true - - -onmouseup -false -true - - -property -true -true - - -readonly -false -true - - -rows -false -true - - -style -false -true - - -styleClass -false -true - - -styleId -false -true - - -tabindex -false -true - - -title -false -true - - -titleKey -false -true - - -value -false -true - - - -xhtml -org.apache.struts.taglib.html.XhtmlTag -empty - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/struts-logic.tld b/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/struts-logic.tld deleted file mode 100644 index f267fcc917780e35187f05a84c129fae6fab8ba5..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/struts-logic.tld +++ /dev/null @@ -1,652 +0,0 @@ - - - - - - - - - -1.2 -1.1 -logic -http://struts.apache.org/tags-logic - -empty -org.apache.struts.taglib.logic.EmptyTag -JSP - -name -false -true - - -property -false -true - - -scope -false -true - - - -equal -org.apache.struts.taglib.logic.EqualTag -JSP - -cookie -false -true - - -header -false -true - - -name -false -true - - -parameter -false -true - - -property -false -true - - -scope -false -true - - -value -true -true - - - -forward -org.apache.struts.taglib.logic.ForwardTag -empty - -name -true -true - - - -greaterEqual -org.apache.struts.taglib.logic.GreaterEqualTag -JSP - -cookie -false -true - - -header -false -true - - -name -false -true - - -parameter -false -true - - -property -false -true - - -scope -false -true - - -value -true -true - - - -greaterThan -org.apache.struts.taglib.logic.GreaterThanTag -JSP - -cookie -false -true - - -header -false -true - - -name -false -true - - -parameter -false -true - - -property -false -true - - -scope -false -true - - -value -true -true - - - -iterate -org.apache.struts.taglib.logic.IterateTag -org.apache.struts.taglib.logic.IterateTei -JSP - -collection -false -true - - -id -true -false - - -indexId -false -false - - -length -false -true - - -name -false -true - - -offset -false -true - - -property -false -true - - -scope -false -true - - -type -false -true - - - -lessEqual -org.apache.struts.taglib.logic.LessEqualTag -JSP - -cookie -false -true - - -header -false -true - - -name -false -true - - -parameter -false -true - - -property -false -true - - -scope -false -true - - -value -true -true - - - -lessThan -org.apache.struts.taglib.logic.LessThanTag -JSP - -cookie -false -true - - -header -false -true - - -name -false -true - - -parameter -false -true - - -property -false -true - - -scope -false -true - - -value -true -true - - - -match -org.apache.struts.taglib.logic.MatchTag -JSP - -cookie -false -true - - -header -false -true - - -location -false -true - - -name -false -true - - -parameter -false -true - - -property -false -true - - -scope -false -true - - -value -true -true - - - -messagesNotPresent -org.apache.struts.taglib.logic.MessagesNotPresentTag -JSP - -name -false -true - - -property -false -true - - -message -false -true - - - -messagesPresent -org.apache.struts.taglib.logic.MessagesPresentTag -JSP - -name -false -true - - -property -false -true - - -message -false -true - - - -notEmpty -org.apache.struts.taglib.logic.NotEmptyTag -JSP - -name -false -true - - -property -false -true - - -scope -false -true - - - -notEqual -org.apache.struts.taglib.logic.NotEqualTag -JSP - -cookie -false -true - - -header -false -true - - -name -false -true - - -parameter -false -true - - -property -false -true - - -scope -false -true - - -value -true -true - - - -notMatch -org.apache.struts.taglib.logic.NotMatchTag -JSP - -cookie -false -true - - -header -false -true - - -location -false -true - - -name -false -true - - -parameter -false -true - - -property -false -true - - -scope -false -true - - -value -true -true - - - -notPresent -org.apache.struts.taglib.logic.NotPresentTag -JSP - -cookie -false -true - - -header -false -true - - -name -false -true - - -parameter -false -true - - -property -false -true - - -role -false -true - - -scope -false -true - - -user -false -true - - - -present -org.apache.struts.taglib.logic.PresentTag -JSP - -cookie -false -true - - -header -false -true - - -name -false -true - - -parameter -false -true - - -property -false -true - - -role -false -true - - -scope -false -true - - -user -false -true - - - -redirect -org.apache.struts.taglib.logic.RedirectTag - -action -false -true - - -anchor -false -true - - -forward -false -true - - -href -false -true - - -name -false -true - - -page -false -true - - -paramId -false -true - - -paramName -false -true - - -paramProperty -false -true - - -paramScope -false -true - - -property -false -true - - -scope -false -true - - -transaction -false -true - - -useLocalEncoding -false -true - - - - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/struts-template.tld b/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/struts-template.tld deleted file mode 100644 index 6ed25493f9f2c28fb4629a60560f20a777feb2d0..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/struts-template.tld +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - -1.0 -1.1 -template -http://jakarta.apache.org/struts/tags-template-1.0.2 - -insert -org.apache.struts.taglib.template.InsertTag -JSP - -template -true -true - - - -put -org.apache.struts.taglib.template.PutTag -JSP - -name -true -true - - -role -false -true - - -content -false -true - - -direct -false -true - - - -get -org.apache.struts.taglib.template.GetTag -empty - -flush -false -true - - -name -true -true - - -role -false -true - - - - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/web.xml b/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 9af7b1283d1842b509a6d5a0b313cf4899afe433..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,575 +0,0 @@ - - - - Jonas Administration Application - Jonas HTML based administration web application. - - - AMFMessageFilter - - org.granite.messaging.webapp.AMFMessageFilter - - - - AMFMessageFilter - /graniteamf/* - - - - org.granite.config.GraniteConfigListener - - - action - org.apache.struts.action.ActionServlet - - config - /WEB-INF/struts-config.xml - - - debug - 0 - - - detail - 0 - - - locale - true - - - nocache - true - - - tagsimagesroot - ${CONTEXT}/images - - - treebuilders - org.ow2.jonas.webapp.jonasadmin.JonasTreeBuilder - - - validate - true - - 2 - - - MemoryGraphServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.MemoryGraphServlet - - - MemoryGraphRemoteHostServlet - org.ow2.jonas.webapp.jonasadmin.clusterd.servlet.MemoryGraphRemoteHostServlet - - - - ThreadCountServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.ThreadCountServlet - - - ServerCurrentTxServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.ServerCurrentTxServlet - - - - AMFMessageServlet - - org.granite.messaging.webapp.AMFMessageServlet - - 1 - - - - - BytesReceivedByConnectorTomcatServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.BytesReceivedByConnectorTomcatServlet - - - - BytesSentByConnectorTomcatServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.BytesSentByConnectorTomcatServlet - - - - - ErrorCountByConnectorTomcatServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.ErrorCountByConnectorTomcatServlet - - - - - ProcessingTimeByConnectorTomcatServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.ProcessingTimeByConnectorTomcatServlet - - - - RequestCountByConnectorTomcatServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.RequestCountByConnectorTomcatServlet - - - - - ThreadBusyConnectorTomcatServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.ThreadBusyConnectorTomcatServlet - - - - - - - - JmsQMsgDeliverServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.JmsQMsgDeliverServlet - - - - - JmsQMsgReceiveServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.JmsQMsgReceiveServlet - - - - - - JmsTopicMsgDeliverServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.JmsTopicMsgDeliverServlet - - - - - JmsTopicMsgReceiveServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.JmsTopicMsgReceiveServlet - - - - - - - TotalCommittedTransactionsServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.TotalCommittedTransactionsServlet - - - - BegunTransactionsServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.BegunTransactionsServlet - - - - TotalExpiredTransactionsServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.TotalExpiredTransactionsServlet - - - - - TotalRolledbackTransactionsServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.TotalRolledbackTransactionsServlet - - - - - - ConnectionFailuresJCAConnectionServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.ConnectionFailuresJCAConnectionServlet - - - - - ConnectionLeaksJCAConnectionServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.ConnectionLeaksJCAConnectionServlet - - - - - CurrentBusyJCAConnectionServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.CurrentBusyJCAConnectionServlet - - - - - RejectedOpenJCAConnectionServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.RejectedOpenJCAConnectionServlet - - - - - ServedOpenJCAConnectionServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.ServedOpenJCAConnectionServlet - - - - - WaiterCountJCAConnectionServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.WaiterCountJCAConnectionServlet - - - - - - - - ConnectionLeaksJDBCResourceServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.ConnectionLeaksJDBCResourceServlet - - - - - CurrentBusyJDBCResourceServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.CurrentBusyJDBCResourceServlet - - - - - RejectedOpenJDBCResourceServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.RejectedOpenJDBCResourceServlet - - - - - ServedOpenJDBCResourceServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.ServedOpenJDBCResourceServlet - - - - - WaiterCountJDBCResourceServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.WaiterCountJDBCResourceServlet - - - - CurrentNumberOfEJBServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.CurrentNumberOfEJBServlet - - - - - - CurrentNumberOfEntityBeanServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.CurrentNumberOfEntityBeanServlet - - - - - CurrentNumberOfMDBServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.CurrentNumberOfMDBServlet - - - - - CurrentNumberOfSBFServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.CurrentNumberOfSBFServlet - - - - - - CurrentNumberOfSBLServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.CurrentNumberOfSBLServlet - - - - LoadCPUServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.LoadCPUServlet - - - - - WorkersServlet - org.ow2.jonas.webapp.jonasadmin.monitoring.graph.servlets.server.WorkersServlet - - - - LogoutServlet - org.ow2.jasmine.kerneos.login.LogoutServlet - - - - FileUploadServlet - org.ow2.jonas.admin.autostart.servlet.FileUploadServlet - - - - FileDownloadServlet - org.ow2.jonas.admin.autostart.servlet.FileDownloadServlet - - - - - - FileUploadServlet - /FileUploadServlet - - - - FileDownloadServlet - /FileDownloadServlet - - - LogoutServlet - /LogoutServlet - - action - *.do - - - MemoryGraphRemoteHostServlet - /MemoryGraphRemoteHostServlet - - - MemoryGraphServlet - /MemoryGraphServlet - - - ThreadCountServlet - /ThreadCountServlet - - - ServerCurrentTxServlet - /ServerCurrentTxServlet - - - - BytesReceivedByConnectorTomcatServlet - /BytesReceivedByConnectorTomcatServlet - - - - BytesSentByConnectorTomcatServlet - /BytesSentByConnectorTomcatServlet - - - ErrorCountByConnectorTomcatServlet - /ErrorCountByConnectorTomcatServlet - - - - ProcessingTimeByConnectorTomcatServlet - /ProcessingTimeByConnectorTomcatServlet - - - - RequestCountByConnectorTomcatServlet - /RequestCountByConnectorTomcatServlet - - - - ThreadBusyConnectorTomcatServlet - /ThreadBusyConnectorTomcatServlet - - - - - AMFMessageServlet - /graniteamf/* - - - - - - JmsQMsgDeliverServlet - /JmsQMsgDeliverServlet - - - - JmsQMsgReceiveServlet - /JmsQMsgReceiveServlet - - - - JmsTopicMsgDeliverServlet - /JmsTopicMsgDeliverServlet - - - - JmsTopicMsgReceiveServlet - /JmsTopicMsgReceiveServlet - - - - TotalCommittedTransactionsServlet - /TotalCommittedTransactionsServlet - - - - BegunTransactionsServlet - /BegunTransactionsServlet - - - - TotalExpiredTransactionsServlet - /TotalExpiredTransactionsServlet - - - - TotalRolledbackTransactionsServlet - /TotalRolledbackTransactionsServlet - - - - ConnectionFailuresJCAConnectionServlet - /ConnectionFailuresJCAConnectionServlet - - - ConnectionLeaksJCAConnectionServlet - /ConnectionLeaksJCAConnectionServlet - - - - CurrentBusyJCAConnectionServlet - /CurrentBusyJCAConnectionServlet - - - - RejectedOpenJCAConnectionServlet - /RejectedOpenJCAConnectionServlet - - - ServedOpenJCAConnectionServlet - /ServedOpenJCAConnectionServlet - - - - WaiterCountJCAConnectionServlet - /WaiterCountJCAConnectionServlet - - - - - ConnectionLeaksJDBCResourceServlet - /ConnectionLeaksJDBCResourceServlet - - - - CurrentBusyJDBCResourceServlet - /CurrentBusyJDBCResourceServlet - - - RejectedOpenJDBCResourceServlet - /RejectedOpenJDBCResourceServlet - - - - ServedOpenJDBCResourceServlet - /ServedOpenJDBCResourceServlet - - - - WaiterCountJDBCResourceServlet - /WaiterCountJDBCResourceServlet - - - - - - CurrentNumberOfEJBServlet - /CurrentNumberOfEJBServlet - - - - CurrentNumberOfEntityBeanServlet - /CurrentNumberOfEntityBeanServlet - - - - CurrentNumberOfMDBServlet - /CurrentNumberOfMDBServlet - - - - CurrentNumberOfSBFServlet - /CurrentNumberOfSBFServlet - - - - CurrentNumberOfSBLServlet - /CurrentNumberOfSBLServlet - - - - LoadCPUServlet - /LoadCPUServlet - - - - /WEB-INF/struts-bean.tld - /WEB-INF/struts-bean.tld - - - /WEB-INF/struts-html.tld - /WEB-INF/struts-html.tld - - - /WEB-INF/struts-logic.tld - /WEB-INF/struts-logic.tld - - - /WEB-INF/struts-template.tld - /WEB-INF/struts-template.tld - - - Jonas Server Configuration Security Constraint - - Protected Area - /MemoryGraphServlet - /MemoryGraphRemoteHostServlet - /ThreadCountServlet - /ServerCurrentTxServlet - - /BytesReceivedByConnectorTomcatServlet - /BytesSentByConnectorTomcatServlet - /ErrorCountByConnectorTomcatServlet - /ProcessingTimeByConnectorTomcatServlet - /RequestCountByConnectorTomcatServlet - /ThreadBusyConnectorTomcatServlet - /JmsQMsgDeliverServlet - /JmsQMsgReceiveServlet - /JmsTopicMsgDeliverServlet - /JmsTopicMsgReceiveServlet - /TotalCommittedTransactionsServlet - /BegunTransactionsServlet - /TotalExpiredTransactionsServlet - /TotalRolledbackTransactionsServlet - /ConnectionFailuresJCAConnectionServlet - /ConnectionLeaksJCAConnectionServlet - /CurrentBusyJCAConnectionServlet - /RejectedOpenJCAConnectionServlet - /ServedOpenJCAConnectionServlet - /WaiterCountJCAConnectionServlet - /ConnectionLeaksJDBCResourceServlet - /CurrentBusyJDBCResourceServlet - /RejectedOpenJDBCResourceServlet - /ServedOpenJDBCResourceServlet - /WaiterCountJDBCResourceServlet - /CurrentNumberOfEJBServlet - /CurrentNumberOfEntityBeanServlet - /CurrentNumberOfMDBServlet - /CurrentNumberOfSBFServlet - /CurrentNumberOfSBLServlet - /LoadCPUServlet - *.jsp - *.do - *.html - *.swf - - - jonas-admin - - - NONE - - - - - FORM - JOnAS Realm - - /login.jsp - /error.jsp - - - - The role that is required to log in to the Administration Application - jonas-admin - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/begin.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/begin.jsp deleted file mode 100644 index 9a97a5e21112d590c9f664509560efa8710be263..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/begin.jsp +++ /dev/null @@ -1,5 +0,0 @@ - - <bean:message key="title.application"/> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/blank.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/blank.jsp deleted file mode 100644 index deb0aaf7cee057d44edc8be77e0b9ce6a8e94a67..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/blank.jsp +++ /dev/null @@ -1,24 +0,0 @@ - - -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> - - - - - -<%@ include file="begin.jsp" %> - - - - - - - - - -<%@ include file="end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/catalina/connector.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/catalina/connector.jsp deleted file mode 100644 index 663b66fa26a6cd0369862e7be87af67fca4c87f6..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/catalina/connector.jsp +++ /dev/null @@ -1,410 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <%-- do not show scheme while creating a new connector --%> - - - - - - - - - - - - - - <%-- do not show scheme while creating a new connector --%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <%-- Input only allowed on create transaction --%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <%-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --%> - - <%-- The following properties are deprecated--%> - -<%-- The following properties are supported only for Coyote HTTP/S 1.1 Connectors --%> - - - - - - - - - - - - - - - - - - - -<%-- The following properties are supported only on HTTPS Connector --%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <%-- Input allowed only on create --%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - -    - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/catalina/connectors.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/catalina/connectors.jsp deleted file mode 100644 index 0b7ffa8dfb355465c677a3e322b72d5d25f2fa9e..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/catalina/connectors.jsp +++ /dev/null @@ -1,99 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   - - - - - - - -   - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/catalina/connectorsConfirm.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/catalina/connectorsConfirm.jsp deleted file mode 100644 index 86557e4d22065de5c48e0f07c4bae0b0087c76b7..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/catalina/connectorsConfirm.jsp +++ /dev/null @@ -1,60 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/clusterd/DaemonProxyClusterDisplayServerConfig.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/clusterd/DaemonProxyClusterDisplayServerConfig.jsp deleted file mode 100644 index cf74cf8b4499c8d65091f24b32b8bfdfcc78a20a..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/clusterd/DaemonProxyClusterDisplayServerConfig.jsp +++ /dev/null @@ -1,129 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj"%> - -<%@ include file="../common/begin.jsp"%> - - - - - - infos - - - - - - Config. - - - - - - Name - - - - - - - State - - - - - - Description - - - - - - - - - java Home - - - - - - - Jonas Root - - - - - - - Jonas Base - - - - - - - - - - - java Home - - - - - - - Jonas Root - - - - - - - Jonas Base - - - - - - - - - Extra parameter - - - - - - Auto Boot - - - - - - - - - - - - - Confirm configuration - - - - - - - - -<%@ include file="../common/end.jsp"%> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/clusterd/addServerCd.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/clusterd/addServerCd.jsp deleted file mode 100644 index de8fd7cb84ac82f4711ba4e3528f3cd3c12b74fd..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/clusterd/addServerCd.jsp +++ /dev/null @@ -1,141 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8"%> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj"%> - - -<%@ include file="../common/begin.jsp"%> -<% -String cdName = (String) request.getAttribute("clusterdName"); -%> - - - - - - - - <%=cdName%> infos - - - - - - - - - - - - - - - - - - - Add Server - - - - - - Add Server & Save - - - - - Remove from view - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Configure - - - - - - - - Configure - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp"%> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/clusterd/daemonProxyClusterModify.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/clusterd/daemonProxyClusterModify.jsp deleted file mode 100644 index 218ca289765150f064c6f7ca03179bdba7b86710..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/clusterd/daemonProxyClusterModify.jsp +++ /dev/null @@ -1,94 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/clusterd/graph/vmMemory.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/clusterd/graph/vmMemory.jsp deleted file mode 100644 index 9fa49d6c0fa44e8f3a696d29c7ca31a209d728b5..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/clusterd/graph/vmMemory.jsp +++ /dev/null @@ -1,76 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../../common/begin.jsp" %> - - - - - - - - - - Infos - Used Memory - - - - - - " name="memory" width="" height=""> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/clusterd/serversConfirm.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/clusterd/serversConfirm.jsp deleted file mode 100644 index 5fa7104378ea203357f113b2d93fe66b3a1365f5..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/clusterd/serversConfirm.jsp +++ /dev/null @@ -1,64 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Domain - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/cmi/displayCmiClusterInfo.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/cmi/displayCmiClusterInfo.jsp deleted file mode 100644 index 51da893700dbfb884a38687240a0f1b8ee48bc35..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/cmi/displayCmiClusterInfo.jsp +++ /dev/null @@ -1,69 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8"%> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj"%> - - -<%@ include file="../common/begin.jsp"%> - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    -
    - - - - - - - - - - - -   - - - - - - -
    -
    -
    -<%@ include file="../common/end.jsp"%> - -
    diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/cmi/displayCmiInfo.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/cmi/displayCmiInfo.jsp deleted file mode 100644 index 1df533d3f89726df3a0f3f33f8f00b485bf1dbc5..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/cmi/displayCmiInfo.jsp +++ /dev/null @@ -1,159 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8"%> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj"%> - - -<%@ include file="../common/begin.jsp"%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CMI Global Properties - - - - - - -
        -
    - - - -     - - -
    -
    - - - - - - - - - - - - - - -     - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -     - - - - - - - - - - - - - - - -
    -
    -
    -
    - <%@ include file="../common/end.jsp"%> - -
    diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/cmi/displayCmiObjectInfo.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/cmi/displayCmiObjectInfo.jsp deleted file mode 100644 index 870622d4bd0f5f4a3824361a9f5bbca7730737e3..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/cmi/displayCmiObjectInfo.jsp +++ /dev/null @@ -1,270 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8"%> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj"%> - - -<%@ include file="../common/begin.jsp"%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    - - - -
    - - - -
    - -
    -
    - - - -
    - - - - -
    - -
    -
    - - - -
    - -
    - - - - - - - - - - - - - -     - - - - - - - - - - - - - - - - - -
    - -
    -
    - - - - - - - - -
    - - -
    -     -
    -
    - - - - - - - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    -
    - - - - -
    - - - -
    - -
    -
    - - - - -
    - - - -
    - -
    -
    - - - - -
    -
    - - - - - - - - - - -
    -
    -
    - <%@ include file="../common/end.jsp"%> - -
    diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/cmi/displayCmiProtocolInfo.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/cmi/displayCmiProtocolInfo.jsp deleted file mode 100644 index 271a59180fd949f834782ffee2337a06a9fc35d2..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/cmi/displayCmiProtocolInfo.jsp +++ /dev/null @@ -1,70 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8"%> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj"%> - - -<%@ include file="../common/begin.jsp"%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    -
    - - - - - - - - - - - -   - - - - - - -
    -
    -
    -<%@ include file="../common/end.jsp"%> - -
    diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/cmi/displayCmiServerInfo.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/cmi/displayCmiServerInfo.jsp deleted file mode 100644 index d74225ce0080f399d92bb8a4d14433fe0b38a0ab..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/cmi/displayCmiServerInfo.jsp +++ /dev/null @@ -1,85 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8"%> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj"%> - - -<%@ include file="../common/begin.jsp"%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - - - -
    -
    - - - -
    - - - -
        -
    - - - -     - - -
    -
    - - - - - - - - - - -
    -
    -
    -<%@ include file="../common/end.jsp"%> - -
    diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/common/begin.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/common/begin.jsp deleted file mode 100644 index 5de2b5318c4a7427e03a377822b7b57c7d658ad3..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/common/begin.jsp +++ /dev/null @@ -1,7 +0,0 @@ - - <bean:message key="title.application"/> - - - - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/common/end.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/common/end.jsp deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/deploy.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/deploy.jsp deleted file mode 100644 index 8269057c8023acd7686e2bb022d1b9ad82884dc2..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/deploy.jsp +++ /dev/null @@ -1,91 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - -   - - - - - - - - - - - - - - -
    - - - -
     
    - - - -
    -
    - - - - - - -
    - -   - -   - -
    - - - - - - - - - - - - - - - - - - -
    -
    -
    - -<%@ include file="../common/end.jsp" %> - -
    - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/deployConfirm.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/deployConfirm.jsp deleted file mode 100644 index d86c6ffe5532f0e572a31e09ce19d48959d3b30b..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/deployConfirm.jsp +++ /dev/null @@ -1,109 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/domainDeploy.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/domainDeploy.jsp deleted file mode 100644 index 9e3ba75a3654437fece04459ffd4c2562b7a2f4f..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/domainDeploy.jsp +++ /dev/null @@ -1,164 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - -   - - - - - - - - - - -   - - - - - - - -   -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - -
    - -
    -
    - - - - - - - - - - - - - - - -
    - - - - - - - - - - - -
    -
    -
    - -<%@ include file="../common/end.jsp" %> - -
    diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/domainDeployConfirm.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/domainDeployConfirm.jsp deleted file mode 100644 index 35c26d74d24b6f0bc46da70db65d90ddcc430d9c..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/domainDeployConfirm.jsp +++ /dev/null @@ -1,125 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - Action selected: - - - - - Action selected: - - - - - Action selected: - - - - - Replace existing files: Yes - - - - - Replace existing files: No - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/domainDeployProgress.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/domainDeployProgress.jsp deleted file mode 100644 index aa5cf7e9c2dcfe1eff0e72927a0a6a86fb86fbcb..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/domainDeployProgress.jsp +++ /dev/null @@ -1,95 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Total applications to undeploy: - - - Total applications to deploy: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/domainUndeployConfirm.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/domainUndeployConfirm.jsp deleted file mode 100644 index 26a24854864965521fac0916b32232a1dead2e49..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/domainUndeployConfirm.jsp +++ /dev/null @@ -1,92 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/remove.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/remove.jsp deleted file mode 100644 index 77659fd1df9bfcf406362dc011c8a949bed0fde8..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/remove.jsp +++ /dev/null @@ -1,75 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/removeConfirm.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/removeConfirm.jsp deleted file mode 100644 index 64d50e0ca75c0b3e7446477b980e482ba81eb88c..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/removeConfirm.jsp +++ /dev/null @@ -1,95 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/upload.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/upload.jsp deleted file mode 100644 index e02e1bc2bf5c8917325590ab13b95d28f3a35c9a..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/upload.jsp +++ /dev/null @@ -1,63 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/uploadResult.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/uploadResult.jsp deleted file mode 100644 index d58d0770464ebfd8ee568a680cc86e139a8075a5..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/deploy/uploadResult.jsp +++ /dev/null @@ -1,64 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - FileName - <%= request.getAttribute("fileName") %> - - - The File size - <%= request.getAttribute("size") %> - - - Result - <%= request.getAttribute("data") %> - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/domain/addCluster.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/domain/addCluster.jsp deleted file mode 100644 index 00bdd7ac2c798eac97f6d37da5d237996ee09476..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/domain/addCluster.jsp +++ /dev/null @@ -1,51 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/domain/addServer.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/domain/addServer.jsp deleted file mode 100644 index 4032d9f16b4a6b19ed3d3fa417083b216a7a59cb..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/domain/addServer.jsp +++ /dev/null @@ -1,86 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/domain/addServerCluster.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/domain/addServerCluster.jsp deleted file mode 100644 index e2dc46a1e5dcec843353a2b687f8044cc5948d87..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/domain/addServerCluster.jsp +++ /dev/null @@ -1,83 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - No servers to add - - - - - - - Cluster name - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/domain/clustercmi.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/domain/clustercmi.jsp deleted file mode 100644 index 2f3ffd744c2123876ef137f1111bbfc796a0e596..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/domain/clustercmi.jsp +++ /dev/null @@ -1,110 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - no cluster daemon - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/domain/domain.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/domain/domain.jsp deleted file mode 100644 index c242b2b86a98ee5328047ac4409bffb89f818c3a..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/domain/domain.jsp +++ /dev/null @@ -1,562 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/domain/serversConfirm.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/domain/serversConfirm.jsp deleted file mode 100644 index 8b22c69f0d9437b39941bbe210cf700f43d6ea65..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/domain/serversConfirm.jsp +++ /dev/null @@ -1,64 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Domain - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/domain/serversConfirmMove.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/domain/serversConfirmMove.jsp deleted file mode 100644 index 61142cc552ff9abaee239b272b91fde876c608fe..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/domain/serversConfirmMove.jsp +++ /dev/null @@ -1,73 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/end.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/end.jsp deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/error.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/error.jsp deleted file mode 100644 index 732318afa6a1e20029fcd7153a7520a47fbe0bd8..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/error.jsp +++ /dev/null @@ -1,36 +0,0 @@ - -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> - - - - -<%@ include file="begin.jsp" %> - - - - - - - - - - - - - - -
     
    - - - - - -<%@ include file="end.jsp" %> - -
    diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/framemain.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/framemain.jsp deleted file mode 100644 index 9ee311e8a879f1cb1f06707e050e79ef082825ba..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/framemain.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> - - -<%@ include file="begin.jsp" %> - - " scrolling="auto"> - " scrolling="No"> - -<%@ include file="end.jsp" %> - - -<body bgcolor="#FFFFFF" text="#000000"> - <h1>Sorry, use a browser who accepts the frames !</h1> -</body> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/frameright.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/frameright.jsp deleted file mode 100644 index b9d27cbedf38f6f246dcf8d882f35ab186d34ef4..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/frameright.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> - - -<%@ include file="begin.jsp" %> - - " scrolling="No"> - " scrolling="auto"> - -<%@ include file="end.jsp" %> - - -<body bgcolor="#FFFFFF" text="#000000"> - <h1>Sorry, use a browser who accepts the frames !</h1> -</body> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/globalerror.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/globalerror.jsp deleted file mode 100644 index 842a0f8fa913cfe75b8d9ae8aff9a394ec93c642..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/globalerror.jsp +++ /dev/null @@ -1,44 +0,0 @@ - - -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - - - - -<%@ include file="begin.jsp" %> - - - - - - - - - - - - - -

     
    - - - - -<%@ include file="end.jsp" %> - -
    diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/button/GraphButton.png b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/button/GraphButton.png deleted file mode 100644 index 6142124230a94d0966bc85b9a2967874c411025f..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/button/GraphButton.png and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/button/button.png b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/button/button.png deleted file mode 100644 index cb35e0ac531c0c60c326b1bcba8f58d797a0c17d..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/button/button.png and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/dot.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/dot.gif deleted file mode 100644 index 5bfd67a2d6f72ac3a55cbfcea5866e841d22f5d9..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/dot.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/dot1.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/dot1.gif deleted file mode 100644 index 5bfd67a2d6f72ac3a55cbfcea5866e841d22f5d9..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/dot1.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/dot5.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/dot5.gif deleted file mode 100644 index 52019098523be482650b88d8b37ec0abcc90618c..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/dot5.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/BalJonasGreen.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/BalJonasGreen.gif deleted file mode 100644 index 4be83dc838e073d70cc949bcb645319801acac31..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/BalJonasGreen.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/BalJonasTree.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/BalJonasTree.gif deleted file mode 100644 index 9abdedb35bacecb9fcace6cae3804768e55264e9..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/BalJonasTree.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/Database.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/Database.gif deleted file mode 100644 index b2ccc7ee1d3a6641b2559f9093615b11ee80d700..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/Database.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/Datasource.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/Datasource.gif deleted file mode 100644 index d36a4f61fbb229b679f5f4e06725dcdc15a7b41f..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/Datasource.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/FolderBalJonas.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/FolderBalJonas.gif deleted file mode 100644 index ff461ad6e1989360551aa5af76047566bbd2394a..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/FolderBalJonas.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/JonasQuestion.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/JonasQuestion.gif deleted file mode 100644 index 86b16bd790460500d397bb9af01243c2501db19e..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/JonasQuestion.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/bean.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/bean.gif deleted file mode 100644 index ba74d6432038739746f1fb5f93bb028ce557622a..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/bean.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/bullet.png b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/bullet.png deleted file mode 100644 index 96c596e7c9c8799ac5a4d2844e21a1644dcb3c9c..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/bullet.png and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/caution.png b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/caution.png deleted file mode 100644 index 88d494e79d28b8e9fba47279b5d5c7e6ac596de8..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/caution.png and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/connector.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/connector.gif deleted file mode 100644 index 279f5e6e8bb5e9e1fe470b012926adc0fbd1b38c..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/connector.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/connectors.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/connectors.gif deleted file mode 100644 index 7059d873350dab646bcd3be6ad99c73a8da78609..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/connectors.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deploy.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deploy.gif deleted file mode 100644 index 6c0d93e8e7c2fffc47715942349967c475feb14a..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deploy.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deployDomainManage.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deployDomainManage.gif deleted file mode 100644 index edb0846c1d4acafd437463deb9ac5d6c335bacef..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deployDomainManage.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deployDomain_ear.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deployDomain_ear.gif deleted file mode 100644 index 752b55c04c2f8ba1b04c56deb43f452c721aec4d..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deployDomain_ear.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deployDomain_jar.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deployDomain_jar.gif deleted file mode 100644 index f2396cca3d1d83d0542b7ca9379db94d6716e672..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deployDomain_jar.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deployDomain_rar.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deployDomain_rar.gif deleted file mode 100644 index 69a98c209d03d0054dbcd2a5dc98a336cfc8b23a..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deployDomain_rar.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deployDomain_war.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deployDomain_war.gif deleted file mode 100644 index cecb892019e9ace3a14e8a534084be226619169f..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deployDomain_war.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deploy_datasource.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deploy_datasource.gif deleted file mode 100644 index 2e794cc3465a090843e82c724f6f2647b407dd7d..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deploy_datasource.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deploy_ear.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deploy_ear.gif deleted file mode 100644 index 2c9efebfc00ef4b5f47b22bcaa4dcfd2fd25c8f8..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deploy_ear.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deploy_jar.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deploy_jar.gif deleted file mode 100644 index 41cf86c8d963b8b7964bb6167c14722055968660..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deploy_jar.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deploy_rar.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deploy_rar.gif deleted file mode 100644 index 5326b68b0e7dcf6e00ce9a3642f541ec466f398a..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deploy_rar.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deploy_war.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deploy_war.gif deleted file mode 100644 index 643c7050f231778495228ed379d9b7847a81014b..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deploy_war.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deployed.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deployed.gif deleted file mode 100644 index 68e9a5b37f6ca74f7ee4fbc8d46f584fac02a680..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deployed.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deployed_not.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deployed_not.gif deleted file mode 100644 index 5ca6cdb62f7b83c6305e7971e3760130a91ac869..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/deployed_not.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/domain_jonas.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/domain_jonas.gif deleted file mode 100644 index 451ce40bc5bc1b0caec8417798ec3475c4551149..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/domain_jonas.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/ear.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/ear.gif deleted file mode 100644 index c7ab6178725e057e039ab3738833ceeac45e7a35..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/ear.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/help.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/help.gif deleted file mode 100644 index 49f7541c087d9b3a807a509708bd352c7e99371d..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/help.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/info.png b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/info.png deleted file mode 100644 index c8ee7a86d740fa2bd2a8bb39d00f8685bda1c46b..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/info.png and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/jar.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/jar.gif deleted file mode 100644 index 8e98e1114c684243bb6c599016e5f1e4583d0efa..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/jar.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/jms.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/jms.gif deleted file mode 100644 index 39916fb2f84e279d4d5f4cfcda558e3efda791fa..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/jms.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/jms_connector.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/jms_connector.gif deleted file mode 100644 index b652a036b6252fb63a25ef37db83c77313cdb67f..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/jms_connector.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/jms_queue.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/jms_queue.gif deleted file mode 100644 index 1dbb30155971eba62c29e2cdd4fd8a0a95f2f602..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/jms_queue.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/jms_topic.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/jms_topic.gif deleted file mode 100644 index f9c5ca65bf1d2e9a523100aa908e7689c88eac1b..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/jms_topic.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/logger_http.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/logger_http.gif deleted file mode 100644 index 30b9bd2eaf4bb7ddc7b789256545f76c6a0dff3a..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/logger_http.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/logger_jonas.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/logger_jonas.gif deleted file mode 100644 index 435867a3350c87bac727ca1905318a4b9a92337f..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/logger_jonas.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/loggers.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/loggers.gif deleted file mode 100644 index 6a67bfc37dd95a66037037e466e44c718b853344..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/loggers.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/mail.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/mail.gif deleted file mode 100644 index 0cb3f27d3ddc5505a0532f6f1d50670351c0e617..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/mail.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/mail_mime.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/mail_mime.gif deleted file mode 100644 index db6f618fd8c14c66736e5f3b3de7d2ab20465ce7..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/mail_mime.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/mail_session.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/mail_session.gif deleted file mode 100644 index fd3c984a06b1aabd6363cffee96bcf4a9b793e90..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/mail_session.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/mbean.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/mbean.gif deleted file mode 100644 index 47d2ad6cbdc52eb8d61bd82468ef7cea3ef837b9..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/mbean.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/mbeandomain.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/mbeandomain.gif deleted file mode 100644 index 563c0c32890140340403cb69a76f637bdde12656..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/mbeandomain.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/mbeans.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/mbeans.gif deleted file mode 100644 index 7e07c34841148dcc50be84ed0d11279b072b46ef..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/mbeans.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/mbeantype.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/mbeantype.gif deleted file mode 100644 index c063051458c0a0685744b711170d7a689437a0db..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/mbeantype.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/monitoring.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/monitoring.gif deleted file mode 100644 index a0f453e6b040e92b72927e5d98398bb2722886f3..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/monitoring.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/protocol.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/protocol.gif deleted file mode 100644 index 4f916d88ff1f8bc9b2a04890500643d47775ea49..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/protocol.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/resourceAdapter.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/resourceAdapter.gif deleted file mode 100644 index 08e7f1902efd303f092d40dd1e7c4208c609e6f0..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/resourceAdapter.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/resources.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/resources.gif deleted file mode 100644 index 05034fba9f1247b598cbb8211607a8b1c7a357ce..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/resources.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/security.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/security.gif deleted file mode 100644 index ab8a7a2b76a53c8fa0968d6d126a7b17990555d8..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/security.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/security_database.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/security_database.gif deleted file mode 100644 index facb04cdc7118206939f3fe322d612900f2436e8..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/security_database.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/security_ldap.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/security_ldap.gif deleted file mode 100644 index c85da5de436ab962310dd57ddd23709c9cad7fbc..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/security_ldap.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/security_memory.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/security_memory.gif deleted file mode 100644 index 309eb4cf627d8e06531952202e77d1c4429872b9..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/security_memory.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_application.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_application.gif deleted file mode 100644 index dc25b5d61008fd62522dd312d159b0e06582f442..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_application.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_database.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_database.gif deleted file mode 100644 index d28c42d1485ac4a58011bedac3d9cdab740622e0..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_database.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_discovery.png b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_discovery.png deleted file mode 100644 index 6844bcaa4484bb6f6d9cfeba15d42207e762c727..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_discovery.png and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_ejb.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_ejb.gif deleted file mode 100644 index 7039b82da93ada31a8a558571fdbe3ae211a1877..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_ejb.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_jms.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_jms.gif deleted file mode 100644 index 92a261c3a44ccd77db064c6e513af0c9ec5ea43a..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_jms.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_mail.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_mail.gif deleted file mode 100644 index e93d626745232c00b5d90b0b756f2edc68d39c20..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_mail.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_resource.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_resource.gif deleted file mode 100644 index 2e333f67664c673cd22db807ab32a8b15290b492..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_resource.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_security.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_security.gif deleted file mode 100644 index a06e9d94bf0375951e09a657bd3454760cd75d9c..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_security.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_smartclient.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_smartclient.gif deleted file mode 100644 index 684bacfd94e84423537c888aecc2e07153d95483..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_smartclient.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_transaction.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_transaction.gif deleted file mode 100644 index 00451848611ac99e3f1fd4adfc4af614d4530252..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_transaction.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_versioning.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_versioning.gif deleted file mode 100644 index 384a4b9481c2abf72c34199289e0e22c1d0d1f38..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_versioning.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_web.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_web.gif deleted file mode 100644 index 3a6a00fbf503bd29574a2715735ef8180da05b0f..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_web.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_workcleaner.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_workcleaner.gif deleted file mode 100644 index a2a19f17ce7cca142999df2e90748a7fdd5d2d18..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_workcleaner.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_workmanager.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_workmanager.gif deleted file mode 100644 index 620d3f91a55dec44002cbe320ce00c409bc56e52..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/service_workmanager.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/services.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/services.gif deleted file mode 100644 index 0d53d098238be07c3a55f80f50a7667f09aac430..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/services.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/tag_blue.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/tag_blue.gif deleted file mode 100644 index 7472c68af250aa63a658e10ec8d82acb68cbec85..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/tag_blue.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/tag_green.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/tag_green.gif deleted file mode 100644 index 38e98447d167125279b1a1025bd9e5bf97331b47..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/tag_green.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/war.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/war.gif deleted file mode 100644 index 963bebfdda8aa96e3050175d9ff5f18015f9ca05..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/icon/war.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/jonasAdmin.png b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/jonasAdmin.png deleted file mode 100644 index 333fac11c3844061ba02497d8a954e23e7699e68..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/jonasAdmin.png and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/JonasSadSmall.png b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/JonasSadSmall.png deleted file mode 100644 index 0bcee20fb0b0a932d51eb488228207ed8b1ff711..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/JonasSadSmall.png and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/JonasSadSmall_Orange.jpg b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/JonasSadSmall_Orange.jpg deleted file mode 100644 index d98f8a5ded4298467f11591707896276904ed5d4..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/JonasSadSmall_Orange.jpg and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/JonasSmall_White.jpg b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/JonasSmall_White.jpg deleted file mode 100644 index 92000653a237439a24e28afa95c2078d1cfe1f83..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/JonasSmall_White.jpg and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/balJonasAdmin.png b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/balJonasAdmin.png deleted file mode 100644 index affe9524c87f03055d642bf0c1ea29c01bdfa01a..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/balJonasAdmin.png and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/balJonasAdminLogin.png b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/balJonasAdminLogin.png deleted file mode 100644 index 6166d25192ef1b607a49568e2978af1b326e0a5e..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/balJonasAdminLogin.png and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/jonasAdmin.png b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/jonasAdmin.png deleted file mode 100644 index f19c03c7e79ae36b469d11ae4b5bfaa0d3863c4b..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/jonasAdmin.png and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/jonasAdminModified.png b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/jonasAdminModified.png deleted file mode 100644 index e7e44532de59b564a06d25b9fa60f16f739206a2..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/jonasAdminModified.png and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/jonasAdminWelcomeMessage.png b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/jonasAdminWelcomeMessage.png deleted file mode 100644 index 07734732e0683804153ffac626001e32127ad106..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/jonasAdminWelcomeMessage.png and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/logoOW2.png b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/logoOW2.png deleted file mode 100644 index 35cee5856c041ecf5b1b5e8c8a0d784a225a9a3b..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/logoOW2.png and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/tableftF.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/tableftF.gif deleted file mode 100644 index 021624c09aeb41c9d62699c67d9f30056fe4bb43..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/tableftF.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/tabrightF.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/tabrightF.gif deleted file mode 100644 index 7c236f3a27e89632ca1a12fff0b8026b83b79dc3..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/tabrightF.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/line.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/line.gif deleted file mode 100644 index 0597cb126ee5d41dab4882b3499b71c08ab2260d..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/line.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/line_first.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/line_first.gif deleted file mode 100644 index 975b2a9e3ca0dab6d8a0354e4af731dc7f5674b2..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/line_first.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/line_last.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/line_last.gif deleted file mode 100644 index f5a08f400c9375cf865cc45f95371babbe237009..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/line_last.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/line_middle.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/line_middle.gif deleted file mode 100644 index 27043faefce77826408011f1e6677ece349ed2e9..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/line_middle.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/node_close.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/node_close.gif deleted file mode 100644 index 722763bc07f8d1060b449c4617201146314faf2f..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/node_close.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/node_close_first.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/node_close_first.gif deleted file mode 100644 index cde8d1560140811be293656126f635696cf41d1b..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/node_close_first.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/node_close_last.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/node_close_last.gif deleted file mode 100644 index aa4d1cb57a8510db08a5d8e1965262ee88bb57bf..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/node_close_last.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/node_close_middle.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/node_close_middle.gif deleted file mode 100644 index 7997a952c9a8c791c81d8e22e1e06e38a4f971d7..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/node_close_middle.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/node_open.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/node_open.gif deleted file mode 100644 index c887f6e0d97405b8e30416abbfcf86970ed15cb3..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/node_open.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/node_open_first.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/node_open_first.gif deleted file mode 100644 index a24ca319551f2c3423afff46f68476119c42e616..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/node_open_first.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/node_open_last.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/node_open_last.gif deleted file mode 100644 index 75c6e1d522acff775d949f38d1f2df6bc71fb6f9..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/node_open_last.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/node_open_middle.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/node_open_middle.gif deleted file mode 100644 index fa28a082ae5eebf1c0afe212a80b22f3cbf79435..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/node_open_middle.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/noline.gif b/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/noline.gif deleted file mode 100644 index af2f8eb64bbb8b2a2be467462732fa89e2d0d1fe..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/tree/noline.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/index.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/index.jsp deleted file mode 100644 index ba2fab28790a66b3f563a3e5233cdf60b0f95aa1..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/index.jsp +++ /dev/null @@ -1,4 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<% -response.sendRedirect(response.encodeRedirectURL("index.html")); -%> diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/ConnectionFactoryEdit.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/ConnectionFactoryEdit.jsp deleted file mode 100644 index c5c3eaff0c30bcd91176397099e3d29bf9eda99f..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/ConnectionFactoryEdit.jsp +++ /dev/null @@ -1,92 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " value=""> - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/DestinationAdd.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/DestinationAdd.jsp deleted file mode 100644 index 646b5188fc508b1e95673cf63c49c509c5d9e5bf..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/DestinationAdd.jsp +++ /dev/null @@ -1,88 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - <%--sj:tab forward="JonasMqConnectStartAction"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/DestinationAddConfirm.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/DestinationAddConfirm.jsp deleted file mode 100644 index d3674612547acd081e49e988af7a6ad981149e1b..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/DestinationAddConfirm.jsp +++ /dev/null @@ -1,16 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - -Add destinations - -<%@ include file="../common/end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/DestinationDelete.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/DestinationDelete.jsp deleted file mode 100644 index 4884d5f2cf643b4bbcf41d0d8d0300177c4b57f9..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/DestinationDelete.jsp +++ /dev/null @@ -1,86 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - <%--sj:tab forward="JonasMqConnectStartAction"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/DestinationDeleteConfirm.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/DestinationDeleteConfirm.jsp deleted file mode 100644 index 33c6fd4ba061d3927c3fc15691a6ed928aaeb110..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/DestinationDeleteConfirm.jsp +++ /dev/null @@ -1,16 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - -

    Delete destination

    - -<%@ include file="../common/end.jsp" %> - -
    diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/DestinationEdit.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/DestinationEdit.jsp deleted file mode 100644 index 7d77560db3e515a8a6a9aac79d119cd5cc6bd2e5..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/DestinationEdit.jsp +++ /dev/null @@ -1,131 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - <%--sj:tab forward="JonasMqConnectDestinationEditAction" selected="true"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - : - - - - - - - - - - - - - - - " value=""> - - - - - - - - - - - : - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/Destinations.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/Destinations.jsp deleted file mode 100644 index bb71c381813c7de889ed5a08dbe0960442aba078..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/Destinations.jsp +++ /dev/null @@ -1,100 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="/common/begin.jsp" %> - - - - - <%--sj:tab forward="JonasMqConnectStartAction"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="/common/end.jsp" %> - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/JonasMqConnect.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/JonasMqConnect.jsp deleted file mode 100644 index 020bf5f8be360ce30c33b8b6dbbd726196423376..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/JonasMqConnect.jsp +++ /dev/null @@ -1,189 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="/common/begin.jsp" %> - - - - - - - <%--sj:tab forward="JonasMqConnectForm" selected="true"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "> - - - - - - - - - - - "> - - - - - - - - - - - "> - - - - - - - - - - - "> - - - - - - - - - - - "> - - - - - - - - - - - - - - - -   - - - - - - - -   - - - - - - - -   - - - - - - - - - - - -<%@ include file="/common/end.jsp" %> - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/JonasMqConnectPlatform.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/JonasMqConnectPlatform.jsp deleted file mode 100644 index e9ce6a5b4307c465e1b7760e2fd8b6d907240237..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/JonasMqConnectPlatform.jsp +++ /dev/null @@ -1,47 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="/common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="/common/end.jsp" %> - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/MdbEdit.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/MdbEdit.jsp deleted file mode 100644 index 3e15fb107f8d0b0aabb7124dcc2c7cf7890f421b..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/MdbEdit.jsp +++ /dev/null @@ -1,53 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - <%--sj:tab forward="JonasMqConnectStartAction"> - - - - - - - - - - - : - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/Mdbs.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/Mdbs.jsp deleted file mode 100644 index b9b34131f64c75309ec2c056c67204f555fa71df..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasmqconnect/Mdbs.jsp +++ /dev/null @@ -1,57 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="/common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="/common/end.jsp" %> - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasserver/jmxserver.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasserver/jmxserver.jsp deleted file mode 100644 index df9a37e7f9140bbf2f6ca4a9f238b1447fd5fdb7..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasserver/jmxserver.jsp +++ /dev/null @@ -1,64 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> -<% String cmi = (String)request.getAttribute("cmi"); - String master = (String)request.getAttribute("master"); -%> - - - - - - - <%if("true".equals(cmi) || "true".equals(master)){%> - - <%}%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasserver/jonasserver.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasserver/jonasserver.jsp deleted file mode 100644 index b1c7d5fd3c6dec07f7a49f4aa5ce03953267bb62..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasserver/jonasserver.jsp +++ /dev/null @@ -1,86 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> -<% String cmi = (String)request.getAttribute("cmi"); - String master = (String)request.getAttribute("master"); - %> - - - - - - <%if("true".equals(cmi) || "true".equals(master)){%> - - <%}%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - versions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasserver/jonasversions.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasserver/jonasversions.jsp deleted file mode 100644 index b9fb3df3d6b5bc324914c2ceec8d70bef208f017..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasserver/jonasversions.jsp +++ /dev/null @@ -1,45 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> -<% String cmi = (String)request.getAttribute("cmi"); - String master = (String)request.getAttribute("master"); -%> - - - - - - - <%if("true".equals(cmi) || "true".equals(master)){%> - - <%}%> - - - - - - - - - - - -
    -            
    -          
    -
    -
    -
    - -
    -
    - -<%@ include file="../common/end.jsp" %> - -
    - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasserver/jvm.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasserver/jvm.jsp deleted file mode 100644 index c91d8dc6055649c627545c41c5b0cbbc20aaf6a9..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasserver/jvm.jsp +++ /dev/null @@ -1,48 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> -<% String cmi = (String)request.getAttribute("cmi"); - String master = (String)request.getAttribute("master"); -%> - - - - - - - <%if("true".equals(cmi) || "true".equals(master)){%> - - <%}%> - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasserver/listRegistry.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasserver/listRegistry.jsp deleted file mode 100644 index a1c13ce71c3d87e4a5095a05dd969911dab2d058..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasserver/listRegistry.jsp +++ /dev/null @@ -1,105 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> -<% String cmi = (String)request.getAttribute("cmi"); - String master = (String)request.getAttribute("master"); -%> - - - - - - - <%if("true".equals(cmi) || "true".equals(master)){%> - - <%}%> - - - - - - - - - - - - - - - - () - - - - - - - - - - - - - -   - - - - - - - -   - - -   - - - - - - - - - - - - - - - - - () - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasserver/registry.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasserver/registry.jsp deleted file mode 100644 index 6b57d4c2c3720ef4a8654c1c92fa018364f460ae..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasserver/registry.jsp +++ /dev/null @@ -1,136 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> -<% String cmi = (String)request.getAttribute("cmi"); - String master = (String)request.getAttribute("master"); -%> - - - - - - - <%if("true".equals(cmi) || "true".equals(master)){%> - - <%}%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - () - - - - - - - - - - - - - -   - - - - - - - -   - - -   - - - - - - - - - - - - - - - - - () - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasserver/servletServer.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasserver/servletServer.jsp deleted file mode 100644 index 4b23bb6d11cf2a41f7df77a180badf77796da362..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/jonasserver/servletServer.jsp +++ /dev/null @@ -1,111 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> -<% String cmi = (String)request.getAttribute("cmi"); - String master = (String)request.getAttribute("master"); -%> - - - - - - - <%if("true".equals(cmi) || "true".equals(master)){%> - - <%}%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/addreader.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/addreader.jsp deleted file mode 100644 index 70eb441b7225d745053bea197d1e514adb8cd2a8..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/addreader.jsp +++ /dev/null @@ -1,110 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/addwriter.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/addwriter.jsp deleted file mode 100644 index 9728a01d0d9a73496e543859849c4ddb955a3c31..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/addwriter.jsp +++ /dev/null @@ -1,110 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/createdestination.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/createdestination.jsp deleted file mode 100644 index 04afbb60c1de8e5f84f22feb08dd70a10f4b19fa..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/createdestination.jsp +++ /dev/null @@ -1,89 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/createuser.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/createuser.jsp deleted file mode 100644 index 324ea12b4ddeef13cc3ab6bd0193deab56defbf1..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/createuser.jsp +++ /dev/null @@ -1,81 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramadapter.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramadapter.jsp deleted file mode 100644 index ed5582d14c00d0458e6190815fe350cbd526da32..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramadapter.jsp +++ /dev/null @@ -1,67 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramdestinations.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramdestinations.jsp deleted file mode 100644 index d76cdaaeed2691212b2cf6fffd77ecb04287edc6..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramdestinations.jsp +++ /dev/null @@ -1,138 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramdeststatistics.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramdeststatistics.jsp deleted file mode 100644 index 127b44d62714f46c8693618b3d54c27e43052ba3..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramdeststatistics.jsp +++ /dev/null @@ -1,78 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramplatform.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramplatform.jsp deleted file mode 100644 index 5de65939b5e7c5b4f6b8e52f020f571a83aff83b..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramplatform.jsp +++ /dev/null @@ -1,191 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramqueue.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramqueue.jsp deleted file mode 100644 index 1c4a6a95376dd00add65d3ed4fd8f49e5395f966..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramqueue.jsp +++ /dev/null @@ -1,170 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramqueuereaders.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramqueuereaders.jsp deleted file mode 100644 index fa1fee2566f4f589127394681227e6f63355eca3..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramqueuereaders.jsp +++ /dev/null @@ -1,130 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramqueuewriters.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramqueuewriters.jsp deleted file mode 100644 index d06ff2bf1c71578e1f46b0ac9382292334cfaac4..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramqueuewriters.jsp +++ /dev/null @@ -1,130 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramremotedestinations.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramremotedestinations.jsp deleted file mode 100644 index 69c008e2991aed0213358c668640fe66626beab5..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramremotedestinations.jsp +++ /dev/null @@ -1,133 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramremoteserver.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramremoteserver.jsp deleted file mode 100644 index 11e27e73ad1fd8445808327b42e0d28431d79481..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramremoteserver.jsp +++ /dev/null @@ -1,44 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramservers.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramservers.jsp deleted file mode 100644 index eb5f3c01af385b935db01347742d1edb2950fc42..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramservers.jsp +++ /dev/null @@ -1,93 +0,0 @@ - -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramtopic.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramtopic.jsp deleted file mode 100644 index 7ac58b44c645073048d0a3b1f1bd6bd446406056..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramtopic.jsp +++ /dev/null @@ -1,141 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramtopicreaders.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramtopicreaders.jsp deleted file mode 100644 index 8188a8c3ac747edc9e4a9def4f7f6b9ac97907ce..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramtopicreaders.jsp +++ /dev/null @@ -1,130 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramtopicwriters.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramtopicwriters.jsp deleted file mode 100644 index a3a7615933a0c7894d461ff719a5fd70800628e7..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramtopicwriters.jsp +++ /dev/null @@ -1,131 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramusers.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramusers.jsp deleted file mode 100644 index 4d0f6549ecb9962e76f8a5220fabab99661af1e4..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramusers.jsp +++ /dev/null @@ -1,93 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramxml.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramxml.jsp deleted file mode 100644 index 96dab312fd1fe950268fb111c24a1fee56387487..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/joramxml.jsp +++ /dev/null @@ -1,30 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/queueUsedBy.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/queueUsedBy.jsp deleted file mode 100644 index 34abdbf944e6aadc3fea8d2e05b1bd9ba0b99788..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/queueUsedBy.jsp +++ /dev/null @@ -1,77 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/removeDestinationsConfirm.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/removeDestinationsConfirm.jsp deleted file mode 100644 index 22588850c9d3a333fcba7cae7edd59ff9f2ed155..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/removeDestinationsConfirm.jsp +++ /dev/null @@ -1,56 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/removeUsersConfirm.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/removeUsersConfirm.jsp deleted file mode 100644 index 8cb3f7c042320c2f743b678535bd70906be9a9b0..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/removeUsersConfirm.jsp +++ /dev/null @@ -1,56 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/topicUsedBy.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/topicUsedBy.jsp deleted file mode 100644 index fecf993f03f0b6237c2ebbc474d9eb4846ce1a6c..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/joramplatform/topicUsedBy.jsp +++ /dev/null @@ -1,77 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/logging/catalinaAccessLogger.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/logging/catalinaAccessLogger.jsp deleted file mode 100644 index b836054fd7f0930c873b49e37d40b7ec7b8afe1f..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/logging/catalinaAccessLogger.jsp +++ /dev/null @@ -1,159 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - -    - - - - - - - - - -    - -    - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/logging/loggers.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/logging/loggers.jsp deleted file mode 100644 index 435b306b5049488b437971b733fd309539745a07..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/logging/loggers.jsp +++ /dev/null @@ -1,90 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   - - - - - - - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/logging/loggersConfirm.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/logging/loggersConfirm.jsp deleted file mode 100644 index 1172cd021630aeb1a1446db573dcd0eaf971662b..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/logging/loggersConfirm.jsp +++ /dev/null @@ -1,63 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/logging/loggingJonas.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/logging/loggingJonas.jsp deleted file mode 100644 index 85276f54d51cb54e8c546fc1bca2bdb747ec2fa5..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/logging/loggingJonas.jsp +++ /dev/null @@ -1,66 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/logging/loggingView.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/logging/loggingView.jsp deleted file mode 100644 index 77918ee0196c334aaf750acc4e6b987fefc25837..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/logging/loggingView.jsp +++ /dev/null @@ -1,83 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    - - - - - - - - - - - - - - - - - -
    -
    -
    - -<%@ include file="../common/end.jsp" %> - -
    \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/login.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/login.jsp deleted file mode 100644 index 700b09f5d5da4ccd4f620357750e25d0fc78bee7..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/login.jsp +++ /dev/null @@ -1,113 +0,0 @@ - - -<%@ page language="java" contentType="text/html;charset=utf-8"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%> - - - - - - - - -<%@ include file="begin.jsp"%> - - - - - - - - -
    -
    - - - - - - - -
    -
    -

    -

    - -
    -
    - - - - -
    -
    - - - - -
    -
    JOnAS Administration
    -
    - - - - - - - -
      - - - - - - - - - - - - - -
    - -
    - -
      -    -
     
    -
    - - - - - - - -<%@ include file="end.jsp"%> - -
    diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/mbean/listJ2eeMBeans.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/mbean/listJ2eeMBeans.jsp deleted file mode 100644 index 770e5f21c9c041d3338b1c257e3e0484cfced0cc..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/mbean/listJ2eeMBeans.jsp +++ /dev/null @@ -1,42 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - -   - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/mbean/listMBeanAttributes.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/mbean/listMBeanAttributes.jsp deleted file mode 100644 index 77b1f04fbdb325b347b0be201f4067fca238cef3..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/mbean/listMBeanAttributes.jsp +++ /dev/null @@ -1,95 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - == - - -
    -
    -
    -
    -
    - - - - ( - - - - ) - - - - -
    -
    -
    -
    -
    -
    - -<%@ include file="../common/end.jsp" %> -
    diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/mbean/listMBeanOperations.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/mbean/listMBeanOperations.jsp deleted file mode 100644 index 37cdd158b19bcedc7d2410a2ad1510708fb7ab87..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/mbean/listMBeanOperations.jsp +++ /dev/null @@ -1,80 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - () - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/mbean/listMBeanProperties.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/mbean/listMBeanProperties.jsp deleted file mode 100644 index b26a5b17593a0f49103290eb944c34cfb3532709..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/mbean/listMBeanProperties.jsp +++ /dev/null @@ -1,43 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - domain - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/mbean/listMBeans.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/mbean/listMBeans.jsp deleted file mode 100644 index 946423c97d357c1bbeaabf20f32896d7ff2f758d..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/mbean/listMBeans.jsp +++ /dev/null @@ -1,55 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/mbean/listOwnerMBeans.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/mbean/listOwnerMBeans.jsp deleted file mode 100644 index 238ef32c270c6d1f04b1278600722c72923a8bc7..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/mbean/listOwnerMBeans.jsp +++ /dev/null @@ -1,40 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - -   - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/mbean/listUnknownMBeans.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/mbean/listUnknownMBeans.jsp deleted file mode 100644 index cd810e17957b628ed15b8e5187380da78776d8c5..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/mbean/listUnknownMBeans.jsp +++ /dev/null @@ -1,38 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - -   - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/cmiCluster.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/cmiCluster.jsp deleted file mode 100644 index 07e8e5ed2d38f8d0a6818b66b074fdd3387d799d..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/cmiCluster.jsp +++ /dev/null @@ -1,100 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - Info - - - - - - State - - - - - - - - - - Configuration - - - - - - McastAddr - - - - - - - - McastPort - - - - - - - - Protocol - - - - - - - - DelayToRefresh - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/cmiMember.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/cmiMember.jsp deleted file mode 100644 index 64a10e79e166646f39045f64454a37f20a81675e..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/cmiMember.jsp +++ /dev/null @@ -1,36 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - Info - - - - - - State - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/daemonProxyCluster.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/daemonProxyCluster.jsp deleted file mode 100644 index a822af060952c90b4adeb91434f16dc2c62043c9..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/daemonProxyCluster.jsp +++ /dev/null @@ -1,775 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj"%> - -<%@ include file="../common/begin.jsp"%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   - - - - - - - - - - - - - - - - - - - - - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp"%> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/daemonProxyMember.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/daemonProxyMember.jsp deleted file mode 100644 index dcfe68d46886adbb8e5e6d912f3adb91eb70b3ac..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/daemonProxyMember.jsp +++ /dev/null @@ -1,17 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - -

    In progress

    - -<%@ include file="../common/end.jsp" %> - -
    \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/displaynode.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/displaynode.jsp deleted file mode 100644 index 61ca7ed9af06dc61f24b42270e1b7d516f0f647b..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/displaynode.jsp +++ /dev/null @@ -1,715 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8"%> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj"%> - - - -<%@ include file="../common/begin.jsp"%> - - - - - - - - Infos - - - - - - - Global - - - - - State - - - - - - - - Threads Count - - - - - - - - - - Memory Load - - - - - - - - - - Total Memory - - - - - - - - JOnAS Version - - - - - - - - JVM Version - - - - - - - - JVM Vendor - - - - - - - - Protocols - - - - - - - - Jmx Connection URL - - - - - - - - - - - - - Transactions - - - - - Begun Transactions - - - - - - - - - - Committed Transactions - - - - - - - - - - Current Transactions - - - - - - - - - - Expired Transactions - - - - - - - - - - Rolled Back Transactions - - - - - - - - - - - - - - - JOnAS Worker Pool - - - - - Current Pool Size - - - - - - - - Max Pool Size - - - - - - - - Min Pool Size - - - - - - - - - - - - - Tomcat - - - - - Total Max Threads - - - - - - - - Total Threads Number - - - - - - - - Total Threads Busy - - - - - - - - - - Total Bytes Received - - - - - - - - - - Total Bytes Sent - - - - - - - - - - Total Error Count - - - - - - - - - - Total Processing Time - - - - - - - - - - Total Request Count - - - - - - - - - - - - - - - JCA - - - - - Total Opened Connections - - - - - - - - - Total Busy Connections - - - - - - - - - - Total Connection Failures - - - - - - - - - - Total Connection Leaks - - - - - - - - - - Total Rejected 'open' calls - - - - - - - - - - Total served XA connections - - - - - - - - - - Total Waiters - - - - - - - - - - Total Waiting Time - - - - - - - - - - - - - - JDBC - - - - - Total Opened Connections - - - - - - - - Total Busy Connections - - - - - - - - - - Total Connection Failures - - - - - - - - - - Total Connection Leaks - - - - - - - - - - Total Rejected 'open' calls - - - - - - - - - - Total served XA connections - - - - - - - - - - Total Waiters - - - - - - - - - - Total Waiting Time - - - - - - - - - - - - JMS - - - - - Total Messages Received in Queues - - - - - - - - - - Total Messages Delivered from Queues - - - - - - - - - - Total Messages Received in Topics - - - - - - - - - - Total Messages Delivered from Topics - - - - - - - - - - Total Messages Sent to DMQ - - - - - - - - - - - - EJBs - - - - - Number Of EJB - - - - - - - - - - Number Of EntityBean - - - - - - - - - - Number Of Stateful SessionBean - - - - - - - - - - Number Of Stateless SessionBean - - - - - - - - - - Number Of MessageDrivenBean - - - - - - - - - - - - - - - - Global - - - - - - State - - - - - - - - - - - - <%@ include file="../common/end.jsp"%> - - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/ejbHaCluster.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/ejbHaCluster.jsp deleted file mode 100644 index da6cb6a97de8da0a207894c708e8b9bc3ddb40ab..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/ejbHaCluster.jsp +++ /dev/null @@ -1,60 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - Info - - - - - - State - - - - - - - - - - Configuration - - - - - - McastAddr - - - - - - - - McastPort - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/ejbHaMember.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/ejbHaMember.jsp deleted file mode 100644 index 049ef770dbaf368bc54a629a304db8ad8ecdcc65..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/ejbHaMember.jsp +++ /dev/null @@ -1,38 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - Info - - - - - - State - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/graph/serverGraphs.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/graph/serverGraphs.jsp deleted file mode 100644 index e8d8eaa0df0429567b2ff3a587c59eaefb551583..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/graph/serverGraphs.jsp +++ /dev/null @@ -1,88 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../../common/begin.jsp" %> - - - - - - - - - - - <%=serverName%> infos - <%=selectedTabTitle%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/graph/serverTransactionCount.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/graph/serverTransactionCount.jsp deleted file mode 100644 index fede4a5fe122ced777323f9bf45c128afc3f6cd1..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/graph/serverTransactionCount.jsp +++ /dev/null @@ -1,75 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../../common/begin.jsp" %> - - - - - - - - - Server's infos - Tx Graph - - - - - - " name="memory"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/jkCluster.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/jkCluster.jsp deleted file mode 100644 index a190f1dd2a5c09b023a54f54c8c07eeb31bc7abd..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/jkCluster.jsp +++ /dev/null @@ -1,52 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - Info - - - - - - State - - - - - - - - Load balancer workers - - - - - - - - Sticky session - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/jkMember.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/jkMember.jsp deleted file mode 100644 index a4c57d5399a0199cf8660e1bb0e515395aea0961..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/jkMember.jsp +++ /dev/null @@ -1,81 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - Info - - - - - - Host - - - - - - - - State - - - - - - - - - - - - - Jk worker info - - - - - - Load balance factor - - - - - - - - Type - - - - - - - - Port - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/joramCluster.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/joramCluster.jsp deleted file mode 100644 index cea4e0a77181b7065faedc2dff65a9eb6c08d2e1..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/joramCluster.jsp +++ /dev/null @@ -1,36 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - Info - - - - - - State - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/joramMember.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/joramMember.jsp deleted file mode 100644 index dcfe68d46886adbb8e5e6d912f3adb91eb70b3ac..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/joramMember.jsp +++ /dev/null @@ -1,17 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - -

    In progress

    - -<%@ include file="../common/end.jsp" %> - -
    \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/logicalCluster.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/logicalCluster.jsp deleted file mode 100644 index d107d1708b12f57c77ba43758b137fa555d6d21a..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/logicalCluster.jsp +++ /dev/null @@ -1,38 +0,0 @@ - -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - Info - - - - - - State - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/logicalMember.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/logicalMember.jsp deleted file mode 100644 index dcfe68d46886adbb8e5e6d912f3adb91eb70b3ac..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/logicalMember.jsp +++ /dev/null @@ -1,17 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - -

    In progress

    - -<%@ include file="../common/end.jsp" %> - -
    \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/memory.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/memory.jsp deleted file mode 100644 index afda226e43bbcc03f76fcc9186950ac61965cfcf..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/memory.jsp +++ /dev/null @@ -1,78 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - " name="memory" width="" height=""> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/monitoring.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/monitoring.jsp deleted file mode 100644 index 0628410acd0419a66774b269a9caf793630e431a..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/monitoring.jsp +++ /dev/null @@ -1,56 +0,0 @@ - -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/stackDump.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/stackDump.jsp deleted file mode 100644 index 384036034a39490df7bad7bcc6e1c7659aafaadf..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/stackDump.jsp +++ /dev/null @@ -1,30 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp"%> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/tomcatCluster.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/tomcatCluster.jsp deleted file mode 100644 index 6ac7f254c32ec357354fb296b20bb24a9e3da7fc..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/tomcatCluster.jsp +++ /dev/null @@ -1,87 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - Info - - - - - - State - - - - - - - - - - Membership multicast ping - - - - - - McastAddr - - - - - - - - McastPort - - - - - - - - McastFrequency - - - - - - - - McastDropTime - - - - - - - - McastSocketTimeout - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/tomcatMember.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/tomcatMember.jsp deleted file mode 100644 index 7658d78358c83e15d5c1ae0074d6c86d1c659338..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/monitoring/tomcatMember.jsp +++ /dev/null @@ -1,148 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - Info - - - - - - Host - - - - - - - - State - - - - - - - - - - - - - - Receiver info - - - - - - Version info - - - - - - - - TCP listener address - - - - - - - - TCP listener port - - - - - - - - Number of TCP listener worker threads - - - - - - - - - - - - Sender info - - - - - - Version info - - - - - - - - Replication mode - - - - - - - - Acknowledge timeout - - - - - - - - AutoConnect - - - - - - - - Create processing time stats - - - - - - - - Wait for ack after data send - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/createDestination.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/createDestination.jsp deleted file mode 100644 index a1c013f501d717c9acf13c4f98da32fe21e2b612..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/createDestination.jsp +++ /dev/null @@ -1,72 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/datasourceProperties.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/datasourceProperties.jsp deleted file mode 100644 index 0eb6f20c7a79845f8e10ba4e2db3a4a47dc8a799..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/datasourceProperties.jsp +++ /dev/null @@ -1,221 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/datasources.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/datasources.jsp deleted file mode 100644 index 0a8cff2bdf6493079a61cf98e19265b1cd484206..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/datasources.jsp +++ /dev/null @@ -1,81 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   - - - - - - - - -   - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/deployDatasource.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/deployDatasource.jsp deleted file mode 100644 index 97974d1b00ecbf20fac0e75ba1a190d1b3abe2c4..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/deployDatasource.jsp +++ /dev/null @@ -1,77 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - -   - - - - - - - - - - - - - - -
    - - - -
     
    - - - -
    -
    - - - - - - -
    - -   - -   - -
    - - - - - - - - - - - -
    -
    -
    - -<%@ include file="../common/end.jsp" %> - -
    - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/deployMailFactory.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/deployMailFactory.jsp deleted file mode 100644 index ff29bffe8f8d28d6d7537b1f10065f1132750322..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/deployMailFactory.jsp +++ /dev/null @@ -1,77 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - -   - - - - - - - - - - - - - - -
    - - - -
     
    - - - -
    -
    - - - - - - -
    - -   - -   - -
    - - - - - - - - - - - -
    -
    -
    - -<%@ include file="../common/end.jsp" %> - -
    - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/destinationsConfirm.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/destinationsConfirm.jsp deleted file mode 100644 index bc2b196a801df2d726e2f25df38ed334756e1d50..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/destinationsConfirm.jsp +++ /dev/null @@ -1,54 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/jmsResources.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/jmsResources.jsp deleted file mode 100644 index d6334c5a5b8256426d89060ad7c1d4d7752b553d..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/jmsResources.jsp +++ /dev/null @@ -1,98 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/mailFactories.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/mailFactories.jsp deleted file mode 100644 index 9fdcacd16690fbdf30150f0265f3d87fc8482109..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/mailFactories.jsp +++ /dev/null @@ -1,101 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   - - - - - - - - - - - - - - - - - -   - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/mailFactoryProperties.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/mailFactoryProperties.jsp deleted file mode 100644 index 7660c6de119154cd23201f92b5ee95e422fbbdb4..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/mailFactoryProperties.jsp +++ /dev/null @@ -1,137 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/mimePartFactoryProperties.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/mimePartFactoryProperties.jsp deleted file mode 100644 index dbf4d1d0d619c1844348c0bc81bee931918bc0e0..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/mimePartFactoryProperties.jsp +++ /dev/null @@ -1,133 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/sessionFactoryProperties.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/sessionFactoryProperties.jsp deleted file mode 100644 index 6632424b4097b2afde10c6513d7b702d52b9d93d..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/resource/sessionFactoryProperties.jsp +++ /dev/null @@ -1,105 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/resourceadapter/createJDBCResourceAdapter.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/resourceadapter/createJDBCResourceAdapter.jsp deleted file mode 100644 index 0cd411d22a80a9fc7bda778debb1616f6beedb42..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/resourceadapter/createJDBCResourceAdapter.jsp +++ /dev/null @@ -1,292 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/resourceadapter/createOtherResourceAdapter.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/resourceadapter/createOtherResourceAdapter.jsp deleted file mode 100644 index 831d9672ed94c0a2c985cccd4632e02733b49bd7..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/resourceadapter/createOtherResourceAdapter.jsp +++ /dev/null @@ -1,115 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/resourceadapter/createResourceAdapter.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/resourceadapter/createResourceAdapter.jsp deleted file mode 100644 index c715c1ccf344befc83355a5c2bc8d62d4fa0a65b..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/resourceadapter/createResourceAdapter.jsp +++ /dev/null @@ -1,73 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JDBC (DriverManager)
    - Other
    -
    -
    - - - - - - -
    -
    -
    -
    - -<%@ include file="../common/end.jsp" %> - -
    - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/script/jonasAdmin.js b/jonas/modules/ee-components/jonas-admin/src/main/webapp/script/jonasAdmin.js deleted file mode 100644 index 68b4048665aa144ee3ede3a6e3a199eed631fa38..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/script/jonasAdmin.js +++ /dev/null @@ -1,214 +0,0 @@ -function ListOption(content, id) -{ - this.content = content; - this.id = id; -} -function copySelected(p_FormName, p_ListNameSource, p_ListNameDestination) -{ - var oSelectSrc = eval("document." + p_FormName + "." + p_ListNameSource + "Selected"); - var oSelectDst = eval("document." + p_FormName + "." + p_ListNameDestination + "Selected"); - var len, i, cpt, cptSel; - var tab = new Array(); - var tabSel = new Array(); - cpt = 0; - cptSel = 0; - oSelectDst.selectedIndex = -1; - for (i = 0; i < oSelectSrc.options.length; i++) - { - if (oSelectSrc.options[i].selected) - { - oSelectDst.options[oSelectDst.options.length] = new Option(oSelectSrc.options[i].text,oSelectSrc.options[i].value); - tabSel[cptSel++] = oSelectDst.options[oSelectDst.options.length - 1]; - } - else - tab[cpt++] = new ListOption(oSelectSrc.options[i].text, oSelectSrc.options[i].value); - } - // we recontruct the select options, otherwise, IE5 crashes when you affect null value to a select option - oSelectSrc.selectedIndex = -1; - oSelectSrc.options.length = 0; - for (i = 0; i < tab.length; i++) - oSelectSrc.options[i] = new Option(tab[i].content, tab[i].id); - // we reselected the item which have just been moved - for (i = 0; i < tabSel.length; i++) - tabSel[i].selected = true; - // Update the corresponding Hidden field - updateHiddenSelect(p_FormName, p_ListNameSource); - updateHiddenSelect(p_FormName, p_ListNameDestination); - return false; -} - - -function selectToString(p_Select) -{ - var len = p_Select.length; - var i; - var res; - res = ""; - for (i = 0; i < len; i++) - { - res += p_Select.options[i].value; - if (i < len - 1) - res += ","; - } - return res; -} - - -function updateHiddenSelect(p_FormName, p_ListName) -{ - var oSelect = eval("document." + p_FormName + "." + p_ListName + "Selected"); - var oHidden = eval("document." + p_FormName + "." + p_ListName); - oHidden.value = selectToString(oSelect); -} - -function submitHiddenSimple(p_FormName, p_HiddenName, p_HiddenValue) -{ - var oForm = eval("document." + p_FormName); - var oHidden = eval("document." + p_FormName + "." + p_HiddenName); - oHidden.value = p_HiddenValue; - oForm.submit(); -} - - -function submitHidden() -{ - var oHidden; - var oForm = eval("document." + arguments[0]); - for (i=1; i < arguments.length; i+=2) - { - oHidden = eval("document." + arguments[0] + "." + arguments[i]); - oHidden.value = arguments[i+1]; - } - oForm.submit(); -} - - -function submitForm() -{ - var oForm = eval("document." + arguments[0]); - oForm.submit(); -} - - -function refreshTree() -{ - if (arguments.length > 0) - { - var sHref = arguments[0]; - if (sHref.length > 0) - { - top.tree.location.href = sHref; - return; - } - } - top.tree.location.reload(); -} - -function selAll(p_FormName, p_Servers, _v) -{ -var oForm = eval("document." + p_FormName + "." + p_Servers); -for(var i=0;i< oForm.length ;i++) - -oForm[i].selected=_v; -} -function enableReplace(p_FormName) -{ - var checkBox = eval("document." + p_FormName + ".replaceOnTarget"); - checkBox.disabled = false; -} -function disableReplace(p_FormName) -{ - var checkBox = eval("document." + p_FormName + ".replaceOnTarget"); - checkBox.disabled = true; -} - -function setHidden(p_FormName, p_HiddenName, p_HiddenValue) { - var oForm = eval("document." + p_FormName); - var oHidden = eval("document." + p_FormName + "." + p_HiddenName); - oHidden.value = p_HiddenValue; - } - - - /** - - **/ - function checkNotEmpty(eltId) { - var elt; - if (document.getElementById) { - //try to use DOM - elt = document.getElementById(eltId); - alert('DOM not activated'); - } else { - elt = document.forms[0].elements[eltId]; - alert('DOM not activated'); - } - - var elt = document.getElementById(eltId); - if (elt.value == "") { - alert('the field cannot be empty'); - elt.focus(); - } - } - - -//confirm operation before submitting.usefull when removing. -/** - arguments[0] the form name - arguments[1]..arguments[argument.length-2]: actioName;actionValue - arguments[argument.length-1]: the confirm message -**/ -function submitHiddenWithConfirm() { - var oHidden; - var oForm = eval("document." + arguments[0]); - for (i=1; i < arguments.length-1; i+=2) - { - oHidden = eval("document." + arguments[0] + "." + arguments[i]); - oHidden.value = arguments[i+1]; - } - //argument[length -1] == message to display - var response = confirm(arguments[i]); - if(response == true) { - //response is "yes" - oForm.submit(); - }else { - return; - } -} -/** - formName: the form name - actionElt: the action element - actionToApply: action to Apply (blacklist/unblacklist) - serverElt: form element that will contain a server value - serverValue: The value to set in serverElt -**/ -function applyCmiServerAction(formName, actionElt, actionToApply, serverElt, serverValue) { - var oForm = document.forms[formName]; - var action = oForm.elements[actionElt]; - action.value = actionToApply; - var server = oForm.elements[serverElt]; - server.value = serverValue; - oForm.submit(); - return; -} - -/** - * Diplay the url of a given deployable. - * @param selectables : set of selectable deployables. - * @param where2display : html text where to display the url. - */ -function displayDeployable(selectable, where2display) { - var dispDest; - var selectElement; - if (document.getElementById) { - //try to use DOM - dispDest = document.getElementById(where2display); - //selectElement = document.getElementById(selectable.id); - } else { - dispDest = document.forms[0].elements[where2display]; - //selectElement = document.forms[0].elements[selectable.id]; - } - dispDest.value = selectable.value; - dispDest.size = selectable.value.length + 5; - selectable.title = selectable.value; -} - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/confirmActionMemoryRealm.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/confirmActionMemoryRealm.jsp deleted file mode 100644 index 5f0ba2ed47ec301310c4041a8dc06c0c96d8d2c6..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/confirmActionMemoryRealm.jsp +++ /dev/null @@ -1,108 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/datasourceRealm.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/datasourceRealm.jsp deleted file mode 100644 index 2007096f6b03ff4a3aa1f52983bec3532bff64b7..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/datasourceRealm.jsp +++ /dev/null @@ -1,133 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - -    - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/groupMemoryRealm.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/groupMemoryRealm.jsp deleted file mode 100644 index f9538793884494deec4a0b95d27e5573938b516c..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/groupMemoryRealm.jsp +++ /dev/null @@ -1,153 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   - - - - - - - - - - - - - - -
    -    -
     
    -    -
    -
    - - - - - - -
    -
    - - - - - - - - - - - - - - - - - -
    -
    -
    - -<%@ include file="../common/end.jsp" %> - -
    - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/ldapRealm.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/ldapRealm.jsp deleted file mode 100644 index 9c0af067f56f70ad5fc87d2700a991481863ce79..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/ldapRealm.jsp +++ /dev/null @@ -1,201 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - -    - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/memoryRealm.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/memoryRealm.jsp deleted file mode 100644 index d1b5189cfb170bf6b90d3201116dcfa9456cf38f..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/memoryRealm.jsp +++ /dev/null @@ -1,125 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   - -   - - - - - - - - - - - - - - - - - - - -    - -    - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/memoryRealmGroups.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/memoryRealmGroups.jsp deleted file mode 100644 index 6f3427ffabdce2b1db70c541bbe6a212bc904d07..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/memoryRealmGroups.jsp +++ /dev/null @@ -1,101 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/memoryRealmRoles.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/memoryRealmRoles.jsp deleted file mode 100644 index fa25bf01190ffd4bf7b43fb93b0e4392819a868b..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/memoryRealmRoles.jsp +++ /dev/null @@ -1,100 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/memoryRealmUsers.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/memoryRealmUsers.jsp deleted file mode 100644 index 45097849d53582565c128fe0781322a248dd2277..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/memoryRealmUsers.jsp +++ /dev/null @@ -1,100 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/realms.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/realms.jsp deleted file mode 100644 index 20841119b15f70c14fbbce38d55ab33355cf0cb9..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/realms.jsp +++ /dev/null @@ -1,161 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/realmsConfirm.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/realmsConfirm.jsp deleted file mode 100644 index 668ac4fd102dc459c4fc59bb2a3bf7e2ced9df43..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/realmsConfirm.jsp +++ /dev/null @@ -1,86 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/realmsStopped.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/realmsStopped.jsp deleted file mode 100644 index 15d905447c594abbf4e55440de02d1cc02ac87e8..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/realmsStopped.jsp +++ /dev/null @@ -1,26 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - not active - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/roleMemoryRealm.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/roleMemoryRealm.jsp deleted file mode 100644 index e2e83820e5dcfc939d625d43acbfb69291aa11b3..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/roleMemoryRealm.jsp +++ /dev/null @@ -1,112 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/securityCatalinaRealm.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/securityCatalinaRealm.jsp deleted file mode 100644 index b4daa96e75a94f1d855fbfbff9e7cf8bc1bae828..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/securityCatalinaRealm.jsp +++ /dev/null @@ -1,50 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - -   - - - - - - - - - - -   - -   - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/userMemoryRealm.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/userMemoryRealm.jsp deleted file mode 100644 index e302f27aba7ee07bf5a2221fe42be275c215bc42..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/security/userMemoryRealm.jsp +++ /dev/null @@ -1,213 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   - - - - - - - - - - - - - - -
    -    -
     
    -    -
    -
    - - - - - - -
    -
    - - - - - - - - - - - - -   - - - - - - - - - - - - - - -
    -    -
     
    -    -
    -
    - - - - - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    - -<%@ include file="../common/end.jsp" %> - -
    - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/appContainers.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/appContainers.jsp deleted file mode 100644 index 2a7f5d4b581eaa8aa71ac0ce7807eed5b2dc1574..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/appContainers.jsp +++ /dev/null @@ -1,57 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - -   -   - - - - - - -   - -   - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/cfUsedBy.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/cfUsedBy.jsp deleted file mode 100644 index 2c7448d5d44614d06b7f0301c059af36b028191e..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/cfUsedBy.jsp +++ /dev/null @@ -1,67 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.action.Action"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/confirmActionXaResource.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/confirmActionXaResource.jsp deleted file mode 100644 index 640dc2e4fd1c296d045d9f35c81b17fcdb1d04b3..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/confirmActionXaResource.jsp +++ /dev/null @@ -1,69 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/container.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/container.jsp deleted file mode 100644 index 457ac64843c90b6ebf5386fb6a93faa9bcecbd6a..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/container.jsp +++ /dev/null @@ -1,53 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/containerEjbs.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/containerEjbs.jsp deleted file mode 100644 index 9b811c953b43307edd4c1231800a6de5786c3b93..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/containerEjbs.jsp +++ /dev/null @@ -1,69 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/containerStatistic.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/containerStatistic.jsp deleted file mode 100644 index 40ee40498f973e062497500b1aa63e29a0bbe056..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/containerStatistic.jsp +++ /dev/null @@ -1,186 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/containers.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/containers.jsp deleted file mode 100644 index 136084654dc19b94a3d10f320c58ebacfcf158bd..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/containers.jsp +++ /dev/null @@ -1,60 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/databases.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/databases.jsp deleted file mode 100644 index cab707bc7ec4c000554635eac18d3f545c903faf..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/databases.jsp +++ /dev/null @@ -1,48 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/datasource.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/datasource.jsp deleted file mode 100644 index ef5eb5215e22eb9b30576e7ebf5bb92cfd3c2a97..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/datasource.jsp +++ /dev/null @@ -1,174 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - -    - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/datasourceStatistics.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/datasourceStatistics.jsp deleted file mode 100644 index 0ca43c590dd3487e18dda08754477737a7d23c7f..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/datasourceStatistics.jsp +++ /dev/null @@ -1,180 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.action.Action"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/datasourceUsedBy.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/datasourceUsedBy.jsp deleted file mode 100644 index 3faf4ef84a73b5ddb652fcbb6f9942775652bf51..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/datasourceUsedBy.jsp +++ /dev/null @@ -1,64 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.action.Action"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/depmonitorService.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/depmonitorService.jsp deleted file mode 100644 index 430512ae7576247088d87c7b7ac72626237daff9..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/depmonitorService.jsp +++ /dev/null @@ -1,75 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - -    - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/discovery.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/discovery.jsp deleted file mode 100644 index ff5d68c8e933ebc6fd572aa87be6cc4a97533efa..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/discovery.jsp +++ /dev/null @@ -1,66 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ear.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ear.jsp deleted file mode 100644 index a2f5630c36708eae1ed13031f5a7707663b606a7..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ear.jsp +++ /dev/null @@ -1,52 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/earJars.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/earJars.jsp deleted file mode 100644 index 745a05120b9d7a6c7981e436618912f0a2401228..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/earJars.jsp +++ /dev/null @@ -1,61 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/earRars.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/earRars.jsp deleted file mode 100644 index e7f2c3568f724d8931b6b2bd7b8a3dea92091b0d..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/earRars.jsp +++ /dev/null @@ -1,59 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/earWars.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/earWars.jsp deleted file mode 100644 index f80ce30d93d49ea8929b80bd5e54d09639abe018..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/earWars.jsp +++ /dev/null @@ -1,61 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/earXmlDeployment.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/earXmlDeployment.jsp deleted file mode 100644 index 61dfdf95ebdb65c931da6dea98d67728a2d6a079..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/earXmlDeployment.jsp +++ /dev/null @@ -1,47 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ejb.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ejb.jsp deleted file mode 100644 index 8b175bcfb5bc716131204c61f3d20e7331199592..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ejb.jsp +++ /dev/null @@ -1,38 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - Type - - - - Name - - - - File - - - - Node - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ejbContainerService.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ejbContainerService.jsp deleted file mode 100644 index ca837f78f39dd041cf5db4cbbb760b2b37a839d4..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ejbContainerService.jsp +++ /dev/null @@ -1,48 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ejbContainersStatistic.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ejbContainersStatistic.jsp deleted file mode 100644 index 911c88ef20b72fad9d0c697377b741a47d588ad3..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ejbContainersStatistic.jsp +++ /dev/null @@ -1,208 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj"%> - - -<%@ include file="../common/begin.jsp"%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - - - - - - - - - - -<%@ include file="../common/end.jsp"%> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ejbDependency.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ejbDependency.jsp deleted file mode 100644 index 895567c4a8aab994d0dfdb1c7b5516c559e4ec9f..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ejbDependency.jsp +++ /dev/null @@ -1,260 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.action.Action"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <% - java.util.HashMap params = new java.util.HashMap(); - params.put("name", param1); - params.put("id", param2); - pageContext.setAttribute("paramsName", params); - %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ejbEntity.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ejbEntity.jsp deleted file mode 100644 index eb7aaa93d9cf4c3c04cf06e2d10fba65c632d6f1..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ejbEntity.jsp +++ /dev/null @@ -1,175 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ejbMessage.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ejbMessage.jsp deleted file mode 100644 index 7d41ff1211f9d5c77dc5428ecc9507c28a0f8319..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ejbMessage.jsp +++ /dev/null @@ -1,143 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ejbSession.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ejbSession.jsp deleted file mode 100644 index e32909bb79a63bd2c9c7c24f9c9dd533d6823826..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ejbSession.jsp +++ /dev/null @@ -1,203 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ejbVirtual.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ejbVirtual.jsp deleted file mode 100644 index 0b7f17e18676015b12526c8fc20ad59f5ccf0ac4..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ejbVirtual.jsp +++ /dev/null @@ -1,76 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - -
    " method="post"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - -
    \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jmsConnFactories.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jmsConnFactories.jsp deleted file mode 100644 index f87160a35d13ea3942249a37bd2dfbc913b713c4..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jmsConnFactories.jsp +++ /dev/null @@ -1,40 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jmsConnFactory.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jmsConnFactory.jsp deleted file mode 100644 index e277f19ee85c833c170bf1500ae8627f3c25527c..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jmsConnFactory.jsp +++ /dev/null @@ -1,37 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jmsDestinations.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jmsDestinations.jsp deleted file mode 100644 index 2c816afdd9fd922ecba4f7d2df7f15b3c63c79c3..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jmsDestinations.jsp +++ /dev/null @@ -1,24 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jmsQueue.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jmsQueue.jsp deleted file mode 100644 index 291a3a39bd12f3bf6cbee41aea39578c9b8d9a07..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jmsQueue.jsp +++ /dev/null @@ -1,41 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jmsQueues.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jmsQueues.jsp deleted file mode 100644 index 3e9b61a3476c4c55cfb1cae0003299a5adcdcf34..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jmsQueues.jsp +++ /dev/null @@ -1,42 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jmsService.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jmsService.jsp deleted file mode 100644 index 3a6649758562ecc5052fc91e6e38cb450ae06db1..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jmsService.jsp +++ /dev/null @@ -1,40 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jmsTopic.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jmsTopic.jsp deleted file mode 100644 index 36dbe90139124de90aa0c12013cec2bcc5b381b6..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jmsTopic.jsp +++ /dev/null @@ -1,37 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jmsTopics.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jmsTopics.jsp deleted file mode 100644 index 03bd6510c66c654096da6d7fed5dc240b67c7a00..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jmsTopics.jsp +++ /dev/null @@ -1,42 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jtmService.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jtmService.jsp deleted file mode 100644 index 623ff46e8dc6e25ade053c40310492c3c12b8099..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jtmService.jsp +++ /dev/null @@ -1,73 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - -    - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jtmServiceStopped.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jtmServiceStopped.jsp deleted file mode 100644 index 1b45441d8d0e9982aac7e677feefef2b7464bf81..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/jtmServiceStopped.jsp +++ /dev/null @@ -1,32 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - not active. - - - - - - - -<%@ include file="../common/end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/mailService.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/mailService.jsp deleted file mode 100644 index be3f783850a922abf43f5fcbeb66b7aa207f1b65..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/mailService.jsp +++ /dev/null @@ -1,41 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/mimepartFactories.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/mimepartFactories.jsp deleted file mode 100644 index c3acfb61dbf18eb24ec0646f6cf56c5f20ec45d4..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/mimepartFactories.jsp +++ /dev/null @@ -1,49 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/mimepartFactory.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/mimepartFactory.jsp deleted file mode 100644 index 0d2dd1eb2f4319e8e33a78a44de555b5cddf1726..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/mimepartFactory.jsp +++ /dev/null @@ -1,134 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - -    - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/mimepartMailFactoryUsedBy.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/mimepartMailFactoryUsedBy.jsp deleted file mode 100644 index b12db714b296f2d92988bc6780f3107e56a40ccf..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/mimepartMailFactoryUsedBy.jsp +++ /dev/null @@ -1,63 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/queueUsedBy.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/queueUsedBy.jsp deleted file mode 100644 index 301a156960d4654832128ac831259c216bf955ef..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/queueUsedBy.jsp +++ /dev/null @@ -1,67 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.action.Action"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar10.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar10.jsp deleted file mode 100644 index 152715e20913638c8a6681a75369aa7173fcceca..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar10.jsp +++ /dev/null @@ -1,214 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - -    - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar10Stats.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar10Stats.jsp deleted file mode 100644 index 97e2eac7134835b8e353ca1659d1fe39136ef1c5..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar10Stats.jsp +++ /dev/null @@ -1,181 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.action.Action"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar15.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar15.jsp deleted file mode 100644 index d73b16ec4989814ec1492652b84dd5155ea5a1e2..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar15.jsp +++ /dev/null @@ -1,120 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar15AO.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar15AO.jsp deleted file mode 100644 index eba6f6369716f960e70818184e0aee11033251c7..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar15AO.jsp +++ /dev/null @@ -1,80 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar15AOs.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar15AOs.jsp deleted file mode 100644 index e92c6e72391e28ee84384f38267e8e54c0946db5..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar15AOs.jsp +++ /dev/null @@ -1,52 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar15AS.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar15AS.jsp deleted file mode 100644 index cb86a2e03dce5b5cb6df46e2459e62f845a887e0..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar15AS.jsp +++ /dev/null @@ -1,80 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar15ASs.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar15ASs.jsp deleted file mode 100644 index dfba190af7ba52f2932bb07d11463710506686be..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar15ASs.jsp +++ /dev/null @@ -1,53 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar15CF.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar15CF.jsp deleted file mode 100644 index aaf4ab0283bb3491219af1f9d9889f4aed80cabe..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar15CF.jsp +++ /dev/null @@ -1,189 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - -    - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar15CFStats.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar15CFStats.jsp deleted file mode 100644 index df4d3bf67bde4a512cf6e17de252fd76d36cca2f..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar15CFStats.jsp +++ /dev/null @@ -1,195 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.action.Action"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar15CFs.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar15CFs.jsp deleted file mode 100644 index 4644e80e587bb1a73a525e39d33bb530a92cc39f..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rar15CFs.jsp +++ /dev/null @@ -1,52 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rarPoolStatistics.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rarPoolStatistics.jsp deleted file mode 100644 index 812b88c53699f65a894f61d094b88360ff56906e..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rarPoolStatistics.jsp +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rarStatistics.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rarStatistics.jsp deleted file mode 100644 index a03a4b37489be32165bf4a94200981c4310e80c3..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rarStatistics.jsp +++ /dev/null @@ -1,180 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.action.Action"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rarUsedBy10.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rarUsedBy10.jsp deleted file mode 100644 index a527d19da98b21a1864d6b6f9399de27d39f8648..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rarUsedBy10.jsp +++ /dev/null @@ -1,64 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.action.Action"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rarUsedBy15.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rarUsedBy15.jsp deleted file mode 100644 index f2a7e4213f71921e0d904fe479a8b4843d6c99d3..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rarUsedBy15.jsp +++ /dev/null @@ -1,77 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.action.Action"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rars.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rars.jsp deleted file mode 100644 index ea431a3e7a728b36132c60bbb34744d95312b715..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/rars.jsp +++ /dev/null @@ -1,59 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/security.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/security.jsp deleted file mode 100644 index f57f3ad5244efe46c64eef0ef0219cd51dbb84fe..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/security.jsp +++ /dev/null @@ -1,90 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   - -   - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/securityStopped.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/securityStopped.jsp deleted file mode 100644 index 39bf12980e8efc011dd32d603b5d1d87f8ba5455..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/securityStopped.jsp +++ /dev/null @@ -1,28 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - not active. - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/services.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/services.jsp deleted file mode 100644 index 083d271f105cdd6573712f45d9de0fa04ab24353..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/services.jsp +++ /dev/null @@ -1,233 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - Mandatory services - - - - -   -   -   - - - - - - - - -   - - - - - - - - - - - - - - - - - - - - - - - Container services - - - - -   -   -   - - - - - - - - - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Webservices services - - - - -   -   -   - - - - - - - - - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Other services - - - - -   -   -   - - - - - - - - - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/sessionFactories.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/sessionFactories.jsp deleted file mode 100644 index d9d259437f37b304b4045e50f757e3d5d4a0f881..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/sessionFactories.jsp +++ /dev/null @@ -1,49 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/sessionFactory.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/sessionFactory.jsp deleted file mode 100644 index c412bdb76256c9ed6a00a0ffc89b89218c864c7a..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/sessionFactory.jsp +++ /dev/null @@ -1,108 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - -    - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/sessionMailFactoryUsedBy.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/sessionMailFactoryUsedBy.jsp deleted file mode 100644 index 44fe48b7e0064e69579d46d1d443928584a24ed5..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/sessionMailFactoryUsedBy.jsp +++ /dev/null @@ -1,63 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/smartclientService.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/smartclientService.jsp deleted file mode 100644 index 642e44518e30f1f38a0e57cdf2235e4ad799ee7a..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/smartclientService.jsp +++ /dev/null @@ -1,32 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/topicUsedBy.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/topicUsedBy.jsp deleted file mode 100644 index 41023dd64ef60906739b35282ee2da03195a2ec9..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/topicUsedBy.jsp +++ /dev/null @@ -1,67 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.action.Action"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/transactionMonitor.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/transactionMonitor.jsp deleted file mode 100644 index 23443e9894de7e294fe42c18b42d4d4a8d05752f..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/transactionMonitor.jsp +++ /dev/null @@ -1,60 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/transactionRecovery.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/transactionRecovery.jsp deleted file mode 100644 index 989338036be112c9bcfb4a87a827856dea4a1992..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/transactionRecovery.jsp +++ /dev/null @@ -1,63 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/transactionStatistic.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/transactionStatistic.jsp deleted file mode 100644 index 9de3fc3d2d09353c3dd2d1286ad43592619754af..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/transactionStatistic.jsp +++ /dev/null @@ -1,73 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/versioningService.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/versioningService.jsp deleted file mode 100644 index 15b482d183a1e96f66d4a8703bf16c13b709a922..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/versioningService.jsp +++ /dev/null @@ -1,55 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - -    - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/war.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/war.jsp deleted file mode 100644 index 53a05fdc8430075c925f034f98538f0e3b89d366..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/war.jsp +++ /dev/null @@ -1,94 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/warJonasXml.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/warJonasXml.jsp deleted file mode 100644 index 19b56c0b8133b71ee0b933c58825341bd566b7d4..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/warJonasXml.jsp +++ /dev/null @@ -1,48 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/warServlets.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/warServlets.jsp deleted file mode 100644 index d272fba5d88bb6591a70a2a39f24fab75f8a8d0d..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/warServlets.jsp +++ /dev/null @@ -1,63 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/warWebXml.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/warWebXml.jsp deleted file mode 100644 index 5d8617fef151f2969f8588d918076774d2f06b57..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/warWebXml.jsp +++ /dev/null @@ -1,50 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/webApp.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/webApp.jsp deleted file mode 100644 index 5738894a54e8727c21feb43f63f01927482a654f..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/webApp.jsp +++ /dev/null @@ -1,80 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/webAppCatalina.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/webAppCatalina.jsp deleted file mode 100644 index 015aa4f1e2bec1c688489e91ca2a45d18e1027d3..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/webAppCatalina.jsp +++ /dev/null @@ -1,196 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - -    - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/webAppJetty.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/webAppJetty.jsp deleted file mode 100644 index b9ed6bbd3587b84f784a756372688418adb50ce7..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/webAppJetty.jsp +++ /dev/null @@ -1,116 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/webAppVirtualCatalina.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/webAppVirtualCatalina.jsp deleted file mode 100644 index f5827c74dff1bc7eec3c2897504fa5a4784c1a57..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/webAppVirtualCatalina.jsp +++ /dev/null @@ -1,98 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> -<%@ page import="java.util.Map"%> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - <% - request.setAttribute("tempON", ((String) - ( - ((Map)(request.getAttribute("objectNames"))).get( - ((Map.Entry)context).getKey() - ) - ))); - %> - - - - - - - <%=((Integer)(((Map)(request.getAttribute("nbSessions"))).get(((Map.Entry)context).getKey())))%> - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/webContainers.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/webContainers.jsp deleted file mode 100644 index 925610a96406c71a062f42ccfb65d7e56c3b485c..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/webContainers.jsp +++ /dev/null @@ -1,60 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/workcleanerService.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/workcleanerService.jsp deleted file mode 100644 index d06012186896ee3f38c098f7d5710df7a93934eb..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/workcleanerService.jsp +++ /dev/null @@ -1,82 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - -    - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/workmanagerService.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/workmanagerService.jsp deleted file mode 100644 index 89bc0a978ce7bb793912c78b31ac884315b21233..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/workmanagerService.jsp +++ /dev/null @@ -1,59 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -    - -    - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ws/handlersDetails.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ws/handlersDetails.jsp deleted file mode 100644 index 4c6c777c06851957854c887a6d3965901cdba9e5..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ws/handlersDetails.jsp +++ /dev/null @@ -1,99 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ page import="java.util.HashMap" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - -
    • - -
    • -
      -
    -
    -
    - - - - -
      - -
    • - -
    • -
      -
    -
    -
    - - - - -
      - -
    • - = -
    • -
      -
    -
    -
    -
    - - -
    -
    - -<%@ include file="../../common/end.jsp" %> - -
    diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ws/portComponentsDetails.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ws/portComponentsDetails.jsp deleted file mode 100644 index 37de3a5ff81f7b0d0bc2890581863316a5f13ac5..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ws/portComponentsDetails.jsp +++ /dev/null @@ -1,103 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <%=portUrl %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../../common/end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ws/viewHandlers.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ws/viewHandlers.jsp deleted file mode 100644 index 5436dfb7d5daff9b03d92bd1082beb06ffb17211..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ws/viewHandlers.jsp +++ /dev/null @@ -1,66 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="java.util.HashMap" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <% - HashMap handlerDetailsMap = new HashMap(); - handlerDetailsMap.put("wsdselect", wsdId); - handlerDetailsMap.put("pcselect", pcId); - handlerDetailsMap.put("handlerselect", handlerId); - request.setAttribute("handlerDetailsMap", handlerDetailsMap); - %> - - - - - - - - - - - - - - -<%@ include file="../../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ws/viewPortComponents.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ws/viewPortComponents.jsp deleted file mode 100644 index e6f3058f1b3fb288c08484f20c02fd8f1a8d2a9c..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ws/viewPortComponents.jsp +++ /dev/null @@ -1,62 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="java.util.HashMap" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <% - HashMap paramMap = new HashMap(); - paramMap.put("wsdselect", wsdId); - paramMap.put("pcselect", pcId); - request.setAttribute("paramMap", paramMap); - %> - - - - - - - - <%=portUrl %> - - - - - - - -<%@ include file="../../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ws/webserviceDescriptions.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ws/webserviceDescriptions.jsp deleted file mode 100644 index 729154e2c37d9a0348b49d64f749f9922f8f8ab0..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ws/webserviceDescriptions.jsp +++ /dev/null @@ -1,58 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <%=wsdlUrl %> - - - - - - - - - - - - - - -<%@ include file="../../common/end.jsp" %> - - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ws/webserviceDetails.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ws/webserviceDetails.jsp deleted file mode 100644 index 6d2e26c1f0fb151b51dbb47b30f205a9340f3993..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/ws/webserviceDetails.jsp +++ /dev/null @@ -1,78 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <%=wsdlUrl %> - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../../common/end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/xaresourceRecovery.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/xaresourceRecovery.jsp deleted file mode 100644 index ed28b4f83939495126ac8f71a0daffeecc93be05..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/service/xaresourceRecovery.jsp +++ /dev/null @@ -1,79 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/style/iepngfix.htc b/jonas/modules/ee-components/jonas-admin/src/main/webapp/style/iepngfix.htc deleted file mode 100644 index 4e7199f07a5fc0ef932f09b00694958080d9ae62..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/style/iepngfix.htc +++ /dev/null @@ -1,85 +0,0 @@ - - - - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/style/jonasAdmin.css b/jonas/modules/ee-components/jonas-admin/src/main/webapp/style/jonasAdmin.css deleted file mode 100644 index e37c1950f3ff570bc2d13127d7ebb29852049c2e..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/style/jonasAdmin.css +++ /dev/null @@ -1,659 +0,0 @@ -body { - font-family: arial, verdana, geneva, helvetica, sans-serif; - font-size: 12px; - font-style: normal; - background-color: #a9a9a9; - SCROLLBAR-FACE-COLOR: #FFFFFF; - SCROLLBAR-HIGHLIGHT-COLOR: #FFFFFF; - SCROLLBAR-SHADOW-COLOR: #FFFFFF; - SCROLLBAR-ARROW-COLOR: #FFFFFF; - SCROLLBAR-TRACK-COLOR: #FFFFFF; - scrollbar-3d-light-color: #FFFFFF; - scrollbar-dark-shadow-color: #FFFFFF -} - -img, div { - behavior: url("./style/iepngfix.htc"); -} - -td { - font-family: arial, verdana, geneva, helvetica, sans-serif; - font-size: 12px; - font-style: normal; -} - -a { - font-family: arial, verdana, geneva, helvetica, sans-serif; - font-size: 12px; - font-style: normal; -} - -select { - font-family: arial, verdana, geneva, helvetica, sans-serif; - font-size: 12px; - font-style: normal; -} - -select.deploy { - width: 250px; -} - -select.dispatch { - width: 150px; -} - -input { - font-family: arial, verdana, geneva, helvetica, sans-serif; - font-size: 12px; - font-style: normal; - color:#000000; -} -.longButton { - font-family: arial, verdana, geneva, helvetica, sans-serif; - font-size: 12px; - background-color: #404e55; - color: #FFFFFF; - font-weight: bold; - text-align: center; - margin: em; - text-decoration: none; -} - - -.button { - font-family: arial, verdana, geneva, helvetica, sans-serif; - font-size: 12px; - color: #FFFFFF; - background-color: #404e55; - font-weight: bold; - text-align: center; - text-decoration: none; -} - -.buttonDeploy { - font-family: arial, verdana, geneva, helvetica, sans-serif; - font-size: 12px; - background-color: #404e55; - color: #FFFFFF; - font-weight: bold; - width: 50px; - text-align: center; - text-decoration: none; -} -.buttonSelect { - font-family: arial, verdana, geneva, helvetica, sans-serif; - font-size: 12px; - background-color: #404e55; - color: #FFFFFF; - font-weight: bold; - text-align: center; - text-decoration: none; -} - -td.top { - font-size: 12px; -} - -a.top { - font-size: 12px; - font-weight: bold; - color: #404e55; -} - -a.top:active { - color: #404e55; - text-decoration: none; -} - -a.top:link { - color: #404e55; - text-decoration: none; -} - -a.top:visited { - color: #404e55; - text-decoration: none; -} - -a.top:hover { - color: #000000; - text-decoration: none; -} - -select.top { - font-size: 12px; -} - -td.topTitle { - font-size: 24px; - color: #000000; -} - -td.maintitle { - font-size: 36px; - color: #FFFFFF; -} - -td.tomthumb { - font-size: 14px; -} - -td.topErrors { - font-size: 10px; - color: #000000; - background-color: #E0ECFF; -} - -tr.errors { - color: #000000; - background-color: #E0ECFF; -} - -td.errors { - font-size: 12px; -} - -td.errorTitle { - font-size: 24px; - font-weight: bold; -} - -td.errorLink { - font-size: 16px; - font-weight: bold; -} - -a.error { - font-size: 16px; - font-weight: bold; - color: #404e55; -} - -a.error:active { - color: #404e55; - text-decoration: none; -} - -a.error:link { - color: #404e55; - text-decoration: none; -} - -a.error:visited { - color: #404e55; - text-decoration: none; -} - -a.error:hover { - color: #666666; - text-decoration: none; -} - -td.contentTitle { - font-size: 16px; - color: #404e55; - font-weight: bold; -} - -td.contentTitleImage { - -} - -td.contentTitleTomThumb { - color: #000000; -} - -.contentTitleTomThumbNotLink { - color: #404e55; -} - -a.contentTitleTomThumb:active { - color: #404e55; - text-decoration: none - font-weight: bold; -} - -a.contentTitleTomThumb:link { - color: #404e55; - font-weight: bold; - text-decoration: none -} - -a.contentTitleTomThumb:visited { - color: #404e55; - text-decoration: none -} - -a.contentTitleTomThumb:hover { - color: #000000; - text-decoration: none -} - -tr.gridRowEven { - background-color: #87a4b3; -} - -tr.gridRowOdd { - background-color: #FFFFFF; -} - -a.tab { - text-decoration: none; - font-weight: bold; - color:#D4D0C8; - - -} -a.tab:visited { - color:#D4D0C8; -} - - -a.tab:hover { - color: #FFFFFF; - font-weight: bold; - -} - -td.tab { - background-color:#738188; - color:#FFFFFF; - border: thick; - border-bottom-color: #404e55; - border-bottom-width: 2px; -} - -td.tabSelect { - color: #FFFFFF; - background-color:#404e55; - border: thick; - font-weight: bold; - border-bottom-color: #404e55; - border-bottom-width: 2px; - border-bottom-width: 1px; - -} - -td.tabSeparatorVertical { - width: 5px; - background-color: transparent; - border-bottom-color: #404e55; - border-bottom-width: 2px; -} - -td.tabSeparatorHorizontal { - width: 0px; -} - - - -tr.panel { - background-color:#87a4b3; -} - -td.panel { - background-color:#404e55; - border-bottom-color: #FFFFFF; - border-bottom-width: 3px; -} - -a.panel { - font-size: 12px; - font-weight: bold; - color: #404e55; -} - -a.panel:active { - color: #404e55; - text-decoration: underline; -} - -a.panel:link { - color: #404e55; - text-decoration: underline; -} - -a.panel:visited { - color: #404e55; - text-decoration: underline; -} - -a.panel:hover { - color: #000000; - text-decoration: underline; -} - -tr.panelTitle { - background-color: #404e55; -} - -td.panelTitle { - font-size: 14px; - color: #FFFFFF; - font-weight: bold; -} - -tr.panelTitle2 { - background-color: #D4D0C8; -} - -td.panelTitle2 { - font-size: 14px; - color: #404e55; - font-weight: bold; -} - -tr.panelSeparator { - background-color: #D4D0C8; -} - -td.panelSeparator { - background-color: #87a4b3; - font-size: 1px; -} - -a.action { - font-family: arial, verdana, geneva, helvetica, sans-serif; - font-size: 12px; - font-style: normal; - font-weight: bold; - color: #660066; -} - -a.action:active { - color: #660066; - text-decoration: underline; -} - -a.action:link { - color: #660066; - text-decoration: none; -} - -a.action:visited { - color: #660066; - text-decoration: none; -} - -a.action:hover { - color: olive; - text-decoration: none; -} - -td.btn { - background-color: #404e55; - text-decoration: none; -} - -td.btnBorderLight { - background-color: #999999; -} - -td.btnBorderShadow { - background-color: #000000; -} - -td.btnDisabled { - font-size: 12px; - font-weight: bold; - color: #FFFFFF; - background-color: #404e55; - text-decoration: none; -} - -a.btn { - font-family: arial, verdana, geneva, helvetica, sans-serif; - font-size: 12px; - color: #FFFFFF; - background-color: #404e55; - font-weight: bold; - width: 100px; - text-align: center; - text-decoration: none; - } - -a.btn:active { - color: #FFFFFF; - background-color: #404e55; -} - -a.btn:link { - color: #FFFFFF; -} - -a.btn:visited { - color: #E9F3F2; - text-decoration: none; -} - -a.btn:hover { - color: #FFFFFF; - text-decoration: underline; -} - -a.panel2 { - font-size: 12px; - font-weight: bold; - color: #000000; -} - -a.panel2:active { - color: #000000; - text-decoration: underline; -} - -a.panel2:link { - color: #000000; - text-decoration: underline; -} - -a.panel2:visited { - color: #000000; - text-decoration: underline; -} - -a.panel2:hover { - color: #404e55; - text-decoration: underline; -} - -.tree-control { - font-family: arial, verdana, geneva, helvetica, sans-serif; - font-size: 80%; - line-height: 1.0; -} - -.tree-control-selected { - color:#404e55; - font-weight: bold; - font-size:13px; - text-decoration: none; -} - -.tree-control-unselected { - color: black; - font-style: normal; - font-weight: normal; - text-decoration: none; -} - -.xmlElement { - font-family: arial, verdana, geneva, helvetica, sans-serif; - font-size: 12px; - font-style: normal; - color: #404e55; -} - -.xmlText { - font-family: arial, verdana, geneva, helvetica, sans-serif; - font-size: 12px; - font-style: normal; - color: #000000; -} - -.xmlHeader { - font-family: arial, verdana, geneva, helvetica, sans-serif; - font-size: 10px; - font-style: normal; - color: #000000; -} - -.xmlComment { - font-family: arial, verdana, geneva, helvetica, sans-serif; - font-size: 12px; - font-style: normal; - color: #660066; -} - -div.element - { - margin-left: 20px; - margin-top: 3px; - margin-bottom: 3px; - background-color: #FFFFCC; -} - -div.element2 { - margin-left: 20px; - margin-top: 3px; - margin-bottom: 3px; - padding: 2px; -} - -div.element1 { - margin-left: 20px; - margin-top: 3px; - margin-bottom: 3px; - padding: 2px; - border: 1px solid #dcdcdc; -} - -div.element2-new { - margin-left: 20px; - margin-top: 3px; - margin-bottom: 3px; - padding: 2px; - background-color: #FFFFCC; -} - -div.element1-new { - margin-left: 20px; - margin-top: 3px; - margin-bottom: 3px; - padding: 2px; - border: 1px solid #dcdcdc; - background-color: #FFFFCC; -} - -div.buttons { - float: right; - padding: 3px; - border-left: 1px solid #dcdcdc; - border-bottom: 1px solid #dcdcdc; -} - -.elementSelect { - font-size: 12px; - border: 1px solid; - border-color: #999 #ccc #ccc #999; -} -.actionButton { - font-size: 12px; - padding: 3px; - background-color: #E4E4E4; - border: 1px solid; - border-color: #999 #ccc #ccc #999; - text-align: center; -} -.removeButton { - font-size: 9px; - padding: 1px; - background-color: #EAEAEA; - border: 1px; -} - -.textElement { - font-size: 12px; - padding: 3px; - background-color: #D4D0C8; - border: 1px solid; - border-color: #999 #ccc #ccc #999; -} - -.textElement:focus { - background-color: #FFFFCC; -} - -.attribute { - font-size: 12px; - padding: 3px; - background-color: #D4D0C8; - border: 1px solid; - border-color: #999 #ccc #ccc #999; -} - -.elementName { - cursor: pointer; - cursor: hand; -} - -td.loginTr { - align: center; - color: #FFFFFF; -} -.graphButton { - background-image:url(../images/button/GraphButton.png); - height: 10px; - width: 47px; - float: right; - padding: 3px; - border-left: 1px solid #dcdcdc; - border-bottom: 1px solid #dcdcdc; - - - } - -selectSoft { - font-family: arial, verdana, geneva, helvetica, sans-serif; - font-size: 12px; - font-style: normal; -} - -selectSoft.deploy { - width: 250px; -} - -selectSoft.dispatch { - width: 150px; -} -.mainLoginTable { - background-image:url(../images/logo/jonasAdmin.png); - background-repeat:no-repeat; -} - -.authentifLoginTable{ - filter:alpha(opacity=70); - -moz-opacity:0.70; - opacity: 0.70; - background-repeat:no-repeat; -} - -.htmlText{ - width : 100px; - } - .htmlTextLbPolicy{ - width : 150px; - } - - .htmlTextLbPolicyChanged{ - width : 150px; - background-color: #FFCC99; - } -.boldText{ - font-weight: bold; -} -.htmlTextChanged{ - width : 100px; - background-color: #FFCC99; - } diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/top.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/top.jsp deleted file mode 100644 index 6ee079d76881374ddee7155d6b72b026390a56d7..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/top.jsp +++ /dev/null @@ -1,78 +0,0 @@ - - -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.action.Action"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> - - - -<%@ include file="begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - JOnAS Administration
    - - - - - - -
    - - - - - - - - - -  
    -
    - - - - -<%@ include file="end.jsp" %> - -
    diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/tree.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/tree.jsp deleted file mode 100644 index 80cc3b8cd9b057c714c42f18a791cd558a5a8be3..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/tree.jsp +++ /dev/null @@ -1,47 +0,0 @@ - - -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - - - -<%@ include file="begin.jsp" %> - - - - - - - - - - - - - - - - - -<%@ include file="end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/welcomeContent.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/welcomeContent.jsp deleted file mode 100644 index 6ed9e9717d5b8fbe800f787b85afa37e6997fba6..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/welcomeContent.jsp +++ /dev/null @@ -1,19 +0,0 @@ -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> - - -<%@ include file="begin.jsp" %> - - - - - - - - - -

    JOnAS Administration

    - -<%@ include file="end.jsp" %> -
    diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/xml/archiveConfig.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/xml/archiveConfig.jsp deleted file mode 100644 index d6563d1a037056392387b1f48f9f5c26ae8c3b9a..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/xml/archiveConfig.jsp +++ /dev/null @@ -1,498 +0,0 @@ - <%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - jonas-ra.xml
    -
    - - ra.xml
    - -
    -
    - - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - -
    -<%@ include file="../common/end.jsp" %> - -
    diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/xml/archiveConfigAdvanced.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/xml/archiveConfigAdvanced.jsp deleted file mode 100644 index 4d87b4890237e875860adc127fa843263f51d71b..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/xml/archiveConfigAdvanced.jsp +++ /dev/null @@ -1,109 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - jonas-ra.xml
    -
    - - ra.xml
    -
    -
    - - - -
    -
    - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -<%@ include file="../common/end.jsp" %> - -
    diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/xml/archiveConfigAjax.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/xml/archiveConfigAjax.jsp deleted file mode 100644 index 08fd9baeeea380ba9822ab03f6a22960cc52a5fb..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/xml/archiveConfigAjax.jsp +++ /dev/null @@ -1,22 +0,0 @@ - -<%@ page language="java" contentType="text/xml;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/xml/archiveConfigConfirm.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/xml/archiveConfigConfirm.jsp deleted file mode 100644 index dc3e9fe6a792a26858571627e45aa9dffafccd16..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/xml/archiveConfigConfirm.jsp +++ /dev/null @@ -1,49 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%@ include file="../common/end.jsp" %> - - diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/xml/archiveConfigSelect.jsp b/jonas/modules/ee-components/jonas-admin/src/main/webapp/xml/archiveConfigSelect.jsp deleted file mode 100644 index 224630f2e31aaa5f98b15666ea4b77d370c253fb..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-admin/src/main/webapp/xml/archiveConfigSelect.jsp +++ /dev/null @@ -1,90 +0,0 @@ -<%@ page language="java" contentType="text/html;charset=utf-8" %> -<%@ page import="org.apache.struts.Globals"%> -<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> -<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> -<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> -<%@ taglib uri="/WEB-INF/sj.tld" prefix="sj" %> - - -<%@ include file="../common/begin.jsp" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - META-INF/ra.xml
    - META-INF/jonas-ra.xml
    -
    -
    - - - -
    - - - - - -
    - - - - - - - - - -
    -
    -
    - -<%@ include file="../common/end.jsp" %> - -
    - diff --git a/jonas/modules/ee-components/jonas-ctxroot/pom.xml b/jonas/modules/ee-components/jonas-ctxroot/pom.xml deleted file mode 100644 index 884a9e300c7ea2e13fd1da171019accf7ff34d7e..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-ctxroot/pom.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - org.ow2.jonas - jonas-ee-components - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - jonas-ctxroot - war - JOnAS :: EE Components :: Web Context Root - - - - org.ow2.jonas - jonas-version - ${project.version} - provided - - - org.ow2.jonas - jonas-management-javaee - ${project.version} - provided - - - org.ow2.jonas - jonas-commons - ${project.version} - provided - - - - - ctxroot - - - - org.codehaus.mojo.jspc - jspc-maven-plugin - - - jsp-compiler - - compile - - - - - - - org.codehaus.mojo.jspc - jspc-compiler-tomcat6 - ${jspc.version} - - - - - org.apache.maven.plugins - maven-war-plugin - - ${pom.basedir}/target/jspweb.xml - - - - - \ No newline at end of file diff --git a/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/WEB-INF/jonas-web.xml b/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/WEB-INF/jonas-web.xml deleted file mode 100644 index 63dcb6f42073878c3cee429f91b0cba885198bd3..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/WEB-INF/jonas-web.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - / - - - true - diff --git a/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/WEB-INF/web.xml b/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index fe61337db14ff527c7d3db0b52b243c05a11ee57..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - JOnAS Package index - - Display the context which are preconfigured. - - - diff --git a/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/index.jsp b/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/index.jsp deleted file mode 100644 index 04d99cbb049e262926e930e9519ebeb728fe8984..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/index.jsp +++ /dev/null @@ -1,213 +0,0 @@ -<%@ page - language="java" - contentType="text/html;charset=utf-8" - import = "java.util.List" - import = "java.util.Set" - import = "javax.management.MBeanServerFactory" - import = "javax.management.MBeanServer" - import = "javax.management.ObjectName" - import = "javax.management.QueryExp" - import = "javax.management.Query" - import = "org.ow2.jonas.Version" - import = "org.ow2.jonas.lib.bootstrap.JProp" - import = "org.ow2.jonas.lib.util.JonasObjectName" - import = "org.ow2.jonas.lib.management.javaee.J2eeObjectName" -%> - - - - - - - - <% - - // Connect to the local MBeanServer - MBeanServer mbeanServer = null; - List mbeanServers = MBeanServerFactory.findMBeanServer(null); - if (mbeanServers.size() > 0) { - mbeanServer = (MBeanServer) mbeanServers.get(0); - } - - String webContainer = ""; - boolean isJetty = false; - boolean isTomcat = false; - boolean useEarSample = false; - boolean useJavaEEEarSample = false; - boolean isDocumentationAvailable = false; - boolean isJavaDocAvailable = false; - - if (mbeanServer != null) { - - // Retrieve domain - String domain = JProp.getInstance().getValue(JProp.DOMAIN_NAME); - - // Web Container ? - ObjectName webContainerON = JonasObjectName.webContainerService(domain); - - boolean hasWebContainer = mbeanServer.isRegistered(webContainerON); - - if (hasWebContainer) { - // Determine if Jetty or Tomcat - String name = (String) mbeanServer.getAttribute(webContainerON, "ServerName"); - if ("jetty".equalsIgnoreCase(name)) { - isJetty = true; - } else if ("apache tomcat".equalsIgnoreCase(name)) { - isTomcat = true; - } - - // Get version - String version = (String) mbeanServer.getAttribute(webContainerON, "ServerVersion"); - - // Compose web container displayed name - webContainer = name + " v" + version; - - // Web-apps deployed - // ------------------------------------ - // jonas-doc-en - QueryExp query = getContextRootQuery("jonas-doc-en"); - ObjectName on = JonasObjectName.allWars(domain); - Set result = mbeanServer.queryMBeans(on, query); - - if (!result.isEmpty()) { - // Got a matching webapp - isDocumentationAvailable = true; - } - - // jonas-javadoc - query = getContextRootQuery("jonas-javadoc"); - result = mbeanServer.queryMBeans(on, query); - - if (!result.isEmpty()) { - // Got a matching webapp - isJavaDocAvailable = true; - } - - // Same with Ear - // --------------------- - // j2ee-1.4 sample - on = J2eeObjectName.J2EEApplications(domain); - query = getJ2EEApplicationQuery("j2ee-1.4"); - result = mbeanServer.queryMBeans(on, query); - - if (!result.isEmpty()) { - // Got a matching app - useEarSample = true; - } - - // Java EE 5.0 Sample - query = getJ2EEApplicationQuery("javaee5-earsample"); - result = mbeanServer.queryMBeans(on, query); - - if (!result.isEmpty()) { - // Got a matching app - useJavaEEEarSample = true; - } - - - } - - } else { - // We can't do anything, just print a nice warning and exit - } - - // Now display data ... - String title = "JOnAS v" + Version.getNumber(); - if (webContainer != null) { - title += " / " + webContainer; - } - title += " Package"; - out.print(title); - %> - <%! - /** - * Create a JMX Query that match the ContextRoot attribute. - */ - private static QueryExp getContextRootQuery(final String contextName) { - return Query.eq(Query.attr("ContextRoot"), Query.value(contextName)); - } - - /** - * Create a JMX Query that match the name attribute. - */ - private static QueryExp getJ2EEApplicationQuery(final String appName) { - return Query.eq(Query.attr("name"), Query.value(appName)); - } - %> - - - - -
    logo
    -
    - <% - if (isTomcat) { - out.print("\"Apache"); - } - if (isJetty) { - out.print("\"Mortbay"); - } - %> - JOnAS WebSite -
    - -
    - <% - out.print(title); - %> -
    - - - - - - diff --git a/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/jetty.gif b/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/jetty.gif deleted file mode 100644 index 01f44a87f6801b200f142513d0d02b12cea0fb46..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/jetty.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/logoOW2.png b/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/logoOW2.png deleted file mode 100644 index 71a185b68ed53e228e23c82c4ea0aa47b7556959..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/logoOW2.png and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/ow2_jonas.css b/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/ow2_jonas.css deleted file mode 100644 index c1105511cd4e1cbba3a45206826316305ea1e6f3..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/ow2_jonas.css +++ /dev/null @@ -1,183 +0,0 @@ -/* - Context Root css. based on css from http://jonas.objectweb.org - XHTML by Florent BENOIT -*/ - - -body -{ - top:10px; - margin-top:10px; - background-color: #FFF; - color: #000000; - } - - -img { - margin: 5px; - border:0; -} - - - -div.logos { - top: 5px; - width: 99%; - text-align: right; -} - - -div.links { - font-size: 14px; - margin-top : 40px; - margin-left : 100px; -} - - -div.titlepage { - margin-left: 200px; - font-family: Arial, Helvetica, sans-serif; - font-size: 1.5em; - line-height: 1.5em; - border-bottom: 1px solid #0099cc; - color : #ff6600; - font-weight : bold; -} - - -div.footer { - margin-top : 50px; - color: #FFFFFF; - font-size: 8pt; - text-align: center; -} - - -/*HTML elements */ - - - -ul, ol, dl -{ - color: black; - font-family: Arial,Helvetica, sans-serif; - font-size: 12px; - line-height: 16px; - font-weight: normal; -} - -li -{ - color: black; - font-family: Arial, Helvetica, sans-serif; - font-size: 14px; - font-weight: normal; - margin: 10px 0px 5px 0px; - -} -a -{ - color: #3F3975; - background-color: transparent; - text-decoration: underline; -} - -a:visited -{ - color: #9898CB; - background-color: transparent; - text-decoration: underline; -} - -a:hover -{ - color: #E06611; - background-color: transparent; - text-decoration: underline; -} - - -a:active -{ - color: #FFFFFF; - background-color: #E06611; - text-decoration: underline; -} - - - - -.h1, .h2, .h3, .h4, .h5 { - color: #000; - background-color: inherit; - padding: 0; -} - -.h1 { - margin-top: 5px; - font-size: 2em; - line-height: 1.5em; - margin: 30px 0 30px 0; - border-bottom: 1px solid #0099cc; - color : #ff6600; - font-weight : bold; -} - -.h2 { - margin: 20px 0 15px 0; - border-bottom: 1px solid #0099cc; - font-weight:normal; - font-style: normal; - font-size: 1.6em; - line-height: 1.4em; - color : #0099cc -} - -.h3 { - font-weight: normal; - font-size: 1.4em; - line-height: 1.4em; - margin: 20px 0 15px 0; -} - -.h4 { - font-weight:normal; - color: #404040; - margin: 20px 0 0 0; - left: 0px; - font-size: 1.4em; - line-height: 1.4em; -} -.h5 { - font-weight:normal; - color: #404040; - font-style: normal; - margin: 0px; - left: 0px; - font-size: 1.2em; - line-height: 1.2em; -} - -td -{ - color: black; - font-family: Arial,Helvetica, sans-serif; - font-size: 12px; - font-weight: normal; -} - -p -{ - color: black; - font-family: Arial,Helvetica, sans-serif; - font-size: 12px; - line-height: 16px; - font-weight: normal; - margin: 10px 10px 5px 0px; -} - -p.error -{ - color: red; -} - diff --git a/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/ow_jonas_logo.gif b/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/ow_jonas_logo.gif deleted file mode 100644 index 1b56943a721f82a8cb81776030567772265433f2..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/ow_jonas_logo.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/style.css b/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/style.css deleted file mode 100644 index 4f852c2a87c8be61ad1e242e706f92197a35396c..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/style.css +++ /dev/null @@ -1,13 +0,0 @@ -body { - background : white; - color : black; -} -h1, h2, h3 {font-family : sans-serif; } -h1 {font-size : 175%; color : DarkCyan; text-align : center;} -h2 {font-size : 150%; color : DarkCyan; - border-bottom : solid; - border-bottom-width : 1; -} -h3 {font-size : 125%; } -strong { font-weight : bold; } -hr { size : 1; width : 100%; } diff --git a/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/tomcat.gif b/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/tomcat.gif deleted file mode 100644 index 61756736b82350f64b5ea1b2bfc31ac57e30a3d3..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/tomcat.gif and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/valid-xhtml11.png b/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/valid-xhtml11.png deleted file mode 100644 index 2c63d93f8868d574b9e69eda2727b7e7bf7fc8ec..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/valid-xhtml11.png and /dev/null differ diff --git a/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/vcss.png b/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/vcss.png deleted file mode 100644 index 9b2f596e016533327216d98a0a927738fe17384f..0000000000000000000000000000000000000000 Binary files a/jonas/modules/ee-components/jonas-ctxroot/src/main/webapp/vcss.png and /dev/null differ diff --git a/jonas/modules/ee-components/mejb/pom.xml b/jonas/modules/ee-components/mejb/pom.xml deleted file mode 100644 index a70de78a7fa4d13c31b174593725ac0f722c905f..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/mejb/pom.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - org.ow2.jonas - jonas-ee-components - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - mejb - jar - JOnAS :: EE Components :: MEJB - - - - org.ow2.bundles - ow2-util-log - - - org.ow2.spec.ee - ow2-ejb-3.0-spec - - - org.ow2.spec.ee - ow2-jsr77-1.1-spec - - - - - mejb - - - maven-ejb-plugin - - 3 - - - - - - diff --git a/jonas/modules/ee-components/mejb/src/main/java/org/ow2/jonas/ee/mejb/ListenerRegistrationImpl.java b/jonas/modules/ee-components/mejb/src/main/java/org/ow2/jonas/ee/mejb/ListenerRegistrationImpl.java deleted file mode 100644 index 88fcdaa6090676ea47af17855b837b0ad835f728..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/mejb/src/main/java/org/ow2/jonas/ee/mejb/ListenerRegistrationImpl.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2007 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.ee.mejb; - -import java.io.IOException; -import java.rmi.RemoteException; - -import javax.management.InstanceNotFoundException; -import javax.management.ListenerNotFoundException; -import javax.management.MBeanServerConnection; -import javax.management.NotificationFilter; -import javax.management.NotificationListener; -import javax.management.ObjectName; -import javax.management.j2ee.ListenerRegistration; - -/** - * ListenerRegistration implementation. - */ -public class ListenerRegistrationImpl implements ListenerRegistration { - - /** - * Wrapped MBeanServer instance. - */ - transient private MBeanServerConnection connection = null; - - /** - * A ListenerRegistration object allows to ad/remove listeners to notifications emitted by - * MBeans which are registered in a remote MBeanServer. - * @param connection the remote MBean server - */ - public ListenerRegistrationImpl(final MBeanServerConnection connection) { - this.connection = connection; - } - - /** - * Add notification listener. - * @param name identifies the emitter MBean - * @param listener the listener to add - * @param filter the associated filter - * @param o the associated handback object - * @exception InstanceNotFoundException emitter MBean not registered in the MBeanServer - * @exception RemoteException operation failed - */ - public void addNotificationListener(final ObjectName name, - final NotificationListener listener, - final NotificationFilter filter, - final Object o) throws InstanceNotFoundException, - RemoteException { - try { - connection.addNotificationListener(name, listener, filter, o); - } catch (IOException e) { - throw new RemoteException(e.toString()); - } - } - /** - * Remove notification listener - * @param name identifies the emitter MBean - * @param listener the listener to remove - * @exception InstanceNotFoundException emitter MBean not registered in the MBeanServer - * @exception ListenerNotFoundException arg1 not registered as listener - * @exception RemoteException operation failed - */ - public void removeNotificationListener(final ObjectName name, - final NotificationListener listener) throws InstanceNotFoundException, - ListenerNotFoundException, - RemoteException { - try { - connection.removeNotificationListener(name, listener); - } catch (IOException e) { - throw new RemoteException(e.toString()); - } - } -} diff --git a/jonas/modules/ee-components/mejb/src/main/java/org/ow2/jonas/ee/mejb/ManagementBean.java b/jonas/modules/ee-components/mejb/src/main/java/org/ow2/jonas/ee/mejb/ManagementBean.java deleted file mode 100644 index d09a72add3e4de79df797cdbf649c2fdf0cbd528..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/mejb/src/main/java/org/ow2/jonas/ee/mejb/ManagementBean.java +++ /dev/null @@ -1,298 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.ee.mejb; - -import java.util.List; -import java.util.Set; - -import javax.ejb.Stateless; -import javax.ejb.RemoteHome; -import javax.management.Attribute; -import javax.management.AttributeList; -import javax.management.AttributeNotFoundException; -import javax.management.InstanceNotFoundException; -import javax.management.IntrospectionException; -import javax.management.InvalidAttributeValueException; -import javax.management.MBeanException; -import javax.management.MBeanInfo; -import javax.management.MBeanServerFactory; -import javax.management.ObjectName; -import javax.management.QueryExp; -import javax.management.ReflectionException; -import javax.management.MBeanServer; -import javax.management.j2ee.ListenerRegistration; -import javax.management.j2ee.ManagementHome; -import javax.annotation.PostConstruct; -import javax.annotation.security.RolesAllowed; - -import org.ow2.util.log.LogFactory; -import org.ow2.util.log.Log; - -/** - * This is the Management EJB implementation for JOnAS. - * A MEJB instance is created and deployed at JOnAS start time. - * It is registered in the ejb/mgmt naming subcontext. - * - * The current implementation allows access to managed resources registered in - * the current (local) MBean server via the standard management methods defined in the - * javax.management.j2ee.Management interface. - * - * @author Adriana Danes - * @author Vivek Lakshmanan - * @author Matt Wringe - */ -@Stateless(name="MEJB", - mappedName = "ejb/mgmt/MEJB") -@RemoteHome(ManagementHome.class) -@RolesAllowed({"mejb-admin", "mejb-user"}) -public class ManagementBean { - - /** - * Logger. - */ - private static final Log logger = LogFactory.getLog(ManagementBean.class); - - /** - * Connection to the current JOnAS server's MBean server. - */ - private MBeanServer mbeanServer = null; - - /** - * Get the MBeanServer local reference. - */ - @PostConstruct - public void init() { - // TODO : find a 'very better' way to retrieve the MBeanServer used by JOnAS - // Look if there is already a MBeanServer for JOnAS. - List mbeanServers = MBeanServerFactory.findMBeanServer(null); - if (mbeanServers.size() > 0) { - mbeanServer = (MBeanServer) mbeanServers.get(0); - } else { - // Should not be the case, but anyway ... - logger.debug("Cannot find the default MBeanServer for the platform, create a new one."); - mbeanServer = MBeanServerFactory.createMBeanServer(); - } - } - - /** - * Gets the value of a specific attribute of a named managed object. - * The managed object is identified by its object name. - * @param name The object name of the managed object from which the - * attribute is to be retrieved. - * @param attribute A String specifying the name of the attribute - * to be retrieved. - * @return The value of the retrieved attribute. - * @throws MBeanException Wraps an exception thrown by the managed - * object's getter. - * @throws AttributeNotFoundException The attribute specified is - * not accessible in the managed object. - * @throws InstanceNotFoundException The managed object specified is - * not registered in the MEJB. - * @throws ReflectionException An exception occurred when trying to - * invoke the getAttribute method of a Dynamic MBean - */ - public Object getAttribute(final ObjectName name, - final String attribute) throws MBeanException, - AttributeNotFoundException, - InstanceNotFoundException, - ReflectionException { - return mbeanServer.getAttribute(name, attribute); - } - - /** - * Enables the values of several attributes of a named managed object. - * The managed object is identified by its object name. - * @param name The object name of the managed object from which - * the attributes are retrieved. - * @param attributes A list of the attributes to be retrieved. - * @return The list of the retrieved attributes. - * @throws InstanceNotFoundException The managed object specified is - * not registered in the MEJB. - * @throws ReflectionException An exception occurred when trying to - * invoke the getAttributes method of a Dynamic MBean. - */ - public AttributeList getAttributes(final ObjectName name, - final String[] attributes) throws InstanceNotFoundException, - ReflectionException { - return mbeanServer.getAttributes(name, attributes); - } - - /** - * Returns the default domain name of this MEJB. - * @return the default domain name of this MEJB. - */ - public String getDefaultDomain() { - return mbeanServer.getDefaultDomain(); - } - - /** - * Returns the number of managed objects registered in the MEJB. - * @return the number of managed objects registered in the MEJB. - */ - public Integer getMBeanCount() { - return mbeanServer.getMBeanCount(); - } - - /** - * This method discovers the attributes and operations that a managed - * object exposes for management. - * @param name The name of the managed object to analyze - * @return An instance of {@link MBeanInfo} allowing the retrieval of - * all attributes and operations of this managed object. - * @throws IntrospectionException An exception occurs during introspection. - * @throws InstanceNotFoundException The managed object specified is - * not found. - * @throws ReflectionException An exception occurred when trying to - * perform reflection on a managed object - */ - public MBeanInfo getMBeanInfo(final ObjectName name) throws IntrospectionException, - InstanceNotFoundException, - ReflectionException { - return mbeanServer.getMBeanInfo(name); - } - - /** - * Invokes an operation on a managed object. - * @param name The object name of the managed object on which the - * method is to be invoked. - * @param operationName The name of the operation to be invoked. - * @param params An array containing the parameters to be set - * when the operation is invoked - * @param signature An array containing the signature of the operation. - * The class objects will be loaded using the same class loader - * as the one used for loading the managed object on which the - * operation was invoked. - * @return The object returned by the operation, which represents the - * result of invoking the operation on the managed object specified. - * @throws InstanceNotFoundException The managed object specified is not - * registered in the MEJB. - * @throws MBeanException Wraps an exception thrown by the managed - * object's invoked method. - * @throws ReflectionException Wraps a {@link Exception} thrown while - * trying to invoke the method. - */ - @RolesAllowed("mejb-admin") - public Object invoke(final ObjectName name, - final String operationName, - final Object[] params, - final String[] signature) throws MBeanException, - InstanceNotFoundException, - ReflectionException { - return mbeanServer.invoke(name, operationName, params, signature); - } - - /** - * Checks whether a managed object, identified by its object name, is - * already registered with the MEJB. - * @param name The object name of the managed object to be checked. - * @return True if the managed object is already registered in the MEJB, - * false otherwise. - */ - public boolean isRegistered(final ObjectName name) { - return mbeanServer.isRegistered(name); - } - - /** - * Gets the names of managed objects controlled by the MEJB. This method - * enables any of the following to be obtained: The names of all managed - * objects, the names of a set of managed objects specified by pattern - * matching on the {@link ObjectName}, a specific managed object name - * (equivalent to testing whether a managed object is registered). When - * the object name is null or no domain and key properties are specified, - * all objects are selected. It returns the set of J2EEObjectNames for - * the managed objects selected. - * @param name The object name pattern identifying the managed objects to - * be retrieved. If null or no domain and key properties are - * specified, all the managed objects registered will be retrieved. - * @param query a relational constraints for results filtering - * @return A set containing the ObjectNames for the managed objects selected. - * If no managed object satisfies the query, an empty set is returned. - */ - public Set queryNames(final ObjectName name, final QueryExp query) { - return mbeanServer.queryNames(name, query); - } - - /** - * Sets the value of a specific attribute of a named managed object. - * The managed object is identified by its object name. - * @param name The name of the managed object within which the - * attribute is to be set. - * @param attribute The identification of the attribute to be set - * and the value it is to be set to. - * @throws InstanceNotFoundException The managed object specified - * is not registered in the MEJB. - * @throws AttributeNotFoundException The attribute specified is - * not accessible in the managed object. - * @throws InvalidAttributeValueException The value specified for - * the attribute is not valid. - * @throws MBeanException Wraps an exception thrown by the managed - * object's setter. - * @throws ReflectionException An exception occurred when trying - * to invoke the setAttribute method of a Dynamic MBean. - */ - @RolesAllowed("mejb-admin") - public void setAttribute(final ObjectName name, - final Attribute attribute) throws MBeanException, - AttributeNotFoundException, - InstanceNotFoundException, - InvalidAttributeValueException, - ReflectionException { - mbeanServer.setAttribute(name, attribute); - } - - /** - * Sets the values of several attributes of a named managed - * object. The managed object is identified by its object name. - * @param name The object name of the managed object within - * which the attributes are to be set. - * @param attributes A list of attributes: The identification - * of the attributes to be set and the values they are - * to be set to. - * @return The list of attributes that were set, with their new values. - * @throws InstanceNotFoundException The managed object specified - * is not registered in the MEJB. - * @throws ReflectionException An exception occurred when trying - * to invoke the setAttributes method of a Dynamic MBean. - */ - @RolesAllowed("mejb-admin") - public AttributeList setAttributes(final ObjectName name, - final AttributeList attributes) throws InstanceNotFoundException, - ReflectionException { - return mbeanServer.setAttributes(name, attributes); - } - - /** - * Returns the listener registry implementation for this - * MEJB. The listener registry implements the methods that - * enable clients to add and remove event notification - * listeners managed objects - * @return An implementation of {@link ListenerRegistration} - */ - public ListenerRegistration getListenerRegistry() { - // TODO I suspect that the MBeanServer will not support ser/deser process ... - return new ListenerRegistrationImpl(mbeanServer); - } - -} diff --git a/jonas/modules/ee-components/mejb/src/main/java/org/ow2/jonas/ee/mejb/XManagement.java b/jonas/modules/ee-components/mejb/src/main/java/org/ow2/jonas/ee/mejb/XManagement.java deleted file mode 100644 index 364856a85fc6b9fd8b9719f5d7bf8dde409b4e3d..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/mejb/src/main/java/org/ow2/jonas/ee/mejb/XManagement.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.ee.mejb; - -import javax.management.j2ee.Management; - -/** - * The XManagement is a fake interface introduced as a workaround for bug UTIL-45. - * - * @author Guillaume Sauthier - */ -public interface XManagement extends Management { -} diff --git a/jonas/modules/ee-components/mejb/src/main/java/org/ow2/jonas/ee/mejb/XManagementHome.java b/jonas/modules/ee-components/mejb/src/main/java/org/ow2/jonas/ee/mejb/XManagementHome.java deleted file mode 100644 index cf9700ca487a351642e30e2a0d376f52bc09435e..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/mejb/src/main/java/org/ow2/jonas/ee/mejb/XManagementHome.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.ee.mejb; - -import javax.management.j2ee.ManagementHome; - -/** - * The XManagementHome is a fake interface introduced as a workaround for bug UTIL-45. - * - * @author Guillaume Sauthier - */ -public interface XManagementHome extends ManagementHome { -} diff --git a/jonas/modules/ee-components/pom.xml b/jonas/modules/ee-components/pom.xml deleted file mode 100644 index 40a49927e44d8310fa2b646d03c5411724bfebb9..0000000000000000000000000000000000000000 --- a/jonas/modules/ee-components/pom.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - org.ow2.jonas - jonas-modules - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas - jonas-ee-components - pom - JOnAS :: EE Components - - - jonas-ctxroot - jca - jonas-admin - mejb - - - diff --git a/jonas/modules/generators/jonas-genbase/pom.xml b/jonas/modules/generators/jonas-genbase/pom.xml deleted file mode 100644 index 28fcddd5555b2c4d43efd3ec26c451ac292df86d..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/pom.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - org.ow2.jonas - jonas-generators - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - - jonas-generators-base - bundle - JOnAS :: Generators :: Base - - - - org.ow2.jonas - jonas-commons - ${project.version} - - - org.ow2.jonas - jonas-deployment - ${project.version} - - - org.ow2.bundles - ow2-util-ee-deploy-impl - - - \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/GenBaseException.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/GenBaseException.java deleted file mode 100644 index 7c0ba73be1cae5f66fb27a9251da71abff1e9e61..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/GenBaseException.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genbase; - -/** - * This class represents the exception that can be throwned by the ClientStubGen tool. - * @author Guillaume Sauthier - */ -public class GenBaseException extends Exception { - - /** - * Constructs a GenBaseException with no specified detail message. - */ - public GenBaseException() { - super(); - } - - /** - * Constructs an GenBaseException with the specified detail message. - * @param msg Error message - */ - public GenBaseException(String msg) { - super(msg); - } - - /** - * Constructs an GenBaseException with the specified detail message. - * @param inner Cause Exception to wrap - */ - public GenBaseException(Exception inner) { - super(inner); - } - - /** - * Constructs an GenBaseException with the specified detail message. - * @param msg Error message - * @param inner Cause Exception to wrap - */ - public GenBaseException(String msg, Exception inner) { - super(msg, inner); - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/NoJ2EEWebservicesException.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/NoJ2EEWebservicesException.java deleted file mode 100644 index 039e6d2a69681e3623c7e34319e6d6a5f4a8b47d..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/NoJ2EEWebservicesException.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.genbase; - - - -/** - * Thrown By XMLUtils.newDocument() when DTD validated files are found. - * - * @author Guillaume Sauthier - */ -public class NoJ2EEWebservicesException extends GenBaseException { - - /** - * Constructs NoJ2EEWebservicesException. - */ - public NoJ2EEWebservicesException() { - super(); - } - - /** - * Constructs NoJ2EEWebservicesException. - * @param msg Exception message - */ - public NoJ2EEWebservicesException(String msg) { - super(msg); - } - - /** - * Constructs NoJ2EEWebservicesException. - * @param inner Inner Exception - */ - public NoJ2EEWebservicesException(Exception inner) { - super(inner); - } - - /** - * Constructs NoJ2EEWebservicesException. - * @param msg Message text - * @param inner Inner Exception - */ - public NoJ2EEWebservicesException(String msg, Exception inner) { - super(msg, inner); - } - -} diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/AbsArchive.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/AbsArchive.java deleted file mode 100644 index ac8530ed0fcd306f80a1350f4fbaec22588724f1..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/AbsArchive.java +++ /dev/null @@ -1,181 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genbase.archive; - -import java.io.File; -import java.util.Hashtable; -import java.util.Map; -import java.util.jar.Manifest; - -import org.ow2.jonas.lib.util.I18n; - - -/** - * An AbsArchive centralized commonly used methods for Jar and - * File support. - * - * @author Guillaume Sauthier - */ -public abstract class AbsArchive implements Archive { - - /** i18n */ - private static I18n i18n = I18n.getInstance(AbsArchive.class); - - /** root File of the Archive */ - private File root; - - /** the archive Manifest */ - private Manifest manifest = null; - - /** map between name and files added in the archive */ - private Map files = null; - - /** - * Create a FileArchive where the root if the given file. - * - * @param file the directory base of the archive - */ - public AbsArchive(File file) { - root = file; - files = new Hashtable(); - } - - /** - * add the content of the given directory into the root of the archive. - * - * @param directory directory to add - */ - public void addDirectory(File directory) { - addDirectoryIn("", directory); - } - - /** - * add the content of the given directory into the given directory of the - * archive. - * - * @param dirName archive directory name. - * @param directory directory to add. - */ - public void addDirectoryIn(String dirName, File directory) { - File[] childs = directory.listFiles(); - - // directory exists ? - if (childs != null) { - for (int i = 0; i < childs.length; i++) { - if (childs[i].isFile()) { - // File - addFileIn(dirName, childs[i]); - } else { - // Directory - addDirectoryIn(dirName + childs[i].getName() + File.separator, childs[i]); - } - } - } - } - - /** - * add a lonely file into the root directory of the archive. - * - * @param file the file to be added. - */ - public void addFile(File file) { - addFileIn("", file); - } - - /** - * add a file into the root directory of the archive with a specified name. - * - * @param file the file to be added. - * @param name filename - */ - public void addFile(File file, String name) { - files.put(name, file); - } - - /** - * add a lonely file into the given directory of the archive. - * - * @param dirName archive directory name. - * @param file the file to be added. - */ - public void addFileIn(String dirName, File file) { - files.put(dirName + file.getName(), file); - } - - /** - * Returns the File corresponding to the root of the archive. - * - * @return the File corresponding to the root of the archive. - */ - public File getRootFile() { - return root; - } - - /** - * Returns the name of the Archive. - * - * @return the name of the Archive. - */ - public String getName() { - return root.getName(); - } - - /** - * @return Returns the manifest. - */ - public Manifest getManifest() { - if (manifest == null) { - manifest = new Manifest(); - } - return manifest; - } - /** - * @param manifest The manifest to set. - */ - public void setManifest(Manifest manifest) { - this.manifest = manifest; - } - /** - * @return Returns the i18n. - */ - public static I18n getI18n() { - return i18n; - } - /** - * @return Returns the files. - */ - public Map getFiles() { - return files; - } - - /** - * close this archive - */ - public void close() { - this.files = null; - this.manifest = null; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/Application.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/Application.java deleted file mode 100644 index 448b8877ccc53a82011cfbd3e9d7901612efbedb..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/Application.java +++ /dev/null @@ -1,578 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 1999-2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genbase.archive; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.net.URLClassLoader; -import java.util.Hashtable; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Vector; -import java.util.jar.Attributes; - -import javax.xml.parsers.ParserConfigurationException; - -import org.objectweb.util.monolog.api.BasicLevel; -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.ear.EarDeploymentDesc; -import org.ow2.jonas.deployment.ear.lib.EarDeploymentDescManager; -import org.ow2.jonas.deployment.ear.xml.Web; -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.utils.XMLUtils; -import org.ow2.jonas.lib.loader.EjbJarClassLoader; -import org.ow2.util.ee.deploy.api.deployable.EARDeployable; -import org.ow2.util.ee.deploy.api.deployable.IDeployable; -import org.w3c.dom.Document; -import org.xml.sax.SAXException; - -/** - * Application is a wrapper around an ear (packaged as a jar or as an unpacked - * jar). - * - * @author Guillaume Sauthier - */ -public class Application extends J2EEArchive { - - /** list of embded clients archive. */ - private List clients; - - /** list of embded webapps archive. */ - private List webapps; - - /** list of embded ejbjars archive. */ - private List ejbjars; - - /** Application DeploymentDesc */ - private EarDeploymentDesc earDD = null; - - /** name to document map */ - private Map descriptors = new Hashtable(); - - /** application Descriptor */ - private Document app; - - /** EJB Jar ClassLoader */ - private URLClassLoader ejbCL = null; - - /** Common Libs ClassLoader */ - private URLClassLoader commonCL = null; - - /** libs path File */ - private List pathFiles; - - /** application archive filename */ - private String appFilename; - - private IDeployable deployable = null; - - /** - * Creates a new Application archive. - * - * @param archive the file containing the application archive. - * - * @throws GenBaseException When Init fails - */ - public Application(final Archive archive, final IDeployable deployable) throws GenBaseException { - super(archive); - this.appFilename = archive.getRootFile().getName(); - this.deployable = deployable; - if (getLogger().isLoggable(BasicLevel.DEBUG)) { - getLogger().log(BasicLevel.DEBUG, "Wrapping '" + archive.getName() + "' in Application"); - } - init(); - } - - /** - * Initialize the Application. Creates modules lists, unpack if not - * unpacked. - * - * @throws GenBaseException When application unpack fails or when Decriptors - * cannot be parsed or found. - */ - protected void init() throws GenBaseException { - - pathFiles = new Vector(); - - ejbjars = new Vector(); - webapps = new Vector(); - clients = new Vector(); - - // load META-INF/application.xml - try { - earDD = EarDeploymentDescManager.getDeploymentDesc((EARDeployable) deployable, Thread.currentThread().getContextClassLoader()); - } catch (DeploymentDescException dde) { - String err = getI18n().getMessage("Application.init.earDDExc", getArchive().getRootFile()); - throw new GenBaseException(err, dde); - } - - // add EjbJars - String[] ejbs = earDD.getEjbTags(); - - for (int i = 0; i < ejbs.length; i++) { - File ejbFile = new File(getRootFile(), ejbs[i]); - Archive ejbArch = null; - - if (ejbFile.isDirectory()) { - // Unpacked Jar - ejbArch = new FileArchive(ejbFile); - } else { - // Packed Jar - ejbArch = new JarArchive(ejbFile); - } - ejbjars.add(new EjbJar(ejbArch, this)); - - // add entries for Class-Path - addClassPathEntry(ejbArch); - } - - // add WebApps - Web[] webs = earDD.getWebTags(); - - for (int i = 0; i < webs.length; i++) { - File webFile = new File(getRootFile(), webs[i].getWebUri()); - Archive webArch = null; - - if (webFile.isDirectory()) { - // Unpacked Jar - webArch = new FileArchive(webFile); - } else { - // Packed Jar - webArch = new JarArchive(webFile); - } - webapps.add(new WebApp(webArch, this)); - } - - // add Clients - String[] clts = earDD.getClientTags(); - - for (int i = 0; i < clts.length; i++) { - File clientFile = new File(getRootFile(), clts[i]); - Archive clientArch = null; - - if (clientFile.isDirectory()) { - // Unpacked Jar - clientArch = new FileArchive(clientFile); - } else { - // Packed Jar - clientArch = new JarArchive(clientFile); - } - clients.add(new Client(clientArch, this)); - } - - // Create ear ClassLoader (from MANIFEST/Class-Path general entry) - setModuleClassloader(createEARClassLoader()); - - // Create EJB ClassLoader - ejbCL = createEJBClassLoader(); - - loadDescriptors(); - } - - /** - * Load Deployment Descriptor of an Application. - * - * @throws GenBaseException When parsing of application.xml fails - */ - protected void loadDescriptors() throws GenBaseException { - - InputStream is = null; - - try { - is = getApplicationInputStream(); - } catch (IOException e) { - throw new GenBaseException("Cannot get inputstream", e); - } - - if (is == null) { - return; - } - - try { - app = XMLUtils.newDocument(is, "META-INF/application.xml", isDTDsAllowed()); - } catch (SAXException saxe) { - String err = getI18n().getMessage("Application.loadDescriptors.parseError"); - throw new GenBaseException(err, saxe); - } catch (ParserConfigurationException pce) { - String err = getI18n().getMessage("Application.loadDescriptors.prepare"); - throw new GenBaseException(err, pce); - } catch (IOException ioe) { - String err = getI18n().getMessage("Application.loadDescriptors.parseError"); - throw new GenBaseException(err, ioe); - } - - - descriptors.put("META-INF/application.xml", app); - } - - /** - * Initialize the Archive. - * @throws GenBaseException When initialization fails. - */ - @Override - public void initialize() throws GenBaseException { - - // init ejbjars - for (Iterator i = ejbjars.iterator(); i.hasNext();) { - EjbJar ejb = (EjbJar) i.next(); - ejb.initialize(); - } - - // init webapps - for (Iterator i = webapps.iterator(); i.hasNext();) { - WebApp web = (WebApp) i.next(); - web.initialize(); - } - - // init clients - for (Iterator i = clients.iterator(); i.hasNext();) { - Client client = (Client) i.next(); - client.initialize(); - } - - } - - /** - * Returns the name of the Archive. Overrides J2EEArchive.getName(); - * - * @see org.ow2.jonas.generators.genbase.archive.J2EEArchive#getName() - * - * @return the name of the Archive. - */ - @Override - public String getName() { - return appFilename; - } - - /** - * Construct a ClassLoader for EJBs inside an application. - * - * @return the Ejb-Jar ClassLoader - * - * @throws GenBaseException When URLClassLoader cannot be created. - */ - private URLClassLoader createEJBClassLoader() throws GenBaseException { - - URL[] urls = new URL[pathFiles.size() + ejbjars.size()]; - int index = 0; - for (Iterator i = pathFiles.iterator(); i.hasNext(); index++) { - File f = (File) i.next(); - try { - urls[index] = f.toURL(); - } catch (IOException ioe) { - String err = "Cannot convert " + f + " to URL."; - throw new GenBaseException(err, ioe); - } - } - - for (Iterator i = ejbjars.iterator(); i.hasNext(); index++) { - try { - urls[index] = ((EjbJar) i.next()).getRootFile().toURL(); - } catch (IOException ioe) { - String err = "Cannot transform as a URL : " + ioe.getMessage(); - throw new GenBaseException(err, ioe); - } - } - - try { - return new EjbJarClassLoader(urls, getModuleClassloader()); - } catch (IOException ioe) { - String err = "Cannot create EjbJarClassLoader"; - throw new GenBaseException(err, ioe); - } - - } - - /** - * Construct a ClassLoader for the application. - * - * @return the Application ClassLoader - * - * @throws GenBaseException When URLClassLoader cannot be created. - */ - private URLClassLoader createEARClassLoader() throws GenBaseException { - - // find parent ClassLoader - ClassLoader parent = Thread.currentThread().getContextClassLoader(); - - // get Manifest Attributes if any - String classpath = getManifest().getMainAttributes().getValue(Attributes.Name.CLASS_PATH); - URL[] urls = new URL[0]; - if (classpath != null) { - // Lookup specified files. - String[] paths = classpath.split(" "); - urls = new URL[paths.length]; - for (int i = 0; i < paths.length; i++) { - try { - URL path = new File(getRootFile(), paths[i]).toURL(); - urls[i] = path; - } catch (IOException ioe) { - String err = "Cannot transform '" + paths[i] + "' as a URL"; - throw new GenBaseException(err, ioe); - } - } - } - - return new URLClassLoader(urls, parent); - } - - /** - * Search the given Archive for ClassPath Manifest entry and add the entries - * in the EAR classpath. - * - * @param a the Archive to explore - * - * @throws GenBaseException When a path cannot be added in the EAR classpath. - */ - private void addClassPathEntry(final Archive a) throws GenBaseException { - // get Manifest Attributes if any - String classpath = a.getManifest().getMainAttributes().getValue(Attributes.Name.CLASS_PATH); - - if (classpath != null) { - // Lookup specified files. - String[] paths = classpath.split(" "); - for (int i = 0; i < paths.length; i++) { - try { - File path = new File(a.getRootFile().getParentFile(), paths[i]).getCanonicalFile(); - if (!pathFiles.contains(path)) { - pathFiles.add(path); - } - } catch (IOException ioe) { - String err = "Cannot add in EAR classpath :" + paths[i]; - throw new GenBaseException(err, ioe); - } - } - - } - - } - - /** - * Returns the Document of the application.xml file. - * - * @return the Document of the application.xml file. - */ - public Document getApplicationDoc() { - return app; - } - - /** - * Returns the InputStream of the application.xml file. - * - * @return the InputStream of the application.xml file. - * - * @throws IOException When InputStream of application.xml cannot be - * returned - */ - public InputStream getApplicationInputStream() throws IOException { - InputStream is = null; - - if (isPacked()) { - is = getInputStream("META-INF/application.xml"); - } else { - is = getInputStream("META-INF" + File.separator + "application.xml"); - } - - return is; - } - - /** - * Add a new EjbJar in the Application. - * - * @param ejbjar the added EjbJar - */ - public void addEjbJar(final EjbJar ejbjar) { - ejbjars.add(ejbjar); - // add module in application.xml - XMLUtils.addEjb(app, ejbjar); - } - - /** - * Add a new Client in the Application. - * - * @param client the added Client - */ - public void addClient(final Client client) { - clients.add(client); - // add module in application.xml - XMLUtils.addClient(app, client); - } - - /** - * Add a new WebApp in the Application. - * - * @param webapp the added webapp - * @param context context of the webapp - */ - public void addWebApp(final WebApp webapp, final String context) { - if (!XMLUtils.isWebModuleAlreadyDeclared(app, webapp.getName())) { - // the web module is not already declared - webapps.add(webapp); - // add module in application.xml - XMLUtils.addWebApp(app, webapp, context); - } - // use latest file - addFile(webapp.getRootFile(), webapp.getName()); - } - - /** - * Returns the Iterator of EjbJar contained in this Application. - * - * @return the Iterator of EjbJar contained in this Application. - */ - public Iterator getEjbJars() { - return ejbjars.iterator(); - } - - /** - * Returns the Iterator of WebApp contained in this Application. - * - * @return the Iterator of WebApp contained in this Application. - */ - public Iterator getWebApps() { - return webapps.iterator(); - } - - /** - * Returns the Iterator of WebApp contained in this Application. - * - * @return the Iterator of WebApp contained in this Application. - */ - public Iterator getClients() { - return clients.iterator(); - } - - /** - * Returns the ClassLoader of this ear archive. - * - * @return the ClassLoader of this ear archive. - */ - public URLClassLoader getEARClassLoader() { - return commonCL; - } - - /** - * Returns the ClassLoader of the ejbs within this archive. - * - * @return the ClassLoader of the ejbs within this archive. - */ - public URLClassLoader getEJBClassLoader() { - return ejbCL; - } - - /** - * Returns a Map of name to Document for each modified Descriptor of the - * archive. - * - * @return a Map of name to Document - */ - @Override - public Map getDescriptors() { - return descriptors; - } - - /** - * Returns true if filename must be omitted in the archive. - * - * @param name filename to be tested - * - * @return true if filename must be omitted. - */ - @Override - public boolean omit(final String name) { - return (name.equals("META-INF/application.xml") || name.equals("META-INF\\application.xml")); - } - - /** - * @param clients The clients to set. - */ - public void setClients(final List clients) { - this.clients = clients; - } - - /** - * @param ejbjars The ejbjars to set. - */ - public void setEjbjars(final List ejbjars) { - this.ejbjars = ejbjars; - } - - /** - * @param webapps The webapps to set. - */ - public void setWebapps(final List webapps) { - this.webapps = webapps; - } - - /** - * @return Returns the app. - */ - public Document getApp() { - return app; - } - - /** - * Close this archive - */ - @Override - public void close() { - super.close(); - // Remove ear deployment desc - earDD = null; - // reset fields - descriptors = null; - app = null; - ejbCL = null; - commonCL = null; - pathFiles = null; - - // reset - for (Iterator i = getEjbJars(); i.hasNext();) { - EjbJar ejbjar = (EjbJar) i.next(); - ejbjar.close(); - } - - // fill webapp list - for (Iterator i = getWebApps(); i.hasNext();) { - WebApp webapp = (WebApp) i.next(); - webapp.close(); - } - - // fill client list - for (Iterator i = getClients(); i.hasNext();) { - Client client = (Client) i.next(); - client.close(); - } - - // reset internal lists - clients = null; - webapps = null; - ejbjars = null; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/Archive.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/Archive.java deleted file mode 100644 index 47106f198e0f5ca7b50286bce29947c2ff6430cd..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/Archive.java +++ /dev/null @@ -1,133 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genbase.archive; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.util.List; -import java.util.jar.Manifest; - -/** - * An Archive is a Wrapper around a Jar file (ear, war, jar) or - * around a directory structured lik a Jar file (unpacked jar file for example). - * - * @author Guillaume Sauthier - */ -public interface Archive { - - /** - * add the content of the given directory into the root of the archive. - * - * @param directory directory to add - */ - void addDirectory(File directory); - - /** - * add the content of the given directory into the given directory of the - * archive. - * - * @param dirName archive directory name. - * @param directory directory to add. - */ - void addDirectoryIn(String dirName, File directory); - - /** - * add a lonely file into the root directory of the archive. - * - * @param file the file to be added. - */ - void addFile(File file); - - /** - * add a file into the root directory of the archive with a specified name. - * - * @param file the file to be added. - * @param name filename - */ - void addFile(File file, String name); - - /** - * add a lonely file into the given directory of the archive. - * - * @param dirName archive directory name. - * @param file the file to be added. - */ - void addFileIn(String dirName, File file); - - /** - * Returns the File corresponding to the root of the archive. - * - * @return the File corresponding to the root of the archive. - */ - File getRootFile(); - - /** - * Returns the Manifest of the Archive. - * - * @return the Manifest of the Archive. - */ - Manifest getManifest(); - - /** - * Returns an InputStream corresponding to the given filename. - * - * @param filename file name source of the InputStream - * - * @return the InputStream corresponding to the given filename. - * - * @throws IOException When InputStream cannot be retrieved for filename. - */ - InputStream getInputStream(String filename) throws IOException; - - /** - * Returns a List of all files contained in this archive. Original files in - * jar, added Files are all included as String in this Enumeration. - * - * @return a List of all files contained in this archive. - */ - List getContainedFiles(); - - /** - * Returns true if archive is packed or false if archive is unpacked. - * - * @return true if archive is packed or false if archive is unpacked. - */ - boolean isPacked(); - - /** - * Returns the name of the Archive. - * - * @return the name of the Archive. - */ - String getName(); - - /** - * Close this archive - * @throws IOException if close fail - */ - void close() throws IOException; -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/Client.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/Client.java deleted file mode 100644 index 0c58075f34136420e4c23a31edebbebd02c936e3..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/Client.java +++ /dev/null @@ -1,336 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 1999-2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genbase.archive; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.util.Hashtable; -import java.util.List; -import java.util.Map; -import java.util.Vector; -import java.util.jar.Attributes; - -import javax.xml.parsers.ParserConfigurationException; - - - -import org.objectweb.util.monolog.api.BasicLevel; - -import org.ow2.jonas.deployment.api.IEJBRefDesc; -import org.ow2.jonas.deployment.api.IServiceRefDesc; -import org.ow2.jonas.deployment.client.ClientContainerDeploymentDesc; -import org.ow2.jonas.deployment.client.lib.ClientDeploymentDescManager; -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.utils.XMLUtils; -import org.ow2.jonas.lib.loader.ClientClassLoader; -import org.w3c.dom.Document; -import org.xml.sax.SAXException; - -/** - * Client represnets a J2EE Client Archive. - * - * @author Guillaume Sauthier - */ -public class Client extends J2EEArchive implements EjbRefModule, WsClient { - - /** Container application (can be null) */ - private Application app = null; - - /** Client Deployment Desc */ - private ClientContainerDeploymentDesc clientDD = null; - - /** service-ref list */ - private List sRefs; - - /** - * ejb-ref list - */ - private List ejbRefs; - - /** jonas client descriptors */ - private Map descriptors; - - /** - * jonas-client.xml - */ - private Document jclientDoc; - - /** - * Create a new Client not contained in Application - * - * @param archive the archive file - * - * @throws GenBaseException When Init fails. - */ - public Client(Archive archive) throws GenBaseException { - super(archive); - if (getLogger().isLoggable(BasicLevel.DEBUG)) { - getLogger().log(BasicLevel.DEBUG, "Wrapping '" + archive.getName() + "' in Client"); - } - init(); - } - - /** - * Create a new Client contained in Application - * - * @param archive the archive file - * @param app the container Application - * - * @throws GenBaseException When Init fails - */ - public Client(Archive archive, Application app) throws GenBaseException { - super(archive); - setApplication(app); - if (getLogger().isLoggable(BasicLevel.DEBUG)) { - getLogger().log(BasicLevel.DEBUG, "Wrapping '" + archive.getName() + "' in Client"); - } - init(); - } - - /** - * Initialize the Client module. - * - * @throws GenBaseException When client classloader cannot be created or when - * client deployment desc cannot be parsed. - */ - private void init() throws GenBaseException { - loadDescriptors(); - } - - /** - * Load Deployment Descriptor of a Client. - * - * @throws GenBaseException when jonas-client.xml cannot be parsed - */ - private void loadDescriptors() throws GenBaseException { - - descriptors = new Hashtable(); - InputStream jcis = null; - try { - jcis = getJonasClientInputStream(); - if (jcis != null) { - jclientDoc = XMLUtils.newDocument(jcis, "META-INF/jonas-client.xml", isDTDsAllowed()); - descriptors.put("META-INF/jonas-client.xml", jclientDoc); - } - } catch (SAXException saxe) { - String err = getI18n().getMessage("Client.loadDescriptors.parseError"); - throw new GenBaseException(err, saxe); - } catch (ParserConfigurationException pce) { - String err = getI18n().getMessage("Client.loadDescriptors.prepare"); - throw new GenBaseException(err, pce); - } catch (IOException ioe) { - String err = getI18n().getMessage("Client.loadDescriptors.parseError"); - throw new GenBaseException(err, ioe); - } - } - - /** - * Set the container application. - * - * @param app the container application. - */ - public void setApplication(Application app) { - this.app = app; - } - - /** - * Returns the container application (can be null). - * - * @return the container application (can be null). - */ - public Application getApplication() { - return app; - } - - /** - * Returns the list of service-ref elements contained by a module. - * - * @return the list of service-ref elements contained by a module. - */ - public List getServiceRefDescs() { - return sRefs; - } - - /** - * add *.class from directory in the archive. - * - * @param classes directory with classes. - */ - public void addClasses(File classes) { - addDirectory(classes); - } - - /** - * Returns a Map of name to Document for each modified Descriptor of the - * archive. - * - * @return a Map of name to Document - */ - public Map getDescriptors() { - return descriptors; - } - - /** - * Returns true if filename must be omitted in the archive. - * - * @param name filename to be tested - * - * @return true if filename must be omitted. - */ - public boolean omit(String name) { - return (name.equals("META-INF/jonas-client.xml") || name.equals("META-INF\\jonas-client.xml")); - } - - /** - * Returns the Document of the jonas-client.xml file. - * - * @return the Document of the jonas-client.xml file. - */ - public Document getJonasClientDoc() { - return jclientDoc; - } - - /** - * Returns the InputStream of the jonas-client.xml file. - * - * @return the InputStream of the jonas-client.xml file. - * - * @throws IOException When InputStream of jonas-client.xml cannot be - * returned. - */ - public InputStream getJonasClientInputStream() throws IOException { - InputStream is = null; - - if (isPacked()) { - is = getInputStream("META-INF/jonas-client.xml"); - } else { - is = getInputStream("META-INF" + File.separator + "jonas-client.xml"); - } - - return is; - } - - /** - * Initialize the Archive. - * @throws GenBaseException When initialization fails. - */ - public void initialize() throws GenBaseException { - // if client in application, clientClassLoader includes ejbClassLoader too - - try { - if (app == null) { - // simple client case - setModuleClassloader(new ClientClassLoader(getArchive().getRootFile().toURL(), Thread.currentThread() - .getContextClassLoader())); - } else { - // embedded client case - setModuleClassloader(createClientClassLoaderWithinApplication(getApplication().getEJBClassLoader())); - } - } catch (IOException ioe) { - String err = getI18n().getMessage("Client.init.loader", getArchive().getRootFile()); - throw new GenBaseException(err, ioe); - } - - try { - clientDD = ClientDeploymentDescManager.getInstance(getRootFile().getAbsolutePath(), getModuleClassloader()); - } catch (DeploymentDescException dde) { - throw new GenBaseException(dde); - } - - // we want a List of service-ref - sRefs = new Vector(); - IServiceRefDesc[] refs = clientDD.getServiceRefDesc(); - for (int i = 0; i < refs.length; i++) { - sRefs.add(refs[i]); - } - - // List of ejb-refs - ejbRefs = new Vector(); - IEJBRefDesc[] refDesc = clientDD.getEjbRefDesc(); - - for (int i = 0; i < refDesc.length; i++) { - ejbRefs.add(refDesc[i]); - } - - } - - private ClientClassLoader createClientClassLoaderWithinApplication(ClassLoader parent) throws GenBaseException { - - // get Manifest Attributes if any - String classpath = getManifest().getMainAttributes().getValue(Attributes.Name.CLASS_PATH); - // Minimal array siez: 1 item, the client jar file itself - URL[] urls = new URL[1]; - if (classpath != null) { - // Lookup specified files. - String[] paths = classpath.split(" "); - urls = new URL[paths.length + 1]; - for (int i = 0; i < paths.length; i++) { - try { - URL path = new File(app.getRootFile(), paths[i]).toURL(); - urls[i] = path; - } catch (IOException ioe) { - String err = "Cannot transform '" + paths[i] + "' as a URL"; - throw new GenBaseException(err, ioe); - } - } - } - - - ClientClassLoader ccl = null; - try { - urls[urls.length - 1] = getArchive().getRootFile().toURL(); - ccl = new ClientClassLoader(urls, parent); - } catch (IOException e) { - String err = "Cannot create Client ClassLoader for " + getArchive().getName(); - throw new GenBaseException(err, e); - } - - return ccl; - } - - /** - * Returns the list of ejb-ref elements contained by a module. - * @return the list of ejb-ref elements contained by a module. - */ - public List getEjbRefDescs() { - return ejbRefs; - } - - /** - * Close this archive - */ - public void close() { - super.close(); - ejbRefs = null; - clientDD = null; - app = null; - descriptors = null; - jclientDoc = null; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/DummyApplication.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/DummyApplication.java deleted file mode 100644 index 765f3def510a899c2b2971a8788ff01964075994..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/DummyApplication.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genbase.archive; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.Vector; -import java.util.jar.Attributes; -import java.util.jar.Manifest; - -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.utils.TempRepository; -import org.ow2.jonas.generators.genbase.utils.XMLUtils; -import org.ow2.util.file.FileUtils; -import org.ow2.util.file.FileUtilsException; - -/** - * DummyApplication is a wrapper for auto generated application archive. - * - * @author Guillaume Sauthier - */ -public class DummyApplication extends Application { - - /** application filename */ - private String name; - - /** - * Creates a new Application archive. - * - * @param name the file containing the application archive. - * - * @throws GenBaseException When Init fails - */ - public DummyApplication(final String name) throws GenBaseException { - super(createFileArchive(), null); - this.name = name; - init(); - } - - /** - * Create a new FileArchive - * - * @return a new Archive - * - * @throws GenBaseException When Archive creation fails. - */ - private static Archive createFileArchive() throws GenBaseException { - TempRepository tr = TempRepository.getInstance(); - - try { - File tmp = tr.createDir(); - File meta = new File(tmp, "META-INF"); - meta.mkdirs(); - - File manifest = new File(meta, "MANIFEST.MF"); - - Manifest mf = new Manifest(); - mf.getMainAttributes().putValue(Attributes.Name.MANIFEST_VERSION.toString(), "1.0"); - - OutputStream os = new FileOutputStream(manifest); - mf.write(os); - os.flush(); - os.close(); - - // Provide the basis for application.xml - File application = new File(meta, "application.xml"); - InputStream is = DummyApplication.class.getResourceAsStream("application.xml"); - if (is == null) { - throw new GenBaseException("Cannot load 'application.xml' template."); - } - FileUtils.dump(is, application); - - // Close stream - is.close(); - - return new FileArchive(tmp); - } catch (IOException ioe) { - throw new GenBaseException(ioe); - } catch (FileUtilsException fue) { - throw new GenBaseException(fue); - } - } - - /** - * Initialize the DummyApplication. Creates modules lists. Overriddes - * Application.init() behavior - * - * @throws GenBaseException When Descriptor cannot be parsed. - */ - protected void init() throws GenBaseException { - // remove dummy modules - setEjbjars(new Vector()); - setWebapps(new Vector()); - setClients(new Vector()); - - loadDescriptors(); - - XMLUtils.cleanDummyApplication(getApp()); - - } - - /** - * @return Returns the DummyApplication filename. - */ - public String getName() { - return name; - } - -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/DummyWebApp.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/DummyWebApp.java deleted file mode 100644 index a7b3c2e60d11874d9707ccc7931c1c78940537c4..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/DummyWebApp.java +++ /dev/null @@ -1,141 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genbase.archive; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.jar.Attributes; -import java.util.jar.Manifest; - -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.utils.TempRepository; -import org.ow2.util.file.FileUtils; -import org.ow2.util.file.FileUtilsException; - -/** - * DummyWebApp is a wrapper for auto generated webapp archive. - * - * @author Guillaume Sauthier - */ -public class DummyWebApp extends WebApp { - - /** webapp name */ - private String name; - - /** - * Creates a new DummyWebApp archive. - * - * @param app the file containing the webapp archive. - * @param name webapp filename - * - * @throws GenBaseException when archive creation fails. - */ - public DummyWebApp(Application app, String name) throws GenBaseException { - super(createFileArchive(), app); - this.name = name; - } - - /** - * Create a new FileArchive - * - * @return a new Archive - * - * @throws GenBaseException When Archive creation fails. - */ - private static Archive createFileArchive() throws GenBaseException { - TempRepository tr = TempRepository.getInstance(); - - try { - File tmp = tr.createDir(); - File meta = new File(tmp, "META-INF"); - meta.mkdirs(); - - File web = new File(tmp, "WEB-INF"); - web.mkdirs(); - - File manifest = new File(meta, "MANIFEST.MF"); - - Manifest mf = new Manifest(); - mf.getMainAttributes().putValue(Attributes.Name.MANIFEST_VERSION.toString(), "1.0"); - - OutputStream os = new FileOutputStream(manifest); - mf.write(os); - os.flush(); - os.close(); - - // Provide the basis for web.xml - File webXml = new File(web, "web.xml"); - InputStream wis = DummyWebApp.class.getResourceAsStream("web.xml"); - if (wis == null) { - throw new GenBaseException("Cannot load 'web.xml' template."); - } - FileUtils.dump(wis, webXml); - - // Close stream - wis.close(); - - //Load context.xml, used by Tomcat to determine security realm to use (if any) - // Provide the basis for context.xml - File context = new File(meta, "context.xml"); - InputStream cis = DummyWebApp.class.getResourceAsStream("context.xml"); - if (cis == null) { - throw new GenBaseException("Cannot load 'context.xml' template."); - } - FileUtils.dump(cis, context); - // Close stream - cis.close(); - - //Load web-jetty.xml, used by Jetty to determine security realm to use (if any) - // Provide the basis for web-jetty.xml - File jetty = new File(web, "web-jetty.xml"); - InputStream jis = DummyWebApp.class.getResourceAsStream("web-jetty.xml"); - if (jis == null) { - throw new GenBaseException("Cannot load 'web-jetty.xml' template."); - } - FileUtils.dump(jis, jetty); - // Close stream - jis.close(); - - - return new FileArchive(tmp); - } catch (IOException ioe) { - throw new GenBaseException(ioe); - } catch (FileUtilsException fue) { - throw new GenBaseException(fue); - } - } - - /** - * @return Returns the DummyApplication filename. - */ - public String getName() { - return name; - } - -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/Ejb.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/Ejb.java deleted file mode 100644 index eb96ffa5a662af3f96e0476befa30f885360c2cd..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/Ejb.java +++ /dev/null @@ -1,139 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genbase.archive; - -import java.util.List; -import java.util.Vector; - -import org.ow2.jonas.deployment.api.IEJBRefDesc; -import org.ow2.jonas.deployment.api.IServiceRefDesc; -import org.ow2.jonas.deployment.ejb.BeanDesc; -import org.w3c.dom.Element; - - - - -/** - * Ejb represent a Bean in an EjbJar. - * @author Guillaume Sauthier - */ -public class Ejb implements EjbRefModule, WsClient { - - /** - * service-ref list - */ - private List sRefs; - - /** - * ejb-ref list - */ - private List ejbRefs; - - /** - * bean name - */ - private String name; - - /** - * jonas- element (session, entity, message) - */ - private Element jbean; - - /** - * Creates a new Ejb from a BeanDesc - * @param bd the BeanDesc - * @param bean jonas specific bean Element - * (jonas-session/jonas-entity/jonas-message-driven) - */ - public Ejb(BeanDesc bd, Element bean) { - // get name - name = bd.getEjbName(); - - // store jonas informations - jbean = bean; - - // we want a List of service-ref - sRefs = new Vector(); - - IServiceRefDesc[] refs = bd.getServiceRefDesc(); - - for (int i = 0; i < refs.length; i++) { - sRefs.add(refs[i]); - } - - // List of ejb-refs - ejbRefs = new Vector(); - IEJBRefDesc[] refDesc = bd.getEjbRefDesc(); - - for (int i = 0; i < refDesc.length; i++) { - ejbRefs.add(refDesc[i]); - } - } - - /** - * Returns the list of service-ref elements contained by a module. - * @return the list of service-ref elements contained by a module. - */ - public List getServiceRefDescs() { - return sRefs; - } - - - /** - * Returns the list of ejb-ref elements contained by a module. - * @return the list of ejb-ref elements contained by a module. - */ - public List getEjbRefDescs() { - return ejbRefs; - } - - /** - * Returns the bean name. - * @return the bean name. - */ - public String getName() { - return name; - } - - /** - * Returns the bean element. - * @return the bean element. - */ - public Element getJonasBeanElement() { - return jbean; - } - - /** - * Close this archive - */ - public void close() { - sRefs = null; - ejbRefs = null; - name = null; - jbean = null; - } - -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/EjbJar.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/EjbJar.java deleted file mode 100644 index dceb2037291d37eb9df826ae80a591123a29601c..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/EjbJar.java +++ /dev/null @@ -1,397 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genbase.archive; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.util.Hashtable; -import java.util.List; -import java.util.Map; -import java.util.Vector; - -import javax.xml.parsers.ParserConfigurationException; - -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.ejb.BeanDesc; -import org.ow2.jonas.deployment.ejb.DeploymentDesc; -import org.ow2.jonas.deployment.ejb.lib.EjbDeploymentDescManager; -import org.ow2.jonas.deployment.ws.WSDeploymentDesc; -import org.ow2.jonas.deployment.ws.lib.WSDeploymentDescManager; -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.utils.XMLUtils; -import org.ow2.jonas.lib.loader.EjbJarClassLoader; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.xml.sax.SAXException; - - - - -import org.objectweb.util.monolog.api.BasicLevel; - -/** - * EjbJar represents an EjbJar J2EE Archive. - * - * @author Guillaume Sauthier - */ -public class EjbJar extends J2EEArchive implements WsEndpoint { - - /** Application containing the ejbjar */ - private Application app; - - /** WebServices deployment descriptor */ - private WSDeploymentDesc wsDD = null; - - /** EjbJar deployment descriptor */ - private DeploymentDesc ejbDD = null; - - /** inner EJBs List */ - private List ejbs; - - /** descriptors list */ - private Map descriptors; - - /** jonas-ejb-jar document */ - private Document jEjbJar; - - /** jonas-webservices document */ - private Document jWebservices = null; - - /** - * Create a new EjbJar not contained in Application - * - * @param archive - * the archive file - * - * @throws GenBaseException - * When init fails - */ - public EjbJar(Archive archive) throws GenBaseException { - super(archive); - if (getLogger().isLoggable(BasicLevel.DEBUG)) { - getLogger().log(BasicLevel.DEBUG, "Wrapping '" + archive.getName() + "' in EjbJar"); - } - init(); - } - - /** - * Create a new EjbJar contained in Application - * - * @param archive - * the archive file - * @param app - * container application - * - * @throws GenBaseException - * When init fails - */ - public EjbJar(Archive archive, Application app) throws GenBaseException { - super(archive); - setApplication(app); - if (getLogger().isLoggable(BasicLevel.DEBUG)) { - getLogger().log(BasicLevel.DEBUG, "Wrapping '" + archive.getName() + "' in EjbJar"); - } - init(); - } - - /** - * Initialize the EjbJar module. - * - * @throws GenBaseException - * When ejb classlaoder cannot be created or when Descriptor - * cannot be loaded. - */ - private void init() throws GenBaseException { - loadDescriptors(); - } - - - /** - * Initialize the Archive. - * @throws GenBaseException When initialization fails. - */ - public void initialize() throws GenBaseException { - - try { - if (app == null) { - // simple ejb case - setModuleClassloader(new EjbJarClassLoader(new URL[] {getArchive() - .getRootFile().toURL()}, Thread.currentThread() - .getContextClassLoader())); - } else { - // embedded ejb case - setModuleClassloader(app.getEJBClassLoader()); - } - } catch (IOException ioe) { - String err = getI18n().getMessage("EjbJar.init.loader", getArchive() - .getRootFile()); - throw new GenBaseException(err, ioe); - } - - try { - ejbDD = EjbDeploymentDescManager.getDeploymentDesc(getRootFile() - .getAbsolutePath(), getModuleClassloader()); - } catch (DeploymentDescException dde) { - throw new GenBaseException(dde); - } - - try { - wsDD = WSDeploymentDescManager.getDeploymentDesc(getRootFile() - .getAbsolutePath(), getModuleClassloader()); - } catch (DeploymentDescException dde) { - throw new GenBaseException(dde); - } - - // create inner EJBs - ejbs = new Vector(); - - BeanDesc[] bd = ejbDD.getBeanDesc(); - - for (int i = 0; i < bd.length; i++) { - Element jElement = null; - if (jEjbJar != null) { - jElement = XMLUtils.getBeanElement(jEjbJar.getDocumentElement(), bd[i].getEjbName()); - } - ejbs.add(new Ejb(bd[i], jElement)); - } - - } - - - /** - * Load Deployment Descriptor of an EjbJar. - * - * @throws GenBaseException - * When parsing fails - */ - private void loadDescriptors() throws GenBaseException { - InputStream jonasEJBXMLIS = null; - InputStream isJws = null; - try { - - jonasEJBXMLIS = getJonasEjbJarInputStream(); - if (jonasEJBXMLIS != null) { - jEjbJar = XMLUtils.newDocument(jonasEJBXMLIS, "META-INF/jonas-ejb-jar.xml", isDTDsAllowed()); - } - - isJws = getJonasWebservicesInputStream(); - if (isJws != null) { - jWebservices = XMLUtils.newDocument(isJws, - "META-INF/jonas-webservices.xml", isDTDsAllowed()); - } - - } catch (SAXException saxe) { - String err = getI18n().getMessage("EjbJar.loadDescriptors.parseError"); - throw new GenBaseException(err, saxe); - } catch (ParserConfigurationException pce) { - String err = getI18n().getMessage("EjbJar.loadDescriptors.prepare"); - throw new GenBaseException(err, pce); - } catch (IOException ioe) { - String err = getI18n().getMessage("EjbJar.loadDescriptors.parseError"); - throw new GenBaseException(err, ioe); - } - - descriptors = new Hashtable(); - if (jEjbJar != null) { - descriptors.put("META-INF/jonas-ejb-jar.xml", jEjbJar); - } - } - - /** - * Returns the List of Ejb contained in this EjbJar. - * - * @return the List of Ejb contained in this EjbJar. - */ - public List getEjbs() { - return ejbs; - } - - /** - * Returns the list of webservice-description elements contained by a - * module. - * - * @return the list of webservice-description elements contained by a - * module. - */ - public List getServiceDescs() { - if (wsDD != null) { - return wsDD.getServiceDescs(); - } else { - return new Vector(); - } - } - - /** - * Add *.class from directory in the archive. - * - * @param classes - * directory containing classes files. - */ - public void addClasses(File classes) { - addDirectory(classes); - } - - /** - * @return Returns the desired war filename (jonas-webservices/war) - */ - public String getWarName() { - if (wsDD != null) { - return wsDD.getWarFile(); - } else { - return null; - } - } - - /** - * @return Returns the desired context-root (jonas-webservices/context-root) - */ - public String getContextRoot() { - // compute context root name from ejbjar name - String archiveName = this.getArchive().getName(); - String root = null; - if (archiveName.toLowerCase().endsWith(".jar")) { - root = archiveName.toLowerCase().substring(0, archiveName.length() - ".jar".length()); - } else { - root = archiveName; - } - if (wsDD != null) { - String croot = wsDD.getContextRoot(); - if (croot != null) { - root = croot; - } - } - if (getLogger().isLoggable(BasicLevel.DEBUG)) { - getLogger().log(BasicLevel.DEBUG, "Computed context root : " + root); - } - return root; - } - - /** - * Set the container application of this EjbJar - * - * @param app - * container application - */ - public void setApplication(Application app) { - this.app = app; - } - - /** - * Return the container application of this EjbJar - * - * @return the container application of this EjbJar - */ - public Application getApplication() { - return app; - } - - /** - * Returns a Map of name to Document for each modified Descriptor of the - * archive. - * - * @return a Map of name to Document - */ - public Map getDescriptors() { - return descriptors; - } - - /** - * Returns true if filename must be omitted in the archive. - * - * @param name - * filename to be tested - * - * @return true if filename must be omitted. - */ - public boolean omit(String name) { - return (name.equals("META-INF/jonas-ejb-jar.xml") - || name.equals("META-INF\\jonas-ejb-jar.xml")); - } - - /** - * Returns the Document of the jonas-ejb-jar.xml file. - * - * @return the Document of the jonas-ejb-jar.xml file. - */ - public Document getJonasEjbJarDoc() { - return jEjbJar; - } - - /** - * Return the Document of the the jonas-webservices.xml - * - * @return the Document of the jonas-webservices.xml file - */ - public Document getJonasWebservicesDoc() { - return jWebservices; - } - - /** - * Returns the InputStream of the jonas-ejb-jar.xml file. - * - * @return the InputStream of the jonas-ejb-jar.xml file. - * - * @throws IOException if stream is invalid - */ - public InputStream getJonasEjbJarInputStream() throws IOException { - InputStream is = null; - - if (isPacked()) { - is = getInputStream("META-INF/jonas-ejb-jar.xml"); - } else { - is = getInputStream("META-INF" + File.separator - + "jonas-ejb-jar.xml"); - } - - // may be null (optional entry) - return is; - } - - /** - * Returns the InputStream of the jonas-webservices.xml file. - * - * @return the InputStream of the jonas-webservices.xml file. - * @throws IOException When InputStream of jonas-webservices.xml cannot be returned - */ - public InputStream getJonasWebservicesInputStream() throws IOException { - InputStream is = null; - - if (isPacked()) { - is = getInputStream("META-INF/jonas-webservices.xml"); - } else { - is = getInputStream("META-INF" + File.separator - + "jonas-webservices.xml"); - } - return is; - } - - - - - -} diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/EjbRefModule.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/EjbRefModule.java deleted file mode 100644 index c70876d9c4200d515a9e3f0965131bed27aecafc..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/EjbRefModule.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.genbase.archive; - -import java.util.List; - -/** - * Represents an element which has ejb-ref (client, ejb, webapp) - * @author Florent Benoit - */ -public interface EjbRefModule { - - /** - * Returns the list of ejb-ref elements contained by a module. - * @return the list of ejb-ref elements contained by a module. - */ - List getEjbRefDescs(); -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/FileArchive.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/FileArchive.java deleted file mode 100644 index c072ec15b3770620c53b8c8c63cb29eb6c2c3e94..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/FileArchive.java +++ /dev/null @@ -1,147 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genbase.archive; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.List; -import java.util.Vector; -import java.util.jar.Manifest; - -import org.ow2.jonas.generators.genbase.GenBaseException; - - - -/** - * A FileArchive is a wrapper for directory structured as a jar. - * - * @author Guillaume Sauthier - */ -public class FileArchive extends AbsArchive { - - /** - * Creates a new FileArchive object. - * - * @param archive directory structured as a jar - * - * @throws GenBaseException When manifest cannot be loaded - */ - public FileArchive(File archive) throws GenBaseException { - super(archive); - - try { - File mf = new File(archive, "META-INF" + File.separator + "MANIFEST.MF"); - - if (mf.exists()) { - InputStream is = new FileInputStream(mf); - setManifest(new Manifest(is)); - is.close(); - } else { - setManifest(new Manifest()); - } - } catch (Exception e) { - String err = getI18n().getMessage("FileArchive.constr.manifest", getRootFile()); - throw new GenBaseException(err, e); - } - } - - /** - * Returns an InputStream corresponding to the given filename. - * - * @param filename file name source of the InputStream - * - * @return the InputStream corresponding to the given filename. - * - * @throws IOException When InputStream corersponding to the given filename - * cannot be found. - */ - public InputStream getInputStream(String filename) throws IOException { - File file = (File) getFiles().get(filename); - - if (file == null) { - // filename not found in added files - // try root search - file = new File(getRootFile(), filename); - - if (!file.exists()) { - return null; - } - } - - // file exists (in added files or in original archive) - return new FileInputStream(file); - } - - /** - * Returns a List of all files contained in this archive. Original files in - * jar, added Files are all included as String in this Enumeration. - * - * @return a List of all files contained in this archive. - */ - public List getContainedFiles() { - List list = new Vector(getFiles().keySet()); - - // add files of the original archive - traverse("", getRootFile(), list); - - return list; - } - - /** - * Add all files contained in the given directory into a list. - * - * @param dirName current directory name - * @param base directory where file are listed - * @param map list of filename - */ - private static void traverse(String dirName, File base, List map) { - File[] childs = base.listFiles(); - - // directory exists ? - if (childs != null) { - for (int i = 0; i < childs.length; i++) { - if (childs[i].isFile()) { - // File - map.add(dirName + childs[i].getName()); - } else { - // Directory - traverse(dirName + childs[i].getName() + File.separator, childs[i], map); - } - } - } - } - - /** - * Returns true if archive is packed or false if archive is unpacked. - * - * @return true if archive is packed or false if archive is unpacked. - */ - public boolean isPacked() { - return false; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/J2EEArchive.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/J2EEArchive.java deleted file mode 100644 index cabacc05b4708cb6bbe2d65a5adcd064eb3a9340..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/J2EEArchive.java +++ /dev/null @@ -1,272 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- -*/ - -package org.ow2.jonas.generators.genbase.archive; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.util.List; -import java.util.Map; -import java.util.jar.Manifest; - -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.generator.Config; -import org.ow2.jonas.generators.genbase.generator.GeneratorFactories; -import org.ow2.jonas.generators.genbase.generator.GeneratorFactory; -import org.ow2.jonas.lib.util.I18n; -import org.ow2.jonas.lib.util.Log; - - - -import org.objectweb.util.monolog.api.Logger; - - -/** - * Base Class for all J2EE modules (application, ejbjar, client, webapp). - * - * @author Guillaume Sauthier - * @see org.ow2.jonas.generators.genbase.archive.Archive - */ -public abstract class J2EEArchive implements Archive { - /** i18n */ - private static I18n i18n = I18n.getInstance(J2EEArchive.class); - - /** logger */ - private static Logger logger = Log.getLogger(Log.JONAS_GENBASE_PREFIX); - - /** encapsulated archive */ - private Archive archive; - - /** J2EE Archive inner ClassLoader */ - private ClassLoader moduleClassloader = null; - - /** - * Creates a new J2EEArchive object. - * - * @param archive Archive containing files - */ - public J2EEArchive(Archive archive) { - this.archive = archive; - } - - /** - * add the content of the given directory into the root of the archive. - * - * @param directory directory to add - */ - public void addDirectory(File directory) { - archive.addDirectory(directory); - } - - /** - * add the content of the given directory into the given directory of the - * archive. - * - * @param dirName archive directory name. - * @param directory directory to add. - */ - public void addDirectoryIn(String dirName, File directory) { - archive.addDirectoryIn(dirName, directory); - } - - /** - * add a lonely file into the root directory of the archive. - * - * @param file the file to be added. - */ - public void addFile(File file) { - archive.addFile(file); - } - - /** - * add a file into the root directory of the archive with a specified name. - * - * @param file the file to be added. - * @param name filename - */ - public void addFile(File file, String name) { - archive.addFile(file, name); - } - - /** - * add a lonely file into the given directory of the archive. - * - * @param dirName archive directory name. - * @param file the file to be added. - */ - public void addFileIn(String dirName, File file) { - archive.addFileIn(dirName, file); - } - - /** - * Returns the File corresponding to the root of the archive. - * - * @return the File corresponding to the root of the archive. - */ - public File getRootFile() { - return archive.getRootFile(); - } - - /** - * Returns the Manifest of the Archive. - * - * @return the Manifest of the Archive. - */ - public Manifest getManifest() { - return archive.getManifest(); - } - - /** - * Returns an InputStream corresponding to the given filename. - * - * @param filename file name source of the InputStream - * - * @return the InputStream corresponding to the given filename. - * - * @throws IOException When Cannot get InputStream from filename - */ - public InputStream getInputStream(String filename) - throws IOException { - return archive.getInputStream(filename); - } - - /** - * Returns a List of all files contained in this archive. Original files in - * jar, added Files are all included as String in this Enumeration. - * - * @return a List of all files contained in this archive. - */ - public List getContainedFiles() { - return archive.getContainedFiles(); - } - - /** - * Returns true if archive is packed or false if archive is unpacked. - * - * @return true if archive is packed or false if archive is unpacked. - */ - public boolean isPacked() { - return archive.isPacked(); - } - - /** - * Returns the name of the Archive. - * - * @return the name of the Archive. - */ - public String getName() { - return archive.getName(); - } - - /** - * Returns a Map of name to Document for each modified Descriptor of the - * archive. - * - * @return a Map of name to Document - */ - public abstract Map getDescriptors(); - - /** - * Returns true if filename must be omitted in the archive. - * - * @param name filename to be tested - * - * @return true if filename must be omitted. - */ - public abstract boolean omit(String name); - - /** - * @return Returns the i18n. - */ - public static I18n getI18n() { - return i18n; - } - /** - * @return Returns the logger. - */ - public static Logger getLogger() { - return logger; - } - /** - * @return Returns the archive. - */ - public Archive getArchive() { - return archive; - } - /** - * @param archive The archive to set. - */ - public void setArchive(Archive archive) { - this.archive = archive; - } - - /** - * Initialize the Archive. - * @throws GenBaseException When initialization fails. - */ - public abstract void initialize() throws GenBaseException; - - /** - * @return Returns the module inner ClassLoader - */ - public ClassLoader getModuleClassloader() { - return moduleClassloader; - } - - /** - * @param moduleClassloader The moduleClassloader to set. - */ - public void setModuleClassloader(ClassLoader moduleClassloader) { - this.moduleClassloader = moduleClassloader; - } - - /** - * @return true if the use of DTDs is allowed or if we have to use only web services - */ - protected boolean isDTDsAllowed() { - GeneratorFactory gf = GeneratorFactories.getCurrentFactory(); - if (gf == null) { - throw new IllegalStateException(i18n.getMessage("J2EEArchive.isDTDsAllowed.noFactory")); - } - Config config = gf.getConfiguration(); - if (config == null) { - throw new IllegalStateException(i18n.getMessage("J2EEArchive.isDTDsAllowed.noConfig")); - } - return config.isDTDsAllowed(); - } - - /** - * Close this archive - */ - public void close() { - try { - this.archive.close(); - } catch (IOException ioe) { - throw new RuntimeException("Cannot close file '" + archive + "'", ioe); - } - archive = null; - } -} diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/JarArchive.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/JarArchive.java deleted file mode 100644 index 3aeadcfbc87939dc08eb4e706f242c7d0a11c4b1..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/JarArchive.java +++ /dev/null @@ -1,141 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genbase.archive; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.Enumeration; -import java.util.List; -import java.util.Vector; -import java.util.jar.JarFile; -import java.util.zip.ZipEntry; - -import org.ow2.jonas.generators.genbase.GenBaseException; - - - -/** - * A JarArchive is a wrapper for jar file. - * - * @author Guillaume Sauthier - */ -public class JarArchive extends AbsArchive { - - /** encapsulated Jar File */ - private JarFile jar; - - /** - * Creates a new JarArchive object. - * - * @param jar the File corresponding to a JarFile - * - * @throws GenBaseException When Manifest cannot be found - */ - public JarArchive(File jar) throws GenBaseException { - super(jar); - - try { - this.jar = new JarFile(jar); - setManifest(this.jar.getManifest()); - } catch (IOException ioe) { - String err = getI18n().getMessage("JarArchive.constr.jar", jar); - throw new GenBaseException(err, ioe); - } - } - - /** - * Returns an InputStream corresponding to the given filename. - * - * @param filename file name source of the InputStream - * - * @return the InputStream corresponding to the given filename. - * - * @throws IOException when InputStream of the filename cannot be found in - * the archive - */ - public InputStream getInputStream(String filename) throws IOException { - // try get the file from the map - File file = (File) getFiles().get(filename); - - if (file == null) { - // filename not found in added files - // try jar search - ZipEntry ze = jar.getEntry(filename); - - // Entry found ? - if (ze == null) { - return null; - } else { - return jar.getInputStream(ze); - } - } else { - // file exists (in added files) - return new FileInputStream(file); - } - } - - /** - * Returns a List of all files contained in this archive. Original files in - * jar, added Files are all included as String in this Enumeration. - * - * @return a List of all files contained in this archive. - */ - public List getContainedFiles() { - List list = new Vector(getFiles().keySet()); - - // add files of the original archive - for (Enumeration e = jar.entries(); e.hasMoreElements();) { - ZipEntry ze = (ZipEntry) e.nextElement(); - list.add(ze.getName()); - } - - return list; - } - - /** - * Returns true if archive is packed or false if archive is unpacked. - * - * @return true if archive is packed or false if archive is unpacked. - */ - public boolean isPacked() { - return true; - } - - /** - * Close this archive - */ - public void close() { - super.close(); - try { - jar.close(); - } catch (IOException ioe) { - throw new RuntimeException("Cannot close file '" + jar + "'", ioe); - } - jar = null; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/WebApp.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/WebApp.java deleted file mode 100644 index c0bb7b5b1527a28ee455fa0cdfd832d5fa80303e..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/WebApp.java +++ /dev/null @@ -1,644 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id:WebApp.java 10528 2007-06-05 08:26:23Z sauthieg $ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genbase.archive; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.util.Hashtable; -import java.util.List; -import java.util.Map; -import java.util.Vector; -import java.util.jar.JarFile; - -import javax.xml.parsers.ParserConfigurationException; - -import org.objectweb.util.monolog.api.BasicLevel; -import org.ow2.jonas.deployment.api.IEJBRefDesc; -import org.ow2.jonas.deployment.api.IServiceRefDesc; -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.web.WebContainerDeploymentDesc; -import org.ow2.jonas.deployment.web.lib.WebDeploymentDescManager; -import org.ow2.jonas.deployment.ws.WSDeploymentDesc; -import org.ow2.jonas.deployment.ws.lib.WSDeploymentDescManager; -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.utils.TempRepository; -import org.ow2.jonas.generators.genbase.utils.XMLUtils; -import org.ow2.jonas.lib.loader.WebappClassLoader; -import org.ow2.util.file.FileUtils; -import org.ow2.util.file.FileUtilsException; -import org.w3c.dom.Document; -import org.xml.sax.SAXException; - -/** - * A WebApp is a wrapper class around a Web Archive. - * - * @author Guillaume Sauthier - */ -public class WebApp extends J2EEArchive implements EjbRefModule, WsClient, WsEndpoint { - - /** Application containing the webapp */ - private Application app = null; - - /** webapp archive filename */ - private String webFilename; - - /** Web deployment descriptor */ - private WebContainerDeploymentDesc webDD; - - /** WebServices deployment descriptor */ - private WSDeploymentDesc wsDD = null; - - /** service-ref list */ - private List sRefs; - - /** web-app */ - private Document webApp = null; - - /** jonas-web-app */ - private Document jonasWebApp = null; - - /** webservices */ - private Document webservices = null; - - /** jonas-webservices */ - private Document jonasWebservices = null; - - /** context */ - private Document context = null; - - /** webjetty */ - private Document webjetty = null; - - /** web descriptors */ - private Map descriptors; - - /** - * ejb-ref list - */ - private List ejbRefs; - - /** - * Create an alone WebApp (not in an ear). - * - * @param archive file archive - * - * @throws GenBaseException When Init fails - */ - public WebApp(Archive archive) throws GenBaseException { - super(archive); - webFilename = archive.getName(); - if (getLogger().isLoggable(BasicLevel.DEBUG)) { - getLogger().log(BasicLevel.DEBUG, "Wrapping '" + archive.getName() + "' in WebApp"); - } - init(); - } - - /** - * Create an embded WebApp. - * - * @param archive Web Archive - * @param app container application - * - * @throws GenBaseException When init fails - */ - public WebApp(Archive archive, Application app) throws GenBaseException { - super(archive); - webFilename = archive.getName(); - setApplication(app); - if (getLogger().isLoggable(BasicLevel.DEBUG)) { - getLogger().log(BasicLevel.DEBUG, "Wrapping '" + archive.getName() + "' in WebApp"); - } - init(); - } - - /** - * Initialize the WebApp module. - * - * @throws GenBaseException When classloader cannot be created or when - * decriptor loading fails. - */ - private void init() throws GenBaseException { - // load Deployment Descs - loadDescriptors(); - } - - /** - * Load Deployment Descriptor of a WebApp. - * - * @throws GenBaseException When descriptor cannot be parsed - */ - private void loadDescriptors() throws GenBaseException { - try { - - // Optional - InputStream webIs = getWebInputStream(); - if (webIs != null) { - webApp = XMLUtils.newDocument(webIs, "WEB-INF/web.xml", isDTDsAllowed()); - } - - // jonas-web.xml (optionnal) - InputStream is = getJonasWebInputStream(); - - if (is != null) { - jonasWebApp = XMLUtils.newDocument(is, "WEB-INF/jonas-web.xml", isDTDsAllowed()); - } - - // webservices.xml (optionnal) - InputStream isWS = getWebservicesInputStream(); - - if (isWS != null) { - webservices = XMLUtils.newDocument(isWS, "WEB-INF/webservices.xml", isDTDsAllowed()); - } - - // jonas-webservices.xml (optionnal) - InputStream isJWS = getJonasWebservicesInputStream(); - - if (isJWS != null) { - jonasWebservices = XMLUtils.newDocument(isJWS, "WEB-INF/jonas-webservices.xml", isDTDsAllowed()); - } - - // context.xml (optional) - InputStream isContext = getContextInputStream(); - if (isContext != null) { - context = XMLUtils.newDocument(isContext, "META-INF/context.xml", isDTDsAllowed(), false); - } - - //web-jetty.xml (optional) - InputStream isWebJetty = getWebJettyInputStream(); - if (isWebJetty != null) { - // Jetty needs web-jetty.xml to have a dtd - webjetty = XMLUtils.newDocument(isWebJetty, "WEB-INF/web-jetty.xml", true, true); - } - - } catch (SAXException saxe) { - String err = getI18n().getMessage("WebApp.loadDescriptors.parseError"); - throw new GenBaseException(err, saxe); - } catch (ParserConfigurationException pce) { - String err = getI18n().getMessage("WebApp.loadDescriptors.prepare"); - throw new GenBaseException(err, pce); - } catch (IOException ioe) { - String err = getI18n().getMessage("WebApp.loadDescriptors.parseError"); - throw new GenBaseException(err, ioe); - } - - descriptors = new Hashtable(); - descriptors.put("WEB-INF/web.xml", webApp); - - if (jonasWebApp != null) { - descriptors.put("WEB-INF/jonas-web.xml", jonasWebApp); - } - - if (webservices != null) { - descriptors.put("WEB-INF/webservices.xml", webservices); - } - - if (jonasWebservices != null) { - descriptors.put("WEB-INF/jonas-webservices.xml", jonasWebservices); - } - - if (context != null) { - descriptors.put("META-INF/context.xml", context); - } - - if (webjetty != null) { - descriptors.put("WEB-INF/web-jetty.xml", webjetty); - } - } - - /** - * Returns the name of the Archive. Overrides J2EEArchive.getName(); - * - * @see org.ow2.jonas.generators.genbase.archive.J2EEArchive#getName() - * - * @return the name of the Archive. - */ - public String getName() { - return webFilename; - } - - /** - * Set the container application. - * - * @param app the container application. - */ - public void setApplication(Application app) { - this.app = app; - } - - /** - * Returns the container application (can be null). - * - * @return the container application (can be null). - */ - public Application getApplication() { - return app; - } - - /** - * Returns the list of service-ref elements contained by a module. - * - * @return the list of service-ref elements contained by a module. - */ - public List getServiceRefDescs() { - return sRefs; - } - - /** - * Returns the list of webservice-description elements contained by a - * module. - * - * @return the list of webservice-description elements contained by a - * module. - */ - public List getServiceDescs() { - if (wsDD != null) { - return wsDD.getServiceDescs(); - } else { - return new Vector(); - } - } - - /** - * Add Archive classes. - * - * @param classes root directory containing classes. - */ - public void addClasses(File classes) { - addDirectoryIn("WEB-INF/classes", classes); - } - - /** - * Returns the Document of the web.xml file. - * - * @return the Document of the web.xml file. - */ - public Document getWebAppDoc() { - return webApp; - } - - /** - * Returns the Document of the jonas-web.xml file. - * - * @return the Document of the jonas-web.xml file. - */ - public Document getJonasWebAppDoc() { - return jonasWebApp; - } - - /** - * Returns the Document of the webservices.xml file. - * - * @return the Document of the webservices.xml file. - */ - public Document getWebservicesDoc() { - return webservices; - } - - /** - * Returns the Document of the jonas-webservices.xml file. - * - * @return the Document of the jonas-webservices.xml file. - */ - public Document getJonasWebservicesDoc() { - return jonasWebservices; - } - - /** - * Returns a new Document of the context.xml file - * - * @return the Document of the context.xml file. - * @throws GenBaseException if context.xml Document cannot be produced. - */ - public Document newContextDoc() throws GenBaseException { - - // Do not validate context.xml as there is no associated DTD or XML Schema - context = loadXMLDescriptorAsResource("context.xml", "META-INF/context.xml", false); - - return context; - } - - /** - * Returns a new Document of the web-jetty.xml file - * - * @return the document of the web-jetty.xml file - * @throws GenBaseException if context.xml Document cannot be produced. - */ - public Document newWebJettyDoc() throws GenBaseException { - - webjetty = loadXMLDescriptorAsResource("web-jetty.xml", "WEB-INF/web-jetty.xml"); - - return webjetty; - } - - /** - * Load and validate an XML {@link Document} as a resource. - * @param resource resource's name (used to load from the classloader) - * @param name name of the resource in the final web-app - * @return Returns an XML {@link Document} representing the given resource. - * @throws GenBaseException If unable to load the specified resource from the classloader. - */ - private Document loadXMLDescriptorAsResource(final String resource, final String name) throws GenBaseException { - - return loadXMLDescriptorAsResource(resource, name, true); - } - - /** - * Load and validate (if required) an XML {@link Document} as a resource. - * @param resource resource's name (used to load from the classloader) - * @param name name of the resource in the final web-app - * @param validate Indicate if the {@link Document} should be validated. - * @return Returns an XML {@link Document} representing the given resource. - * @throws GenBaseException If unable to load the specified resource from the classloader. - */ - private Document loadXMLDescriptorAsResource(final String resource, - final String name, - final boolean validate) throws GenBaseException { - Document doc = null; - try { - doc = XMLUtils.newDocument(this.getClass().getResourceAsStream(resource), name, validate); - } catch (Exception e) { - throw new GenBaseException("Cannot load '" + name + "'", e); - } - - // save the descriptor in the descriptor Map - descriptors.put(name, doc); - - return doc; - } - - /** - * Returns the Document of the context.xml file - * - * @return the Document of the context.xml file. - */ - public Document getContextDoc() { - return context; - } - - /** - * Returns the Document of the web-=jetty.xml file - * - * @return the document of the web-jetty.xml file - */ - public Document getWebJettyDoc() { - return webjetty; - } - - /** - * Returns the InputStream of the web.xml file. - * - * @return the InputStream of the web.xml file. - * - * @throws IOException When InputStream cannot be returned. - */ - private InputStream getWebInputStream() throws IOException { - InputStream is = null; - - if (isPacked()) { - is = getInputStream("WEB-INF/web.xml"); - } else { - is = getInputStream("WEB-INF" + File.separator + "web.xml"); - } - - return is; - } - - /** - * Returns the InputStream of the jonas-web.xml file. - * - * @return the InputStream of the jonas-web.xml file. - * - * @throws IOException When InputStream cannot be returned. - */ - private InputStream getJonasWebInputStream() throws IOException { - InputStream is = null; - - if (isPacked()) { - is = getInputStream("WEB-INF/jonas-web.xml"); - } else { - is = getInputStream("WEB-INF" + File.separator + "jonas-web.xml"); - } - - return is; - } - - /** - * Returns the InputStream of the webservices.xml file. - * - * @return the InputStream of the webservices.xml file. - * - * @throws IOException When InputStream cannot be returned. - */ - private InputStream getWebservicesInputStream() throws IOException { - InputStream is = null; - - if (isPacked()) { - is = getInputStream("WEB-INF/webservices.xml"); - } else { - is = getInputStream("WEB-INF" + File.separator + "webservices.xml"); - } - - return is; - } - - /** - * Returns the InputStream of the jonas-webservices.xml file. - * - * @return the InputStream of the jonas-webservices.xml file. - * - * @throws IOException When InputStream cannot be returned. - */ - private InputStream getJonasWebservicesInputStream() throws IOException { - InputStream is = null; - - if (isPacked()) { - is = getInputStream("WEB-INF/jonas-webservices.xml"); - } else { - is = getInputStream("WEB-INF" + File.separator + "jonas-webservices.xml"); - } - - return is; - } - - /** - * Returns the InputStream of the context.xml file. - * - * @return the InputStream of the context.xml file. - * @throws IOException When InputStream cannot be returned - */ - private InputStream getContextInputStream() throws IOException { - InputStream is = null; - if (isPacked()) { - is = getInputStream("META-INF/context.xml"); - } else { - is = getInputStream("META-INF" + File.separator + "context.xml"); - } - - return is; - } - - /** - * Returns the InputStream of the web-jetty.xml file - * - * @return the InputStream of the web-jetty.xml file - * @throws IOException When InputStream cannot be returned - */ - private InputStream getWebJettyInputStream() throws IOException { - InputStream is = null; - if (isPacked()) { - is = getInputStream("WEB-INF/web-jetty.xml"); - } else { - is = getInputStream("WEB-INF" + File.separator + "web-jetty.xml"); - } - - return is; - } - - /** - * Returns a Map of name to Document for each modified Descriptor of the - * archive. - * - * @return a Map of name to Document - */ - public Map getDescriptors() { - return descriptors; - } - - /** - * Returns true if filename must be omitted in the archive. - * - * @param name filename to be tested - * - * @return true if filename must be omitted. - */ - public boolean omit(String name) { - return (name.equals("WEB-INF/web.xml") || name.equals("WEB-INF\\web.xml") - || name.equals("WEB-INF/jonas-web.xml") || name.equals("WEB-INF\\jonas-web.xml") - || name.equals("WEB-INF/webservices.xml") || name.equals("WEB-INF\\webservices.xml") - || name.equals("WEB-INF/jonas-webservices.xml") || name.equals("WEB-INF\\jonas-webservices.xml") - || name.equals("META-INF/context.xml") || name.equals("META-INF\\context.xml") - || name.equals("WEB-INF/web-jetty.xml") || name.equals("WEB-INF\\web-jetty.xml")); - } - - /** - * Initialize the Archive. - * @throws GenBaseException When initialization fails. - */ - public void initialize() throws GenBaseException { - File webappUnpackDir = getRootFile(); - try { - - if (getArchive().isPacked()) { - JarFile jf = new JarFile(getRootFile()); - TempRepository tr = TempRepository.getInstance(); - webappUnpackDir = tr.createDir(); - FileUtils.unpack(jf, webappUnpackDir); - jf.close(); - setArchive(new FileArchive(webappUnpackDir)); - } - - if (app == null) { - // simple webapp case - setModuleClassloader(new WebappClassLoader(webappUnpackDir.toURL(), Thread.currentThread() - .getContextClassLoader())); - } else { - // embedded webapp case - setModuleClassloader(new WebappClassLoader(webappUnpackDir.toURL(), app.getEJBClassLoader())); - } - } catch (IOException ioe) { - String err = getI18n().getMessage("WebApp.init.loader", getArchive().getRootFile()); - throw new GenBaseException(err, ioe); - } catch (FileUtilsException fue) { - String err = getI18n().getMessage("WebApp.init.loader", getArchive().getRootFile()); - throw new GenBaseException(err, fue); - } - - try { - webDD = WebDeploymentDescManager.getDeploymentDesc(webappUnpackDir.getAbsolutePath(), getModuleClassloader()); - } catch (DeploymentDescException dde) { - throw new GenBaseException(dde); - } - - try { - wsDD = WSDeploymentDescManager.getDeploymentDesc(webappUnpackDir.getAbsolutePath(), getModuleClassloader()); - } catch (DeploymentDescException dde) { - throw new GenBaseException(dde); - } - - // we want a List of service-ref - sRefs = new Vector(); - - IServiceRefDesc[] refs = webDD.getServiceRefDesc(); - - for (int i = 0; i < refs.length; i++) { - sRefs.add(refs[i]); - } - - // List of ejb-refs - ejbRefs = new Vector(); - IEJBRefDesc[] refDesc = webDD.getEjbRefDesc(); - - for (int i = 0; i < refDesc.length; i++) { - ejbRefs.add(refDesc[i]); - } - - } - - /** - * @return Returns the context-root to use for this group of Services. - */ - public String getContextRoot() { - return this.wsDD.getContextRoot(); - } - - /** - * Returns the list of ejb-ref elements contained by a module. - * @return the list of ejb-ref elements contained by a module. - */ - public List getEjbRefDescs() { - return ejbRefs; - } - - /** - * Close this archive - */ - public void close() { - sRefs = null; - ejbRefs = null; - webDD = null; - wsDD = null; - webApp = null; - app = null; - descriptors = null; - jonasWebApp = null; - webFilename = null; - webservices = null; - jonasWebservices = null; - context = null; - webjetty = null; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/WsClient.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/WsClient.java deleted file mode 100644 index 1cb9defeaee837eea034bd9527382e214592d38b..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/WsClient.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genbase.archive; - -import java.util.List; - -/** - * represent an element client of webservice (webapp, ejb, client) - * - * @author Guillaume Sauthier - */ -public interface WsClient { - - /** - * Returns the list of service-ref elements contained by a module. - * - * @return the list of service-ref elements contained by a module. - */ - List getServiceRefDescs(); -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/WsEndpoint.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/WsEndpoint.java deleted file mode 100644 index d20552d7300aebd880acf5894bbc411323d65db4..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/archive/WsEndpoint.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genbase.archive; - -import java.util.List; - -/** - * represent an element containing webservices.xml file (webapp, ejbjar) - * - * @author Guillaume Sauthier - */ -public interface WsEndpoint { - - /** - * Returns the list of webservice-description elements contained by a - * module. - * - * @return the list of webservice-description elements contained by a - * module. - */ - List getServiceDescs(); - - /** - * @return Returns the context-root to use for this group of Services. - */ - String getContextRoot(); -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/generator/AbsGenerator.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/generator/AbsGenerator.java deleted file mode 100644 index c373362a0d6ada1c16164023f803e0c391e6a1fa..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/generator/AbsGenerator.java +++ /dev/null @@ -1,179 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2003-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genbase.generator; - -import java.io.File; -import java.io.FileFilter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.archive.Archive; -import org.ow2.jonas.generators.genbase.utils.TempRepository; -import org.ow2.jonas.lib.util.I18n; -import org.ow2.jonas.lib.util.Log; -import org.ow2.util.file.FileUtils; -import org.ow2.util.url.URLUtils; - -/** - * Generators provide a structure to be extended for specific generation - * mechanisms. - * @author Guillaume Sauthier - */ -public abstract class AbsGenerator { - - /** - * i18n - */ - private static I18n i18n = I18n.getInstance(AbsGenerator.class); - - /** - * logger - */ - private static Logger logger = Log.getLogger(Log.JONAS_GENBASE_PREFIX); - - /** - * Configuration to be used - */ - private Config config; - - /** - * compiled classes directory - */ - private File classes; - - /** - * generated files directory - */ - private File sources; - - /** - * Creates a new Generator with the given Config. - * @param config internal configuration object. - * @throws GenBaseException When sources and target temporary directory - * cannot be created - */ - public AbsGenerator(final Config config) throws GenBaseException { - this.config = config; - - // creates temporary directories - TempRepository tr = TempRepository.getInstance(); - - try { - sources = tr.createDir(); - classes = tr.createDir(); - } catch (IOException ioe) { - String err = i18n.getMessage("AbsGenerator.constr.ioe"); - logger.log(BasicLevel.ERROR, err); - throw new GenBaseException(err, ioe); - } - } - - /** - * Generate files. - * @throws GenBaseException When generation fails. - */ - public abstract void generate() throws GenBaseException; - - /** - * Compile generated java files into classes directory. - * @throws GenBaseException When compilation fails - */ - public abstract void compile() throws GenBaseException; - - /** - * Recursively walk a directory tree and return a List of all files found. - * @param rootSrc root directory - * @param src base directory - * @return the list containing all found files - */ - protected List getJavaSources(final File rootSrc, final File src) { - List result = new ArrayList(); - - // add each java sources contained in the directory - File[] files = src.listFiles(new FileFilter() { - public boolean accept(File file) { - return file.isFile() && file.getName().endsWith(".java"); - } - }); - - for (int i = 0; i < files.length; i++) { - result.add(files[i].getPath().substring(rootSrc.getPath().length() + 1)); - } - - // reapply on subdirectories - files = src.listFiles(new FileFilter() { - public boolean accept(final File file) { - return file.isDirectory(); - } - }); - - for (int i = 0; i < files.length; i++) { - List deeperList = getJavaSources(rootSrc, files[i]); - result.addAll(deeperList); - } - - return result; - } - - /** - * Add generated files into an Archive - * @param archive the archive destination of generated files. - * @throws GenBaseException When files cannot be added in the given Archive. - */ - public abstract void addFiles(Archive archive) throws GenBaseException; - - /** - * @return the config. - */ - public Config getConfig() { - return config; - } - - /** - * @return the logger. - */ - public static Logger getLogger() { - return logger; - } - - /** - * @return the classes. - */ - public File getClasses() { - return classes; - } - - /** - * @return the sources. - */ - public File getSources() { - return sources; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/generator/Config.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/generator/Config.java deleted file mode 100644 index 85a877bf6d9a3235e3433b17c09580e205fce56d..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/generator/Config.java +++ /dev/null @@ -1,423 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2003-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.genbase.generator; - -import java.io.File; -import java.net.URL; -import java.net.URLClassLoader; -import java.util.ArrayList; -import java.util.List; - -import org.ow2.jonas.lib.bootstrap.loader.JClassLoader; -import org.ow2.jonas.lib.util.Env; - -/** - * Configuration object storing generation params. - */ -public class Config { - - /** - * packed mode. - */ - public static final int PACKED = 0; - - /** - * unpacked mode. - */ - public static final int UNPACKED = 1; - - /** - * Java executable name. - */ - private String nameJava = "java"; - - /** - * Javac executable name. - */ - private String nameJavac = "javac"; - - /** - * Rmic executable name. - */ - private String nameRmic = "rmic"; - - /** - * Javac options. - */ - private List javacOpts = new ArrayList(); - - /** - * Bin directory for JDK. - */ - private String javaHomeBin = null; - - /** - * no config needed . - */ - private boolean noConfig = false; - - /** - * verbose mode. - */ - private boolean verbose = false; - - /** - * debug mode . - */ - private boolean debug = false; - - /** - * classpath. - */ - private String classpath = "."; - - /** - * output directory. - */ - private File out = new File("."); - - /** - * keep alrady generated files. - */ - private boolean keepGenerated = false; - - /** - * validating parser ? - */ - private boolean parseWithValidation = true; - - /** - * configuration error. - */ - private boolean error = false; - - /** - * file input name. - */ - private String inputname; - - /** help requested ? */ - private boolean help = false; - - /** - * Save mode (PACKED/UNPACKED). - */ - private int saveMode = PACKED; - - /** - * DTDs use is allowed. - */ - private boolean dtdsAllowed = false; - - /** - * Creates a new Config. Automatically setup javaHomeBin property. And - * create classpath from classloader. - */ - public Config() { - // Setup java_home/bin directory - setJavaHomeBin(System.getProperty("java.home", "")); - - if (!("".equals(getJavaHomeBin()))) { - if (Env.isOsMacOsX()) { - setJavaHomeBin(getJavaHomeBin() + File.separator + "bin" + File.separator); - } else { - // JRE Directory ! - setJavaHomeBin(getJavaHomeBin() + File.separator + ".." + File.separator + "bin" + File.separator); - } - } - - // classpath - URLClassLoader ucl = (URLClassLoader) (Thread.currentThread().getContextClassLoader()); - - // Try to detect the mode - if (ucl instanceof JClassLoader) { - setClasspath(((JClassLoader) ucl).getClassPath()); - } else { - setClasspath(extractURLs(ucl)); - } - } - - /** - * @param ucl the ClassLoader to search in - * @return Returns the classpath representation of that ClassLoader - */ - private String extractURLs(final URLClassLoader ucl) { - URL[] urls = ucl.getURLs(); - // for each URL - StringBuffer sb = new StringBuffer(); - boolean first = true; - for (int i = 0; i < urls.length; i++) { - String file = urls[i].getFile(); - if (!"".equals(file)) { - if (first) { - sb.append(file); - first = false; - } else { - sb.append(File.pathSeparator + file); - } - } - } - return sb.toString(); - } - - /** - * @param nameJavac Set javac command name to use - */ - public void setNameJavac(final String nameJavac) { - this.nameJavac = nameJavac; - } - - /** - * @return Returns the javac command name to use - */ - public String getNameJavac() { - return nameJavac; - } - - /** - * @param javacOpts Set javac Opts - */ - public void setJavacOpts(final List javacOpts) { - this.javacOpts = javacOpts; - } - - /** - * @return Returns the Javac Opts to use - */ - public List getJavacOpts() { - return javacOpts; - } - - /** - * @param javaHomeBin JAVA_HOME/bin directory - */ - public void setJavaHomeBin(final String javaHomeBin) { - this.javaHomeBin = javaHomeBin; - } - - /** - * @return Returns the JAVA_HOME/bin directory - */ - public String getJavaHomeBin() { - return javaHomeBin; - } - - /** - * @param noConfig Generate Configuration ? - */ - public void setNoConfig(final boolean noConfig) { - this.noConfig = noConfig; - } - - /** - * @return Returns noConfig option - */ - public boolean isNoConfig() { - return noConfig; - } - - /** - * @param verbose Verbose ? - */ - public void setVerbose(final boolean verbose) { - this.verbose = verbose; - } - - /** - * @return Returns verbose option - */ - public boolean isVerbose() { - return verbose; - } - - /** - * @param debug Debug ? - */ - public void setDebug(final boolean debug) { - this.debug = debug; - } - - /** - * @return Returns debug option - */ - public boolean isDebug() { - return debug; - } - - /** - * @param classpath Classpath to use with java commands - */ - public void setClasspath(final String classpath) { - this.classpath = classpath; - } - - /** - * @return Retruns Classpath - */ - public String getClasspath() { - return classpath; - } - - /** - * @param out Output directory - */ - public void setOut(final File out) { - this.out = out; - } - - /** - * @return Returns Ouput directory - */ - public File getOut() { - return out; - } - - /** - * @param keepGenerated Kepp Generated files ? - */ - public void setKeepGenerated(final boolean keepGenerated) { - this.keepGenerated = keepGenerated; - } - - /** - * @return Returns keepGenerated option - */ - public boolean isKeepGenerated() { - return keepGenerated; - } - - /** - * @param parseWithValidation Parse XML desc with validation ? - */ - public void setParseWithValidation(final boolean parseWithValidation) { - this.parseWithValidation = parseWithValidation; - } - - /** - * @return Returns validation - */ - public boolean isParseWithValidation() { - return parseWithValidation; - } - - /** - * @param error Error Mode ? - */ - public void setError(final boolean error) { - this.error = error; - } - - /** - * @return Returns true if there is Configuration errors - */ - public boolean isError() { - return error; - } - - /** - * @param inputname File inputname - */ - public void setInputname(final String inputname) { - this.inputname = inputname; - } - - /** - * @return Returns file input name - */ - public String getInputname() { - return inputname; - } - - /** - * @param help Help Mode ? - */ - public void setHelp(final boolean help) { - this.help = help; - } - - /** - * @return Returns Help option. - */ - public boolean isHelp() { - return help; - } - - /** - * Set Packed Mode for storing. - */ - public void setSavePacked() { - this.saveMode = PACKED; - } - - /** - * Set UnPacked Mode for storing. - */ - public void setSaveUnpacked() { - this.saveMode = UNPACKED; - } - - /** - * @return Returns Save mode - */ - public int getSaveMode() { - return saveMode; - } - - /** - * @return Returns the nameRmic. - */ - public String getNameRmic() { - return nameRmic; - } - - /** - * @param nameRmic The nameRmic to set. - */ - public void setNameRmic(final String nameRmic) { - this.nameRmic = nameRmic; - } - - /** - * @return the java command - */ - public String getNameJava() { - return nameJava; - } - - /** - * @return true if the use of DTDs is allowed. - */ - public boolean isDTDsAllowed() { - return dtdsAllowed; - } - - /** - * Use of DTDs. - * @param dTDsAllowed The dtdsAllowed to set. - */ - public void setDTDsAllowed(final boolean dTDsAllowed) { - this.dtdsAllowed = dTDsAllowed; - } -} diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/generator/GeneratorFactories.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/generator/GeneratorFactories.java deleted file mode 100644 index 41ab7fff5bc16e66061dacb3e5494f25b01e8f1f..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/generator/GeneratorFactories.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.genbase.generator; - -/** - * Allow to get/set current factory - * @author Florent Benoit - */ -public class GeneratorFactories { - - /** - * Current generator factory - */ - private static GeneratorFactory currentFactory = null; - - /** - * Utility class, no constructor - */ - private GeneratorFactories() { - - } - - /** - * @return the currentFactory. - */ - public static GeneratorFactory getCurrentFactory() { - return currentFactory; - } - - /** - * Set the current factory - * @param currentFactory The factory to set. - */ - public static void setCurrentFactory(GeneratorFactory currentFactory) { - GeneratorFactories.currentFactory = currentFactory; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/generator/GeneratorFactory.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/generator/GeneratorFactory.java deleted file mode 100644 index f98064de204edd3bc1780b18445147050616d256..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/generator/GeneratorFactory.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.genbase.generator; - - -/** - * All factories have to implement getter/setter on configuration object - * @author Florent Benoit - */ -public interface GeneratorFactory { - - /** - * Set the Configuration to use with newly created Generator. - * @param config the Configuration to use with newly created Generator. - */ - void setConfiguration(Config config); - - /** - * Get the Configuration to use with newly created Generator. - * @return the Configuration to use with newly created Generator - */ - Config getConfiguration(); -} diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/modifier/AbsApplicationModifier.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/modifier/AbsApplicationModifier.java deleted file mode 100644 index b440a9d183d65b0bd9ec01e13d01df7734e62a59..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/modifier/AbsApplicationModifier.java +++ /dev/null @@ -1,170 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2003-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genbase.modifier; - -import java.io.File; -import java.util.Iterator; -import java.util.List; -import java.util.Vector; - -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.archive.Application; -import org.ow2.jonas.generators.genbase.archive.Archive; -import org.ow2.jonas.generators.genbase.generator.Config; - - -import org.objectweb.util.monolog.api.BasicLevel; - -/** - * Modify a given Application. - * @author Guillaume Sauthier - * @author Florent Benoit - */ -public abstract class AbsApplicationModifier extends ArchiveModifier { - - /** - * ejbjar modifiers - */ - private List ejbModifiers = null; - - /** - * web modifiers - */ - private List webModifiers = null; - - /** - * client modifiers - */ - private List cltModifiers = null; - - /** - * Wrapped application - */ - private Application app = null; - - /** - * Configuration used to save - */ - private Config config = null; - - /** - * Creates a new ApplicationModifier. - * @param archive the Application J2EE archive - * @param config the configuration object - */ - public AbsApplicationModifier(Application archive, Config config) { - super(archive); - this.config = config; - app = archive; - initVectors(); - init(); - } - - /** - * Init the vectors of modifiers - */ - private void initVectors() { - // create lists - ejbModifiers = new Vector(); - webModifiers = new Vector(); - cltModifiers = new Vector(); - } - - /** - * initialize modifier - */ - protected abstract void init(); - - /** - * Modify the current archive and return a modified archive. - * @return a modified archive. - * @throws GenBaseException When modifications fails - */ - public Archive modify() throws GenBaseException { - - getLogger().log(BasicLevel.INFO, "Processing Application " + app.getName()); - - /** - * Modify inner modules - */ - for (Iterator i = webModifiers.iterator(); i.hasNext();) { - ArchiveModifier wm = (ArchiveModifier) i.next(); - Archive a = wm.modify(); - if (getLogger().isLoggable(BasicLevel.DEBUG)) { - getLogger().log(BasicLevel.DEBUG, "Modifying WebApp '" + a.getName() + "'"); - } - app.addFile(a.getRootFile()); - } - - for (Iterator i = cltModifiers.iterator(); i.hasNext();) { - ArchiveModifier cm = (ArchiveModifier) i.next(); - Archive a = cm.modify(); - if (getLogger().isLoggable(BasicLevel.DEBUG)) { - getLogger().log(BasicLevel.DEBUG, "Modifying Client '" + a.getName() + "'"); - } - app.addFile(a.getRootFile()); - } - - for (Iterator i = ejbModifiers.iterator(); i.hasNext();) { - ArchiveModifier em = (ArchiveModifier) i.next(); - Archive a = em.modify(); - if (getLogger().isLoggable(BasicLevel.DEBUG)) { - getLogger().log(BasicLevel.DEBUG, "Modifying EjbJar '" + a.getName() + "'"); - } - app.addFile(a.getRootFile()); - } - - return save(config, "apps" + File.separator + app.getName()); - - } - - /** - * @return the cltModifiers. - */ - protected List getCltModifiers() { - return cltModifiers; - } - - /** - * @return the ejbModifiers. - */ - protected List getEjbModifiers() { - return ejbModifiers; - } - - /** - * @return the webModifiers. - */ - protected List getWebModifiers() { - return webModifiers; - } - /** - * @return the application element. - */ - protected Application getApplication() { - return app; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/modifier/AbsModifierFactory.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/modifier/AbsModifierFactory.java deleted file mode 100644 index 0017eb319deff86fafdf9e06ecfc7e7c7eb80a8a..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/modifier/AbsModifierFactory.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2003-2007 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.generators.genbase.modifier; - - - -/** - * Used to create the right ArchiveModifier from a given filename (ear, jar, - * war, ...). - * - * @author Guillaume Sauthier - * @author Florent Benoit (make common class for client stubs and WsGen) - */ -public abstract class AbsModifierFactory { - - /** - * Application Archive mode. - */ - public static final int APPLICATION = 0; - - /** - * EjbJar Archive mode. - */ - public static final int EJBJAR = 1; - - /** - * WebApp Archive mode. - */ - public static final int WEBAPP = 2; - - /** - * ApplicationClient Archive mode. - */ - public static final int CLIENT = 3; - - /** - * Utility class (no default public constructor). - */ - protected AbsModifierFactory() { - - } - -} diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/modifier/ArchiveModifier.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/modifier/ArchiveModifier.java deleted file mode 100644 index 22d59580409eac1cfcfceb1eec86092652be223b..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/modifier/ArchiveModifier.java +++ /dev/null @@ -1,132 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2003-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genbase.modifier; - -import java.io.File; - -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.archive.Archive; -import org.ow2.jonas.generators.genbase.archive.FileArchive; -import org.ow2.jonas.generators.genbase.archive.J2EEArchive; -import org.ow2.jonas.generators.genbase.archive.JarArchive; -import org.ow2.jonas.generators.genbase.generator.Config; -import org.ow2.jonas.generators.genbase.utils.ArchiveStorer; -import org.ow2.jonas.generators.genbase.utils.DirStorer; -import org.ow2.jonas.generators.genbase.utils.JarStorer; -import org.ow2.jonas.lib.util.Log; - - - -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; - -/** - * Modify a J2EEArchive - * @author Guillaume Sauthier - */ -public abstract class ArchiveModifier { - - /** - * J2EEArchive to be modified - */ - private J2EEArchive archive; - - /** logger */ - private static Logger logger = Log.getLogger(Log.JONAS_GENBASE_PREFIX); - - /** - * Creates a new ArchiveModifier object. - * @param archive rchive to be modified - */ - public ArchiveModifier(J2EEArchive archive) { - this.archive = archive; - } - - /** - * Modify the current archive and return a modified archive. - * @return a modified archive. - * @throws GenBaseException When Archive modification fails - */ - public abstract Archive modify() throws GenBaseException; - - /** - * Save the curernt archive usin given configuration and given out filename. - * @param config configuration to use - * @param outname filename - * @param archive archive to be saved - * @return the save Archive - * @throws GenBaseException is save fails. - */ - protected static Archive save(Config config, String outname, J2EEArchive archive) throws GenBaseException { - ArchiveStorer storer = null; - File endfile = new File(config.getOut(), outname); - Archive out = null; - - if (config.getSaveMode() == Config.PACKED) { - if (logger.isLoggable(BasicLevel.DEBUG)) { - logger.log(BasicLevel.DEBUG, "Saving '" + endfile + "' in packed form..."); - } - storer = new JarStorer(archive, endfile); - storer.store(); - out = new JarArchive(endfile); - } else { - if (logger.isLoggable(BasicLevel.DEBUG)) { - logger.log(BasicLevel.DEBUG, "Saving '" + endfile + "' in unpacked form..."); - } - storer = new DirStorer(archive, endfile); - storer.store(); - out = new FileArchive(endfile); - } - - return out; - - } - - /** - * Save the current archive using given configuration and given out filename. - * @param config configuration to use - * @param outname filename - * @return the save Archive - * @throws GenBaseException is save fails. - */ - protected Archive save(Config config, String outname) throws GenBaseException { - return save(config, outname, archive); - } - - /** - * @return the logger. - */ - public static Logger getLogger() { - return logger; - } - - /** - * @return returns the J2EE Archive which wil be modified. - */ - public J2EEArchive getArchive() { - return this.archive; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/utils/ArchiveStorer.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/utils/ArchiveStorer.java deleted file mode 100644 index f2fa578b5e9668ef2099aa38235a26d7741698ca..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/utils/ArchiveStorer.java +++ /dev/null @@ -1,198 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial Developer : Guillaume Sauthier - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genbase.utils; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Vector; - -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.archive.J2EEArchive; -import org.ow2.jonas.lib.util.I18n; -import org.ow2.jonas.lib.util.Log; -import org.ow2.jonas.lib.util.XMLSerializer; -import org.w3c.dom.Document; - - - -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; - -/** - * Store an Archive in compressed or uncompressed format - * - * @author Guillaume Sauthier - */ -public abstract class ArchiveStorer { - - /** Buffer Size */ - public static final int MAX_BUFFER_SIZE = 1024; - - /** i18n */ - private static I18n i18n = I18n.getInstance(ArchiveStorer.class); - - /** logger */ - private static Logger logger = Log.getLogger(Log.JONAS_GENBASE_PREFIX); - - /** - * base J2EEArchive to be saved - */ - private J2EEArchive archive; - - /** - * already saved filenames - */ - private List already; - - /** output filename */ - private String out = ""; - - /** - * Creates a new ArchiveStorer object. - * - * @param archive archive to be saved - */ - public ArchiveStorer(J2EEArchive archive) { - this.archive = archive; - already = new Vector(); - // we must use Manifestof the J2EEArchive - already.add(convertName("META-INF/MANIFEST.MF")); - } - - /** - * Fill an OutputStream with content from an InputStream - * - * @param is InputStream - * @param os OutputStream - * - * @throws IOException When filling fails - */ - protected static void fill(InputStream is, OutputStream os) throws IOException { - byte[] buffer = new byte[MAX_BUFFER_SIZE]; - int read; - - while ((read = is.read(buffer, 0, MAX_BUFFER_SIZE)) != -1) { - os.write(buffer, 0, read); - } - os.flush(); - } - - /** - * add a file in saved archive - * - * @param name file name - * - * @throws IOException When save fails - */ - protected abstract void addFile(String name) throws IOException; - - /** - * convert a filename from unix to windows filename and reverse - * - * @param name name to be converted - * - * @return converted filename - */ - protected abstract String convertName(String name); - - /** - * Returns an OutputStream from the given name - * - * @param name the filename we want to open/create - * - * @return an OutputStream from the given name - * - * @throws IOException When OS cannot be created - */ - protected abstract OutputStream getOutputStream(String name) throws IOException; - - /** - * Store the content of the contained archive. - * - * @throws GenBaseException When cannot add all files - */ - public void store() throws GenBaseException { - - if (logger.isLoggable(BasicLevel.DEBUG)) { - logger.log(BasicLevel.DEBUG, "Writing '" + out + "' ..."); - } - - for (Iterator i = archive.getContainedFiles().iterator(); i.hasNext();) { - String name = (String) i.next(); - - try { - if (!archive.omit(convertName(name)) && !already.contains(convertName(name))) { - - addFile(name); - already.add(convertName(name)); - } - } catch (IOException ioe) { - String err = i18n.getMessage("ArchiveStorer.store.addFile", name); - throw new GenBaseException(err, ioe); - } - } - - // add Descriptors - Map descs = archive.getDescriptors(); - - for (Iterator i = descs.keySet().iterator(); i.hasNext();) { - String name = (String) i.next(); - - try { - XMLSerializer ser = new XMLSerializer((Document) descs.get(name)); - OutputStream os = getOutputStream(name); - ser.serialize(os); - os.flush(); - } catch (IOException ioe) { - String err = i18n.getMessage("ArchiveStorer.store.serialize", name); - throw new GenBaseException(err, ioe); - } - } - } - /** - * @return Returns the i18n. - */ - public static I18n getI18n() { - return i18n; - } - - /** - * @return Returns the archive. - */ - public J2EEArchive getArchive() { - return archive; - } - - /** - * @param out The out to set. - */ - public void setOut(String out) { - this.out = out; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/utils/DirStorer.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/utils/DirStorer.java deleted file mode 100644 index 37a15d51fc92f9766c86f81e4f4c79f2c8c695e0..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/utils/DirStorer.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * JOnAS : Java(TM) OpenSource Application Server - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Initial Developer : Guillaume Sauthier - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genbase.utils; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; - -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.archive.J2EEArchive; - - -/** - * Store a J2EEArchive in an unpacked form. - * - * @author Guillaume Sauthier - */ -public class DirStorer extends ArchiveStorer { - - /** - * directory name containing unpacked archive. - */ - private File base; - - /** - * Creates a new DirStorer object. - * - * @param archive archive to be stored - * @param dir output directory - * - * @throws GenBaseException if cannot create output directory - */ - public DirStorer(J2EEArchive archive, File dir) throws GenBaseException { - super(archive); - - setOut(dir.getAbsolutePath()); - - // assure base exists - if (!dir.exists()) { - if (!dir.mkdirs()) { - String err = getI18n().getMessage("DirStorer.constr.create", dir); - throw new GenBaseException(err); - } - } - - base = dir; - } - - /** - * Convert a filename to a local filesystem filename. - * - * @param name name to be converted - * - * @return converted filename - */ - protected String convertName(String name) { - return name.replace('/', File.separatorChar); - } - - /** - * add a given file in the filesystem. - * - * @param name filename - * - * @throws IOException When fill fails. - */ - protected void addFile(String name) throws IOException { - OutputStream fos = getOutputStream(name); - InputStream is = getArchive().getInputStream(name); - fill(is, fos); - is.close(); - fos.close(); - } - - /** - * returns the OuputStream corresponding to the given filename. - * - * @param name filename to create - * - * @return An OutputStream - * - * @throws IOException When file creation fails. - */ - protected OutputStream getOutputStream(String name) throws IOException { - File out = new File(base, convertName(name)); - File parent = out.getParentFile(); - - if (!parent.exists()) { - if (!parent.mkdirs()) { - String err = getI18n().getMessage("DirStorer.getOutputStream.create", out); - throw new IOException(err); - } - } - - OutputStream os = new FileOutputStream(out); - - return os; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/utils/JarStorer.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/utils/JarStorer.java deleted file mode 100644 index 62e71d606616215c03b5cd39b437f110ce244f39..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/utils/JarStorer.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * JOnAS : Java(TM) OpenSource Application Server - * - * This library is free software; you can redistribute it and/or modify it under - * the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Initial Developer : Guillaume Sauthier - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genbase.utils; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.jar.JarOutputStream; -import java.util.zip.ZipEntry; - -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.archive.J2EEArchive; - - -/** - * Store a J2EEArchive in a Jar file. - * - * @author Guillaume Sauthier - */ -public class JarStorer extends ArchiveStorer { - - /** - * Jar file filled as OutputStream - */ - private JarOutputStream jos; - - /** - * Creates a new JarStorer object. - * - * @param archive archive to be stored - * @param jar outout jar file - * - * @throws GenBaseException When cannot create output jar - */ - public JarStorer(J2EEArchive archive, File jar) throws GenBaseException { - super(archive); - - setOut(jar.getAbsolutePath()); - - try { - if (!jar.getParentFile().exists()) { - if (!jar.getParentFile().mkdirs()) { - String err = getI18n().getMessage("JarStorer.constr.create", jar.getParentFile()); - throw new GenBaseException(err); - } - } - - jos = new JarOutputStream(new FileOutputStream(jar), archive.getManifest()); - } catch (IOException ioe) { - String err = getI18n().getMessage("JarStorer.constr.ioe", jar); - throw new GenBaseException(err, ioe); - } - } - - /** - * Convert a name from any format in Jar filename format - * - * @param name filename to be converted - * - * @return converted filename - */ - protected String convertName(String name) { - return name.replace('\\', '/'); - } - - /** - * Add a file in Jar - * - * @param name file name to be added - * - * @throws IOException when filling fails. - */ - protected void addFile(String name) throws IOException { - ZipEntry ze = new ZipEntry(convertName(name)); - jos.putNextEntry(ze); - - InputStream is = getArchive().getInputStream(name); - fill(is, jos); - is.close(); - } - - /** - * Store the archive and close the streams. - * - * @throws GenBaseException When Output Jar cannot be closed - */ - public void store() throws GenBaseException { - super.store(); - - try { - jos.flush(); - jos.close(); - } catch (IOException ioe) { - String err = getI18n().getMessage("JarStorer.store.close"); - throw new GenBaseException(err, ioe); - } - } - - /** - * returns the OuputStream corresponding to the given filename. - * - * @param name filename to create - * - * @return An OutputStream - * - * @throws IOException When file creation fails. - */ - protected OutputStream getOutputStream(String name) throws IOException { - ZipEntry ze = new ZipEntry(convertName(name)); - jos.putNextEntry(ze); - - return jos; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/utils/TempRepository.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/utils/TempRepository.java deleted file mode 100644 index 734a11808e4159c2675632ce36908850bca452b1..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/utils/TempRepository.java +++ /dev/null @@ -1,165 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial Developer : Guillaume Sauthier - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genbase.utils; - -import java.io.File; -import java.io.IOException; -import java.util.Iterator; -import java.util.List; -import java.util.Vector; - -/** - * A TempRepository object is tye main container for temporary - * directories. When an object of WsGen or ClientStubGen wants to use a temporary directory, it - * ask TempRepository instance to create a new one. It is usefull when multiples - * tempo directories are created. Deletion is much more simpler. The - * TempRepository is a Singleton. - * - * @author Guillaume Sauthier - */ -public class TempRepository { - - /** the TempRepository instance */ - private static TempRepository instance = null; - - /** list of temporary directories */ - private List directories; - - /** - * Create a new empty TempRepository. - */ - private TempRepository() { - directories = new Vector(); - } - - /** - * Return the only instance of TempRepository. - * - * @return the only instance of TempRepository. - */ - public static TempRepository getInstance() { - if (instance == null) { - instance = new TempRepository(); - } - - return instance; - } - - /** - * Add a temporary File in the repository (file or directory). - * - * @param file the temporary file or directory to add. - */ - public void addDir(File file) { - directories.add(file); - } - - /** - * Delete all the files contained in the repository. Returns true when - * deletion is successfull, false otherwise. - * - * @return true when deletion is successfull, false otherwise. - */ - public boolean deleteAll() { - boolean result = true; - - for (Iterator i = directories.iterator(); i.hasNext();) { - File dir = (File) i.next(); - i.remove(); - - // delete only if file exists - if (dir.exists()) { - result &= delete(dir); - } - } - - return result; - } - - /** - * Delete a file or directory recursively - * - * @param f file or directory to be deleted - * - * @return true if deletion ok, false otherweise. - */ - private boolean delete(File f) { - if (f.isFile()) { - return f.delete(); - } else { - File[] childs = f.listFiles(); - if (childs == null) { - // no childs - return f.delete(); - } else { - // childs - boolean result = true; - for (int i = 0; i < childs.length; i++) { - result &= delete(childs[i]); - } - return result && f.delete(); - } - } - } - - /** - * Return an empty temporary directory and automatically add it into the - * repository. - * - * @return an empty temporary directory. - * - * @throws IOException when creation fails. - */ - public File createDir() throws IOException { - return createDir(null); - } - - /** - * Return an empty temporary directory and automatically add it into the - * repository. - * - * @return an empty temporary directory. - * - * @throws IOException when creation fails. - */ - public File createDir(final String extension) throws IOException { - // create file - File tmp = File.createTempFile("genbase", extension); - - if (!tmp.delete()) { - throw new IOException("Cannot delete temporary file"); - } - - // create directory - if (!tmp.mkdir()) { - throw new IOException("Cannot create temporary directory"); - } - - // add in repo - addDir(tmp); - - return tmp; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/utils/XMLUtils.java b/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/utils/XMLUtils.java deleted file mode 100644 index 938b46ba7faa693d1a2465803dc2696436219a67..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/java/org/ow2/jonas/generators/genbase/utils/XMLUtils.java +++ /dev/null @@ -1,568 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial Developer : Guillaume Sauthier - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genbase.utils; - -import java.io.IOException; -import java.io.InputStream; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.ow2.jonas.deployment.client.JonasAppClientDTDs; -import org.ow2.jonas.deployment.client.JonasAppClientSchemas; -import org.ow2.jonas.deployment.common.lib.JEntityResolver; -import org.ow2.jonas.deployment.ear.EarDTDs; -import org.ow2.jonas.deployment.ear.EarSchemas; -import org.ow2.jonas.deployment.ejb.JonasEjbjarDTDs; -import org.ow2.jonas.deployment.ejb.JonasEjbjarSchemas; -import org.ow2.jonas.deployment.web.JonasWebAppDTDs; -import org.ow2.jonas.deployment.web.JonasWebAppSchemas; -import org.ow2.jonas.deployment.web.WebAppDTDs; -import org.ow2.jonas.deployment.web.WebAppSchemas; -import org.ow2.jonas.deployment.ws.JonasWsSchemas; -import org.ow2.jonas.deployment.ws.WsSchemas; -import org.ow2.jonas.generators.genbase.NoJ2EEWebservicesException; -import org.ow2.jonas.generators.genbase.archive.Archive; -import org.w3c.dom.Attr; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NodeList; -import org.w3c.dom.Text; -import org.xml.sax.SAXException; - - - - - - - -/** - * XML Utils Class. Holds methods for easier DOM parsing, XML modifications, ... - * @author Guillaume Sauthier - */ -public class XMLUtils { - - /** DOM factory */ - private static DocumentBuilderFactory factory = null; - - /** - * J2EE namespace - */ - private static final String J2EE_NS = "http://java.sun.com/xml/ns/j2ee"; - - /** - * JONAS namespace - */ - private static final String JONAS_NS = "http://www.objectweb.org/jonas/ns"; - - /** - * XML NS namespace - */ - private static final String XMLNS_NS = "http://www.w3.org/2000/xmlns/"; - - /** - * XML Schema instance namespace - */ - private static final String XSI_NS = "http://www.w3.org/2001/XMLSchema-instance"; - - /** - * jonas-session tag name - */ - private static final String SESSION_BEAN = "jonas-session"; - - /** - * jonas-entity tag name - */ - private static final String ENTITY_BEAN = "jonas-entity"; - - /** - * jonas-message-driven tag name - */ - private static final String MESSAGE_BEAN = "jonas-message-driven"; - - /** - * ejb-name tag name - */ - private static final String EJB_NAME = "ejb-name"; - - /** - * servlet tag name - */ - private static final String SERVLET = "servlet"; - - /** - * servlet-name tag name - */ - private static final String SERVLET_NAME = "servlet-name"; - - /** - * jonas-service-ref tag name - */ - private static final String JONAS_SERVICE_REF = "jonas-service-ref"; - - /** - * service-ref-name tag name - */ - private static final String SR_NAME = "service-ref-name"; - - /** - * Empty private constructor for Utility Class - */ - private XMLUtils() { - } - - /** - * Returns a new DocumentBuilderFactory. - * @param validating set the parser validating or not - * @return a new DocumentBuilderFactory. - */ - private static DocumentBuilderFactory newFactory(boolean validating) { - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - factory.setNamespaceAware(true); - factory.setValidating(validating); - setFactoryValidation (factory, validating); - - return factory; - } - - /** - * Sets the validation for the factory - * - * @param factory the factory - * @param validating to turn on or off validation - */ - private static void setFactoryValidation (DocumentBuilderFactory factory, boolean validating) { - factory.setValidating(validating); - // ignore white space can only be set if parser is validating - factory.setIgnoringElementContentWhitespace(validating); - factory.setAttribute("http://apache.org/xml/features/validation/schema", new Boolean(validating)); - } - - - /** - * Creates a new Document from a given InputStream. Validate the file. - * - * @param is the InputStream to be parsed - * @param name filename - * @param isDTDsAllowed if false, throw exception on DTD Doctype - * - * @return the Document instance. - * - * @throws ParserConfigurationException ParserConfigurationException - * @throws SAXException SAXException - * @throws IOException IOException - * @throws NoJ2EEWebservicesException NoJ2EEWebservicesException - */ - public static Document newDocument(InputStream is, String name, boolean isDTDsAllowed) throws ParserConfigurationException, SAXException, IOException, NoJ2EEWebservicesException { - - return newDocument (is, name, isDTDsAllowed, true); - } - - /** - * Creates a new Document from a given InputStream. - * - * @param is the InputStream to be parsed - * @param name filename - * @param isDTDsAllowed if false, throw exception on DTD Doctype - * @param validate if the file is to be validated - * - * @return the Document instance. - * - * @throws ParserConfigurationException ParserConfigurationException - * @throws SAXException SAXException - * @throws IOException IOException - * @throws NoJ2EEWebservicesException NoJ2EEWebservicesException - */ - public static Document newDocument(InputStream is, String name, boolean isDTDsAllowed, boolean validate) - throws NoJ2EEWebservicesException, ParserConfigurationException, SAXException, IOException { - - if (factory == null) { - factory = newFactory(validate); - } - - if (factory.isValidating() != validate) { - setFactoryValidation(factory, validate); - } - - DocumentBuilder builder = factory.newDocumentBuilder(); - - // add entity resolver - if (factory.isValidating()) { - JEntityResolver jer = new JEntityResolver(); - // add Schemas - jer.addSchemas(new WebAppSchemas()); - jer.addSchemas(new JonasWebAppSchemas()); - jer.addSchemas(new JonasEjbjarSchemas()); - jer.addSchemas(new JonasAppClientSchemas()); - jer.addSchemas(new EarSchemas()); - jer.addSchemas(new WsSchemas()); - jer.addSchemas(new JonasWsSchemas()); - - // add DTDs - jer.addDtds(new WebAppDTDs()); - jer.addDtds(new JonasWebAppDTDs()); - jer.addDtds(new JonasEjbjarDTDs()); - jer.addDtds(new JonasAppClientDTDs()); - jer.addDtds(new EarDTDs()); - - builder.setEntityResolver(jer); - } - Document doc = builder.parse(is); - // close InputStream when finished parsing - is.close(); - if (doc.getDoctype() != null && !isDTDsAllowed) { - // DTD case - // -> Throw Exception - throw new NoJ2EEWebservicesException(name + " use a DTD. Only XML Schema are accepted for J2EE 1.4 webservices"); - } - return doc; - } - - - /** - * Returns the session/entity/ - * message-driven XML Element with given name. - * @param base jonas-ejb-jar Element. - * @param bName the bean name to be found. - * @return the session/entity/ - * message-driven XML Element. - */ - public static Element getBeanElement(Element base, String bName) { - Element found = null; - - // try Session Bean - NodeList sessions = base.getElementsByTagNameNS(JONAS_NS, SESSION_BEAN); - - for (int i = 0; (i < sessions.getLength()) && (found == null); i++) { - Element session = (Element) sessions.item(i); - NodeList names = session.getElementsByTagNameNS(JONAS_NS, EJB_NAME); - - // ejb-name mandatory and unique - Element name = (Element) names.item(0); - - if (name.getFirstChild().getNodeValue().equals(bName)) { - found = session; - } - } - - // try Entity Bean - NodeList entities = base.getElementsByTagNameNS(JONAS_NS, ENTITY_BEAN); - - for (int i = 0; (i < entities.getLength()) && (found == null); i++) { - Element entity = (Element) entities.item(i); - NodeList names = entity.getElementsByTagNameNS(JONAS_NS, EJB_NAME); - - // ejb-name mandatory and unique - Element name = (Element) names.item(0); - - if (name.getFirstChild().getNodeValue().equals(bName)) { - found = entity; - } - } - - // try Message Driven Bean - NodeList messages = base.getElementsByTagNameNS(JONAS_NS, MESSAGE_BEAN); - - for (int i = 0; (i < messages.getLength()) && (found == null); i++) { - Element message = (Element) messages.item(i); - NodeList names = message.getElementsByTagNameNS(JONAS_NS, EJB_NAME); - - // ejb-name mandatory and unique - Element name = (Element) names.item(0); - - if (name.getFirstChild().getNodeValue().equals(bName)) { - found = message; - } - } - - return found; - } - - /** - * Returns the matching servlet XML Element with given name. - * @param base web-app Element. - * @param sName the servlet name to be found. - * @return the matching servlet XML Element. - */ - public static Element getServletElement(Element base, String sName) { - Element found = null; - - // Search servlet List - NodeList servlets = base.getElementsByTagNameNS(J2EE_NS, SERVLET); - - for (int i = 0; (i < servlets.getLength()) && (found == null); i++) { - Element servlet = (Element) servlets.item(i); - NodeList names = servlet.getElementsByTagNameNS(J2EE_NS, SERVLET_NAME); - - // servlet-name mandatory and unique - Element name = (Element) names.item(0); - - if (name.getFirstChild().getNodeValue().equals(sName)) { - found = servlet; - } - } - - return found; - } - - /** - * Returns the jonas-service-ref XML Element with given name. - * @param base web-app/ bean Element containing - * jonas-service-ref Element(s). - * @param srName the service-ref name to be found. - * @return the jonas-service-ref XML Element. - */ - public static Element getJonasServiceRef(Element base, String srName) { - Element found = null; - - // Search jonas-service-ref list - if (base != null) { - NodeList jsrs = base.getElementsByTagNameNS(JONAS_NS, JONAS_SERVICE_REF); - - for (int i = 0; (i < jsrs.getLength()) && (found == null); i++) { - Element jsr = (Element) jsrs.item(i); - - NodeList names = jsr.getElementsByTagNameNS(JONAS_NS, SR_NAME); - - // service-ref-name mandatory and unique - Element name = (Element) names.item(0); - - if (name != null) { - // found jonas:service-ref-name - if (name.getFirstChild().getNodeValue().equals(srName)) { - found = jsr; - } - } - } - } - - return found; - } - - /** - * default application.xml contains a fake ejb module needed to be parsed - * without error but not needed for a normal application. Than we remove it. - * @param doc application.xml document - */ - public static void cleanDummyApplication(Document doc) { - Element root = doc.getDocumentElement(); - NodeList nl = root.getElementsByTagNameNS(J2EE_NS, "module"); - root.removeChild(nl.item(0)); - } - - /** - * Add an ejb module in an application Document - * @param app application.xml Document - * @param ejbjar EJBJar archive - */ - public static void addEjb(Document app, Archive ejbjar) { - Element module = app.createElementNS(J2EE_NS, "module"); - Element ejb = app.createElementNS(J2EE_NS, "ejb"); - Text ejbText = app.createTextNode(ejbjar.getRootFile().getName()); - ejb.appendChild(ejbText); - module.appendChild(ejb); - - insertModule(app, module); - } - - /** - * Add a client module in an application Document - * @param app application.xml Document - * @param client Client archive - */ - public static void addClient(Document app, Archive client) { - Element module = app.createElementNS(J2EE_NS, "module"); - Element clt = app.createElementNS(J2EE_NS, "java"); - Text cltText = app.createTextNode(client.getRootFile().getName()); - clt.appendChild(cltText); - module.appendChild(clt); - - insertModule(app, module); - } - - /** - * Add an web module in an application Document - * @param app application.xml Document - * @param webapp WebApp archive - * @param ctx context-root - */ - public static void addWebApp(Document app, Archive webapp, String ctx) { - Element module = app.createElementNS(J2EE_NS, "module"); - Element web = app.createElementNS(J2EE_NS, "web"); - Element webUri = app.createElementNS(J2EE_NS, "web-uri"); - Element context = app.createElementNS(J2EE_NS, "context-root"); - - Text webText = app.createTextNode(webapp.getName()); - Text ctxText = app.createTextNode(ctx); - webUri.appendChild(webText); - context.appendChild(ctxText); - - web.appendChild(webUri); - web.appendChild(context); - - module.appendChild(web); - - insertModule(app, module); - } - - /** - * Insert a module in application Document - * @param app application.xml Document - * @param module module Element - */ - private static void insertModule(Document app, Element module) { - Element application = app.getDocumentElement(); - Element first = findFirstSecurityRole(application); - application.insertBefore(module, first); - } - - /** - * return the first found security-role Element (or null if not found) - * @param app application.xml Document - * @return the first found security-role Element (or null if not found) - */ - private static Element findFirstSecurityRole(Element app) { - NodeList nl = app.getElementsByTagNameNS(J2EE_NS, "security-role"); - - if (nl.getLength() == 0) { - return null; - } else { - return (Element) nl.item(0); - } - } - - /** - * Creates a new XML Document for an empty jonas-client.xml. - * @return Returns a new XML Document for an empty jonas-client.xml. - */ - public static Document newJonasClient() { - - Document root = createDocument(); - - // jonas-client - Element jonasClient = root.createElementNS(JONAS_NS, "jonas-client"); - - // Automatically retrieve latest schema name - String schema = JonasAppClientSchemas.getLastSchema(); - addNamespaces(jonasClient, schema); - root.appendChild(jonasClient); - - return root; - } - - /** - * @return Returns an empty jonas-web-app Document - */ - public static Document newJonasWeb() { - - Document root = createDocument(); - - // jonas-web-app - Element jonasWebApp = root.createElementNS(JONAS_NS, "jonas-web-app"); - - // Automatically retrieve latest schema name - int index = JonasWebAppSchemas.JONAS_WEBAPP_SCHEMAS.length - 1; - String schema = JonasWebAppSchemas.JONAS_WEBAPP_SCHEMAS[index]; - addNamespaces(jonasWebApp, schema); - root.appendChild(jonasWebApp); - - return root; - } - - /** - * @return Returns an empty Document. - */ - private static Document createDocument() { - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - factory.setNamespaceAware(true); - DocumentBuilder builder; - try { - builder = factory.newDocumentBuilder(); - } catch (ParserConfigurationException e) { - throw new RuntimeException(e); - } - return builder.newDocument(); - } - - /** - * Add common namespaces to the given element and add schemaLocation - * @param e the Element to be updated - * @param schema the schema location value - */ - private static void addNamespaces(Element e, String schema) { - Document root = e.getOwnerDocument(); - // create xmlns="http://www.w3.org/XML/1998/namespace" - Attr xmlns = root.createAttributeNS(XMLNS_NS, "xmlns"); - xmlns.setValue(JONAS_NS); - - // create xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - Attr xsi = root.createAttributeNS(XMLNS_NS, "xmlns:xsi"); - xsi.setValue(XSI_NS); - - // create xsi:schemaLocation="http://www.objectweb.org/jonas/ns - // http://www.objectweb.org/jonas/ns/" - Attr schemaLocation = root.createAttributeNS(XSI_NS, "xsi:schemaLocation"); - schemaLocation.setValue(JONAS_NS + " " + JONAS_NS + "/" + schema); - - e.setAttributeNodeNS(xmlns); - e.setAttributeNodeNS(xsi); - e.setAttributeNodeNS(schemaLocation); - - } - - /** - * Check if the web module name is already declared in the application.xml Document - * @param app the application.xml Doc - * @param name web application name - * @return Returns true if the module is already declared, false otherwise. - */ - public static boolean isWebModuleAlreadyDeclared(Document app, String name) { - // Corresponding Xpath expression : //j2ee:module/j2ee:web/j2ee:web-uri == name - - Element found = null; - NodeList modules = app.getElementsByTagNameNS(J2EE_NS, "module"); - for (int i = 0; (i < modules.getLength()) && (found == null); i++) { - - // we check each module to see if it is a web module - Element module = (Element) modules.item(i); - NodeList webModules = module.getElementsByTagNameNS(J2EE_NS, "web"); - for (int j = 0; (j < webModules.getLength()) && (found == null); j++) { - - // We should only have 0..1 web module in a j2ee:module - Element webModule = (Element) webModules.item(j); - NodeList weburiModules = webModule.getElementsByTagNameNS(J2EE_NS, "web-uri"); - // web-uri is mandatory and is the first element under j2ee:web - Element webUri = (Element) weburiModules.item(0); - if (webUri.getFirstChild().getNodeValue().equals(name)) { - found = webUri; - } - } - } - // "true" if element was found - return (found != null); - } - -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genbase/src/main/resources/META-INF/jonas-generators-base.bnd b/jonas/modules/generators/jonas-genbase/src/main/resources/META-INF/jonas-generators-base.bnd deleted file mode 100644 index 37f358cd97e98575427ab3cb06175f7f16a2a64a..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/resources/META-INF/jonas-generators-base.bnd +++ /dev/null @@ -1,24 +0,0 @@ -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 2007 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -Export-Package org.ow2.jonas.generators.genbase.* diff --git a/jonas/modules/generators/jonas-genbase/src/main/resources/org/ow2/jonas/generators/genbase/archive/I18n.properties b/jonas/modules/generators/jonas-genbase/src/main/resources/org/ow2/jonas/generators/genbase/archive/I18n.properties deleted file mode 100644 index 932c7397ba309ad80d3552a8d1851eeb1b19af74..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/resources/org/ow2/jonas/generators/genbase/archive/I18n.properties +++ /dev/null @@ -1,27 +0,0 @@ -# $Id$ - -Application.init.unpackException Cannot unpack archive ''{0}'' -Application.init.earDDExc Cannot load application Descriptor from ''{0}'' - -FileArchive.constr.manifest Error in Manifest from ''{0}'' - -J2EEArchive.isDTDsAllowed.noFactory No current generator factory. The setCurrentFactory should be called -J2EEArchive.isDTDsAllowed.noConfig No configuration found in the current generator factory - -JarArchive.constr.jar Cannot construct a JarFile from ''{0}'' - -WebApp.loadDescriptors.prepare Cannot setup an appropriate XML Parser -WebApp.loadDescriptors.parseError Parse error in web/jonas-web Descriptor -WebApp.init.loader Cannot create WebApp ClassLoader for ''{0}'' - -Client.loadDescriptors.prepare Cannot setup an appropriate XML Parser -Client.loadDescriptors.parseError Parse error in jonas-client Descriptor -Client.init.loader Cannot create Client ClassLoader for ''{0}'' - -EjbJar.loadDescriptors.prepare Cannot setup an appropriate XML Parser -EjbJar.loadDescriptors.parseError Parse error in jonas-ejb-jar Descriptor -EjbJar.init.loader Cannot create EjbJar ClassLoader for ''{0}'' - -Application.loadDescriptors.prepare Cannot setup an appropriate XML Parser -Application.loadDescriptors.parseError Parse error in application Descriptor -Application.init.loader Cannot create Application ClassLoader for ''{0}'' diff --git a/jonas/modules/generators/jonas-genbase/src/main/resources/org/ow2/jonas/generators/genbase/archive/application.xml b/jonas/modules/generators/jonas-genbase/src/main/resources/org/ow2/jonas/generators/genbase/archive/application.xml deleted file mode 100644 index 158be67cdb21a6190eff00f647754bf49221cfc3..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/resources/org/ow2/jonas/generators/genbase/archive/application.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - generated ear - - fake - - diff --git a/jonas/modules/generators/jonas-genbase/src/main/resources/org/ow2/jonas/generators/genbase/archive/context.xml b/jonas/modules/generators/jonas-genbase/src/main/resources/org/ow2/jonas/generators/genbase/archive/context.xml deleted file mode 100644 index dd1d6b33bbfc93eac2eddb324ceae6e3006e1cbd..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/resources/org/ow2/jonas/generators/genbase/archive/context.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genbase/src/main/resources/org/ow2/jonas/generators/genbase/archive/jonas-web.xml b/jonas/modules/generators/jonas-genbase/src/main/resources/org/ow2/jonas/generators/genbase/archive/jonas-web.xml deleted file mode 100644 index f318331ef70958beba06e5c98bcebac9249fe904..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/resources/org/ow2/jonas/generators/genbase/archive/jonas-web.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/jonas/modules/generators/jonas-genbase/src/main/resources/org/ow2/jonas/generators/genbase/archive/web-jetty.xml b/jonas/modules/generators/jonas-genbase/src/main/resources/org/ow2/jonas/generators/genbase/archive/web-jetty.xml deleted file mode 100644 index 154ddef5f9c4b4dcc92da547738312f166a42e6e..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/resources/org/ow2/jonas/generators/genbase/archive/web-jetty.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/jonas/modules/generators/jonas-genbase/src/main/resources/org/ow2/jonas/generators/genbase/archive/web.xml b/jonas/modules/generators/jonas-genbase/src/main/resources/org/ow2/jonas/generators/genbase/archive/web.xml deleted file mode 100644 index a434390ce39c3ed37e753d5c8d3d1184fed5270b..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/resources/org/ow2/jonas/generators/genbase/archive/web.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - WebApp Dispatching SOAP Requests to SSBs - - - - wsdl - text/xml - - - - - xsd - text/xml - - - - index.html - index.jsp - - - \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genbase/src/main/resources/org/ow2/jonas/generators/genbase/generator/I18n.properties b/jonas/modules/generators/jonas-genbase/src/main/resources/org/ow2/jonas/generators/genbase/generator/I18n.properties deleted file mode 100644 index 8de0a2e8ad44e35b01201f257e38fa3e27f0a05f..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/resources/org/ow2/jonas/generators/genbase/generator/I18n.properties +++ /dev/null @@ -1,3 +0,0 @@ -# $Id$ - -AbsGenerator.constr.ioe Cannot create temporary directories diff --git a/jonas/modules/generators/jonas-genbase/src/main/resources/org/ow2/jonas/generators/genbase/utils/I18n.properties b/jonas/modules/generators/jonas-genbase/src/main/resources/org/ow2/jonas/generators/genbase/utils/I18n.properties deleted file mode 100644 index 0ee347d27e1f87a94cd52d135ece9ffe7b5ca176..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genbase/src/main/resources/org/ow2/jonas/generators/genbase/utils/I18n.properties +++ /dev/null @@ -1,11 +0,0 @@ -# $Id$ - -ArchiveStorer.store.addFile Cannot add file ''{0}'' in archive -ArchiveStorer.store.serialize Cannot serialize XML Descriptor ''{0}'' - -DirStorer.constr.create Cannot create directory ''{0}'' -DirStorer.getOutputStream.create Cannot create parent directories ''{0}'' - -JarStorer.constr.ioe Cannot create file ''{0}'' -JarStorer.store.close Cannot close jar output stream -JarrStorer.constr.create Cannot create directory ''{0}'' diff --git a/jonas/modules/generators/jonas-genclientstub/pom.xml b/jonas/modules/generators/jonas-genclientstub/pom.xml deleted file mode 100644 index 1586f9a21bd142725e75e2393edf5f63487399bc..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genclientstub/pom.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - org.ow2.jonas - jonas-generators - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - - jonas-generators-clientstubs - bundle - JOnAS :: Generators :: Client Stubs - - - - org.ow2.jonas - jonas-commons - ${project.version} - - - org.ow2.jonas - jonas-deployment - ${project.version} - - - org.ow2.jonas - jonas-generators-base - ${project.version} - - - org.ow2.fastrmic - fastrmic - - - org.ow2.carol - carol - - - org.ow2.bundles - ow2-util-ee-deploy-impl - - - \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/ClientStubGen.java b/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/ClientStubGen.java deleted file mode 100644 index 55b682832ef6ac888313ec2f17473e6052817296..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/ClientStubGen.java +++ /dev/null @@ -1,276 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2004-2008 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genclientstub; - -import java.io.File; -import java.util.StringTokenizer; - -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; -import org.ow2.jonas.generators.genbase.NoJ2EEWebservicesException; -import org.ow2.jonas.generators.genbase.archive.Archive; -import org.ow2.jonas.generators.genbase.generator.Config; -import org.ow2.jonas.generators.genbase.generator.GeneratorFactories; -import org.ow2.jonas.generators.genbase.modifier.ArchiveModifier; -import org.ow2.jonas.generators.genbase.utils.TempRepository; -import org.ow2.jonas.generators.genclientstub.generator.GeneratorFactory; -import org.ow2.jonas.generators.genclientstub.modifier.ModifierFactory; -import org.ow2.jonas.lib.util.Log; -import org.ow2.util.ee.deploy.api.deployable.IDeployable; - -/** - * Main class of the client stub generator Class. Some code come from WsGen - * classes (Guillaume Sauthier) - * @author Florent Benoit - */ -public class ClientStubGen { - - /** - * logger. - */ - private static Logger logger = Log.getLogger("org.ow2.jonas.generators.genclientstub"); - - /** - * Set to false if input file cannot be processed (DTDs). - */ - private boolean inputModified = true; - - /** - * Private Constructor for Utility class. - */ - public ClientStubGen() { - } - - /** - * Main method. - * @param args Commend line args - * @throws Exception When the execute method fails - */ - public static void main(final String[] args) throws Exception { - ClientStubGen stubGen = new ClientStubGen(); - stubGen.execute(args); - } - - /** - * Method used by main method and by external class to retrieve the name of - * the modified or created file by ClientStubGen. - * @param args command line arguments - * @return the name of the modified or built - * @throws Exception When a failure occurs - */ - public String execute(final String[] args) throws Exception { - // store configuration properties - Config config = parseInput(args); - - if (config.isHelp() || config.isError() || config.getInputname() == null) { - // display usage message - usage(); - return null; - } - - return execute(config, null); - } - - /** - * Method used by main method and by external class to retrieve the name of - * the modified or created file by ClientStubGen. - * @param config the given config - * @param deployable the deployable to analyze - * @return the name of the modified or built - * @throws Exception When a failure occurs - */ - public String execute(final Config config, final IDeployable deployable) throws Exception { - GeneratorFactory gf = GeneratorFactory.getInstance(); - - // For this client generator, the use of DTDs is allowed - config.setDTDsAllowed(true); - - // setup configuration - gf.setConfiguration(config); - GeneratorFactories.setCurrentFactory(gf); - Archive modifiedArchive = null; - ArchiveModifier am = null; - // get the ArchiveModifier - try { - //TODO : get DTD only exception - am = ModifierFactory.getModifier(config.getInputname(), true, deployable); - - logger.log(BasicLevel.INFO, "Client stub generation for '" + config.getInputname() + "'"); - - // modify the given archive - modifiedArchive = am.modify(); - - // Get path - String path = modifiedArchive.getRootFile().getCanonicalPath(); - - return path; - } catch (NoJ2EEWebservicesException e) { - logger.log(BasicLevel.WARN, config.getInputname() + "Error while generating stubs : '" + e.getMessage() - + "'"); - inputModified = false; - return config.getInputname(); - } finally { - // close archive - if (am != null && am.getArchive() != null) { - am.getArchive().close(); - } - - modifiedArchive = null; - am = null; - - // delete all the temporary files created - TempRepository.getInstance().deleteAll(); - - System.gc(); - } - - } - - /** - * Parse Command Line input and returns a Config object. - * @param args Command Lines params - * @return a Config object - */ - private static Config parseInput(final String[] args) { - Config config = new Config(); - - // Get args - for (int argn = 0; argn < args.length; argn++) { - String arg = args[argn]; - - if (arg.equals("-help") || arg.equals("-?")) { - config.setHelp(true); - - continue; - } - - if (arg.equals("-verbose")) { - config.setVerbose(true); - - continue; - } - - if (arg.equals("-debug")) { - config.setDebug(true); - config.setVerbose(true); - - continue; - } - - if (arg.equals("-keepgenerated")) { - config.setKeepGenerated(true); - - continue; - } - - if (arg.equals("-noconfig")) { - config.setNoConfig(true); - - continue; - } - - if (arg.equals("-novalidation")) { - config.setParseWithValidation(false); - - continue; - } - - if (arg.equals("-javac")) { - config.setNameJavac(args[++argn]); - - continue; - } - - if (arg.equals("-javacopts")) { - argn++; - - if (argn < args.length) { - StringTokenizer st = new StringTokenizer(args[argn]); - - while (st.hasMoreTokens()) { - config.getJavacOpts().add(st.nextToken()); - } - } else { - config.setError(true); - } - - continue; - } - - if (arg.equals("-d")) { - argn++; - - if (argn < args.length) { - config.setOut(new File(args[argn])); - } else { - config.setError(true); - } - - continue; - } - - if (args[argn] != null) { - config.setInputname(args[argn]); - } else { - config.setError(true); - } - } - - return config; - - } - - /** - * Display the usage. - */ - public static void usage() { - StringBuffer msg = new StringBuffer(); - msg.append("Usage: java org.ow2.jonas.generators.genclientstub.ClientStubgen -help \n"); - msg.append(" to print this help message \n"); - msg.append(" or java org.ow2.jonas.generators.genclientstub.ClientStubgen \n"); - msg.append("Options include: \n"); - msg.append(" -d specify where to place the generated files \n"); - msg.append(" -novalidation parse the XML deployment descriptors without \n"); - msg.append(" validation \n"); - msg.append(" -javac specify the java compiler to use \n"); - msg.append(" -javacopts specify the options to pass to the java compiler \n"); - msg.append(" -keepgenerated do not delete intermediate generated files \n"); - msg.append(" -noconfig do not generate configuration files (require \n"); - msg.append(" user provided files) \n"); - msg.append(" -verbose \n"); - msg.append(" -debug \n"); - msg.append(" \n"); - msg.append(" Input_File the ejb-jar, war or ear filename\n"); - System.out.println(msg.toString()); - } - - /** - * @return the inputModified flag - */ - public boolean isInputModified() { - return inputModified; - } -} diff --git a/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/ClientStubGenException.java b/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/ClientStubGenException.java deleted file mode 100644 index 5a43b64b2a2556efe5f348f5e7dff2ee8dadc07d..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/ClientStubGenException.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genclientstub; - -import org.ow2.jonas.generators.genbase.GenBaseException; - -/** - * This class represents the exception that can be throwned by the ClientStubGen tool. - * @author Florent Benoit - */ -public class ClientStubGenException extends GenBaseException { - - /** - * Constructs a ClientStubGenException with no specified detail message. - */ - public ClientStubGenException() { - super(); - } - - /** - * Constructs an ClientStubGenException with the specified detail message. - * @param msg Error message - */ - public ClientStubGenException(String msg) { - super(msg); - } - - /** - * Constructs an ClientStubGenException with the specified detail message. - * @param inner Cause Exception to wrap - */ - public ClientStubGenException(Exception inner) { - super(inner); - } - - /** - * Constructs an ClientStubGenException with the specified detail message. - * @param msg Error message - * @param inner Cause Exception to wrap - */ - public ClientStubGenException(String msg, Exception inner) { - super(msg, inner); - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/generator/Generator.java b/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/generator/Generator.java deleted file mode 100644 index a61baa8f66e9a9574a43910b80538bd7b967d1d3..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/generator/Generator.java +++ /dev/null @@ -1,242 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2004-2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genclientstub.generator; - -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; -import org.ow2.carol.util.configuration.ConfigurationRepository; -import org.ow2.fastrmic.RMIC; -import org.ow2.jonas.deployment.api.IEJBRefDesc; -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.archive.Archive; -import org.ow2.jonas.generators.genbase.archive.Client; -import org.ow2.jonas.generators.genbase.archive.EjbJar; -import org.ow2.jonas.generators.genbase.archive.J2EEArchive; -import org.ow2.jonas.generators.genbase.archive.WebApp; -import org.ow2.jonas.generators.genbase.generator.AbsGenerator; -import org.ow2.jonas.generators.genbase.generator.Config; -import org.ow2.jonas.generators.genclientstub.ClientStubGenException; -import org.ow2.jonas.lib.bootstrap.JProp; -import org.ow2.jonas.lib.loader.AbsModuleClassLoader; -import org.ow2.jonas.lib.util.Cmd; -import org.ow2.jonas.lib.util.I18n; -import org.ow2.jonas.lib.util.Log; - -import java.io.File; -import java.util.ArrayList; -import java.util.Iterator; - -/** - * Generator used to generate Stubs for clients. - * @author Florent Benoit - */ -public class Generator extends AbsGenerator { - - /** - * logger. - */ - private static Logger logger = Log.getLogger("org.ow2.jonas.generators.genclientstub"); - /** - * i18n. - */ - private static I18n i18n = I18n.getInstance(Generator.class); - - /** - * EjbRef used for this generator. - */ - private IEJBRefDesc ejbRef = null; - - /** - * Class used if no ejbRef is given. - */ - private String intfStubClassName = null; - - /** - * Archive used by the modifier. - */ - private Archive archive = null; - - /** - * Creates a new Generator with the given Config. - * @param config internal configuration object. - * @param ejbRef reference to the ejb on which we want create the stub - * @param intfStubClassName name of the interface - * @param archive given ejbjar, webapp, ... - * @throws GenBaseException When sources and target temporary directory - * cannot be created - */ - public Generator(Config config, IEJBRefDesc ejbRef, String intfStubClassName, Archive archive) throws GenBaseException { - super(config); - this.ejbRef = ejbRef; - this.intfStubClassName = intfStubClassName; - this.archive = archive; - } - - /** - * Generate stub files. - * @throws ClientStubGenException When generation fails. - */ - public void generate() throws ClientStubGenException { - - try { - //URL[] urls = null; - String archiveClasspath = null; - - J2EEArchive arch = (J2EEArchive) this.archive; - AbsModuleClassLoader loader = (AbsModuleClassLoader) arch.getModuleClassloader(); - - archiveClasspath = loader.getClasspath(); - - // itf class - String itfClass = null; - if (ejbRef != null) { - itfClass = ejbRef.getHome(); - } else { - itfClass = intfStubClassName; - } - - // TODO Now try to load the class and check if stub is here - - // Add to the rmic Classpath all the lib and classes of the archive - String classpath = getConfig().getClasspath() + File.pathSeparator + archiveClasspath; - - // Add client.jar to the classpath - String jRoot = JProp.getJonasRoot(); - if (jRoot != null) { - classpath = jRoot + File.separator + "lib" + File.separator + "client.jar" + File.pathSeparator + classpath; - } - - if (logger.isLoggable(BasicLevel.DEBUG)) { - logger.log(BasicLevel.DEBUG, "Using classpath '" + classpath + "'."); - } - - - // Get current protocol - String rmiName = ConfigurationRepository.getCurrentConfiguration().getProtocol().getName(); - - if (rmiName.equalsIgnoreCase("iiop") && itfClass != null) { - Cmd iiopCmd = new Cmd(getConfig().getJavaHomeBin() + getConfig().getNameRmic()); - iiopCmd.addArgument("-classpath"); - iiopCmd.addArgument(classpath); - iiopCmd.addArgument("-iiop"); - iiopCmd.addArgument("-poa"); - iiopCmd.addArgument("-always"); - iiopCmd.addArgument("-keepgenerated"); - iiopCmd.addArgument("-g"); - - iiopCmd.addArgument("-d"); - iiopCmd.addArgument(getClasses().getCanonicalPath()); - iiopCmd.addArguments(getConfig().getJavacOpts()); - - // add itf class as arg name - iiopCmd.addArgument(itfClass); - - if (getLogger().isLoggable(BasicLevel.DEBUG)) { - getLogger().log(BasicLevel.DEBUG, "Running '" + iiopCmd.toString() + "'"); - } - if (iiopCmd.run()) { - getLogger().log(BasicLevel.INFO, - "Client stubs for classname '" + itfClass + "' successfully generated for protocol 'iiop'."); - } else { - String err = i18n.getMessage("Generator.generate.error"); - getLogger().log(BasicLevel.ERROR, err); - throw new ClientStubGenException(err); - } - - } else if (itfClass != null && (("jrmp".equalsIgnoreCase(rmiName) || "irmi".equalsIgnoreCase(rmiName)))) { - Cmd jrmpCmd = new Cmd(getConfig().getJavaHomeBin() + getConfig().getNameRmic()); - jrmpCmd.addArgument("-classpath"); - jrmpCmd.addArgument(classpath); - jrmpCmd.addArgument("-keepgenerated"); - jrmpCmd.addArgument("-g"); - jrmpCmd.addArgument("-d"); - jrmpCmd.addArgument(getClasses().getCanonicalPath()); - jrmpCmd.addArguments(getConfig().getJavacOpts()); - - // add itf class as arg name - jrmpCmd.addArgument(itfClass); - - ArrayList args = new ArrayList(); - boolean skip = true; - for (Iterator it = jrmpCmd.getCommandLine(); it.hasNext();) { - Object o = it.next(); - if (skip) { - skip = false; - continue; - } - args.add(o); - } - - // Build the stub using Fast RMIC - String[] a = (String[]) args.toArray(new String[] {}); - RMIC rmic = new RMIC(a); - - if (rmic.run()) { - getLogger().log(BasicLevel.INFO, - "Client stubs for classname '" + itfClass + "' successfully generated for protocol '" + rmiName + "'."); - } else { - String err = i18n.getMessage("Generator.generate.error"); - getLogger().log(BasicLevel.ERROR, err); - throw new ClientStubGenException(err, rmic.getException()); - } - - } - - - - } catch (Exception e) { - String err = i18n.getMessage("Generator.generate.error"); - getLogger().log(BasicLevel.ERROR, err); - throw new ClientStubGenException(err, e); - } - - } - - /** - * Compile generated java files into classes directory. Do nothing in case - * of clientstub generator as all classes are generated - * @throws ClientStubGenException When compilation fails - */ - public void compile() throws ClientStubGenException { - } - - /** - * Add generated files into an Archive - * @param archive the archive destination of generated files. - * @throws ClientStubGenException When files cannot be added in the given - * Archive. - */ - public void addFiles(Archive archive) throws ClientStubGenException { - if (archive instanceof WebApp) { - archive.addDirectoryIn("WEB-INF/classes/", getClasses()); - } else if (archive instanceof EjbJar) { - archive.addDirectory(getClasses()); - } else if (archive instanceof Client) { - archive.addDirectory(getClasses()); - } - } - -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/generator/GeneratorFactory.java b/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/generator/GeneratorFactory.java deleted file mode 100644 index 6ca3d48bf3aff6927a9f0de883b3f30eb74c8b3e..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/generator/GeneratorFactory.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genclientstub.generator; - -import org.ow2.jonas.generators.genbase.generator.Config; - -/** - * A GeneratorFactory has to be extended by specific generation - * mecanism. - * @author Florent Benoit - */ -public class GeneratorFactory implements org.ow2.jonas.generators.genbase.generator.GeneratorFactory { - - /** GeneratorFactory unique instance */ - private static GeneratorFactory instance = null; - - /** Configuration to set on instanciated Generator */ - private Config configuration; - - /** - * Utility class, no constructor - */ - private GeneratorFactory() { - - } - - /** - * Returns the unique GeneratorFactory instance. - * @return the unique GeneratorFactory instance. - */ - public static GeneratorFactory getInstance() { - if (instance == null) { - instance = newInstance(); - } - - return instance; - } - - /** - * Create a new generatorFactory instance - * @return a new generatorFactory instance. - - */ - private static GeneratorFactory newInstance() { - return new GeneratorFactory(); - } - - /** - * Set the Configuration to use with newly created Generator. - * @param config the Configuration to use with newly created Generator. - */ - public void setConfiguration(Config config) { - this.configuration = config; - } - - /** - * Get the Configuration to use with newly created Generator. - * @return the Configuration to use with newly created Generator - */ - public Config getConfiguration() { - return configuration; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/modifier/AbsArchiveModifier.java b/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/modifier/AbsArchiveModifier.java deleted file mode 100644 index fb82f93d8b6d9436b722e7ec488ccfeb989ddf13..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/modifier/AbsArchiveModifier.java +++ /dev/null @@ -1,140 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.genclientstub.modifier; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.archive.Archive; -import org.ow2.jonas.generators.genbase.archive.J2EEArchive; -import org.ow2.jonas.generators.genbase.archive.WebApp; -import org.ow2.jonas.generators.genbase.generator.Config; -import org.ow2.jonas.generators.genbase.modifier.ArchiveModifier; -import org.ow2.jonas.generators.genclientstub.ClientStubGenException; -import org.ow2.jonas.generators.genclientstub.generator.Generator; - - -/** - * Defines common methods used by all modifier - */ -public abstract class AbsArchiveModifier extends ArchiveModifier { - - /** - * Constructor - * @param archive the j2ee archive - */ - public AbsArchiveModifier(J2EEArchive archive) { - super(archive); - } - - /** - * Modify the current archive and return a modified archive. - * @return a modified archive. - * @throws GenBaseException When Client Generation or storing phase fails. - */ - public abstract Archive modify() throws GenBaseException; - - /** - * Generates stub/tie classes for a given archive with its config - * @param config configuration to use for the generator - * @param archive the file containing the remote class - * @throws ClientStubGenException if the generation fails - */ - protected void generateFoundStubs(Config config, Archive archive) throws ClientStubGenException { - - // List of classes on which generate stubs - List classesStub = new ArrayList(); - try { - List files = archive.getContainedFiles(); - - for (Iterator itFiles = files.iterator(); itFiles.hasNext();) { - String clName = (String) itFiles.next(); - if (clName.endsWith("_Stub.class") || clName.endsWith("_Tie.class")) { - // Extract classname from stub and add entry in the list - if (archive instanceof WebApp) { - if (clName.startsWith("WEB-INF/classes/")) { - classesStub.add(clName.substring("WEB-INF/classes/".length())); - } - } else { - classesStub.add(clName); - } - } - } - - // launch generation for all classes found - for (Iterator itClass = classesStub.iterator(); itClass.hasNext();) { - String clName = (String) itClass.next(); - - // Remove stub name - int removeStubIdx = 0; - if (clName.endsWith("_Stub.class")) { - removeStubIdx = clName.length() - "_Stub.class".length(); - } else if (clName.endsWith("_Tie.class")) { - removeStubIdx = clName.length() - "_Tie.class".length(); - } else { - continue; - } - clName = clName.substring(0, removeStubIdx); - - // Remove the _ from the className - int idx = clName.lastIndexOf('/') + 1; - if (clName.charAt(idx) == '_') { - String pkgName = clName.substring(0, idx); - clName = pkgName + clName.substring(idx + 1, clName.length()); - } - - // Translate / into . (/ is in jar entry, classname should contain .) - clName = clName.replaceAll("/", "."); - - // javax object and existing omg stubs - if (clName.indexOf("javax.") != -1 || clName.indexOf("org.omg.stub") != -1) { - continue; - } - - - // Doesn't take into account Home and Remote - if (clName.indexOf("Home") != -1 || clName.indexOf("Remote") != -1) { - continue; - } - - Generator g = new Generator(config, null, clName, archive); - try { - g.generate(); - g.compile(); - } catch (ClientStubGenException cstge) { - continue; - } - // add files in archive - g.addFiles(archive); - } - } catch (Exception e) { - throw new ClientStubGenException("Cannot find/build stubs from the file " + archive.getRootFile(), e); - } - - } - -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/modifier/ApplicationModifier.java b/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/modifier/ApplicationModifier.java deleted file mode 100644 index bff14ad80cdb3dec53e1bce5e9b0dec278250132..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/modifier/ApplicationModifier.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.generators.genclientstub.modifier; - -import java.util.Iterator; - -import org.ow2.jonas.generators.genbase.archive.Application; -import org.ow2.jonas.generators.genbase.archive.Client; -import org.ow2.jonas.generators.genbase.archive.EjbJar; -import org.ow2.jonas.generators.genbase.archive.WebApp; -import org.ow2.jonas.generators.genbase.modifier.AbsApplicationModifier; -import org.ow2.jonas.generators.genclientstub.generator.GeneratorFactory; - - -/** - * Modify a given Application. - * (code from WsGen) - * @author Florent Benoit - */ -public class ApplicationModifier extends AbsApplicationModifier { - - /** - * Creates a new ApplicationModifier. - * - * @param archive the Application J2EE archive - */ - public ApplicationModifier(Application archive) { - super(archive, GeneratorFactory.getInstance().getConfiguration()); - } - - /** - * initialize modifier - */ - protected void init() { - - // fill ejbjar list - for (Iterator i = getApplication().getEjbJars(); i.hasNext();) { - EjbJar ejbjar = (EjbJar) i.next(); - getEjbModifiers().add(new EjbJarModifier(ejbjar)); - } - - // fill webapp list - for (Iterator i = getApplication().getWebApps(); i.hasNext();) { - WebApp webapp = (WebApp) i.next(); - getWebModifiers().add(new WebAppModifier(webapp)); - } - - // fill client list - for (Iterator i = getApplication().getClients(); i.hasNext();) { - Client client = (Client) i.next(); - getCltModifiers().add(new ClientModifier(client)); - } - } - -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/modifier/ClientModifier.java b/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/modifier/ClientModifier.java deleted file mode 100644 index ba36fee04b96488ea00490d3e7d3deed179ffd5f..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/modifier/ClientModifier.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.generators.genclientstub.modifier; - -import java.io.File; -import java.util.Iterator; -import java.util.List; - -import org.ow2.jonas.deployment.api.IEJBRefDesc; -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.archive.Archive; -import org.ow2.jonas.generators.genbase.archive.Client; -import org.ow2.jonas.generators.genclientstub.generator.Generator; -import org.ow2.jonas.generators.genclientstub.generator.GeneratorFactory; - - -import org.objectweb.util.monolog.api.BasicLevel; - -/** - * Modify a given Client. - * - * @author Florent Benoit - */ -public class ClientModifier extends AbsArchiveModifier { - - /** client */ - private Client client; - - /** - * Creates a new ClientModifier object. - * - * @param client Client Archive - */ - public ClientModifier(Client client) { - super(client); - this.client = client; - } - - /** - * Modify the current archive and return a modified archive. - * - * @return a modified archive. - * - * @throws GenBaseException When Client Generation or storing phase fails. - */ - public Archive modify() throws GenBaseException { - - getLogger().log(BasicLevel.INFO, "Processing Client " + client.getName()); - - GeneratorFactory gf = GeneratorFactory.getInstance(); - - - // Found automatically the stubs - generateFoundStubs(gf.getConfiguration(), client); - - - - // Ejb-Ref - List ejbRefs = client.getEjbRefDescs(); - for (Iterator j = ejbRefs.iterator(); j.hasNext();) { - IEJBRefDesc ejbRef = (IEJBRefDesc) j.next(); - - // launch generation - Generator g = new Generator(gf.getConfiguration(), ejbRef, null, client); - g.generate(); - g.compile(); - // add files in web archive - g.addFiles(client); - } - - return save(gf.getConfiguration(), "clients" + File.separator + client.getRootFile().getName()); - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/modifier/EjbJarModifier.java b/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/modifier/EjbJarModifier.java deleted file mode 100644 index 14bd67a3f30d04836831786d03ce44318fb89ad8..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/modifier/EjbJarModifier.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genclientstub.modifier; - -import java.io.File; -import java.util.Iterator; -import java.util.List; - -import org.ow2.jonas.deployment.api.IEJBRefDesc; -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.archive.Archive; -import org.ow2.jonas.generators.genbase.archive.Ejb; -import org.ow2.jonas.generators.genbase.archive.EjbJar; -import org.ow2.jonas.generators.genclientstub.ClientStubGenException; -import org.ow2.jonas.generators.genclientstub.generator.Generator; -import org.ow2.jonas.generators.genclientstub.generator.GeneratorFactory; - - -import org.objectweb.util.monolog.api.BasicLevel; - -/** - * Modify a given EjbJar. - * @author Florent Benoit - */ -public class EjbJarModifier extends AbsArchiveModifier { - - /** - * Modified ejbjar - */ - private EjbJar ejbjar = null; - - /** - * Creates a new EjbJarModifier object. - * @param ejbjar EjbJar Archive - */ - public EjbJarModifier(EjbJar ejbjar) { - super(ejbjar); - this.ejbjar = ejbjar; - } - - /** - * modify the current EjbJar. If EjbJar is contained in not an application - * and have webservices endpoints, A DummyApplication is created and - * modification process launched against the newly created application. If - * EjbJar is contained in an application + webservices endpoints, a - * DummyWebApp is created to hold "facade" servlet managing SOAP processing. - * @return an EjbJar or an Application Archive - * @throws GenBaseException When generation or storing fails - * @throws ClientStubGenException When generation or storing fails - */ - public Archive modify() throws GenBaseException, ClientStubGenException { - - getLogger().log(BasicLevel.INFO, "Processing EjbJar " + ejbjar.getName()); - - GeneratorFactory gf = GeneratorFactory.getInstance(); - - // Found automatically the stubs - generateFoundStubs(gf.getConfiguration(), ejbjar); - - // Ejb-Ref - List ejbs = ejbjar.getEjbs(); - for (Iterator i = ejbs.iterator(); i.hasNext();) { - Ejb ejb = (Ejb) i.next(); - List ejbRefs = ejb.getEjbRefDescs(); - for (Iterator j = ejbRefs.iterator(); j.hasNext();) { - IEJBRefDesc ejbRef = (IEJBRefDesc) j.next(); - - // launch generation - Generator g = new Generator(gf.getConfiguration(), ejbRef, null, ejbjar); - g.generate(); - g.compile(); - // add files in web archive - g.addFiles(ejbjar); - } - } - - return save(gf.getConfiguration(), "ejbjars" + File.separator + ejbjar.getRootFile().getName()); - - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/modifier/ModifierFactory.java b/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/modifier/ModifierFactory.java deleted file mode 100644 index b0e71b7bc75fb6d9fadc2f6250cd115ab72f433d..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/modifier/ModifierFactory.java +++ /dev/null @@ -1,191 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2003-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.genclientstub.modifier; - -import java.io.File; -import java.io.IOException; -import java.util.jar.JarFile; - -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.archive.Application; -import org.ow2.jonas.generators.genbase.archive.Archive; -import org.ow2.jonas.generators.genbase.archive.Client; -import org.ow2.jonas.generators.genbase.archive.EjbJar; -import org.ow2.jonas.generators.genbase.archive.FileArchive; -import org.ow2.jonas.generators.genbase.archive.J2EEArchive; -import org.ow2.jonas.generators.genbase.archive.JarArchive; -import org.ow2.jonas.generators.genbase.archive.WebApp; -import org.ow2.jonas.generators.genbase.modifier.AbsModifierFactory; -import org.ow2.jonas.generators.genbase.modifier.ArchiveModifier; -import org.ow2.jonas.generators.genclientstub.ClientStubGenException; -import org.ow2.jonas.lib.util.I18n; -import org.ow2.util.archive.api.IArchive; -import org.ow2.util.archive.impl.ArchiveManager; -import org.ow2.util.ee.deploy.api.deployable.CARDeployable; -import org.ow2.util.ee.deploy.api.deployable.EARDeployable; -import org.ow2.util.ee.deploy.api.deployable.EJBDeployable; -import org.ow2.util.ee.deploy.api.deployable.IDeployable; -import org.ow2.util.ee.deploy.api.deployable.WARDeployable; -import org.ow2.util.ee.deploy.impl.helper.DeployableHelper; -import org.ow2.util.ee.deploy.impl.helper.DeployableHelperException; - -/** - * Used to create the right ArchiveModifier from a given filename (ear, jar, - * war, ... - * @author Guillaume Sauthier - */ -public class ModifierFactory extends AbsModifierFactory { - - /** - * I18n. - */ - private static I18n i18n = I18n.getInstance(ModifierFactory.class); - - /** - * Empty Constructor for utility class. - */ - private ModifierFactory() { - super(); - } - - /** - * Returns an ArchiveModifier according to archive type - * (application, ejbjar, webapp or client). - * @param filename input filename. - * @return an ArchiveModifier. - * @exception GenBaseException when archive creation fails. - */ - public static ArchiveModifier getModifier(final String filename) throws GenBaseException { - return getModifier(filename, true, null); - } - - /** - * Returns an ArchiveModifier according to archive type - * (application, ejbjar, webapp or client). - * @param filename input filename. - * @param init Initialize the archive. - * @param deployable the current deployable (can be null) - * @return an ArchiveModifier. - * @exception GenBaseException when archive creation fails. - */ - public static ArchiveModifier getModifier(final String filename, final boolean init, final IDeployable deployable) throws GenBaseException { - Archive archive = null; - J2EEArchive j2eeArchive = null; - ArchiveModifier modifier = null; - int mode; - IDeployable localDeployable = null; - - File file = new File(filename); - - if (file.exists()) { - if (file.isFile()) { - // should be a jar file - // test jar file - JarFile jarfile; - - try { - jarfile = new JarFile(file); - } catch (IOException ioe) { - // not a jar file - String err = i18n.getMessage("ModifierFactory.getModifier.notjar", filename); - throw new ClientStubGenException(err); - } - - // Create the inner Archive - archive = new JarArchive(file); - } else { - // directory unpacked - // Create the inner Archive - archive = new FileArchive(file); - } - - try { - if (deployable == null) { - // Build Archive - IArchive fileArchive = ArchiveManager.getInstance().getArchive(file); - localDeployable = DeployableHelper.getDeployable(fileArchive); - } else { - localDeployable = deployable; - } - } catch (DeployableHelperException e) { - throw new ClientStubGenException("Cannot get a deployable for the archive '" + archive + "'", e); - } - - // now we are sure that filename is a correct jar - if (localDeployable instanceof EARDeployable) { - // Application J2EE Archive - j2eeArchive = new Application(archive, localDeployable); - mode = APPLICATION; - } else if (localDeployable instanceof EJBDeployable) { - // EjbJar J2EE Archive - j2eeArchive = new EjbJar(archive); - mode = EJBJAR; - - } else if (localDeployable instanceof WARDeployable) { - // WebApp J2EE Archive - j2eeArchive = new WebApp(archive); - mode = WEBAPP; - - } else if (localDeployable instanceof CARDeployable) { - // Client J2EE Archive - j2eeArchive = new Client(archive); - mode = CLIENT; - - } else { - // unsupported archive type - String err = i18n.getMessage("ModifierFactory.getModifier.unsupported", filename); - throw new ClientStubGenException(err); - } - } else { - String err = i18n.getMessage("ModifierFactory.getModifier.notfound", filename); - throw new ClientStubGenException(err); - } - - // init the archive - if (init) { - j2eeArchive.initialize(); - } - - // create the modifier - switch (mode) { - case APPLICATION: - modifier = new ApplicationModifier((Application) j2eeArchive); - break; - case EJBJAR: - modifier = new EjbJarModifier((EjbJar) j2eeArchive); - break; - case WEBAPP: - modifier = new WebAppModifier((WebApp) j2eeArchive); - break; - case CLIENT: - modifier = new ClientModifier((Client) j2eeArchive); - break; - default: - // cannot happen - } - - return modifier; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/modifier/WebAppModifier.java b/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/modifier/WebAppModifier.java deleted file mode 100644 index 67e30402333482a143d3d8deda809d2972e576b9..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/modifier/WebAppModifier.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.generators.genclientstub.modifier; - -import java.io.File; -import java.util.Iterator; -import java.util.List; - -import org.ow2.jonas.deployment.api.IEJBRefDesc; -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.archive.Archive; -import org.ow2.jonas.generators.genbase.archive.WebApp; -import org.ow2.jonas.generators.genclientstub.generator.Generator; -import org.ow2.jonas.generators.genclientstub.generator.GeneratorFactory; - - -import org.objectweb.util.monolog.api.BasicLevel; - -/** - * Modify a given WebApp. - * - * @author Guillaume Sauthier - */ -public class WebAppModifier extends AbsArchiveModifier { - - /** webapp */ - private WebApp web; - - /** - * Creates a new WebAppModifier - * - * @param webapp - * the WebApp J2EE archive - */ - public WebAppModifier(WebApp webapp) { - super(webapp); - web = webapp; - } - - /** - * Modify the current archive and return a modified archive. - * - * @return a modified archive. - * - * @throws GenBaseException - * When modification fails - */ - public Archive modify() throws GenBaseException { - - getLogger().log(BasicLevel.INFO, "Processing WebApp " + web.getName()); - - GeneratorFactory gf = GeneratorFactory.getInstance(); - - // Found automatically the stubs - generateFoundStubs(gf.getConfiguration(), web); - - // Ejb-Ref - List ejbRefs = web.getEjbRefDescs(); - for (Iterator j = ejbRefs.iterator(); j.hasNext();) { - IEJBRefDesc ejbRef = (IEJBRefDesc) j.next(); - - // launch generation - Generator g = new Generator(gf.getConfiguration(), ejbRef, null, web); - g.generate(); - g.compile(); - // add files in web archive - g.addFiles(web); - } - - return save(gf.getConfiguration(), "webapps" + File.separator - + web.getName()); - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/wrapper/ClientGenStubWrapper.java b/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/wrapper/ClientGenStubWrapper.java deleted file mode 100644 index 4c17b6eca3b0056aaa6a838c02d16c416714f6af..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genclientstub/src/main/java/org/ow2/jonas/generators/genclientstub/wrapper/ClientGenStubWrapper.java +++ /dev/null @@ -1,156 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genclientstub.wrapper; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import org.ow2.jonas.lib.bootstrap.LoaderManager; - - -/** - * ClientGenStub wrapper Used to launch ClientGenStub in DeployFile of JSR 88 - * @author Florent Benoit - */ -public class ClientGenStubWrapper { - - /** - * ClientGenStub fully qualified classname - */ - private static final String GENSTUB_CLASSNAME = "org.ow2.jonas.generators.genclientstub.ClientStubGen"; - - /** - * Number of arguments of execute method - */ - private static final int ARGS_NUMBER = 3; - - /** - * Method execute of ClientGenStub - */ - private static Method executeMethod = null; - - /** - * The archive was changed or not ? - */ - private static Method isInputModifiedMethod = null; - - /** - * ClientGenStub class - */ - private Object clientGenStub = null; - - /** - * Empty constructor. - */ - public ClientGenStubWrapper() { - }; - - /** - * Wrapper around ClientstubGen.execute(String[]) method - * @param fileName name of the file - * @return name of the modified/built file - * @throws Exception If ClientstubGen fails or if Reflection errors occurs - */ - public String callClientGenStubExecute(final String fileName) throws Exception { - LoaderManager lm = LoaderManager.getInstance(); - ClassLoader old = null; - - try { - ClassLoader ext = lm.getExternalLoader(); - old = Thread.currentThread().getContextClassLoader(); - Thread.currentThread().setContextClassLoader(ext); - if (executeMethod == null) { - Class clazz = ext.loadClass(GENSTUB_CLASSNAME); - executeMethod = clazz.getDeclaredMethod("execute", new Class[] {String[].class}); - } - - if (clientGenStub == null) { - Class clazz = ext.loadClass(GENSTUB_CLASSNAME); - clientGenStub = clazz.newInstance(); - } - - String[] args = new String[ARGS_NUMBER]; - args[0] = "-d"; - args[1] = System.getProperty("java.io.tmpdir"); - args[2] = fileName; - - return (String) executeMethod.invoke(clientGenStub, new Object[] {args}); - } catch (InvocationTargetException e) { - if (e.getTargetException() instanceof Error) { - throw (Error) e.getTargetException(); - } else { - throw new Exception("Exception when executing ClientstubGen.execute(String[])", e.getTargetException()); - } - } catch (Exception e) { - throw new Exception("Problems when invoking method ClientstubGen.execute(String[])", e); - } finally { - if (old != null) { - Thread.currentThread().setContextClassLoader(old); - } - } - } - - /** - * Wrapper around ClientGenStubGen.isModified() method - * @return true/false - * @throws Exception If ClientStub fails or if Reflection errors occurs - */ - public boolean callClientGenStubIsInputModifed() throws Exception { - LoaderManager lm = LoaderManager.getInstance(); - ClassLoader old = null; - - try { - ClassLoader ext = lm.getExternalLoader(); - old = Thread.currentThread().getContextClassLoader(); - Thread.currentThread().setContextClassLoader(ext); - - if (isInputModifiedMethod == null) { - Class clazz = ext.loadClass(GENSTUB_CLASSNAME); - isInputModifiedMethod = clazz.getDeclaredMethod("isInputModified", new Class[] {}); - } - - if (clientGenStub == null) { - Class clazz = ext.loadClass(GENSTUB_CLASSNAME); - clientGenStub = clazz.newInstance(); - } - - return ((Boolean) isInputModifiedMethod.invoke(clientGenStub, (Object[]) null)).booleanValue(); - } catch (InvocationTargetException e) { - if (e.getTargetException() instanceof Error) { - throw (Error) e.getTargetException(); - } else { - throw new Exception("Exception when executing clientGenStub.isInputModified()", e.getTargetException()); - } - } catch (Exception e) { - throw new Exception("Problems when invoking method clientGenStub.isInputModified()", e); - } finally { - if (old != null) { - Thread.currentThread().setContextClassLoader(old); - } - } - } -} - diff --git a/jonas/modules/generators/jonas-genclientstub/src/main/resources/META-INF/jonas-generators-clientstubs.bnd b/jonas/modules/generators/jonas-genclientstub/src/main/resources/META-INF/jonas-generators-clientstubs.bnd deleted file mode 100644 index f25e81b56737b005fd54d486b13ecc338f100aa5..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genclientstub/src/main/resources/META-INF/jonas-generators-clientstubs.bnd +++ /dev/null @@ -1,36 +0,0 @@ -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 2007 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -Export-Package org.ow2.jonas.generators.genclientstub.* - -DynamicImport-Package org.ow2.jonas.lib.ejb21.*, \ - org.objectweb.jorm.naming.*, \ - org.objectweb.perseus.persistence.api, \ - org.ow2.jonas.lib.ejb21.ha,\ - javax.* - - -# Add dependencies -Embed-Dependency asm;inline=true, \ - asm-attrs;inline=true, \ - fastrmic;inline=true \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genclientstub/src/main/resources/org/ow2/jonas/generators/genclientstub/generator/I18n.properties b/jonas/modules/generators/jonas-genclientstub/src/main/resources/org/ow2/jonas/generators/genclientstub/generator/I18n.properties deleted file mode 100644 index dca304869fb2a15ab6c8e32e7d436909e6dd470f..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genclientstub/src/main/resources/org/ow2/jonas/generators/genclientstub/generator/I18n.properties +++ /dev/null @@ -1,3 +0,0 @@ -# $Id$ - -Generator.generate.error=Error when running rmic for Client stub generation diff --git a/jonas/modules/generators/jonas-genclientstub/src/main/resources/org/ow2/jonas/generators/genclientstub/modifier/I18n.properties b/jonas/modules/generators/jonas-genclientstub/src/main/resources/org/ow2/jonas/generators/genclientstub/modifier/I18n.properties deleted file mode 100644 index 58bcd33df55fb717037e9e22927390a98d805f9f..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genclientstub/src/main/resources/org/ow2/jonas/generators/genclientstub/modifier/I18n.properties +++ /dev/null @@ -1,5 +0,0 @@ -# $Id$ - -ModifierFactory.getModifier.notfound file not found ''{0}'' -ModifierFactory.getModifier.notjar ''{0}'' is not a jar file -ModifierFactory.getModifier.unsupported ''{0}'' is not a supported jar archive (should be EjbJar, WebApp, Client or Application) diff --git a/jonas/modules/generators/jonas-genic/pom.xml b/jonas/modules/generators/jonas-genic/pom.xml deleted file mode 100644 index 45887a9db30d75028ed274f1640668f870d20070..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/pom.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - org.ow2.jonas - jonas-generators - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - - jonas-genic - bundle - JOnAS :: Generators :: GenIC (EJB 2.1) - - - - org.ow2.jonas - jonas-ejb-container - ${project.version} - - - org.ow2.jonas - jonas-version - ${project.version} - - - org.objectweb.monolog - monolog-api - ${monolog.version} - - - org.objectweb.monolog - monolog-wrapper-velocity - ${monolog.version} - - - org.ow2.jonas - jonas-services-api - ${project.version} - - - org.ow2.jonas - jonas-deployment - ${project.version} - - - org.ow2.jonas - jonas-ejb2.1-ha - ${project.version} - - - org.objectweb.jorm - jorm-compiler - 2.9.3 - - - org.objectweb.jorm - jorm-core - ${jorm.version} - - - org.ow2.spec.ee - ow2-ejb-3.0-spec - provided - - - velocity - velocity-dep - 1.4 - - - asm - asm - 1.5.3 - runtime - - - asm - asm-attrs - 1.5.3 - runtime - - - org.ow2.fastrmic - fastrmic - runtime - - - org.ow2.carol - carol - ${carol.version} - - - org.ow2.jonas - eclipse-compiler - ${project.version} - - - diff --git a/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/BeanSources.java b/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/BeanSources.java deleted file mode 100644 index 777b6ddb0c1e13c52c7929498725ff72e13d14ba..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/BeanSources.java +++ /dev/null @@ -1,470 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genic; - -import java.io.File; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; - -import org.ow2.jonas.deployment.ejb.BeanDesc; -import org.ow2.jonas.deployment.ejb.EntityCmp2Desc; -import org.ow2.jonas.deployment.ejb.EntityDesc; -import org.ow2.jonas.deployment.ejb.EntityJdbcCmp1Desc; -import org.ow2.jonas.deployment.ejb.SessionStatelessDesc; -import org.ow2.jonas.lib.ejb21.jorm.RdbMappingBuilder; -import org.ow2.jonas.lib.util.BeanNaming; -import org.ow2.jonas.lib.util.Log; - -import org.apache.velocity.app.VelocityEngine; - -import org.objectweb.jorm.compiler.api.JormCompilerParameter; -import org.objectweb.jorm.compiler.lib.JormCompiler; -import org.objectweb.jorm.metainfo.api.Manager; - -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; - -/** - * This class allows to generate the sources of: the class that implements the - * Enterprise bean's remote interface, the class that implements the Enterprise - * bean's home interface, the class that implements the Enterprise bean's local - * interface, the class that implements the Enterprise bean's localhome - * interface, the class of the Entity Handle in case of entity, and the extended - * class of the Bean for persistence in case of entity with CMP, of a given - * Enterprise Java Bean. - * @author Helene Joanin : Initial developer - * @author Philippe Durieux - * @author Sebastien Chassande - */ -public class BeanSources { - - /** - * java file suffix - */ - private static final String JAVA_SUFFIX = ".java"; - - /** - * EJBObject (Remote). May be null if no Remote interface. - */ - private String wrpRemoteFileName = null; - - /** - * EJBLocalObject (Local). May be null if no Local interface. - */ - private String wrpLocalFileName = null; - - /** - * Home. May be null if no Home interface. - */ - private String wrpHomeFileName = null; - - /** - * Home cluster file name. May be null if no Home interface. - */ - private String wrpHomeClusterFileName = null; - - /** - * Remote cluster file name. May be null if no Remote interface. - */ - private String wrpRemoteClusterFileName = null; - - /** - * LocalHome. May be null if no LocalHome interface. - */ - private String wrpLocalHomeFileName = null; - - /** - * Handle (for Entity only) - */ - private String wrpHandleFileName = null; - - /** - * Bean (for CMP Entity only) - */ - private String wrpBeanFileName = null; - - /** - * Service Endpoint filename - */ - private String wrpServiceEndpointFileName = null; - - /** - * Service Endpoint Home filename - */ - private String wrpSEHomeFileName = null; - - /** - * Interface for Cmp2 Entity coherence - */ - private String itfCohCmp2Entity = null; - - /** - * Source objects used to generate classes - */ - private ArrayList sources; - - /** - * Java sources that are not Remote - */ - private ArrayList noRemoteJava; - - /** - * directory where to place the generated files - */ - private String outdir = null; - - /** - * bean descriptor - */ - private BeanDesc dd = null; - - /** - * JORM compiler - */ - private JormCompiler jormCompiler; - - /** - * Jorm Manager - */ - private Manager manager = null; - - /** - * logger - */ - private Logger logger = null; - - private GenICParameters gp; - - private VelocityEngine ve; - - - /** - * BeanSources Constructor for bean that is not a entity with CMP2 - * @param beanDesc deployment descriptor of the bean - * @param gp @param gp GenIC parameters - * @param ve the Velocity engine - */ - public BeanSources(BeanDesc beanDesc, GenICParameters gp, VelocityEngine ve) { - logger = Log.getLogger(Log.JONAS_GENIC_PREFIX); - dd = beanDesc; - this.gp = gp; - outdir = gp.getOutputDirectory(); - this.ve = ve; - sources = new ArrayList(); - noRemoteJava = new ArrayList(); - } - - - /** - * BeanSources initialization. - * @param jc - * @param mgr - * @exception GenICException In error case - */ - public void init(JormCompiler jc, Manager mgr) throws GenICException { - jormCompiler = jc; - manager = mgr; - - // generated Home - if (dd.getHomeClass() != null) { - if (outdir.length() > 0) { - wrpHomeFileName = outdir + File.separatorChar + BeanNaming.getPath(dd.getFullWrpHomeName()); - } else { - wrpHomeFileName = dd.getWrpHomeName(); - } - - wrpHomeFileName = wrpHomeFileName.concat(JAVA_SUFFIX); - sources.add(new Source(dd, wrpHomeFileName, Source.HOME, ve, manager)); - - // generated Handle for Remote Entity bean - if (dd instanceof EntityDesc) { - if (outdir.length() > 0) { - wrpHandleFileName = outdir + File.separatorChar + BeanNaming.getPath(dd.getFullWrpHandleName()); - } else { - wrpHandleFileName = dd.getWrpHandleName(); - } - wrpHandleFileName = wrpHandleFileName.concat(JAVA_SUFFIX); - noRemoteJava.add(wrpHandleFileName); - sources.add(new Source(dd, wrpHandleFileName, Source.ENTITY_HANDLE, ve, manager)); - } - } - - // generated EJBObject (Remote) - if (dd.getRemoteClass() != null) { - if (outdir.length() > 0) { - wrpRemoteFileName = outdir + File.separatorChar + BeanNaming.getPath(dd.getFullWrpRemoteName()); - } else { - wrpRemoteFileName = dd.getWrpRemoteName(); - } - - wrpRemoteFileName = wrpRemoteFileName.concat(JAVA_SUFFIX); - sources.add(new Source(dd, wrpRemoteFileName, Source.REMOTE, ve, manager)); - } - - // generated LocalHome - if (dd.getLocalHomeClass() != null) { - if (outdir.length() > 0) { - wrpLocalHomeFileName = outdir + File.separatorChar + BeanNaming.getPath(dd.getFullWrpLocalHomeName()); - } else { - wrpLocalHomeFileName = dd.getWrpLocalHomeName(); - } - wrpLocalHomeFileName = wrpLocalHomeFileName.concat(JAVA_SUFFIX); - noRemoteJava.add(wrpLocalHomeFileName); - sources.add(new Source(dd, wrpLocalHomeFileName, Source.LOCAL_HOME, ve, manager)); - } - - // generated EJBLocalObject (Local) - if (dd.getLocalClass() != null) { - if (outdir.length() > 0) { - wrpLocalFileName = outdir + File.separatorChar + BeanNaming.getPath(dd.getFullWrpLocalName()); - } else { - wrpLocalFileName = dd.getWrpLocalName(); - } - wrpLocalFileName = wrpLocalFileName.concat(JAVA_SUFFIX); - noRemoteJava.add(wrpLocalFileName); - sources.add(new Source(dd, wrpLocalFileName, Source.LOCAL, ve, manager)); - } - - // generated ServiceEndpoint and SEHome - if (dd instanceof SessionStatelessDesc) { - SessionStatelessDesc ssd = (SessionStatelessDesc) dd; - if (ssd.getServiceEndpointClass() != null) { - // ServiceEndpoint - if (outdir.length() > 0) { - wrpServiceEndpointFileName = outdir + File.separatorChar - + BeanNaming.getPath(ssd.getFullWrpServiceEndpointName()); - } else { - wrpServiceEndpointFileName = ssd.getWrpServiceEndpointName(); - } - wrpServiceEndpointFileName = wrpServiceEndpointFileName.concat(JAVA_SUFFIX); - //noRemoteJava.add(wrpServiceEndpointFileName); // Accessed locally only - sources.add(new Source(dd, wrpServiceEndpointFileName, Source.SERVICE_ENDPOINT, ve, manager)); - // ServiceEndpointHome - if (outdir.length() > 0) { - wrpSEHomeFileName = outdir + File.separatorChar + BeanNaming.getPath(ssd.getFullWrpSEHomeName()); - } else { - wrpSEHomeFileName = ssd.getWrpSEHomeName(); - } - wrpSEHomeFileName = wrpSEHomeFileName.concat(JAVA_SUFFIX); - noRemoteJava.add(wrpSEHomeFileName); // Accessed locally only - sources.add(new Source(dd, wrpSEHomeFileName, Source.SERVICE_ENDPOINT_HOME, ve, manager)); - } - } - - // generated derived bean class for Entity Bean CMP - if (dd instanceof EntityJdbcCmp1Desc) { - if (outdir.length() > 0) { - wrpBeanFileName = outdir + File.separatorChar + BeanNaming.getPath(dd.getFullDerivedBeanName()); - } else { - wrpBeanFileName = dd.getDerivedBeanName(); - } - wrpBeanFileName = wrpBeanFileName.concat(JAVA_SUFFIX); - noRemoteJava.add(wrpBeanFileName); - sources.add(new Source(dd, wrpBeanFileName, Source.ENTITY_CMP_JDBC, ve, manager)); - } - if (dd instanceof EntityCmp2Desc) { - EntityCmp2Desc ecd = (EntityCmp2Desc) dd; - if (outdir.length() > 0) { - wrpBeanFileName = outdir + File.separatorChar + BeanNaming.getPath(dd.getFullDerivedBeanName()) - + JAVA_SUFFIX; - if (ecd.needJormCoherenceHelper()) { - itfCohCmp2Entity = outdir + File.separatorChar - + BeanNaming.getPath(ecd.getJormCoherenceHelperFQItfName()) + JAVA_SUFFIX; - } - } else { - wrpBeanFileName = BeanNaming.getPath(dd.getDerivedBeanName()) + JAVA_SUFFIX; - if (ecd.needJormCoherenceHelper()) { - itfCohCmp2Entity = BeanNaming.getPath(ecd.getJormCoherenceHelperItfName()) + JAVA_SUFFIX; - } - } - if (ecd.needJormCoherenceHelper()) { - sources.add(new Source(dd, itfCohCmp2Entity, Source.ITF_COH_CMP2_ENTITY, ve, manager)); - noRemoteJava.add(itfCohCmp2Entity); - } - noRemoteJava.add(wrpBeanFileName); - sources.add(new Source(dd, wrpBeanFileName, Source.ENTITY_CMP_JDBC, ve, manager)); - } - } - - /** - * Generates the java sources - * @throws GenICException in error case - */ - public void generate() throws GenICException { - // Generates the java sources - for (Iterator it = sources.iterator(); it.hasNext();) { - Source src = (Source) it.next(); - src.generate(); - } - } - - public void jormCompile(ArrayList jormList) throws GenICException { - - // In case of Cmp2, call jorm compiler. - if (dd instanceof EntityCmp2Desc) { - EntityCmp2Desc ecd = (EntityCmp2Desc) dd; - - // Build and fill a JormCompilerParameter dedicated to the bean - JormCompilerParameter cp = jormCompiler.getCompilerParameter(); - cp.setProjectName(RdbMappingBuilder.getProjectName()); - cp.setKeepSrc(true); - cp.setOutput(outdir); - cp.setClassMappingInheritance("org.ow2.jonas.lib.ejb21.jorm.RdbFactory"); - cp.setStateGenerated(true); - cp.setStateInheritance(ecd.getEjbClass().getName()); - switch (ecd.getLockPolicy()) { - case EntityDesc.LOCK_CONTAINER_READ_UNCOMMITTED: - cp.setBindingInheritance("org.ow2.jonas.lib.ejb21.JEntitySwitchCRU"); - break; - case EntityDesc.LOCK_CONTAINER_SERIALIZED: - cp.setBindingInheritance("org.ow2.jonas.lib.ejb21.JEntitySwitchCS"); - break; - case EntityDesc.LOCK_CONTAINER_SERIALIZED_TRANSACTED: - cp.setBindingInheritance("org.ow2.jonas.lib.ejb21.JEntitySwitchCST"); - break; - case EntityDesc.LOCK_CONTAINER_READ_COMMITTED: - cp.setBindingInheritance("org.ow2.jonas.lib.ejb21.JEntitySwitchCRC"); - break; - case EntityDesc.LOCK_DATABASE: - cp.setBindingInheritance("org.ow2.jonas.lib.ejb21.JEntitySwitchDB"); - break; - case EntityDesc.LOCK_READ_ONLY: - cp.setBindingInheritance("org.ow2.jonas.lib.ejb21.JEntitySwitchRO"); - break; - case EntityDesc.LOCK_CONTAINER_READ_WRITE: - cp.setBindingInheritance("org.ow2.jonas.lib.ejb21.JEntitySwitchCRW"); - break; - default: - throw new GenICException("Cannot find JEntitySwitch: Unknown lock policy"); - } - - // Run the Jorm Compiler - Collection jormflist = null; - try { - jormflist = jormCompiler.generateFiles(jormList); - } catch (Exception e) { - throw new GenICException("Problem during jorm generation", e); - } - // Save the list of Jorm generated files - for (Iterator i = jormflist.iterator(); i.hasNext();) { - String file = (String) i.next(); - logger.log(BasicLevel.DEBUG, "Jorm generated file: " + file); - noRemoteJava.add(file); - } - } - } - - /** - * @return Return the bean's name - */ - public String getEjbName() { - return dd.getEjbName(); - } - - /** - * @return Return the file name of the generated source for the Home (null - * if none) - */ - public String getWrpHomeFileName() { - return wrpHomeFileName; - } - - /** - * @return Return the file name of the cluster configuration for the Home - * (null if none) - */ - public String getWrpHomeClusterFileName() { - return wrpHomeClusterFileName; - } - - /** - * @return Return the file name of the cluster configuration for the Remote - * (null if none) - */ - public String getWrpRemoteClusterFileName() { - return wrpRemoteClusterFileName; - } - - - /** - * @return Return the file name of the generated source for the Remote (null - * if none) - */ - public String getWrpRemoteFileName() { - return wrpRemoteFileName; - } - - /** - * @return Return the class name of the generated source for the Remote - * (package included) - */ - public String getWrpRemoteClassName() { - return dd.getFullWrpRemoteName(); - } - - /** - * @return Return the file name of the generated source for the - * ServiceEndpoint (null if none) - */ - public String getWrpServiceEndpointFileName() { - return wrpServiceEndpointFileName; - } - - /** - * @return Return the file name of the generated source for the - * ServiceEndpointHome (null if none) - */ - public String getWrpSEHomeFileName() { - return wrpSEHomeFileName; - } - - /** - * @return Return the class name of the generated source for the - * ServiceEndpoint (package included) - */ - public String getWrpServiceEndpointClassName() { - if (dd instanceof SessionStatelessDesc) { - return ((SessionStatelessDesc) dd).getFullWrpServiceEndpointName(); - } - return null; - } - - /** - * @return Return the class name of the generated source for the Home - * (package included) - */ - public String getWrpHomeClassName() { - return dd.getFullWrpHomeName(); - } - - /** - * @return Returns the list of the sources that are not Remote - */ - public Collection getNoRemoteJavas() { - return noRemoteJava; - } -} diff --git a/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/GenIC.java b/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/GenIC.java deleted file mode 100644 index f18f7fe77fd4efc6429cb67d96178c53abedb9c5..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/GenIC.java +++ /dev/null @@ -1,1254 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genic; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.StringTokenizer; -import java.util.jar.Attributes; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; -import java.util.jar.JarOutputStream; -import java.util.jar.Manifest; - -import org.apache.velocity.app.VelocityEngine; -import org.apache.velocity.runtime.RuntimeConstants; -import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader; -import org.objectweb.jorm.compiler.api.JormCompilerConfigurator; -import org.objectweb.jorm.compiler.lib.JormCompiler; -import org.objectweb.jorm.metainfo.api.Manager; -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; -import org.ow2.jonas.Version; -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.ejb.BeanDesc; -import org.ow2.jonas.deployment.ejb.DeploymentDesc; -import org.ow2.jonas.deployment.ejb.DeploymentDescEjb2; -import org.ow2.jonas.deployment.ejb.EntityCmp2Desc; -import org.ow2.jonas.deployment.ejb.MessageDrivenDesc; -import org.ow2.jonas.deployment.ejb.lib.EjbDeploymentDescManager; -import org.ow2.jonas.eclipse.compiler.CompilationContext; -import org.ow2.jonas.eclipse.compiler.CompilerError; -import org.ow2.jonas.eclipse.compiler.JOnASCompiler; -import org.ow2.jonas.lib.bootstrap.loader.JClassLoader; -import org.ow2.jonas.lib.ejb21.Protocols; -import org.ow2.jonas.lib.ejb21.jorm.CMP2Bean; -import org.ow2.jonas.lib.ejb21.jorm.RdbMappingBuilder; -import org.ow2.jonas.lib.util.BeanNaming; -import org.ow2.jonas.lib.util.Cmd; -import org.ow2.jonas.lib.util.Env; -import org.ow2.jonas.lib.util.Log; -import org.ow2.util.file.FileUtils; -import org.ow2.util.file.FileUtilsException; - -/** - * This class allows to generate: - *
      - *
    • the classes that implements the Enterprise bean's remote interface, - *
    • the classes that implements the Enterprise bean's home interface, - *
    • the classes that implements the Handles of the Entity beans, - *
    • the classes that implements the persistence of the Entity beans with - * CMP, - *
    - * of all the Enterprise Java Beans defined in the given Deployment Descriptor. - * - * @author Helene Joanin : Initial developer - * @author Christophe Ney (Lutris Technologies) : Fix to handle arguments containing white spaces. - * @author Guillaume Riviere : Fix the addClassesInJar() method (on David, the Stub/Skel classes names are different). - * @author Dean Jennings : Remove System Exit (called now from server) - * @author Sami Lehtinen : use of java.util.jar api instead of jar command - */ -public class GenIC { - - /** - * Logger. - */ - public static Logger logger = Log.getLogger(Log.JONAS_GENIC_PREFIX); - - /** - * java.home property value (ended with '/'). - */ - private static String javaHomeBin = null; - - /** - * Is the command is verbose ? - */ - private boolean verbose = false; - - /** - * Name of the directory where to place the generated file. - */ - private String outputdir = null; - - /** - * Canonical name of the directory where to place the generated file. - */ - private String canonicalOutputdir = null; - - /** - * Are some container classes generated ? - */ - private boolean generatedIC; - - /** - * Path names of the generated files to delete. - */ - private ArrayList filesToDelete = null; - - /** - * Path names of the java generated sources (remote). - */ - private ArrayList remoteJavas = null; - - /** - * Path names of the java generated sources (no remote). - */ - private ArrayList noRemoteJavas = null; - - /** - * Names of the remote classes (package name included). - */ - private ArrayList remoteClasses = null; - - /** - * GenIC Parameters. - */ - private GenICParameters gp = null; - - /** - * Buffer size. - */ - private static final int BUFFER_SIZE = 4096; - - /** META dir. */ - private static final String META_DIR = "META-INF"; - - /** The path to the MANIFEST file. */ - private static final String MANIFEST_PATH = META_DIR + File.separator + "MANIFEST.MF"; - - /** - * GenIC allows to generate the container classes for JOnAS for the given - * Enterprise Java Beans. - *

    - * Usage: java org.ow2.jonas.generators.genic.GenIC -help
    - * to print this help message - *

    - * or java org.ow2.jonas.generators.genic.GenIC <Options><Input_File>
    - * to generate the container classes for the given EJBs. - *

    - * Options include: - *

      - *
    • -d <output_dir>specify where to place the generated files
    • - *
    • -noaddinjar do not add the generated classes in the given ejb-jar - * file
    • - *
    • -classpath <path> define the classpath to be used to compile classes
    • - *
    • -nocompil do not compile the generated source files via the java and - * rmi compilers
    • - *
    • -novalidation parse the XML deployment descriptors without - * validation
    • - *
    • -javac <opt>specify the name of the java compiler to use
    • - *
    • -javacopts <opt>specify the options to pass to the java compiler - *
    • - *
    • -rmicopts <opt>specify the options to pass to the rmi compiler
    • - *
    • -protocols list of protocol, separated by comma
    • - *
    • -keepgenerated do not delete intermediate generated source files - *
    • - *
    • -verbose
    • - *
    • -invokecmd invoke, in some case, directly the method of the java - * class corresponding to the command
    • - *
    - *

    - * Input_File file name of the standard deployment descriptor (.xml ended), - * or file name of the EJB-jar (.jar ended). - * @param args arguments for GenIC - */ - public static void main(final String[] args) { - boolean error = false; - - // don't use the fastrmic compiler by default - //boolean nofastrmic = false; - - String protocolNames = Protocols.RMI_JRMP; // Default to jrmp - - // Holder for GenIC params - GenICParameters gp = new GenICParameters(); - - // Get args - for (int argn = 0; argn < args.length; argn++) { - String arg = args[argn]; - if (arg.equals("-help") || arg.equals("-?")) { - gp.setHelp(true); - continue; - } - if (arg.equals("-verbose")) { - gp.setVerbose(true); - continue; - } - if (arg.equals("-debug")) { - // deprecated - continue; - } - if (arg.equals("-mappernames")) { - argn++; - // deprecated - logger.log(BasicLevel.LEVEL_WARN, "The -mappernames option is ignored (deprecated)"); - } - if (arg.equals("-protocols")) { - argn++; - if (argn < args.length) { - protocolNames = args[argn]; - continue; - } else { - error = true; - } - } - if (arg.equals("-keepgenerated")) { - gp.setKeepGenerated(true); - gp.getRmicOptions().add(args[argn]); - continue; - } - if (arg.equals("-nocompil")) { - gp.setCompil(false); - gp.setKeepGenerated(true); - continue; - } - if (arg.equals("-noaddinjar")) { - gp.setAddInJar(false); - continue; - } - if (arg.equals("-novalidation")) { - gp.setParseWithValidation(false); - continue; - } - if (arg.equals("-classpath")) { - gp.setClasspathParam(args[++argn]); - continue; - } - if (arg.equals("-javac")) { - argn++; - if (argn < args.length) { - gp.setJavacName(args[argn]); - } else { - error = true; - } - continue; - } - if (arg.equals("-javacopts")) { - argn++; - if (argn < args.length) { - StringTokenizer st = new StringTokenizer(args[argn]); - while (st.hasMoreTokens()) { - gp.getJavacOptions().add(st.nextToken()); - } - } else { - error = true; - } - continue; - } - if (arg.equals("-rmicopts")) { - argn++; - if (argn < args.length) { - StringTokenizer st = new StringTokenizer(args[argn]); - while (st.hasMoreTokens()) { - gp.getRmicOptions().add(st.nextToken()); - } - } else { - error = true; - } - continue; - } - if (arg.equals("-d")) { - argn++; - if (argn < args.length) { - gp.setOutputDirectory(args[argn]); - } else { - error = true; - } - continue; - } - if (arg.equals("-invokecmd")) { - gp.setInvokeCmd(true); - continue; - } - if (arg.equals("-fastrmic")) { - argn++; - // deprecated - logger.log(BasicLevel.WARN, "The -fastrmic option is ignored as it is the default value. Use -nofastrmic to disable it."); - continue; - } - - if (arg.equals("-nofastrmic")) { - argn++; - gp.setFastRmicEnabled(false); - continue; - } - - gp.setInputFilename(args[argn]); - } - - // Usage ? - if (gp.isHelp()) { - usage(); - return; - } - - // Check args - if (error || (gp.getInputFilename() == null)) { - usage(); - throw new RuntimeException(); - } - // The -d option is deprecated since JOnAS 3.0.7 when the file input is an ejb-jar - // Instead, the output directory must be a temporary directory to make easier - // the ejb-jar updated. - if ((gp.getOutputDirectory() != null) && gp.isAddInJar() && gp.getInputFilename().endsWith(".jar")) { - logger.log(BasicLevel.WARN, "The -d '" + gp.getOutputDirectory() + "' option is ignored" + " (deprecated with an ejb-jar as input file)"); - } - - if (gp.getOutputDirectory() == null) { - gp.setOutputDirectory(""); - } - - // Build the array of protocols name - gp.setProtocols(new Protocols(protocolNames, true)); - - if (gp.getProtocols().isSupported(Protocols.RMI_IIOP)) { - // Disable fastrmic when iiop is found - gp.setFastRmicEnabled(false); - - String classpathParam = gp.getClasspathParam(); - - // Add client.jar file to classpath - String jonasRoot = System.getProperty("jonas.root"); - File clientFile = new File(jonasRoot, "lib" + File.separator + "client.jar"); - - if (clientFile.exists()) { - try { - classpathParam += File.pathSeparator + clientFile.toURL().getPath(); - gp.setClasspathParam(classpathParam); - } catch (MalformedURLException e) { - logger.log(BasicLevel.WARN, "Cannot add client.jar to GenIC classpath."); - } - } - } - - // In case of ejb-jar file, the dirOutputName must be initialized with a - // tempo. directory. - if (gp.getInputFilename().endsWith(".jar") && gp.isAddInJar()) { - try { - gp.setOutputDirectory(GenIC.createTempDir()); - } catch (IOException ioe) { - GenIC.fatalError(ioe); - } - } - - // Init the classpath used for javac, rmic - String classpath = ""; - ClassLoader threadContextClassLoader = Thread.currentThread().getContextClassLoader(); - if (threadContextClassLoader instanceof JClassLoader) { - classpath = ((JClassLoader) threadContextClassLoader).getClassPath(); - } - - if (gp.getInputFilename().endsWith(".jar")) { - // Move the input file to avoid jar locking - File in = new File(gp.getInputFilename()); - - // Only copy the jar file when it's a regular file - if (in.isFile()) { - File out = new File(gp.getWorkingFilename()); - - if (out.exists() && !out.delete()) { - String deleteError = "Cannot delete existant working copy '" + out + "'"; - fatalError(deleteError, new IOException(deleteError)); - } - - try { - FileUtils.copyFile(in, out); - } catch (FileUtilsException e) { - fatalError("Cannot copy input File from '" + gp.getInputFilename() - + "' to '" + gp.getWorkingFilename() + "'", - new IOException(gp.getInputFilename())); - } - - classpath = out.getPath() + File.pathSeparator + classpath; - } - } - if (!"".equals(gp.getOutputDirectory())) { - classpath = gp.getOutputDirectory() + File.pathSeparator + classpath; - } - // add -classpath value - if (gp.getClasspathParam() != null) { - classpath = gp.getClasspathParam() + File.pathSeparator + classpath; - } - // use the new classpath - gp.setClasspathParam(classpath); - - // Set the parsing mode (with or without validation) - if (!gp.isParseWithValidation()) { - EjbDeploymentDescManager.setParsingWithValidation(false); - } - - - // Add into META_INF/MANIFEST jonas information for auto-generation functionality - if (gp.getInputFilename().endsWith(".jar") && gp.isAddInJar()) { - // Update attributes if not up-to-date - Map attributes = new HashMap(); - attributes.put("Genic-Jonas-Version", Version.getNumber()); - attributes.put("Genic-Jonas-protocols", gp.getProtocols().list()); - try { - String filename = null; - if (new File(gp.getInputFilename()).isFile()) { - filename = gp.getWorkingFilename(); - } else { - // directory - filename = gp.getInputFilename(); - } - - FileUtils.updateAttributesInManifest(filename, attributes); - } catch (FileUtilsException e) { - GenIC.fatalError(e); - } - } else if (gp.getOutputDirectory() != null && !gp.isAddInJar()) { - // case of GenIC called by ant task - // noaddinjar = true && -d specified we must add manifest into the directory output - Manifest mf = new Manifest(); - Attributes attributes = mf.getMainAttributes(); - attributes.putValue("Genic-Jonas-Version", Version.getNumber()); - attributes.putValue("Genic-Jonas-protocols", gp.getProtocols().list()); - try { - createManifest(gp.getOutputDirectory(), mf); - } catch (GenICException e) { - GenIC.fatalError(e); - } - } - - // Generates the classes for the set of the beans - ClassLoader loader = null; - try { - DeploymentDesc ejbJarDD = null; - if (gp.getInputFilename().endsWith(".jar")) { - // ejb-jar file/directory - File input = new File(gp.getInputFilename()); - String filename = null; - if (input.isFile()) { - filename = gp.getWorkingFilename(); - } else { - // directory - filename = gp.getInputFilename(); - } - URL[] url = new URL[1]; - url[0] = new File(filename).toURI().toURL(); - JClassLoader cl = new JClassLoader("GenIC-" + gp.getOriginalFilename(), url, threadContextClassLoader); - if (gp.getClasspathParam() != null) { - // add -classpath value inside ClassLoader - addClasspath(cl, gp.getClasspathParam()); - } - ejbJarDD = EjbDeploymentDescManager.getDeploymentDesc(filename, cl); - loader = cl; - cl = null; - } else { - // xml file - ejbJarDD = EjbDeploymentDescManager.getDeploymentDesc( - gp.getOriginalFilename(), - BeanNaming.getJonasXmlName(gp.getOriginalFilename()), - BeanNaming.getParentName(gp.getOriginalFilename())); - } - - GenIC gwc = new GenIC(ejbJarDD, gp); - - - if (gp.isCompil()) { - gwc.compilClasses(classpath, loader); - - // Reset the beans deployment descriptors to unload the beans - // classes - // (loaded from the ejb-jar when creating the - // jonas_ejb.deployment.api.BeanDesc), - // to be able to update the ejb-jar file on Windows. - // See Bug #270 - ejbJarDD = null; - loader = null; - - // Garbage Collect - System.gc(); - - if (gp.getInputFilename().endsWith(".jar") && gp.isAddInJar()) { - gwc.addClassesInJar(); - } - if (!gp.isKeepGenerated()) { - gwc.clean(); - } - } - - } catch (MalformedURLException e) { - GenIC.fatalError("Invalid ejb-jar file name : ", e); - } catch (GenICException e) { - GenIC.fatalError(e); - } catch (DeploymentDescException e) { - GenIC.fatalError("Cannot read the Deployment Descriptors from " + gp.getInputFilename() + ": ", e); - } - // End - } - - /** - * Create Manifest file with name/value. - * @param dirOutputName : output file - * @param manifest : The manifest file to write - * @throws GenICException if manifest is not created. - */ - private static void createManifest(final String dirOutputName, final Manifest manifest) throws GenICException { - - // Ensure that there is the MANIFEST_VERSION - Attributes mainAttributes = manifest.getMainAttributes(); - mainAttributes.putValue("Manifest-Version" , "1.0"); - - File fileOutput = new File(dirOutputName, META_DIR); - - if (!fileOutput.exists()) { - fileOutput.mkdirs(); - } - if (!fileOutput.exists()) { - throw new GenICException("Cannot create META-INF directory into temp dir : " + dirOutputName + "/META-INF"); - } - - fileOutput = new File(dirOutputName, MANIFEST_PATH); - if (!fileOutput.exists()) { - try { - fileOutput.createNewFile(); - } catch (IOException e) { - throw new GenICException("Cannot create '" + fileOutput + "' file", e); - } - } - if (!fileOutput.exists()) { - throw new GenICException("Cannot create manifest.mf file into " + dirOutputName + File.separator + "META-INF"); - } - OutputStream os = null; - try { - os = new FileOutputStream(fileOutput); - manifest.write(os); - } catch (FileNotFoundException e) { - throw new GenICException("Cannot write manifest.mf file", e); - } catch (IOException e) { - throw new GenICException("Cannot write manifest.mf file", e); - } finally { - if (os != null) { - try { - os.close(); - } catch (IOException e) { - logger.log(BasicLevel.WARN, "Cannot close the outputstream", e); - } - } - } - } - - /** - * Add To the given ClassLoader the given classpath. - * @param cl ClassLoader to be updated - * @param classpath the classpath to add inside the ClassLoader - * @throws GenICException When classpath contains invalid URL - */ - private static void addClasspath(final JClassLoader cl, - final String classpath) throws GenICException { - String[] elems = classpath.split(File.pathSeparator); - for (int i = 0; i < elems.length; i++) { - try { - cl.addURL(new File(elems[i]).toURL()); - } catch (MalformedURLException e) { - throw new GenICException("Cannot create URL from '" + elems[i] + "'", e); - } - } - } - - /** - * GenIC Constructor: generates the container classes sources of each beans. - * @param ejbJarDesc deployment descriptors of the beans - * @param gp GenIC parameters - * @throws GenICException In error case - */ - public GenIC(final DeploymentDesc ejbJarDesc, - final GenICParameters gp) throws GenICException { - - // JORM Meta Information - RdbMappingBuilder rdbMapping = null; - - // A BeanSources for each bean - ArrayList beanList = new ArrayList(); - this.gp = gp; - - verbose = gp.isVerbose(); - - if (javaHomeBin == null) { - javaHomeBin = System.getProperty("java.home", ""); - if (!("".equals(javaHomeBin))) { - if (Env.isOsMacOsX()) { - javaHomeBin = javaHomeBin + File.separator + "bin" + File.separator; - } else { - javaHomeBin = javaHomeBin + File.separator + ".." + File.separator + "bin" + File.separator; - } - } - } - outputdir = gp.getOutputDirectory(); - try { - canonicalOutputdir = new File(outputdir).getCanonicalFile().getPath(); - } catch (IOException e) { - throw new GenICException("Cannot get cannonical name of the output directory", e); - } - filesToDelete = new ArrayList(); - remoteJavas = new ArrayList(); - noRemoteJavas = new ArrayList(); - remoteClasses = new ArrayList(); - BeanDesc[] beansDD = ejbJarDesc.getBeanDesc(); - JormCompiler jormCompiler = null; - Manager mgr = null; - VelocityEngine ve = allocateVelocityEngine(); - // Display the bean's names - StringBuffer message = new StringBuffer(); - message.append("GenIC for JOnAS " + Version.getNumber() + ": "); - String sep = ""; - for (int i = 0; i < beansDD.length; i++) { - - if ((beansDD[i] instanceof MessageDrivenDesc)) { - //Nothing to generate in case of MessageDriven Bean - continue; - } - if (beansDD[i] instanceof EntityCmp2Desc) { - if (jormCompiler == null) { - // Load the jorm meta information of the class - // when we encounter the first CMP2 bean. - try { - DeploymentDescEjb2 dd2 = (DeploymentDescEjb2) ejbJarDesc; - - rdbMapping = new RdbMappingBuilder(dd2); - mgr = rdbMapping.getJormMIManager(); - jormCompiler = allocateJormCompiler(mgr); - } catch (DeploymentDescException e) { - throw new GenICException("Impossible to load jorm meta information", e); - } - } - } - BeanSources bs = new BeanSources(beansDD[i], gp, ve); - bs.init(jormCompiler, mgr); - beanList.add(bs); - //compute message - message.append(sep); - sep = ", "; - message.append("'"); - message.append(bs.getEjbName()); - message.append("'"); - } - generatedIC = !beanList.isEmpty(); - if (generatedIC) { - message.append(" generation ..."); - } else { - message.append("No generation to do (only message driven beans)"); - } - logger.log(BasicLevel.INFO, message.toString()); - - // Generates the sources of the container classes of the beans - // and Init the lists of the remote/non-remote java sources and the - // remote classes - for (Iterator it = beanList.iterator(); it.hasNext();) { - BeanSources ics = (BeanSources) it.next(); - // Generate sources for all beans - ics.generate(); - // Call Jorm Generator for CMP2 beans - if (rdbMapping != null) { - CMP2Bean cmp2 = rdbMapping.getCmp2Bean(ics.getEjbName()); - if (cmp2 != null) { - ics.jormCompile(cmp2.getJormList()); - } - } - String cchfn = ics.getWrpHomeClusterFileName(); - if (cchfn != null) { - filesToDelete.add(cchfn); - } - String ccrfn = ics.getWrpRemoteClusterFileName(); - if (ccrfn != null) { - filesToDelete.add(ccrfn); - } - logger.log(BasicLevel.INFO, "Sources classes successfully generated" + " for '" + ics.getEjbName() + "'"); - noRemoteJavas.addAll(ics.getNoRemoteJavas()); - if (ics.getWrpHomeFileName() != null) { - remoteJavas.add(ics.getWrpHomeFileName()); - remoteClasses.add(ics.getWrpHomeClassName()); - } - if (ics.getWrpRemoteFileName() != null) { - remoteJavas.add(ics.getWrpRemoteFileName()); - remoteClasses.add(ics.getWrpRemoteClassName()); - } - if (ics.getWrpServiceEndpointFileName() != null) { - remoteJavas.add(ics.getWrpServiceEndpointFileName()); - remoteClasses.add(ics.getWrpServiceEndpointClassName()); - } - } - jormCompiler = null; - rdbMapping = null; - - } - - /** - * Allocate and configure a JORM compiler. - * @param miManager the JORM Meta-Information manager - * @return a JORM compiler - */ - private JormCompiler allocateJormCompiler(final Manager miManager) { - // Allocate and configure a Jorm Compiler - JormCompiler jormCompiler = new JormCompiler(); - JormCompilerConfigurator jcc = jormCompiler.getCompilerConfigurator(); - Properties prop = new Properties(); - prop.put("jorm.generator", "org.objectweb.jorm.generator.lib.JormGenerator"); - prop.put("jorm.mimanager", "org.objectweb.jorm.metainfo.lib.JormManager"); - prop.put("jorm.writer", "org.objectweb.jorm.mi2xml.lib.BasicDomWriter"); - prop.put("jorm.mapper.list", "rdb"); - prop.put("jorm.mapper.mifactory.rdb", "org.objectweb.jorm.mapper.rdb.metainfo.RdbMappingFactory"); - prop.put("jorm.mapper.mopfactory.rdb", "org.objectweb.jorm.mapper.rdb.generator.RdbMOPFactory"); - prop.put("jorm.mapper.gcmapping.rdb", "org.objectweb.jorm.mapper.rdb.genclass.RdbGenClassMapping"); - prop.put("jorm.mapper.schmgr.rdb", "org.objectweb.jorm.mapper.rdb.lib.RdbPMappingStructuresManager"); - prop.put("jorm.mapper.writer.rdb", "org.objectweb.jorm.mapper.rdb.mi2xml.RdbDomtreeBuilder"); - prop.put("use.context.classloader", "true"); - prop.put("jorm.mapper.submappers.rdb", "generic"); - jcc.configure(prop); - jcc.setLoggerFactory(Log.getLoggerFactory()); - jormCompiler.setMIManager(miManager); - return jormCompiler; - } - - /** - * Allocate and configure a Velocity Engine. - * @return the Velocity Engine - * @throws GenICException in error case - */ - private VelocityEngine allocateVelocityEngine() throws GenICException { - - VelocityEngine ve = new VelocityEngine(); - String packageName = this.getClass().getPackage().getName(); - packageName = packageName.replace('.', '/'); - ve.setProperty(RuntimeConstants.VM_LIBRARY, packageName + "/GenICMacros.vm"); - ve.setProperty(RuntimeConstants.RESOURCE_LOADER, "class"); - ve.setProperty("class.resource.loader.class", ClasspathResourceLoader.class.getName()); - - Logger vLogger = Log.getLogger(Log.JONAS_GENIC_VELOCITY_PREFIX); - // Connect the velocity log system to monolog - ve.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM, new VelocityMonologLogger(vLogger)); - - try { - ve.init(); - } catch (Exception e) { - throw new GenICException("Cannot initialize the Velocity engine", e); - } - return ve; - } - - /** - * Compiles the java sources generated by the constructor I.e. : - *

      - *
    • compile the classes via javac, - *
    • create the stubs and skeletons for the protocols supported(RMI/JRMP, - * RMI/IIOP) via rmic - *
    - * @param classpath classpath value - * @param loader ClassLoader used for compilation of interposition classes - * @exception GenICException In error case - */ - public void compilClasses(final String classpath, - final ClassLoader loader) throws GenICException { - - Cmd jrmpCmd; - Cmd iiopCmd; - - String cmdRmic; - - if (!generatedIC) { - return; - } - - /* - * Init the command names - */ - cmdRmic = javaHomeBin + "rmic"; - - /* - * Compile the generated sources - */ - List sources = new ArrayList(); - for (Iterator it = remoteJavas.iterator(); it.hasNext();) { - String srcName = (String) it.next(); - if (srcName.contains(outputdir)) { - sources.add(srcName.substring(outputdir.length() + 1)); - } else { - sources.add(srcName.substring(canonicalOutputdir.length() + 1)); - } - filesToDelete.add(srcName); - } - for (Iterator it = noRemoteJavas.iterator(); it.hasNext();) { - String srcName = (String) it.next(); - if (srcName.contains(outputdir)) { - sources.add(srcName.substring(outputdir.length() + 1)); - } else { - sources.add(srcName.substring(canonicalOutputdir.length() + 1)); - } - filesToDelete.add(srcName); - } - - File out = new File(outputdir); - - // Init the compilation context - CompilationContext context = new CompilationContext(); - context.setContextualClassLoader(loader); - context.setOutputDirectory(out); - context.setSourceDirectory(out); - context.setSources(sources); - - // Compile - JOnASCompiler compiler = new JOnASCompiler(context); - - logger.log(BasicLevel.INFO, "Compiling Interposition classes ..."); - List errors = compiler.compile(); - if (errors.isEmpty()) { - logger.log(BasicLevel.INFO, "Sources classes successfully compiled with Eclipse compiler."); - } else { - for (CompilerError error : errors) { - logger.log(BasicLevel.ERROR, error.toString()); - } - throw new GenICException("Failed when compiling the generated classes"); - } - - if (remoteJavas.size() == 0) { - return; - } - - /* - * Generate the stub and skeletons of the home and remote implementations - */ - - if (!new File(cmdRmic).exists()) { - // Maybe this is on windows - if (!new File(cmdRmic + ".exe").exists()) { - logger.log(BasicLevel.INFO, "No rmic command was found at '" + cmdRmic - + "'. Check that you are using a JDK and not a JRE."); - } - } - jrmpCmd = new Cmd(cmdRmic, gp.isInvokeCmd()); - jrmpCmd.addArgument("-classpath"); - jrmpCmd.addArgument(classpath); - //jrmpCmd.addArgument("-verbose"); - - iiopCmd = new Cmd(cmdRmic, gp.isInvokeCmd()); - iiopCmd.addArgument("-classpath"); - iiopCmd.addArgument(classpath); - iiopCmd.addArgument("-iiop"); - iiopCmd.addArgument("-poa"); - iiopCmd.addArgument("-always"); - - if (!"".equals(outputdir)) { - jrmpCmd.addArgument("-d"); - jrmpCmd.addArgument(outputdir); - iiopCmd.addArgument("-d"); - iiopCmd.addArgument(outputdir); - } - - jrmpCmd.addArguments(gp.getRmicOptions()); - iiopCmd.addArguments(gp.getRmicOptions()); - - for (Iterator it = remoteClasses.iterator(); it.hasNext();) { - String className = (String) it.next(); - jrmpCmd.addArgument(className); - iiopCmd.addArgument(className); - } - - // Use fast rmic, if there are failures, fallback to rmic - if (gp.getProtocols().isSupported(Protocols.RMI_JRMP) && gp.isFastRmicEnabled()) { - ArrayList args = new ArrayList(); - boolean skip = true; - for (Iterator it = jrmpCmd.getCommandLine(); it.hasNext();) { - Object o = it.next(); - if (skip) { - skip = false; - continue; - } - args.add(o); - } - - String[] a = (String[]) args.toArray(new String[] {}); - Method m = null; - try { - Class c = Class.forName("org.ow2.fastrmic.RMIC"); - m = c.getMethod("main", new Class[] {String[].class}); - } catch (ClassNotFoundException cnfe) { - logger.log(BasicLevel.ERROR, - "continuing after class not found ", cnfe); - gp.setFastRmicEnabled(false); - } catch (NoSuchMethodException nsme) { - logger.log(BasicLevel.ERROR, - "continuing after no such method ", nsme); - gp.setFastRmicEnabled(false); - } - - if (m != null) { - logger.log(BasicLevel.INFO, "Running fastrmic"); - try { - m.invoke(null, new Object[] {a}); - // Call to the GC for bug (#303750) - // fastRMIC load classes of the jar, then there is a lock on the file until the GC is called. - System.gc(); - } catch (IllegalAccessException iae) { - logger.log(BasicLevel.ERROR, "continuing after illegal access", iae); - gp.setFastRmicEnabled(false); - } catch (InvocationTargetException ite) { - throw new GenICException("error in fastrmic", ite); - } - logger.log(BasicLevel.INFO, "Stubs and Skels successfully generated with fastrmic for rmi/jrmp"); - } - } - - if (gp.getProtocols().isSupported(Protocols.RMI_JRMP) && !gp.isFastRmicEnabled()) { - logger.log(BasicLevel.INFO, "Running '" + jrmpCmd.toString() + "'"); - if (jrmpCmd.run()) { - logger.log(BasicLevel.INFO, "Stubs and Skels successfully generated for rmi/jrmp"); - } else { - throw new GenICException("Failed when generating the Stubs and Skels with rmic jrmp"); - } - } - - if (gp.getProtocols().isSupported(Protocols.RMI_IIOP)) { - logger.log(BasicLevel.INFO, "Running '" + iiopCmd.toString() + "'"); - if (iiopCmd.run()) { - logger.log(BasicLevel.INFO, "Stubs and Skels successfully generated for rmi/iiop"); - } else { - throw new GenICException("Failed when generating the Stubs and Skels with rmic iiop"); - } - - } - } - - /** - * Add the generated classes in the given ejb-jar file. - * @throws GenICException if the classes cannot be added in the jar file - */ - public void addClassesInJar() throws GenICException { - - if (!generatedIC) { - // Place back the working copy - File wc = new File(gp.getWorkingFilename()); - File original = new File(gp.getOriginalFilename()); - wc.renameTo(original); - return; - } - - filesToDelete.add(outputdir); - - ArrayList lf = new ArrayList(); - getFilesList(outputdir, lf, !gp.isKeepGenerated()); - - updateJar(lf); - - } - - /** - * Convert a name from any format in Jar filename format. - * @param name filename to be converted - * @return converted filename - */ - protected String convertName(final String name) { - return name.replace('\\', '/'); - } - - /** - * Add some classes in an existing jar file via the java.util.jar api. - * @param lfn list of filenames to add - * @throws GenICException if the classes cannot be added - */ - private void updateJar(final List lfn) - throws GenICException { - - File target = new File(gp.getOriginalFilename()); - - int is = outputdir.length() + 1; - - if (target.isFile()) { - // The original file is a jar, so we need to update a jar - File workingCopy = null; - JarFile wcJarArchive = null; - JarOutputStream finalJarArchive = null; - - // Directly create the final jar as we already have moved - // the original file into a temporary working copy - - try { - workingCopy = new File(gp.getWorkingFilename()); - - // open existing jar file - wcJarArchive = new JarFile(workingCopy); - - // create final jar - finalJarArchive = new JarOutputStream(new FileOutputStream(target)); - - byte[] buffer = new byte[BUFFER_SIZE]; - int read = 0; - - // Add all generated files to the final jar - FileInputStream file = null; - Iterator iterFiles = lfn.iterator(); - while (iterFiles.hasNext()) { - try { - String fileName = (String) iterFiles.next(); - - file = new FileInputStream(fileName); - JarEntry entry = new JarEntry(convertName(fileName.substring(is))); - finalJarArchive.putNextEntry(entry); - // contents - while ((read = file.read(buffer)) != -1) { - finalJarArchive.write(buffer, 0, read); - } - } finally { - file.close(); - } - } - - // Add the rest of files (except if already included) - Enumeration ents = wcJarArchive.entries(); - while (ents.hasMoreElements()) { - JarEntry entry = (JarEntry) ents.nextElement(); - // add only if there is no newer version already included - // In Windows we must replace / by \ for a correct path - if (!lfn.contains(outputdir + File.separator + entry.getName().replace('/', File.separatorChar))) { - InputStream enStream = wcJarArchive.getInputStream(entry); - // If the initial compression level is not the same as the - // target's, the compressed size will change. Therefore, - // ignore initial compressed size. - entry.setCompressedSize(-1); - finalJarArchive.putNextEntry(entry); - // contents - while ((read = enStream.read(buffer)) != -1) { - finalJarArchive.write(buffer, 0, read); - } - enStream.close(); - enStream = null; - } - } - - } catch (Exception e) { - throw new GenICException("Failed when adding the generated classes " - + "in the given ejb-jar file '" + gp.getOriginalFilename(), e); - } finally { - // close jar archives - try { - wcJarArchive.close(); - } catch (IOException ioe) { - logger.log(BasicLevel.WARN, "Failed to close jar archive file '" + wcJarArchive.getName() + "': " - + ioe.getMessage()); - } - wcJarArchive = null; - try { - finalJarArchive.close(); - } catch (IOException ioe) { - logger.log(BasicLevel.WARN, "Failed to close temporary jar archive file '" + wcJarArchive.getName() + "': " - + ioe.getMessage()); - } - finalJarArchive = null; - } - - // Remove the working copy - if (!workingCopy.delete()) { - logger.log(BasicLevel.WARN, "Failed to delete working copy jar archive file '" + workingCopy + "'"); - } - } else { - // the original is a directory, so we simply place the generated - // classes at the appropriate place. - - Iterator iterFiles = lfn.iterator(); - try { - while (iterFiles.hasNext()) { - String fileName = (String) iterFiles.next(); - // Remove the generation directory name of the filename - String partialFileName = fileName.substring(is); - - // Construct any missing parent directory - File targetFile = new File(target, partialFileName); - File parent = targetFile.getParentFile(); - if (!parent.exists()) { - parent.mkdirs(); - } - - FileUtils.copyFile(new File(fileName), targetFile); - } - } catch (FileUtilsException e) { - throw new GenICException("Cannot update original directory '" + target - + "' with generated classes", e); - } - - } - - } - - /** - * Clean the intermediate generated files. - */ - public void clean() { - logger.log(BasicLevel.DEBUG, "Deleting " + filesToDelete.toString()); - for (Iterator it = filesToDelete.iterator(); it.hasNext();) { - String name = (String) it.next(); - File f = new File(name); - delete(f); - } - } - - /** - * Delete a file or directory recursively. - * @param f file or directory to be deleted - * @return true if deletion ok, false otherwise. - */ - private boolean delete(final File f) { - if (f.isFile()) { - return f.delete(); - } else { - File[] childs = f.listFiles(); - if (childs == null) { - // no childs - return f.delete(); - } else { - // childs - boolean result = true; - for (int i = 0; i < childs.length; i++) { - result &= delete(childs[i]); - } - return result && f.delete(); - } - } - } - - /** - * Display the usage. - */ - static void usage() { - StringBuffer msg = new StringBuffer(); - msg.append("Usage: java org.ow2.jonas.generators.genic.GenIC -help \n"); - msg.append(" to print this help message \n"); - msg.append(" or java org.ow2.jonas.generators.genic.GenIC \n"); - msg.append(" to generate the container-specific classes for given EJB(s). \n"); - msg.append(" \n"); - msg.append("Options include: \n"); - msg.append(" -d specify where to place the generated files \n"); - msg.append(" -noaddinjar do not add the generated classes in the given \n"); - msg.append(" ejb-jar file \n"); - msg.append(" -nocompil do not compile the generated source files via \n"); - msg.append(" the java and rmi compilers \n"); - msg.append(" -novalidation parse the XML deployment descriptors without \n"); - msg.append(" validation \n"); - msg.append(" -classpath define the classpath to be used to compile classes \n"); - msg.append(" -javac specify the java compiler to use \n"); - msg.append(" -javacopts specify the options to pass to the java compiler \n"); - msg.append(" -rmicopts specify the options to pass to the rmi compiler \n"); - msg.append(" -protocols list of protocol, separated by comma \n"); - msg.append(" (default is jrmp) \n"); - msg.append(" -invokecmd invoke, in some case, directly the method of the java class\n"); - msg.append(" corresponding to the command \n"); - msg.append(" -keepgenerated do not delete intermediate generated source files \n"); - msg.append(" -verbose \n"); - msg.append(" -debug deprecated (use the JOnAS trace properties file)\n"); - msg.append(" \n"); - msg.append(" Input_File standard deployment descriptor file's name or \n"); - msg.append(" ejb-jar file's name \n"); - logger.log(BasicLevel.ERROR, msg.toString()); - } - - /** - * Display the specified error message and exits with an EXIT_FAILURE - * status. - * @param msg the error message to display - * @param e the exception raised - */ - static void fatalError(final String msg, final Exception e) { - logger.log(BasicLevel.ERROR, "GenIC fatal error: " + msg + e.getMessage()); - throw new RuntimeException(msg, e); - } - - /** - * Display the specified error message and exits with an EXIT_FAILURE - * status. - * @param e the error to display - */ - static void fatalError(final Exception e) { - logger.log(BasicLevel.ERROR, "GenIC fatal error: " + e.getMessage()); - throw new RuntimeException(e.getMessage(), e); - } - - /** - * Create a cleaned temporary directory. - * @return the temp directory file name - * @throws IOException if a temp directory cannot be created. - */ - static String createTempDir() throws IOException { - File tmpDir = File.createTempFile("genic", null, null); - tmpDir.delete(); - if (!tmpDir.mkdir()) { - throw new IOException("Cannot create the temporary directory '" + tmpDir + "'."); - } - return tmpDir.getAbsolutePath(); - } - - /** - * Get the list file names recursively of the given directory. - * @param dir the directory used to list files - * @param list list to store filenames - * @param onlyClass stores only class or not ? - */ - static void getFilesList(final String dir, - final ArrayList list, - final boolean onlyClass) { - File df = new File(dir); - if (df.exists() && df.isDirectory()) { - File[] ls = df.listFiles(); - for (int i = 0; i < ls.length; i++) { - File f = ls[i]; - String fn = f.getAbsolutePath(); - if (f.isDirectory()) { - getFilesList(fn, list, onlyClass); - } else { - if (!onlyClass || fn.endsWith(".class")) { - if (!fn.endsWith(".save")) { - list.add(fn); - } - } - } - } - } - } -} diff --git a/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/GenICException.java b/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/GenICException.java deleted file mode 100644 index 457e24c049acb6d1242990f86d03ca7cb5cf3a36..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/GenICException.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.generators.genic; - -/** - * This class represents the exception that can be throwned by the GenIC tool. - * - * @author Helene Joanin : Initial developer - */ -public class GenICException extends Exception { - - protected Exception inner = null; - - /** - * Constructs an GenICException with no specified detail message. - */ - public GenICException() { - super(); - } - - /** - * Constructs an GenICException with the specified detail message. - */ - public GenICException(String msg) { - super(msg); - } - - public GenICException(String msg, Exception inner) { - super(msg); - this.inner = inner; - - } - - public String toString() { - String s = GenICException.class.getName() + ": " + super.getMessage(); - if (inner == null) { - return (s); - } else { - return (s + " (" + inner.toString() + ")"); - } - } - - public String getMessage() { - String s = super.getMessage(); - if (inner == null) { - return (s); - } else { - return (s + " (" + inner.getMessage() + ")"); - } - } - - public void printStackTrace() { - System.out.println(getMessage()); - if (inner != null) { - inner.printStackTrace(); - } - } - public void printStackTrace(java.io.PrintStream s) { - s.println(getMessage()); - if (inner != null) { - inner.printStackTrace(s); - } - } - public void printStackTrace(java.io.PrintWriter s) { - s.println(getMessage()); - if (inner != null) { - inner.printStackTrace(s); - } - } -} diff --git a/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/GenICParameters.java b/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/GenICParameters.java deleted file mode 100644 index 5a44bfa888834889ef4423a385e55c24f24d6ba0..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/GenICParameters.java +++ /dev/null @@ -1,350 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005-2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genic; - -import java.io.File; -import java.util.ArrayList; - -import org.ow2.jonas.lib.ejb21.Protocols; - - -/** - * GenIC Parameters holder. - * - * @author Guillaume Sauthier - */ -public class GenICParameters { - - /** - * Supported protocol list. - */ - private Protocols protocols = null; - - /** - * directory where files will be generated. - */ - private String outputDirectory = null; - - /** - * is verbose mode ? - */ - private boolean verbose = false; - - /** - * do not delete intermediate generated source files. - */ - private boolean keepGenerated = false; - - /** - * compile the generated source files via the java and - * rmi compilers. - */ - private boolean compil = true; - - /** - * display the help message. - */ - private boolean help = false; - - /** - * add the generated classes in the given ejb-jar - * file. - */ - private boolean addInJar = true; - - /** - * parse the XML deployment descriptors with - * validation. - */ - private boolean parseWithValidation = true; - - /** - * invoke, in some case, directly the method of the java - * class corresponding to the command. - */ - private boolean invokeCmd = false; - - /** - * use fastRMIC compiler. - */ - private boolean fastRmicEnabled = true; - - /** - * file name of the standard deployment descriptor (.xml ended), - * or file name of the EJB-jar (.jar ended). - */ - private String inputFilename = null; - - /** - * name of the java compiler to use. - */ - private String javacName = null; - - /** - * options to pass to the java compiler. - */ - private ArrayList javacOptions = new ArrayList(); - - /** - * options to pass to the rmi compiler. - */ - private ArrayList rmicOptions = new ArrayList(); - - /** - * define the classpath to be used to compile classes. - */ - private String classpathParam = null; - - /** - * Generated working copy file. - */ - private String workingFilename = null; - - /** - * @return Returns the outputDirectory. - */ - public String getOutputDirectory() { - return outputDirectory; - } - - /** - * @param outputDirectory The outputDirectory to set. - */ - public void setOutputDirectory(final String outputDirectory) { - this.outputDirectory = outputDirectory; - } - - /** - * @return Returns the protocols. - */ - public Protocols getProtocols() { - return protocols; - } - - /** - * @param protocols The protocols to set. - */ - public void setProtocols(final Protocols protocols) { - this.protocols = protocols; - } - - /** - * @return Returns the verbose. - */ - public boolean isVerbose() { - return verbose; - } - - /** - * @param verbose The verbose to set. - */ - public void setVerbose(final boolean verbose) { - this.verbose = verbose; - } - - /** - * @return Returns the addInJar. - */ - public boolean isAddInJar() { - return addInJar; - } - - /** - * @param addInJar The addInJar to set. - */ - public void setAddInJar(final boolean addInJar) { - this.addInJar = addInJar; - } - - /** - * @return Returns the classpathParam. - */ - public String getClasspathParam() { - return classpathParam; - } - - /** - * @param classpathParam The classpathParam to set. - */ - public void setClasspathParam(final String classpathParam) { - this.classpathParam = classpathParam; - } - - /** - * @return Returns the compil. - */ - public boolean isCompil() { - return compil; - } - - /** - * @param compil The compil to set. - */ - public void setCompil(final boolean compil) { - this.compil = compil; - } - - /** - * @return Returns the fastRmicEnabled. - */ - public boolean isFastRmicEnabled() { - return fastRmicEnabled; - } - - /** - * @param fastRmicEnabled The fastRmicEnabled to set. - */ - public void setFastRmicEnabled(final boolean fastRmicEnabled) { - this.fastRmicEnabled = fastRmicEnabled; - } - - /** - * @return Returns the help. - */ - public boolean isHelp() { - return help; - } - - /** - * @param help The help to set. - */ - public void setHelp(final boolean help) { - this.help = help; - } - - /** - * @return Returns the inputFilename. - */ - public String getInputFilename() { - return inputFilename; - } - - /** - * @param inputFilename The inputFilename to set. - */ - public void setInputFilename(final String inputFilename) { - this.inputFilename = inputFilename; - } - - /** - * @return Returns the original (unchanged) inputFilename. - */ - public String getOriginalFilename() { - return inputFilename; - } - - /** - * @return Returns the working copy inputFilename. - */ - public String getWorkingFilename() { - - // Only do that once - if (workingFilename == null) { - - // prepend an almost unique prefix to the original filename - File input = new File(inputFilename); - String filename = input.getName(); - File parent = input.getParentFile(); - - File out = new File(parent, "GenICWorkingCopyJar-" + filename); - - workingFilename = out.getPath(); - } - return workingFilename; - } - - /** - * @return Returns the invokeCmd. - */ - public boolean isInvokeCmd() { - return invokeCmd; - } - - /** - * @param invokeCmd The invokeCmd to set. - */ - public void setInvokeCmd(final boolean invokeCmd) { - this.invokeCmd = invokeCmd; - } - - /** - * @return Returns the javacName. - */ - public String getJavacName() { - return javacName; - } - - /** - * @param javacName The javacName to set. - */ - public void setJavacName(final String javacName) { - this.javacName = javacName; - } - - /** - * @return Returns the keepGenerated. - */ - public boolean isKeepGenerated() { - return keepGenerated; - } - - /** - * @param keepGenerated The keepGenerated to set. - */ - public void setKeepGenerated(final boolean keepGenerated) { - this.keepGenerated = keepGenerated; - } - - /** - * @return Returns the parseWithValidation. - */ - public boolean isParseWithValidation() { - return parseWithValidation; - } - - /** - * @param parseWithValidation The parseWithValidation to set. - */ - public void setParseWithValidation(final boolean parseWithValidation) { - this.parseWithValidation = parseWithValidation; - } - - /** - * @return Returns the javacOptions. - */ - public ArrayList getJavacOptions() { - return javacOptions; - } - - /** - * @return Returns the rmicOptions. - */ - public ArrayList getRmicOptions() { - return rmicOptions; - } - - -} diff --git a/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/Source.java b/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/Source.java deleted file mode 100644 index 40fab1b4abfd6e13bd44acbbbb386a1b4d730adc..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/Source.java +++ /dev/null @@ -1,276 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2006 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genic; - -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; - -import org.ow2.jonas.deployment.ejb.BeanDesc; -import org.ow2.jonas.deployment.ejb.EntityDesc; -import org.ow2.jonas.deployment.ejb.EntityJdbcCmp1Desc; -import org.ow2.jonas.deployment.ejb.EntityJdbcCmp2Desc; -import org.ow2.jonas.deployment.ejb.SessionStatefulDesc; -import org.ow2.jonas.deployment.ejb.SessionStatelessDesc; -import org.ow2.jonas.lib.util.Log; - -import org.apache.velocity.Template; -import org.apache.velocity.VelocityContext; -import org.apache.velocity.app.VelocityEngine; - -import org.objectweb.jorm.metainfo.api.Manager; - -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; - -/** - * This class allows to generate the source of : the class that implements the - * Enterprise bean's remote interface, the class that implements the Enterprise - * bean's home interface, the class that implements the Enterprise bean's local - * interface, the class that implements the Enterprise bean's localhome - * interface, the class of the Entity Handle in case of entity, or the extended - * class of the Bean for persistence in case of entity with CMP, via a Velocity - * template of the given Enterprise Java Bean. - * @author Helene Joanin : Initial developer - */ -class Source { - - /** - * home source - */ - static final int HOME = 0; - /** - * local home source - */ - static final int LOCAL_HOME = 1; - /** - * remote source - */ - static final int REMOTE = 2; - /** - * local source - */ - static final int LOCAL = 3; - /** - * entity handle source - */ - static final int ENTITY_HANDLE = 4; - /** - * CMP1 or CMP2 entity bean source - */ - static final int ENTITY_CMP_JDBC = 5; - /** - * interface coherence source for CMP2 entity - */ - static final int ITF_COH_CMP2_ENTITY = 7; - - /** - * service endpoint source - */ - static final int SERVICE_ENDPOINT = 9; - - /** - * service endpoint home source - */ - static final int SERVICE_ENDPOINT_HOME = 10; - - /** - * Bean Deployment Description - */ - private BeanDesc dd = null; - - /** - * Name of the generated source file - */ - private String srcFileName = null; - - /** - * Generated source file type - */ - private int srcType; - - /** - * Velocity engine - */ - private VelocityEngine vEngine = null; - - /** - * Velocity context - */ - private VelocityContext vctx = null; - - /** - * logger - */ - private Logger logger = null; - - /** - * Source Constructor - * @param beanDesc deployment descriptor of the bean - * @param fileName name of the source file to generate - * @param type source's type (HOME, LOCAL_HOME, REMOTE, ...) - * @param ve Velocity engine to use - * @exception GenICException In error case - */ - Source(BeanDesc beanDesc, String fileName, int type, VelocityEngine ve, Manager mgr) throws GenICException { - dd = beanDesc; - srcFileName = fileName; - srcType = type; - vctx = VContextFactory.create(dd, srcType, mgr); - vEngine = ve; - logger = Log.getLogger(Log.JONAS_GENIC_PREFIX); - // Trace of the Velocity Context - Logger vLogger = Log.getLogger(Log.JONAS_GENIC_VELOCITY_PREFIX); - if (vLogger.getCurrentIntLevel() == BasicLevel.DEBUG) { - vLogger.log(BasicLevel.DEBUG, "Source(..,fileName=" + fileName + ", type = " + type + ", ..)"); - vLogger.log(BasicLevel.DEBUG, "VELOCITY CONTEXT = \n(" + VContextFactory.toString(vctx) + "\n)"); - } - } - - /** - * Generates the java source - * @throws GenICException in error case - */ - void generate() throws GenICException { - - String tmplName = null; - Template tmpl = null; - FileWriter fwriter = null; - - switch (srcType) { - case HOME: - if (dd instanceof EntityDesc) { - tmplName = "JEntityHome.vm"; - } else if (dd instanceof SessionStatefulDesc) { - tmplName = "JStatefulHome.vm"; - } else if (dd instanceof SessionStatelessDesc) { - tmplName = "JStatelessHome.vm"; - } - break; - case LOCAL_HOME: - if (dd instanceof EntityDesc) { - tmplName = "JEntityLocalHome.vm"; - } else if (dd instanceof SessionStatefulDesc) { - tmplName = "JStatefulLocalHome.vm"; - } else if (dd instanceof SessionStatelessDesc) { - tmplName = "JStatelessLocalHome.vm"; - } - break; - case REMOTE: - if (dd instanceof EntityDesc) { - tmplName = "JEntityRemote.vm"; - } else if (dd instanceof SessionStatefulDesc) { - tmplName = "JStatefulRemote.vm"; - } else if (dd instanceof SessionStatelessDesc) { - tmplName = "JStatelessRemote.vm"; - } - break; - case LOCAL: - if (dd instanceof EntityDesc) { - tmplName = "JEntityLocal.vm"; - } else if (dd instanceof SessionStatefulDesc) { - tmplName = "JStatefulLocal.vm"; - } else if (dd instanceof SessionStatelessDesc) { - tmplName = "JStatelessLocal.vm"; - } - break; - case SERVICE_ENDPOINT: - if (dd instanceof SessionStatelessDesc) { - tmplName = "JServiceEndpoint.vm"; - } - break; - case SERVICE_ENDPOINT_HOME: - if (dd instanceof SessionStatelessDesc) { - tmplName = "JServiceEndpointHome.vm"; - } - break; - case ENTITY_HANDLE: - if (dd instanceof EntityDesc) { - tmplName = "JEntityHandle.vm"; - } - break; - case ENTITY_CMP_JDBC: - if (dd instanceof EntityJdbcCmp1Desc) { - tmplName = "JEntityCmpJdbc.vm"; - } - if (dd instanceof EntityJdbcCmp2Desc) { - tmplName = "JEntityCmp2.vm"; - } - break; - case ITF_COH_CMP2_ENTITY: - if (dd instanceof EntityJdbcCmp2Desc) { - tmplName = "JEntityCmp2CoherenceItf.vm"; - } - break; - default: - break; - } - if (tmplName == null) { - throw new GenICException("No template for '" + srcFileName + " !!!'"); - } - - String name = null; - try { - // must add the package name - name = this.getClass().getPackage().getName().replace('.', '/') + "/" + tmplName; - tmpl = vEngine.getTemplate(name); - } catch (Exception e) { - throw new GenICException("Cannot get " + name, e); - } - - try { - // Create before the parent directory - File fs = new File(srcFileName); - File fdir = fs.getParentFile(); - if (fdir != null) { - if (!fdir.exists()) { - if (!fdir.mkdirs()) { - throw new IOException("Cannot create the directory '" + fdir.getPath() + "'"); - } - } - } - fwriter = new FileWriter(srcFileName); - } catch (IOException e) { - e.printStackTrace(); - throw new GenICException("Cannot create the '" + srcFileName + "' source file", e); - } - logger.log(BasicLevel.DEBUG, "Generate the file " + srcFileName); - try { - tmpl.merge(vctx, fwriter); - } catch (Exception e) { - throw new GenICException("Cannot generate the '" + srcFileName + "' source from the '" + tmplName - + "' template", e); - } - - try { - fwriter.flush(); - fwriter.close(); - } catch (IOException e) { - throw new GenICException("Cannot close the '" + srcFileName + "' source file", e); - } - } - -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/VContextFactory.java b/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/VContextFactory.java deleted file mode 100644 index 9c977f880066b0554f61529b1521c9ed8c804e27..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/VContextFactory.java +++ /dev/null @@ -1,633 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genic; - -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Date; -import java.util.Hashtable; -import java.util.Iterator; -import java.util.Vector; - -import org.ow2.jonas.Version; -import org.ow2.jonas.deployment.ejb.BeanDesc; -import org.ow2.jonas.deployment.ejb.EjbRelationshipRoleDesc; -import org.ow2.jonas.deployment.ejb.EntityCmp1Desc; -import org.ow2.jonas.deployment.ejb.EntityCmp2Desc; -import org.ow2.jonas.deployment.ejb.EntityDesc; -import org.ow2.jonas.deployment.ejb.FieldDesc; -import org.ow2.jonas.deployment.ejb.SessionStatelessDesc; -import org.ow2.jonas.lib.ejb21.JavaType; -import org.ow2.jonas.lib.util.BeanNaming; - -import org.apache.velocity.VelocityContext; - - - - -import org.objectweb.jorm.metainfo.api.Manager; - - -/** - * This class allows to create the Velocity Context used to build the generated - * sources with the Velocity templates. - * - * @author: Helene Joanin (Bull) : Initial developer - */ - -public class VContextFactory { - - /** - * Creates the Velocity Context used to build the generated sources with the Velocity templates. - * There are different types of Velocity Context : - * HOME, LOCAL_HOME, REMOTE, LOCAL, ENTITY_HANDLE, ENTITY_CMP_JDBC, ... - * @see Source.java for type definitions. - * @param dd The bean Deployment Descriptor - * @param srcType the type of Velocity Context - * @return Return the Velocity Context associated to the gievn bean for the given source to generate - * @throws GenICException in error case - */ - public static VelocityContext create(BeanDesc dd, int srcType, Manager mgr) throws GenICException { - - String value = null; - VelocityContext vc = new VelocityContext(); - - vc.put("dd", dd); - vc.put("EntityCMP2", (dd instanceof EntityCmp2Desc ? Boolean.TRUE : Boolean.FALSE)); - - vc.put("jVersion", Version.getNumber()); - - if (dd.getHomeClass() != null) { - value = dd.getHomeClass().getName(); - vc.put("home", value); - } - - if (dd.getLocalHomeClass() != null) { - value = dd.getLocalHomeClass().getName(); - vc.put("localhome", value); - } - - if (dd.getRemoteClass() != null) { - value = dd.getRemoteClass().getName(); - vc.put("remote", value); - } - - if (dd.getLocalClass() != null) { - value = dd.getLocalClass().getName(); - vc.put("local", value); - } - - if (dd instanceof SessionStatelessDesc) { - SessionStatelessDesc ssd = (SessionStatelessDesc) dd; - if (ssd.getServiceEndpointClass() != null) { - value = ssd.getServiceEndpointClass().getName(); - vc.put("serviceEndpoint", value); - } - if (ssd.getFullWrpServiceEndpointName() != null) { - value = ssd.getFullWrpServiceEndpointName(); - vc.put("service-endpoint_wrp", value); - } - if (ssd.getFullWrpSEHomeName() != null) { - value = ssd.getFullWrpSEHomeName(); - vc.put("service-endpoint-home_wrp", value); - } - } - - if (dd.getFullWrpHomeName() != null) { - value = dd.getFullWrpHomeName(); - vc.put("home_wrp", value); - } - - if (dd.getFullWrpLocalHomeName() != null) { - value = dd.getFullWrpLocalHomeName(); - vc.put("localhome_wrp", value); - } - - if (dd.getFullWrpRemoteName() != null) { - value = dd.getFullWrpRemoteName(); - vc.put("remote_wrp", value); - } - - if (dd.getFullWrpLocalName() != null) { - value = dd.getFullWrpLocalName(); - vc.put("local_wrp", value); - } - - value = dd.getEjbClass().getName(); - vc.put("bean", value); - - value = dd.getFullDerivedBeanName(); - vc.put("bean_wrp", value); // Same as "bean" if not a Entity CMP - - if (dd.getFullWrpHandleName() != null) { - value = dd.getFullWrpHandleName(); - vc.put("handle", value); - } - - vc.put("isClusterReplicated", Boolean.valueOf(dd.isClusterReplicated())); - - if (dd instanceof EntityDesc) { - Class c = ((EntityDesc) dd).getPrimaryKeyClass(); - if (c.equals(Object.class)) { - // Auto key generated so convert into Integer - c = Integer.class; - } - value = c.getName(); - vc.put("pk", value); - vc.put("pkIsUserClass", pkIsUserClass(value)); - if (dd instanceof EntityCmp2Desc) { - if (c.equals(String.class)) { - vc.put("pkEncodeMethod", "encodeString"); - vc.put("pkDecodeMethod", "decodeString((java.lang.String) pk)"); - vc.put("pkMappingToMemoryMethod", ""); - } else if (c.equals(Character.class)) { - vc.put("pkEncodeMethod", "encodeOchar"); - vc.put("pkDecodeMethod", "decodeOchar((java.lang.Character) pk)"); - vc.put("pkMappingToMemoryMethod", ""); - } else if (c.equals(Byte.class)) { - vc.put("pkEncodeMethod", "encodeObyte"); - vc.put("pkDecodeMethod", "decodeObyte((java.lang.Byte) pk)"); - vc.put("pkMappingToMemoryMethod", ""); - } else if (c.equals(Short.class)) { - vc.put("pkEncodeMethod", "encodeOshort"); - vc.put("pkDecodeMethod", "decodeOshort((java.lang.Short) pk)"); - vc.put("pkMappingToMemoryMethod", ""); - } else if (c.equals(Integer.class)) { - vc.put("pkEncodeMethod", "encodeOint"); - vc.put("pkDecodeMethod", "decodeOint((java.lang.Integer) pk)"); - vc.put("pkMappingToMemoryMethod", ""); - } else if (c.equals(Long.class)) { - vc.put("pkEncodeMethod", "encodeOlong"); - vc.put("pkDecodeMethod", "decodeOlong((java.lang.Long) pk)"); - vc.put("pkMappingToMemoryMethod", ""); - } else if (c.equals(Date.class)) { - vc.put("pkEncodeMethod", "encodeDate"); - vc.put("pkDecodeMethod", "decodeDate((java.util.Date) pk)"); - vc.put("pkMappingToMemoryMethod", ""); - } else if (c.equals(Float.class)) { - vc.put("pkEncodeMethod", "encodeString"); - vc.put("pkDecodeMethod", "decodeString((java.lang.String) org.ow2.jonas.lib.ejb21.jorm.FloatPkFieldMapping.toStorage(pk))"); - vc.put("pkMappingToMemoryMethod", "org.ow2.jonas.lib.ejb21.jorm.FloatPkFieldMapping.toMemory"); - } - } - } - - switch (srcType) { - case Source.HOME: - value = BeanNaming.getPackageName(dd.getFullWrpHomeName()); - vc.put("package", value); - value = dd.getWrpHomeName(); - vc.put("class", value); - break; - case Source.LOCAL_HOME: - value = BeanNaming.getPackageName(dd.getFullWrpLocalHomeName()); - vc.put("package", value); - value = dd.getWrpLocalHomeName(); - vc.put("class", value); - break; - case Source.REMOTE: - value = BeanNaming.getPackageName(dd.getFullWrpRemoteName()); - vc.put("package", value); - value = dd.getWrpRemoteName(); - vc.put("class", value); - break; - case Source.LOCAL: - value = BeanNaming.getPackageName(dd.getFullWrpLocalName()); - vc.put("package", value); - value = dd.getWrpLocalName(); - vc.put("class", value); - break; - case Source.SERVICE_ENDPOINT: - SessionStatelessDesc ssd = (SessionStatelessDesc) dd; - value = BeanNaming.getPackageName(ssd.getFullWrpServiceEndpointName()); - vc.put("package", value); - value = ssd.getWrpServiceEndpointName(); - vc.put("class", value); - break; - case Source.SERVICE_ENDPOINT_HOME: - SessionStatelessDesc ssd1 = (SessionStatelessDesc) dd; - value = BeanNaming.getPackageName(ssd1.getFullWrpSEHomeName()); - vc.put("package", value); - value = ssd1.getWrpSEHomeName(); - vc.put("class", value); - break; - case Source.ENTITY_HANDLE: - value = BeanNaming.getPackageName(dd.getFullWrpHandleName()); - vc.put("package", value); - value = dd.getWrpHandleName(); - vc.put("class", value); - break; - case Source.ENTITY_CMP_JDBC: - value = BeanNaming.getPackageName(dd.getFullDerivedBeanName()); - vc.put("package", value); - value = dd.getDerivedBeanName(); - vc.put("class", value); - break; - default: - break; - } - - ArrayList prototypeMethodList = new ArrayList(); - ArrayList vcMethodList = new ArrayList(); - Method [] methods = null; - switch (srcType) { - case Source.HOME: - /* - * Add in the methods list, the Home interface methods, except - * - methods (other than remove) defined in javax.ejb.EJBHome, - * - and overriding methods. - */ - methods = dd.getHomeClass().getMethods(); - for (int i = 0; i < methods.length; i++) { - Method method = methods[i]; - if (!method.getDeclaringClass().equals(javax.ejb.EJBHome.class) - || "remove".equals(method.getName())) { - String pMeth = convertMethod2String(method); - if (!prototypeMethodList.contains(pMeth)) { - VcMethod vm = new VcMethod(method, dd.getMethodDesc(method), dd, mgr); - vcMethodList.add(vm); - prototypeMethodList.add(pMeth); - } - } - } - break; - case Source.LOCAL_HOME: - /* - * Add in the methods list, the LocalHome interface methods, except - * - methods (other than remove) defined in javax.ejb.EJBLocalHome, - * - and overriding methods. - */ - methods = dd.getLocalHomeClass().getMethods(); - for (int i = 0; i < methods.length; i++) { - Method method = methods[i]; - if (!method.getDeclaringClass().equals(javax.ejb.EJBLocalHome.class) - || "remove".equals(method.getName())) { - String pMeth = convertMethod2String(method); - if (!prototypeMethodList.contains(pMeth)) { - VcMethod vm = new VcMethod(method, dd.getMethodDesc(method), dd, mgr); - vcMethodList.add(vm); - prototypeMethodList.add(pMeth); - } - } - } - break; - case Source.REMOTE: - /* - * Add in the methods list, the Remote interface methods, except - * - methods (other than remove) defined in javax.ejb.EJBObject, - * - and overriding methods. - */ - methods = dd.getRemoteClass().getMethods(); - for (int i = 0; i < methods.length; i++) { - Method method = methods[i]; - if (!method.getDeclaringClass().equals(javax.ejb.EJBObject.class) - || "remove".equals(method.getName())) { - String pMeth = convertMethod2String(method); - if (!prototypeMethodList.contains(pMeth)) { - VcMethod vm = new VcMethod(method, dd.getMethodDesc(method), dd, mgr); - vcMethodList.add(vm); - prototypeMethodList.add(pMeth); - } - } - } - break; - case Source.LOCAL: - /* - * Add in the methods list, the Local interface methods, except - * - methods (other than remove) defined in javax.ejb.EJBLocalObject, - * - and overriding methods. - */ - methods = dd.getLocalClass().getMethods(); - for (int i = 0; i < methods.length; i++) { - Method method = methods[i]; - if (!method.getDeclaringClass().equals(javax.ejb.EJBLocalObject.class) - || "remove".equals(method.getName())) { - String pMeth = convertMethod2String(method); - if (!prototypeMethodList.contains(pMeth)) { - VcMethod vm = new VcMethod(method, dd.getMethodDesc(method), dd, mgr); - vcMethodList.add(vm); - prototypeMethodList.add(pMeth); - } - } - } - break; - case Source.SERVICE_ENDPOINT: - /* - * Add in the methods list, the ServiceEndpoint interface methods - */ - SessionStatelessDesc ssd = (SessionStatelessDesc) dd; - methods = ssd.getServiceEndpointClass().getMethods(); - for (int i = 0; i < methods.length; i++) { - Method method = methods[i]; - String pMeth = convertMethod2String(method); - if (!prototypeMethodList.contains(pMeth)) { - VcMethod vm = new VcMethod(method, ssd.getMethodDesc(method), dd, mgr); - vcMethodList.add(vm); - prototypeMethodList.add(pMeth); - } - } - break; - case Source.ENTITY_CMP_JDBC: - /* - * Add in the methods list, the Home and LocalHome interfaces methods, except - * - methods defined in javax.ejb.EJBHome and javax.ejb.EJBLocalHome and - * - and overriding methods. - * Same methods may be defined both in the Home interface and in the - * LocalHome interface. Don't add twice this method in the vcMethodList !!! - * - * Futhermore, in case of create() methods, methods added in the vcMethodList - * are the ejbCreate() associated bean's methods. - */ - if (dd.getHomeClass() != null) { - methods = dd.getHomeClass().getMethods(); - for (int i = 0; i < methods.length; i++) { - Method method = methods[i]; - if (!method.getDeclaringClass().equals(javax.ejb.EJBHome.class)) { - String pMeth = convertMethod2String(method); - if (!prototypeMethodList.contains(pMeth)) { - VcMethod vm = null; - if (method.getName().startsWith("create")) { - Method beanMethod = getBeanMethod(method, dd.getEjbClass()); - vm = new VcMethod(beanMethod, dd.getMethodDesc(method), dd, mgr); - // add the ejbPostCreate method - Method m = getEjbPostCreateMethod(method, dd.getEjbClass()); - VcMethod vm2 = new VcMethod(m, dd.getMethodDesc(method), dd, mgr); - vcMethodList.add(vm2); - } else { - vm = new VcMethod(method, dd.getMethodDesc(method), dd, mgr); - } - vcMethodList.add(vm); - prototypeMethodList.add(pMeth); - } - } - } - } - if (dd.getLocalHomeClass() != null) { - methods = dd.getLocalHomeClass().getMethods(); - for (int i = 0; i < methods.length; i++) { - Method method = methods[i]; - if (!method.getDeclaringClass().equals(javax.ejb.EJBLocalHome.class)) { - String pMeth = convertMethod2String(method); - if (!prototypeMethodList.contains(pMeth)) { - VcMethod vm = null; - if (method.getName().startsWith("create")) { - Method beanMethod = getBeanMethod(method, dd.getEjbClass()); - vm = new VcMethod(beanMethod, dd.getMethodDesc(method), dd, mgr); - // add the ejbPostCreate method - Method m = getEjbPostCreateMethod(method, dd.getEjbClass()); - VcMethod vm2 = new VcMethod(m, dd.getMethodDesc(method), dd, mgr); - vcMethodList.add(vm2); - } else { - vm = new VcMethod(method, dd.getMethodDesc(method), dd, mgr); - } - vcMethodList.add(vm); - prototypeMethodList.add(pMeth); - } - } - } - } - - /* - * Add the - * - setEntityContext(javax.ejb.EntityContext), - * - ejbActivate(), - * - ejbLoad(), - * - ejbStore(), - * - ejbRemove() - * bean's methods. - */ - try { - Class[] params = {javax.ejb.EntityContext.class}; - Method beanMethod = dd.getEjbClass().getMethod("setEntityContext", - params); - VcMethod vm = new VcMethod(beanMethod, null, dd, mgr); - vcMethodList.add(vm); - } catch (Exception e) { - throw new Error("setEntityContext(javax.ejb.EntityContext) method not defined in " - + dd.getEjbClass().getName()); - } - try { - Method beanMethod = dd.getEjbClass().getMethod("ejbActivate", new Class[0]); - VcMethod vm = new VcMethod(beanMethod, null, dd, mgr); - vcMethodList.add(vm); - } catch (Exception e) { - throw new Error("ejbActivate() method not defined in " - + dd.getEjbClass().getName()); - } - try { - Method beanMethod = dd.getEjbClass().getMethod("ejbLoad", new Class[0]); - VcMethod vm = new VcMethod(beanMethod, null, dd, mgr); - vcMethodList.add(vm); - } catch (Exception e) { - throw new Error("ejbLoad() method not defined in " - + dd.getEjbClass().getName()); - } - try { - Method beanMethod = dd.getEjbClass().getMethod("ejbStore", new Class[0]); - VcMethod vm = new VcMethod(beanMethod, null, dd, mgr); - vcMethodList.add(vm); - } catch (Exception e) { - throw new Error("ejbStore() method not defined in " - + dd.getEjbClass().getName()); - } - try { - Method beanMethod = dd.getEjbClass().getMethod("ejbRemove", new Class[0]); - VcMethod vm = new VcMethod(beanMethod, null, dd, mgr); - vcMethodList.add(vm); - } catch (Exception e) { - throw new Error("ejbRemove() method not defined in " - + dd.getEjbClass().getName()); - } - - if (dd instanceof EntityCmp2Desc) { - /* - * Add the ejbSelect() methods defined in the bean. - */ - Method[] bMeths = dd.getEjbClass().getMethods(); - for (int i = 0; i < bMeths.length; i++) { - if (bMeths[i].getName().startsWith("ejbSelect")) { - VcMethod vm = new VcMethod(bMeths[i], dd.getMethodDesc(bMeths[i]), dd, mgr); - vcMethodList.add(vm); - } - } - } - break; - default: - break; - } - vc.put("methodList", new Vector(vcMethodList)); - - ArrayList vcFieldList = new ArrayList(); - ArrayList vcFieldPkList = new ArrayList(); - ArrayList vcFieldNoPkList = new ArrayList(); - if (dd instanceof EntityCmp1Desc) { - EntityCmp1Desc edd = (EntityCmp1Desc) dd; - for (Iterator i = edd.getCmpFieldDescIterator(); i.hasNext();) { - FieldDesc fd = (FieldDesc) i.next(); - VcField vcf = new VcField(fd.getName(), fd.getFieldType(), fd, true); - vcFieldList.add(vcf); - if (fd.isPrimaryKey()) { - vcFieldPkList.add(vcf); - } else { - vcFieldNoPkList.add(vcf); - } - } - } else if (dd instanceof EntityCmp2Desc) { - EntityCmp2Desc edd = (EntityCmp2Desc) dd; - // Define the CMP fields - Iterator it = edd.getCmpFieldDescIterator(); - while (it.hasNext()) { - FieldDesc fd = (FieldDesc) it.next(); - VcField vcf = new VcField(fd); - vcFieldList.add(vcf); - if (fd.isPrimaryKey()) { - vcFieldPkList.add(vcf); - } else { - vcFieldNoPkList.add(vcf); - } - } - // Define the CMR fields - Hashtable cmrFields = new Hashtable(); - for (Iterator i = edd.getEjbRelationshipRoleDescIterator(); i.hasNext();) { - EjbRelationshipRoleDesc rsr = (EjbRelationshipRoleDesc) i.next(); - String cmrname = rsr.getCmrFieldName(); - if (!cmrFields.containsKey(cmrname)) { - cmrFields.put(cmrname, new VcCMRField(rsr)); - } - } - vc.put("cmrList", cmrFields.values()); - } - - vc.put("fieldList", new Vector(vcFieldList)); - vc.put("fieldPkList", new Vector(vcFieldPkList)); - vc.put("fieldNoPkList", new Vector(vcFieldNoPkList)); - - return vc; - } - - /** - * Convert a method to a string depending on its name and its parameters list. - * @param meth method to convert - * @return Return a string representation of the given method - */ - private static String convertMethod2String(Method meth) { - String value = new String(meth.getName()); - Class[] params = meth.getParameterTypes(); - value = value + "_" + params.length; - for (int p = 0; p < params.length; p++) { - value = value + "_" + JavaType.getName(params[p]); - } - return (value); - } - - /** - * @param method home.create() method - * @param bean class of the bean - * @return Return the associated bean's method ejbPostCreate matching the create method of the interface - */ - private static Method getEjbPostCreateMethod(Method method, Class bean) { - Method beanMethod; - String beanMethodName = "ejbPost" + BeanNaming.firstToUpperCase(method.getName()); - try { - beanMethod = bean.getMethod(beanMethodName, method.getParameterTypes()); - } catch (Exception e) { - throw new Error("No associated ejbPostCreate method for the interface method " + method.toString()); - } - return beanMethod; - } - - /** - * Return the associated bean's method of the given interface's method, ie - * - ejbRemove(..) for [home|object]remove(..) - * - ejbCreateXxx(..) for home.createXxx(..) - * - ejbFindXxx(..) for home.findXxx(..) - * - ejbHomeXxx(..) for home.xxx(..) - * - xxx(..) for object.xxx(..) - * @param method interface method - * @param bean class of the bean - * @return Return the associated bean's method to the interface method - */ - private static Method getBeanMethod(Method method, Class bean) { - - String methodName = method.getName(); - Method beanMethod; - boolean isMethodHome = - javax.ejb.EJBHome.class.isAssignableFrom(method.getDeclaringClass()) - || javax.ejb.EJBLocalHome.class.isAssignableFrom(method.getDeclaringClass()); - - String beanMethodName = methodName; - if ("remove".equals(methodName)) { - beanMethodName = "ejbRemove"; - } else if (isMethodHome) { - if (methodName.startsWith("create") || methodName.startsWith("find")) { - beanMethodName = "ejb" + BeanNaming.firstToUpperCase(methodName); - } else { - beanMethodName = "ejbHome" + BeanNaming.firstToUpperCase(methodName); - } - } - - try { - beanMethod = bean.getMethod(beanMethodName, method.getParameterTypes()); - } catch (Exception e) { - throw new Error("No associated bean's method for the interface method " + method.toString()); - } - return beanMethod; - } - - /** - * @param classname name of a class - * @return true if the class is a 'user' class, false if it's a java class - */ - public static Boolean pkIsUserClass(String classname) { - if (classname.startsWith("java.")) { - return Boolean.FALSE; - } else { - return Boolean.TRUE; - } - } - - /** - * @param vc VelocityContext to trace - * @return Return a string representation of the given VelocityContext for debug use - */ - public static String toString(VelocityContext vc) { - StringBuffer ret = new StringBuffer(); - Object [] keys = vc.internalGetKeys(); - for (int i = 0; i < keys.length; i++) { - String key = (String) keys[i]; - Object value = vc.internalGet(key); - if (i > 0) { - ret.append("\n"); - } - if (!"dd".equals(key)) { - // Do not trace the BeanDesc (variable named "dd") - ret.append(" key = " + key + "; value = " + value); - } - } - return (ret.toString()); - } - -} diff --git a/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/VcCMRField.java b/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/VcCMRField.java deleted file mode 100644 index e771ca9d3440d248b3fb65bac0ba2431119bb392..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/VcCMRField.java +++ /dev/null @@ -1,293 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.genic; - -import org.ow2.jonas.deployment.ejb.EjbRelationshipRoleDesc; -import org.ow2.jonas.deployment.ejb.EntityCmp2Desc; -import org.ow2.jonas.lib.util.BeanNaming; - - - -/** - * This class is used in the velocity context. - * It represents a CMR field. - * - * @author S.Chassande-Barrioz : Initial developer - * @author Helene Joanin - */ -public class VcCMRField { - - /** - * Name of the cmr field - */ - private String name; - /** - * Name of cmr field with the first letter capitalized - */ - private String uFLName; - /** - * Type's name of the cmr field - */ - private String typeName; - /** - * First relationship-role of the cmr field - */ - private EjbRelationshipRoleDesc rsr; - /** - * Second relationship-role of the cmr field - */ - private EjbRelationshipRoleDesc rsr2; - /** - * Relation's type of the cmr field - */ - private byte relationType = -1; - /** - * Name of the JORM genclass. - * This field has a non null value if the cmr field is a multivalued relation - */ - private String genClassName = null; - /** - * Description of the cmr filed. - */ - private EntityCmp2Desc element = null; - - /** - * It builds a cmr field descriptor usable in velocity context. - * @param rsr The EjbRelationshipRoleDesc where this CMR field is defined - * @throws GenICException if the Deployment Decriptor is not conform - */ - public VcCMRField(EjbRelationshipRoleDesc rsr) throws GenICException { - this.rsr = rsr; - name = rsr.getCmrFieldName(); - uFLName = upperFL(name); - element = rsr.getTargetBean(); - typeName = rsr.getCmrFieldType().getName(); - if (rsr.isTargetMultiple()) { - if (java.util.Collection.class.equals(rsr.getCmrFieldType())) { - // TODO : Even if Collection has been defined as CMRField Type, we use a Set - genClassName = "org.ow2.jonas.lib.ejb21.jorm.Set"; - } else if (java.util.Set.class.equals(rsr.getCmrFieldType())) { - genClassName = "org.ow2.jonas.lib.ejb21.jorm.Set"; - } else { - throw new GenICException("Unauthorized multivalued relation type:" + rsr.getCmrFieldType()); - } - } - rsr2 = rsr.getOppositeRelationshipRole(); - relationType = rsr.getRelationType(); - } - - /** - * @return the name of the cmr field. - */ - public String getName() { - return name; - } - - /** - * @return the type name of the cmr field. - * It is the referenced class if the relation is multiple, - * otherwise the type of the multivalued relation (java.util.Collection or java.util.Set). - */ - public String getTypeName() { - return typeName; - } - - /** - * This is used to generate method names relative to the CMR Field - * @return the name of cmr field with the first letter capitalized. - */ - public String getUFLName() { - return uFLName; - } - - public String jormGetter() { - return "paGet" + getUFLName(); - } - - public String jormSetter() { - return "paSet" + getUFLName(); - } - - /** - * @return the JOnAS meta object where the CMR field is defined - */ - public EjbRelationshipRoleDesc getRsr() { - return rsr; - } - - /** - * @return the name of opposite cmr field with the first letter capitalized. - */ - public String getOppositeUFLCMRName() { - return upperFL(rsr2.getCmrFieldName()); - } - - /** - * CoherenceHelper class is used to manage coherence in relations. - * @return The JOnAS CoherenceHelper class name - */ - public String getHelperClassName() { - return "JOnAS" + rsr.getSourceBeanName() + "CoherenceHelper"; - } - - /** - * CoherenceHelper class is used to manage coherence in relations. - * @return The Fully Qualified JOnAS CoherenceHelper class name - */ - public String getHelperFQClassName() { - String pn = BeanNaming.getPackageName(rsr2.getTargetBean().getFullDerivedBeanName()); - if (pn != null && pn.length() > 0) { - return pn + "." + getHelperClassName(); - } else { - return getHelperClassName(); - } - } - - /** - * CoherenceHelper class is used to manage coherence in relations. - * @return The JOnAS CoherenceHelper class name for opposite bean - */ - public String getOppositeHelperClassName() { - return "JOnAS" + rsr2.getSourceBeanName() + "CoherenceHelper"; - } - - /** - * CoherenceHelper class is used to manage coherence in relations. - * @return The JOnAS CoherenceHelper fully qualified class name for opposite bean - */ - public String getOppositeHelperFQClassName() { - String pn = BeanNaming.getPackageName(rsr.getTargetBean().getFullDerivedBeanName()); - if (pn != null && pn.length() > 0) { - return pn + "." + getOppositeHelperClassName(); - } else { - return getOppositeHelperClassName(); - } - } - - /** - * @return the class name of the gen class which must be used if the cmr is multiple - * and return null otherwise. - * The class which the is returned implements the interface which the name is returned by the 'getTypeName' method. - */ - public String getGenClassName() { - return genClassName; - } - - /** - * @return the description of the field - */ - public EntityCmp2Desc getElement() { - return element; - } - - /** - * It capitalizes the first letter of a word. - * @param word is the input string to capitalize the first letter - * @return a String with first letter capitalized - */ - public String upperFL(String word) { - return Character.toUpperCase(word.charAt(0)) + word.substring(1); - } - - /** - * @return true if the relationship role is one-one unidirectional, false if not. - */ - public boolean isOOu() { - return relationType == EjbRelationshipRoleDesc.OOU; - } - - /** - * @return true if the relationship role is one-one bidirectional, false if not. - */ - public boolean isOOb() { - return relationType == EjbRelationshipRoleDesc.OOB; - } - - /** - * @return true if the relationship role is one-many unidirectional, false if not. - */ - public boolean isOMu() { - return relationType == EjbRelationshipRoleDesc.OMU; - } - - /** - * @return true if the relationship role is many-one unidirectional, false if not. - */ - public boolean isMOu() { - return relationType == EjbRelationshipRoleDesc.MOU; - } - - /** - * @return true if the relationship role is many-one bidirectional, false if not. - */ - public boolean isMOb() { - return relationType == EjbRelationshipRoleDesc.MOB; - } - - /** - * @return true if the relationship role is one-many bidirectional, false if not. - */ - public boolean isOMb() { - return relationType == EjbRelationshipRoleDesc.OMB; - } - - /** - * @return true if the relationship role is many-many unidirectional, false if not. - */ - public boolean isMMu() { - return relationType == EjbRelationshipRoleDesc.MMU; - } - - /** - * @return true if the relationship role is many-many bidirectional, false if not. - */ - public boolean isMMb() { - return relationType == EjbRelationshipRoleDesc.MMB; - } - - /** - * @return a string representation of the VcCMRField object for debug use - */ - public String toString() { - StringBuffer ret = new StringBuffer(); - ret.append("\n Name = " + getName()); - ret.append("\n TypeName = " + getTypeName()); - ret.append("\n UFLName = " + getUFLName()); - ret.append("\n OppositeUFLCMRName = " + getOppositeUFLCMRName()); - ret.append("\n HelperClassName = " + getHelperClassName()); - ret.append("\n HelperFQClassName = " + getHelperFQClassName()); - ret.append("\n OppositeHelperClassName = " + getOppositeHelperClassName()); - ret.append("\n OppositeHelperFQClassName = " + getOppositeHelperFQClassName()); - ret.append("\n GenClassName = " + getGenClassName()); - ret.append("\n isOOu = " + isOOu()); - ret.append("\n isOOb = " + isOOb()); - ret.append("\n isOMu = " + isOMu()); - ret.append("\n isOMb = " + isOMb()); - ret.append("\n isMOb = " + isMOb()); - ret.append("\n isMNu = " + isMMu()); - ret.append("\n isMNb = " + isMMb()); - return (ret.toString()); - } -} diff --git a/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/VcField.java b/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/VcField.java deleted file mode 100644 index 7922ca7c8b5942d326fc0e4637251e147c242611..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/VcField.java +++ /dev/null @@ -1,340 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.generators.genic; - - -import java.lang.reflect.Field; - -import org.ow2.jonas.deployment.ejb.FieldDesc; -import org.ow2.jonas.lib.ejb21.JavaType; -import org.ow2.jonas.lib.ejb21.jorm.JormType; - - - -/** - * This class is the "Velocity context" for a container managed persistence bean's field - * used in the Velocity Template. - * @author Helene Joanin : Initial developer - */ - -public class VcField { - - /** - * Name of the cmp field - */ - private String mName = null; - /** - * Type's name of the cmp field - */ - private String mTypeName = null; - /** - * Is the field composes the primary key - */ - private boolean isPrimaryKey = false; - /** - * Is a cmp field version 1 (or version 2) - */ - private boolean mIsCmp1 = false; - /* - * For Cmp1 only - */ - /** - * String representation of the java default value (ie 0 for int, null for object, ...) - */ - private String mDefaultValue = null; - /** - * SQL type's name of the cmp field - */ - private String mSqlTypeName = null; - /** - * SQL getter method's name - */ - private String mSqlGetMethod = null; - /** - * SQL setter method's name - */ - private String mSqlSetMethod = null; - /** - * Is the type of the cmp field is primitive - */ - private boolean hasNotPrimitiveType = false; - /** - * Is the type of the cmp field is java.math.BigInteger - */ - private boolean hasBigIntegerType = false; - /** - * Is the type of the cmp field is Serializable - */ - private boolean hasSerializableType = false; - /** - * Is the type of the cmp field is a java.lang type except java.lang.String - */ - private boolean hasJavaLangTypeExceptString = false; - /* - * For CMP2 only - */ - /** - * JORM type name of the cmp field - */ - private String jormTypeName = null; - /** - * Is the cmp field must be converted between the memory representation and the storage representation - */ - private boolean mustBeConvert = false; - /** - * Convertion class name - */ - private String convertClassName = null; - - /** - * VcField constructor - * @param mName name of the cmp field - * @param fType type of the cmp field - * @param fd field descriptor of the cmp field - * @param isCmp1 true if it's a cmp version 1 field, false if it's a cmp version 2 field. - */ - public VcField(String mName, Class fType, FieldDesc fd, boolean isCmp1) { - mIsCmp1 = isCmp1; - this.mName = mName; - mTypeName = JavaType.getName(fType); - isPrimaryKey = fd.isPrimaryKey(); - mDefaultValue = JavaType.getDefaultValue(fType); - if (mIsCmp1) { - // CMP 1 - mSqlTypeName = JavaType.getSQLType(fType); - mSqlGetMethod = JavaType.getSQLGetMethod(fType); - mSqlSetMethod = JavaType.getSQLSetMethod(fType); - hasNotPrimitiveType = !fType.isPrimitive(); - hasBigIntegerType = fType.equals(java.math.BigInteger.class); - hasSerializableType = "setSerializable".equals(mSqlSetMethod) - && "getSerializable".equals(mSqlGetMethod); - hasJavaLangTypeExceptString = false; - if (fType.getPackage() != null) { - if ("java.lang".equals(fType.getPackage().getName()) - && !java.lang.String.class.equals(fType)) { - hasJavaLangTypeExceptString = true; - } - } - } else { - // CMP 2 - jormTypeName = JormType.getPType(fType, isPrimaryKey).getJavaName(); - if (fType.equals(java.sql.Date.class)) { - mustBeConvert = true; - convertClassName = "org.ow2.jonas.lib.ejb21.sql.SqlDateFieldMapping"; - } else if (fType.equals(java.sql.Time.class)) { - mustBeConvert = true; - convertClassName = "org.ow2.jonas.lib.ejb21.sql.SqlTimeFieldMapping"; - } else if (fType.equals(java.sql.Timestamp.class)) { - mustBeConvert = true; - convertClassName = "org.ow2.jonas.lib.ejb21.sql.SqlTimestampFieldMapping"; - } else if (isPrimaryKey && fType.equals(Float.class)) { - // JORM does not support Float for the primary key, we must so convert it - mustBeConvert = true; - convertClassName = "org.ow2.jonas.lib.ejb21.jorm.FloatPkFieldMapping"; - } - } - } - - /** - * VcField contructor for cmp field version 1 - * @param field java field descriptor of the cmp field - * @param fd field descriptor of the cmp field - */ - VcField(Field field, FieldDesc fd) { - this(field.getName(), field.getType(), fd, true); - } - - /** - * VcField onstructor for cmp field version 2 - * @param fd field descriptor of the cmp field - */ - VcField(FieldDesc fd) { - this(fd.getName(), fd.getFieldType(), fd, false); - } - - /** - * @return the name of the cmp field - */ - public String getName() { - return mName; - } - - /** - * @return the name, with the first letter capitalized, of the cmp field - */ - public String getNameUpperFirst() { - return Character.toUpperCase(mName.charAt(0)) + mName.substring(1); - } - - public String jormGetter() { - return "paGet" + getNameUpperFirst(); - } - - public String jormSetter() { - return "paSet" + getNameUpperFirst(); - } - - /** - * @return the name of the getter method of the cmp field - */ - public String getGetterName() { - return "get" + Character.toUpperCase(mName.charAt(0)) + mName.substring(1); - } - - /** - * @return the name of the setter method of the cmp field - */ - public String getSetterName() { - return "set" + Character.toUpperCase(mName.charAt(0)) + mName.substring(1); - } - - /** - * @return the type name of the cmp field - */ - public String getTypeName() { - return mTypeName; - } - - /** - * @return true if the cmp field composes the primary key - */ - public boolean isPrimaryKey() { - return isPrimaryKey; - } - - /* - * CMP version 1 only - */ - /** - * @return the string representation of the java default value for the cmp field (ie "0 "for int, "null" for object ...) - */ - public String getDefaultValue() { - return mDefaultValue; - } - - /** - * @return the SQL type name of the cmp field - */ - public String getSqlTypeName() { - return mSqlTypeName; - } - - /** - * @return the SQL getter method name for the cmp field - */ - public String getSqlGetMethod() { - return mSqlGetMethod; - } - - /** - * @return the SQL setter method name for the cmp field - */ - public String getSqlSetMethod() { - return mSqlSetMethod; - } - - /** - * @return true if the type of the cmp field is not a java primitive type - */ - public boolean hasNotPrimitiveType() { - return hasNotPrimitiveType; - } - - /** - * @return true if the type of the cmp field is java.math.BigInteger - */ - public boolean hasBigIntegerType() { - return hasBigIntegerType; - } - - /** - * @return true of the type of the cmp field is Serializable - */ - public boolean hasSerializableType() { - return hasSerializableType; - } - - /** - * @return true if the type of the cmp type is a java.lag type except java.lang.String - */ - public boolean hasJavaLangTypeExceptString() { - return hasJavaLangTypeExceptString; - } - - /* - * CMP version 2 only - */ - /** - * @return the JORM type name of the cmp field - */ - public String getJormTypeName() { - return jormTypeName; - } - - /** - * @return true if a conversion must be dome between the memory representation and the storage representation for the cmp field - */ - public boolean isMustBeConvert() { - return mustBeConvert; - } - - /** - * @return the class name of for the convertion between the memory representation and the storage representation for the cmp field - */ - public String getConvertClassName() { - return convertClassName; - } - - /** - * @return a string representation of the VcField for debug use - */ - public String toString() { - StringBuffer ret = new StringBuffer(); - ret.append("\n Name = " + getName()); - ret.append("\n isPrimaryKey = " + isPrimaryKey()); - ret.append("\n NameUpperFirst = " + getNameUpperFirst()); - ret.append("\n GetterName = " + getGetterName()); - ret.append("\n SetterName = " + getSetterName()); - ret.append("\n TypeName = " + getTypeName()); - ret.append("\n DefaultValue = " + getDefaultValue()); - if (mIsCmp1) { - ret.append("\n SqlTypeName = " + getSqlTypeName()); - ret.append("\n SqlGetMethod = " + getSqlGetMethod()); - ret.append("\n SqlSetMethod = " + getSqlSetMethod()); - ret.append("\n hasNotPrimitiveType = " + hasNotPrimitiveType()); - ret.append("\n hasBigIntegerType = " + hasBigIntegerType()); - ret.append("\n hasSerializableType = " + hasSerializableType()); - ret.append("\n hasJavaLangTypeExceptString = " + hasJavaLangTypeExceptString()); - } else { - ret.append("\n JormTypeName = " + getJormTypeName()); - ret.append("\n MustBeConvert = " + isMustBeConvert()); - ret.append("\n ConvertClassName = " + getConvertClassName()); - } - return (ret.toString()); - } - -} diff --git a/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/VcMethod.java b/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/VcMethod.java deleted file mode 100644 index 339b97d5c4a04a99e0aed4c04037b2ee85267968..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/VcMethod.java +++ /dev/null @@ -1,1155 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.generators.genic; - - -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.StringTokenizer; -import java.util.Vector; - -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.ejb.BeanDesc; -import org.ow2.jonas.deployment.ejb.EntityJdbcCmp1Desc; -import org.ow2.jonas.deployment.ejb.EntityJdbcCmp2Desc; -import org.ow2.jonas.deployment.ejb.FieldJdbcDesc; -import org.ow2.jonas.deployment.ejb.MethodCmp2Desc; -import org.ow2.jonas.deployment.ejb.MethodDesc; -import org.ow2.jonas.deployment.ejb.MethodJdbcCmp1Desc; -import org.ow2.jonas.lib.ejb21.JavaType; -import org.ow2.jonas.lib.ejb21.sql.EjbqlQueryTreeHolder; -import org.ow2.jonas.lib.util.BeanNaming; - - - - -import org.objectweb.jorm.metainfo.api.Manager; -import org.objectweb.jorm.type.api.PType; -import org.objectweb.util.monolog.api.BasicLevel; - - -/** - * This class is the "Velocity context" for a interface method or a bean method used in the Velocity Templates. - * @author Helene Joanin (Bull) : Initial developer - * @author Santiago Gala (sgala@hisitech.com) - 00/09/14 - Parameters can be followed by a number in the WHERE clause - * @author Joe Gittings has proposed to code method signature for security - * in order to avoid same signature for inherited methods. - */ - -public class VcMethod { - - /** - * home.create method - */ - static final byte METHOD_CREATE = 0; - /** - * bean.ebjCreate method - */ - static final byte METHOD_EJB_CREATE = 1; - /** - * bean.ejbPostCreate method - */ - static final byte METHOD_EJB_POST_CREATE = 2; - /** - * EJBObject.remove() method - */ - static final byte METHOD_REMOVE_THIS = 10; - /** - * home.remove(primarykey) method - */ - static final byte METHOD_REMOVE_PK = 11; - /** - * home.remove(handle) method - */ - static final byte METHOD_REMOVE_HANDLE = 12; - /** - * bean.ejbRemove() method - */ - static final byte METHOD_EJB_REMOVE = 13; - /** - * home.findByPrimaryKey(pk) method - */ - static final byte METHOD_FINDER_BY_PK = 20; - /** - * home.findXxx() method - */ - static final byte METHOD_FINDER_ALL = 21; - /** - * home.findXxx() method that returns a simple object - */ - static final byte METHOD_FINDER_SIMPLE = 22; - /** - * home.findXxx() method that returns an Enumeration - */ - static final byte METHOD_FINDER_ENUM = 23; - /** - * home.findXxx() method that returns a Collection - */ - static final byte METHOD_FINDER_COL = 24; - /** - * bean.ejbSelectXxx() method that returns a simple object - */ - static final byte METHOD_EJB_SELECT_SIMPLE = 30; - /** - * bean.ejbSelectXxx() method that returns a Collection - */ - static final byte METHOD_EJB_SELECT_COL = 31; - /** - * bean.ejbSelectXxx() method that returns a Set - */ - static final byte METHOD_EJB_SELECT_SET = 32; - /** - * bean.ejbLoad() method - */ - static final byte METHOD_EJB_LOAD = 40; - /** - * bean.ejbStore() method - */ - static final byte METHOD_EJB_STORE = 41; - /** - * bean.setEntityContext() method - */ - static final byte METHOD_EJB_SET_ENTITY_CONTEXT = 42; - /** - * bean.ejbActivate() method - */ - static final byte METHOD_EJB_ACTIVATE = 43; - - /** - * kind of the method ie home.create() or bean.ejbCreate, or ... - */ - private byte mKind = -1; - - /** - * name of the method - */ - private String mName = null; - - /** - * name of the method with the firt letter capitalized - */ - private String mCapName = null; - - /** - * string representation of the formal parameters of the method (for ex: "int p1, String p2"); - */ - private StringBuffer mFormalParameters = null; - - /** - * string representation of the actual parameters of the method (for ex: "p1, p2") - */ - private StringBuffer mActualParameters = null; - - /** - * Array of objects of the parameters - */ - private StringBuffer mArrayObjectParameters = null; - - /** - * string representation of the exception list - */ - private StringBuffer mExceptionList = null; - - /** - * string representation of the security signature method - */ - private String mSecuritySignature; - - /** - * transactional attribute of the method - */ - private int mTxAttribute = MethodDesc.TX_NULL; - - /** - * name of the return type of the method - */ - private String mReturnType; - - /** - * default return value - */ - private String mDefaultValue; - - /** - * default wrapper type for the return type - */ - private String mWrapperType; - - /** - * java.lang.reflect.Method, just for explicit error message - */ - private Method mMethod = null; - - /** - * index of the method. Each method is identify with an unuique index. - */ - private int methodIndex = -1; - - /** - * BeanDesc of the associated bean to the method - */ - private BeanDesc beanDesc = null; - - private Manager manager = null; - - /* - * For CMP1 only - */ - - /** - * string representation of the SQL statement associated to the method - */ - private String mSqlStmt = null; - - /** - * VcParamWhere list of the finder method - */ - private ArrayList mParamWhereList = null; - - /* - * For CMP2 only - */ - - /** - * true is this is a finder/ejbSelect method that return a remote bean - * (Only used in CMP2 for finder and ejbSelect methods) - */ - - private boolean isEjbqlReturnRemoteBean = false; - /** - * true is this is a finder/ejbSelect method that return a local bean - * (Only used in CMP2 for finder and ejbSelect methods) - */ - - private boolean isEjbqlReturnLocalBean = false; - /** - * Medor Field representation of the result of the finder/ejbSelect method - * (Only used in CMP2 for finder and ejbSelect methods) - */ - - private org.objectweb.medor.api.Field resFieldOfEjbql = null; - /** - * VcParam list of the finder/ejbSelect method - * (Only used in CMP2 for finder and ejbSelect methods) - */ - private ArrayList mParamList = null; - - /** - * Class list of the parameters of the method - */ - private Class[] parameterTypes = null; - /** - * true if the method throws javax.ejb.CreateException - */ - private boolean canThrowCreate = false; - - /** - * VcMethod constructor - * @param method java.lang.reflect.Method method description - * @param methodDesc method description - * @param dd bean description of the associated bean - */ - VcMethod(Method method, MethodDesc methodDesc, BeanDesc dd, Manager mgr) { - - if (methodDesc != null) { - methodIndex = methodDesc.getIndex(); - } - beanDesc = dd; - manager = mgr; - - /* - * The 'method' may be - * - a home interface's method - * - a local home interface's method - * - a remote interface's method - * - a local interface's method - * - a bean's method as - * - a beans's ejbSelect() method, - * setEntityContext(), ejbActivate(), ejbCreate(), ejbLoad(), ejbStore(), ejbRemove(). - * - a beans's ejbSelect() method, - * In the last case, the 'methodDesc' is null in case of - * setEntityContext(), ejbActivate(), ejbLoad() and ejbStore(). - */ - - Class declClass = method.getDeclaringClass(); - Class [] params = method.getParameterTypes(); - parameterTypes = params; - Class [] exceptions = method.getExceptionTypes(); - mMethod = method; - - // Name and CapName - mName = method.getName(); - mCapName = BeanNaming.firstToUpperCase(mName); - - // FormalParameters and ActualParameters - mFormalParameters = new StringBuffer(); - mActualParameters = new StringBuffer(); - mArrayObjectParameters = new StringBuffer(); - String var = null; - for (int p = 1; p <= params.length; p++) { - var = "p" + p; - mFormalParameters.append(JavaType.getName(params[p - 1]) + " " + var); - mActualParameters.append(var); - mArrayObjectParameters.append(JavaType.toStringObject(var, params[p - 1])); - if (p < params.length) { - mFormalParameters.append(", "); - mActualParameters.append(", "); - mArrayObjectParameters.append(", "); - } - } - - // ExceptionList - mExceptionList = new StringBuffer(); - for (int e = 0; e < exceptions.length; e++) { - Class ecl = exceptions[e]; - if (javax.ejb.CreateException.class.isAssignableFrom(ecl)) { - canThrowCreate = true; - } - mExceptionList.append(JavaType.getName(ecl)); - if (e < exceptions.length - 1) { - mExceptionList.append(", "); - } - } - - // SecuritySignature - // No methodDesc for bean's methods as ejbLoad(), ejbStore(), ... - if (methodDesc != null) { - mSecuritySignature = ""; - if (methodDesc.getRoleName().length > 0 || methodDesc.isExcluded()) { - mSecuritySignature = BeanNaming.getSignature(dd.getEjbName(), method); - } - } - - // TxAttribute - // No methodDesc for bean's methods as ejbLoad(), ejbStore(), ... - if (methodDesc != null) { - mTxAttribute = methodDesc.getTxAttribute(); - } - - // ReturnType - mReturnType = JavaType.getName(method.getReturnType()); - if (! mReturnType.equals("void")) { - mDefaultValue = JavaType.getDefaultValue(method.getReturnType()); - mWrapperType = JavaType.getWrapperType(method.getReturnType()); - } - - // isFinderXXX - boolean isFinder = false; - - if (mName.startsWith("find") - && (javax.ejb.EJBHome.class.isAssignableFrom(declClass) - || javax.ejb.EJBLocalHome.class.isAssignableFrom(declClass)) - ) { - isFinder = true; - } - if (isFinder) { - if ("findByPrimaryKey".equals(mName)) { - mKind = METHOD_FINDER_BY_PK; - } else { - if (java.util.Enumeration.class.equals(method.getReturnType())) { - mKind = METHOD_FINDER_ENUM; - } else if (java.util.Collection.class.equals(method.getReturnType())) { - mKind = METHOD_FINDER_COL; - } else { - mKind = METHOD_FINDER_SIMPLE; - } - } - } - - // isCreate - if (mName.startsWith("create") - && (javax.ejb.EJBHome.class.isAssignableFrom(declClass) - || javax.ejb.EJBLocalHome.class.isAssignableFrom(declClass)) - ) { - mKind = METHOD_CREATE; - } - - // isEjbCreate - if (mName.startsWith("ejbCreate") - && javax.ejb.EnterpriseBean.class.isAssignableFrom(declClass)) { - mKind = METHOD_EJB_CREATE; - } - - // isEjbPostCreate - if (mName.startsWith("ejbPostCreate") - && javax.ejb.EnterpriseBean.class.isAssignableFrom(declClass)) { - mKind = METHOD_EJB_POST_CREATE; - } - - // isRemoveXXX - boolean isRemove = "remove".equals(mName); - if (isRemove) { - if (declClass.equals(javax.ejb.EJBObject.class) - || declClass.equals(javax.ejb.EJBLocalObject.class)) { - mKind = METHOD_REMOVE_THIS; - } else if (declClass.equals(javax.ejb.EJBHome.class) - || declClass.equals(javax.ejb.EJBLocalHome.class)) { - if (params[0].equals(javax.ejb.Handle.class)) { - mKind = METHOD_REMOVE_HANDLE; - } else { - mKind = METHOD_REMOVE_PK; - } - } - } - - // isEjbRemove, isEjbLoad, isEjbStore - if (javax.ejb.EnterpriseBean.class.isAssignableFrom(declClass) - && (params.length == 0)) { - if ("ejbRemove".equals(mName)) { - mKind = METHOD_EJB_REMOVE; - } else if ("ejbLoad".equals(mName)) { - mKind = METHOD_EJB_LOAD; - } else if ("ejbStore".equals(mName)) { - mKind = METHOD_EJB_STORE; - } - } - - // isEjbSetEntityContext - if (javax.ejb.EnterpriseBean.class.isAssignableFrom(declClass)) { - if ("setEntityContext".equals(mName) - && (params.length == 1) - && javax.ejb.EntityContext.class.equals(params[0])) { - mKind = METHOD_EJB_SET_ENTITY_CONTEXT; - } - } - - // isEjbActivate - if (javax.ejb.EnterpriseBean.class.isAssignableFrom(declClass)) { - if ("ejbActivate".equals(mName) - && (params.length == 0)) { - mKind = METHOD_EJB_ACTIVATE; - } - } - - if (dd instanceof EntityJdbcCmp1Desc) { - // For Entity CMP 1 - // SqlStmt, and ParamsWhere in case of FinderSimple, FinderEnum or FinderCol. - EntityJdbcCmp1Desc edd = (EntityJdbcCmp1Desc) dd; - StringBuffer lf = new StringBuffer(); - StringBuffer lv = new StringBuffer(); - boolean firstLf = true; - boolean firstLv = true; - if (mKind == METHOD_EJB_CREATE) { - for (Iterator i = edd.getCmpFieldDescIterator(); i.hasNext();) { - FieldJdbcDesc fd = (FieldJdbcDesc) i.next(); - if (firstLv) { - firstLv = false; - } else { - lf.append(", "); - lv.append(", "); - } - lf.append(fd.getJdbcFieldName()); - lv.append("?"); - } - mSqlStmt = - "insert into " + edd.getJdbcTableName() - + " (" + lf + ") values (" + lv + ")"; - } else if (mKind == METHOD_FINDER_BY_PK) { - for (Iterator i = edd.getCmpFieldDescIterator(); i.hasNext();) { - FieldJdbcDesc fd = (FieldJdbcDesc) i.next(); - if (fd.isPrimaryKey()) { - if (firstLv) { - firstLv = false; - } else { - lf.append(", "); - lv.append(" and "); - } - lf.append(fd.getJdbcFieldName()); - lv.append(fd.getJdbcFieldName() + "=?"); - } - } - - mSqlStmt = - "select " + lf + " from " + edd.getJdbcTableName() - + " where " + lv; - } else if ((mKind == METHOD_FINDER_SIMPLE) - || (mKind == METHOD_FINDER_ENUM) - || (mKind == METHOD_FINDER_COL)) { - if (!((MethodJdbcCmp1Desc) methodDesc).hasWhereClause()) { - throw new Error("No WHERE clause defined for the finder method '" - + method.toString() + "'"); - } - ArrayList posParams = new ArrayList(); - String clauseWhere = parseWhere (((MethodJdbcCmp1Desc) methodDesc).getWhereClause(), posParams); - for (Iterator i = edd.getCmpFieldDescIterator(); i.hasNext();) { - FieldJdbcDesc fd = (FieldJdbcDesc) i.next(); - if (fd.isPrimaryKey()) { - if (firstLf) { - firstLf = false; - } else { - lf.append(", "); - } - lf.append(fd.getJdbcFieldName()); - } - } - - mSqlStmt = - "select " + lf + " from " + edd.getJdbcTableName() - + " " + clauseWhere; - mParamWhereList = new ArrayList(); - for (int i = 0; i < posParams.size(); i++) { - int pos = ((Integer) posParams.get(i)).intValue(); - if (pos >= params.length) { - throw new Error("Wrong parameters number between the method definition and the WHERE clause of the method '" + method + "'"); - } - VcParamWhere vpw = new VcParamWhere(params[pos], pos + 1); - mParamWhereList.add(vpw); - } - } else if (mKind == METHOD_EJB_REMOVE) { - for (Iterator i = edd.getCmpFieldDescIterator(); i.hasNext();) { - FieldJdbcDesc fd = (FieldJdbcDesc) i.next(); - if (fd.isPrimaryKey()) { - if (firstLv) { - firstLv = false; - } else { - lv.append(" and "); - } - lv.append(fd.getJdbcFieldName() + "=?"); - } - } - - mSqlStmt = - "delete from " + edd.getJdbcTableName() - + " where " + lv; - } else if (mKind == METHOD_EJB_LOAD) { - for (Iterator i = edd.getCmpFieldDescIterator(); i.hasNext();) { - FieldJdbcDesc fd = (FieldJdbcDesc) i.next(); - if (firstLf) { - firstLf = false; - } else { - lf.append(", "); - } - lf.append(fd.getJdbcFieldName()); - if (fd.isPrimaryKey()) { - if (firstLv) { - firstLv = false; - } else { - lv.append(" and "); - } - lv.append(fd.getJdbcFieldName() + "=?"); - } - } - - mSqlStmt = - "select " + lf + " from " + edd.getJdbcTableName() - + " where " + lv; - } else if (mKind == METHOD_EJB_STORE) { - for (Iterator i = edd.getCmpFieldDescIterator(); i.hasNext();) { - FieldJdbcDesc fd = (FieldJdbcDesc) i.next(); - if (fd.isPrimaryKey()) { - if (firstLv) { - firstLv = false; - } else { - lv.append(" and "); - } - lv.append(fd.getJdbcFieldName() + "=?"); - } else { - if (firstLf) { - firstLf = false; - } else { - lf.append(", "); - } - lf.append(fd.getJdbcFieldName() + "=?"); - } - } - mSqlStmt = - "update " + edd.getJdbcTableName() - + " set " + lf + " where " + lv; - } - } else if (dd instanceof EntityJdbcCmp2Desc) { - // ejbSelect() methods - boolean isEjbSelect = false; - if (mName.startsWith("ejbSelect") - && javax.ejb.EntityBean.class.isAssignableFrom(declClass)) { - isEjbSelect = true; - } - if (isEjbSelect) { - if (java.util.Collection.class.equals(method.getReturnType())) { - mKind = METHOD_EJB_SELECT_COL; - } else if (java.util.Set.class.equals(method.getReturnType())) { - mKind = METHOD_EJB_SELECT_SET; - } else { - mKind = METHOD_EJB_SELECT_SIMPLE; - } - } - if (isFinder || isEjbSelect) { - mParamList = new ArrayList(); - for (int p = 0; p < params.length; p++) { - mParamList.add(new VcParam(params[p], dd)); - } - if (isEjbSelect) { - try { - resFieldOfEjbql = getResField((MethodCmp2Desc) methodDesc); - if (resFieldOfEjbql.getType().getTypeCode() == PType.TYPECODE_REFERENCE) { - if (((MethodCmp2Desc) methodDesc).isResultTypeMappingRemote()) { - isEjbqlReturnRemoteBean = true; - } else { - isEjbqlReturnLocalBean = true; - } - } - } catch (DeploymentDescException e) { - throw new Error("Error while the EJB-QL parsing of '" + method.toString() - + "': " + e.getMessage()); - } - } else if (!isFinderByPk()) { - // finder method other than findByPrimaryKey: parse the EJBQL query to check the query - try { - getResField((MethodCmp2Desc) methodDesc); - } catch (DeploymentDescException ignore) { - GenIC.logger.log(BasicLevel.WARN, "Warning: Error while the EJB-QL parsing of '" + method.toString() - + "': " + ignore.getMessage()); - } - } - } - - } - - // System.out.print("VcMethod: "+method.toString()); - // System.out.println(toString()); - } - - protected EjbqlQueryTreeHolder queryTreeHolder = null; - - /** - * Check the query, and return the resfield. - */ - private org.objectweb.medor.api.Field getResField(MethodCmp2Desc md) throws DeploymentDescException { - if (queryTreeHolder == null) { - try { - queryTreeHolder = new EjbqlQueryTreeHolder(md, md.getQueryNode(), null, manager); - } catch (Exception e) { - throw new DeploymentDescException("ejbql query does not map to the persistent schema",e); - } - } - return queryTreeHolder.getResField(); - } - - /** - * @return the string representation of the java default value for the cmp field (ie "0 "for int, "null" for object ...) - */ - public String getDefaultValue() { - return mDefaultValue; - } - - /** - * Parses Strings with syntax "WHERE summary like ?" - * where is a decimal integer that indexes (starting by 0) - * the parameters in the findByXXX method for CMP1. - * @param fragment - * @param pos - * @return - * @author: Santiago Gala (sgala@hisitech.com) - */ - private String parseWhere(String fragment, List pos) { - StringTokenizer parseWhere = new StringTokenizer(fragment, "?\n", true); - int numpos = pos.size(); - String newWhere = ""; - String tok; - while (parseWhere.hasMoreTokens()) { - tok = parseWhere.nextToken(); - String numVar = ""; - if (Character.isDigit(tok.charAt(0))) { - for (int i = 0; tok.length() > i && Character.isDigit(tok.charAt(i)); i++) { - numVar += tok.charAt(i); - } - if (numVar.length() > 0) { - newWhere += tok.substring(numVar.length(), tok.length()); - pos.set(numpos - 1, (Object) new Integer(Integer.parseInt(numVar) - 1)); - } - } else { - newWhere += tok; - if (tok.charAt(0) == '?') { - pos.add(new Integer(numpos++)); - } - } - } - return newWhere; - } - - /** - * @return Return the name of the method - */ - public String getName() { - return mName; - } - - /** - * @return Return the name of the method with the first letter capitalized - */ - public String getCapName() { - return mCapName; - } - - /** - * @return Return the string representation of the formal parameters list (ie "int p1, String p2") - */ - public String getFormalParameters() { - return mFormalParameters.toString(); - } - - /** - * @return Return the string representation of the actual parameters list (ie "p1, p2") - */ - public String getActualParameters() { - return mActualParameters.toString(); - } - - /** - * @return Return the string representation of the exception list of the method - */ - public String getExceptionList() { - return mExceptionList.toString(); - } - - /** - * @return Return true if the method throws the javax.ejb.createException exception - */ - public boolean canThrowCreate() { - return canThrowCreate; - } - - /** - * @return Return the string representation of the security signature of the method - */ - public String getSecuritySignature() { - if (mSecuritySignature == null) { - throw new Error("VcMethod.getSecuritySignature() not available for the method '" - + mMethod.toString() + "'"); - } - return mSecuritySignature; - } - - /** - * @return Return the transactional attribute associated to the method - */ - public int getTxAttribute() { - if (mTxAttribute == MethodDesc.TX_NULL) { - throw new Error("VcMethod.getTxAttribute() not available for the method '" - + mMethod.toString() + "'"); - } - return mTxAttribute; - } - - /** - * @return Return the name of the return type of the method - */ - public String getReturnType() { - return mReturnType; - } - - /** - * @return the string representation of the wrapper type for the field - */ - public String getWrapperType() { - return mWrapperType; - } - - - /** - * @return Return false because we are not able to know if a finder method is a FinderAll method !! - */ - public boolean isFinderAll() { - // How to known a finder is a finderAll !? - return false; - } - - /** - * @return Return true if the method is the findByPrimaryKey() method - */ - public boolean isFinderByPk() { - return (mKind == METHOD_FINDER_BY_PK); - } - - /** - * @return Return true if the method is a finder method that returns a unique object - */ - public boolean isFinderSimple() { - return (mKind == METHOD_FINDER_SIMPLE); - } - - /** - * @return Return true if the method is a finder method that returns a Enumeration - */ - public boolean isFinderEnum() { - return (mKind == METHOD_FINDER_ENUM); - } - - /** - * @return Return true if the method is a finder method that returns a Collection - */ - public boolean isFinderCol() { - return (mKind == METHOD_FINDER_COL); - } - - /** - * @return Return true if the method is an ejbSelect method that returns a unique object - */ - public boolean isEjbSelectSimple() { - return (mKind == METHOD_EJB_SELECT_SIMPLE); - } - - /** - * @return Return true if the method is an ejbSelect method that returns a Set - */ - public boolean isEjbSelectSet() { - return (mKind == METHOD_EJB_SELECT_SET); - } - - /** - * @return Return true if the method is an ejbSelect method that returns a Collection - */ - public boolean isEjbSelectCol() { - return (mKind == METHOD_EJB_SELECT_COL); - } - - /** - * @return Return true if the method is a finder/select method that return a remote bean - */ - public boolean isEjbqlReturnRemoteBean() { - return isEjbqlReturnRemoteBean; - } - - /** - * @return Return true if the method is a finder/select method that return a local bean - */ - public boolean isEjbqlReturnLocalBean() { - return isEjbqlReturnLocalBean; - } - - /** - * @return Return true if the method is home.create() - */ - public boolean isCreate() { - return (mKind == METHOD_CREATE); - } - - /** - * @return Return true if the method is bean.ejbCreate() - */ - public boolean isEjbCreate() { - return (mKind == METHOD_EJB_CREATE); - } - - /** - * @return Return true if the method is bean.ejbPostCreate() - */ - public boolean isEjbPostCreate() { - return (mKind == METHOD_EJB_POST_CREATE); - } - - /** - * @return Return true if the method is EJBObject.remove() method - */ - public boolean isRemoveThis() { - return (mKind == METHOD_REMOVE_THIS); - } - - /** - * @return Return true if the method is home.remove(primarykey) - */ - public boolean isRemovePk() { - return (mKind == METHOD_REMOVE_PK); - } - - /** - * @return Return true if the method is home.remove(handle); - */ - public boolean isRemoveHandle() { - return (mKind == METHOD_REMOVE_HANDLE); - } - - /** - * @return Return true if the method is bean.ejbRemove() - */ - public boolean isEjbRemove() { - return (mKind == METHOD_EJB_REMOVE); - } - - /** - * @return Return true if the method is bean.ejbLoad() - */ - public boolean isEjbLoad() { - return (mKind == METHOD_EJB_LOAD); - } - - /** - * @return Return true if the method is bean.ejbStore() - */ - public boolean isEjbStore() { - return (mKind == METHOD_EJB_STORE); - } - - /** - * @return Return true if the method is bean.setEntityContext() - */ - public boolean isEjbSetEntityContext() { - return (mKind == METHOD_EJB_SET_ENTITY_CONTEXT); - } - - /** - * @return Return true if the method is bean.ejbActivate() - */ - public boolean isEjbActivate() { - return (mKind == METHOD_EJB_ACTIVATE); - } - - /** - * Only for CMP1 finder methods - * @return Return the string representation of the SQL statement associated to the method - */ - public String getSqlStmt() { - if (mSqlStmt == null) { - throw new Error("VcMethod.getSqlStmt() not available for the method '" - + mMethod.toString() + "'"); - } - return mSqlStmt; - } - - - /** - * @return Return the Class array of the parameters of the method - */ - public Class[] getParameterTypes() { - return parameterTypes; - } - - /** - * @return Return the number of the parameters of the method - */ - public int getParametersNumber() { - return parameterTypes.length; - } - - - /** - * Only for CMP1 finder methods - * @return Return the VcParamWhere list of the method - */ - public Vector getParamWhereList() { - if (mParamWhereList == null) { - throw new Error("VcMethod.getParamWhereList() not available for the method '" - + mMethod.toString() + "'"); - } - return (new Vector(mParamWhereList)); - } - - - /** - * @return Return the VcParam list of the method - */ - public Vector getParamList() { - if (mParamList == null) { - throw new Error("VcMethod.getParamList() not available for the method '" - + mMethod.toString() + "'"); - } - return (new Vector(mParamList)); - } - - - /** - * @return Return the index of the method. This is a unique index for each method of a bean. - */ - public int getMethodIndex() { - return methodIndex; - } - - /** - * Only for CMP2 finder/select methods - * @return Return the Medor field of tuple result of an Finder/Select method - */ - public org.objectweb.medor.api.Field getResFieldOfEjbql() { - return resFieldOfEjbql; - } - - /** - * Only for CMP2 finder/select methods - * @return Return the Medor get method name of the tuple result of an ejbSelect method - */ - public String getTupleGetter() { - PType type = resFieldOfEjbql.getType(); - switch(type.getTypeCode()) { - case PType.TYPECODE_BOOLEAN: - return "getBoolean"; - case PType.TYPECODE_BYTE: - return "getByte"; - case PType.TYPECODE_CHAR: - return "getChar"; - case PType.TYPECODE_DATE: - return "getDate"; - case PType.TYPECODE_DOUBLE: - return "getDouble"; - case PType.TYPECODE_FLOAT: - return "getFloat"; - case PType.TYPECODE_INT: - return "getInt"; - case PType.TYPECODE_LONG: - return "getLong"; - case PType.TYPECODE_SERIALIZED: - return "getObject"; - case PType.TYPECODE_SHORT: - return "getShort"; - case PType.TYPECODE_STRING: - return "getString"; - case PType.TYPECODE_BIGDECIMAL: - case PType.TYPECODE_REFERENCE: - case PType.TYPECODE_BYTEARRAY: - case PType.TYPECODE_CHARARRAY: - case PType.TYPECODE_OBJBOOLEAN: - case PType.TYPECODE_OBJBYTE: - case PType.TYPECODE_OBJCHAR: - case PType.TYPECODE_OBJDOUBLE: - case PType.TYPECODE_OBJFLOAT: - case PType.TYPECODE_OBJINT: - case PType.TYPECODE_OBJLONG: - case PType.TYPECODE_OBJSHORT: - default: - return "getObject"; - } - } - - /** - * Only for CMP2 finder/select methods - * @return Return true is the return type of the Medor getter method of the tuple result of an ejbSelect method is a primitive type - */ - public boolean isTupleGetterPrimitive() { - PType type = resFieldOfEjbql.getType(); - switch(type.getTypeCode()) { - case PType.TYPECODE_BOOLEAN: - case PType.TYPECODE_BYTE: - case PType.TYPECODE_CHAR: - case PType.TYPECODE_DOUBLE: - case PType.TYPECODE_FLOAT: - case PType.TYPECODE_INT: - case PType.TYPECODE_LONG: - case PType.TYPECODE_SHORT: - return true; - default: - return false; - } - } - - /** - * Only for CMP2 finder/select methos - * @return Return the associated class of the Medor getter method of the tuple result of an ejbSelect method when it's a primtive type - */ - public String getTupleGetterObjectClass() { - PType type = resFieldOfEjbql.getType(); - switch(type.getTypeCode()) { - case PType.TYPECODE_BOOLEAN: - return "Boolean"; - case PType.TYPECODE_BYTE: - return "Byte"; - case PType.TYPECODE_CHAR: - return "Char"; - case PType.TYPECODE_DOUBLE: - return "Double"; - case PType.TYPECODE_FLOAT: - return "Float"; - case PType.TYPECODE_INT: - return "Integer"; - case PType.TYPECODE_LONG: - return "Long"; - case PType.TYPECODE_SHORT: - return "Short"; - default: - return "Object"; - } - } - - /** - * Split a dot separated path into tokens - * @param path input path to split - * @return Return the string array of the splited token - */ - String[] splitPath(String path) { - StringTokenizer st = new StringTokenizer(path, "."); - String[] ret = new String[st.countTokens()]; - for (int i = 0; i < ret.length; i++) { - ret[i] = st.nextToken(); - } - return ret; - } - - /** - * Gets an empty array if no parameters and return an array of objects of the parameters if any - * @return array of objects - */ - public String getArrayObjectParameters() { - if (mArrayObjectParameters.length() == 0) { - return "new Object[0]"; - } else { - return "new Object[] {" + mArrayObjectParameters.toString() + "}"; - } - } - - - /** - * @return Return a string representation of the VcMethod object for debug use - */ - public String toString() { - StringBuffer ret = new StringBuffer(); - ret.append("\n Name = " + getName()); - ret.append("\n CapName = " + getCapName()); - ret.append("\n FormalParameters = " + getFormalParameters()); - ret.append("\n ActualParameters = " + getActualParameters()); - ret.append("\n ExceptionList = " + getExceptionList()); - if (mSecuritySignature != null) { - ret.append("\n SecuritySignature = " + getSecuritySignature()); - } - if (mTxAttribute != MethodDesc.TX_NULL) { - ret.append("\n TxAttribute = " + getTxAttribute()); - } - ret.append("\n ReturnType = " + getReturnType()); - ret.append("\n isFinderByPk = " + isFinderByPk()); - ret.append("\n isFinderSimple = " + isFinderSimple()); - ret.append("\n isFinderEnum = " + isFinderEnum()); - ret.append("\n isFinderCol = " + isFinderCol()); - ret.append("\n isCreate = " + isCreate()); - ret.append("\n isEjbCreate = " + isEjbCreate()); - ret.append("\n isRemoveThis = " + isRemoveThis()); - ret.append("\n isRemovePk = " + isRemovePk()); - ret.append("\n isRemoveHandle = " + isRemoveHandle()); - ret.append("\n isEjbRemove = " + isEjbRemove()); - ret.append("\n isEjbLoad = " + isEjbLoad()); - ret.append("\n isEjbStore = " + isEjbStore()); - ret.append("\n isEjbSetEntityContext = " + isEjbSetEntityContext()); - ret.append("\n isEjbActivate = " + isEjbActivate()); - ret.append("\n isEjbSelectSimple = " + isEjbSelectSimple()); - ret.append("\n isEjbSelectSet = " + isEjbSelectSet()); - ret.append("\n isEjbSelectCol = " + isEjbSelectCol()); - if (mSqlStmt != null) { - ret.append("\n SqlStmt = " + getSqlStmt()); - } - if (mParamWhereList != null) { - ret.append("\n ParamWhereList = " + getParamWhereList()); - } - return (ret.toString()); - } - -} diff --git a/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/VcParam.java b/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/VcParam.java deleted file mode 100644 index 024f3d86ac82e8105c3ae3ad5154c16963be8bff..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/VcParam.java +++ /dev/null @@ -1,111 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.generators.genic; - -import org.ow2.jonas.deployment.ejb.BeanDesc; -import org.ow2.jonas.lib.ejb21.JavaType; -import org.ow2.jonas.lib.ejb21.jorm.JormType; - - -/** - * This class is the "Velocity context" for a parameter of a finder/select method for CMP2 only, - * used in the Velocity Templates. - * @author Helene Joanin : Initial developer - */ -public class VcParam { - - /** - * Type's name of the parameter - */ - private String mTypeName = null; - - /** - * JORM type's name of the parameter - */ - private String mJormTypeName = null; - - /** - * true if the parameter is a local bean - */ - private boolean mIsEjbLocal = false; - /** - * In case the parameter is a local bean, name of this local bean - */ - private String mEjbName = null; - - /** - * VcParam Constructor - * @param type parameter class - * @param dd bean descriptor - */ - VcParam(Class type, BeanDesc dd) { - mTypeName = JavaType.getName(type); - mJormTypeName = JormType.getPTypeDef(type, false); - mIsEjbLocal = javax.ejb.EJBLocalObject.class.isAssignableFrom(type); - if (mIsEjbLocal) { - BeanDesc bdp = dd.getDeploymentDesc().getBeanDescWithLocalInterface(mTypeName); - if (bdp == null) { - throw new Error("VcParam: Cannot get the BeanDesc associated to the interface local '" + mTypeName + "'"); - } - mEjbName = bdp.getEjbName(); - } - } - - /** - * @return Returns the type's name of the parameter - */ - public String getTypeName() { - return mTypeName; - } - - /** - * @return Returns the JORM type's name of the parameter - */ - public String getJormType() { - return mJormTypeName; - } - - /** - * @return Returns true if the parameter is a local bean - */ - public boolean isEjbLocal() { - return mIsEjbLocal; - } - - /** - * @return If the parameter is a local bean, returns the name of this local bean - */ - public String getEjbName() { - if (!isEjbLocal()) { - throw new Error("VcParam.getEjbName(): No BeanDesc associated to the param '" - + mTypeName + "'"); - } - return mEjbName; - } - -} - diff --git a/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/VcParamWhere.java b/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/VcParamWhere.java deleted file mode 100644 index 13aeb77c0e897f25aea596fd9d8f52abe24c0cd0..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/VcParamWhere.java +++ /dev/null @@ -1,180 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.generators.genic; - -import org.ow2.jonas.lib.ejb21.JavaType; - -/** - * This class is the "Velocity context" for a parameter of a where clause of finder method for CMP1 only, - * used in the Velocity Templates. - * @author Helene Joanin : Initial developer - */ -public class VcParamWhere { - - /** - * name of the parameter (ie "p1") - */ - private String mName; - - /** - * type's name of the parameter - */ - private String mTypeName; - - /** - * SQL type's name of the parameter - */ - private String mSqlTypeName; - - /** - * SQL setter method name for this parameter - */ - private String mSqlSetMethod; - - /** - * true if the parameter hasn't a java primitive type - */ - private boolean hasNotPrimitiveType; - - /** - * true if the parameter has the java.math.BigInteger type - */ - private boolean hasBigIntegerType; - - /** - * true if the parameter has a Serializable type - */ - private boolean hasSerializableType; - - /** - * true if the parameter has a java.lang.* type except java.lang.string - */ - private boolean hasJavaLangTypeExceptString; - - /** - * VcParamWhere Constructor - * @param type parameter's type - * @param position parameter's position in the where clause - */ - VcParamWhere(Class type, int position) { - - mName = new String("p" + position); - mTypeName = JavaType.getName(type); - mSqlTypeName = JavaType.getSQLType(type); - mSqlSetMethod = JavaType.getSQLSetMethod(type); - if (mSqlSetMethod == null) { - throw new Error("Cannot container persistence manage the type '" - + type.getName() + "'"); - } - hasNotPrimitiveType = !type.isPrimitive(); - hasBigIntegerType = type.equals(java.math.BigInteger.class); - hasSerializableType = "setSerializable".equals(mSqlSetMethod); - hasJavaLangTypeExceptString = false; - if (type.getPackage() != null) { - if ("java.lang".equals(type.getPackage().getName()) - && !java.lang.String.class.equals(type)) { - hasJavaLangTypeExceptString = true; - } - } - - // System.out.print("VcParamWhere: "+type.toString()); - // System.out.println(toString()); - } - - /** - * @return Returns the name of the parameter (ie "p1") - */ - public String getName() { - return mName; - } - - /** - * @return Returns the type's name of the parameter - */ - public String getTypeName() { - return mTypeName; - } - - /** - * @return Returns the SQL type's name of the parameter - */ - public String getSqlTypeName() { - return mSqlTypeName; - } - - /** - * @return Returns the SQL setter method associated to the parameter - */ - public String getSqlSetMethod() { - return mSqlSetMethod; - } - - /** - * @return Returns true if the parameter's type is not a java primitive type - */ - public boolean hasNotPrimitiveType() { - return hasNotPrimitiveType; - } - - /** - * @return Returns true if the parameter's type is java.math.BigInteger - */ - public boolean hasBigIntegerType() { - return hasBigIntegerType; - } - - /** - * @return Returns true if the parameter's type is Serializable - */ - public boolean hasSerializableType() { - return hasSerializableType; - } - - /** - * @return true if the parameter's type is a java.lang.* type except java.lang.string - */ - public boolean hasJavaLangTypeExceptString() { - return hasJavaLangTypeExceptString; - } - - /** - * @return Returns a string representation of the VcParamWhere object to debug use - */ - public String toString() { - StringBuffer ret = new StringBuffer(); - ret.append("\n Name = " + getName()); - ret.append("\n TypeName = " + getTypeName()); - ret.append("\n SqlTypeName = " + getSqlTypeName()); - ret.append("\n SqlSetMethod = " + getSqlSetMethod()); - ret.append("\n hasNotPrimitiveType = " + hasNotPrimitiveType()); - ret.append("\n hasBigIntegerType = " + hasBigIntegerType()); - ret.append("\n hasSerializableType = " + hasSerializableType()); - ret.append("\n hasJavaLangTypeExceptString = " + hasJavaLangTypeExceptString()); - return (ret.toString()); - } - -} diff --git a/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/VelocityMonologLogger.java b/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/VelocityMonologLogger.java deleted file mode 100644 index e2f5a229d02863d88443f2bf2b3f55b68697deec..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/VelocityMonologLogger.java +++ /dev/null @@ -1,85 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2011 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genic; - -import org.apache.velocity.runtime.RuntimeServices; -import org.apache.velocity.runtime.log.LogSystem; -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; - -/** - * Wrap the velocity logger into a Monolog logger. - * @author Florent Benoit - */ -public class VelocityMonologLogger implements LogSystem { - - /** - * Monolog logger. - */ - private Logger monologLogger = null; - - /** - * Constructor. - * @param monologLogger the given monolog logger. - */ - public VelocityMonologLogger(final Logger monologLogger) { - this.monologLogger = monologLogger; - } - - /** - * Do nothing. - * @param services velocity services - * @throws Exception if there are errors. - */ - public void init(final RuntimeServices services) throws Exception { - } - - /** - * Logs the given message at the specified level. - * @param level the given level of log - * @param message the given message - */ - public void logVelocityMessage(final int level, final String message) { - switch (level) { - case LogSystem.WARN_ID: - monologLogger.log(BasicLevel.WARN, message); - break; - case LogSystem.ERROR_ID: - monologLogger.log(BasicLevel.ERROR, message); - break; - case LogSystem.INFO_ID: - monologLogger.log(BasicLevel.INFO, message); - break; - case LogSystem.DEBUG_ID: - monologLogger.log(BasicLevel.DEBUG, message); - break; - default: - // log in debug by default - monologLogger.log(BasicLevel.DEBUG, message); - } - - } - -} diff --git a/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/wrapper/GenicServiceWrapper.java b/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/wrapper/GenicServiceWrapper.java deleted file mode 100644 index f3b4b0bd150c564655992f3017e8b6cdfb09356e..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/java/org/ow2/jonas/generators/genic/wrapper/GenicServiceWrapper.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.genic.wrapper; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import org.ow2.jonas.lib.bootstrap.LoaderManager; -import org.ow2.jonas.service.ServiceException; - - -/** - * GenIC wrapper - * - * @author Camilleri Jerome : Initial developer - */ -public class GenicServiceWrapper { - - - /** - * GenIC fully qualified classname - */ - private static final String GENIC_CLASSNAME = "org.ow2.jonas.generators.genic.GenIC"; - - /** - * Private empty constructor for utility class - */ - private GenicServiceWrapper() { }; - - /** - * Wrapper around GenIC.main(String[]) method - * @param args GenIC args - * @throws ServiceException If GenIC fails or if Reflection errors occurs - */ - public static void callGenic(final String[] args) throws ServiceException { - LoaderManager lm = LoaderManager.getInstance(); - ClassLoader old = null; - - try { - ClassLoader ext = lm.getExternalLoader(); - if (ext == null) { - throw new ServiceException("cannot get tools classloader"); - } - old = Thread.currentThread().getContextClassLoader(); - Thread.currentThread().setContextClassLoader(ext); - - Class manager = ext.loadClass(GENIC_CLASSNAME); - Method m = manager.getDeclaredMethod("main", new Class[] {String[].class}); - m.invoke(null, new Object[] {args}); - } catch (InvocationTargetException e) { - if (e.getTargetException() instanceof Error) { - throw (Error) e.getTargetException(); - } else if (e.getTargetException() instanceof ServiceException) { - throw (ServiceException) e.getTargetException(); - } else { - throw new ServiceException("Problems when invoking main method from GenIC", e.getTargetException()); - } - } catch (Exception e) { - throw new ServiceException("Problems when invoking main method from GenIC" , e); - } finally { - if (old != null) { - Thread.currentThread().setContextClassLoader(old); - } - } - } -} - diff --git a/jonas/modules/generators/jonas-genic/src/main/resources/META-INF/jonas-genic.bnd b/jonas/modules/generators/jonas-genic/src/main/resources/META-INF/jonas-genic.bnd deleted file mode 100644 index 27958e826b71ef9dbb315dc20fe81a5dd1187a86..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/resources/META-INF/jonas-genic.bnd +++ /dev/null @@ -1,53 +0,0 @@ -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 2007 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -Export-Package org.ow2.jonas.generators.genic.* - -# ant, avalon, log4j, bcel imported by velocity but not used -Import-Package !org.apache.tools.ant.*,\ - !org.apache.avalon.framework.logger,\ - !org.apache.bcel.*,\ - !org.apache.log4j.*,\ - !org.jdom.*,\ - !com.werken.*,\ - !junit.*,\ - !org.objectweb.jorm.mapper.fos.*,\ - !org.apache.xerces.dom,\ - !org.apache.xml.*,\ - * - -DynamicImport-Package org.objectweb.jorm.naming.*, \ - org.objectweb.perseus.persistence.api, \ - org.ow2.jonas.lib.ejb21.ha,\ - javax.* - --exportcontents org.objectweb.jorm.generator.*, \ - org.objectweb.jorm.mapper.rdb.*, \ - org.apache.velocity.runtime.log - -# asm needed by jorm-compiler -Embed-Dependency velocity-dep;inline=true, \ - jorm-compiler;inline=true, \ - asm;inline=true, \ - asm-attrs;inline=true, \ - fastrmic;inline=true diff --git a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/GenICMacros.vm b/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/GenICMacros.vm deleted file mode 100644 index dfd637eaff4efab3fef83084c2e0cc0d78419d94..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/GenICMacros.vm +++ /dev/null @@ -1,86 +0,0 @@ -## --------------------------------------------------------------------------- -## JOnAS: Java(TM) Open Application Server -## Copyright (C) 1999-2004 Bull S.A. -## Contact: jonas-team@objectweb.org -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -## USA -## -## Initial developer(s): Benoit PELLETIER. -## Contributor(s): ______________________________________. -## -## --------------------------------------------------------------------------- -## $Id$ -## --------------------------------------------------------------------------- - -## Macros library for GenIC - -############################################################################### -## -## macros 'beforeThrowRemoteException' and 'afterThrowRemoteException" aim to -## add a try catch block in order to perform some post exception process like mapping -## to protocol depending exception -## - -#macro( beforeThrowRemoteException ) -// Velocity: beforeThrowRemoteException: $Id$ -try { -#end## - -#macro( afterThrowRemoteException ) - // Velocity: afterThrowRemoteException: $Id$ -} catch ( RemoteException e) { - - // check if rmi exception mapping is needed - if yes the method rethrows it - RmiUtility.rethrowRmiException(e) ; - // if not, throws the exception just as it is - throw e ; -} -#end - -#macro( timerVariablesDeclaration) - long requestStartTime ; - long businessStartTime = -1; - long businessStopTime; - long requestStopTime; -#end - -#macro( getRequestStartTime) - requestStartTime = new Date().getTime(); -#end - -#macro( getRequestStopTime) - requestStopTime = new Date().getTime(); -#end - -#macro( getBusinessStartTime) - businessStartTime = new Date().getTime(); -#end - -#macro( getBusinessStopTime) - businessStopTime = new Date().getTime(); -#end - -#macro( updateEJBMonitoringData) - if (bf instanceof JSessionFactory) { - JSessionFactory jsf = (JSessionFactory) bf; - if (jsf.getMonitoringEnabled()) { - MonitoringEvent monitoringEvent = new MonitoringEvent(System.identityHashCode(jsf), jsf.getEJBName(), - jsf.getContainer().getFileName(), "$package.$class.$M.getName()($M.getFormalParameters())", - businessStartTime, businessStopTime, requestStartTime, requestStopTime); - jsf.getDispatcher().dispatch(monitoringEvent); - } - } -#end diff --git a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JEntityCmp2.vm b/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JEntityCmp2.vm deleted file mode 100644 index ff118e1955acbf75282941a8356ba343b48aec11..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JEntityCmp2.vm +++ /dev/null @@ -1,1564 +0,0 @@ -## --------------------------------------------------------------------------- -## JOnAS: Java(TM) Open Application Server -## Copyright (C) 1999-2004 Bull S.A. -## Contact: jonas-team@objectweb.org -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -## USA -## -## --------------------------------------------------------------------------- -## $Id$ -## --------------------------------------------------------------------------- - -// -// This class is the bean specific part of the container managed persistence with JDBC. -// Generated by JOnAS's GenIC tool via Velocity. -// DO NOT EDIT THIS FILE. - -#set( $IsAutomaticPk = $dd.isAutomaticPk() ) -#set( $IsUndefinedPK = $dd.isUndefinedPK() ) -package $package; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.Iterator; - -import javax.ejb.CreateException; -import javax.ejb.DuplicateKeyException; -import javax.ejb.EJBException; -import javax.ejb.EJBHome; -import javax.ejb.EJBObject; -import javax.ejb.EntityContext; -import javax.ejb.FinderException; -import javax.ejb.ObjectNotFoundException; -import javax.ejb.NoSuchObjectLocalException; -import javax.ejb.RemoveException; - -import org.objectweb.util.monolog.api.BasicLevel; - -import org.objectweb.jorm.api.PAccessor; -import org.objectweb.jorm.api.PBinding; -import org.objectweb.jorm.api.PClassMapping; -import org.objectweb.jorm.api.PException; -import org.objectweb.jorm.api.PExceptionExistingDSI; -import org.objectweb.jorm.api.PExceptionIO; -import org.objectweb.jorm.naming.api.PExceptionNaming; -import org.objectweb.jorm.naming.api.PBinder; -import org.objectweb.jorm.naming.api.PExceptionExistingName; -import org.objectweb.jorm.naming.api.PName; -import org.objectweb.jorm.naming.api.PNameCoder; -import org.objectweb.jorm.naming.api.PNameGetter; -import org.objectweb.jorm.naming.api.PNamingContext; -import org.objectweb.jorm.type.api.PType; -import org.objectweb.jorm.type.api.PTypeSpace; - -import org.ow2.jonas.lib.ejb21.jorm.Coder; -import org.ow2.jonas.lib.ejb21.jorm.GenClassElement; -import org.ow2.jonas.lib.ejb21.jorm.GenClassListener; -import org.ow2.jonas.lib.ejb21.jorm.MedorFactory; -import org.ow2.jonas.lib.ejb21.jorm.PObject; -import org.ow2.jonas.lib.ejb21.jorm.PObjectHome; -import org.ow2.jonas.lib.ejb21.JEntityContext; -import org.ow2.jonas.lib.ejb21.JEntitySwitch; -import org.ow2.jonas.lib.ejb21.JEntityFactory; -import org.ow2.jonas.lib.ejb21.TraceEjb; -import org.ow2.jonas.lib.ejb21.MarshallTool; -import org.ow2.jonas.lib.ejb21.JavaType; -import org.ow2.jonas.lib.ejb21.ExceptionHelper; - -import org.objectweb.medor.api.MedorException; -import org.objectweb.medor.api.TupleStructure; -import org.objectweb.medor.expression.api.ParameterOperand; -import org.objectweb.medor.expression.lib.BasicParameterOperand; -import org.objectweb.medor.tuple.api.Tuple; -import org.objectweb.medor.tuple.api.TupleCollection; -import org.objectweb.medor.type.lib.PTypeSpaceMedor; - -public class $class extends ${dd.getJormStateClassName()} implements PAccessor, - ${dd.getJormAccessorClassName()} -#if($pkIsUserClass) - ,${dd.getJormPNameGetterClassName()} -#end -{ - -################################### -############## Fields ############# -################################### -#foreach ($F in $fieldList) -// private ${F.getTypeName()} ${F.getName()}; - -#end -#foreach ($F in $cmrList) -#* *##if ($F.getRsr().isTargetMultiple()) - private ${F.getGenClassName()} ${F.getName()} = null; - private boolean ${F.getName()}loaded = false; -#* *##else - private ${F.getTypeName()} ${F.getName()} = null; -#* *##end -// private PName ${F.getName()}PName = null; - -#end - protected JEntityContext ejbContext = null; - private MedorFactory factory = null; - private boolean setPkAllowed = false; - private boolean selectForUpdate = false; - - public PNameGetter encode(String field, PName pname) - throws PExceptionNaming { - PNameCoder coder = factory.getPNameCoder(field); - if (pname == null) { - pname = coder.getNull(); - } - PNameGetter result = (PNameGetter) coder.encodeAbstract(pname); - return result; - } - - public PName decode(String field, PNameGetter png, Object ctx) - throws PExceptionNaming { - PNameCoder coder = factory.getPNameCoder(field); - if (png == null) { - return coder.getNull(); - } else { - return coder.decodeAbstract(png, ctx); - } - } - -######################################################################## -############ Accessors (EJB 2.0 & Jorm) for the CMP fields ############# -######################################################################## -#foreach ($F in $fieldList) - //-------------------------------------------------------------// - //------------------- Field ${F.getName()} - //-------------------------------------------------------------// - // EJB 2.0 Getter - public ${F.getTypeName()} ${F.getGetterName()}() { - //TraceEjb.interp.log(BasicLevel.DEBUG, "return " + ${F.jormGetter()}()); -#* *##if (!$F.isMustBeConvert()) - return (${F.getTypeName()}) ${F.jormGetter()}(); -#* *##else - return (${F.getTypeName()}) ${F.getConvertClassName()}.toMemory(${F.jormGetter()}()); -#* *##end - } - - // EJB 2.0 Setter - public void ${F.getSetterName()}(${F.getTypeName()} val) { - //TraceEjb.interp.log(BasicLevel.DEBUG,"param=" + val); -#* *##if ($F.isPrimaryKey()) -#set( $pkField = ${F.jormSetter()} ) - if (!setPkAllowed) { - throw new IllegalStateException("Must not reset a primary key value(${F.jormGetter()}() field)"); - } -#* *##end - ejbContext.setDirty(true); -#* *##if (!$F.isMustBeConvert()) - this.${F.jormSetter()}((${F.getJormTypeName()}) val); -#* *##else - this.${F.jormSetter()}((${F.getJormTypeName()}) ${F.getConvertClassName()}.toStorage(val)); -#* *##end - } - - /* - // Jorm Getter - public ${F.getJormTypeName()} paGet${F.getNameUpperFirst()}() { - //TraceEjb.interp.log(BasicLevel.DEBUG, "return " + ${F.jormGetter()}()); -#* *##if (!$F.isMustBeConvert()) - return (${F.getJormTypeName()}) ${F.jormGetter()}(); -#* *##else - return (${F.getJormTypeName()}) ${F.getConvertClassName()}.toStorage(${F.jormGetter()}()); -#* *##end - } - - // Jorm Setter - public void paSet${F.getNameUpperFirst()}(${F.getJormTypeName()} val) { - //TraceEjb.interp.log(BasicLevel.DEBUG, "param=" + val + " / current=" + ${F.jormGetter()}()); -#* *##if (!$F.isMustBeConvert()) - this.${F.jormSetter()}((${F.getTypeName()}) val); -#* *##else - this.${F.jormSetter()}((${F.getTypeName()}) ${F.getConvertClassName()}.toMemory(val)); -#* *##end - } - */ - -#end ##foreach -######################################################################## -############ Accessors (EJB 2.0 & Jorm) for the CMR fields ############# -######################################################################## -#foreach ($F in $cmrList) - //-------------------------------------------------------------// - //------------------- Field ${F.getName()} - //-------------------------------------------------------------// - - private void update${F.getName()}() { -#* *##if ($F.getRsr().isTargetMultiple()) - try { - Object conn = factory.getConnection(null); - ${F.jormSetter()}(((PNamingContext) factory.getPNameCoder("${F.getName()}")) - .export(conn, ${F.getName()}.gcGetPBinding(), - ((PBinding) ejbContext.getEntitySwitch()).getPName())); - } catch (PException e) { - throw new RuntimeException("Impossible to fetch a PName of the '${F.getName()}' field", e); - } -#* *##else - if (${F.getName()} != null) { - ${F.jormSetter()}(((PObject) ${F.getName()}).getPName()); - } else { - ${F.jormSetter()}(factory.getPNameCoder("${F.getName()}").getNull()); - } -#* *##end - } - -#* *##if (!$F.getRsr().isTargetMultiple()) - private void loadCMR${F.getUFLName()}() { - if (${F.getName()} == null) { - //TraceEjb.interp.log(BasicLevel.DEBUG,"load reference" + ${F.jormGetter()}()); - try { - ${F.getName()} = (${F.getTypeName()}) getPObject(${F.jormGetter()}(), true); - } catch (PException pe) { - TraceEjb.logger.log(BasicLevel.ERROR, "impossible to load the reference", pe); - throw new EJBException("Impossible to load the reference", pe); - } - } - } - - private void clear${F.getUFLName()}() throws RemoveException { - loadCMR${F.getUFLName()}(); - if (${F.getName()} != null) { -#* *##if ($F.getRsr().mustCascade()) -#* *##else - ((${F.getOppositeHelperFQClassName()}) ${F.getName()}).jonasSet${F.getOppositeUFLCMRName()}(null); -#* *##end - } - ejbContext.setDirty(true); - // ${F.jormSetter()}(null); - ${F.getName()} = null; - update${F.getName()}(); - } - -#* *##else - private void loadGC${F.getUFLName()}() { - if (! ${F.getName()}loaded) { - try { - ${F.getName()}.read(${F.jormGetter()}(), null, jonasGetCurrentTransaction()); - ${F.getName()}loaded = true; - } catch (PException pe) { - Exception e = getInnerException(pe); - TraceEjb.logger.log(BasicLevel.ERROR, "impossible to load the CMR field", e); - throw new EJBException("Impossible to load the CMR field", e); - } - } - } -#* *##end - - // ------------------------ E J B G E T T E R ---------------------- // - //-----------------------------------------------------------------------// - public ${F.getTypeName()} get${F.getUFLName()}() { - //TraceEjb.coherence.log(BasicLevel.DEBUG, "bean pname:" + ((JEntitySwitch) ejbContext.getEntitySwitch()).getPrimaryKey()); - //TraceEjb.coherence.log(BasicLevel.DEBUG, "${F.getName()}=" + ${F.getName()}); - //TraceEjb.coherence.log(BasicLevel.DEBUG, "${F.getName()}PName=" + ${F.jormGetter()}()); - //if (${F.jormGetter()}() != null) { - // TraceEjb.interp.log(BasicLevel.DEBUG, "${F.getName()}PName.isNull(): " + ${F.jormGetter()}().isNull()); - //} -#* *##if (!$F.getRsr().isTargetMultiple()) - loadCMR${F.getUFLName()}(); -#* *##else - loadGC${F.getUFLName()}(); -#* *##end - //TraceEjb.coherence.log(BasicLevel.DEBUG, "return " + ${F.getName()}); - return ${F.getName()}; - } - - // ------------------------ E J B S E T T E R ---------------------- // - //-----------------------------------------------------------------------// - public void set${F.getUFLName()}(${F.getTypeName()} val) { -## -## -#* *##if ($F.getRsr().isTargetMultiple())## MULTIVALUED ###################### - if (val == null) { - throw new IllegalArgumentException("Assign a null value to a multivalued relationship"); - } - loadGC${F.getUFLName()}(); - if (val != ${F.getName()}) { - ejbContext.setDirty(true); - // clear the current gen class - ${F.getName()}.clear(); - - // iterate over the parameter to add each element into the - // current gen class - for(Iterator it = val.iterator(); it.hasNext();) { - ${F.getName()}.add(it.next()); - } - } -## -## -#* *##elseif ($F.isOOb())## ONE - ONE bidrectional############################ - // Load the reference for the coherence management - loadCMR${F.getUFLName()}(); - if (val != null) { - // Remove the relation of the bean which references the parameter - // if there is a relation - ${F.getHelperClassName()} element; - try { - element = ((${F.getOppositeHelperFQClassName()}) val).jonasGet${F.getOppositeUFLCMRName()}(); - } catch (NoSuchObjectLocalException e) { - throw new IllegalArgumentException(e.getMessage()); - } - if (element != null) { - //TraceEjb.coherence.log(BasicLevel.DEBUG, "Remove the relation of the bean which references the parameter" + element); - try { - element.jonasSet${F.getUFLName()}(null); - } catch (Exception e) { - throw new EJBException("impossible to remove the relation of the bean which references the parameter", e); - } - } - - // link the parameter to the current bean (reverse relation coherence) - //TraceEjb.coherence.log(BasicLevel.DEBUG, "link the parameter to the current bean"); - ${F.getHelperClassName()} current = (${F.getHelperClassName()}) -#* *##if ($dd.getLocalClass()) - ejbContext.get2EJBLocalObject(); -#* *##else - ejbContext.getEJBObject(); -#* *##end - if (current == null) { - current = (${F.getHelperClassName()}) ejbContext.getEJBObject(); - } - ((${F.getOppositeHelperFQClassName()}) val).jonasSet${F.getOppositeUFLCMRName()}(current); - } - - // remove the relation of the current referenced bean to this - if (${F.getName()} != null) { - ((${F.getOppositeHelperFQClassName()}) ${F.getName()}).jonasSet${F.getOppositeUFLCMRName()}(null); - } - if (val == null || !val.equals(${F.getName()})) { - ejbContext.setDirty(true); - // ${F.jormSetter()}(null); - ${F.getName()} = val; - update${F.getName()}(); - } -## -## -#* *##elseif ($F.isMOb())## MANY - ONE bidrectional########################## - loadCMR${F.getUFLName()}(); - if (val == null || !val.equals(${F.getName()})) { - ${F.getHelperClassName()} current; - try { - current = (${F.getHelperClassName()}) -#* *##if ($dd.getLocalClass()) - ejbContext.get2EJBLocalObject(); -#* *##else - ejbContext.getEJBObject(); -#* *##end - if (${F.getName()} != null) { - ((${F.getOppositeHelperFQClassName()}) ${F.getName()}).jonasRemove${F.getOppositeUFLCMRName()}(current); - } - if (val != null) { - ((${F.getOppositeHelperFQClassName()}) val).jonasAdd${F.getOppositeUFLCMRName()}(current); - } - } catch (NoSuchObjectLocalException e) { - throw new IllegalArgumentException(e.getMessage()); - } - ejbContext.setDirty(true); - // ${F.jormSetter()}(null); - ${F.getName()} = val; - update${F.getName()}(); - } -## -## -#* *##else#################################################################### - throw new EJBException("Error in generated Setter method"); -#* *##end - //TraceEjb.coherence.log(BasicLevel.DEBUG, "end: ${F.getName()}=" + ${F.getName()}); - //TraceEjb.coherence.log(BasicLevel.DEBUG, "end: ${F.getName()}PName=" + ${F.jormGetter()}()); - } -## - - // ------------------- J O R M A C C E S S O R S ------------------- // - //-----------------------------------------------------------------------// - - private PName ${F.jormGetter()}() { - try { - return super.${F.jormGetter()}((java.lang.Object) null); - } catch (PException e) { - throw new RuntimeException(e); - } - } - - private void ${F.jormSetter()}(PName pname) { - try { - super.${F.jormSetter()}(pname, (java.lang.Object) null); - } catch (PException e) { - throw new RuntimeException(e); - } - } - - // Jorm Getter - public PName paGet${F.getUFLName()}(java.lang.Object conn) - throws PExceptionIO { - //TraceEjb.coherence.log(BasicLevel.DEBUG, "${F.getName()}PName=" + ${F.jormGetter()}()); - //TraceEjb.coherence.log(BasicLevel.DEBUG, "${F.getName()}=" + ${F.getName()}); -#* *##if ($F.getRsr().isTargetMultiple()) - if (${F.jormGetter()}() == null) { - try { - ${F.jormSetter()}(((PNamingContext) factory.getPNameCoder("${F.getName()}")) - .export(conn, ${F.getName()}.gcGetPBinding(), - ((PBinding) ejbContext.getEntitySwitch()).getPName())); - } catch (PExceptionIO e) { - throw e; - } catch (PException e) { - throw new PExceptionIO(e, "Impossible to fetch a PName of the '${F.getName()}' field"); - } - } -#* *##else - if (${F.jormGetter()}() == null) { - if (${F.getName()} != null) { - ${F.jormSetter()}(((PObject) ${F.getName()}).getPName()); - } else { - ${F.jormSetter()}(factory.getPNameCoder("${F.getName()}").getNull()); - } - } -#* *##end - //TraceEjb.coherence.log(BasicLevel.DEBUG,"return " + ${F.jormGetter()}()); - return ${F.jormGetter()}(); - } - - // Jorm Setter - public void paSet${F.getUFLName()}(PName o, java.lang.Object conn) - throws PExceptionIO { - //TraceEjb.coherence.log(BasicLevel.DEBUG,""); -#* *##if (!$F.getRsr().isTargetMultiple()) - this.${F.getName()} = null; -#* *##end - ${F.jormSetter()}(o); - //TraceEjb.coherence.log(BasicLevel.DEBUG, "${F.getName()}PName: " + ${F.jormGetter()}()); - //if (${F.jormGetter()}() != null) - // TraceEjb.coherence.log(BasicLevel.DEBUG, "${F.getName()}PName.isNull(): " + ${F.jormGetter()}().isNull()); - } - - - // IMPLEMENTATION OF THE ${F.getHelperFQClassName()} INTERFACE // - //-------------------------------------------------------------// -#* *##if ($F.getRsr().isTargetMultiple())################################# - public ${F.getTypeName()} jonasGet${F.getUFLName()}() { - //TraceEjb.coherence.log(BasicLevel.DEBUG,"return " + ${F.getName()}); - loadGC${F.getUFLName()}(); - return ${F.getName()}; - } - - public void jonasSet${F.getUFLName()}(${F.getTypeName()} val) { - //TraceEjb.coherence.log(BasicLevel.DEBUG,""); - if (val == null) { - throw new IllegalArgumentException("Assign a null value to a relationship"); - } - loadGC${F.getUFLName()}(); - if (val != ${F.getName()}) { - ejbContext.setDirty(true); - // clear the current gen class - ${F.getName()}.clear(); - - // iterate over the parameter to add each element into the - // current gen class - for (Iterator it = val.iterator(); it.hasNext(); ) { - ${F.getName()}.add(it.next(), false); - } - } - //TraceEjb.coherence.log(BasicLevel.DEBUG, "END"); - } - - public void jonasAdd${F.getUFLName()}(${F.getOppositeHelperFQClassName()} bean) { - //TraceEjb.coherence.log(BasicLevel.DEBUG, ""); - loadGC${F.getUFLName()}(); - // In case of a MANY-MANY relation both gen class are mapped over the - // the same hosting structure (rdb table). Then the coherence must be - // done in memory in both sides, and in the support once time by the - // master gen class. - ${F.getName()}.add(bean, false); - } - - public void jonasRemove${F.getUFLName()}(${F.getOppositeHelperFQClassName()} bean) { - //TraceEjb.coherence.log(BasicLevel.DEBUG,""); - loadGC${F.getUFLName()}(); - // In case of a MANY-MANY relation both gen class are mapped over the - // the same hosting structure (rdb table). Then the coherence must be - // done in memory in both sides, and in the support once time by the - // master gen class. - ${F.getName()}.remove(bean, false); - } - - public void jonasElemWritten${F.getUFLName()}(${F.getOppositeHelperFQClassName()} bean) { - //${F.getName()}.doNotWrite((PObject) bean); - } - -#* *##else## MONO VALUED FIELD############################################# - public ${F.getOppositeHelperFQClassName()} jonasGet${F.getUFLName()}() { - loadCMR${F.getUFLName()}(); - //TraceEjb.coherence.log(BasicLevel.DEBUG, "return " + ${F.getName()}); - return (${F.getOppositeHelperFQClassName()}) ${F.getName()}; - } - - public void jonasSet${F.getUFLName()}(${F.getOppositeHelperFQClassName()} val) { - //TraceEjb.coherence.log(BasicLevel.DEBUG,""); - if (val == null || !val.equals(${F.getName()})) { - ejbContext.setDirty(true); - // ${F.jormSetter()}(null); - ${F.getName()} = (${F.getTypeName()}) val; - update${F.getName()}(); - } - } -#* *##end## - - -#end##foreach - -#foreach ($M in $methodList) - -############################################### -############## ejbActivate ################ -############################################### -#if ($M.isEjbActivate()) - /* - * ejbActivate() method - */ - public void ejbActivate() -#* *##if ( $M.getExceptionList().length() > 0 ) - throws $M.getExceptionList() -#* *##end - { - setPkAllowed = false; - super.ejbActivate(); - } - -############################################### -############## setEntityContext ################ -############################################### -#elseif ($M.isEjbSetEntityContext()) - /* - * setEntityContext(javax.ejb.EntityContext) method - */ - public void setEntityContext(javax.ejb.EntityContext p1) -#* *##if ( $M.getExceptionList().length() > 0 ) - throws $M.getExceptionList() -#* *##end - { - setPkAllowed = false; - ejbContext = (JEntityContext) p1; - if (factory == null) { - factory = (MedorFactory) ejbContext.getEntityFactory(); - PClassMapping gcm = null; - selectForUpdate = factory.getSelectForUpdate(); -#* *##foreach ($F in $cmrList) -#* *##if ($F.getRsr().isTargetMultiple()) - //initialize the multivalued relation ${F.getName()} - ${F.getName()} = new ${F.getGenClassName()}(); - gcm = factory.getGenClassMapping("${F.getName()}"); - ${F.getName()}.setPClassMapping(gcm); - ${F.getName()}.setEntityContext(ejbContext); - ${F.getName()}.setListener(new ${F.getName()}Of${dd.getEjbName()}Listener(this)); - try { - ${F.getName()}.setPBinding(gcm.createPBinding()); - } catch (PException e) { - TraceEjb.interp.log(BasicLevel.ERROR, - "Impossible to create a PBinding for the relation ${F.getName()}", e); - throw new EJBException("Impossible to create a PBinding for the relation ${F.getName()}", e); - } -#* *##end -#* *##end - } - super.setEntityContext(p1); - } - -######################################### -############## EjbCreate ################ -######################################### -#elseif ($M.isEjbPostCreate()) - /* - * ejbPostCreate(.....) method - */ - public void $M.getName()($M.getFormalParameters()) -#if ( $M.getExceptionList().length() > 0 ) - throws $M.getExceptionList() -#end - { - //TraceEjb.interp.log(BasicLevel.DEBUG, "differed writing at create"); - super.$M.getName()($M.getActualParameters()); - PBinding pb = (PBinding) ejbContext.getEntitySwitch(); - Object conn = null; - try { - conn = factory.getConnection(null); - ejbContext.setDirty(false); - pb.write(conn, this); - } catch (Exception e) { - TraceEjb.logger.log(BasicLevel.ERROR, - "Failed to create bean: ", getInnerException(e)); - throw new EJBException("Failed to create bean: " + getInnerException(e).getMessage()); - } finally { - try { - if (conn != null) - factory.releaseConnection(conn); - } catch (Exception e) { - TraceEjb.logger.log(BasicLevel.ERROR, "Impossible to release connection", e); - } - } - } - -#elseif ($M.isEjbCreate()) - /* - * ejbCreate(.....) method - */ - public PName _$M.getName()($M.getFormalParameters()) -#if ( $M.getExceptionList().length() > 0 ) - throws $M.getExceptionList() -#end - { - //TraceEjb.interp.log(BasicLevel.DEBUG,""); - // Container-managed fields must be set to the Java language default values -#foreach ($F in $fieldList) - this.${F.jormSetter()}($F.getDefaultValue()); -#end -#foreach ($F in $cmrList) -#* *##if ($F.getRsr().isTargetMultiple()) - ${F.getName()}.reset(); - ${F.jormSetter()}(null); -#* *##else - jonasSet${F.getUFLName()}(null); -#* *##end -#end - setPkAllowed = true; - super.${M.getName()}(${M.getActualParameters()}); - -#if ( $IsAutomaticPk || $IsUndefinedPK ) // If Pk is auto-incremented, we must set the value of the pk - // Only type Integer is valid - this.$pkField(new Integer(factory.calculateAutomaticPk())); -#end - setPkAllowed = false; - PBinding pb = (PBinding) ejbContext.getEntitySwitch(); - //TraceEjb.interp.log(BasicLevel.DEBUG, "pb=" + pb); - Object conn = null; - try { - conn = factory.getConnection(null); -#if($pkIsUserClass) - pb.export(conn, this); -#else - pb.export(conn, JavaType.toObject(get${fieldPkList.elementAt(0).getNameUpperFirst()}())); -#end - //TraceEjb.interp.log(BasicLevel.DEBUG, "PName=" + pb.getPName()); - // The write operation has been differed in the postCreate, to resolve the - // issue when a legacy database has "not null" foreign keys. - return pb.getPName(); - } catch (PExceptionExistingDSI pe) { - throw new DuplicateKeyException(pe.getMessage()); - } catch (PExceptionExistingName pe) { - throw new DuplicateKeyException(pe.getMessage()); - } catch (PExceptionNaming pe) { - throw new CreateException("The pk fields has not been initialized the ejbCreate method of the bean ${dd.getEjbName()}"); - } catch (Exception e) { - TraceEjb.logger.log(BasicLevel.ERROR, - "Failed to create bean: ", getInnerException(e)); - throw new CreateException("Failed to create bean: " + getInnerException(e).getMessage()); - } finally { - try { - if (conn != null) - factory.releaseConnection(conn); - } catch (Exception e) { - TraceEjb.logger.log(BasicLevel.ERROR, "Impossible to release connection", e); - } - } - } - -########################################## -############## FinderByPk ################ -########################################## -#elseif ($M.isFinderByPk()) - /* - * ejbFindByPrimaryKey(...) method - */ - public PName ejbFindByPrimaryKey($pk pk) - throws FinderException { - // Translate the pk into a PName - Coder c = (Coder) ejbContext.getEntityFactory().getLocalHome(); - if (c == null) { - c = (Coder) ejbContext.getEntityFactory().getHome(); - } - PName pn = null; - try { - pn = c.decode(pk); - } catch (Exception e) { - TraceEjb.logger.log(BasicLevel.ERROR, - "Failed to decode the primary key:" + pk, e); - throw new FinderException("Failed to decode the primary key:" + pk); - } - return ejbFindByPrimaryKey(pn); - } - - /* - * ejbFindByPrimaryKey(...) method - */ - public PName ejbFindByPrimaryKey(PName pn) - throws FinderException { - //TraceEjb.interp.log(BasicLevel.DEBUG, pn); - PBinding pb = (PBinding) ejbContext.getEntitySwitch(); - //TraceEjb.interp.log(BasicLevel.DEBUG, "pb=" + pb); - //TraceEjb.interp.log(BasicLevel.DEBUG, "pb.getStatus()=" + pb.getStatus()); - Object conn = null; - try { - conn = factory.getConnection(null); - pb.bind(pn); - if (!pb.exist(conn)) { - // TraceEjb.interp.log(BasicLevel.DEBUG, - // "Object not found in database (ejbFindByPrimaryKey(" - // + pn + "))"); - pb.unbind(); - throw new ObjectNotFoundException("Object not found in database (ejbFindByPrimaryKey(" + pn + "))"); - } - return pn; - } catch (ObjectNotFoundException oe) { - throw oe; - } catch (Exception e) { - TraceEjb.logger.log(BasicLevel.ERROR, - "Failed to find bean from database in ejb$M.getCapName()" + pn, - getInnerException(e)); - throw new FinderException("Failed to find bean from database in ejb$M.getCapName()"); - } finally { - //TraceEjb.interp.log(BasicLevel.DEBUG, "pb.getStatus()=" + pb.getStatus()); - try { - if (conn != null) - factory.releaseConnection(conn); - } catch (Exception e) { - TraceEjb.logger.log(BasicLevel.ERROR, "Impossible to release connection", e); - } - } - } - -######################################### -############## EjbRemove ################ -######################################### -#elseif ($M.isEjbRemove()) - - private boolean ejbRemoveCalled = false; - - /* - * ejbRemove() method - * This implementation unexports the bean, and remove the data on the - * support. - */ - public void ejbRemove() -#if ( $M.getExceptionList().length() > 0 ) - throws $M.getExceptionList() -#end - { - if (ejbRemoveCalled) { - // In case of cascade delete loops. - return; - } - ejbRemoveCalled = true; - try { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - super.ejbRemove(); - -#foreach ($F in $cmrList) -#* *##if ($F.getRsr().mustCascade()) -#* *##if ($F.getRsr().isTargetMultiple()) - loadGC${F.getUFLName()}(); - for (Iterator it = ${F.getName()}.iterator(); it.hasNext();) { - javax.ejb.EJBLocalObject el = (javax.ejb.EJBLocalObject) it.next(); - el.remove(); - } -#* *##else - loadCMR${F.getUFLName()}(); - if (${F.getName()} != null) { - ${F.getName()}.remove(); - } -#* *##end -#* *##end -#end - -#foreach ($F in $cmrList) -#* *##if ($F.isMMb()) ## MANY - MANY bidirectional - loadGC${F.getUFLName()}(); // needed for coherence of remove. - ${F.getName()}.clear(); // MM -#* *##elseif ($F.isOMb()) ## ONE - MANY bidirectional - loadGC${F.getUFLName()}(); // needed for coherence of remove. - ${F.getName()}.gcClear(true); // OM -#* *##elseif ($F.isMOb()) ## MANY - ONE bidirectional - set${F.getUFLName()}(null); // MO -#* *##else - clear${F.getUFLName()}(); // OO -#* *##end -#end - } finally { - ejbRemoveCalled = false; // in case of rollback - } - PBinding pb = (PBinding) ejbContext.getEntitySwitch(); - Object conn = null; - try { - conn = factory.getConnection(null); - PName pn = (PName) ((JEntitySwitch) pb).getPrimaryKey(); - - //TraceEjb.interp.log(BasicLevel.DEBUG, "Remove the bean " + pn); - pb.bind((PName) ((JEntitySwitch) pb).getPrimaryKey()); - pb.unexport(conn); - pb.write(conn, this); - //pb.unbind(); - -#foreach ($F in $cmrList) -#* *##if ($F.getRsr().isTargetMultiple()) - //TraceEjb.interp.log(BasicLevel.DEBUG, "Remove the multivalued CMR ${F.getName()}"); - if (${F.jormGetter()}() == null) { - ${F.jormSetter()}(((PNamingContext) factory.getPNameCoder("${F.getName()}")) - .export(conn, ${F.getName()}.gcGetPBinding(), pn)); - } - pb = ${F.getName()}.gcGetPBinding(); - pb.bind(${F.jormGetter()}()); - pb.unexport(conn); - ${F.getName()}.write(${F.jormGetter()}(), conn); - //pb.unbind(); -#* *##end -#end - ejbContext.setDirty(false); - } catch (Exception e) { - TraceEjb.logger.log(BasicLevel.ERROR, "Impossible to remove", getInnerException(e)); -#if ( $M.getExceptionList().indexOf("RemoveException") != -1 ) - throw new RemoveException(e.getMessage()); -#else - throw new EJBException(e.getMessage()); -#end - } finally { - try { - if (conn != null) - factory.releaseConnection(conn); - } catch (Exception e) { - TraceEjb.logger.log(BasicLevel.ERROR, "Impossible to release connection", e); - } - } - } - -####################################### -############## EjbLoad ################ -####################################### -#elseif ($M.isEjbLoad()) - /* - * ejbLoad() method - */ - public void ejbLoad() -#if ( $M.getExceptionList().length() > 0 ) - throws $M.getExceptionList() -#end - { - Object conn = null; - PBinding pb = (PBinding) ejbContext.getEntitySwitch(); - try { - conn = factory.getConnection(null); - pb.bind((PName) ((JEntitySwitch) pb).getPrimaryKey()); - pb.read(conn, this, jonasGetCurrentTransaction(), selectForUpdate); -## -## Be careful the relations must be load after the bean, because the PNames of -## the gen class are assigned by the paSetXXX methods. -## -#foreach ($F in $cmrList) -#* *##if ($F.getRsr().isTargetMultiple()) - // lazy loading of the multivalued relations ${F.getName()} - ${F.getName()}loaded = false; -#* *##end -#end - ejbContext.setDirty(false); - } catch (Exception e) { - TraceEjb.logger.log(BasicLevel.ERROR, "Jorm could not load bean instance"); - throw new EJBException(getInnerException(e)); - } finally { - //TraceEjb.interp.log(BasicLevel.DEBUG, "pb.getStatus()=" + pb.getStatus()); - try { - if (conn != null) - factory.releaseConnection(conn); - } catch (Exception e) { - TraceEjb.logger.log(BasicLevel.ERROR, "Impossible to release connection", e); - } - } - super.ejbLoad(); - } - -######################################## -############## EjbStore ################ -######################################## -#elseif ($M.isEjbStore()) - /* - * ejbStore() method - */ - public void ejbStore() -#if ( $M.getExceptionList().length() > 0 ) - throws $M.getExceptionList() -#end - { - // bean method must be called in any case (spec EJB) - super.ejbStore(); - if (ejbContext.isDirty() -#foreach ($F in $cmrList) -#* *##if ($F.getRsr().isTargetMultiple()) - || ${F.getName()}.gcIsModified() -#* *##end -#end - ) { - // The bean or a gen class has been modified - // ==> The first allocates a connection which will be shared to - // store the modified objects - Object conn = null; - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - try { - PName pn = null; - if (ejbContext.isDirty()) { - //TraceEjb.interp.log(BasicLevel.DEBUG, "Store the bean"); - conn = factory.getConnection(null); - // The bean has been modified - PBinding pb = (PBinding) ejbContext.getEntitySwitch(); - pn = (PName) ((JEntitySwitch) pb).getPrimaryKey(); - pb.bind(pn); - // try a fix for #306186 : Don't set dirty when - // write raised an exception. - ejbContext.setDirty(false); - pb.write(conn, this); - } -#foreach ($F in $cmrList) -#* *##if ($F.getRsr().isTargetMultiple()) - if (${F.getName()}.gcIsModified()) { - if (${F.jormGetter()}()==null) { - if (pn == null) - pn = (PName) ejbContext.getEntitySwitch().getPrimaryKey(); - try { - ${F.jormSetter()}(((PNamingContext) factory.getPNameCoder("${F.getName()}")) - .export(conn, ${F.getName()}.gcGetPBinding(), pn)); - } catch (PExceptionIO e) { - throw e; - } catch (PException e) { - throw new PExceptionIO(e, "Impossible to fetch a PName of the '${F.getName()}' field"); - } - } - //TraceEjb.interp.log(BasicLevel.DEBUG, "Store the gen class ${F.getName()}"); - if (conn == null) - conn = factory.getConnection(null); - // store the multivalued relations ${F.getName()} - // because it has been modified - ${F.getName()}.write(${F.jormGetter()}(), conn); - } -#* *##end -#end - } catch (Exception e) { - TraceEjb.logger.log(BasicLevel.ERROR, "Impossible to store", getInnerException(e)); - throw new EJBException(e); - } finally { - try { - if (conn != null) - factory.releaseConnection(conn); - } catch (Exception e) { - TraceEjb.logger.log(BasicLevel.ERROR, "Impossible to release connection", e); - } - } - } - } - -############################################ -############## FinderSimple ################ -############################################ -#elseif ($M.isFinderSimple()) - /* - * ejbFindXXX(...) method returning only 1 PK - */ - public PName ejb$M.getCapName()($M.getFormalParameters()) - throws FinderException { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - TupleCollection tc = null; - Object conn = null; - try { - ParameterOperand[] params = new BasicParameterOperand[${M.getParametersNumber()}]; -#* *##set($pc = 1)## The parameter counter starts always to 1 -#* *##set($idx = 0)## the array index starts to 0 -#* *##foreach($t in $M.getParamList()) -#* *##if (${t.isEjbLocal()}) - // EJBLocalObject param case - if (p$pc == null) { - PClassMapping pcm = (PClassMapping) factory.getContainer().getBeanFactory("${t.getEjbName()}"); - params[$idx] = new BasicParameterOperand(PTypeSpaceMedor.PNAME, - "?$pc", - pcm.getPBinder().getNull()); - } else { - params[$idx] = new BasicParameterOperand(PTypeSpaceMedor.PNAME, - "?$pc", - ((PObject) p$pc).getPName()); - } -#* *##else - params[$idx] = new BasicParameterOperand(${t.getJormType()}, "?$pc", p$pc); -#* *##end -#* *##set($idx = $idx + 1) -#* *##set($pc = $pc + 1) -#* *##end - - conn = factory.getConnection(null); - - tc = factory.evaluate(conn, ${M.getMethodIndex()}, params); - - //Build the result - if (tc.isEmpty()) { - // TraceEjb.interp.log(BasicLevel.DEBUG, - // "The bean was not found in the support"); - throw new ObjectNotFoundException("The bean was not found in the support"); - } else { - PName pn = (PName) tc.getTuple().getObject(tc.getMetaData().getSize()); - //TraceEjb.interp.log(BasicLevel.DEBUG, "pn: " + pn); - if (!tc.isLast()) { - throw new FinderException("There is more than one object in response to the ${M.getCapName()} single-object finder"); - } else { - return pn; - } - } - } catch (PException e) { - TraceEjb.logger.log(BasicLevel.ERROR, "Problem during the evaluation of the finder method ${M.getCapName()}", getInnerException(e)); - throw new FinderException("An error occured during the evaluation of the ${M.getCapName()} request:" - + e.getMessage()); - } catch (MedorException e) { - TraceEjb.logger.log(BasicLevel.ERROR, "Problem during the evaluation of the finder method ${M.getCapName()}", getInnerException(e)); - throw new FinderException("An error occured during the evaluation of the ${M.getCapName()} request:" - + e.getMessage()); - } finally { - if (tc != null) { - try { - tc.close(); - } catch (Exception ignore) { - TraceEjb.interp.log(BasicLevel.ERROR,"failed to close the TupleCollection in the finder method ${M.getCapName()}", - ignore); - } - } - if (conn != null) { - try { - factory.releaseConnection(conn); - } catch (Exception e) { - TraceEjb.logger.log(BasicLevel.ERROR, "impossible to close a connection", e); - } - } - } - //look in the interposition objects (local or remote) the return type !!! - } - - -#elseif ($M.isFinderEnum() || $M.isFinderCol()) -########################################## -############## isFinderAll ############### -########################################## -#**##if ($M.isFinderAll()) - public $M.getReturnType() ejb$M.getCapName()($M.getFormalParameters()) - throws FinderException { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - Object conn = null; - try { - conn = factory.getConnection(null); - ArrayList beans = new ArrayList(); - for (Iterator it = factory.getPNameIterator(conn); it.hasNext(); ) { - beans.add(it.next()); - } -#* *##if ($M.isFinderEnum()) ## the result is an Enumeration - return java.util.Collections.enumeration(beans); -#* *##else ## the result is a collection - return beans; -#* *##end - } catch (Exception e) { - TraceEjb.logger.log(BasicLevel.ERROR, "Impossible to find all objects", getInnerException(e)); - throw new FinderException("Impossible to find all objects" + e); - } finally { - try { - if (conn != null) { - factory.releaseConnection(conn); - } - } catch (Exception e) { - TraceEjb.logger.log(BasicLevel.ERROR, "Impossible to release connection", e); - } - } - } -########################################## -####### FinderEnum or FinderColl########## -########################################## -#**##else - /* - * ejbFindXXX(...) method returning a java.util.Enumeration or a java.util.Collection - */ - public $M.getReturnType() ejb$M.getCapName()($M.getFormalParameters()) - throws FinderException { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - TupleCollection tc = null; - Object conn = null; - try { - ParameterOperand[] params = new BasicParameterOperand[${M.getParametersNumber()}]; -#* *##set($pc = 1)## The parameter counter starts always to 1 -#* *##set($idx = 0)## the array index starts to 0 -#* *##foreach($t in $M.getParamList()) -#* *##if (${t.isEjbLocal()}) - // EJBLocalObject param case - if (p$pc == null) { - PClassMapping pcm = (PClassMapping) factory.getContainer().getBeanFactory("${t.getEjbName()}"); - params[$idx] = new BasicParameterOperand(PTypeSpaceMedor.PNAME, - "?$pc", - pcm.getPBinder().getNull()); - } else { - params[$idx] = new BasicParameterOperand(PTypeSpaceMedor.PNAME, - "?$pc", - ((PObject) p$pc).getPName()); - } -#* *##else - params[$idx] = new BasicParameterOperand(${t.getJormType()}, "?$pc", p$pc); -#* *##end -#* *##set($idx = $idx + 1) -#* *##set($pc = $pc + 1) -#* *##end - conn = factory.getConnection(null); - tc = factory.evaluate(conn, ${M.getMethodIndex()}, params); - // Build the result - ArrayList result = new ArrayList(); - if (!tc.isEmpty()) { - do { - result.add(tc.getTuple().getObject(tc.getMetaData().getSize())); - } while (tc.next()); - } -#* *##if ($M.isFinderEnum()) - return Collections.enumeration(result); -#* *##else - return result; -#* *##end - } catch (PException e) { - TraceEjb.logger.log(BasicLevel.ERROR, "Problem during the evaluation of ${M.getCapName()}", e); - throw new FinderException("An error occured during the evaluation of the ${M.getCapName()} request:" - + e.getMessage()); - } catch (MedorException e) { - TraceEjb.logger.log(BasicLevel.ERROR, "Problem during the evaluation of ${M.getCapName()}", e); - throw new FinderException("An error occured during the evaluation of the ${M.getCapName()} request:" - + e.getMessage()); - } finally { - if (tc != null) { - try { - tc.close(); - } catch (Exception ignore) { - TraceEjb.interp.log(BasicLevel.ERROR,"failed to close the TupleCollection in the finder method ${M.getCapName()}", - ignore); - } - } - if (conn != null) { - try { - factory.releaseConnection(conn); - } catch (Exception e) { - TraceEjb.logger.log(BasicLevel.ERROR, "impossible to close a connection", e); - } - } - } - } -#**##end - -############################################ -############## ejbSelect Simple|Set|Col #### -############################################ -#elseif ($M.isEjbSelectSimple() || $M.isEjbSelectSet() || $M.isEjbSelectCol()) - /* - * ejbSelectXXX(...) method - */ - public $M.getReturnType() $M.getName()($M.getFormalParameters()) -#if ( $M.getExceptionList().length() > 0 ) - throws $M.getExceptionList() -#end - { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - factory.syncForSelect(); -############ ejbSelect returning a remote bean or a local bean ############## -#* *##if ( $M.isEjbqlReturnRemoteBean() || $M.isEjbqlReturnLocalBean() ) -#* *##set( $returnLocalBean = $M.isEjbqlReturnLocalBean() ) - TupleCollection tc = null; - Object conn = null; - try { - // Build the query paramaters list - ParameterOperand[] params = new BasicParameterOperand[${M.getParametersNumber()}]; -#* *##set($pc = 1)## The parameter counter starts always to 1 -#* *##set($idx = 0)## the array index starts at 0 -#* *##foreach($t in $M.getParamList()) -#* *##if (${t.isEjbLocal()}) - // EJBLocalObject param case - if (p$pc == null) { - PClassMapping pcm = (PClassMapping) factory.getContainer().getBeanFactory("${t.getEjbName()}"); - params[$idx] = new BasicParameterOperand(PTypeSpaceMedor.PNAME, - "?$pc", - pcm.getPBinder().getNull()); - } else { - params[$idx] = new BasicParameterOperand(PTypeSpaceMedor.PNAME, - "?$pc", - ((PObject) p$pc).getPName()); - } -#* *##else - params[$idx] = new BasicParameterOperand(${t.getJormType()}, "?$pc", p$pc); -#* *##end -#* *##set($idx = $idx + 1) -#* *##set($pc = $pc + 1) -#* *##end ##foreach - conn = factory.getConnection(null); - // Evaluate the query - tc = factory.evaluate(conn, ${M.getMethodIndex()}, params); - //Build the result -#* *##if ($M.isEjbSelectSimple()) - if (tc.isEmpty()) { - // TraceEjb.interp.log(BasicLevel.DEBUG, - // "No value was not found in the support"); - throw new ObjectNotFoundException("No value was not found in the support"); - } else { - PName pn = (PName) tc.getTuple().${M.getTupleGetter()}(tc.getMetaData().getSize()); - ${M.getReturnType()} rValue = (${M.getReturnType()}) getPObject(pn, $returnLocalBean); - if (!tc.isLast()) { - throw new FinderException("There is more than one value in response to the ${M.getName()} single-value ejbSelect"); - } else { - return rValue; - } - } -#* *##elseif ($M.isEjbSelectSet()) - HashSet result = new HashSet(); - if (!tc.isEmpty()) { - do { - PName pn = (PName) tc.getTuple().${M.getTupleGetter()}(tc.getMetaData().getSize()); - Object po = getPObject(pn, $returnLocalBean); - if (!result.contains(po)) { - result.add(po); - } - } while (tc.next()); - } - return result; -#* *##elseif ($M.isEjbSelectCol()) - ArrayList result = new ArrayList(); - if (!tc.isEmpty()) { - do { - PName pn = (PName) tc.getTuple().${M.getTupleGetter()}(tc.getMetaData().getSize()); - result.add(getPObject(pn, $returnLocalBean)); - } while (tc.next()); - } - return result; -#* *##end ##elseif isEjbSelectCol() - } catch (PException e) { - TraceEjb.logger.log(BasicLevel.ERROR, "Problem during the evaluation of the ejbSelect method ${M.getName()}", e); - throw new FinderException( - "An error occured during the evaluation of the ${M.getName()} request:" - + e.getMessage()); - } catch (MedorException e) { - TraceEjb.logger.log(BasicLevel.ERROR, "Problem during the evaluation of the ejbSelect method ${M.getName()}", getInnerException(e)); - throw new FinderException( - "An error occured during the evaluation of the ${M.getName()} request:" - + e.getMessage()); - } finally { - if (tc != null) { - try { - tc.close(); - } catch (Exception ignore) { - TraceEjb.interp.log(BasicLevel.ERROR,"failed to close the TupleCollection in the finder method ${M.getName()}", - ignore); - } - } - if (conn != null) { - try { - factory.releaseConnection(conn); - } catch (Exception e) { - TraceEjb.logger.log(BasicLevel.ERROR, "impossible to close a connection", e); - } - } - - - } - -############ ejbSelect returning neither a remote bean nor a local bean ############## -#* *##else - TupleCollection tc = null; - Object conn = null; - try { - // Build the query parameters list - ParameterOperand[] params = new BasicParameterOperand[${M.getParametersNumber()}]; -#* *##set($pc = 1)## The parameter counter starts always to 1 -#* *##set($idx = 0)## the array index starts at 0 -#* *##foreach($t in $M.getParamList()) -#* *##if (${t.isEjbLocal()}) - // EJBLocalObject param case - if (p$pc == null) { - PClassMapping pcm = (PClassMapping) factory.getContainer().getBeanFactory("${t.getEjbName()}"); - params[$idx] = new BasicParameterOperand(PTypeSpaceMedor.PNAME, - "?$pc", - pcm.getPBinder().getNull()); - } else { - params[$idx] = new BasicParameterOperand(PTypeSpaceMedor.PNAME, - "?$pc", - ((PObject) p$pc).getPName()); - } -#* *##else - params[$idx] = new BasicParameterOperand(${t.getJormType()}, "?$pc", p$pc); -#* *##end -#* *##set($idx = $idx + 1) -#* *##set($pc = $pc + 1) -#* *##end ##foreach - // Evaluate the query - conn = factory.getConnection(null); - tc = factory.evaluate(conn, ${M.getMethodIndex()}, params); - //Build the result -#* *##if ($M.isEjbSelectSimple()) - if (tc.isEmpty()) { - //TraceEjb.interp.log(BasicLevel.DEBUG, - // "No value was not found in the support"); - throw new ObjectNotFoundException("No value was not found in the support"); - } else { - ${M.getReturnType()} rValue = (${M.getReturnType()}) tc.getTuple().${M.getTupleGetter()}(tc.getMetaData().getSize()); - // tc.next() causes a NPE with postgres - if (!tc.isLast()) { - throw new FinderException("There is more than one value in response to the ${M.getName()} single-value ejbSelect"); - } else { - return rValue; - } - } -#* *##elseif ($M.isEjbSelectSet()) - HashSet result = new HashSet(); - if (!tc.isEmpty()) { - do { - boolean ignoreNull = false; -#* *##if ($M.isTupleGetterPrimitive()) - ignoreNull = tc.getTuple().isDefined(tc.getMetaData().getSize()); - Object o = new $M.getTupleGetterObjectClass()(tc.getTuple().${M.getTupleGetter()}(tc.getMetaData().getSize())); -#* *##else - Object o = tc.getTuple().${M.getTupleGetter()}(tc.getMetaData().getSize()); -#* *##end - if (!ignoreNull && !result.contains(o)) { - result.add(o); - } - } while (tc.next()); - } - return result; -#* *##elseif ($M.isEjbSelectCol()) - ArrayList result = new ArrayList(); - if (!tc.isEmpty()) { - do { -#* *##if ($M.isTupleGetterPrimitive()) - // ignore null values - if (tc.getTuple().isDefined(tc.getMetaData().getSize())) { - result.add(new $M.getTupleGetterObjectClass()(tc.getTuple().${M.getTupleGetter()}(tc.getMetaData().getSize()))); - } -#* *##else - result.add(tc.getTuple().${M.getTupleGetter()}(tc.getMetaData().getSize())); -#* *##end - } while (tc.next()); - } - return result; -#* *##end ##elseif isEjbSelectCol() - } catch (PException e) { - TraceEjb.logger.log(BasicLevel.ERROR, "Problem during the evaluation of the ejbSelect method ${M.getName()}", getInnerException(e)); - throw new FinderException( - "An error occured during the evaluation of the ${M.getName()} request:" - + e.getMessage()); - } catch (MedorException e) { - TraceEjb.logger.log(BasicLevel.ERROR, "Problem during the evaluation of the ejbSelect method ${M.getName()}", getInnerException(e)); - throw new FinderException( - "An error occured during the evaluation of the ${M.getName()} request:" - + e.getMessage()); - } finally { - if (tc != null) { - try { - tc.close(); - } catch (Exception ignore) { - TraceEjb.interp.log(BasicLevel.ERROR,"failed to close the TupleCollection in the finder method ${M.getName()}", - ignore); - } - } - if (conn != null) { - try { - factory.releaseConnection(conn); - } catch (Exception e) { - TraceEjb.logger.log(BasicLevel.ERROR, "impossible to close a connection", e); - } - } - } - -#* *##end ##else elseif isEjbqlReturnRemoteBean() - } - -#end ##elseif -#end ##foreach method - -########################################## -############## getPObject ################ -########################################## - /** - * This method is used to reach a referenced bean with its pname. - */ - private Object getPObject(PName pn, boolean useLocal) throws PException { - //TraceEjb.interp.log(BasicLevel.DEBUG, "Search PObject with the pnane:" + pn); - if (pn == null || pn.isNull()) { - return null; - } - PBinder f = (PBinder) pn.getPNameManager(); - JEntityFactory ef = (JEntityFactory) f.getBinderClassMapping(); - if (useLocal) { - return ((PObjectHome) ef.getLocalHome()).getPObject(pn); - } else { - return ((PObjectHome) ef.getHome()).getPObject(pn); - } - } - - // IMPLEMENTATION OF THE PAccessor INTERFACE // - - public Object getMemoryInstance() { - return this; - } - - private static Exception getInnerException(Exception e) { - boolean last = false; - Exception res = e; - while (!last) { - if (res instanceof PException - && ((PException) res).getNestedException() != null) { - res = ((PException) res).getNestedException(); - - } else if (res instanceof MedorException - && ((MedorException) res).getNestedException() != null) { - res = ((MedorException) res).getNestedException(); - - } else if (res instanceof EJBException - && ((EJBException) res).getCausedByException() != null) { - res = ((EJBException) res).getCausedByException(); - - } else - last = true; - } - return res; - } -#if($pkIsUserClass) - // IMPLEMENTATION OF THE ${dd.getJormPNameGetterClassName()} INTERFACE // -#* *##foreach ($pkf in $fieldPkList) - public ${pkf.getJormTypeName()} pnGet${pkf.getNameUpperFirst()}(Object ctx) { -#* *##if (!$pkf.isMustBeConvert()) - return (${pkf.getJormTypeName()}) ${pkf.jormGetter()}(); -#* *##else - return (${pkf.getJormTypeName()}) ${pkf.getConvertClassName()}.toStorage(${pkf.jormGetter()}()); -#* *##end - } -#* *##end -#end - - private Object jonasGetCurrentTransaction() { - try { - Object tx = factory.getTransactionManager().getTransaction(); - //TraceEjb.logger.log(BasicLevel.DEBUG, "current transaction=" + tx); - //new Exception("Current Transaction=" + tx).printStackTrace(); - return tx; - } catch (javax.transaction.SystemException e) { - TraceEjb.logger.log(BasicLevel.ERROR, - "Cannot get the current transaction to do the read:", e); - //System.out.println("No current Transaction: " + e.getMessage()); - return null; - } - } -} - - -#foreach ($F in $cmrList) -#* *##if ($F.getRsr().isTargetMultiple()) -/** - * Listener on modifications made on ${F.getName()} - */ -class ${F.getName()}Of${dd.getEjbName()}Listener implements GenClassListener { - - private $class bean; - - protected ${F.getName()}Of${dd.getEjbName()}Listener($class bean) { - this.bean = bean; - } - - public void isLegalElement(GenClassElement gce) throws IllegalArgumentException { - try { - Object o = (${F.getOppositeHelperFQClassName()}) gce.value; - } catch (ClassCastException e) { - throw new IllegalArgumentException(e.getMessage()); - } - } - - /** - * An Element has been added - */ - public void gcAdd(GenClassElement gce) { - //TraceEjb.coherence.log(BasicLevel.DEBUG, "gce.value=" + gce.value); - //TraceEjb.coherence.log(BasicLevel.DEBUG, "gce.pname=" + gce.pname); -## -## ONE - MANY bidrectional -## -#* *##if ($F.isOMb()) - ${F.getHelperFQClassName()} localBean = - ((${F.getOppositeHelperFQClassName()}) gce.value) - .jonasGet${F.getOppositeUFLCMRName()}(); - if (localBean != null) { - //TraceEjb.coherence.log(BasicLevel.DEBUG, "remove the old relation with the element (" + localBean + ")"); - localBean.jonasRemove${F.getUFLName()}((${F.getOppositeHelperFQClassName()}) gce.value); - } - //TraceEjb.coherence.log(BasicLevel.DEBUG, "Assign the opposite cmr field(set this)"); - ((${F.getOppositeHelperFQClassName()}) gce.value) - .jonasSet${F.getOppositeUFLCMRName()}((${F.getHelperFQClassName()}) -#* *##if ($dd.getLocalClass()) - bean.ejbContext.get2EJBLocalObject() -#* *##else - bean.ejbContext.getEJBObject() -#* *##end - ); -#* *##end - -## -## MANY - MANY bidrectional -## -#* *##if ($F.isMMb()) - //TraceEjb.coherence.log(BasicLevel.DEBUG, "Assign the opposite cmr field (add this)"); - ((${F.getOppositeHelperFQClassName()}) gce.value) - .jonasAdd${F.getOppositeUFLCMRName()}((${F.getHelperFQClassName()}) -#* *##if ($dd.getLocalClass()) - bean.ejbContext.get2EJBLocalObject() -#* *##else - bean.ejbContext.getEJBObject() -#* *##end - ); -#* *##end - //TraceEjb.coherence.log(BasicLevel.DEBUG, "END"); - } - - /** - * An element has been removed - */ - public void gcRemove(GenClassElement gce, boolean delete) { - //TraceEjb.coherence.log(BasicLevel.DEBUG, "gce.value=" + gce.value); - //TraceEjb.coherence.log(BasicLevel.DEBUG, "gce.pname=" + gce.pname); -## -## ONE - MANY bidrectional -## -#* *##if ($F.isOMb()) - - ((${F.getOppositeHelperFQClassName()}) gce.value).jonasSet${F.getOppositeUFLCMRName()}(null); -#* *##end - -## -## MANY - MANY bidrectional -## -#* *##if ($F.isMMb()) - //TraceEjb.coherence.log(BasicLevel.DEBUG, "Modify the opposite cmr field (remove this)"); - ((${F.getOppositeHelperFQClassName()}) gce.value) - .jonasRemove${F.getOppositeUFLCMRName()}((${F.getHelperFQClassName()}) -#* *##if ($dd.getLocalClass()) - bean.ejbContext.get2EJBLocalObject() -#* *##else - bean.ejbContext.getEJBObject() -#* *##end - ); -#* *##end - //TraceEjb.coherence.log(BasicLevel.DEBUG, "END"); - } -} -#* *##end## relation multivalued -#end## foreach CMR - diff --git a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JEntityCmp2CoherenceItf.vm b/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JEntityCmp2CoherenceItf.vm deleted file mode 100644 index 4aad83ff8c83b001801b8a19bf4e44e31ed18bb1..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JEntityCmp2CoherenceItf.vm +++ /dev/null @@ -1,49 +0,0 @@ -## --------------------------------------------------------------------------- -## JOnAS: Java(TM) Open Application Server -## Copyright (C) 1999 Bull S.A. -## Contact: jonas-team@objectweb.org -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -## USA -## -## --------------------------------------------------------------------------- -## $Id$ -## --------------------------------------------------------------------------- - -// Start: $Id$ - -#if ($dd.getJormCoherenceHelperPackageName()) -package ${dd.getJormCoherenceHelperPackageName()}; -#end -public interface ${dd.getJormCoherenceHelperItfName()} { -#* *##foreach ($F in $cmrList) -#* *##if (!$F.isMMu() && !$F.isMOu())## -#* *##if ($F.getRsr().isTargetMultiple()) - ${F.getTypeName()} jonasGet${F.getUFLName()}(); - - void jonasSet${F.getUFLName()}(${F.getTypeName()} val); - - void jonasAdd${F.getUFLName()}(${F.getOppositeHelperFQClassName()} bean); - - void jonasRemove${F.getUFLName()}(${F.getOppositeHelperFQClassName()} bean); -#* *##else## - ${F.getOppositeHelperFQClassName()} jonasGet${F.getUFLName()}(); - - void jonasSet${F.getUFLName()}(${F.getOppositeHelperFQClassName()} val); -#* *##end## -#* *##end## -#* *##end##foreach -} -// End: $Id$ diff --git a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JEntityCmpJdbc.vm b/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JEntityCmpJdbc.vm deleted file mode 100644 index 7b2d9658e46c145884e4fa096eb9bbe0874f03c3..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JEntityCmpJdbc.vm +++ /dev/null @@ -1,622 +0,0 @@ -## --------------------------------------------------------------------------- -## JOnAS: Java(TM) Open Application Server -## Copyright (C) 1999-2004 Bull S.A. -## Contact: jonas-team@objectweb.org -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -## USA -## -## Initial developer(s): Helene Joanin. -## Contributor(s): ______________________________________. -## 01/01/18 Halas, Miroslav Miroslav.Halas@compuware.com -## javax.ejb.ObjectNotFoundException throwing -## 01/10/16 Nico.Hoogervorst@nl.compuware.com -## Support for BigInteger -## 02/08/07 Karg, Markus -## Performance improvement -## -## --------------------------------------------------------------------------- -## $Id$ -## --------------------------------------------------------------------------- - -// -// This class is the bean specific part of the container managed persistence with JDBC. -// Generated by JOnAS's GenIC tool via Velocity. -// DO NOT EDIT THIS FILE. -// Start: $Id$ - -#set( $hasPkField = $dd.hasPrimaryKeyField() ) -#if ( $hasPkField ) -#set( $pkField = $dd.getPrimaryKeyFieldName() ) -#end -#set( $IsAutomaticPk = $dd.isAutomaticPk() ) -#set( $IsUndefinedPK = $dd.isUndefinedPK() ) - -#* -* The pStmtSetWithAnyField macro allows to generate the pStmt.setXX() method -* of a PreparedStatement for a given field which is be any field. -* This macro is used in ejbCreate() and ejbStore(). -*# -#macro( pStmtSetWithAnyField $field $index ) -#if ( $field.hasNotPrimitiveType() ) - if ( this.$field.getName() == null ) { - pStmt.setNull($index, $field.getSqlTypeName()); - } else { -#end -#if ( $field.hasSerializableType() ) - pStmt.setBytes($index, MarshallTool.toBytes(this.$field.getName())); -#elseif ( $field.hasBigIntegerType() ) - pStmt.setObject($index, new java.math.BigDecimal(this.$field.getName())); -#elseif ( $field.getSqlSetMethod().equals("setObject") ) - pStmt.$field.getSqlSetMethod()($index, this.$field.getName(), $field.getSqlTypeName()); -#else - pStmt.$field.getSqlSetMethod()($index, this.$field.getName()); -#end -#if ( $field.hasNotPrimitiveType() ) - } -#end -#end - -#* -* The pStmtSetWithParam macro allows to generate the pStmt.setXX() method -* of a PreparedStatement for a given parameter. -* This macro is used in ejbFindXXSimple(), ejbFindXXCol() and ejbFindXXEnum(). -*# -#macro( pStmtSetWithParam $param $index ) -#if ( $param.hasNotPrimitiveType() ) - if ( $param.getName() == null ) { - pStmt.setNull($index, $param.getSqlTypeName()); - } else { -#end -#if ( $param.hasSerializableType() ) - pStmt.setBytes($index, MarshallTool.toBytes($param.getName())); -#elseif ( $param.hasBigIntegerType() ) - pStmt.setObject($index, new java.math.BigDecimal($param.getName())); -#elseif ( $param.getSqlSetMethod().equals("setObject") ) - pStmt.$param.getSqlSetMethod()($index, $param.getName(), $param.getSqlTypeName()); -#else - pStmt.$param.getSqlSetMethod()($index, $param.getName()); -#end -#if ( $param.hasNotPrimitiveType() ) - } -#end -#end - -#* -* The pStmtSetWithPkField macro allows to generate the pStmt.setXX() method -* of a PreparedStatement for a given field which is a primary key field. -* This macro is used in ejbFindByPrimaryKey(), ejbRemove() and ejbLoad(). -*# -#macro( pStmtSetWithPkField $field $index ) -#if ( $hasPkField ) -#set( $fName = "pk" ) -#else -#set( $fName = "pk.$field.getName()" ) -#end -#if ( $field.hasSerializableType() ) - pStmt.setBytes($index, MarshallTool.toBytes($fName)); -#elseif ( $field.hasBigIntegerType() ) - pStmt.setObject($index, new java.math.BigDecimal($fName)); -#elseif ( $field.getSqlSetMethod().equals("setObject") ) - pStmt.$field.getSqlSetMethod()($index, $fName, $field.getSqlTypeName()); -#else - pStmt.$field.getSqlSetMethod()($index, $fName); -#end -#end - -#* -* The resultGetWithAnyField macro allows to generate the rs.getXX() method -* of a ResultSet for a given field which is any field. -* This macro is used in ejbLoad(). -*# -#macro( resultGetWithAnyField $field $index ) -#if ( $field.hasSerializableType() ) - this.$field.getName() = ($field.getTypeName()) MarshallTool.fromBytes((byte[])rs.getBytes($index)); -#elseif ( $field.hasBigIntegerType() ) - if ((rs.$field.getSqlGetMethod()($index)==null) || rs.wasNull()) { - this.$field.getName() = null; - } else { - this.$field.getName() = rs.$field.getSqlGetMethod()($index).toBigInteger(); - } -#elseif ( $field.hasJavaLangTypeExceptString() ) - this.$field.getName() = new $field.getTypeName()(rs.$field.getSqlGetMethod()($index)); - if (rs.wasNull()) { - this.$field.getName() = null; - } -#else - this.$field.getName() = rs.$field.getSqlGetMethod()($index); -#end -#end - -#* -* The resultGetWithPkField macro allows to generate the rs.getXX() method -* of a ResultSet for a given field which is a primary key field. -* This macro is used in ejbFindXXSimple(), ejbFindXXCol() and ejbFindXXEnum(). -*# -#macro( resultGetWithPkField $field $index ) -#if ( $hasPkField ) -#set( $fName = "pk" ) -#else -#set( $fName = "pk.$field.getName()" ) -#end -#if ( $field.hasSerializableType() ) - $fName = ($field.getTypeName()) MarshallTool.fromBytes((byte[])rs.getBytes($index)); -#elseif ( $field.hasBigIntegerType() ) - $fName = rs.$field.getSqlGetMethod()($index).toBigInteger(); -#elseif ( $field.hasJavaLangTypeExceptString() ) - $fName = new $field.getTypeName()(rs.$field.getSqlGetMethod()($index)); -#else - $fName = rs.$field.getSqlGetMethod()($index); -#end -#end - -#if ($package.length() != 0) -package $package; -#end - -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Types; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; - -import javax.ejb.CreateException; -import javax.ejb.EJBException; -import javax.ejb.EJBHome; -import javax.ejb.EJBObject; -import javax.ejb.EntityContext; -import javax.ejb.FinderException; -import javax.ejb.ObjectNotFoundException; -import javax.ejb.RemoveException; - -import javax.sql.DataSource; - -import org.ow2.jonas.lib.ejb21.TraceEjb; -import org.ow2.jonas.lib.ejb21.JEntityContext; -import org.ow2.jonas.lib.ejb21.JEntityFactory; -import org.ow2.jonas.lib.ejb21.MarshallTool; -import org.objectweb.util.monolog.api.BasicLevel; - - -public class $class extends $bean { - - private JEntityContext ejbContext = null; - private JEntityFactory ejbFactory = null; - private DataSource datasource = null; - -#if ( $IsUndefinedPK ) - // create new field for auto-generate pk type of java.lang.Object - private java.lang.Integer $pkField = null; -#end - - /* - * isModifiedData() method - */ - private boolean isModifiedData() { -#if ( $dd.hasIsModifiedMethod() ) - boolean b = super.$dd.getIsModifiedMethod().getName()(); -#else - boolean b = true; -#end - //TraceEjb.interp.log(BasicLevel.DEBUG, "--> " + b); - return b; - } - - -#foreach ($M in $methodList) - -#if ($M.isEjbSetEntityContext()) - /* - * setEntityContext(javax.ejb.EntityContext) method - */ - public void setEntityContext(javax.ejb.EntityContext p1) -#if ( $M.getExceptionList().length() > 0 ) - throws $M.getExceptionList() -#end - { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - this.ejbContext = (JEntityContext)p1; - this.ejbFactory = this.ejbContext.getEntityFactory(); - this.datasource = (DataSource) this.ejbFactory.getDataSource(); - super.setEntityContext(p1); - } - -#elseif ($M.isEjbCreate()) - /* - * ejbCreate(.....) method - */ - public $M.getReturnType() $M.getName()($M.getFormalParameters()) - throws $M.getExceptionList() { - - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - - // Container-managed fields must be set to the Java language default values -#foreach ($F in $fieldList) - this.$F.getName() = $F.getDefaultValue(); -#end - $pk pk; - super.$M.getName()($M.getActualParameters()); -#if ($IsUndefinedPK || $IsAutomaticPk) - // Only type Integer is valid - pk = new Integer(ejbFactory.calculateAutomaticPk()); - this.$pkField = pk; -#else - #if ( $hasPkField ) - // Initialize the pk with the primkey-field - pk = this.$pkField; - #else - // Create the pk and initialise all its fields - pk = new $pk(); - #foreach ($F in $fieldPkList) - pk.$F.getName() = this.$F.getName(); - #end - #end -#end - - Connection conn = null; - PreparedStatement pStmt = null; - try { - conn = this.datasource.getConnection(); - pStmt = conn.prepareStatement("$M.getSqlStmt()"); -#foreach ($F in $fieldList) -#pStmtSetWithAnyField( $F $velocityCount ) -#end - pStmt.executeUpdate(); - } catch (Exception e) { - TraceEjb.interp.log(BasicLevel.ERROR,"failed to create bean in database", e); - throw new CreateException(e.toString()); - } finally { - if (pStmt != null) { - try { - pStmt.close(); - } catch (Exception ignore) { - TraceEjb.interp.log(BasicLevel.ERROR,"failed to close the PreparedStatement in ejb$M.getCapName()", - ignore); - } - } - if (conn != null) { - try { - conn.close(); - } catch (Exception ignore) { - TraceEjb.interp.log(BasicLevel.ERROR,"failed to close the Connection in ejb$M.getCapName()", - ignore); - } - } - } - - return pk; - - } - -#elseif ($M.isFinderByPk()) - /* - * ejbFindByPrimaryKey(...) method - */ - public $pk ejbFindByPrimaryKey($pk pk) - throws FinderException { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - Connection conn = null; - PreparedStatement pStmt = null; - try { - conn = this.datasource.getConnection(); - pStmt = conn.prepareStatement("$M.getSqlStmt()"); -#foreach ($F in $fieldPkList) -#pStmtSetWithPkField( $F $velocityCount) -#end - ResultSet rs = pStmt.executeQuery(); - if (rs.next() == false) { - //TraceEjb.interp.log(BasicLevel.DEBUG, "object not found in database (ejbFindByPrimaryKey("+pk.toString()+"))"); - throw new ObjectNotFoundException("Object not found in database (ejbFindByPrimaryKey("+pk.toString()+"))"); - } - } catch (ObjectNotFoundException oe) { - throw oe; - } catch (Exception e) { - TraceEjb.interp.log(BasicLevel.ERROR,"failed to find bean from database in ejb$M.getCapName()", e); - throw new FinderException("Failed to find bean from database in ejb$M.getCapName()"); - } finally { - if (pStmt != null) { - try { - pStmt.close(); - } catch (Exception i) { - TraceEjb.interp.log(BasicLevel.ERROR,"failed to close the PreparedStatement in ejb$M.getCapName()", i); - } - } - if (conn != null) { - try { - conn.close(); - } catch (Exception ignore) { - TraceEjb.interp.log(BasicLevel.ERROR,"failed to close the Connection in ejb$M.getCapName()", ignore); - } - } - } - return pk; - } - -#elseif ($M.isFinderSimple()) - /* - * ejbFindXXX(...) method returning only 1 PK - */ - public $pk ejb$M.getCapName()($M.getFormalParameters()) - throws FinderException { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); -#if ( $hasPkField ) - $pk pk; -#else - $pk pk = new $pk(); -#end - Connection conn = null; - PreparedStatement pStmt = null; - try { - conn = this.datasource.getConnection(); - pStmt = conn.prepareStatement("$M.getSqlStmt()"); -#foreach ($P in $M.getParamWhereList()) -#pStmtSetWithParam( $P $velocityCount ) -#end - ResultSet rs = pStmt.executeQuery(); - if (rs.next() == false) { - //TraceEjb.interp.log(BasicLevel.DEBUG, "object not found in database"); - throw new ObjectNotFoundException("Object not found in database in ejb$M.getCapName()"); - } -#foreach ($F in $fieldPkList) -#resultGetWithPkField( $F $velocityCount) -#end - if (rs.next()) { - //TraceEjb.interp.log(BasicLevel.DEBUG, "several objects found in database"); - throw new FinderException("There is more than one object in response to the ejb${M.getCapName()} single-object finder"); - } - } catch (ObjectNotFoundException oe) { - throw oe; - } catch (FinderException oe) { - throw oe; - } catch (Exception e) { - TraceEjb.interp.log(BasicLevel.ERROR,"failed to find bean from database in ejb$M.getCapName()", e); - throw new FinderException("Failed to find bean from database in ejb$M.getCapName()"); - } finally { - if (pStmt != null) { - try { - pStmt.close(); - } catch (Exception ignore) { - TraceEjb.interp.log(BasicLevel.ERROR,"failed to close the PreparedStatement in ejb$M.getCapName()", - ignore); - } - } - if (conn != null) { - try { - conn.close(); - } catch (Exception ignore) { - TraceEjb.interp.log(BasicLevel.ERROR,"failed to close the Connection in ejb$M.getCapName()", - ignore); - } - } - } - return pk; - } - -#elseif ($M.isFinderEnum() || $M.isFinderCol()) - /* - * ejbFindXXX(...) method returning a java.util.Enumeration or a java.util.Collection - */ - public $M.getReturnType() ejb$M.getCapName()($M.getFormalParameters()) - throws FinderException { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - Collection pkC = new ArrayList(); - Connection conn = null; - PreparedStatement pStmt = null; - try { - conn = this.datasource.getConnection(); - pStmt = conn.prepareStatement("$M.getSqlStmt()"); -#foreach ($P in $M.getParamWhereList()) -#pStmtSetWithParam( $P $velocityCount ) -#end - ResultSet rs = pStmt.executeQuery(); - while (rs.next()) { -#if ( $hasPkField ) - $pk pk; -#else - $pk pk = new $pk(); -#end -#foreach ($F in $fieldPkList) -#resultGetWithPkField( $F $velocityCount) -#end - pkC.add(pk); - } - } catch (Exception e) { - TraceEjb.interp.log(BasicLevel.ERROR,"failed to find beans from database in ejb$M.getCapName()", e); - throw new FinderException("Failed to find beans from database in ejb$M.getCapName()"); - } finally { - if (pStmt != null) { - try { - pStmt.close(); - } catch (Exception ignore) { - TraceEjb.interp.log(BasicLevel.ERROR,"failed to close the PreparedStatement in ejb$M.getCapName()", - ignore); - } - } - if (conn != null) { - try { - conn.close(); - } catch (Exception ignore) { - TraceEjb.interp.log(BasicLevel.ERROR,"failed to close the Connection in ejb$M.getCapName()", - ignore); - } - } - } -#if ($M.isFinderEnum()) - return Collections.enumeration(pkC); -#else - return pkC; -#end - } - -#elseif ($M.isEjbRemove()) - /* - * ejbRemove() method - */ - public void ejbRemove() -#if ( $M.getExceptionList().length() > 0 ) - throws $M.getExceptionList() -#end - { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - super.ejbRemove(); - Connection conn = null; - PreparedStatement pStmt = null; - try { - $pk pk = ($pk) this.ejbContext.getPrimaryKey(); - conn = this.datasource.getConnection(); - pStmt = conn.prepareStatement("$M.getSqlStmt()"); -#foreach ($F in $fieldPkList) -#pStmtSetWithPkField( $F $velocityCount) -#end - pStmt.executeUpdate(); - } catch (Exception e) { - TraceEjb.interp.log(BasicLevel.ERROR,"failed to delete bean in database", e); -#if ( $M.getExceptionList().indexOf("RemoveException") != -1 ) - throw new RemoveException(e.getMessage()); -#else - throw new EJBException(e.getMessage()); -#end - } finally { - if (pStmt != null) { - try { - pStmt.close(); - } catch (Exception ignore) { - TraceEjb.interp.log(BasicLevel.ERROR,"failed to close the PreparedStatement in ejbRemove", - ignore); - } - } - if (conn != null) { - try { - conn.close(); - } catch (Exception ignore) { - TraceEjb.interp.log(BasicLevel.ERROR,"failed to close the Connection in ejbRemove", - ignore); - } - } - } - } - -#elseif ($M.isEjbLoad()) - /* - * ejbLoad() method - */ - public void ejbLoad() -#if ( $M.getExceptionList().length() > 0 ) - throws $M.getExceptionList() -#end - { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - Connection conn = null; - PreparedStatement pStmt = null; - try { - $pk pk = ($pk) this.ejbContext.getPrimaryKey(); - conn = this.datasource.getConnection(); - pStmt = conn.prepareStatement("$M.getSqlStmt()"); -#foreach ($F in $fieldPkList) -#pStmtSetWithPkField( $F $velocityCount) -#end - ResultSet rs = pStmt.executeQuery(); - if (rs.next() == false) { - TraceEjb.interp.log(BasicLevel.ERROR,"failed to load bean from database"); - throw new EJBException("Failed to load bean from database"); - } -#foreach ($F in $fieldList) -#resultGetWithAnyField( $F $velocityCount ) -#end - } catch (Exception e) { - TraceEjb.interp.log(BasicLevel.ERROR,"failed to load bean from database", e); - throw new EJBException(e); - } finally { - if (pStmt != null) { - try { - pStmt.close(); - } catch (Exception ignore) { - TraceEjb.interp.log(BasicLevel.ERROR,"failed to close the PreparedStatement in ejbLoad", - ignore); - } - } - if (conn != null) { - try { - conn.close(); - } catch (Exception ignore) { - TraceEjb.interp.log(BasicLevel.ERROR,"failed to close the Connection in ejbLoad", - ignore); - } - } - } - super.ejbLoad(); - } - -#elseif ($M.isEjbStore()) - /* - * ejbStore() method - */ - public void ejbStore() -#if ( $M.getExceptionList().length() > 0 ) - throws $M.getExceptionList() -#end - { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - if (this.isModifiedData()) { - super.ejbStore(); -#if ($fieldNoPkList.size() > 0) - Connection conn = null; - PreparedStatement pStmt = null; - try { - $pk pk = ($pk) this.ejbContext.getPrimaryKey(); - conn = this.datasource.getConnection(); - pStmt = conn.prepareStatement("$M.getSqlStmt()"); -#foreach ($F in $fieldNoPkList) -#pStmtSetWithAnyField( $F $velocityCount) -#end -#foreach ($F in $fieldPkList) -#set( $index = $fieldNoPkList.size() + $velocityCount ) -#pStmtSetWithPkField( $F $index) -#end - pStmt.executeUpdate(); - } catch (Exception e) { - TraceEjb.interp.log(BasicLevel.ERROR,"failed to store bean to database", e); - throw new EJBException(e); - } finally { - if (pStmt != null) { - try { - pStmt.close(); - } catch (Exception ignore) { - TraceEjb.interp.log(BasicLevel.ERROR,"failed to close the PreparedStatement in ejbStore", - ignore); - } - } - if (conn != null) { - try { - conn.close(); - } catch (Exception ignore) { - TraceEjb.interp.log(BasicLevel.ERROR,"failed to close the Connection in ejbStore", - ignore); - } - } - } -#end - } - } - -#end -#end - -} -// End: $Id$ diff --git a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JEntityHandle.vm b/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JEntityHandle.vm deleted file mode 100644 index 47b626b0983f80486e48def01e4f2a771594cd78..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JEntityHandle.vm +++ /dev/null @@ -1,80 +0,0 @@ -## --------------------------------------------------------------------------- -## JOnAS: Java(TM) Open Application Server -## Copyright (C) 1999-2004 Bull S.A. -## Contact: jonas-team@objectweb.org -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -## USA -## -## Initial developer(s): Helene Joanin. -## Contributor(s): ______________________________________. -## -## --------------------------------------------------------------------------- -## $Id$ -## --------------------------------------------------------------------------- - -// -// This class is the bean specific part of org.ow2.jonas.lib.ejb21.JEntityHandle. -// Generated by JOnAS's GenIC tool via Velocity. -// DO NOT EDIT THIS FILE. -// Start: $Id$ - -#if ($package.length() != 0) -package $package; -#end - -import java.rmi.RemoteException; - -import javax.ejb.EJBObject; -import javax.ejb.HomeHandle; -import javax.rmi.PortableRemoteObject; - -import org.ow2.jonas.lib.ejb21.JEntityHome; -import org.ow2.jonas.lib.ejb21.JEntityHandle; - -import org.ow2.carol.rmi.exception.RmiUtility; - - -public class $class extends JEntityHandle { - - - public $class($remote_wrp ejbobject) { - super(ejbobject); - try { - pk = ($pk)ejbobject.getPrimaryKey(); - } catch (Exception e) { - pk = null; - } - } - - public EJBObject getEJBObject() throws RemoteException { - - #beforeThrowRemoteException() - - $remote ejbobj = null; - try { - $home h = ($home)PortableRemoteObject.narrow(homehandle.getEJBHome(),${home}.class); - ejbobj = h.findByPrimaryKey(($pk)pk); - } catch (Exception e) { - throw new RemoteException("${class}.getEJBObject(): "+e, e); - } - return ejbobj ; - - #afterThrowRemoteException() - - } - -} -// End: $Id$ diff --git a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JEntityHome.vm b/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JEntityHome.vm deleted file mode 100644 index e4059ea7080007b6ac64c66d546863f20e97fdcd..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JEntityHome.vm +++ /dev/null @@ -1,787 +0,0 @@ -## --------------------------------------------------------------------------- -## JOnAS: Java(TM) Open Application Server -## Copyright (C) 1999-2006 Bull S.A. -## Contact: jonas-team@objectweb.org -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -## USA -## -## Initial developer(s): Philippe Durieux, Helene Joanin. -## -## --------------------------------------------------------------------------- -## $Id$ -## --------------------------------------------------------------------------- - -// This class is the bean specific part of JEntityHome -// Generated by GenIC via Velocity. Do not edit directly this file. -// Start: $Id$ - -#if ($package.length() != 0) -package $package; -#end - -import java.lang.Error; -import java.lang.Object; -import java.lang.RuntimeException; -import java.rmi.RemoteException; -import java.rmi.AccessException; -import java.util.Collection; -import java.util.Enumeration; -import java.util.Iterator; -import java.util.Vector; - -import javax.ejb.EJBException; -import javax.ejb.FinderException; -import javax.ejb.Handle; -import javax.ejb.RemoveException; - -import org.ow2.carol.rmi.exception.RmiUtility; -import org.ow2.carol.util.configuration.ConfigurationRepository; - -import org.ow2.jonas.lib.ejb21.JEntityContext; -import org.ow2.jonas.lib.ejb21.JEntityFactory; -import org.ow2.jonas.lib.ejb21.JEntityHandle; -import org.ow2.jonas.lib.ejb21.JEntityHome; -import org.ow2.jonas.lib.ejb21.JEntityRemote; -import org.ow2.jonas.lib.ejb21.JEntitySwitch; -import org.ow2.jonas.lib.ejb21.ha.JRepEntityHome; -import org.ow2.jonas.lib.ejb21.RequestCtx; -import org.ow2.jonas.lib.ejb21.TraceEjb; -import org.ow2.jonas.deployment.ejb.EntityDesc; -import org.ow2.jonas.lib.ejb21.CollectionEnum; -import org.ow2.jonas.lib.ejb21.EJBInvocation; -import org.ow2.jonas.lib.svc.JHandleIIOP; -import org.objectweb.util.monolog.api.BasicLevel; -#if ($EntityCMP2.booleanValue()) -import org.objectweb.jorm.api.PException; -import org.objectweb.jorm.api.PClassMapping; -import org.objectweb.jorm.naming.api.PName; -import org.ow2.jonas.lib.ejb21.jorm.Coder; -import org.ow2.jonas.lib.ejb21.jorm.PObject; -import org.ow2.jonas.lib.ejb21.jorm.PObjectHome; - -public class $class -#if ($isClusterReplicated) - extends JRepEntityHome -#else - extends JEntityHome -#end - implements Coder, PObjectHome, $home { -#else - -public class $class -#if ($isClusterReplicated) - extends JRepEntityHome -#else - extends JEntityHome -#end - implements $home { - -#end - - - // JOnAS version used to deploy - public static final String JONAS_VERSION = "$jVersion"; - - /** - * Created by JEntityFactory (by newInstance) - */ - public $class(EntityDesc dd, JEntityFactory bf) throws RemoteException { - - super(dd, bf); - - } - -#foreach ($M in $methodList) - -#if ($M.isCreate()) - - /** - * create method - */ - public $M.getReturnType() $M.getName()($M.getFormalParameters()) throws $M.getExceptionList() { - - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - - #beforeThrowRemoteException() - - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - RequestCtx rctx = preInvoke($M.getTxAttribute()); - JEntitySwitch bs = null; - JEntityFactory ef = (JEntityFactory) bf; - JEntityContext bctx = null; - boolean mapped = false; - try { - bs = ef.getJEntitySwitch(); - bctx = ef.getJContext(bs); - bctx.setEntitySwitch(bs); - $bean_wrp b = ($bean_wrp) bctx.getInstance(); - ejbInv.bean = b; - checkSecurity(ejbInv); - - rctx.bmcalled = true; - #if ($EntityCMP2.booleanValue()) - Object pk = b._ejb$M.getCapName()($M.getActualParameters()); - #else - Object pk = b.ejb$M.getCapName()($M.getActualParameters()); - #end - bctx.setActive(); - boolean pkadded = ef.rebindEJB(rctx.currTx, bctx, pk); - bs.bindICtx(rctx.currTx, bctx); - mapped = true; - bctx.setNewInstance(); - try { - b.ejbPost$M.getCapName()($M.getActualParameters()); - } catch (EJBException e) { - if (pkadded) { - bs.forceDiscardICtx(rctx.currTx); - bctx = null; - } - throw e; - } - } catch (javax.ejb.AccessLocalException e) { - throw new AccessException("Security Exception thrown by an enterprise Bean", e); - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new RemoteException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new RemoteException("Error thrown by an enterprise Bean", e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw e; - } finally { - if (! mapped && bctx != null) { - ef.releaseJContext(bctx); - } - postInvoke(rctx); - } - - return ($remote) bs.getRemote(); - #afterThrowRemoteException() - - } - -#elseif ($M.isFinderCol()) - - /** - * Finder method returning a Collection - */ - public Collection $M.getName()($M.getFormalParameters()) throws $M.getExceptionList() { - - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - - #beforeThrowRemoteException() - - Vector v = new Vector(); - Collection pkl; - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - RequestCtx rctx = preInvoke($M.getTxAttribute()); - JEntitySwitch bs = null; - JEntityFactory ef = (JEntityFactory) bf; - JEntityContext bctx = null; - boolean mapped = false; - try { - ef.syncForFind(rctx.currTx); - bctx = ef.getJContext(null); - $bean_wrp b = ($bean_wrp) bctx.getInstance(); - ejbInv.bean = b; - checkSecurity(ejbInv); - bctx.setFinding(); - rctx.bmcalled = true; - pkl = b.ejb$M.getCapName()($M.getActualParameters()); - bctx.setActive(); - Iterator pki = pkl.iterator(); - while (pki.hasNext()) { - - Object _pk = pki.next(); - - #if ($EntityCMP2.booleanValue()) - // Fix bug #300526 - PName pn = (PName) _pk; - if ((pn == null) || (pn.isNull())) { - v.addElement(null); - } else - #end - { - bs = ef.getEJB(_pk); - if (!mapped) { - mapped = bs.tryBindICtx(rctx.currTx, bctx, false); - } - v.addElement(bs.getRemote()); - } - } - - } catch (javax.ejb.AccessLocalException e) { - throw new AccessException("Security Exception thrown by an enterprise Bean", e); - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new RemoteException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new RemoteException("Error thrown by an enterprise Bean", e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw e; - } finally { - if (! mapped && bctx != null) { - ef.releaseJContext(bctx); - } - postInvoke(rctx); - } - return v; - - #afterThrowRemoteException() - - } - -#elseif ($M.isFinderEnum()) - - /** - * Finder method returning an Enumeration - */ - public Enumeration $M.getName()($M.getFormalParameters()) throws $M.getExceptionList() { - - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - - #beforeThrowRemoteException() - - CollectionEnum v = new CollectionEnum(); - boolean mapped = false; - Enumeration pkl; - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - RequestCtx rctx = preInvoke($M.getTxAttribute()); - JEntitySwitch bs = null; - JEntityFactory ef = (JEntityFactory) bf; - JEntityContext bctx = null; - try { - ef.syncForFind(rctx.currTx); - bctx = ef.getJContext(null); - $bean_wrp b = ($bean_wrp) bctx.getInstance(); - ejbInv.bean = b; - checkSecurity(ejbInv); - bctx.setFinding(); - rctx.bmcalled = true; - pkl = b.ejb$M.getCapName()($M.getActualParameters()); - bctx.setActive(); - while (pkl.hasMoreElements()) { - Object _pk = pkl.nextElement(); - - #if ($EntityCMP2.booleanValue()) - // Fix bug #300526 - PName pn = (PName) _pk; - if ((pn == null) || (pn.isNull())) { - v.addElement(null); - } else - #end - { - bs = ef.getEJB(_pk); - if (!mapped) { - mapped = bs.tryBindICtx(rctx.currTx, bctx, false); - } - v.addElement(bs.getRemote()); - } - } - } catch (javax.ejb.AccessLocalException e) { - throw new AccessException("Security Exception thrown by an enterprise Bean", e); - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new RemoteException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new RemoteException("Error thrown by an enterprise Bean", e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw e; - } finally { - if (! mapped && bctx != null) { - ef.releaseJContext(bctx); - } - postInvoke(rctx); - } - return v; - - #afterThrowRemoteException() - } - -#elseif ($M.isFinderSimple()) - - /** - * finder method returning only 1 PK - */ - public $M.getReturnType() $M.getName()($M.getFormalParameters()) throws $M.getExceptionList() { - - #beforeThrowRemoteException() - - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - RequestCtx rctx = preInvoke($M.getTxAttribute()); - JEntitySwitch bs = null; - JEntityFactory ef = (JEntityFactory) bf; - JEntityContext bctx = null; - boolean mapped = false; - try { - ef.syncForFind(rctx.currTx); - bctx = ef.getJContext(null); - $bean_wrp b = ($bean_wrp) bctx.getInstance(); - ejbInv.bean = b; - checkSecurity(ejbInv); - bs = ef.getJEntitySwitch(); - bctx.setEntitySwitch(bs); - bctx.setFinding(); - rctx.bmcalled = true; - Object pk = b.ejb$M.getCapName()($M.getActualParameters()); - #if ($EntityCMP2.booleanValue()) - // Fix bug #300526 - PName pn = (PName) pk; - if ((pn == null) || (pn.isNull())) { - return null; - } - #end - bctx.setActive(); - JEntitySwitch old = ef.existEJB(pk, bs, false); - if (old != null) { - bs = old; - bctx.setEntitySwitch(bs); - } - mapped = bs.tryBindICtx(rctx.currTx, bctx, true); - } catch (javax.ejb.AccessLocalException e) { - throw new AccessException("Security Exception thrown by an enterprise Bean", e); - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new RemoteException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new RemoteException("Error thrown by an enterprise Bean", e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw e; - } finally { - if (! mapped && bctx != null) { - ef.releaseJContext(bctx); - } - postInvoke(rctx); - } - - return ($remote) bs.getRemote(); - - #afterThrowRemoteException() - } - -#elseif ($M.isFinderByPk()) - - /** - * findByPrimaryKey - */ - public $M.getReturnType() $M.getName()($M.getFormalParameters()) throws $M.getExceptionList() { - - #beforeThrowRemoteException() - - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - RequestCtx rctx = preInvoke($M.getTxAttribute()); - JEntitySwitch bs = null; - JEntityFactory ef = (JEntityFactory) bf; - JEntityContext bctx = null; - boolean mapped = false; - try { - bctx = ef.getJContext(null); - $bean_wrp b = ($bean_wrp) bctx.getInstance(); - ejbInv.bean = b; - checkSecurity(ejbInv); - bs = ef.getJEntitySwitch(); - bctx.setEntitySwitch(bs); - bctx.setFinding(); - rctx.bmcalled = true; - Object pk = -#if ($EntityCMP2.booleanValue()) - decode($M.getActualParameters()); -#else - $M.getActualParameters(); -#end - JEntitySwitch old = ef.existEJB(pk, bs, true); - if (old != null) { - bs = old; - bctx.setEntitySwitch(bs); - } else { - try { - pk = b.ejb$M.getCapName()(($pk) $M.getActualParameters()); - } catch (FinderException e) { - bs.forceDiscardICtx(rctx.currTx); - throw e; - } - ef.startEJB(pk); - } - bctx.setActive(); - mapped = bs.tryBindICtx(rctx.currTx, bctx, true); - } catch (javax.ejb.AccessLocalException e) { - throw new AccessException("Security Exception thrown by an enterprise Bean", e); - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new RemoteException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new RemoteException("Error thrown by an enterprise Bean", e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw e; -#if ($EntityCMP2.booleanValue()) - } catch (org.objectweb.jorm.api.PException e) { - rctx.sysExc = e; - throw new RemoteException("decoding PK failed", e); -#end - } finally { - if (! mapped && bctx != null) { - ef.releaseJContext(bctx); - } - postInvoke(rctx); - } - - return ($remote) bs.getRemote(); - - #afterThrowRemoteException() - } - -#elseif ($M.isRemovePk()) - - /** - * Remove by PK - * @throws RemoveException - */ - public void remove(Object p1) throws $M.getExceptionList() { - - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - - #beforeThrowRemoteException() - - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - RequestCtx rctx = preInvoke($M.getTxAttribute()); - JEntitySwitch bs = null; - JEntityFactory ef = (JEntityFactory) bf; - JEntityContext bctx = null; - boolean mapped = false; - try { - ef.dummyFinderException(true); - bctx = ef.getJContext(null); - $bean_wrp b = ($bean_wrp) bctx.getInstance(); - ejbInv.bean = b; - checkSecurity(ejbInv); - - #if ($EntityCMP2.booleanValue()) - Object pk = decode(($pk) p1); - bs = ef.getEJB(pk); - bctx.setEntitySwitch(bs); - b.ejbFindByPrimaryKey((PName)pk); - #else - bs = ef.getEJB(p1); - bctx.setEntitySwitch(bs); - b.ejbFindByPrimaryKey(($pk) p1); - #end - - bctx = bs.getICtx(rctx.currTx, bctx); - // Must set this before setRemove() because exception may - // occur in ejbRemove, and in that case, we must keep the context. - mapped = true; - rctx.bmcalled = true; - bctx.setRemoved(); - } catch (javax.ejb.AccessLocalException e) { - throw new AccessException("Security Exception thrown by an enterprise Bean", e); - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new RemoteException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new RemoteException("Error thrown by an enterprise Bean", e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw e; - #if ($EntityCMP2.booleanValue()) - } catch (PException e) { - rctx.sysExc = e; - throw new RemoteException("JORM PException thrown", e); - #end - } catch (FinderException e) { - rctx.sysExc = e; - throw new RemoteException(e.toString()); - } finally { - if (!mapped && bctx != null) { - // release context in case of exception. - ef.releaseJContext(bctx); - } - postInvoke(rctx); - } - - #afterThrowRemoteException() - - } - -#elseif ($M.isRemoveHandle()) - - /** - * remove by Handle - * @throws RemoveException - */ - public void remove(Handle p1) throws $M.getExceptionList() { - - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - - #beforeThrowRemoteException() - - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - RequestCtx rctx = preInvoke($M.getTxAttribute()); - JEntitySwitch bs = null; - JEntityFactory ef = (JEntityFactory) bf; - JEntityContext bctx = null; - try { - bctx = ef.getJContext(null); - $bean_wrp b = ($bean_wrp) bctx.getInstance(); - ejbInv.bean = b; - Object pk = null; - checkSecurity(ejbInv); - - // Get the PK embedded inside the Handle - String protocol = ConfigurationRepository.getCurrentConfiguration().getProtocol().getName(); - - //TraceEjb.interp.log(BasicLevel.DEBUG, "Current protocol=" + protocol); - #if ($EntityCMP2.booleanValue()) - if (protocol.equals("iiop")) { - pk = decode(($pk) ((JHandleIIOP) p1).getEJBObject().getPrimaryKey()); - } else { - pk = decode(($pk) ((JEntityHandle) p1).getPK()); - } - #else - if (protocol.equals("iiop")) { - pk = ((JHandleIIOP) p1).getEJBObject().getPrimaryKey(); - } else { - pk = ((JEntityHandle) p1).getPK(); - } - #end - - bs = ef.getEJB(pk); - bctx = bs.getICtx(rctx.currTx, bctx); - rctx.bmcalled = true; - bctx.setRemoved(); - } catch (javax.ejb.AccessLocalException e) { - throw new AccessException("Security Exception thrown by an enterprise Bean", e); - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new RemoteException(e.getMessage()); - } catch (Error e) { - rctx.sysExc = e; - throw new RemoteException("Error thrown by an enterprise Bean", e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw e; - #if ($EntityCMP2.booleanValue()) - } catch (PException e) { - rctx.sysExc = e; - throw new RemoteException("JORM PException thrown", e); - #end - } finally { - postInvoke(rctx); - } - - #afterThrowRemoteException() - - } - -#else - - /** - * Home Method - */ - public $M.getReturnType() $M.getName()($M.getFormalParameters()) - - #if ( $M.getExceptionList().length() > 0 ) - throws $M.getExceptionList() - #end - { - - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - - #beforeThrowRemoteException() - - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - RequestCtx rctx = preInvoke($M.getTxAttribute()); - JEntityFactory ef = (JEntityFactory) bf; - - #if ($M.getReturnType() != "void") - $M.getReturnType() result; - #end - - JEntityContext bctx = null; - try { - bctx = ef.getJContext(null); - $bean_wrp b = ($bean_wrp) bctx.getInstance(); - ejbInv.bean = b; - checkSecurity(ejbInv); - rctx.bmcalled = true; - - #if ($M.getReturnType() != "void") - result = - #end - b.ejbHome$M.getCapName()($M.getActualParameters()); - - } catch (javax.ejb.AccessLocalException e) { - throw new AccessException("Security Exception thrown by an enterprise Bean", e); - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new RemoteException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new RemoteException("Error thrown by an enterprise Bean", e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw e; - } finally { - if (bctx != null) { - ef.releaseJContext(bctx); - } - postInvoke(rctx); - } - - #if ($M.getReturnType() != "void") - return result; - #end - - #afterThrowRemoteException() - - } - -#end - -#end - - public JEntityRemote createRemoteObject() throws RemoteException { - - #beforeThrowRemoteException() - - return new $remote_wrp((JEntityFactory)bf); - - #afterThrowRemoteException() - - } - - -#if ($EntityCMP2.booleanValue()) - - /** - * CMP2 methods : - * ============== - * In our case it has been choosen that the container (the generic part) - * manages PName. This is the generated objects which do the translation - * between PName and PK - */ - - // IMPLEMENTATION OF THE Coder INTERFACE // - /** - * This method build a PName with the primary key specifed in parameter. - * To build the pname the PNamingContext associated to the bean is used. - * Futhermore the PKFieldExtractor class is used as a specific PNameGetter - * in case of the PName is composite (several fields). - */ - public PName decode(Object pk) - throws PException, UnsupportedOperationException { - if (pk == null) { - return ((PClassMapping) bf).getPBinder().getNull(); - } - -#**##if($pkIsUserClass.booleanValue()) - return ((PClassMapping) bf).getPBinder().decodeAbstract( - new PkFieldExtractor(($pk) pk), null); -#**##else ## Pk is a java.lang class (String, Long, ...) - return ((PClassMapping) bf).getPBinder().$pkDecodeMethod; -#**##end - - } - - /** - * This method build a primary key with the PName specifed in parameter. - * To build the primary key the PNamingContext associated to the bean is - * used. In case of the PName is composite (several fields), the - * encodeAbstract must return a specific PNameGetter. - */ - public Object encode(PName pn) - throws PException, UnsupportedOperationException { - if (pn==null || pn.isNull()) { - return null; - } - -#**##if($pkIsUserClass.booleanValue()) - $pk pk = new $pk(); - ${dd.getJormPNameGetterClassName()} png = (${dd.getJormPNameGetterClassName()}) - ((PClassMapping) bf).getPBinder().encodeAbstract(pn); -#* *##foreach ($pkf in $fieldPkList) -#* *##if (!$pkf.isMustBeConvert()) - pk.${pkf.getName()} = png.pnGet${pkf.getNameUpperFirst()}(null); -#* *##else - pk.${pkf.getName()} = (${pkf.getTypeName()})${pkf.getConvertClassName()}.toMemory((png.pnGet${pkf.getNameUpperFirst()}(null))); -#* *##end - -#* *##end - return pk; -#**##else ## Pk is a java.lang class (String, Long, ...) - return $pkMappingToMemoryMethod(((PClassMapping) bf).getPBinder().$pkEncodeMethod(pn)); -#**##end - - } - -#**##if($pkIsUserClass.booleanValue()) - /** - * This class is used to decode a primary key into a PName. It is - * specilized to the name structure - */ - private class PkFieldExtractor implements ${dd.getJormPNameGetterClassName()} { - - $pk pk; - public PkFieldExtractor($pk pk) { - this.pk = pk; - } -#* *##foreach ($pkf in $fieldPkList) - public ${pkf.getJormTypeName()} pnGet${pkf.getNameUpperFirst()}(Object ctx) { -#* *##if (!$pkf.isMustBeConvert()) - return pk.${pkf.getName()}; -#* *##else - return (${pkf.getJormTypeName()})${pkf.getConvertClassName()}.toStorage((pk.${pkf.getName()})); -#* *##end - } -#* *##end - } -#**##end - - // IMPLEMENTATION OF THE PObjectHome INTERFACE // - - public PObject getPObject(PName pn) { - return (PObject) ((JEntityFactory) bf).getEJB(pn).getRemote(); - } -#end ##EntityCMP2 - -} -// End: $Id$ - diff --git a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JEntityLocal.vm b/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JEntityLocal.vm deleted file mode 100644 index d4015e8afb70655a59e34d2e8d3252a03f32d74b..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JEntityLocal.vm +++ /dev/null @@ -1,315 +0,0 @@ -## --------------------------------------------------------------------------- -## JOnAS: Java(TM) Open Application Server -## Copyright (C) 1999-2004 Bull S.A. -## Contact: jonas-team@objectweb.org -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -## USA -## -## Initial developer(s): Philippe Durieux, Helene Joanin. -## Contributor(s): ______________________________________. -## -## --------------------------------------------------------------------------- -## $Id$ -## --------------------------------------------------------------------------- - -// This class is the bean specific part of JEntityLocal -// Generated by GenIC via Velocity. Do not edit directly this file. -// Start: $Id$ - -#if ($package.length() != 0) -package $package; -#end - -import java.lang.Error; -import java.lang.RuntimeException; -import java.rmi.RemoteException; -import javax.ejb.EJBException; -import javax.ejb.RemoveException; -import org.ow2.jonas.lib.ejb21.JEntityContext; -import org.ow2.jonas.lib.ejb21.JEntityFactory; -import org.ow2.jonas.lib.ejb21.JEntityLocal; -import org.ow2.jonas.lib.ejb21.ha.JRepEntityLocal; -import org.ow2.jonas.lib.ejb21.RequestCtx; -import org.ow2.jonas.lib.ejb21.TraceEjb; -import org.ow2.jonas.lib.ejb21.EJBInvocation; -import org.ow2.jonas.lib.ejb21.JWrapper; -import org.objectweb.util.monolog.api.BasicLevel; -#if ($EntityCMP2.booleanValue()) -import org.ow2.jonas.deployment.ejb.MethodDesc; -import org.ow2.jonas.lib.ejb21.jorm.PObject; -import org.ow2.jonas.lib.ejb21.jorm.Coder; -import org.objectweb.jorm.naming.api.PName; - -public class $class -#if ($isClusterReplicated) - extends JRepEntityLocal -#else - extends JEntityLocal -#end - implements PObject, $local -#* *##if ($dd.needJormCoherenceHelper())## - , ${dd.getJormCoherenceHelperFQItfName()} -#* *##end## - { -#else - -public class $class extends JEntityLocal implements $local { -#end - /** - * Constructor - */ - public $class(JEntityFactory bf) { - super(bf); - } - -#foreach ($M in $methodList) - -#if ($M.isRemoveThis()) - - /** - * remove this bean instance - */ - public void remove() throws RemoveException { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - RequestCtx rctx = preInvoke($M.getTxAttribute()); - checkSecurity(ejbInv); - JEntityContext bctx = null; - try { - // false -> avoids checking reentrant in cascade delete. - // TODO find a better way to allow this. - bctx = bs.getICtx(rctx.currTx, false); - rctx.bmcalled = true; - bctx.setRemoved(); - } catch (EJBException e) { - rctx.sysExc = e; - throw e; - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new EJBException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new EJBException("Error thrown by an enterprise Bean"+e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw new EJBException("Remote Exception raised:", e); - } finally { -#if ($isClusterReplicated) - postInvoke(rctx, bctx); -#else - postInvoke(rctx); -#end - } - } - -#else - - public $M.getReturnType() $M.getName()($M.getFormalParameters()) -#if ( $M.getExceptionList().length() > 0 ) - throws $M.getExceptionList() -#end - { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); -#if ($M.getReturnType() != "void") - $M.getReturnType() result; -#end - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - RequestCtx rctx = preInvoke($M.getTxAttribute()); - JEntityContext bctx = null; - try { - bctx = bs.getICtx(rctx.currTx, true); - $bean_wrp b = ($bean_wrp) bctx.getInstance(); - ejbInv.bean = b; - checkSecurity(ejbInv); - rctx.bmcalled = true; -#if ($M.getReturnType() != "void") - result = -#end - b.$M.getName()($M.getActualParameters()); - } catch (EJBException e) { - rctx.sysExc = e; - throw e; - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new EJBException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new EJBException("Error thrown by an enterprise Bean"+e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw new EJBException("Remote Exception raised:", e); - } finally { -#if ($isClusterReplicated) - postInvoke(rctx, bctx); -#else - postInvoke(rctx); -#end - } -#if ($M.getReturnType() != "void") - return result; -#end - } - -#end ##else - -#end ##foreach - - JWrapper jwrapper = null; - public JWrapper getJWrapper() { - if (jwrapper == null) { - String jndiname = bf.getLocalHome().getJndiLocalName(); - Object pk = getPrimaryKey(); - jwrapper = new JWrapper(JWrapper.LOCAL_ENTITY, jndiname, pk); - } - - return jwrapper; - } - -#if ($EntityCMP2.booleanValue()) - /** - * CMP2 methods : - * ============== - * In our case it has been choosen that the container (the generic part) - * manages PName. This is the generated objects which do the translation - */ - - Object pk = null; - - /** - * The getPrimaryKey method is overrided in order to translate the PName - * managed by the container, into a PK. - */ - public Object getPrimaryKey() { - try { - if (pk == null) { - pk = ((Coder) getEJBLocalHome()).encode((PName) super.getPrimaryKey()); - } - return pk; - } catch (Exception e) { - TraceEjb.interp.log(BasicLevel.ERROR, - "Impossible to translate the PName in Primary key", e); - throw new EJBException( - "Impossible to translate the PName in Primary key", e); - } - } - - // IMPLEMENTATION OF THE PObject INTERFACE // - - public PName getPName() { - return (PName) super.getPrimaryKey(); - } - -############################################################################### -############################################################################### -## -## Iterate over the CMR field in order to add the methods which are used to -## maintain the coherence of relations. There are two macro which avoid to -## duplicate the source code. -## -#macro( beforeRecall ) - RequestCtx rctx = preInvoke(MethodDesc.TX_SUPPORTS); - try { - JEntityContext bctx = bs.getICtx(rctx.currTx, false); - EJBInvocation ejbInv = new EJBInvocation(); - $bean_wrp b = ($bean_wrp) bctx.getInstance(); - ejbInv.bean = b; - checkSecurity(ejbInv); - rctx.bmcalled = true; -#end## - -#macro( afterRecall ) - } catch (EJBException e) { - rctx.sysExc = e; - throw e; - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new EJBException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new EJBException("Error thrown by an enterprise Bean"+e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw new EJBException("Remote Exception raised:", e); - } finally { - postInvoke(rctx); - } -#end - -#* *##foreach ($F in $cmrList) -#* *##if (!$F.isMMu() && !$F.isMOu())## - // IMPLEMENTATION OF THE ${F.getHelperFQClassName()} INTERFACE // - //-------------------------------------------------------------// -################################################ -#* *##if ($F.getRsr().isTargetMultiple()) - public ${F.getTypeName()} jonasGet${F.getUFLName()}() { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - ${F.getTypeName()} result = null; -#beforeRecall() - result = b.jonasGet${F.getUFLName()}(); -#afterRecall() - return result; - } - - public void jonasSet${F.getUFLName()}(${F.getTypeName()} val) { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); -#beforeRecall() - b.jonasSet${F.getUFLName()}(val); -#afterRecall() - } - - public void jonasAdd${F.getUFLName()}(${F.getOppositeHelperFQClassName()} bean) { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); -#beforeRecall() - b.jonasAdd${F.getUFLName()}(bean); -#afterRecall() - } - - public void jonasRemove${F.getUFLName()}(${F.getOppositeHelperFQClassName()} bean) { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); -#beforeRecall() - b.jonasRemove${F.getUFLName()}(bean); -#afterRecall() - } -## -#* *##else## simple CMR field -## - public ${F.getOppositeHelperFQClassName()} jonasGet${F.getUFLName()}() { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - ${F.getOppositeHelperFQClassName()} result = null; -#beforeRecall() - result = b.jonasGet${F.getUFLName()}(); -#afterRecall() - return result; - } - - public void jonasSet${F.getUFLName()}(${F.getOppositeHelperFQClassName()} val) { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); -#beforeRecall() - b.jonasSet${F.getUFLName()}(val); -#afterRecall() - } -#* *##end## multivalued CMR field - - -#* *##end## -#* *##end## foreach CMR field -#end -} -// End: $Id$ diff --git a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JEntityLocalHome.vm b/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JEntityLocalHome.vm deleted file mode 100644 index 88c763580dee7c300f2292c2eb7b939cf0d71de5..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JEntityLocalHome.vm +++ /dev/null @@ -1,659 +0,0 @@ -## --------------------------------------------------------------------------- -## JOnAS: Java(TM) Open Application Server -## Copyright (C) 1999-2006 Bull S.A. -## Contact: jonas-team@objectweb.org -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -## USA -## -## Initial developer(s): Philippe Durieux, Helene Joanin. -## Contributor(s): ______________________________________. -## -## --------------------------------------------------------------------------- -## $Id$ -## --------------------------------------------------------------------------- - -// This class is the bean specific part of JEntityLocalHome -// Generated by GenIC via Velocity. Do not edit directly this file. -// Start: $Id$ - -#if ($package.length() != 0) -package $package; -#end - -import java.lang.Error; -import java.lang.Object; -import java.lang.RuntimeException; -import java.rmi.RemoteException; -import java.util.Collection; -import java.util.Enumeration; -import java.util.Iterator; -import java.util.Vector; -import javax.ejb.EJBException; -import javax.ejb.FinderException; -import javax.ejb.RemoveException; -import org.ow2.jonas.lib.ejb21.JEntityContext; -import org.ow2.jonas.lib.ejb21.JEntityLocalHome; -import org.ow2.jonas.lib.ejb21.JEntityFactory; -import org.ow2.jonas.lib.ejb21.JEntityLocal; -import org.ow2.jonas.lib.ejb21.JEntitySwitch; -import org.ow2.jonas.lib.ejb21.ha.JRepEntityLocalHome; -import org.ow2.jonas.lib.ejb21.RequestCtx; -import org.ow2.jonas.lib.ejb21.TraceEjb; -import org.ow2.jonas.deployment.ejb.EntityDesc; -import org.ow2.jonas.lib.ejb21.CollectionEnum; -import org.ow2.jonas.lib.ejb21.EJBInvocation; -import org.objectweb.util.monolog.api.BasicLevel; -#if ($EntityCMP2.booleanValue()) -import org.objectweb.jorm.api.PClassMapping; -import org.objectweb.jorm.api.PException; -import org.objectweb.jorm.naming.api.PName; -import org.ow2.jonas.lib.ejb21.jorm.Coder; -import org.ow2.jonas.lib.ejb21.jorm.PObject; -import org.ow2.jonas.lib.ejb21.jorm.PObjectHome; - -public class $class -#if ($isClusterReplicated) - extends JRepEntityLocalHome -#else - extends JEntityLocalHome -#end - implements Coder, PObjectHome, $localhome { -#else - public class $class -#if ($isClusterReplicated) - extends JRepEntityLocalHome -#else - extends JEntityLocalHome -#end - implements $localhome { -#end - - // JOnAS version used to deploy - public static final String JONAS_VERSION = "$jVersion"; - - public $class(EntityDesc dd, JEntityFactory bf) { - super(dd, bf); - } - -#foreach ($M in $methodList) - -#if ($M.isCreate()) - - /** - * create method - */ - public $M.getReturnType() $M.getName()($M.getFormalParameters()) -#if ( $M.getExceptionList().length() > 0 ) - throws $M.getExceptionList() -#end - { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - RequestCtx rctx = preInvoke($M.getTxAttribute()); - JEntitySwitch bs = null; - JEntityFactory ef = (JEntityFactory) bf; - JEntityContext bctx = null; - boolean mapped = false; - try { - bs = ef.getJEntitySwitch(); - bctx = ef.getJContext(bs); - bctx.setEntitySwitch(bs); - $bean_wrp b = ($bean_wrp) bctx.getInstance(); - ejbInv.bean = b; - checkSecurity(ejbInv); - rctx.bmcalled = true; -#if ($EntityCMP2.booleanValue()) - Object pk = b._ejb$M.getCapName()($M.getActualParameters()); -#else - Object pk = b.ejb$M.getCapName()($M.getActualParameters()); -#end - bctx.setActive(); - boolean pkadded = ef.rebindEJB(rctx.currTx, bctx, pk); - bs.bindICtx(rctx.currTx, bctx); - mapped = true; - bctx.setNewInstance(); - try { - b.ejbPost$M.getCapName()($M.getActualParameters()); - } catch (EJBException e) { - if (pkadded) { - bs.forceDiscardICtx(rctx.currTx); - bctx = null; - } - throw e; - } - } catch (javax.ejb.AccessLocalException e) { - throw new EJBException("Security Exception thrown by an enterprise Bean", e); - } catch (EJBException e) { - rctx.sysExc = e; - throw e; - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new EJBException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new EJBException("Error thrown by an enterprise Bean"+e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw new EJBException("Remote Exception raised:", e); - } finally { - if (! mapped && bctx != null) { - ef.releaseJContext(bctx); - } - postInvoke(rctx); - } -#if ($isClusterReplicated) - if (mapped && bctx != null) { - replicateCreate(bctx); - } -#end - - return ($local) bs.getLocal(); - } - -#elseif ($M.isFinderCol()) - - public $M.getReturnType() $M.getName()($M.getFormalParameters()) -#if ( $M.getExceptionList().length() > 0 ) - throws $M.getExceptionList() -#end - { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - - Vector v = new Vector(); - boolean mapped = false; - Collection pkl; - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - RequestCtx rctx = preInvoke($M.getTxAttribute()); - JEntitySwitch bs = null; - JEntityFactory ef = (JEntityFactory) bf; - JEntityContext bctx = null; - try { - ef.syncForFind(rctx.currTx); - bctx = ef.getJContext(null); - $bean_wrp b = ($bean_wrp) bctx.getInstance(); - ejbInv.bean = b; - checkSecurity(ejbInv); - bctx.setFinding(); - rctx.bmcalled = true; - pkl = b.ejb$M.getCapName()($M.getActualParameters()); - bctx.setActive(); - Iterator pki = pkl.iterator(); - while (pki.hasNext()) { - Object _pk = pki.next(); -#if ($EntityCMP2.booleanValue()) - // Fix bug #300526 - PName pn = (PName) _pk; - if ((pn == null) || (pn.isNull())) { - v.addElement(null); - } else -#end - { - bs = ef.getEJB(_pk); - if (!mapped) { - mapped = bs.tryBindICtx(rctx.currTx, bctx, false); - } - v.addElement(bs.getLocal()); - } - } - } catch (javax.ejb.AccessLocalException e) { - throw new EJBException("Security Exception thrown by an enterprise Bean", e); - } catch (EJBException e) { - rctx.sysExc = e; - throw e; - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new EJBException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new EJBException("Error thrown by an enterprise Bean"+e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw new EJBException("Remote Exception raised:", e); - } finally { - if (! mapped && bctx != null) { - ef.releaseJContext(bctx); - } - postInvoke(rctx); - } - return v; - } - -#elseif ($M.isFinderEnum()) - - public $M.getReturnType() $M.getName()($M.getFormalParameters()) -#if ( $M.getExceptionList().length() > 0 ) - throws $M.getExceptionList() -#end - { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - - CollectionEnum v = new CollectionEnum(); - boolean mapped = false; - Enumeration pkl; - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - RequestCtx rctx = preInvoke($M.getTxAttribute()); - JEntitySwitch bs = null; - JEntityFactory ef = (JEntityFactory) bf; - JEntityContext bctx = null; - try { - ef.syncForFind(rctx.currTx); - bctx = ef.getJContext(null); - $bean_wrp b = ($bean_wrp) bctx.getInstance(); - ejbInv.bean = b; - checkSecurity(ejbInv); - bctx.setFinding(); - rctx.bmcalled = true; - pkl = b.ejb$M.getCapName()($M.getActualParameters()); - bctx.setActive(); - while (pkl.hasMoreElements()) { - Object _pk = pkl.nextElement(); -#if ($EntityCMP2.booleanValue()) - // Fix bug #300526 - PName pn = (PName) _pk; - if ((pn == null) || (pn.isNull())) { - v.addElement(null); - } else -#end - { - bs = ef.getEJB(_pk); - if (!mapped) { - mapped = bs.tryBindICtx(rctx.currTx, bctx, false); - } - v.addElement(bs.getLocal()); - } - } - } catch (javax.ejb.AccessLocalException e) { - throw new EJBException("Security Exception thrown by an enterprise Bean", e); - } catch (EJBException e) { - rctx.sysExc = e; - throw e; - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new EJBException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new EJBException("Error thrown by an enterprise Bean"+e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw new EJBException("Remote Exception raised:", e); - } finally { - if (! mapped && bctx != null) { - ef.releaseJContext(bctx); - } - postInvoke(rctx); - } - return v; - } - -#elseif ($M.isFinderSimple()) - /** - * finder method returning only 1 PK - */ - public $M.getReturnType() $M.getName()($M.getFormalParameters()) -#if ( $M.getExceptionList().length() > 0 ) - throws $M.getExceptionList() -#end - { - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - RequestCtx rctx = preInvoke($M.getTxAttribute()); - JEntitySwitch bs = null; - JEntityFactory ef = (JEntityFactory) bf; - JEntityContext bctx = null; - boolean mapped = false; - try { - ef.syncForFind(rctx.currTx); - bctx = ef.getJContext(null); - $bean_wrp b = ($bean_wrp) bctx.getInstance(); - ejbInv.bean = b; - checkSecurity(ejbInv); - bs = ef.getJEntitySwitch(); - bctx.setEntitySwitch(bs); - bctx.setFinding(); - rctx.bmcalled = true; - Object pk = b.ejb$M.getCapName()($M.getActualParameters()); -#if ($EntityCMP2.booleanValue()) - // Fix bug #300526 - PName pn = (PName) pk; - if ((pn == null) || (pn.isNull())) { - return null; - } -#end - bctx.setActive(); - JEntitySwitch old = ef.existEJB(pk, bs, false); - if (old != null) { - bs = old; - bctx.setEntitySwitch(bs); - } - mapped = bs.tryBindICtx(rctx.currTx, bctx, true); - } catch (EJBException e) { - rctx.sysExc = e; - throw e; - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new EJBException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new EJBException("Error thrown by an enterprise Bean"+e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw new EJBException("Remote Exception raised:", e); - } finally { - if (! mapped && bctx != null) { - ef.releaseJContext(bctx); - } - postInvoke(rctx); - } - return ($local) bs.getLocal(); - } - -#elseif ($M.isFinderByPk()) - /** - * findByPrimaryKey - */ - public $M.getReturnType() $M.getName()($M.getFormalParameters()) -#if ( $M.getExceptionList().length() > 0 ) - throws $M.getExceptionList() -#end - { - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - RequestCtx rctx = preInvoke($M.getTxAttribute()); - JEntitySwitch bs = null; - JEntityFactory ef = (JEntityFactory) bf; - JEntityContext bctx = null; - boolean mapped = false; - try { - bctx = ef.getJContext(null); - $bean_wrp b = ($bean_wrp) bctx.getInstance(); - ejbInv.bean = b; - checkSecurity(ejbInv); - bs = ef.getJEntitySwitch(); - bctx.setEntitySwitch(bs); - bctx.setFinding(); - rctx.bmcalled = true; - Object pk = -#if ($EntityCMP2.booleanValue()) - decode($M.getActualParameters()); -#else - $M.getActualParameters(); -#end - JEntitySwitch old = ef.existEJB(pk, bs, true); - if (old != null) { - bs = old; - bctx.setEntitySwitch(bs); - } else { - try { - pk = b.ejb$M.getCapName()(($pk) $M.getActualParameters()); - } catch (FinderException e) { - bs.forceDiscardICtx(rctx.currTx); - throw e; - } - ef.startEJB(pk); - } - bctx.setActive(); - mapped = bs.tryBindICtx(rctx.currTx, bctx, true); - } catch (EJBException e) { - rctx.sysExc = e; - throw e; - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new EJBException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new EJBException("Error thrown by an enterprise Bean"+e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw new EJBException("Remote Exception raised:", e); -#if ($EntityCMP2.booleanValue()) - } catch (org.objectweb.jorm.api.PException e) { - rctx.sysExc = e; - throw new EJBException("decoding PK failed", e); -#end - } finally { - if (! mapped && bctx != null) { - ef.releaseJContext(bctx); - } - postInvoke(rctx); - } - return ($local) bs.getLocal(); - } - -#elseif ($M.isRemovePk()) - - /** - * Remove by PK - * @throws RemoveException - */ - public void remove(Object p1) throws $M.getExceptionList() { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - RequestCtx rctx = preInvoke($M.getTxAttribute()); - JEntitySwitch bs = null; - JEntityFactory ef = (JEntityFactory) bf; - JEntityContext bctx = null; - boolean mapped = false; - try { - ef.dummyFinderException(true); - bctx = ef.getJContext(null); - $bean_wrp b = ($bean_wrp) bctx.getInstance(); - ejbInv.bean = b; - checkSecurity(ejbInv); -#if ($EntityCMP2.booleanValue()) - Object pk = decode(($pk) p1); - bs = ef.getEJB(pk); - bctx.setEntitySwitch(bs); - b.ejbFindByPrimaryKey((PName)pk); -#else - bs = ef.getEJB(p1); - bctx.setEntitySwitch(bs); - b.ejbFindByPrimaryKey(($pk) p1); -#end - bctx = bs.getICtx(rctx.currTx, bctx); - // Must set this before setRemove() because exception may - // occur in ejbRemove, and in that case, we must keep the context. - mapped = true; - rctx.bmcalled = true; - bctx.setRemoved(); - } catch (EJBException e) { - rctx.sysExc = e; - throw e; - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new EJBException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new EJBException("Error thrown by an enterprise Bean"+e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw new EJBException("Remote Exception raised:", e); -#if ($EntityCMP2.booleanValue()) - } catch (PException e) { - rctx.sysExc = e; - throw new EJBException("JORM PException thrown", e); -#end - } catch (FinderException e) { - rctx.sysExc = e; - throw new EJBException(e.toString()); - } finally { - if (!mapped && bctx != null) { - // release context in case of exception. - ef.releaseJContext(bctx); - } - postInvoke(rctx); - } - } - -#else - - /** - * Home Method - */ - public $M.getReturnType() $M.getName()($M.getFormalParameters()) -#if ( $M.getExceptionList().length() > 0 ) - throws $M.getExceptionList() -#end - { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - RequestCtx rctx = preInvoke($M.getTxAttribute()); - JEntityFactory ef = (JEntityFactory) bf; -#if ($M.getReturnType() != "void") - $M.getReturnType() result; -#end - JEntityContext bctx = null; - try { - bctx = ef.getJContext(null); - $bean_wrp b = ($bean_wrp) bctx.getInstance(); - ejbInv.bean = b; - checkSecurity(ejbInv); - rctx.bmcalled = true; -#if ($M.getReturnType() != "void") - result = -#end - b.ejbHome$M.getCapName()($M.getActualParameters()); - } catch (EJBException e) { - rctx.sysExc = e; - throw e; - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new EJBException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new EJBException("Error thrown by an enterprise Bean"+e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw new EJBException("Remote Exception raised:", e); - } finally { - if (bctx != null) { - ef.releaseJContext(bctx); - } - postInvoke(rctx); - } -#if ($M.getReturnType() != "void") - return result; -#end - } - -#end - -#end - - public JEntityLocal createLocalObject() { - return new $local_wrp((JEntityFactory)bf); - } - -#if ($EntityCMP2.booleanValue()) - /** - * CMP2 methods : - * ============== - * In our case it has been choosen that the container (the generic part) - * manages PName. This is the generated objects which do the translation - * between PName and PK - */ - - // IMPLEMENTATION OF THE Coder INTERFACE // - /** - * This method build a PName with the primary key specifed in parameter. - * To build the pname the PNamingContext associated to the bean is used. - * Futhermore the PKFieldExtractor class is used as a specific PNameGetter - * in case of the PName is composite (several fields). - */ - public PName decode(Object pk) - throws PException, UnsupportedOperationException { - if (pk == null) { - return ((PClassMapping) bf).getPBinder().getNull(); - } -#**##if($pkIsUserClass.booleanValue()) - return ((PClassMapping) bf).getPBinder().decodeAbstract( - new PkFieldExtractor(($pk) pk), null); -#**##else ## Pk is a java.lang class (String, Long, ...) - return ((PClassMapping) bf).getPBinder().$pkDecodeMethod; -#**##end - } - - /** - * This method build a primary key with the PName specifed in parameter. - * To build the primary key the PNamingContext associated to the bean is - * used. In case of the PName is composite (several fields), the - * encodeAbstract must return a specific PNameGetter. - */ - public Object encode(PName pn) - throws PException, UnsupportedOperationException { - if (pn==null || pn.isNull()) { - return null; - } -#**##if($pkIsUserClass.booleanValue()) - $pk pk = new $pk(); - ${dd.getJormPNameGetterClassName()} png = (${dd.getJormPNameGetterClassName()}) - ((PClassMapping) bf).getPBinder().encodeAbstract(pn); -#* *##foreach ($pkf in $fieldPkList) -#* *##if (!$pkf.isMustBeConvert()) - pk.${pkf.getName()} = png.pnGet${pkf.getNameUpperFirst()}(null); -#* *##else - pk.${pkf.getName()} = (${pkf.getTypeName()})${pkf.getConvertClassName()}.toMemory((png.pnGet${pkf.getNameUpperFirst()}(null))); -#* *##end -#* *##end - return pk; -#**##else ## Pk is a java.lang class (String, Long, ...) - return $pkMappingToMemoryMethod(((PClassMapping) bf).getPBinder().$pkEncodeMethod(pn)); -#**##end - } - -#**##if($pkIsUserClass.booleanValue()) - /** - * This class is used to decode a primary key into a PName. It is - * specilized to the name structure - */ - private class PkFieldExtractor implements ${dd.getJormPNameGetterClassName()} { - $pk pk; - public PkFieldExtractor($pk pk) { - this.pk = pk; - } -#* *##foreach ($pkf in $fieldPkList) - public ${pkf.getJormTypeName()} pnGet${pkf.getNameUpperFirst()}(Object ctx) { -#* *##if (!$pkf.isMustBeConvert()) - return pk.${pkf.getName()}; -#* *##else - return (${pkf.getJormTypeName()})${pkf.getConvertClassName()}.toStorage((pk.${pkf.getName()})); -#* *##end - } -#* *##end -} -#**##end - - // IMPLEMENTATION OF THE PObjectHome INTERFACE // - - public PObject getPObject(PName pn) { - return (PObject) ((JEntityFactory) bf).getEJB(pn).getLocal(); - } -#end ##EntityCMP2 - } -// End: $Id$ diff --git a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JEntityRemote.vm b/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JEntityRemote.vm deleted file mode 100644 index 8fd45be6f9d62bbb6105a59ae16080d764e884f4..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JEntityRemote.vm +++ /dev/null @@ -1,400 +0,0 @@ -## --------------------------------------------------------------------------- -## JOnAS: Java(TM) Open Application Server -## Copyright (C) 1999-2004 Bull S.A. -## Contact: jonas-team@objectweb.org -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -## USA -## -## Initial developer(s): Philippe Durieux, Helene Joanin. -## Contributor(s): ______________________________________. -## -## --------------------------------------------------------------------------- -## $Id$ -## --------------------------------------------------------------------------- - -// This class is the bean specific part of JEntityRemote -// Generated by GenIC via Velocity. Do not edit directly this file. -// Start: $Id$ - -#if ($package.length() != 0) -package $package; -#end - -import java.lang.Error; -import java.lang.RuntimeException; -import java.rmi.RemoteException; -import java.rmi.AccessException; - -import javax.ejb.Handle; -import javax.ejb.RemoveException; -import javax.ejb.EJBException; - -import org.ow2.carol.rmi.exception.RmiUtility; -import org.ow2.carol.util.configuration.ConfigurationRepository; - -import org.ow2.jonas.lib.ejb21.JEntityContext; -import org.ow2.jonas.lib.ejb21.JEntityFactory; -import org.ow2.jonas.lib.ejb21.JEntityRemote; -import org.ow2.jonas.lib.ejb21.ha.JRepEntityRemote; -import org.ow2.jonas.lib.ejb21.RequestCtx; -import org.ow2.jonas.lib.ejb21.TraceEjb; -import org.ow2.jonas.lib.svc.JHandleIIOP; -import org.objectweb.util.monolog.api.BasicLevel; -import org.ow2.jonas.lib.ejb21.EJBInvocation; - -#if ($EntityCMP2.booleanValue()) -import org.ow2.jonas.deployment.ejb.MethodDesc; -import org.ow2.jonas.lib.ejb21.jorm.PObject; -import org.ow2.jonas.lib.ejb21.jorm.Coder; -import org.objectweb.jorm.naming.api.PName; - - - -public class $class -#if ($isClusterReplicated) - extends JRepEntityRemote -#else - extends JEntityRemote -#end - implements PObject, $remote -#* *##if ($dd.needJormCoherenceHelper())## - , ${dd.getJormCoherenceHelperFQItfName()} -#* *##end## - { -#else - -public class $class -#if ($isClusterReplicated) - extends JRepEntityRemote -#else - extends JEntityRemote -#end - implements $remote { -#end - - /** - * Constructor - */ - public $class(JEntityFactory bf) throws RemoteException { - - super(bf); - } - - /** - * EJBObject interface : getHandle. - * If Handle not build yet, create a ne one before. - */ - public Handle getHandle() { - String protocol = ConfigurationRepository.getCurrentConfiguration().getProtocol().getName(); - //TraceEjb.interp.log(BasicLevel.DEBUG, "Current protocol = " + protocol); - - if (protocol.equals("iiop")) { - return new JHandleIIOP(this); - } else { - return new $handle(this); - } - } - -#foreach ($M in $methodList) - -#if ($M.isRemoveThis()) - - /** - * remove this bean instance - */ - public void remove() throws RemoteException, RemoveException { - - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - - #beforeThrowRemoteException() - -#if ($isClusterReplicated) -/* ******************REPLICATION CODE STARTS HERE*********************** */ - if (hasResponse()) { - cmilogger.log(BasicLevel.DEBUG, "Response found"); - // Obtain the response associated with the request - // and delete the request because the method is going to return - Object response = getResponse(); - return; - } else { - cmilogger.log(BasicLevel.DEBUG, "Response not found"); - } -/* **********************END OF REPLICATION CODE************************ */ -#end - - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - - RequestCtx rctx = preInvoke($M.getTxAttribute()); - checkSecurity(ejbInv); - JEntityContext bctx = null; - try { - bctx = bs.getICtx(rctx.currTx, true); - rctx.bmcalled = true; - bctx.setRemoved(); - } catch (javax.ejb.AccessLocalException e) { - throw new AccessException("Security Exception thrown by an enterprise Bean", e); - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new RemoteException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new RemoteException("Error thrown by an enterprise Bean", e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw e; - } finally { -#if ($isClusterReplicated) -/* ******************REPLICATION CODE STARTS HERE*********************** */ - // There is no response to the client (void parameter needed by HA) - postInvoke(rctx, bctx, null); -/* **********************END OF REPLICATION CODE************************ */ -#else - postInvoke(rctx); -#end - } - - #afterThrowRemoteException() - - } - -#else - - public $M.getReturnType() $M.getName()($M.getFormalParameters()) throws $M.getExceptionList() { - - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - - #beforeThrowRemoteException() - - #if ($M.getReturnType() != "void") - $M.getReturnType() result = $M.getDefaultValue(); - #end - -#if ($isClusterReplicated) -/* ******************REPLICATION CODE STARTS HERE*********************** */ - if (hasResponse()) { - cmilogger.log(BasicLevel.DEBUG, "Response found"); - // Obtain the response associated with the request - // and delete the request because the method is going to return - Object response = getResponse(); - #if ($M.getReturnType() == "void") - cmilogger.log(BasicLevel.DEBUG, "\tResponse void"); - return; - #else - cmilogger.log(BasicLevel.DEBUG, "\tResponse not void"); - #if ($M.getWrapperType() != "") - return ($M.getReturnType()) (($M.getWrapperType())response).$M.getReturnType()Value(); - #else - return ($M.getReturnType()) response; - #end - #end - } else { - cmilogger.log(BasicLevel.DEBUG, "Response not found"); - } -/* **********************END OF REPLICATION CODE************************ */ -#end - - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - - RequestCtx rctx = preInvoke($M.getTxAttribute()); - JEntityContext bctx = null; - try { - bctx = bs.getICtx(rctx.currTx, true); - $bean_wrp b = ($bean_wrp) bctx.getInstance(); - ejbInv.bean = b; - checkSecurity(ejbInv); - rctx.bmcalled = true; - #if ($M.getReturnType() != "void") - result = - #end - b.$M.getName()($M.getActualParameters()); - } catch (javax.ejb.AccessLocalException e) { - throw new AccessException("Security Exception thrown by an enterprise Bean", e); - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new RemoteException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new RemoteException("Error thrown by an enterprise Bean", e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw e; - } finally { -#if ($isClusterReplicated) -/* ******************REPLICATION CODE STARTS HERE*********************** */ - // If exists, pass the return type to postInvoke (Needed by HA) - #if ($M.getReturnType() != "void") - #if ($M.getWrapperType() != "") - postInvoke(rctx, bctx, new $M.getWrapperType()(result)); - #else - postInvoke(rctx, bctx, result); - #end - #else - postInvoke(rctx, bctx, null); - #end -/* **********************END OF REPLICATION CODE************************ */ -#else - postInvoke(rctx); -#end - } - #if ($M.getReturnType() != "void") - return result; - #end - - #afterThrowRemoteException() - } - -#end - -#end - -#if ($EntityCMP2.booleanValue()) - /** - * CMP2 methods : - * ============== - * In our case it has been choosen that the container (the generic part) - * manages PName. This is the generated objects which do the translation - */ - - /** - * The getPrimaryKey method is overrided in order to translate the PName - * managed by the container, into a PK. - */ - public Object getPrimaryKey() { - try { - return ((Coder) getEJBHome()) - .encode((PName) super.getPrimaryKey()); - } catch (Exception e) { - TraceEjb.interp.log(BasicLevel.ERROR, - "Impossible to translate the PName in Primary key", e); - throw new EJBException( - "Impossible to translate the PName in Primary key", e); - } - } - - // IMPLEMENTATION OF THE PObject INTERFACE // - - public PName getPName() { - return (PName) super.getPrimaryKey(); - } - // Management of the CMR coherence // - //---------------------------------// -############################################################################### -############################################################################### -## -## Iterate over the CMR field in order to add the methods which are used to -## maintain the coherence of relations. There are two macro which avoid to -## duplicate the source code. -## -#macro( beforeRecallr ) - RequestCtx rctx = null; - try { - rctx = preInvoke(MethodDesc.TX_SUPPORTS); - } catch (RemoteException e) { - throw new EJBException("Remote Exception raised:", e); - } - try { - JEntityContext bctx = bs.getICtx(rctx.currTx, false); - $bean_wrp b = ($bean_wrp) bctx.getInstance(); - rctx.bmcalled = true; -#end## -#macro( afterRecallr ) - } catch (EJBException e) { - rctx.sysExc = e; - throw e; - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new EJBException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new EJBException("Error thrown by an enterprise Bean"+e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw new EJBException("Remote Exception raised:", e); - } finally { - try { - postInvoke(rctx); - } catch (RemoteException e) { - throw new EJBException("Remote Exception raised:", e); - } - } -#end -#* *##foreach ($F in $cmrList) -#* *##if (!$F.isMMu() && !$F.isMOu())## - // Methods to manage the coherence of the ${F.getName()} CMR field // - //------------------------------------------------------------// -################################################ -#* *##if ($F.getRsr().isTargetMultiple()) - public ${F.getTypeName()} jonasGet${F.getUFLName()}() { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - ${F.getTypeName()} result = null; -#beforeRecallr() - result = b.jonasGet${F.getUFLName()}(); -#afterRecallr() - return result; - } - - public void jonasSet${F.getUFLName()}(${F.getTypeName()} val) { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); -#beforeRecallr() - b.jonasSet${F.getUFLName()}(val); -#afterRecallr() - } - - public void jonasAdd${F.getUFLName()}(${F.getOppositeHelperFQClassName()} bean) { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); -#beforeRecallr() - b.jonasAdd${F.getUFLName()}(bean); -#afterRecallr() - } - - public void jonasRemove${F.getUFLName()}(${F.getOppositeHelperFQClassName()} bean) { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); -#beforeRecallr() - b.jonasRemove${F.getUFLName()}(bean); -#afterRecallr() - } - -## -#* *##else## simple CMR field -## - public ${F.getOppositeHelperFQClassName()} jonasGet${F.getUFLName()}() { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - ${F.getOppositeHelperFQClassName()} result = null; -#beforeRecallr() - result = b.jonasGet${F.getUFLName()}(); -#afterRecallr() - return result; - } - - public void jonasSet${F.getUFLName()}(${F.getOppositeHelperFQClassName()} val) { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); -#beforeRecallr() - b.jonasSet${F.getUFLName()}(val); -#afterRecallr() - } -#* *##end## multivalued CMR field - - -#* *##end## -#* *##end## foreach CMR field -#end - -} -// End: $Id$ diff --git a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JServiceEndpoint.vm b/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JServiceEndpoint.vm deleted file mode 100644 index 7ab70c78e79be6c8d1bb24fbd2c9ec2219429849..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JServiceEndpoint.vm +++ /dev/null @@ -1,126 +0,0 @@ -## --------------------------------------------------------------------------- -## JOnAS: Java(TM) Open Application Server -## Copyright (C) 1999-2004 Bull S.A. -## Contact: jonas-team@objectweb.org -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -## USA -## -## Initial developer(s): Guillaume Sauthier -## Contributor(s): ______________________________________. -## -## --------------------------------------------------------------------------- -## $Id$ -## --------------------------------------------------------------------------- - -// This class is the bean specific part of JServiceEndpoint -// Generated by GenIC via Velocity. Do not edit directly this file. -// Start: $Id$ - -#if ($package.length() != 0) -package $package; -#end - -import java.lang.Error; -import java.lang.RuntimeException; -import java.rmi.RemoteException; - -import javax.ejb.EJBException; -import javax.ejb.RemoveException; - -import org.ow2.carol.rmi.exception.RmiUtility; -import org.ow2.jonas.lib.ejb21.JSessionContext; -import org.ow2.jonas.lib.ejb21.JStatelessFactory; -import org.ow2.jonas.lib.ejb21.JServiceEndpoint; -import org.ow2.jonas.lib.ejb21.RequestCtx; -import org.ow2.jonas.lib.ejb21.TraceEjb; -import org.ow2.jonas.lib.ejb21.EJBInvocation; - -import org.ow2.jonas.deployment.ejb.SessionStatelessDesc; - -import org.objectweb.util.monolog.api.BasicLevel; - -public class $class extends JServiceEndpoint implements $serviceEndpoint { - - /** - * Constructor - */ - public $class(JStatelessFactory sf) throws RemoteException { - super(sf); - } - -#foreach ($M in $methodList) - - public $M.getReturnType() $M.getName()($M.getFormalParameters()) - #if ( $M.getExceptionList().length() > 0 ) - throws $M.getExceptionList() - #end - - { - - //logger.log(BasicLevel.DEBUG, ""); - - #beforeThrowRemoteException() - - #if ($M.getReturnType() != "void") - $M.getReturnType() result; - #end - - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - RequestCtx rctx = preInvoke($M.getTxAttribute()); - try { - rctx.ejbContext = bs.getICtx(rctx.currTx); - $bean_wrp b = ($bean_wrp) rctx.ejbContext.getInstance(); - ejbInv.bean = b; - checkSecurity(ejbInv); - rctx.bmcalled = true; - - #if ($M.getReturnType() != "void") - result = - #end - b.$M.getName()($M.getActualParameters()); - - } catch (javax.ejb.AccessLocalException e) { - throw new EJBException("Security Exception thrown by an enterprise Bean", e); - } catch (EJBException e) { - rctx.sysExc = e; - throw e; - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new EJBException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new EJBException("Error thrown by an enterprise Bean"+e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw new EJBException("Remote Exception raised:", e); - } finally { - postInvoke(rctx); - } - - #if ($M.getReturnType() != "void") - return result; - #end - - #afterThrowRemoteException() - - } - -#end - -} -// End: $Id$ diff --git a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JServiceEndpointHome.vm b/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JServiceEndpointHome.vm deleted file mode 100644 index c9c0ce27f4394ea06406aa162835c2cf5338a0bc..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JServiceEndpointHome.vm +++ /dev/null @@ -1,58 +0,0 @@ -## --------------------------------------------------------------------------- -## JOnAS: Java(TM) Open Application Server -## Copyright (C) 1999-2004 Bull S.A. -## Contact: jonas-team@objectweb.org -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -## USA -## --------------------------------------------------------------------------- -## $Id$ -## --------------------------------------------------------------------------- - -// This class is the bean specific part of JServiceEndpointHome -// Generated by GenIC via Velocity. Do not edit directly this file. -// Start: $Id$ - -#if ($package.length() != 0) -package $package; -#end - -import java.rmi.RemoteException; - -import javax.ejb.EJBException; -import javax.ejb.RemoveException; - -import org.ow2.jonas.lib.ejb21.JStatelessFactory; -import org.ow2.jonas.lib.ejb21.JServiceEndpoint; -import org.ow2.jonas.lib.ejb21.JServiceEndpointHome; - -import org.ow2.jonas.deployment.ejb.SessionStatelessDesc; - -import org.objectweb.util.monolog.api.BasicLevel; - -public class $class extends JServiceEndpointHome { - - /** - * Constructor - */ - public $class(SessionStatelessDesc sd, JStatelessFactory sf) { - super(sd, sf); - } - - public JServiceEndpoint createServiceEndpointObject() throws RemoteException { - return new $service-endpoint_wrp((JStatelessFactory)bf); - } -} -// End: $Id$ diff --git a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JStatefulHome.vm b/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JStatefulHome.vm deleted file mode 100644 index 0c51d3c00b3262f582ab49d537649c8ac65ccd09..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JStatefulHome.vm +++ /dev/null @@ -1,183 +0,0 @@ -## --------------------------------------------------------------------------- -## JOnAS: Java(TM) Open Application Server -## Copyright (C) 1999-2004 Bull S.A. -## Contact: jonas-team@objectweb.org -## Copyright (C) 2006 Distributed Systems Lab. -## Universidad Politenica de Madrid (Spain) -## Contact: http://lsd.ls.fi.upm.es/lsd -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -## USA -## -## Initial developer(s): Philippe Durieux, Helene Joanin. -## Contributor(s): -## Francisco Perez-Sorrosal (fpsorrosal@no-spam@fi.upm.es) -## Alberto Paz-Jimenez (apaz@no-spam@fi.upm.es) -## -## --------------------------------------------------------------------------- -## $Id$ -## --------------------------------------------------------------------------- - -// This class is the bean specific part of JSessionHome for Stateful Sessions -// Generated by GenIC via Velocity. Do not edit directly this file. -// Start: $Id$ - -#if ($package.length() != 0) -package $package; -#end - -import java.lang.Error; -import java.rmi.RemoteException; -import java.rmi.Remote; - -import javax.ejb.Handle; -import javax.ejb.RemoveException; -import javax.ejb.SessionBean; - -import org.ow2.jonas.lib.ejb21.RequestCtx; -import org.ow2.jonas.lib.ejb21.JFactory; -import org.ow2.jonas.lib.ejb21.JSessionContext; -import org.ow2.jonas.lib.ejb21.JSessionFactory; -import org.ow2.jonas.lib.ejb21.JSessionHome; -import org.ow2.jonas.lib.ejb21.JSessionRemote; -import org.ow2.jonas.lib.ejb21.JStatefulContext; -import org.ow2.jonas.lib.ejb21.JStatefulFactory; -import org.ow2.jonas.lib.ejb21.JStatefulSwitch; -import org.ow2.jonas.lib.ejb21.TraceEjb; -import org.ow2.jonas.deployment.ejb.MethodDesc; -import org.ow2.jonas.deployment.ejb.SessionDesc; -import org.ow2.jonas.lib.ejb21.EJBInvocation; - -import org.ow2.carol.rmi.exception.RmiUtility; -import org.objectweb.util.monolog.api.BasicLevel; - -public class $class extends JSessionHome implements $home { - - // JOnAS version used to deploy - public static final String JONAS_VERSION = "$jVersion"; - - /** - * Created by JSessionFactory (by newInstance) - */ - public $class(SessionDesc dd, JSessionFactory bf) throws RemoteException { - - super(dd, bf); - } - -#foreach ($M in $methodList) - -#if ($M.isCreate()) - - /** - * create method - */ - public $M.getReturnType() $M.getName()($M.getFormalParameters()) throws $M.getExceptionList() { - - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - - #beforeThrowRemoteException() - - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - RequestCtx rctx = preInvoke(MethodDesc.TX_NOT_SET); - JStatefulSwitch bs = null; - JSessionFactory sf = (JSessionFactory) bf; - try { - bs = (JStatefulSwitch) sf.createEJB(); - JSessionContext bctx = sf.getJContext(bs); - rctx.ejbContext = bctx; - bs.bindICtx(rctx.currTx, (JStatefulContext) bctx); - $bean_wrp b = ($bean_wrp) bctx.getInstance(); - ejbInv.bean = b; - checkSecurity(ejbInv); - rctx.bmcalled = true; - b.ejb$M.getCapName()($M.getActualParameters()); - bctx.setActive(); - bs.saveOpenResources(); - } catch (javax.ejb.AccessLocalException e) { - throw new RemoteException("Security Exception thrown by an enterprise Bean", e); - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new RemoteException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new RemoteException("Error thrown by an enterprise Bean", e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw e; - } finally { - postInvoke(rctx); - } - - return ($remote) bs.getRemote(); - #afterThrowRemoteException() - - } - -#elseif ($M.isRemoveHandle()) - - /** - * Remove by Handle - */ - public void remove(Handle p1) throws $M.getExceptionList() { - - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - - #beforeThrowRemoteException() - - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - RequestCtx rctx = preInvoke(MethodDesc.TX_NOT_SET); - checkSecurity(ejbInv); - javax.ejb.EJBObject ejbobj = null; - try { - ejbobj = p1.getEJBObject(); - rctx.bmcalled = true; - ejbobj.remove(); - } catch (javax.ejb.AccessLocalException e) { - throw new RemoteException("Security Exception thrown by an enterprise Bean", e); - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new RemoteException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new RemoteException("Error thrown by an enterprise Bean", e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw e; - } finally { - postInvoke(rctx); - } - - #afterThrowRemoteException() - } - -#end - -#end - - public JSessionRemote createRemoteObject() throws RemoteException { - - #beforeThrowRemoteException() - - return new $remote_wrp((JStatefulFactory)bf); - - #afterThrowRemoteException() - - } -} -// End: $Id$ diff --git a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JStatefulLocal.vm b/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JStatefulLocal.vm deleted file mode 100644 index bd743ef1d9511fe967d71b19f74857115b812fe7..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JStatefulLocal.vm +++ /dev/null @@ -1,192 +0,0 @@ -## --------------------------------------------------------------------------- -## JOnAS: Java(TM) Open Application Server -## Copyright (C) 1999-2008 Bull S.A. -## Contact: jonas-team@objectweb.org -## Copyright (C) 2006 Distributed Systems Lab. -## Universidad Politecnica de Madrid (Spain) -## Contact: http://lsd.ls.fi.upm.es/lsd -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -## USA -## -## Initial developer(s): Philippe Durieux. -## Contributor(s): -## Francisco Perez-Sorrosal (fpsorrosal@no-spam@fi.upm.es) -## Alberto Paz-Jimenez (apaz@no-spam@fi.upm.es) -## S. Ali Tokmen, Malek Chahine: EJB statistics -## -## --------------------------------------------------------------------------- -## $Id$ -## --------------------------------------------------------------------------- - -// This class is the bean specific part of JSessionLocal -// Generated by GenIC via Velocity. Do not edit directly this file. -// Start: $Id$ - -#if ($package.length() != 0) -package $package; -#end - -import java.lang.Error; -import java.lang.RuntimeException; -import java.util.Date; -import java.rmi.RemoteException; -import javax.ejb.EJBException; -import javax.ejb.RemoveException; -import org.ow2.jonas.lib.ejb21.JSessionContext; -import org.ow2.jonas.lib.ejb21.JSessionFactory; -import org.ow2.jonas.lib.ejb21.JSessionLocal; -import org.ow2.jonas.lib.ejb21.ha.JRepStatefulLocal; -import org.ow2.jonas.lib.ejb21.RequestCtx; -import org.ow2.jonas.lib.ejb21.TraceEjb; -import org.ow2.jonas.lib.ejb21.EJBInvocation; -import org.ow2.jonas.lib.ejb21.MonitoringEvent; -import org.objectweb.util.monolog.api.BasicLevel; - - -#if ($isClusterReplicated) -public class $class extends JRepStatefulLocal implements $local { -#else -public class $class extends JSessionLocal implements $local { -#end - - /** - * Constructor - */ - public $class(JSessionFactory bf) { - super(bf); - } - -#foreach ($M in $methodList) - -#if ($M.isRemoveThis()) - - /** - * remove this bean instance - */ - public void remove() throws RemoveException { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - - RequestCtx rctx = preInvoke($M.getTxAttribute()); - checkSecurity(ejbInv); - - try { - JSessionContext bctx = bs.getICtx(rctx.currTx); - rctx.bmcalled = true; - bctx.setRemoved(); - } catch (EJBException e) { - rctx.sysExc = e; - throw e; - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new EJBException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new EJBException("Error thrown by an enterprise Bean: "+e); - - } catch (RemoteException e) { - rctx.sysExc = e; - throw new EJBException("Remote Exception raised: ", e); - } finally { -#if ($isClusterReplicated) -/* ******************REPLICATION CODE STARTS HERE*********************** */ - // There is no response to the client (void parameter needed by HA) - postInvoke(rctx, true); -/* **********************END OF REPLICATION CODE************************ */ -#else - postInvoke(rctx); -#end - - - } - } - -#else - - public $M.getReturnType() $M.getName()($M.getFormalParameters()) -#if ( $M.getExceptionList().length() > 0 ) - throws $M.getExceptionList() -#end - { - #timerVariablesDeclaration() - #getRequestStartTime() - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); -#if ($M.getReturnType() != "void") - $M.getReturnType() result; -#end - -#if ($isClusterReplicated) -/* ******************REPLICATION CODE STARTS HERE*********************** */ - // Inject the state if found on HA tables - injectState(); -/* **********************END OF REPLICATION CODE************************ */ -#end - - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - - RequestCtx rctx = preInvoke($M.getTxAttribute()); - try { - JSessionContext bctx = bs.getICtx(rctx.currTx); - $bean_wrp b = ($bean_wrp) bctx.getInstance(); - ejbInv.bean = b; - checkSecurity(ejbInv); - rctx.bmcalled = true; - #getBusinessStartTime() - -#if ($M.getReturnType() != "void") - result = -#end - b.$M.getName()($M.getActualParameters()); - } catch (EJBException e) { - rctx.sysExc = e; - throw e; - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new EJBException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new EJBException("Error thrown by an enterprise Bean"+e); - - } catch (RemoteException e) { - rctx.sysExc = e; - throw new EJBException("Remote Exception raised:", e); - } finally { - #getBusinessStopTime() -#if ($isClusterReplicated) -/* ******************REPLICATION CODE STARTS HERE*********************** */ - postInvoke(rctx, false); -/* **********************END OF REPLICATION CODE************************ */ -#else - postInvoke(rctx); -#end - #getRequestStopTime() - #updateEJBMonitoringData() - } -#if ($M.getReturnType() != "void") - return result; -#end - } - -#end - -#end - -} -// End: $Id$ diff --git a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JStatefulLocalHome.vm b/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JStatefulLocalHome.vm deleted file mode 100644 index e583361df29d9df21ef13b76b4fdf1dd7f27c7b2..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JStatefulLocalHome.vm +++ /dev/null @@ -1,136 +0,0 @@ -## --------------------------------------------------------------------------- -## JOnAS: Java(TM) Open Application Server -## Copyright (C) 1999-2004 Bull S.A.S. -## Contact: jonas-team@objectweb.org -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -## USA -## -## Initial developer(s): Philippe Durieux, Helene Joanin. -## Contributor(s): -## -## --------------------------------------------------------------------------- -## $Id$ -## --------------------------------------------------------------------------- - -// This class is the bean specific part of JSessionLocalHome for Stateful Sessions -// Generated by GenIC via Velocity. Do not edit directly this file. -// Start: $Id$ - -#if ($package.length() != 0) -package $package; -#end - -import java.lang.Error; -import java.rmi.RemoteException; -import javax.ejb.EJBException; -import javax.ejb.RemoveException; -import javax.ejb.SessionBean; -import org.ow2.jonas.lib.ejb21.RequestCtx; -import org.ow2.jonas.lib.ejb21.JFactory; -import org.ow2.jonas.lib.ejb21.JSessionContext; -import org.ow2.jonas.lib.ejb21.JSessionFactory; -import org.ow2.jonas.lib.ejb21.JSessionLocalHome; -import org.ow2.jonas.lib.ejb21.ha.JRepStatefulLocalHome; -import org.ow2.jonas.lib.ejb21.JSessionLocal; -import org.ow2.jonas.lib.ejb21.JStatefulContext; -import org.ow2.jonas.lib.ejb21.JStatefulFactory; -import org.ow2.jonas.lib.ejb21.JStatefulSwitch; -import org.ow2.jonas.lib.ejb21.TraceEjb; -import org.ow2.jonas.deployment.ejb.MethodDesc; -import org.ow2.jonas.deployment.ejb.SessionDesc; -import org.ow2.jonas.lib.ejb21.EJBInvocation; - -import org.objectweb.util.monolog.api.BasicLevel; - -#if ($isClusterReplicated) -public class $class extends JRepStatefulLocalHome implements $localhome { -#else -public class $class extends JSessionLocalHome implements $localhome { -#end - - // JOnAS version used to deploy - public static final String JONAS_VERSION = "$jVersion"; - - /** - * Created by JSessionFactory (by newInstance) - */ - public $class(SessionDesc dd, JSessionFactory bf) { - super(dd, bf); - } - -#foreach ($M in $methodList) - -#if ($M.isCreate()) - - /** - * create method - */ - public $M.getReturnType() $M.getName()($M.getFormalParameters()) -#if ( $M.getExceptionList().length() > 0 ) - throws $M.getExceptionList() -#end - { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - RequestCtx rctx = preInvoke(MethodDesc.TX_NOT_SET); - JStatefulSwitch bs = null; - JSessionFactory sf = (JSessionFactory) bf; - try { - bs = (JStatefulSwitch) sf.createEJB(); - JSessionContext bctx = sf.getJContext(bs); - rctx.ejbContext = bctx; - bs.bindICtx(rctx.currTx, (JStatefulContext) bctx); - $bean_wrp b = ($bean_wrp) bctx.getInstance(); - ejbInv.bean = b; - checkSecurity(ejbInv); - rctx.bmcalled = true; - b.ejb$M.getCapName()($M.getActualParameters()); - bctx.setActive(); - bs.saveOpenResources(); - } catch (javax.ejb.AccessLocalException e) { - throw new EJBException("Security Exception thrown by an enterprise Bean", e); - } catch (EJBException e) { - rctx.sysExc = e; - throw e; - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new EJBException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new EJBException("Error thrown by an enterprise Bean"+e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw new EJBException("Remote Exception raised:", e); - } finally { - postInvoke(rctx); - } -#if ($isClusterReplicated) - replicateCreate(bs); -#end - return ($local) bs.getLocal(); - } - -#end - -#end - - public JSessionLocal createLocalObject() { - return new $local_wrp((JStatefulFactory)bf); - } -} -// End: $Id$ diff --git a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JStatefulRemote.vm b/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JStatefulRemote.vm deleted file mode 100644 index b909da9c63ef24df2b3dd78ea29b8c539e9f4824..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JStatefulRemote.vm +++ /dev/null @@ -1,236 +0,0 @@ -## --------------------------------------------------------------------------- -## JOnAS: Java(TM) Open Application Server -## Copyright (C) 1999-2004 Bull S.A. -## Contact: jonas-team@objectweb.org -## Copyright (C) 2006 Distributed Systems Lab. -## Universidad Politenica de Madrid (Spain) -## Contact: http://lsd.ls.fi.upm.es/lsd -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -## USA -## -## Initial developer(s): Philippe Durieux. -## Contributor(s): -## Francisco Perez-Sorrosal (fpsorrosal@no-spam@fi.upm.es) -## Alberto Paz-Jimenez (apaz@no-spam@fi.upm.es) -## S. Ali Tokmen, Malek Chahine: EJB statistics -## -## --------------------------------------------------------------------------- -## $Id$ -## --------------------------------------------------------------------------- - -// This class is the bean specific part of JSessionRemote -// Generated by GenIC via Velocity. Do not edit directly this file. -// Start: $Id$ - -#if ($package.length() != 0) -package $package; -#end - -import java.lang.Error; -import java.lang.RuntimeException; -import java.util.Date; -import java.rmi.AccessException; -import java.rmi.RemoteException; - -import javax.ejb.RemoveException; - -import org.ow2.jonas.lib.ejb21.JSessionContext; -import org.ow2.jonas.lib.ejb21.JSessionFactory; -import org.ow2.jonas.lib.ejb21.JSessionRemote; -import org.ow2.jonas.lib.ejb21.ha.JRepStatefulRemote; -import org.ow2.jonas.lib.ejb21.RequestCtx; -import org.ow2.jonas.lib.ejb21.TraceEjb; -import org.ow2.jonas.lib.ejb21.EJBInvocation; -import org.ow2.jonas.lib.ejb21.MonitoringEvent; - -import org.ow2.carol.rmi.exception.RmiUtility; -import org.objectweb.util.monolog.api.BasicLevel; - -#if ($isClusterReplicated) -public class $class extends JRepStatefulRemote implements $remote { -#else -public class $class extends JSessionRemote implements $remote { -#end - - /** - * Constructor - */ - public $class(JSessionFactory bf) throws RemoteException { - - super(bf); - } - -#foreach ($M in $methodList) - -#if ($M.isRemoveThis()) - - /** - * remove this bean instance - */ - public void remove() throws RemoteException, RemoveException { - - //TraceEjb.interp.log(BasicLevel.DEBUG,""); - - #beforeThrowRemoteException() - - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - - RequestCtx rctx = preInvoke($M.getTxAttribute()); - checkSecurity(ejbInv); - - try { - JSessionContext bctx = bs.getICtx(rctx.currTx); - rctx.bmcalled = true; - bctx.setRemoved(); - } catch (javax.ejb.AccessLocalException e) { - throw new AccessException("Security Exception thrown by an enterprise Bean", e); - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new RemoteException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new RemoteException("Error thrown by an enterprise Bean", e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw e; - } finally { -#if ($isClusterReplicated) -/* ******************REPLICATION CODE STARTS HERE*********************** */ - // There is no response to the client (void parameter needed by HA) - postInvoke(rctx, null, true); -/* **********************END OF REPLICATION CODE************************ */ -#else - postInvoke(rctx); -#end - } - - #afterThrowRemoteException() - - } - -#else - - public $M.getReturnType() $M.getName()($M.getFormalParameters()) throws $M.getExceptionList() { - - //TraceEjb.interp.log(BasicLevel.DEBUG,""); - #timerVariablesDeclaration() - #getRequestStartTime() - #beforeThrowRemoteException() - - #if ($M.getReturnType() != "void") - $M.getReturnType() result = $M.getDefaultValue(); - #end - -#if ($isClusterReplicated) -/* ******************REPLICATION CODE STARTS HERE*********************** */ - if (hasResponse()) { - // Inject the state if found on HA tables - injectState(); - - cmilogger.log(BasicLevel.DEBUG, "Response found"); - // Obtain the response associated with the request - // and delete the request because the method is going to return - Object response = getResponse(); - #if ($M.getReturnType() == "void") - cmilogger.log(BasicLevel.DEBUG, "\tResponse void"); - return; - #else - cmilogger.log(BasicLevel.DEBUG, "\tResponse not void"); - #if ($M.getWrapperType() != "") - return ($M.getReturnType()) (($M.getWrapperType())response).$M.getReturnType()Value(); - #else - return ($M.getReturnType()) response; - #end - #end - } else { - // Inject the state if found on HA tables - injectState(); - cmilogger.log(BasicLevel.DEBUG, "Response not found"); - } -/* **********************END OF REPLICATION CODE************************ */ -#end - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - - RequestCtx rctx = preInvoke($M.getTxAttribute()); - - try { - JSessionContext bctx = bs.getICtx(rctx.currTx); - $bean_wrp b = ($bean_wrp) bctx.getInstance(); - ejbInv.bean = b; - checkSecurity(ejbInv); - rctx.bmcalled = true; - - #getBusinessStartTime() - - #if ($M.getReturnType() != "void") - result = - #end - - b.$M.getName()($M.getActualParameters()); - - } catch (javax.ejb.AccessLocalException e) { - throw new AccessException("Security Exception thrown by an enterprise Bean", e); - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new RemoteException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new RemoteException("Error thrown by an enterprise Bean", e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw e; - } finally { - #getBusinessStopTime() - -#if ($isClusterReplicated) -/* ******************REPLICATION CODE STARTS HERE*********************** */ - // If exists, pass the return type to postInvoke (Needed by HA) - #if ($M.getReturnType() != "void") - #if ($M.getWrapperType() != "") - postInvoke(rctx, new $M.getWrapperType()(result), false); - #else - postInvoke(rctx, result, false); - #end - #else - postInvoke(rctx, null, false); - #end -/* **********************END OF REPLICATION CODE************************ */ -#else - postInvoke(rctx); -#end - - #getRequestStopTime() - #updateEJBMonitoringData() - } - - #if ($M.getReturnType() != "void") - return result; - #end - - #afterThrowRemoteException() - - } - -#end - -#end - -} -// End: $Id$ diff --git a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JStatelessHome.vm b/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JStatelessHome.vm deleted file mode 100644 index f2ebb629c6bdcaddbd6fab5af43b539a29500287..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JStatelessHome.vm +++ /dev/null @@ -1,169 +0,0 @@ -## --------------------------------------------------------------------------- -## JOnAS: Java(TM) Open Application Server -## Copyright (C) 1999-2004 Bull S.A. -## Contact: jonas-team@objectweb.org -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -## USA -## -## Initial developer(s): Philippe Durieux, Helene Joanin. -## Contributor(s): ______________________________________. -## -## --------------------------------------------------------------------------- -## $Id$ -## --------------------------------------------------------------------------- - -// This class is the bean specific part of JSessionHome for Stateless Sessions -// Generated by GenIC via Velocity. Do not edit directly this file. -// Start: $Id$ - -#if ($package.length() != 0) -package $package; -#end - -import java.lang.Error; -import java.rmi.RemoteException; - -import javax.ejb.Handle; -import javax.ejb.RemoveException; -import javax.ejb.SessionBean; - -import org.ow2.jonas.lib.ejb21.RequestCtx; -import org.ow2.jonas.lib.ejb21.JFactory; -import org.ow2.jonas.lib.ejb21.JSessionContext; -import org.ow2.jonas.lib.ejb21.JSessionFactory; -import org.ow2.jonas.lib.ejb21.JSessionHome; -import org.ow2.jonas.lib.ejb21.JSessionRemote; -import org.ow2.jonas.lib.ejb21.JSessionSwitch; -import org.ow2.jonas.lib.ejb21.JStatelessFactory; -import org.ow2.jonas.lib.ejb21.TraceEjb; -import org.ow2.jonas.deployment.ejb.MethodDesc; -import org.ow2.jonas.deployment.ejb.SessionDesc; -import org.ow2.jonas.lib.ejb21.EJBInvocation; - -import org.ow2.carol.rmi.exception.RmiUtility; -import org.objectweb.util.monolog.api.BasicLevel; - - -public class $class extends JSessionHome implements $home { - - // JOnAS version used to deploy - public static final String JONAS_VERSION = "$jVersion"; - - /** - * Created by JSessionFactory (by newInstance) - */ - public $class(SessionDesc dd, JSessionFactory bf) throws RemoteException { - - super(dd, bf); - } - -#foreach ($M in $methodList) - -#if ($M.isCreate()) - - /** - * create method (unique for stateless session beans) - */ - public $M.getReturnType() create() throws $M.getExceptionList() { - - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - - #beforeThrowRemoteException() - - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - RequestCtx rctx = preInvoke(MethodDesc.TX_NOT_SET); - checkSecurity(ejbInv); - JSessionSwitch bs = null; - try { - rctx.bmcalled = true; - bs = ((JSessionFactory) bf).createEJB(); - } catch (javax.ejb.AccessLocalException e) { - throw new RemoteException("Security Exception thrown by an enterprise Bean", e); - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new RemoteException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new RemoteException("Error thrown by an enterprise Bean", e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw e; - } finally { - postInvoke(rctx); - } - - return ($remote) bs.getRemote(); - - #afterThrowRemoteException() - - } - -#elseif ($M.isRemoveHandle()) - - /** - * Remove by Handle - */ - public void remove(Handle p1) throws $M.getExceptionList() { - - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - - #beforeThrowRemoteException() - - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - RequestCtx rctx = preInvoke(MethodDesc.TX_NOT_SET); - checkSecurity(ejbInv); - javax.ejb.EJBObject ejbobj = null; - try { - ejbobj = p1.getEJBObject(); - rctx.bmcalled = true; - ejbobj.remove(); - } catch (javax.ejb.AccessLocalException e) { - throw new RemoteException("Security Exception thrown by an enterprise Bean", e); - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new RemoteException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new RemoteException("Error thrown by an enterprise Bean", e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw e; - } finally { - postInvoke(rctx); - } - - #afterThrowRemoteException() - } - -#end - -#end - - public JSessionRemote createRemoteObject() throws RemoteException { - - #beforeThrowRemoteException() - - return new $remote_wrp((JStatelessFactory)bf); - - #afterThrowRemoteException() - - } -} -// End: $Id$ diff --git a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JStatelessLocal.vm b/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JStatelessLocal.vm deleted file mode 100644 index a0e085d3a7e2bd0c7d90d41f02a853f234374dfc..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JStatelessLocal.vm +++ /dev/null @@ -1,155 +0,0 @@ -## --------------------------------------------------------------------------- -## JOnAS: Java(TM) Open Application Server -## Copyright (C) 1999-2008 Bull S.A. -## Contact: jonas-team@objectweb.org -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -## USA -## -## Initial developer(s): Philippe Durieux. -## Contributor(s): - S. Ali Tokmen, Malek Chahine: EJB statistics -## -## --------------------------------------------------------------------------- -## $Id$ -## --------------------------------------------------------------------------- - -// This class is the bean specific part of JSessionLocal -// Generated by GenIC via Velocity. Do not edit directly this file. -// Start: $Id$ - -#if ($package.length() != 0) -package $package; -#end - -import java.lang.Error; -import java.lang.RuntimeException; -import java.util.Date; -import java.rmi.RemoteException; -import javax.ejb.EJBException; -import javax.ejb.RemoveException; -import org.ow2.jonas.lib.ejb21.JSessionContext; -import org.ow2.jonas.lib.ejb21.JSessionFactory; -import org.ow2.jonas.lib.ejb21.JSessionLocal; -import org.ow2.jonas.lib.ejb21.RequestCtx; -import org.ow2.jonas.lib.ejb21.TraceEjb; -import org.ow2.jonas.lib.ejb21.EJBInvocation; -import org.ow2.jonas.lib.ejb21.MonitoringEvent; -import org.objectweb.util.monolog.api.BasicLevel; - -public class $class extends JSessionLocal implements $local { - - /** - * Constructor - */ - public $class(JSessionFactory bf) { - super(bf); - } - -#foreach ($M in $methodList) - -#if ($M.isRemoveThis()) - - /** - * remove this bean instance - */ - public void remove() throws RemoveException { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - - RequestCtx rctx = preInvoke($M.getTxAttribute()); - checkSecurity(ejbInv); - - try { - rctx.ejbContext = bs.getICtx(rctx.currTx); - rctx.bmcalled = true; - rctx.ejbContext.setRemoved(); - } catch (EJBException e) { - rctx.sysExc = e; - throw e; - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new EJBException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new EJBException("Error thrown by an enterprise Bean"+e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw new EJBException("Remote Exception raised:", e); - } finally { - postInvoke(rctx); - } - } - -#else - - public $M.getReturnType() $M.getName()($M.getFormalParameters()) -#if ( $M.getExceptionList().length() > 0 ) - throws $M.getExceptionList() -#end - { - #timerVariablesDeclaration() - #getRequestStartTime() - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); -#if ($M.getReturnType() != "void") - $M.getReturnType() result; -#end - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - - RequestCtx rctx = preInvoke($M.getTxAttribute()); - try { - rctx.ejbContext = bs.getICtx(rctx.currTx); - $bean_wrp b = ($bean_wrp) rctx.ejbContext.getInstance(); - ejbInv.bean = b; - checkSecurity(ejbInv); - rctx.bmcalled = true; - #getBusinessStartTime() - -#if ($M.getReturnType() != "void") - result = -#end - b.$M.getName()($M.getActualParameters()); - } catch (EJBException e) { - rctx.sysExc = e; - throw e; - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new EJBException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new EJBException("Error thrown by an enterprise Bean: "+e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw new EJBException("Remote Exception raised", e); - } finally { - #getBusinessStopTime() - postInvoke(rctx); - #getRequestStopTime() - #updateEJBMonitoringData() - } -#if ($M.getReturnType() != "void") - return result; -#end - } - -#end - -#end - -} -// End: $Id$ diff --git a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JStatelessLocalHome.vm b/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JStatelessLocalHome.vm deleted file mode 100644 index 56a02be2a5f683e6fbcb76ba5dd217be178c7531..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JStatelessLocalHome.vm +++ /dev/null @@ -1,118 +0,0 @@ -## --------------------------------------------------------------------------- -## JOnAS: Java(TM) Open Application Server -## Copyright (C) 1999-2004 Bull S.A. -## Contact: jonas-team@objectweb.org -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -## USA -## -## Initial developer(s): Philippe Durieux, Helene Joanin. -## Contributor(s): ______________________________________. -## -## --------------------------------------------------------------------------- -## $Id$ -## --------------------------------------------------------------------------- - -// This class is the bean specific part of JSessionLocalHome for Stateless Sessions -// Generated by GenIC via Velocity. Do not edit directly this file. -// Start: $Id$ - -#if ($package.length() != 0) -package $package; -#end - -import java.lang.Error; -import java.rmi.RemoteException; -import javax.ejb.EJBException; -import javax.ejb.RemoveException; -import javax.ejb.SessionBean; -import org.ow2.jonas.lib.ejb21.RequestCtx; -import org.ow2.jonas.lib.ejb21.JFactory; -import org.ow2.jonas.lib.ejb21.JSessionContext; -import org.ow2.jonas.lib.ejb21.JSessionFactory; -import org.ow2.jonas.lib.ejb21.JSessionLocalHome; -import org.ow2.jonas.lib.ejb21.JSessionLocal; -import org.ow2.jonas.lib.ejb21.JSessionSwitch; -import org.ow2.jonas.lib.ejb21.JStatelessFactory; -import org.ow2.jonas.lib.ejb21.TraceEjb; -import org.ow2.jonas.deployment.ejb.MethodDesc; -import org.ow2.jonas.deployment.ejb.SessionDesc; -import org.ow2.jonas.lib.ejb21.EJBInvocation; - -import org.objectweb.util.monolog.api.BasicLevel; - -public class $class extends JSessionLocalHome implements $localhome { - - // JOnAS version used to deploy - public static final String JONAS_VERSION = "$jVersion"; - - /** - * Created by JSessionFactory (by newInstance) - */ - public $class(SessionDesc dd, JSessionFactory bf) { - super(dd, bf); - } - -#foreach ($M in $methodList) - -#if ($M.isCreate()) - - /** - * create method (unique for stateless session beans) - */ - public $M.getReturnType() create() -#if ( $M.getExceptionList().length() > 0 ) - throws $M.getExceptionList() -#end - { - //TraceEjb.interp.log(BasicLevel.DEBUG, ""); - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - RequestCtx rctx = preInvoke(MethodDesc.TX_NOT_SET); - checkSecurity(ejbInv); - JSessionSwitch bs = null; - try { - rctx.bmcalled = true; - bs = ((JSessionFactory) bf).createEJB(); - } catch (javax.ejb.AccessLocalException e) { - throw new EJBException("Security Exception thrown by an enterprise Bean", e); - } catch (EJBException e) { - rctx.sysExc = e; - throw e; - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new EJBException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new EJBException("Error thrown by an enterprise Bean"+e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw new EJBException("Remote Exception raised:", e); - } finally { - postInvoke(rctx); - } - return ($local) bs.getLocal(); - } - -#end - -#end - - public JSessionLocal createLocalObject() { - return new $local_wrp((JStatelessFactory)bf); - } -} -// End: $Id$ diff --git a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JStatelessRemote.vm b/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JStatelessRemote.vm deleted file mode 100644 index 591b48638a75d291610959f59db73602b32cce20..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/JStatelessRemote.vm +++ /dev/null @@ -1,220 +0,0 @@ -## --------------------------------------------------------------------------- -## JOnAS: Java(TM) Open Application Server -## Copyright (C) 1999-2008 Bull S.A. -## Contact: jonas-team@objectweb.org -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -## USA -## -## Initial developer(s): Philippe Durieux. -## Contributor(s): - S. Ali Tokmen, Malek Chahine: EJB statistics -## --------------------------------------------------------------------------- -## $Id$ -## --------------------------------------------------------------------------- - -// This class is the bean specific part of JSessionRemote -// Generated by GenIC via Velocity. Do not edit directly this file. -// Start: $Id$ - -#if ($package.length() != 0) -package $package; -#end - -import java.lang.Error; -import java.lang.RuntimeException; -import java.rmi.AccessException; -import java.rmi.RemoteException; -import javax.ejb.RemoveException; -import java.util.Date; - -import org.ow2.jonas.lib.ejb21.JSessionContext; -import org.ow2.jonas.lib.ejb21.JSessionFactory; -import org.ow2.jonas.lib.ejb21.JSessionRemote; -import org.ow2.jonas.lib.ejb21.ha.JRepStatelessRemote; -import org.ow2.jonas.lib.ejb21.RequestCtx; -import org.ow2.jonas.lib.ejb21.TraceEjb; -import org.ow2.jonas.lib.ejb21.EJBInvocation; -import org.ow2.jonas.lib.ejb21.MonitoringEvent; - -import org.ow2.carol.rmi.exception.RmiUtility; -import org.objectweb.util.monolog.api.BasicLevel; - -#if ($isClusterReplicated) -public class $class extends JRepStatelessRemote implements $remote { -#else -public class $class extends JSessionRemote implements $remote { -#end - - /** - * Constructor - */ - public $class(JSessionFactory bf) throws RemoteException { - super(bf); - } - -#foreach ($M in $methodList) - -#if ($M.isRemoveThis()) - - /** - * remove this bean instance - */ - public void remove() throws RemoteException, RemoveException { - //TraceEjb.interp.log(BasicLevel.DEBUG,""); - - #beforeThrowRemoteException() - - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - - RequestCtx rctx = preInvoke($M.getTxAttribute()); - checkSecurity(ejbInv); - - try { - rctx.ejbContext = bs.getICtx(rctx.currTx); - rctx.bmcalled = true; - rctx.ejbContext.setRemoved(); - } catch (javax.ejb.AccessLocalException e) { - throw new AccessException("Security Exception thrown by an enterprise Bean", e); - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new RemoteException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new RemoteException("Error thrown by an enterprise Bean", e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw e; - } finally { -#if ($isClusterReplicated) -/* ******************REPLICATION CODE STARTS HERE*********************** */ - // There is no response to the client (void parameter needed by HA) - postInvoke(rctx, null); -/* **********************END OF REPLICATION CODE************************ */ -#else - postInvoke(rctx); -#end - } - - #afterThrowRemoteException() - - } - -#else - - public $M.getReturnType() $M.getName()($M.getFormalParameters()) throws $M.getExceptionList() { - //TraceEjb.interp.log(BasicLevel.DEBUG,""); - - #timerVariablesDeclaration() - #getRequestStartTime() - #beforeThrowRemoteException() - -#if ($M.getReturnType() != "void") - $M.getReturnType() result = $M.getDefaultValue(); -#end - -#if ($isClusterReplicated) -/* ******************REPLICATION CODE STARTS HERE*********************** */ - if (hasResponse()) { - cmilogger.log(BasicLevel.DEBUG, "Response found"); - // Obtain the response associated with the request - // and delete the request because the method is going to return - Object response = getResponse(); - #if ($M.getReturnType() == "void") - cmilogger.log(BasicLevel.DEBUG, "\tResponse void"); - return; - #else - cmilogger.log(BasicLevel.DEBUG, "\tResponse not void"); - #if ($M.getWrapperType() != "") - return ($M.getReturnType()) (($M.getWrapperType())response).$M.getReturnType()Value(); - #else - return ($M.getReturnType()) response; - #end - #end - } else { - cmilogger.log(BasicLevel.DEBUG, "Response not found"); - } -/* **********************END OF REPLICATION CODE************************ */ -#end - - EJBInvocation ejbInv = new EJBInvocation(); - ejbInv.methodPermissionSignature = "$M.getSecuritySignature()"; - ejbInv.arguments = $M.getArrayObjectParameters(); - - RequestCtx rctx = preInvoke($M.getTxAttribute()); - - try { - rctx.ejbContext = bs.getICtx(rctx.currTx); - $bean_wrp b = ($bean_wrp) rctx.ejbContext.getInstance(); - ejbInv.bean = b; - checkSecurity(ejbInv); - rctx.bmcalled = true; - #getBusinessStartTime() - -#if ($M.getReturnType() != "void") - result = -#end - - b.$M.getName()($M.getActualParameters()); - - } catch (javax.ejb.AccessLocalException e) { - throw new AccessException("Security Exception thrown by an enterprise Bean", e); - } catch (RuntimeException e) { - rctx.sysExc = e; - throw new RemoteException("RuntimeException thrown by an enterprise Bean", e); - } catch (Error e) { - rctx.sysExc = e; - throw new RemoteException("Error thrown by an enterprise Bean", e); - } catch (RemoteException e) { - rctx.sysExc = e; - throw e; - } finally { - #getBusinessStopTime() -#if ($isClusterReplicated) -/* ******************REPLICATION CODE STARTS HERE*********************** */ - // If exists, pass the return type to postInvoke (Needed by HA) - #if ($M.getReturnType() != "void") - #if ($M.getWrapperType() != "") - postInvoke(rctx, new $M.getWrapperType()(result)); - #else - postInvoke(rctx, result); - #end - #else - postInvoke(rctx, null); - #end -/* **********************END OF REPLICATION CODE************************ */ -#else - postInvoke(rctx); -#end - #getRequestStopTime() - #updateEJBMonitoringData() - } - -#if ($M.getReturnType() != "void") - return result; -#end - -#afterThrowRemoteException() - - } - -#end - -#end - -} - -// End: $Id$ diff --git a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/README b/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/README deleted file mode 100644 index e5cb6ec67385bde2a0c34e77b64ac61b1a635cc3..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-genic/src/main/resources/org/ow2/jonas/generators/genic/README +++ /dev/null @@ -1,94 +0,0 @@ - -+-------------------------------------------------------+ -| List of args used for Velocity: (for 1 bean) | -+-------------------------------------------------------+ - - -Common for all generated files: -------------------------------------------------------------------------------- -dd Deployment Descriptor -home Home Interface (full name) -localhome LocalHome Interface (full name) -remote Remote Interface (full name) -local Local Interface (full name) -home_wrp Wrapper Home (full name) used ? -localhome_wrp Wrapper localhome (full name) used ? -remote_wrp Wrapper remote (full name) -local_wrp Wrapper local (full name) -bean Bean class (full name of bean provider class) -bean_wrp Bean derived class (CMP) or Bean class (others) -handle Handle generated class -pk class of PK (entity only) - -fieldList Container managed persistence bean's fields -fieldPkList CMP bean's fields which make up the primary key -fieldNoPkList CMP bean's fields which don't make up the primary key - -Specific to each generated file: -------------------------------------------------------------------------------- -package package of generated file (same as inherited class) -class class of generated file -methodList List of Method's for this generated class, - including remove methods. - -Class Field: List of function calls: --------------------------------------------------------------------------------- -getName() -getTypeName() -getDefaultValue() -getSqlTypeName() -getSqlGetMethod() -getSqlSetMethod() -hasNotPrimitiveType() -hasBigIntegerType() -hasSerializableType() -hasJavaLangTypeExceptString() - - -Class Method: List of function calls: --------------------------------------------------------------------------------- -isFinderByPk() true if findByPrimaryKey method -isFinderSimple() true if finder method returning 1 value and if it's not findByPrimaryKey -isFinderEnum() true if finder method returning Enumeration -isFinderCol() true if finder method returning Collection -isCreate() true if create method -isCreate() true if ejbCreate bean method -isRemovePk() true if remove by PK -isRemoveHandle() true if remove by Handle -isRemoveThis() true if remove bean method -isEjbRemove() true if ejbRemove bean method -isEjbLoad() true if ejbLoad bean method -isEjbStore() true if ejbStore bean method -isEjbSetEntityContext() true if ejbSetEntityContext bean method - -getName() -getCapName() -getFormalParameters() -getActualParameters() -getExceptionList() -getSecuritySignature() -getTxAttribute() -getReturnType() -getSqlStmt() SQL statement (available for Entity CMP) -getParamWhereList() parameters list for the WHERE clause - (available for Entity CMP for finder methods) - - -Class ParamWhere: List of function calls: --------------------------------------------------------------------------------- -getName() -getTypeName() -getDefaultValue() -getSqlTypeName() -getSqlSetMethod() -hasNotPrimitiveType() -hasBigIntegerType() -hasSerializableType() -hasJavaLangTypeExceptString() - - --------------------------------------------------------------------------------- -A VOIR : --------------------------------------------------------------------------------- -1 seul template pour local/remote ? -1 seul template pour session/entity ? diff --git a/jonas/modules/generators/jonas-wsgen/pom.xml b/jonas/modules/generators/jonas-wsgen/pom.xml deleted file mode 100644 index 6d9414cbb14e9edeced5ae1aa2009b44e0f674a0..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/pom.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - - org.ow2.jonas - jonas-generators - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - - jonas-generators-wsgen - bundle - JOnAS :: Generators :: WSGen - - - - org.ow2.jonas - jonas-commons - ${project.version} - - - org.ow2.jonas - jonas-deployment - ${project.version} - - - org.ow2.jonas - jonas-generators-base - ${project.version} - - - org.ow2.jonas.osgi - xmlbeans - ${project.version} - - - org.ow2.jonas - jonas-version - ${project.version} - - - org.apache.axis - axis - - - org.apache.ws.ews - ews-mapper - 1.1 - - - - velocity - velocity-dep - 1.4 - - - commons-discovery - commons-discovery - - - org.ow2.spec.ee - ow2-ejb-3.0-spec - provided - - - org.ow2.bundles - ow2-util-ee-deploy-impl - - - org.ow2.jonas - eclipse-compiler - ${project.version} - - - diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/WsGen.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/WsGen.java deleted file mode 100644 index edecd72f99a9e8b33be47ff3249191171f6b8ff8..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/WsGen.java +++ /dev/null @@ -1,290 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen; - -import java.io.File; -import java.util.StringTokenizer; - -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; -import org.ow2.jonas.generators.genbase.NoJ2EEWebservicesException; -import org.ow2.jonas.generators.genbase.archive.Archive; -import org.ow2.jonas.generators.genbase.generator.Config; -import org.ow2.jonas.generators.genbase.generator.GeneratorFactories; -import org.ow2.jonas.generators.genbase.modifier.ArchiveModifier; -import org.ow2.jonas.generators.genbase.utils.TempRepository; -import org.ow2.jonas.generators.wsgen.finder.GeneralWSFinder; -import org.ow2.jonas.generators.wsgen.finder.J2EEWebServicesFinder; -import org.ow2.jonas.generators.wsgen.generator.GeneratorFactory; -import org.ow2.jonas.generators.wsgen.modifier.ModifierFactory; -import org.ow2.jonas.lib.util.Log; -import org.ow2.util.ee.deploy.api.deployable.IDeployable; - -/** - * Main WsGen Class. - * @author Guillaume Sauthier - */ -public class WsGen { - - /** - * Logger. - */ - private static Logger logger = Log.getLogger(Log.JONAS_WSGEN_PREFIX); - - /** - * Set to false if input file cannot be processed by WsGen (DTDs). - */ - private boolean inputModified = true; - - /** - * Private Constructor for Utility class WsGen. - */ - public WsGen() { } - - /** - * Main method. - * @param args Commend line args - * @throws Exception When the execute method fails - */ - public static void main(final String[] args) throws Exception { - WsGen wsgen = new WsGen(); - wsgen.execute(args); - } - - /** - * Method used by the main method and by external class to retrieve the name of - * the modified or created file by WsGen. - * @param args command line arguments - * @throws Exception When a failure occurs - * @return the modified file name or the input file name if nothing has been changed - */ - public String execute(final String[] args) throws Exception { - // store configuration properties - Config config = parseInput(args); - - if (config.isHelp() || config.isError() || config.getInputname() == null) { - // display usage message - usage(); - return null; - } - - return execute(config, null); - } - - /** - * Method used by the main method and by external class to retrieve the name of - * the modified or created file by WsGen. - * @param config the given config - * @param deployable the current deployable - * @return the modified file name or the input file name if nothing has been changed - * @throws Exception When a failure occurs - */ - public String execute(final Config config, final IDeployable deployable) throws Exception { - GeneratorFactory gf = GeneratorFactory.getInstance(); - - // Make sure that DTD is turned to off - config.setDTDsAllowed(false); - - // setup configuration - gf.setConfiguration(config); - GeneratorFactories.setCurrentFactory(gf); - Archive modifiedArchive = null; - ArchiveModifier am = null; - // get the ArchiveModifier - try { - am = ModifierFactory.getModifier(config.getInputname(), false, deployable); - - J2EEWebServicesFinder finder = new GeneralWSFinder(am.getArchive()); - - // Do not touch the archive unless necessary ! - if (finder.find()) { - - logger.log(BasicLevel.INFO, "WebServices generation for '" + config.getInputname() + "'"); - - am.getArchive().initialize(); - - // modify the given archive - modifiedArchive = am.modify(); - - return modifiedArchive.getRootFile().getCanonicalPath(); - } - - } catch (NoJ2EEWebservicesException e) { - logger.log(BasicLevel.DEBUG, config.getInputname() + " is using DTDs, WsGen needs Schema only : " - + e.getMessage()); - inputModified = false; - return config.getInputname(); - } finally { - // close archive - if (am != null && am.getArchive() != null) { - am.getArchive().close(); - } - - modifiedArchive = null; - am = null; - - // delete all the temporary files created - TempRepository.getInstance().deleteAll(); - - System.gc(); - } - // no changes needed ... - inputModified = false; - return config.getInputname(); - - } - - /** - * Parse Command Line input and returns a Config object. - * @param args Command Lines params - * @return a Config object - */ - private static Config parseInput(final String[] args) { - Config config = new Config(); - - // Get args - for (int argn = 0; argn < args.length; argn++) { - String arg = args[argn]; - - if (arg.equals("-help") || arg.equals("-?")) { - config.setHelp(true); - - continue; - } - - if (arg.equals("-verbose")) { - config.setVerbose(true); - - continue; - } - - if (arg.equals("-debug")) { - config.setDebug(true); - config.setVerbose(true); - - continue; - } - - if (arg.equals("-keepgenerated")) { - config.setKeepGenerated(true); - - continue; - } - - if (arg.equals("-noconfig")) { - config.setNoConfig(true); - - continue; - } - - if (arg.equals("-novalidation")) { - config.setParseWithValidation(false); - - continue; - } - - if (arg.equals("-javac")) { - config.setNameJavac(args[++argn]); - - continue; - } - - if (arg.equals("-javacopts")) { - argn++; - - if (argn < args.length) { - StringTokenizer st = new StringTokenizer(args[argn]); - - while (st.hasMoreTokens()) { - config.getJavacOpts().add(st.nextToken()); - } - } else { - config.setError(true); - } - - continue; - } - - if (arg.equals("-d")) { - argn++; - - if (argn < args.length) { - config.setOut(new File(args[argn])); - } else { - config.setError(true); - } - - continue; - } - - if (arg.equals("-unpacked")) { - config.setSaveUnpacked(); - - continue; - } - - if (args[argn] != null) { - config.setInputname(args[argn]); - } else { - config.setError(true); - } - } - - return config; - - } - - /** - * Display the usage. - */ - public static void usage() { - StringBuffer msg = new StringBuffer(); - msg.append("Usage: java org.ow2.jonas.generators.wsgen.WsGen -help \n"); - msg.append(" to print this help message \n"); - msg.append(" or java org.ow2.jonas.generators.wsgen.WsGen \n"); - msg.append("Options include: \n"); - msg.append(" -d specify where to place the generated files \n"); - msg.append(" -novalidation parse the XML deployment descriptors without \n"); - msg.append(" validation \n"); - msg.append(" -javac specify the java compiler to use \n"); - msg.append(" -javacopts specify the options to pass to the java compiler \n"); - msg.append(" -keepgenerated do not delete intermediate generated files \n"); - msg.append(" -noconfig do not generate configuration files (require \n"); - msg.append(" user provided files) \n"); - msg.append(" -verbose \n"); - msg.append(" -debug \n"); - msg.append(" \n"); - msg.append(" Input_File the ejb-jar, war or ear filename\n"); - System.out.println(msg.toString()); - } - - /** - * @return Returns the inputModified. - */ - public boolean isInputModified() { - return inputModified; - } -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/WsGenException.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/WsGenException.java deleted file mode 100644 index 5722c85fd19a81ab78edd4d8e855ae6cee11800d..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/WsGenException.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Guillaume Sauthier - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen; - -import org.ow2.jonas.generators.genbase.GenBaseException; - -/** - * This class represents the exception that can be throwned by the WsGen tool. - */ -public class WsGenException extends GenBaseException { - - /** - * Constructs a WsGenException with no specified detail message. - */ - public WsGenException() { - super(); - } - - /** - * Constructs an WsGenException with the specified detail message. - * @param msg Error message - */ - public WsGenException(String msg) { - super(msg); - } - - /** - * Constructs an WsGenException with the specified detail message. - * @param inner Cause Exception to wrap - */ - public WsGenException(Exception inner) { - super(inner); - } - - /** - * Constructs an WsGenException with the specified detail message. - * @param msg Error message - * @param inner Cause Exception to wrap - */ - public WsGenException(String msg, Exception inner) { - super(msg, inner); - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/ddmodifier/ContextDDModifier.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/ddmodifier/ContextDDModifier.java deleted file mode 100644 index cc59546dfe5c6fe85b3f68e9aeba226ea820c2a1..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/ddmodifier/ContextDDModifier.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial Developer : Matt Wringe - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.ddmodifier; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -/** - * Modify a the context.xml file. Wrapper around a web.xml DOM - * - * @author Matt Wringe - */ -public class ContextDDModifier extends DeploymentDescModifier { - - - /** - * The class used by Tomcat to setup the realm - */ - private static final String REALM_CLASS_NAME = "org.ow2.jonas.web.tomcat6.security.Realm"; - - - /** - * Create a new ContextDDModifier - * - * @param doc the context.xml Document - */ - public ContextDDModifier(Document doc) { - super(doc.getDocumentElement(), doc); - } - - /** - * Setups the realm for Tomcat to use - * - * @param realm the realm to use - */ - public void addContextRealm(String realm) { - Element contextElement = getElement(); - - contextElement.appendChild (setRealm(realm)); - } - - /** - * Returns an element that defines the realm to use - * - * @param realm the realm to use - * @return an element the defines the realm to use - */ - private Element setRealm (String realm) { - Element realmElement = newElement("Realm"); - realmElement.setAttribute("className", REALM_CLASS_NAME); - realmElement.setAttribute("resourceName", realm); - - return realmElement; - } - -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/ddmodifier/DeploymentDescModifier.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/ddmodifier/DeploymentDescModifier.java deleted file mode 100644 index 340a6d4fb6d90e3163e5f0b50f52241826329edb..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/ddmodifier/DeploymentDescModifier.java +++ /dev/null @@ -1,213 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial Developer : Guillaume Sauthier - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.ddmodifier; - -import org.ow2.jonas.lib.util.Log; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; - - -import org.objectweb.util.monolog.api.Logger; - -/** - * Modify an Element from a Deployment Descriptor. Contains XML commons - * utilities. - * - * @author Guillaume Sauthier - */ -public class DeploymentDescModifier { - - /** J2EE Default XML namespace */ - protected static final String J2EE_NS = "http://java.sun.com/xml/ns/j2ee"; - - /** JOnAS Default XML namespace */ - protected static final String JONAS_NS = "http://www.objectweb.org/jonas/ns"; - - /** logger */ - private static Logger logger = Log.getLogger(Log.JONAS_WSGEN_PREFIX); - - /** base element */ - private Element element; - - /** parent element */ - private Element parent; - - /** base document */ - private Document doc; - - /** - * Create a new DeploymentDescModifier to update the given Element. - * - * @param element XML element to be modified. - * @param doc base document for Element creation. - */ - public DeploymentDescModifier(Element element, Document doc) { - this(element, doc, null); - } - - /** - * Create a new DeploymentDescModifier to update the given Element. - * - * @param element XML element to be modified. - * @param doc base document for Element creation. - * @param parent parent Element, used if element is null - */ - public DeploymentDescModifier(Element element, Document doc, Element parent) { - this.element = element; - this.doc = doc; - this.parent = parent; - } - - /** - * Create a new Element with given name in J2EE XML namespace. - * - * @param name Element name - * - * @return the created Element - */ - protected Element newJ2EEElement(String name) { - return doc.createElementNS(J2EE_NS, name); - } - - /** - * Create a new Element with given name in J2EE XML namespace with an inner - * Text Node. - * - * @param name Element name - * @param text Element content - * - * @return the created Element - */ - protected Element newJ2EEElement(String name, String text) { - Element e = doc.createElementNS(J2EE_NS, name); - Text txt = doc.createTextNode(text); - e.appendChild(txt); - - return e; - } - - /** - * Create a new Element with given name in JOnAS XML namespace. - * - * @param name Element name - * - * @return the created Element - */ - protected Element newJOnASElement(String name) { - return doc.createElementNS(JONAS_NS, name); - } - - /** - * Create a new Element with given name in JOnAS XML namespace, with an - * inner Text Node. - * - * @param name Element name - * @param text node's text - * - * @return the created Element - */ - protected Element newJOnASElement(String name, String text) { - Element e = doc.createElementNS(JONAS_NS, name); - Text txt = doc.createTextNode(text); - e.appendChild(txt); - - return e; - } - - - /** - * Create a new Element with given name - * - * @param name Element name - * @return the created Element - */ - protected Element newElement (String name) { - return doc.createElement(name); - } - - /** - * Create a new Element with an inner Text Node. - * - * @param name Element name - * @param text node's text - * - * @return the created Element - */ - protected Element newElement (String name, String text) { - Element e = doc.createElement(name); - Text txt = doc.createTextNode(text); - e.appendChild(txt); - - return e; - } - - /** - * @return Returns the logger. - */ - public static Logger getLogger() { - return logger; - } - - /** - * @return Returns the parent (can be null). - */ - public Element getParent() { - return parent; - } - - /** - * @return Returns the element. - */ - public Element getElement() { - return element; - } - - /** - * @return Returns the document. - */ - public Document getDocument() { - return doc; - } - - /** - * Set the new document to use - * @param doc the new document to use - */ - public void setDocument(Document doc) { - this.doc = doc; - this.parent = doc.getDocumentElement(); - } - - /** - * Set the new base Element to use - * @param e the new base Element to use - */ - public void setElement(Element e) { - element = e; - getParent().appendChild(e); - } - -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/ddmodifier/WebJettyDDModifier.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/ddmodifier/WebJettyDDModifier.java deleted file mode 100644 index 6dd1dfeb1b50e849a93def45336889fdabc56d4e..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/ddmodifier/WebJettyDDModifier.java +++ /dev/null @@ -1,123 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial Developer: Matt Wringe - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.ddmodifier; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -/** - * Modify the web-jetty.xml file. Wrapper around a web.xml DOM - * - * @author Matt Wringe - */ -public class WebJettyDDModifier extends DeploymentDescModifier { - - /** the name of the class that sets the realm for Jetty */ - private static final String REALM_CLASS = "org.ow2.jonas.web.jetty6.security.Realm"; - - /** the name of the class that sets the context for Jetty */ - private static final String CONTEXT_CLASS = "org.mortbay.jetty.webapp.WebAppContext"; - - /** Default Realm name is no name is specified */ - private static final String DEFAULT_REALM_NAME = "Endpoint Authentication Area"; - - /** - * Create a new WebJettyDDModifier - * - * @param doc the context.xml Document - */ - public WebJettyDDModifier(Document doc) { - super(doc.getDocumentElement(), doc); - } - - /** - * Sets up the realm for Jetty to use - * - * @param realm the realm to use - */ - public void configRealm (String realm) { - configRealm (DEFAULT_REALM_NAME, realm); - } - - /** - * Sets up the realm for Jetty to use - * - * @param realmName the realm name for the realm - * @param realm the realm to use - */ - public void configRealm(String realmName, String realm) { - Element configureElement = getElement(); - configureElement.appendChild(setRealmName(realmName)); - configureElement.appendChild(setRealm(realm, realmName)); - } - - - /** - * Returns an element that defines the realm name to use - * - * @param realmName the name of the realm - * @return an element that defines the realm name - */ - private Element setRealmName (String realmName) { - Element callElement = newElement("Call"); - callElement.setAttribute("name", "setRealmName"); - - Element argElement = newElement("Arg", realmName); - callElement.appendChild(argElement); - - return callElement; - } - - /** - * Returns an element that defines which realm to use - * - * @param realm the realm - * @param realmName the name of the realm - * @return an element that defines which realm to use - */ - private Element setRealm (String realm, String realmName) { - Element callElement = newElement ("Call"); - callElement.setAttribute("name", "setRealm"); - - Element argElement = newElement ("Arg"); - - Element newElement = newElement ("New"); - newElement.setAttribute("class", REALM_CLASS); - - Element argRealmName = newElement ("Arg", realmName); - Element argRealm = newElement ("Arg", realm); - - newElement.appendChild(argRealmName); - newElement.appendChild(argRealm); - - argElement.appendChild(newElement); - callElement.appendChild(argElement); - - return callElement; - } -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/ddmodifier/WebServicesDDModifier.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/ddmodifier/WebServicesDDModifier.java deleted file mode 100644 index 58f3c43d7d3a5446a124db141e71c5edc2e76a41..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/ddmodifier/WebServicesDDModifier.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial Developer : Guillaume Sauthier - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.ddmodifier; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - -/** - * @author Guillaume Sauthier - */ -public class WebServicesDDModifier extends DeploymentDescModifier { - - /** - * @param doc webservices.xml Document - */ - public WebServicesDDModifier(Document doc) { - super(doc.getDocumentElement(), doc); - } - - /** - * Update the servlet-link element in webservices.xml to the Generated servlet element. - * - * @param wsdName WebService Description name - * @param link old servlet-link value - * @param replace new servlet-link value - */ - public void changeServletLink(String wsdName, String link, String replace) { - - Element wsd = findWebserviceDesc(wsdName); - - // if element found - if (wsd != null) { - NodeList nl = wsd.getElementsByTagNameNS(J2EE_NS, "port-component"); - - for (int i = 0; i < nl.getLength(); i++) { - Element e = (Element) nl.item(i); - NodeList sib = e.getElementsByTagNameNS(J2EE_NS, "service-impl-bean"); - - Node servletLink = ((Element) sib.item(0)).getElementsByTagNameNS(J2EE_NS, "servlet-link").item(0); - - // test - // port-component/sib-link/servlet-link/#text-node.value - if (servletLink.getFirstChild().getNodeValue().equals(link)) { - servletLink.getFirstChild().setNodeValue(replace); - } - } - } - } - - /** - * Search element for webservices-description named with the given name. - * - * @param name the searched webservices-description name - * - * @return the found element or null if element is not found (should'nt - * occurs). - */ - private Element findWebserviceDesc(String name) { - NodeList nl = getElement().getElementsByTagNameNS(J2EE_NS, "webservice-description"); - Element wsd = null; - - for (int i = 0; (i < nl.getLength()) && (wsd == null); i++) { - Element e = (Element) nl.item(i); - - NodeList names = e.getElementsByTagNameNS(J2EE_NS, "webservice-description-name"); - - // test - // webservices-description/webservices-description--name/#text-node.value - if (names.item(0).getFirstChild().getNodeValue().equals(name)) { - wsd = e; - } - } - - return wsd; - } - -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/ddmodifier/WsClientDDModifier.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/ddmodifier/WsClientDDModifier.java deleted file mode 100644 index 26f8f6fed845b99d071e20f85c7df17977f4100a..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/ddmodifier/WsClientDDModifier.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial Developer : Guillaume Sauthier - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.ddmodifier; - -import org.ow2.jonas.generators.genbase.utils.XMLUtils; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - - - -/** - * Modify a Web Services Client Deployment Desc Element. Wrapper around a - * jonas-service-ref element - * @author Guillaume Sauthier - */ -public class WsClientDDModifier extends DeploymentDescModifier { - - /** - * jonas-init-param Element name - */ - private static final String JONAS_INIT_PARAM = "jonas-init-param"; - - /** - * param-name Element name - */ - private static final String PARAM_NAME = "param-name"; - - /** - * param-value Element name - */ - private static final String PARAM_VALUE = "param-value"; - - /** - * Creates a new WsClientDDModifier where element is a - * jonas-service-ref XML Node. - * @param name service-ref-name value - * @param doc document base for Element creation - * @param base base element for searching jonas-service-ref - */ - public WsClientDDModifier(String name, Document doc, Element base) { - super(XMLUtils.getJonasServiceRef(base, name), doc, base); - } - - /** - * Add a jonas-init-param in jonas-service-ref. - * @param name param name - * @param value param value - */ - public void addJonasInitParam(String name, String value) { - Element jip = newJOnASElement(JONAS_INIT_PARAM); - Element pn = newJOnASElement(PARAM_NAME, name); - Element pv = newJOnASElement(PARAM_VALUE, value); - - jip.appendChild(pn); - jip.appendChild(pv); - - getElement().appendChild(jip); - } - - /** - * @return Returns true if this web service client has a JOnAS specific - * descriptor (jonas-service-ref). - */ - public boolean hasJonasServiceRef() { - return (getElement() != null); - } - - /** - * @param serviceRefName the value of service-ref-name Element - * @return Returns a default jonas-service-ref Element (initialized with the given service-ref-name). - */ - public Element createJonasServiceRef(String serviceRefName) { - Element jsr = newJOnASElement("jonas-service-ref"); - Element srn = newJOnASElement("service-ref-name", serviceRefName); - - jsr.appendChild(srn); - return jsr; - } - -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/ddmodifier/WsEndpointDDModifier.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/ddmodifier/WsEndpointDDModifier.java deleted file mode 100644 index 1a83db2695b3db2b3ae7e2ab0b597d233722e7f8..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/ddmodifier/WsEndpointDDModifier.java +++ /dev/null @@ -1,572 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial Developer : Guillaume Sauthier - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.ddmodifier; - -import org.objectweb.util.monolog.api.BasicLevel; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.w3c.dom.Text; - -/** - * Modify a Deployment Desc for Endpoint. Wrapper around a web.xml DOM. - * - * @author Guillaume Sauthier - */ -public class WsEndpointDDModifier extends DeploymentDescModifier { - - /** - * servlet Element name - */ - private static final String SERVLET = "servlet"; - - /** - * servlet-name Element name - */ - private static final String SERVLET_NAME = "servlet-name"; - - /** - * servlet-class Element name - */ - private static final String SERVLET_CLASS = "servlet-class"; - - /** - * servlet-mapping Element name - */ - private static final String SERVLET_MAPPING = "servlet-mapping"; - - /** - * url-pattern Element name - */ - private static final String URL_MAPPING = "url-pattern"; - - /** - * init-param Element name - */ - private static final String INIT_PARAM = "init-param"; - - /** - * param-name Element name - */ - private static final String PARAM_NAME = "param-name"; - - /** - * param-value Element name - */ - private static final String PARAM_VALUE = "param-value"; - - /** - * security-role-ref Element name - */ - private static final String SECURITY_ROLE_REF = "security-role-ref"; - - /** - * url-pattern Element name - */ - private static final String URL_PATTERN = "url-pattern"; - - /** - * security-constraint Element name - */ - private static final String SECURITY_CONSTRAINT = "security-constraint"; - - /** - * login-config Element name - */ - private static final String LOGIN_CONFIG = "login-config"; - - /** - * security-role Element name - */ - private static final String SECURITY_ROLE = "security-role"; - - /** - * role-name Element name. - */ - private static final String ROLE_NAME = "role-name"; - - /** - * Used to retrieve any Element childrens. - */ - private static final String ANY_TAG_NAME = "*"; - - /** - * Creates a new WsEndpointDDModifier object. - * @param web web.xml document - */ - public WsEndpointDDModifier(Document web) { - super(web.getDocumentElement(), web); - } - - /** - * Add a new servlet element in the web.xml. - * @param name servlet name. - * @param classname servlet fully qualified classname. - */ - public void addServlet(String name, String classname) { - Element servlet = newJ2EEElement(SERVLET); - Element servletName = newJ2EEElement(SERVLET_NAME, name); - Element servletClass = newJ2EEElement(SERVLET_CLASS, classname); - - servlet.appendChild(servletName); - servlet.appendChild(servletClass); - - // add servlet in the webapp Element - getElement().appendChild(servlet); - - } - - /** - * Add a new security-constraint element into the web.xml - * - * @param securityConstraint A node containing the security-constraint setting - */ - public void addEndpointSecurityConstraint(Node securityConstraint) { - Element sConstraintElement = newJ2EEElement(SECURITY_CONSTRAINT); - - // securityConstraint comes from another document, therefore have to - // import first - Node newSecurityConstraint = getDocument().importNode(securityConstraint, true); - - while (newSecurityConstraint.hasChildNodes()) { - sConstraintElement.appendChild(newSecurityConstraint.getFirstChild()); - } - - // add security-constraint to webapp - getElement().appendChild(sConstraintElement); - } - - /** - * Add a new login-config element into the web.xml - * - * @param loginConfig An element constaining the login-config setting - */ - public void addEndpointLoginConfig(Element loginConfig) { - - // A MUST only have 1 element - // If the same login-config is already there, that's fine. - // But if there is *another* login-config, we must throw an Exception - - // Try to get a reference on a login-config element - NodeList configs = getElement().getElementsByTagNameNS(J2EE_NS, LOGIN_CONFIG); - if (configs.getLength() == 0) { - // no login-config, we can insert our own ... - Element myLoginConfig = newJ2EEElement(LOGIN_CONFIG); - - // loginConfig comes from another document, therefore have to import - // first - Node importedLoginConfig = getDocument().importNode(loginConfig, true); - - while (importedLoginConfig.hasChildNodes()) { - myLoginConfig.appendChild(importedLoginConfig.getFirstChild()); - } - - // add login-config to webapp - getElement().appendChild(myLoginConfig); - } else { - // Ooops, found another login-config - // Check if the login-config is the same than our own... - - // There can be only 1 login-config per web-app - Element config = (Element) configs.item(0); - - // If nodes are not the same - if (!areChildNodesIdentical(config, loginConfig)) { - String msg = "Cannot insert the new login-config element (login-config cannot " - + "be defined twice, even with different values !) : " + loginConfig; - throw new IllegalStateException(msg); - } - // OK, That's fine, we can let it 'as is' - - } - } - - /** - * @param first first Node to compare childs. - * @param second second nodes to compare childs. - * @return Returns true if nodes childs are identical. - */ - private static boolean areChildNodesIdentical(final Element first, final Element second) { - - // Check childrens - boolean identical = true; - // by using getElementsByTagName, we avoid to check meaningless Text nodes - NodeList firstChilds = first.getElementsByTagName(ANY_TAG_NAME); - NodeList secondChilds = second.getElementsByTagName(ANY_TAG_NAME); - - if (firstChilds.getLength() != secondChilds.getLength()) { - // one of the 2 nodes have more childrens, so they are not - // identical. - - return false; - } else if (firstChilds.getLength() == 0) { - // no child *Element* - // get the elements inner value - String one = first.getFirstChild().getNodeValue(); - String two = second.getFirstChild().getNodeValue(); - - // End recursion - return one.equals(two); - - } else { - // There is some children Elements - // same number of childrens - - boolean childrensIdentical = true; - for (int index = 0; index < firstChilds.getLength() - && childrensIdentical; index++) { - // Compare childrens 1-to-1 - Element firstChild = (Element) firstChilds.item(index); - Element secondChild = (Element) secondChilds.item(index); - childrensIdentical = areElementIdentical(firstChild, secondChild); - } - identical &= childrensIdentical; - } - return identical; - } - - /** - * @param first first element to compare. - * @param second second element to compare. - * @return Returns true if both elements are identical. - */ - private static boolean areElementIdentical(final Element first, final Element second) { - - // Check namespace URI - if (!first.getNamespaceURI().equals(second.getNamespaceURI())) { - return false; - } - - // Check localname - if (!first.getLocalName().equals(second.getLocalName())) { - return false; - } - - return areChildNodesIdentical(first, second); - } - - /** - * Add a new security-role element into the web.xml - * @param securityRole A node containing the login-config setting - */ - public void addSecurityRole(Node securityRole) { - - // Maybe the security-role element was already added. - // Look in the Document to find an pre-existing security-role element - // with the same name. - - Element foundSecurityRole = findSecurityRole((Element) securityRole); - if (foundSecurityRole == null) { - // no security-rople element, or none is matching - // we can add our own ... - - Element mySecurityRole = newJ2EEElement(SECURITY_ROLE); - - // securityRole comes from another document, therefor have to import - // first - Node importedSecurityRole = getDocument().importNode(securityRole, true); - - while (importedSecurityRole.hasChildNodes()) { - mySecurityRole.appendChild(importedSecurityRole.getFirstChild()); - } - - // add security-role to webapp - getElement().appendChild(mySecurityRole); - } - // else, the right security-role is already there, nothing to do ... - } - - /** - * @param securityRole security-role element. - * @return Returns a matching security-role element already - * in the Document. - */ - private Element findSecurityRole(Element securityRole) { - - NodeList potentialSecurityRoles = getElement().getElementsByTagNameNS(J2EE_NS, SECURITY_ROLE); - if (potentialSecurityRoles.getLength() == 0) { - // no security-role elements defined - // exit safely - return null; - } - - // Iterates over the potential security-role to find a matching - // role-name - Element found = null; - String requiredRoleName = getRoleName(securityRole); - // while nothing was found AND iteration not over - for (int index = 0; (index < potentialSecurityRoles.getLength()) - && (found == null); index++) { - Element potentialSR = (Element) potentialSecurityRoles.item(index); - // get the potential security-role name - String roleName = getRoleName(potentialSR); - - // compare, if equals, we're done - if (requiredRoleName.equals(roleName)) { - found = potentialSR; - } - } - - // found is still null if no matching security-role was found - return found; - } - - /** - * @param securityRole security-role element in which the role name - * will be extracted. - * @return Returns the extracted role-name value. - */ - private static String getRoleName(Element securityRole) { - Node roleName = securityRole.getElementsByTagNameNS(J2EE_NS, ROLE_NAME).item(0); - // j2ee:security-role/j2ee:role-name/#text - return roleName.getFirstChild().getNodeValue().trim(); - } - - /** - * Remove a servlet element from the web.xml. - * @param name servlet name. - */ - public void removeServlet(String name) { - Element servlet = findServlet(name); - - if (servlet != null) { - getElement().removeChild(servlet); - } - } - - /** - * Remove a servlet element from the web.xml. - * @param name servlet name. - * @return security-role elements for this servlet if such elements exist - */ - public NodeList removeServletWithSecurity(String name) { - Element servlet = findServlet(name); - NodeList elements = null; - - if (servlet != null) { - - elements = servlet.getElementsByTagNameNS(J2EE_NS, SECURITY_ROLE_REF); - // if the list is empty, return null - if (elements.getLength() == 0) { - elements = null; - } - getElement().removeChild(servlet); - } - return elements; - } - - /** - * Add a new servlet-mapping element in the web.xml. - * @param name servlet name. - * @param mapping url-mapping value - */ - public void addServletMapping(String name, String mapping) { - Element servletMapping = newJ2EEElement(SERVLET_MAPPING); - Element servletName = newJ2EEElement(SERVLET_NAME, name); - Element urlMapping = newJ2EEElement(URL_MAPPING, mapping); - - servletMapping.appendChild(servletName); - servletMapping.appendChild(urlMapping); - - // add servletMapping in the webapp Element - getElement().appendChild(servletMapping); - } - - /** - * Add a new init-param element in the web.xml. - * @param servletName the servlet name where init-param will be added. - * @param pName parameter name - * @param pValue parameter value - */ - public void addServletParam(String servletName, String pName, String pValue) { - Element ip = newJ2EEElement(INIT_PARAM); - Element pn = newJ2EEElement(PARAM_NAME, pName); - Element pv = newJ2EEElement(PARAM_VALUE, pValue); - - ip.appendChild(pn); - ip.appendChild(pv); - - Element servlet = findServlet(servletName); - servlet.appendChild(ip); - - } - - /** - * Add a new security-role-ref element in the web.xml. - * @param servletName the servlet name where security-role-ref will be - * added. - * @param securityRoleRefs security-role elements for a servlet - */ - public void addServletSecurityRoleRefs(String servletName, NodeList securityRoleRefs) { - // find the servlet - Element servlet = findServlet(servletName); - // add all security-role-ref - for (int i = 0; i < securityRoleRefs.getLength(); i++) { - Node securityRoleRefItem = securityRoleRefs.item(i); - servlet.appendChild(securityRoleRefItem); - } - } - - /** - * search webapp element for servlet named with the given name. - * @param name the searched servlet name - * @return the found element or null if element is not found (should'nt - * occurs). - */ - private Element findServlet(String name) { - NodeList nl = getElement().getElementsByTagNameNS(J2EE_NS, SERVLET); - Element servlet = null; - - for (int i = 0; (i < nl.getLength()) && (servlet == null); i++) { - Element e = (Element) nl.item(i); - - NodeList names = e.getElementsByTagNameNS(J2EE_NS, SERVLET_NAME); - - // test servlet/servlet-name/#text-node.value - if (names.item(0).getFirstChild().getNodeValue().equals(name)) { - servlet = e; - } - } - - return servlet; - } - - /** - * Remove servlet-mapping tag associated to a given servlet-name - * @param sName servlet-name - * @return url-pattern element's value in the servelet-mapping - */ - public String removeServletMapping(String sName) { - NodeList nl = getElement().getElementsByTagNameNS(J2EE_NS, SERVLET_MAPPING); - Element mapping = null; - String urlPatternValue = null; - - for (int i = 0; (i < nl.getLength()) && (mapping == null); i++) { - Element e = (Element) nl.item(i); - - NodeList names = e.getElementsByTagNameNS(J2EE_NS, SERVLET_NAME); - - // test servlet-mapping/servlet-name/#text-node.value - if (names.item(0).getFirstChild().getNodeValue().equals(sName)) { - mapping = e; - } - } - - if (mapping != null) { - if (getLogger().isLoggable(BasicLevel.DEBUG)) { - getLogger().log(BasicLevel.DEBUG, "mapping element found : " + mapping); - } - // pick up the url-pattern before removing - NodeList urlPatterns = mapping.getElementsByTagNameNS(J2EE_NS, URL_PATTERN); - urlPatternValue = urlPatterns.item(0).getFirstChild().getNodeValue(); - - getElement().removeChild(mapping); - } - - return urlPatternValue; - } - - /** - * Update the security-constraint element having url-pattern equal with - * oldPattern by replacing this old pattern with the newUrlPattern - * @param oldUrlPatter url-pattern to be replaced - * @param newUrlPatterValue url-pattern to replace with - */ - public void updateSecurityConstraint(String oldUrlPatter, String newUrlPatterValue) { - - NodeList nl = getElement().getElementsByTagNameNS(J2EE_NS, SECURITY_CONSTRAINT); - - // loop over security constraints - for (int i = 0; i < nl.getLength(); i++) { - Element e = (Element) nl.item(i); - - // look at nested url-pattern Element(s) - NodeList urlPatternCollection = e.getElementsByTagNameNS(J2EE_NS, URL_PATTERN); - for (int j = 0; j < urlPatternCollection.getLength(); j++) { - - Element urlPatternElement = (Element) urlPatternCollection.item(j); - Text urlPatternText = (Text) urlPatternElement.getFirstChild(); - - // if found urlPattern Element, replace its value - if (urlPatternText.getNodeValue().equals(oldUrlPatter)) { - urlPatternText.setNodeValue(newUrlPatterValue); - } - } - } - } - - /** - * DOCUMENT ME! - * @param name DOCUMENT ME! - * @param home DOCUMENT ME! - * @param remote DOCUMENT ME! - * @param link DOCUMENT ME! - */ - public void addEjbRef(String name, String home, String remote, String link) { - - Element ejbRef = newJ2EEElement("ejb-ref"); - Element ejbRefName = newJ2EEElement("ejb-ref-name", name); - Element ejbRefType = newJ2EEElement("ejb-ref-type", "Session"); - Element ejbHome = newJ2EEElement("home", home); - Element ejbRemote = newJ2EEElement("remote", remote); - Element ejbLink = newJ2EEElement("ejb-link", link); - - ejbRef.appendChild(ejbRefName); - ejbRef.appendChild(ejbRefType); - ejbRef.appendChild(ejbHome); - ejbRef.appendChild(ejbRemote); - ejbRef.appendChild(ejbLink); - - getElement().appendChild(ejbRef); - - } - - /** - * DOCUMENT ME! - * @param name DOCUMENT ME! - * @param home DOCUMENT ME! - * @param remote DOCUMENT ME! - * @param link DOCUMENT ME! - */ - public void addEjbLocalRef(String name, String home, String remote, String link) { - - Element ejbRef = newJ2EEElement("ejb-local-ref"); - Element ejbRefName = newJ2EEElement("ejb-ref-name", name); - Element ejbRefType = newJ2EEElement("ejb-ref-type", "Session"); - Element ejbHome = newJ2EEElement("local-home", home); - Element ejbRemote = newJ2EEElement("local", remote); - Element ejbLink = newJ2EEElement("ejb-link", link); - - ejbRef.appendChild(ejbRefName); - ejbRef.appendChild(ejbRefType); - ejbRef.appendChild(ejbHome); - ejbRef.appendChild(ejbRemote); - ejbRef.appendChild(ejbLink); - - getElement().appendChild(ejbRef); - - } -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/finder/GeneralWSFinder.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/finder/GeneralWSFinder.java deleted file mode 100644 index 3a85ab2c503ad7f527b2fa4060a04b919b9dcfde..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/finder/GeneralWSFinder.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2006 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.finder; - -import java.util.Iterator; - -import org.ow2.jonas.generators.genbase.archive.Application; -import org.ow2.jonas.generators.genbase.archive.Client; -import org.ow2.jonas.generators.genbase.archive.EjbJar; -import org.ow2.jonas.generators.genbase.archive.J2EEArchive; -import org.ow2.jonas.generators.genbase.archive.WebApp; - - -/** - * GeneralWSFinder is a wrapper for ear and other J2EE module types. - * - * @author Guillaume Sauthier - */ -public class GeneralWSFinder implements J2EEWebServicesFinder { - - /** - * Explored archive. - */ - private J2EEArchive archive = null; - - /** - * Creates a WSFinder suitable for all types of modules. - * @param archive Explored archive. - */ - public GeneralWSFinder(J2EEArchive archive) { - super(); - this.archive = archive; - } - - /** - * @see org.ow2.jonas.generators.wsgen.finder.J2EEWebServicesFinder#find() - */ - public boolean find() { - - if (archive instanceof Application) { - // explore sub modules - Application app = (Application) archive; - - // If any ejbjar has a webservice, return directly - for (Iterator i = app.getEjbJars(); i.hasNext();) { - EjbJar ejb = (EjbJar) i.next(); - if (findWebServicesInEjbJar(ejb)) { - return true; - } - } - - // If any webapp has a webservice, return directly - for (Iterator i = app.getWebApps(); i.hasNext();) { - WebApp web = (WebApp) i.next(); - if (findWebServicesInWebApp(web)) { - return true; - } - } - - //If any client has a webservice, return directly - for (Iterator i = app.getClients(); i.hasNext();) { - Client client = (Client) i.next(); - if (findWebServicesInClient(client)) { - return true; - } - } - - } else if (archive instanceof EjbJar) { - return findWebServicesInEjbJar((EjbJar) archive); - } else if (archive instanceof WebApp) { - return findWebServicesInWebApp((WebApp) archive); - } else if (archive instanceof Client) { - return findWebServicesInClient((Client) archive); - } - return false; - } - - /** - * @param archive The archive to explore. - * @return Returns true if the Client has WebServices. - */ - private static boolean findWebServicesInClient(Client archive) { - J2EEWebServicesFinder finder = new GenericWSFinder(archive, "META-INF/application-client.xml"); - return finder.find(); - } - - /** - * @param archive The archive to explore. - * @return Returns true if the WebApp has WebServices. - */ - private static boolean findWebServicesInWebApp(WebApp archive) { - J2EEWebServicesFinder finder = new GenericWSFinder(archive, "WEB-INF/web.xml"); - return finder.find(); - } - - /** - * @param archive The archive to explore. - * @return Returns true if the EjbJar has WebServices. - */ - private static boolean findWebServicesInEjbJar(EjbJar archive) { - J2EEWebServicesFinder finder = new GenericWSFinder(archive, "META-INF/ejb-jar.xml"); - return finder.find(); - } - - -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/finder/GenericWSFinder.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/finder/GenericWSFinder.java deleted file mode 100644 index c7e709d09a87f2d5b0fb53e4b8905303dea08dea..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/finder/GenericWSFinder.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2006 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.finder; - -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; -import org.ow2.jonas.generators.genbase.archive.J2EEArchive; -import org.ow2.jonas.lib.util.Log; -import org.xml.sax.SAXException; - -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.parsers.SAXParser; -import javax.xml.parsers.SAXParserFactory; -import java.io.InputStream; - -/** - * Multi-module (EjbJar, WebApp, Client) WebServices Finder. - * - * @author Guillaume Sauthier - */ -public class GenericWSFinder implements J2EEWebServicesFinder { - - /** - * logger. - */ - private static Logger logger = Log.getLogger(Log.JONAS_WSGEN_PREFIX); - - /** - * The archive to be explored. - */ - private J2EEArchive archive = null; - - /** - * Standard XML descriptor name. - */ - private String descriptorName = null; - - /** - * Create a multi-module type WSFinder. - * @param archive The archive to be explored. - * @param descriptorName Standard XML descriptor name. - */ - public GenericWSFinder(J2EEArchive archive, String descriptorName) { - super(); - this.archive = archive; - this.descriptorName = descriptorName; - } - - /** - * @see org.ow2.jonas.generators.wsgen.finder.J2EEWebServicesFinder#find() - */ - public boolean find() { - - // Look for webservices.xml - WebServicesXmlFinder wsFinder = new WebServicesXmlFinder(archive); - try { - wsFinder.init(getSAXParser()); - } catch (Exception e) { - logger.log(BasicLevel.DEBUG, "Cannot return a SAXParser", e); - // by default, the WebServicesXmlFinder will return false... - - } - - // Look for service-ref - ServiceRefFinder srFinder = new ServiceRefFinder(); - try { - InputStream is = archive.getInputStream(descriptorName); - SAXParser parser = getSAXParser(); - parser.parse(is, srFinder); - } catch (Exception e) { - logger.log(BasicLevel.DEBUG, "Cannot return a SAXParser", e); - // by default, the ServiceRefFinder will return false... - } - - // returns true if there is a webservices.xml (JAX-RPC only) - // and/or some service-ref (J2EE namespace only) - return wsFinder.find() || srFinder.find(); - } - /** - * @return Returns a SAXParser - * @throws ParserConfigurationException when Parser cannot be created. - * @throws SAXException when Parser cannot be created. - */ - protected SAXParser getSAXParser() throws ParserConfigurationException, SAXException { - SAXParserFactory factory = SAXParserFactory.newInstance(); - factory.setNamespaceAware(true); - factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); - return factory.newSAXParser(); - } - -} - diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/finder/J2EEWebServicesFinder.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/finder/J2EEWebServicesFinder.java deleted file mode 100644 index d08e4270106a179c355b8226535e88b5e145e7e6..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/finder/J2EEWebServicesFinder.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2006 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.finder; - -/** - * The J2EEWebServiceFinder interface is used to react if an - * archive may contains some J2EE webservices or J2EE webservices clients. - * - * @author Guillaume Sauthier - */ -public interface J2EEWebServicesFinder { - - /** - * @return Returns true if webservices have been found. - */ - boolean find(); -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/finder/ServiceRefFinder.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/finder/ServiceRefFinder.java deleted file mode 100644 index 2176ef125c19f3a161fc66597c2021fac9ffc9a8..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/finder/ServiceRefFinder.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2006 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.finder; - -import org.xml.sax.Attributes; -import org.xml.sax.SAXException; -import org.xml.sax.helpers.DefaultHandler; - -/** - * Specialized Finder for XML files. - * If one contains some service-ref elements, it will be marked has WS enabled. - * - * @author Guillaume Sauthier - */ -public class ServiceRefFinder extends DefaultHandler implements J2EEWebServicesFinder { - - /** - * J2EE Namespace URI. - */ - private static final String J2EE_NS = "http://java.sun.com/xml/ns/j2ee"; - - /** - * true if a service-ref element was found. - */ - private boolean found = false; - - /** - * @see org.xml.sax.helpers.DefaultHandler#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes) - */ - public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { - super.startElement(uri, localName, qName, attributes); - if ("service-ref".equals(localName) && J2EE_NS.equals(uri)) { - // found a j2ee:service-ref element - // react in some way - found = true; - } - } - - /** - * @see org.ow2.jonas.generators.wsgen.finder.J2EEWebServicesFinder#find() - */ - public boolean find() { - return found; - } - -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/finder/WebServicesXmlFinder.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/finder/WebServicesXmlFinder.java deleted file mode 100644 index 6e7fde6a9ffd6686223f4a9802c44c19cb5c51c6..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/finder/WebServicesXmlFinder.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2006 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.finder; - -import org.ow2.jonas.generators.genbase.archive.J2EEArchive; -import org.ow2.jonas.lib.util.Log; -import org.xml.sax.helpers.DefaultHandler; -import org.xml.sax.Attributes; -import org.xml.sax.SAXException; -import org.objectweb.util.monolog.api.Logger; -import org.objectweb.util.monolog.api.BasicLevel; - -import javax.xml.parsers.SAXParser; -import java.util.Iterator; -import java.util.List; -import java.io.InputStream; -import java.io.IOException; - - -/** - * WebServicesXmlFinder finds out if there is any - * webservices.xml within the given {@link J2EEArchive}. - * - * @author Guillaume Sauthier - */ -public class WebServicesXmlFinder extends DefaultHandler implements J2EEWebServicesFinder { - - /** - * logger. - */ - private static Logger logger = Log.getLogger(Log.JONAS_WSGEN_PREFIX); - - /** - * WebApp's webservices.xml. - */ - private static final String WEBINF_WEBSERVICES_XML = "WEB-INF/webservices.xml"; - - /** - * EjbJar's webservices.xml. - */ - private static final String METAINF_WEBSERVICES_XML = "META-INF/webservices.xml"; - - /** - * JAX-RPC value for the version attribute of the webservices.xml - */ - private static final String JAXRPC_VERSION = "1.1"; - - /** - * Archive to browse. - */ - private J2EEArchive archive = null; - - /** - * Tell if the archive is a jaxrpc archive or not. - */ - private boolean jaxrpc = false; - - /** - * Constructs a WebServicesXmlFinder that will - * explore the given {@link J2EEArchive}. - * @param archive archive to explore. - */ - public WebServicesXmlFinder(J2EEArchive archive) { - this.archive = archive; - } - - /** - * @see org.ow2.jonas.generators.wsgen.finder.J2EEWebServicesFinder#find() - */ - public boolean find() { - return jaxrpc; - } - - /** - * Explore the archive and find a webservices.xml. If found, parse the - * file and observe the 'version' attribute. - * @param parser SAX Parser - */ - public void init(SAXParser parser) { - List files = archive.getContainedFiles(); - for (Iterator i = files.iterator(); i.hasNext();) { - String filename = (String) i.next(); - - // If there is a webservices.xml file, check if it's a JAX-RPC file - if (WEBINF_WEBSERVICES_XML.equals(filename)) { - parseWebservicesDescriptor(parser, filename); - } - if (METAINF_WEBSERVICES_XML.equals(filename)) { - parseWebservicesDescriptor(parser, filename); - } - } - } - - /** - * Parse the descriptor. - * @param parser SAX Parser - * @param filename webservices.xml filename - */ - private void parseWebservicesDescriptor(SAXParser parser, String filename) { - InputStream is = null; - try { - is = archive.getArchive().getInputStream(filename); - parser.parse(is, this); - } catch (IOException e) { - logger.log(BasicLevel.DEBUG, "Cannot open " + filename + " in archive " + archive.getArchive().getName()); - } catch (SAXException e) { - logger.log(BasicLevel.DEBUG, "Cannot parse " + filename + " in archive " + archive.getArchive().getName()); - } finally { - if (is != null) { - try { - is.close(); - } catch (IOException e) { - logger.log(BasicLevel.DEBUG, "Ignored"); - } - } - } - } - - /** - * Receive notification of the start of an element. - *

    - *

    By default, do nothing. Application writers may override this - * method in a subclass to take specific actions at the start of - * each element (such as allocating a new tree node or writing - * output to a file).

    - * - * @param uri The Namespace URI, or the empty string if the - * element has no Namespace URI or if Namespace - * processing is not being performed. - * @param localName The local name (without prefix), or the - * empty string if Namespace processing is not being - * performed. - * @param qName The qualified name (with prefix), or the - * empty string if qualified names are not available. - * @param attributes The attributes attached to the element. If - * there are no attributes, it shall be an empty - * Attributes object. - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - * @see org.xml.sax.ContentHandler#startElement - */ - @Override - public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { - // the 'version' attribute is located on the 'webservices' element - if ("webservices".equals(localName)) { - - // Check value of the 'version' attribute - String value = attributes.getValue("version"); - if (JAXRPC_VERSION.equals(value)) { - jaxrpc = true; - } - } - } -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/Generator.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/Generator.java deleted file mode 100644 index d4b59ebacb6f3b410d9676f7b8c1cf1ce71c382d..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/Generator.java +++ /dev/null @@ -1,148 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2003-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.generator; - -import java.io.File; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.ArrayList; -import java.util.List; - -import org.objectweb.util.monolog.api.BasicLevel; -import org.ow2.jonas.eclipse.compiler.CompilationContext; -import org.ow2.jonas.eclipse.compiler.CompilerError; -import org.ow2.jonas.eclipse.compiler.JOnASCompiler; -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.generator.AbsGenerator; -import org.ow2.jonas.generators.genbase.generator.Config; -import org.ow2.jonas.generators.wsgen.WsGenException; -import org.ow2.jonas.lib.bootstrap.loader.JClassLoader; -import org.ow2.jonas.lib.util.I18n; - -/** - * Generators provide a structure to be extended for specific generation - * mecanisms. Axis will provide an AxisWsClientGenerator that will be in charge - * of client side generation (WSDL2Java tool) and an AxisWsEndpointGenerator - * that will bother with server side artifact generation. - * - * @author Guillaume Sauthier - */ -public abstract class Generator extends AbsGenerator { - - /** - * i18n. - */ - private static I18n i18n = I18n.getInstance(Generator.class); - - /** - * Creates a new Generator with the given Config. - * - * @param config internal configuration object. - * - * @throws GenBaseException When sources and target temporary directory cannot - * be created - */ - public Generator(final Config config) throws GenBaseException { - super(config); - } - - /** - * Generate files. - * - * @throws WsGenException When generation fails. - */ - @Override - public abstract void generate() throws WsGenException; - - /** - * Compile generated java files into classes directory. - * - * @throws WsGenException When compilation fails - */ - @Override - public void compile() throws WsGenException { - // get all java files contained in the sources dir - List sources = new ArrayList(); - sources = getJavaSources(getSources(), getSources()); - - // Init the compilation context - CompilationContext context = new CompilationContext(); - - JClassLoader classLoader = new JClassLoader("WSGen", new URL[]{}, Thread.currentThread().getContextClassLoader()); - addClasspath(classLoader, getConfig().getClasspath()); - context.setContextualClassLoader(classLoader); - - context.setOutputDirectory(getClasses()); - context.setSourceDirectory(getSources()); - context.setSources(sources); - - // Compile - JOnASCompiler compiler = new JOnASCompiler(context); - - List errors = compiler.compile(); - if (errors.isEmpty()) { - getLogger().log(BasicLevel.INFO, "Sources classes successfully compiled with Eclipse compiler."); - } else { - for (CompilerError error : errors) { - getLogger().log(BasicLevel.ERROR, error.toString()); - } - throw new WsGenException("Failed when compiling classes"); - } - - classLoader = null; - context = null; - compiler = null; - - // Perform garbage collector - System.gc(); - } - - /** - * Add To the given ClassLoader the given classpath. - * @param cl ClassLoader to be updated - * @param classpath the classpath to add inside the ClassLoader - * @throws WsGenException When classpath contains invalid URL - */ - private static void addClasspath(final JClassLoader cl, - final String classpath) throws WsGenException { - String[] elems = classpath.split(File.pathSeparator); - for (int i = 0; i < elems.length; i++) { - try { - cl.addURL(new File(elems[i]).toURL()); - } catch (MalformedURLException e) { - throw new WsGenException("Cannot create URL from '" + elems[i] + "'", e); - } - } - } - - - /** - * @return the i18n. - */ - protected static I18n getI18n() { - return i18n; - } -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/GeneratorFactory.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/GeneratorFactory.java deleted file mode 100644 index 101cac96f1d3db683bc88e2cbaf6e01a5d9a80d8..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/GeneratorFactory.java +++ /dev/null @@ -1,214 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2003-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.generator; - -import java.io.IOException; -import java.io.InputStream; -import java.util.Properties; - -import org.ow2.jonas.deployment.ws.ServiceDesc; -import org.ow2.jonas.deployment.ws.ServiceRefDesc; -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.archive.Archive; -import org.ow2.jonas.generators.genbase.generator.Config; -import org.ow2.jonas.generators.wsgen.WsGenException; -import org.ow2.jonas.generators.wsgen.ddmodifier.WebServicesDDModifier; -import org.ow2.jonas.generators.wsgen.ddmodifier.WsClientDDModifier; -import org.ow2.jonas.generators.wsgen.ddmodifier.WsEndpointDDModifier; -import org.ow2.jonas.lib.util.I18n; -import org.ow2.jonas.lib.util.Log; - - - - -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; - -/** - * a GeneratorFactory has to be extended by specific generation - * mecanism. It will look in jonas.properties file for a property - * named :jonas.service.ws.wsgen.generator.factory that is a - * classname extending GeneratorFactory. By default Axis - * GeneratorFactory is used. - * - * @author Guillaume Sauthier - */ -public abstract class GeneratorFactory implements org.ow2.jonas.generators.genbase.generator.GeneratorFactory { - - /** - * Generator Factory property name in jonas.properties - */ - public static final String GENERATOR_FACTORY = "jonas.service.ws.wsgen.generator.factory"; - - /** - * Default GeneratorFactory impl to use - */ - public static final String GENERATOR_FACTORY_DEFAULT = "org.ow2.jonas.generators.wsgen.generator.ews.EWSGeneratorFactory"; - - /** GeneratorFactory unique instance */ - private static GeneratorFactory instance = null; - - /** i18n */ - private static I18n i18n = I18n.getInstance(GeneratorFactory.class); - - /** logger */ - private static Logger logger = Log.getLogger(Log.JONAS_WSGEN_PREFIX); - - /** Configuration to set on instanciated Generator */ - private Config configuration; - - /** - * Returns the unique GeneratorFactory instance. - * - * @return the unique GeneratorFactory instance. - * - * @throws WsGenException When instanciation fails - */ - public static GeneratorFactory getInstance() throws WsGenException { - if (instance == null) { - instance = newInstance(); - } - - return instance; - } - - /** - * Create a new generatorFactory instance by looking up in - * jonas.properties and load class specified with - * jonas.service.ws.wsgen.generator-factory property. If not - * set, Axis GeneratorFactory is the default Factory returned. - * - * @return a new generatorFactory instance. - * - * @throws WsGenException when Exception occurs when dynamiccaly - * instantiating GeneratorFactory subclass - */ - private static GeneratorFactory newInstance() throws WsGenException { - - String classname = null; - - ClassLoader cl = Thread.currentThread().getContextClassLoader(); - InputStream is = cl.getResourceAsStream("jonas.properties"); - - if (is == null) { - // Should be on the client side - // use default value - classname = GENERATOR_FACTORY_DEFAULT; - } else { - Properties jprop = new Properties(); - try { - jprop.load(is); - classname = jprop.getProperty(GENERATOR_FACTORY, GENERATOR_FACTORY_DEFAULT); - } catch (IOException e) { - // cannot read properties, use default value - logger.log(BasicLevel.WARN, "Cannot get '" + GENERATOR_FACTORY + "' value, default used : '" - + GENERATOR_FACTORY_DEFAULT + "'"); - classname = GENERATOR_FACTORY_DEFAULT; - } finally { - try { - is.close(); - } catch (IOException e) { - // use default if it was not set - if (classname == null) { - classname = GENERATOR_FACTORY_DEFAULT; - } - } - } - } - - // instanciate - GeneratorFactory gf = null; - - try { - Class gfc = cl.loadClass(classname) - .asSubclass(GeneratorFactory.class); - gf = gfc.newInstance(); - } catch (Exception e) { - // Try with another ClassLoader - cl = GeneratorFactory.class.getClassLoader(); - try { - Class gfc = cl.loadClass(classname) - .asSubclass(GeneratorFactory.class); - gf = gfc.newInstance(); - } catch (Exception e2) { - String err = i18n.getMessage("GeneratorFactory.newInstance.instance", classname); - throw new WsGenException(err, e2); - } - } - - return gf; - - } - - /** - * Return a new WsClientGenerator for the specific generation mecanism. - * - * @param serviceRef the service-ref containing information for client side - * generation process. - * @param ddm the XML modifier. - * @param archive the Archive to be modified - * - * @return a new WsClientGenerator. - * - * @throws GenBaseException When Factory cannot instanciate WsClientGenerator - */ - public abstract WsClientGenerator newGenerator(ServiceRefDesc serviceRef, WsClientDDModifier ddm, Archive archive) - throws GenBaseException; - - /** - * Return a new WsEndpointGenerator for the specific generation mecanism. - * - * @param serviceDesc the webservice-description containing information for - * server side generation process. - * @param ddm the XML modifier. - * @param wsddm the Webservices.xml DD modifier - * @param arch The archive to modify - * - * @return a new WsEndpointGenerator. - * - * @throws GenBaseException When Factory cannot instanciate WsEndpointGenerator - */ - public abstract WsEndpointGenerator newGenerator(ServiceDesc serviceDesc, WsEndpointDDModifier ddm, - WebServicesDDModifier wsddm, Archive arch) throws GenBaseException; - - /** - * Set the Configuration to use with newly created Generator. - * - * @param config the Configuration to use with newly created Generator. - */ - public void setConfiguration(Config config) { - this.configuration = config; - } - - /** - * Get the Configuration to use with newly created Generator. - * - * @return the Configuration to use with newly created Generator - */ - public Config getConfiguration() { - return configuration; - } -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/SecurityGenerator.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/SecurityGenerator.java deleted file mode 100644 index 46099b46517dfb21e05d540831e0bc06477d0820..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/SecurityGenerator.java +++ /dev/null @@ -1,304 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Inital Developer : Matt Wringe - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.generator; - -import org.ow2.jonas.generators.wsgen.ddmodifier.ContextDDModifier; -import org.ow2.jonas.generators.wsgen.ddmodifier.WebJettyDDModifier; -import org.ow2.jonas.generators.wsgen.ddmodifier.WsEndpointDDModifier; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - - -/** - * Generates the necessary security files to the generated - * webapp for a stateless session bean endpoint. - * - * @author Matt Wringe - */ -public class SecurityGenerator { - - /** - * Document that contains the security configurations to be used - */ - private Document securityDesc = null; - - /** - * WsEndpointDDModifier used to add security settings to the web.xml - */ - private WsEndpointDDModifier wsddm = null; - - /** - * ContextDDModifier used to add Realm settings to the context.xml - */ - private ContextDDModifier cddm = null; - - /** - * WebJettyDDModifuer used to add Realm settings to web-jetty.xml - */ - private WebJettyDDModifier wjddm = null; - - /** - * The name of the node in securityDesc that contains the login-config settings - */ - private static final String LOGIN_CONFIG = "endpoint-login-config"; - - /** - * The name of the node in securityDesc that contains the security-constraint settings - */ - private static final String SECURITY_CONSTRAINT = "endpoint-security-constraint"; - - /** - * The name of the node that contains the realm - */ - private static final String REALM = "endpoint-realm"; - - /** - * The name of the node that contains the name of the realm - */ - private static final String REALM_NAME = "endpoint-realm-name"; - - /** - * The name of the node that contains the security role - */ - private static final String SECURITY_ROLE = "endpoint-security-role"; - - /** - * The realm the webapp should use - */ - private String realm = null; - - /** - * The name of the realm that the webapp should use - */ - private String realmName = null; - - - /** - * Creates a new SecurityGenerator object - * @param securityDesc Dom Document that contains the security settings - */ - public SecurityGenerator(final Document securityDesc) { - this.securityDesc = securityDesc; - } - - /** - * Generates the security settings specified in securityDesc document - * - * @param ddm Used to add security to the web.xml - * @param cddm Used to add a security realm to the context.xml - * @param wjddm Used to add a security realn to the web-jetty.xml - */ - public void generate(final WsEndpointDDModifier ddm, final ContextDDModifier cddm, final WebJettyDDModifier wjddm) { - this.wsddm = ddm; - this.cddm = cddm; - this.wjddm = wjddm; - - if (securityDesc != null) { - - realm = getRealm(); - realmName = getRealmName(); - - if (ddm != null) { - addEndpointSecurity(); - } - if (cddm != null) { - addContextRealm(); - } - // Do not add the realm in web-jetty.xml (already in jetty6.xml) - // TODO has to be refined - /* - if (wjddm != null) { - addWebJettyRealm(); - } - */ - } - } - - - /** - * Add realm settings to the context.xml - * - */ - private void addContextRealm() { - if (realm != null) { - cddm.addContextRealm(realm); - } - } - - /** - * Add realm settings to web-jetty.xml - * - */ - private void addWebJettyRealm() { - if (realm != null) { - if (realmName != null) { - wjddm.configRealm(realmName, realm); - } else { - wjddm.configRealm(realm); - } - } - } - - /** - * Setup the web security in the web.xml - * - */ - private void addEndpointSecurity() { - - //Add the security constraints - NodeList securityConstraints = getEndpointSecurityConstraints(); - if (securityConstraints != null) { - for (int i = 0; i < securityConstraints.getLength(); i++) { - //remove the j2ee prefix of this node - removePrefix(securityConstraints.item(i)); - wsddm.addEndpointSecurityConstraint(securityConstraints.item(i)); - } - } - - //Add the login configs - NodeList loginConfigs = getEndpointLoginConfig(); - if (loginConfigs != null) { - for (int i = 0; i < loginConfigs.getLength(); i++) { - //remove the j2ee prefix from this node - removePrefix(loginConfigs.item(i)); - wsddm.addEndpointLoginConfig((Element) loginConfigs.item(i)); - } - } - - //Add the security roles - NodeList securityRoles = getEndpointSecurityRole(); - if (securityRoles != null) { - for (int i = 0; i < securityRoles.getLength(); i++) { - //remove the j2ee prefix from thie node - removePrefix(securityRoles.item(i)); - wsddm.addSecurityRole(securityRoles.item(i)); - } - } - } - - /** - * Returns the DocumentElement for the securityDesc document - * - * @return DocumentElement for the securityDesc document - */ - private Element getElement() { - return securityDesc.getDocumentElement(); - } - - /** - * Returns the login-config nodes from the securityDesc document - * @return the login-config nodes from the securityDesc document - */ - public NodeList getEndpointLoginConfig() { - NodeList nodeList = getElement().getElementsByTagName(LOGIN_CONFIG); - return nodeList; - } - - /** - * Returns the security-constraint nodes from the securityDesc document - * - * @return the security-constraint nodes from the securityDesc document - */ - public NodeList getEndpointSecurityConstraints() { - NodeList nodeList = getElement().getElementsByTagName(SECURITY_CONSTRAINT); - return nodeList; - } - - /** - * Returns the security-role nodes from the securityDesc document - * - * @return the security-role nodes from the securityDesc document - */ - public NodeList getEndpointSecurityRole() { - NodeList nodeList = getElement().getElementsByTagName(SECURITY_ROLE); - return nodeList; - } - - /** - * Returns the context-realm node from the securityDesc document - * - * @return the realm node from the securityDesc document - */ - public String getRealm() { - NodeList nodeList = getElement().getElementsByTagName(REALM); - Node node = nodeList.item(0); - - if (node != null && node.hasChildNodes()) { - Node realmNode = nodeList.item(0).getFirstChild(); - realm = realmNode.getNodeValue(); - } - return realm; - } - - /** - * Returns the realm name - * - * @return the realm name - */ - public String getRealmName() { - String realmName = null; - NodeList nodeList = getElement().getElementsByTagName(REALM_NAME); - Node node = nodeList.item(0); - - if (node != null && node.hasChildNodes()) { - Node realmNameNode = nodeList.item(0).getFirstChild(); - realmName = realmNameNode.getNodeValue(); - } - return realmName; - } - - /** - * Returns the Document that contains the security settings - * - * @return Document that contains the security settings - */ - public Document getSecurityDesc() { - return securityDesc; - } - - /** - * Removes the prefix from all the children of a node - * - * @param node Node - */ - private void removePrefix (final Node node) { - if (node != null) { - if (node.getPrefix() != null) { - node.setPrefix(null); - } - if (node.hasChildNodes()) { - for (int i = 0; i < node.getChildNodes().getLength(); i++) { - removePrefix (node.getChildNodes().item(i)); - } - } - } - } - -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/WsClientGenerator.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/WsClientGenerator.java deleted file mode 100644 index c7c79176d767b216aa9d445b043d0918632ef757..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/WsClientGenerator.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2003-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.generator; - -import org.ow2.jonas.deployment.ws.ServiceRefDesc; -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.archive.Archive; -import org.ow2.jonas.generators.genbase.generator.Config; -import org.ow2.jonas.generators.wsgen.ddmodifier.WsClientDDModifier; - - - -/** - * Generate sources and/or config for WebServices clients. - * - * @author Guillaume Sauthier - */ -public abstract class WsClientGenerator extends Generator { - - /** service-ref describing client dependency on a webservice */ - private ServiceRefDesc ref; - - /** jonas-service-ref modifier */ - private WsClientDDModifier modifier; - - /** archive */ - private Archive archive; - - /** - * Creates a new WsClientGenerator. - * - * @param config Generator Configuration - * @param serviceRef client dependency on a webservice - * @param ddm jonas-service-ref modifier - * @param arch modified archive - * - * @throws GenBaseException When instanciation fails - */ - public WsClientGenerator(Config config, ServiceRefDesc serviceRef, WsClientDDModifier ddm, Archive arch) - throws GenBaseException { - super(config); - ref = serviceRef; - modifier = ddm; - archive = arch; - } - /** - * @return the archive. - */ - public Archive getArchive() { - return archive; - } - /** - * @return the modifier. - */ - public WsClientDDModifier getModifier() { - return modifier; - } - /** - * @return the ref. - */ - public ServiceRefDesc getRef() { - return ref; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/WsEndpointGenerator.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/WsEndpointGenerator.java deleted file mode 100644 index ad6b2387754f8e71db3ec7a53129d098d29ed587..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/WsEndpointGenerator.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2003-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.generator; - -import org.ow2.jonas.deployment.ws.ServiceDesc; -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.archive.Archive; -import org.ow2.jonas.generators.genbase.generator.Config; -import org.ow2.jonas.generators.wsgen.ddmodifier.WebServicesDDModifier; -import org.ow2.jonas.generators.wsgen.ddmodifier.WsEndpointDDModifier; - - - -/** - * Generate sources and/or config files for WebServices Endpoint. - * @author Guillaume Sauthier - */ -public abstract class WsEndpointGenerator extends Generator { - - /** WebService Endpoint description */ - private ServiceDesc service; - - /** archive */ - private Archive archive; - - /** Web DD Modifier */ - private WsEndpointDDModifier modifier; - - /** Webservices DD Modifier */ - private WebServicesDDModifier wsModifier; - - /** - * Creates a new WsEndpointGenerator - * @param config Generator Configuration - * @param serviceDesc WebService Endpoint description - * @param ddm Web DD Modifier - * @param wsddm webservices.xml DD modifier - * @param arch the Archive to modify - * @throws GenBaseException When instanciation fails - */ - public WsEndpointGenerator(Config config, ServiceDesc serviceDesc, WsEndpointDDModifier ddm, - WebServicesDDModifier wsddm, Archive arch) throws GenBaseException { - super(config); - service = serviceDesc; - modifier = ddm; - wsModifier = wsddm; - archive = arch; - } - - /** - * @return the service. - */ - public ServiceDesc getService() { - return service; - } - - /** - * @return the archive. - */ - public Archive getArchive() { - return archive; - } - - /** - * @return the modifier. - */ - public WsEndpointDDModifier getModifier() { - return modifier; - } - - /** - * @return the wsModifier. - */ - public WebServicesDDModifier getWsModifier() { - return wsModifier; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/AxisGeneratorFactory.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/AxisGeneratorFactory.java deleted file mode 100644 index 6cabe4eda8306fb253327d72b1189826a6fa6379..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/AxisGeneratorFactory.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial Developer : Guillaume Sauthier - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- -*/ - -package org.ow2.jonas.generators.wsgen.generator.axis; - -import org.ow2.jonas.deployment.ws.ServiceDesc; -import org.ow2.jonas.deployment.ws.ServiceRefDesc; -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.archive.Archive; -import org.ow2.jonas.generators.wsgen.WsGenException; -import org.ow2.jonas.generators.wsgen.ddmodifier.WebServicesDDModifier; -import org.ow2.jonas.generators.wsgen.ddmodifier.WsClientDDModifier; -import org.ow2.jonas.generators.wsgen.ddmodifier.WsEndpointDDModifier; -import org.ow2.jonas.generators.wsgen.generator.GeneratorFactory; -import org.ow2.jonas.generators.wsgen.generator.WsClientGenerator; -import org.ow2.jonas.generators.wsgen.generator.WsEndpointGenerator; - - - - -/** - * GeneratorFactory impl for Axis. - * - * @deprecated - * @author Guillaume Sauthier - */ -public class AxisGeneratorFactory extends GeneratorFactory { - /** - * Return a new WsClientGenerator for the specific generation mecanism. - * - * @param serviceRef the service-ref containing information for client side - * generation process. - * @param ddm the XML modifier. - * @param archive the Archive to be modified - * - * @return a new WsClientGenerator. - * - * @throws GenBaseException When creation fails. - * @throws WsGenException When creation fails. - */ - public WsClientGenerator newGenerator(ServiceRefDesc serviceRef, - WsClientDDModifier ddm, Archive archive) throws GenBaseException, WsGenException { - return new AxisWsClientGenerator(getConfiguration(), serviceRef, ddm, archive); - } - - /** - * Return a new WsEndpointGenerator for the specific generation mecanism. - * - * @param serviceDesc the webservice-description containing information for - * server side generation process. - * @param ddm the XML modifier. - * @param wsddm webservices.xml DD modifier - * - * @return a new WsEndpointGenerator. - * - * @throws GenBaseException When creation fails. - * @throws WsGenException When creation fails. - */ - public WsEndpointGenerator newGenerator(ServiceDesc serviceDesc, - WsEndpointDDModifier ddm, WebServicesDDModifier wsddm, Archive arch) throws GenBaseException, WsGenException { - return new AxisWsEndpointGenerator(getConfiguration(), serviceDesc, ddm, wsddm, arch); - } -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/AxisWsClientGenerator.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/AxisWsClientGenerator.java deleted file mode 100644 index f54a1627fe2635ff8730769a3b3a6b184bcf8516..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/AxisWsClientGenerator.java +++ /dev/null @@ -1,294 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.generator.axis; - -import java.io.File; - -import org.ow2.jonas.deployment.ws.MappingFile; -import org.ow2.jonas.deployment.ws.ServiceRefDesc; -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.archive.Archive; -import org.ow2.jonas.generators.genbase.archive.EjbJar; -import org.ow2.jonas.generators.genbase.archive.J2EEArchive; -import org.ow2.jonas.generators.genbase.archive.WebApp; -import org.ow2.jonas.generators.genbase.generator.Config; -import org.ow2.jonas.generators.genbase.utils.XMLUtils; -import org.ow2.jonas.generators.wsgen.WsGenException; -import org.ow2.jonas.generators.wsgen.ddmodifier.WsClientDDModifier; -import org.ow2.jonas.generators.wsgen.generator.WsClientGenerator; -import org.ow2.jonas.generators.wsgen.generator.axis.wsdl2java.JOnASWSDL2Java; -import org.ow2.jonas.lib.loader.AbsModuleClassLoader; -import org.ow2.jonas.lib.util.I18n; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import org.apache.velocity.VelocityContext; - - - - -import org.objectweb.util.monolog.api.BasicLevel; - -/** - * Generate WebServices client files dedicated to axis.
    • - * client-config.wsdd : if needed
    • java sources : from WSDL
    • - *
    - * - * @author Guillaume sauthier - */ -public class AxisWsClientGenerator extends WsClientGenerator { - - /** unique JVelocity instance */ - private static JVelocity jvelocity = null; - - /** - * jonas-init-param name for client configuration file declaration - */ - private static final String CLIENT_CONFIG = "axis.clientConfigFile"; - - /** - * WSDD Extension suffix - */ - private static final String WSDD_SUFFIX = ".wsdd"; - - /** - * WSDD Extension prefix - */ - private static final String WSDD_PREFIX = "deploy-client-"; - - /** count generated files to assure names unicity */ - private static int count = 0; - - /** generated config file */ - private File generated = null; - - /** - * WEB-INF/ prefix - */ - private static final String WEB_PREFIX = "WEB-INF/"; - - /** - * I18n - */ - private static I18n i18n = I18n.getInstance(AxisWsClientGenerator.class); - - /** - * Creates a new AxisWsClientGenerator - * @param config Generator Configuration - * @param srd WebService Endpoint description - * @param ddm Web DD Modifier - * @param archive client archive containing WSDL - * @throws GenBaseException When instanciation fails - * @throws WsGenException When instanciation fails - */ - public AxisWsClientGenerator(Config config, ServiceRefDesc srd, WsClientDDModifier ddm, Archive archive) - throws GenBaseException, WsGenException { - super(config, srd, ddm, archive); - - // init velocity - if (jvelocity == null) { - String packageName = this.getClass().getPackage().getName(); - packageName = packageName.replace('.', '/'); - jvelocity = new JVelocity(packageName + "/deploy_client.vm"); - } - } - - /** - * generate axis specific files - * @throws WsGenException if WSDL cannot be found in archive - */ - public void generate() throws WsGenException { - - // the source generation is possible only when a - // WSDL Definition is provided - if ((getRef().getWsdlFileName() != null) - && !getRef().getServiceInterface().getName().equals("javax.xml.rpc.Service")) { - - try { - // classpath creation - J2EEArchive j2eeArchive = (J2EEArchive) getArchive(); - AbsModuleClassLoader cl = (AbsModuleClassLoader) j2eeArchive.getModuleClassloader(); - getConfig().setClasspath(getConfig().getClasspath() + cl.getClasspath()); - - - JOnASWSDL2Java jWsdl2Java = new JOnASWSDL2Java(); - jWsdl2Java.run(this); - getLogger().log(BasicLevel.INFO, "Web Services Classes successfully generated by Axis."); - } catch (Exception e) { - String err = getI18n().getMessage("AxisWsClientGenerator.generate.WSDL2Java"); - e.printStackTrace(System.err); - throw new WsGenException(err, e); - } - } - - // Client-config.wsdd ?? - // only if handlers are specified in ServiceRef - // but if noConfig set to true, assume that - // user configure himself the client. (expert) - // Could we create configuration ? - if (hasClientConfigFile(getRef())) { - // create deploy.wsdd - // use velocity template - // build a unique file name - String filename = WSDD_PREFIX + (count++) + WSDD_SUFFIX; - - VelocityContext vctx = VContextFactory.getContext(getRef()); - - if (getLogger().isLoggable(BasicLevel.DEBUG)) { - getLogger().log(BasicLevel.DEBUG, "Creating '" + filename + "'"); - } - generated = new File(getSources(), filename); - - jvelocity.generate(generated, vctx); - - } - // End !noConfig - } - - /** - * Returns true if given service-ref need a client configuration files - * @param ref Service Ref - * @return true if given service-ref need a client configuration files - */ - private boolean hasClientConfigFile(ServiceRefDesc ref) { - // no configuration asked - if (getConfig().isNoConfig()) { - return false; - } - - MappingFile mf = ref.getMappingFile(); - - if (mf != null) { - // mapping file defined - if (mf.getXmlTypeMappings().hasNext()) { - // we have 1 mapping at least - return true; - } else { - // no mapping - // return true if ref has Handlers - return (ref.getHandlerRefs().size() != 0); - } - } else { - // no mapping file - // return true if ref has Handlers - return (ref.getHandlerRefs().size() != 0); - } - } - - /** - * Add generated files in given archive - * @param archive archive where generated fils will be added. - * @throws WsGenException when files cannot be added - */ - public void addFiles(Archive archive) throws WsGenException { - if (archive instanceof WebApp) { - archive.addDirectoryIn("WEB-INF/classes/", getClasses()); - - if (generated != null) { - archive.addFileIn("WEB-INF/", generated); - - // ensure the optionnal descriptor exists - if (!getModifier().hasJonasServiceRef()) { - if (!getArchive().getContainedFiles().contains("WEB-INF/jonas-web.xml")) { - // jonas-web.xml doesn't exists - createEmptyJonasWeb((J2EEArchive) archive); - } - Element jsr = getModifier().createJonasServiceRef(getRef().getServiceRefName()); - // update - getModifier().setElement(jsr); - - } - - // add init param - getModifier().addJonasInitParam(CLIENT_CONFIG, WEB_PREFIX + generated.getName()); - } - } else if (archive instanceof EjbJar) { - archive.addDirectory(getClasses()); - - if (generated != null) { - archive.addFileIn("META-INF/", generated); - - // ensure the optionnal descriptor exists - if (!getModifier().hasJonasServiceRef()) { - Element jsr = getModifier().createJonasServiceRef(getRef().getServiceRefName()); - // update - getModifier().setElement(jsr); - } - - // add init param - getModifier().addJonasInitParam(CLIENT_CONFIG, "META-INF/" + generated.getName()); - } - } else { - archive.addDirectory(getClasses()); - - if (generated != null) { - archive.addFileIn("META-INF/", generated); - - // ensure the optionnal descriptor exists - if (!getModifier().hasJonasServiceRef()) { - if (!getArchive().getContainedFiles().contains("META-INF/jonas-client.xml")) { - // jonas-client.xml doesn't exists - createEmptyJonasClient((J2EEArchive) archive); - } - Element jsr = getModifier().createJonasServiceRef(getRef().getServiceRefName()); - // update - getModifier().setElement(jsr); - - } - - // add init param - getModifier().addJonasInitParam(CLIENT_CONFIG, "META-INF/" + generated.getName()); - } - } - } - - /** - * Add an empty jonas-web.xml in given J2EEArchive. - * @param archive archive to be updated - */ - private void createEmptyJonasWeb(J2EEArchive archive) { - Document doc = XMLUtils.newJonasWeb(); - archive.getDescriptors().put("WEB-INF/jonas-web.xml", doc); - getModifier().setDocument(doc); - } - - /** - * Add an empty jonas-client.xml in given J2EEArchive. - * @param archive archive to be updated - */ - private void createEmptyJonasClient(J2EEArchive archive) { - Document doc = XMLUtils.newJonasClient(); - archive.getDescriptors().put("META-INF/jonas-client.xml", doc); - getModifier().setDocument(doc); - } - - /** - * @return Returns the i18n. - */ - public static I18n getI18n() { - return i18n; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/AxisWsEndpointGenerator.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/AxisWsEndpointGenerator.java deleted file mode 100644 index fb6492168d036c73de3a6702b5b37ad78fe7381d..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/AxisWsEndpointGenerator.java +++ /dev/null @@ -1,218 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.generator.axis; - -import java.io.File; -import java.util.Iterator; -import java.util.List; -import java.util.Vector; - -import org.ow2.jonas.deployment.ws.JaxRpcPortComponentDesc; -import org.ow2.jonas.deployment.ws.PortComponentDesc; -import org.ow2.jonas.deployment.ws.ServiceDesc; -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.archive.Archive; -import org.ow2.jonas.generators.genbase.archive.WebApp; -import org.ow2.jonas.generators.genbase.generator.Config; -import org.ow2.jonas.generators.wsgen.WsGenException; -import org.ow2.jonas.generators.wsgen.ddmodifier.WebServicesDDModifier; -import org.ow2.jonas.generators.wsgen.ddmodifier.WsEndpointDDModifier; -import org.ow2.jonas.generators.wsgen.generator.WsEndpointGenerator; -import org.ow2.jonas.lib.util.Log; - -import org.apache.velocity.VelocityContext; - - - - -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; - -/** - * Generate Axis specific config files for Endpoint - * - * @author Guillaume Sauthier - */ -public class AxisWsEndpointGenerator extends WsEndpointGenerator { - - /** - * unique JVelocity instance - */ - private static JVelocity jvelocity = null; - - /** - * logger - */ - private static Logger logger = Log.getLogger(Log.JONAS_WSGEN_PREFIX); - - /** - * Axis Servlet classname - */ - private static final String AXIS_SERVLET_CLASS = "org.ow2.jonas.ws.axis.JAxisServlet"; - - /** - * init-param name for declaring server configuration file - */ - private static final String SERVER_CONFIG = "axis.serverConfigFile"; - - /** - * WSDD Extension suffix - */ - private static final String WSDD_SUFFIX = ".wsdd"; - - /** - * WSDD Extension prefix - */ - private static final String WSDD_PREFIX = "deploy-server-"; - - /** - * count generated files - */ - private static int count = 0; - - /** - * generated server-config file - */ - private File generatedServerConfig; - - /** - * Creates a new AxisWsEndpointGenerator - * - * @param config Generator Configuration - * @param serviceDesc WebService Endpoint description - * @param ddm Web DD Modifier - * @param wsddm webservices.xml DD modifier - * - * @throws GenBaseException When instanciation fails - * @throws WsGenException When instanciation fails. - */ - public AxisWsEndpointGenerator(Config config, ServiceDesc serviceDesc, WsEndpointDDModifier ddm, - WebServicesDDModifier wsddm, Archive arch) throws GenBaseException, WsGenException { - super(config, serviceDesc, ddm, wsddm, arch); - - // init velocity - if (jvelocity == null) { - String packageName = this.getClass().getPackage().getName(); - packageName = packageName.replace('.', '/'); - jvelocity = new JVelocity(packageName + "/deploy_endpoint.vm"); - } - } - - /** - * Generate server side configuration file - * - * @throws WsGenException When generation fails - */ - public void generate() throws WsGenException { - String sName = getService().getName(); - - // construct VelocityContext - VelocityContext vc = VContextFactory.getContext(getService()); - - // Generate file - String filename = WSDD_PREFIX + (count++) + WSDD_SUFFIX; - generatedServerConfig = new File(getSources(), filename); - jvelocity.generate(generatedServerConfig, vc); - - // remove existing servlets - for (Iterator i = getService().getPortComponents().iterator(); i.hasNext();) { - Object obj = i.next(); - if (obj instanceof JaxRpcPortComponentDesc) { - JaxRpcPortComponentDesc jax = (JaxRpcPortComponentDesc) obj; - - if (logger.isLoggable(BasicLevel.DEBUG)) { - logger.log(BasicLevel.DEBUG, "Removing servlet '" + jax.getSibLink() + "'"); - } - - // remove servlet mapping - getModifier().removeServletMapping(jax.getSibLink()); - // remove old servlet - getModifier().removeServlet(jax.getSibLink()); - // change sib-link - getWsModifier().changeServletLink(sName, jax.getSibLink(), sName); - } - } - - // and use our own - getModifier().addServlet(sName, AXIS_SERVLET_CLASS); - getModifier().addServletParam(sName, SERVER_CONFIG, filename); - - // setup servlet-mappings - boolean requireDefaultMapping = false; - List usedServletMappings = new Vector(); - for (Iterator i = getService().getPortComponents().iterator(); i.hasNext();) { - PortComponentDesc pcd = (PortComponentDesc) i.next(); - String mapping = pcd.getMapping(); - if (mapping != null) { - // port has specified an endpoint URI - // use it for servlet-mapping - if (!usedServletMappings.contains(mapping)) { - usedServletMappings.add(mapping); - - if (logger.isLoggable(BasicLevel.DEBUG)) { - logger.log(BasicLevel.DEBUG, "Adding servlet-mapping for '" + sName + "' -> '" + mapping + "'"); - } - - getModifier().addServletMapping(sName, mapping); - } - } else { - // no specified endpoint uri for the port - requireDefaultMapping = true; - } - } - if (requireDefaultMapping) { - // try to set a default mapping - String defaultEndpointURI = getService().getEndpointURI(); - if (defaultEndpointURI == null) { - // default behavior - getModifier().addServletMapping(sName, "/" + sName + "/*"); - } else { - // use retieved value - getModifier().addServletMapping(sName, defaultEndpointURI); - } - } - - } - - /** - * Add generated files in given Archive - * - * @param archive WebApp archive - * - * @throws WsGenException When cannot add files in archive - */ - public void addFiles(Archive archive) throws WsGenException { - // archive must be a WebApp - if (!(archive instanceof WebApp)) { - String err = getI18n().getMessage("AxisWsEndpointGenerator.addFiles.illegal", archive.getRootFile()); - throw new IllegalArgumentException(err); - } - - WebApp web = (WebApp) archive; - web.addFileIn("WEB-INF/", generatedServerConfig); - - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/JVelocity.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/JVelocity.java deleted file mode 100644 index 07c26a12e4b3de3ae0446d3f25e9cc4976a2827c..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/JVelocity.java +++ /dev/null @@ -1,155 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial Developer : Guillaume Sauthier - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.generator.axis; - -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; - -import org.ow2.jonas.generators.wsgen.WsGenException; -import org.ow2.jonas.lib.util.I18n; -import org.ow2.jonas.lib.util.Log; - -import org.apache.velocity.Template; -import org.apache.velocity.VelocityContext; -import org.apache.velocity.app.VelocityEngine; -import org.apache.velocity.runtime.RuntimeConstants; - - - - -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; - -/** - * Wrapper around Velocity tool. - * - * @author Guillaume Sauthier - */ -public class JVelocity { - - /** i18n */ - private static I18n i18n = I18n.getInstance(JVelocity.class); - - /** - * logger - */ - private static Logger logger = Log.getLogger(Log.JONAS_WSGEN_PREFIX); - - /** Velocity Engine */ - private VelocityEngine vEngine; - - /** Velocity Template */ - private Template template; - - /** - * Creates a new JVelocity instance using the given template. - * - * @param tmplName the template filename - * - * @exception WsGenException when error occurs during Velocity - * initialization. - */ - public JVelocity(String tmplName) throws WsGenException { - // Prepare Velocity Engine - String jonasRoot = System.getProperty("jonas.root"); - - if (jonasRoot == null) { - String err = i18n.getMessage("JVelocity.constr.notset"); - throw new WsGenException(err); - } - - //String path2Tmpl = new String(jonasRoot + File.separatorChar + "templates" + File.separatorChar + "wsgen" - // + File.separatorChar + "generator" + File.separatorChar + "axis"); - - // instanciate the engine - vEngine = new VelocityEngine(); - //vEngine.setProperty(RuntimeConstants.VM_LIBRARY, ""); - vEngine.setProperty(RuntimeConstants.RESOURCE_LOADER, "class"); - //vEngine.setProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH, path2Tmpl); - - try { - vEngine.init(); - } catch (Exception e) { - String err = i18n.getMessage("JVelocity.constr.initFailure"); - throw new WsGenException(err, e); - } - - // Create the Template - try { - template = vEngine.getTemplate(tmplName); - } catch (Exception e) { - String err = i18n.getMessage("JVelocity.constr.tmplError", tmplName); - throw new WsGenException(err, e); - } - } - - /** - * Generate the given file with the given VelocityContext. - * - * @param fs the output file - * @param context VelocityContext - * - * @throws WsGenException when velocity generation fails - */ - public void generate(File fs, VelocityContext context) throws WsGenException { - FileWriter fwriter = null; - - try { - // Create before the parent directory - File fdir = fs.getParentFile(); - - if (fdir != null) { - if (!fdir.exists()) { - if (!fdir.mkdirs()) { - String err = i18n.getMessage("JVelocity.generate.directories", fdir.getPath()); - throw new WsGenException(err); - } - } - } - - fwriter = new FileWriter(fs); - } catch (IOException e) { - String err = i18n.getMessage("JVelocity.generate.file", fs); - throw new WsGenException(err, e); - } - - try { - template.merge(context, fwriter); - } catch (Exception e) { - String err = i18n.getMessage("JVelocity.generate.cannot", fs); - throw new WsGenException(err, e); - } - - try { - fwriter.flush(); - fwriter.close(); - } catch (IOException e) { - // do nothing, just a warn - String err = i18n.getMessage("JVelocity.generate.close", fs); - logger.log(BasicLevel.WARN, err); - } - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/VContextFactory.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/VContextFactory.java deleted file mode 100644 index fb7ad42de5478261f2d5a40b7212e3f9d35e8051..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/VContextFactory.java +++ /dev/null @@ -1,238 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.generator.axis; - -import java.util.Enumeration; -import java.util.Hashtable; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Vector; - -import javax.wsdl.Definition; -import javax.wsdl.Port; -import javax.wsdl.Service; -import javax.xml.namespace.QName; - -import org.ow2.jonas.deployment.common.HandlerDesc; -import org.ow2.jonas.deployment.ws.MappingFile; -import org.ow2.jonas.deployment.ws.PortComponentDesc; -import org.ow2.jonas.deployment.ws.SSBPortComponentDesc; -import org.ow2.jonas.deployment.ws.ServiceDesc; -import org.ow2.jonas.deployment.ws.ServiceRefDesc; - -import org.apache.velocity.VelocityContext; - - - -/** - * This class allows to create the Velocity Context used to build the generated - * sources with the Velocity templates. - * - * @author Xavier Delplanque (Bull) - */ -public class VContextFactory { - - /** - * Provider property name - */ - public static final String PROVIDER = "provider"; - - /** - * JOnAS EJB Provider name - */ - public static final String EJB_PROVIDER = "JOnASEJB"; - - /** - * Default RPC Provider name - */ - public static final String RPC_PROVIDER = "RPC"; - - /** - * Mapping property name - */ - public static final String MAPPINGS = "mappings"; - - /** - * Port Components list property name - */ - public static final String PORT_COMPONENTS = "portComponents"; - - /** - * WSDL directory in Webapp - */ - private static final String WEB_WSDL = "WEB-INF/wsdl/"; - - /** - * WSDL directory in EjbJar/Client - */ - private static final String META_WSDL = "META-INF/wsdl/"; - - /** - * Empty Constructor for Utility class - */ - private VContextFactory() { - } - - /** - * Creates the Velocity Context used to build the generated files with the - * Velocity templates. - * - * @param sd The ServiceDesc Deployment Descriptor - * - * @return a VelocityContext customized with the SD - */ - public static VelocityContext getContext(ServiceDesc sd) { - - VelocityContext vc = new VelocityContext(); - - // Set provider value - String wsdl; - if (sd.getPortComponents().get(0) instanceof SSBPortComponentDesc) { - // EJB Provider - vc.put(PROVIDER, EJB_PROVIDER); - // get wsdl name - wsdl = sd.getWSDL().getName().substring(META_WSDL.length()); - } else { - // JAXRPC Provider - vc.put(PROVIDER, RPC_PROVIDER); - // get wsdl name - wsdl = sd.getWSDL().getName().substring(WEB_WSDL.length()); - } - - // Add all ports - List ports = sd.getPortComponents(); - List portComponents = new Vector(); - for (Iterator it = ports.iterator(); it.hasNext();) { - PortComponentDesc pcd = (PortComponentDesc) it.next(); - portComponents.add(new VcPortComponent(pcd, wsdl)); - } - vc.put(PORT_COMPONENTS, portComponents); - - // add types mappings - List mappings = new Vector(); - MappingFile mf = sd.getMapping(); - for (Iterator m = mf.getXmlTypeMappings(); m.hasNext();) { - QName xml = (QName) m.next(); - String classname = mf.getClassname(xml); - - // if we have an Array, Axis use a different representation - if (classname.endsWith("[]")) { - mappings.add(new VcArrayMapping(xml, classname)); - } else { - mappings.add(new VcBeanMapping(xml, classname)); - } - } - vc.put(MAPPINGS, mappings); - - return vc; - } - - /** - * Creates the Velocity Context used to build the generated files with the - * Velocity templates. - * - * @param sr The ServiceRefDesc Deployment Descriptor - * - * @return a VelocityContext customized with the SR - */ - public static VelocityContext getContext(ServiceRefDesc sr) { - - VelocityContext vc = new VelocityContext(); - - Hashtable pcds = new Hashtable(); - - // for each service-ref handler - List hrs = sr.getHandlerRefs(); - - Vector commonh = new Vector(); - for (Iterator itHr = hrs.iterator(); itHr.hasNext();) { - HandlerDesc hr = (HandlerDesc) itHr.next(); - List pcns = hr.getPortNames(); - - if (pcns.size() != 0) { - // a port name list is defined : add the handler to each - // specified port - for (Iterator itPcn = pcns.iterator(); itPcn.hasNext();) { - String pcn = (String) itPcn.next(); - if (!pcds.containsKey(pcn)) { - pcds.put(pcn, new Vector()); - } - ((Vector) pcds.get(pcn)).add(hr); - } - } else { - // no port name is specified : the handler is added to each - // port - commonh.add(hr); - } - } - - // now, we can create the port component list - Vector portComponents = new Vector(); - - // if there is not port-component-ref - if (pcds.isEmpty()) { - Definition def = sr.getWSDLFile().getDefinition(); - Service s = def.getService(sr.getServiceQName()); - Map ports = s.getPorts(); - // for each wsdl:port - for (Iterator i = ports.values().iterator(); i.hasNext();) { - Port p = (Port) i.next(); - portComponents.add(new VcPortComponent(p.getName(), commonh)); - } - } else { - for (Enumeration enPc = pcds.keys(); enPc.hasMoreElements();) { - String pcn = (String) enPc.nextElement(); - // add common handlers to the list - Vector pchrs = (Vector) pcds.get(pcn); - pchrs.addAll(commonh); - portComponents.add(new VcPortComponent(pcn, pchrs)); - } - } - - vc.put(PORT_COMPONENTS, portComponents); - - // add types mappings - List mappings = new Vector(); - MappingFile mf = sr.getMappingFile(); - if (mf != null) { - for (Iterator m = mf.getXmlTypeMappings(); m.hasNext();) { - QName xml = (QName) m.next(); - String classname = mf.getClassname(xml); - - // if we have an Array, Axis use a different representaion - if (classname.endsWith("[]")) { - mappings.add(new VcArrayMapping(xml, classname)); - } else { - mappings.add(new VcBeanMapping(xml, classname)); - } - } - } - vc.put(MAPPINGS, mappings); - - return vc; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/VcArrayMapping.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/VcArrayMapping.java deleted file mode 100644 index 05d81f3fe7c7f137300e116f9b13bd5bbd077809..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/VcArrayMapping.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Sauthier Guillaume - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.generator.axis; - -import javax.xml.namespace.QName; - -/** - * Member of a VelocityContext. Contains information used to create a - * typeMapping WSDD tag. - * - * @author Guillaume SAUTHIER - */ -public class VcArrayMapping extends VcTypeMapping { - - /** - * Axis Array Serializer Factory - */ - private static final String ARRAY_SERIALIZER_FACTORY = "org.apache.axis.encoding.ser.ArraySerializerFactory"; - - /** - * Axis Array DeSerializer Factory - */ - private static final String ARRAY_DESERIALIZER_FACTORY = "org.apache.axis.encoding.ser.ArrayDeserializerFactory"; - - /** - * Create a VcArrayMapping holding arrayMapping information. - * - * @param xml XML Qname of the Array type - * @param name Java name of the Array type - */ - public VcArrayMapping(QName xml, String name) { - super(xml, name); - } - - /** - * @return Returns the serializer factory for the mapping - */ - public String getSerializerFactory() { - return ARRAY_SERIALIZER_FACTORY; - } - - /** - * @return Returns the deserializer factory for the mapping - */ - public String getDeserializerFactory() { - return ARRAY_DESERIALIZER_FACTORY; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/VcBean.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/VcBean.java deleted file mode 100644 index 96b96cf84f3d155b7e4eb48c21f110c0431c1297..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/VcBean.java +++ /dev/null @@ -1,80 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Xavier Delplanque - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.generator.axis; - -import org.ow2.jonas.deployment.ejb.SessionStatelessDesc; - -/** - * Member of a VelocityContext. Contains information about a bean. - * - * @author Xavier Delplanque - */ -public class VcBean { - - /** - * the bean jndi name - */ - private String jndiName; - - /** - * ServiceEndpoint interface name - */ - private String serviceEndpointInterface; - - /** - * Construct a Holder for Bean informations - * - * @param ssd SessionStatelessDesc descripting the given SessionBean - */ - public VcBean(SessionStatelessDesc ssd) { - - // set jndiName - jndiName = ssd.getJndiServiceEndpointName(); - - // set service endpoint - serviceEndpointInterface = ssd.getServiceEndpointClass().getName(); - - } - - /** - * The bean jndi name - * - * @return The bean jndi name - */ - public String getServiceEndpointJndiName() { - return jndiName; - } - - /** - * the bean service-endpoint interface name - * - * @return the bean service-endpoint interface name - */ - public String getServiceEndpointInterfaceName() { - return serviceEndpointInterface; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/VcBeanMapping.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/VcBeanMapping.java deleted file mode 100644 index 68d5940f8384a5df951137bfa9e4962a238e08c4..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/VcBeanMapping.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Xavier Delplanque - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.generator.axis; - -import javax.xml.namespace.QName; - -/** - * Member of a VelocityContext. Contains information used to create a - * beanMapping WSDD tag. - * - * @author Guillaume SAUTHIER - */ -public class VcBeanMapping extends VcTypeMapping { - - /** - * Axis bean serializer factory - */ - private static final String BEAN_SERIALIZER_FACTORY = "org.apache.axis.encoding.ser.BeanSerializerFactory"; - - /** - * Axis bean deserializer factory - */ - private static final String BEAN_DESERIALIZER_FACTORY = "org.apache.axis.encoding.ser.BeanDeserializerFactory"; - - /** - * Create a VcBeanMapping holding typeMapping information. - * - * @param xml XML Qname of the type - * @param name Java name of the type - */ - public VcBeanMapping(QName xml, String name) { - super(xml, name); - } - - /** - * @return Returns the serializer factory for the mapping - */ - public String getSerializerFactory() { - return BEAN_SERIALIZER_FACTORY; - } - - /** - * @return Returns the deserializer factory for the mapping - */ - public String getDeserializerFactory() { - return BEAN_DESERIALIZER_FACTORY; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/VcHandler.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/VcHandler.java deleted file mode 100644 index 105e900fb2351e1ee8972362397e01c353e4e7ba..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/VcHandler.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Xavier Delplanque - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.generator.axis; - -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Vector; - -import javax.xml.namespace.QName; - -import org.ow2.jonas.deployment.common.HandlerDesc; - - -/** - * Member of a VelocityContext. Contains information about a Handler (Ref/Desc). - * - * @author Xavier Delplanque - */ -public class VcHandler { - - /** handler name (unique) */ - private String name; - - /** handler class name */ - private String className; - - /** handler init parameters */ - private Vector initParameters; - - /** handler SOAP headers */ - private Vector headers; - - /** handler SOAP roles */ - private Vector soapRoles; - - /** - * Create a new VcHandler from a HandlerDesc - * - * @param hr HandlerDesc - */ - public VcHandler(HandlerDesc hr) { - - // set name - name = hr.getName(); - - //set className - className = hr.getHandlerClass().getName(); - - // set initParameters - Map ips = hr.getInitParams(); - initParameters = new Vector(); - for (Iterator itKey = ips.keySet().iterator(); itKey.hasNext();) { - String key = (String) itKey.next(); - String val = (String) ips.get(key); - initParameters.add(new VcInitParam(key, val)); - } - - // set headers - List hs = hr.getSOAPHeaders(); - headers = new Vector(); - for (Iterator itH = hs.iterator(); itH.hasNext();) { - QName qn = (QName) itH.next(); - headers.add(new VcHeader(qn)); - } - - // set soapRoles - soapRoles = new Vector(); - List srs = hr.getSOAPRoles(); - for (Iterator itSr = srs.iterator(); itSr.hasNext();) { - String sr = (String) itSr.next(); - soapRoles.add(sr); - } - } - - /** - * @return Returns the Handler name - */ - public String getName() { - return name; - } - - /** - * @return Returns the handler classname - */ - public String getClassName() { - return className; - } - - /** - * @return Returns the list of handler init param - */ - public Vector getInitParameters() { - return initParameters; - } - - /** - * @return Returns the list of header the given Handler is able to access. - */ - public Vector getHeaders() { - return headers; - } - - /** - * @return Returns the list of SOAP roles the Handler use - */ - public Vector getSoapRoles() { - return soapRoles; - } - -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/VcHeader.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/VcHeader.java deleted file mode 100644 index f43c312b755dddce5b4fa62162b39462a0941190..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/VcHeader.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Xavier Delplanque - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.generator.axis; - -import javax.xml.namespace.QName; - -/** - * Member of a VelocityContext. Contains information about a SOAP Header - * (basically a qName). - * - * @author Xavier Delplanque - */ -public class VcHeader { - - /** LocalPart of the QName */ - private String qname; - - /** NamespaceURI of the QName */ - private String namespace; - - /** - * Construct a VcHeader from a QName. - * - * @param qn the Header QName - */ - public VcHeader(QName qn) { - - // set qname - qname = qn.getLocalPart(); - - // set namespace - namespace = qn.getNamespaceURI(); - } - - /** - * @return Returns the Header localpart - */ - public String getQName() { - return qname; - } - - /** - * @return Returns the Header namespace URI - */ - public String getNamespace() { - return namespace; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/VcInitParam.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/VcInitParam.java deleted file mode 100644 index f7c439d99f5d72f304c20d5d74ccc52cdf3bb54c..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/VcInitParam.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Xavier Delplanque - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.generator.axis; - -/** - * Member of a VelocityContext. Contains information about an InitParameter - * (basically a name/value pair). - * - * @author Xavier Delplanque - */ -public class VcInitParam { - - /** parameter name */ - private String name; - - /** parameter value */ - private String value; - - /** - * Construct a VcInitParam from a couple name/value. - * - * @param name init param name - * @param value init param value - */ - public VcInitParam(String name, String value) { - this.name = name; - this.value = value; - } - - /** - * @return Returns the name. - */ - public String getName() { - return name; - } - - /** - * @return Returns the value. - */ - public String getValue() { - return value; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/VcPortComponent.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/VcPortComponent.java deleted file mode 100644 index 48f1db93d8ab1f9e39415e970b511daff415e60e..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/VcPortComponent.java +++ /dev/null @@ -1,370 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Xavier Delplanque - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.generator.axis; - -import java.lang.reflect.Method; -import java.util.Iterator; -import java.util.List; -import java.util.Vector; - -import javax.wsdl.BindingFault; -import javax.wsdl.BindingOperation; -import javax.wsdl.Definition; -import javax.wsdl.Port; -import javax.wsdl.Service; -import javax.wsdl.extensions.ExtensibilityElement; -import javax.wsdl.extensions.soap.SOAPBinding; -import javax.wsdl.extensions.soap.SOAPBody; -import javax.wsdl.extensions.soap.SOAPFault; -import javax.wsdl.extensions.soap.SOAPOperation; -import javax.xml.namespace.QName; - -import org.ow2.jonas.deployment.common.HandlerDesc; -import org.ow2.jonas.deployment.ejb.SessionStatelessDesc; -import org.ow2.jonas.deployment.ws.PortComponentDesc; -import org.ow2.jonas.deployment.ws.SSBPortComponentDesc; - - - - -/** - * Member of a VelocityContext. Contains information about a - * PortComponent(Desc/Ref). - * @author Xavier Delplanque - */ -public class VcPortComponent { - - /** port component name */ - private String name; - - /** the sib if the endpoint is an ejb */ - private VcBean bean = null; - - /** a string containing sei method names separated by ',' */ - private static final String SEP = ","; - - /** a list of method names */ - private String methods = null; - - /** port component handlers */ - private Vector handlers = new Vector(); - - /** the JAXRPC class name if the sib is a servlet */ - private String jaxRpcClassName; - - /** the wsdl file to display when ?wsdl is used */ - private String wsdlFilename; - - /** - * Document style name - */ - private static final String DOCUMENT_STYLE = "document"; - - /** - * SOAP style - */ - private String style = null; - - /** - * SOAP use - */ - private String use = null; - - /** - * target Namespace - */ - private String namespace = null; - - /** - * SOAP NS URI - */ - public static final String NS_URI_SOAP = "http://schemas.xmlsoap.org/wsdl/soap/"; - - /** - * soap:binding - */ - private static final QName SOAP_BINDING_QNAME = new QName(NS_URI_SOAP, "binding"); - - /** - * soap:operation - */ - private static final QName SOAP_OPERATION_QNAME = new QName(NS_URI_SOAP, "operation"); - - /** - * soap:body - */ - private static final QName SOAP_BODY_QNAME = new QName(NS_URI_SOAP, "body"); - - /** - * soap:fault - */ - private static final QName SOAP_FAULT_QNAME = new QName(NS_URI_SOAP, "fault"); - - /** - * Construct a VcPortComponent from a PortComponentDesc. used for - * server-side configuration files generation. (server-config.wsdd) - * @param pcd PortComponentDesc to be used - * @param wsdl wsdl filename of the port - */ - public VcPortComponent(PortComponentDesc pcd, String wsdl) { - - // set name - name = pcd.getServiceName(); - - wsdlFilename = wsdl; - - // set bean or jaxRpcClassName - if (pcd.hasBeanImpl()) { - // set bean - SessionStatelessDesc ssb = ((SSBPortComponentDesc) pcd).getSessionStatelessDesc(); - bean = new VcBean(ssb); - } else { - jaxRpcClassName = pcd.getSIBClassname(); - } - // set methods - Method[] m = pcd.getServiceEndpointInterface().getMethods(); - for (int i = 0; i < m.length; i++) { - if (methods != null) { - methods += SEP; - } else { - methods = ""; - } - methods += m[i].getName(); - } - - // set style/use/namespace - Definition def = pcd.getServiceDesc().getWSDL().getDefinition(); - boolean portFound = false; - for (Iterator i = def.getServices().keySet().iterator(); i.hasNext() && !portFound;) { - Service s = def.getService((QName) i.next()); - Port p = s.getPort(pcd.getQName().getLocalPart()); - if (p != null) { - // we found the linked port - portFound = true; - - // search style attribute - style = getStyle(p); - - // search use attribute inside port - use = getUse(p); - } - } - namespace = def.getTargetNamespace(); - - // set handlers - List hs = pcd.getHandlers(); - for (Iterator itH = hs.iterator(); itH.hasNext();) { - HandlerDesc hd = (HandlerDesc) itH.next(); - handlers.add(new VcHandler(hd)); - } - - } - - /** - * @param p the wsdl port - * @return Returns the use to use with the port - */ - private static String getUse(Port p) { - String use = null; - - // use is declared inside - // - wsdl:definition/wsdl:binding/wsdl:operation/wsdl:input/soap:body@use - // - wsdl:definition/wsdl:binding/wsdl:operation/wsdl:output/soap:body@use - // - wsdl:definition/wsdl:binding/wsdl:operation/wsdl:fault/soap:fault@use - // take the first one. - List ops = p.getBinding().getBindingOperations(); - for (Iterator j = ops.iterator(); j.hasNext() && (use == null);) { - BindingOperation bop = (BindingOperation) j.next(); - - // search input - List inputExt = bop.getBindingInput().getExtensibilityElements(); - for (Iterator k = inputExt.iterator(); k.hasNext() && (use == null);) { - ExtensibilityElement ext = (ExtensibilityElement) k.next(); - if (ext.getElementType().equals(SOAP_BODY_QNAME)) { - SOAPBody sb = (SOAPBody) ext; - use = sb.getUse(); - } - } - - // search output - List outputExt = bop.getBindingOutput().getExtensibilityElements(); - for (Iterator k = outputExt.iterator(); k.hasNext() && (use == null);) { - ExtensibilityElement ext = (ExtensibilityElement) k.next(); - if (ext.getElementType().equals(SOAP_BODY_QNAME)) { - SOAPBody sb = (SOAPBody) ext; - use = sb.getUse(); - } - } - - // search faults - for (Iterator k = bop.getBindingFaults().keySet().iterator(); k.hasNext() && (use == null);) { - BindingFault bf = bop.getBindingFault((String) k.next()); - - // search soap:fault - List faultExt = bf.getExtensibilityElements(); - for (Iterator i = faultExt.iterator(); i.hasNext() && (use == null);) { - ExtensibilityElement ext = (ExtensibilityElement) i.next(); - if (ext.getElementType().equals(SOAP_FAULT_QNAME)) { - SOAPFault sf = (SOAPFault) ext; - use = sf.getUse(); - } - } - } - } - // use cannot be null as it is required ! - - return use; - } - - /** - * @param p the wsdl port - * @return Returns the style to use with the port - */ - private static String getStyle(Port p) { - String style = null; - - // we need to explore soap:operation and get the first that set a style attribute - List bindingOps = p.getBinding().getBindingOperations(); - for (Iterator i = bindingOps.iterator(); i.hasNext() && (style == null);) { - - BindingOperation bop = (BindingOperation) i.next(); - // browse soap:operation - List extElements = bop.getExtensibilityElements(); - for (Iterator j = extElements.iterator(); j.hasNext();) { - ExtensibilityElement ext = (ExtensibilityElement) j.next(); - if (ext.getElementType().equals(SOAP_OPERATION_QNAME)) { - - // Got a soap:operation element - SOAPOperation sop = (SOAPOperation) ext; - style = sop.getStyle(); - } - } - } - - // browse extensibility elements of port's binding - List soapElements = p.getBinding().getExtensibilityElements(); - for (Iterator i = soapElements.iterator(); i.hasNext() && (style == null);) { - - ExtensibilityElement ext = (ExtensibilityElement) i.next(); - if (ext.getElementType().equals(SOAP_BINDING_QNAME)) { - - // Got a soap:binding element - SOAPBinding soapb = (SOAPBinding) ext; - style = soapb.getStyle(); - } - - } - - if (style == null) { - style = DOCUMENT_STYLE; - } - - return style; - } - - /** - * Construct a VcPortComponent from a PortComponentRef. used for client-side - * configuration files generation. (client-config.wsdd) - * @param name Port Ref name - * @param hrs HandlerRef list - */ - public VcPortComponent(String name, List hrs) { - - // set name - this.name = name; - - // set handlers - for (Iterator itH = hrs.iterator(); itH.hasNext();) { - HandlerDesc hr = (HandlerDesc) itH.next(); - handlers.add(new VcHandler(hr)); - } - - } - - /** - * @return Returns the PortComponent name - */ - public String getName() { - return name; - } - - /** - * @return Returns the VcBean of this PortComponent - */ - public VcBean getBean() { - return bean; - } - - /** - * @return Returns the WSDL filename - */ - public String getWSDLFilename() { - return wsdlFilename; - } - - /** - * @return returns the exposed methods as a comma separated list - */ - public String getMethods() { - return methods; - } - - /** - * @return Returns a list of Handler/HandlerRef - */ - public Vector getHandlers() { - return handlers; - } - - /** - * @return Returns the JaxRpc implementation classname - */ - public String getJaxRpcClassName() { - return jaxRpcClassName; - } - - /** - * @return Returns the style. - */ - public String getStyle() { - return style; - } - - /** - * @return Returns the use. - */ - public String getUse() { - return use; - } - - /** - * @return Returns the namespace. - */ - public String getNamespace() { - return namespace; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/VcTypeMapping.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/VcTypeMapping.java deleted file mode 100644 index a78423433d8d7a5154acdeef197123424d29f120..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/VcTypeMapping.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Sauthier Guillaume - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.generator.axis; - -import javax.xml.namespace.QName; - -/** - * Member of a VelocityContext. Contains information used to create a - * typeMapping WSDD tag. - * - * @author Guillaume SAUTHIER - */ -public abstract class VcTypeMapping { - - /** classname */ - private String classname; - - /** xml type QName */ - private QName xmlType; - - /** - * SOAP Encoding Style - */ - private static final String ENCODING_STYLE = "http://schemas.xmlsoap.org/soap/encoding/"; - - /** - * Create a VcTypeMapping holding typeMapping information. - * - * @param xml XML Qname of the type - * @param name Java name of the type - */ - public VcTypeMapping(QName xml, String name) { - classname = name; - xmlType = xml; - } - - /** - * @return Returns the Java classname - */ - public String getClassname() { - return classname; - } - - /** - * @return Returns the namespace of the QName - */ - public String getNamespaceURI() { - return xmlType.getNamespaceURI(); - } - - /** - * @return Returns the local-part of the QName - */ - public String getLocalPart() { - return xmlType.getLocalPart(); - } - - /** - * @return Returns the serializer factory for the mapping - */ - protected abstract String getSerializerFactory(); - - /** - * @return Returns the deserializer factory for the mapping - */ - protected abstract String getDeserializerFactory(); - - /** - * @return Returns the encoding style for the mapping - */ - protected String getEncodingStyle() { - return ENCODING_STYLE; - } - - /** - * @return Returns a String representation of the typeMapping - */ - public String toString() { - StringBuffer sb = new StringBuffer(); - sb.append(""); - return sb.toString(); - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/wsdl2java/JOnASEmitter.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/wsdl2java/JOnASEmitter.java deleted file mode 100644 index 9887d6ced389cb4703b2d694d04f0c3073ee87a7..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/wsdl2java/JOnASEmitter.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.generator.axis.wsdl2java; - -import org.apache.axis.wsdl.toJava.Emitter; - - -/** - * JOnASEmitter to override Service extends in ServiceLocator Writer. - * - * @author Guillaume Sauthier - */ -public class JOnASEmitter extends Emitter { - - /** - * Constructs new JOnASEmitter. - */ - public JOnASEmitter() { - setFactory(new JOnASGeneratorFactory(this)); - } -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/wsdl2java/JOnASGeneratorFactory.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/wsdl2java/JOnASGeneratorFactory.java deleted file mode 100644 index c44681fb1360e3ba5f8c6781cd3edc1907e018a5..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/wsdl2java/JOnASGeneratorFactory.java +++ /dev/null @@ -1,91 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.generator.axis.wsdl2java; - -import javax.wsdl.Definition; -import javax.wsdl.Service; - -import org.apache.axis.wsdl.gen.Generator; -import org.apache.axis.wsdl.gen.NoopGenerator; -import org.apache.axis.wsdl.symbolTable.ServiceEntry; -import org.apache.axis.wsdl.symbolTable.SymbolTable; -import org.apache.axis.wsdl.toJava.Emitter; -import org.apache.axis.wsdl.toJava.JavaDefinitionWriter; -import org.apache.axis.wsdl.toJava.JavaGeneratorFactory; - -/** - * JOnASGeneratorFactory returns our own JOnASServiceWriter in WSDL2Java process. - * - * @author Guillaume Sauthier - */ -public class JOnASGeneratorFactory extends JavaGeneratorFactory { - - /** - * Constructs a new JOnASGeneratorFactory associated with a given - * JOnASEmitter - * @param emitter the JOnASEmitter - */ - public JOnASGeneratorFactory(Emitter emitter) { - super(emitter); - } - - /** - * Method addDefinitionGenerators - */ - protected void addDefinitionGenerators() { - addGenerator(Definition.class, JavaDefinitionWriter.class); // for - // faults - } // addDefinitionGenerators - - /** - * @param service wsdl:service instance - * @param symbolTable SymbolTable - * @return Returns the JOnASServiceWriter when encoutering Service in - * SymbolTable - */ - public Generator getGenerator(Service service, SymbolTable symbolTable) { - if (include(service.getQName())) { - Generator writer = new JOnASServiceWriter(emitter, service, symbolTable); - ServiceEntry sEntry = symbolTable.getServiceEntry(service.getQName()); - serviceWriters.addStuff(writer, sEntry, symbolTable); - return serviceWriters; - } else { - return new NoopGenerator(); - } - } // getGenerator - - /** - * Method getGenerator - * - * @param type TypeEntry - * @param symbolTable SymbolTable - * @return a NoopGenerator (we don't need Types at this time, should be already generated) - */ - /* - public Generator getGenerator(TypeEntry type, SymbolTable symbolTable) { - return new NoopGenerator(); - } // getGenerator -*/ -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/wsdl2java/JOnASInterfaceServiceImplWriter.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/wsdl2java/JOnASInterfaceServiceImplWriter.java deleted file mode 100644 index 4067ad419fd1254372f7ffd032e1d9539af32aed..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/wsdl2java/JOnASInterfaceServiceImplWriter.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.generator.axis.wsdl2java; - -import org.apache.axis.wsdl.symbolTable.ServiceEntry; -import org.apache.axis.wsdl.symbolTable.SymbolTable; -import org.apache.axis.wsdl.toJava.Emitter; -import org.apache.axis.wsdl.toJava.JavaServiceIfaceWriter; - - -/** - * Used for service interface generation. - * The super class has protected constructor, so redefine it. - * @author Florent Benoit - */ -public class JOnASInterfaceServiceImplWriter extends JavaServiceIfaceWriter { - - /** - * Constructor. - * @param emitter JOnASEmitter - * @param sEntry ServiceEntry - * @param symbolTable SymbolTable - */ - public JOnASInterfaceServiceImplWriter(Emitter emitter, ServiceEntry sEntry, SymbolTable symbolTable) { - super(emitter, sEntry, symbolTable); - } - - -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/wsdl2java/JOnASServiceImplWriter.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/wsdl2java/JOnASServiceImplWriter.java deleted file mode 100644 index 91f62a8ff71b9c398d0b72f57f2490c734aa2ce0..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/wsdl2java/JOnASServiceImplWriter.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.generator.axis.wsdl2java; - -import org.apache.axis.wsdl.symbolTable.ServiceEntry; -import org.apache.axis.wsdl.symbolTable.SymbolTable; -import org.apache.axis.wsdl.toJava.Emitter; -import org.apache.axis.wsdl.toJava.JavaServiceImplWriter; - - -/** - * ServiceImplWriter that substitues Axis' Service implementation with our own. - * - * @author Guillaume Sauthier - */ -public class JOnASServiceImplWriter extends JavaServiceImplWriter { - - /** - * Constructor. - * - * @param emitter JOnASEmitter - * @param sEntry ServiceEntry - * @param symbolTable SymbolTable - */ - public JOnASServiceImplWriter(Emitter emitter, ServiceEntry sEntry, SymbolTable symbolTable) { - super(emitter, sEntry, symbolTable); - } - - /** - * @return Returns "extends org.ow2.jonas.ws.axis.JService ". - */ - protected String getExtendsText() { - return "extends org.ow2.jonas.ws.axis.JService "; - //return "extends org.apache.axis.client.Service "; - } // getExtendsText - - -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/wsdl2java/JOnASServiceWriter.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/wsdl2java/JOnASServiceWriter.java deleted file mode 100644 index 542bc1cfaf98898727de9618eba82baee6d23d9d..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/wsdl2java/JOnASServiceWriter.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.generator.axis.wsdl2java; - -import javax.wsdl.Service; - -import org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.emitter.JOnASWSEmitter; - -import org.apache.axis.wsdl.symbolTable.ServiceEntry; -import org.apache.axis.wsdl.symbolTable.SymbolTable; -import org.apache.axis.wsdl.toJava.Emitter; -import org.apache.axis.wsdl.toJava.JavaServiceWriter; - - -/** - * This is JOnASWsdl2java's Service Writer. It writes the following files, as - * appropriate: .java, Locator.java. - */ -public class JOnASServiceWriter extends JavaServiceWriter { - - /** - * Constructor. - * @param emitter JOnASEmitter - * @param service Service - * @param symbolTable SymbolTable - */ - public JOnASServiceWriter(Emitter emitter, Service service, SymbolTable symbolTable) { - super(emitter, service, symbolTable); - ServiceEntry sEntry = symbolTable.getServiceEntry(service.getQName()); - - if (sEntry.isReferenced()) { - serviceIfaceWriter = null; - // Write service interface if : - // - class is not available - // - emitter is not a J2eeEmitter (for backward compliance) - if (emitter instanceof JOnASWSEmitter) { - ClassLoader cl = ((JOnASWSEmitter) emitter).getClassLoader(); - String className = sEntry.getName(); - try { - cl.loadClass(className); - } catch (ClassNotFoundException cnfe) { - // class not available, generate it - serviceIfaceWriter = new JOnASInterfaceServiceImplWriter(emitter, sEntry, symbolTable); - } - } - - // overwrite Axis Writer - serviceImplWriter = new JOnASServiceImplWriter(emitter, sEntry, symbolTable); - } - } // ctor - -} // class JOnASServiceWriter diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/wsdl2java/JOnASWSDL2Java.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/wsdl2java/JOnASWSDL2Java.java deleted file mode 100644 index 49003d2c7d5f28cb03afaf176ea587f91cd0e3be..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/axis/wsdl2java/JOnASWSDL2Java.java +++ /dev/null @@ -1,165 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.generator.axis.wsdl2java; - -import java.io.File; -import java.io.IOException; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -import javax.wsdl.WSDLException; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.ow2.jonas.generators.wsgen.WsGenException; -import org.ow2.jonas.generators.wsgen.generator.axis.AxisWsClientGenerator; -import org.w3c.dom.Document; -import org.xml.sax.SAXException; - -import org.apache.axis.wsdl.WSDL2Java; -import org.apache.axis.wsdl.gen.Parser; - - -/** - * Programmatic interface to the WSDL2Java Axis tool. - * @author Guillaume Sauthier - */ -public class JOnASWSDL2Java extends WSDL2Java { - - /** - * Field emitter - */ - private JOnASEmitter jEmitter; - - /** - * WSDL Localtion URL - */ - private String wsdlURL = null; - - /** - * Parsed WSDL Document - */ - private Document wsdlDoc = null; - - /** - * JOnASWSDL2Java Constructor. - */ - public JOnASWSDL2Java() { - super(); - // just cast it once - jEmitter = (JOnASEmitter) getParser(); - } - - /** - * @return Returns an extension of the Parser - */ - protected Parser createParser() { - return new JOnASEmitter(); - } // createParser - - /** - * Setup the JOnASWSDL2Java generator. - * @param wsc WsClientGenerator from wich the configuration will be read. - * @throws WsGenException Cannot parse WSDL Document - */ - private void setup(AxisWsClientGenerator wsc) throws WsGenException { - setupEmitter(wsc); - setupWSDL(wsc); - } - - /** - * Setup the WSDL Document before giving it to the Emitter. - * @param wsc configuration - * @throws WsGenException Cannot load WSDL - */ - private void setupWSDL(AxisWsClientGenerator wsc) throws WsGenException { - try { - if (wsc.getArchive().isPacked()) { - // URL Loading - String jarpath = wsc.getArchive().getRootFile().getCanonicalFile().toURL().toExternalForm(); - wsdlURL = "jar:" + jarpath + "!/" + wsc.getRef().getWsdlFileName(); - } else { - // File Loading - wsdlURL = new File(wsc.getArchive().getRootFile(), wsc.getRef().getWsdlFileName()).toURL() - .toExternalForm(); - } - - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - factory.setNamespaceAware(true); - DocumentBuilder builder = factory.newDocumentBuilder(); - wsdlDoc = builder.parse(wsdlURL); - } catch (ParserConfigurationException pce) { - throw new WsGenException("", pce); - } catch (IOException ioe) { - throw new WsGenException("", ioe); - } catch (SAXException se) { - throw new WsGenException("", se); - } - } - - /** - * Setup the JOnASEmitter instance. - * @param wsc configuration - */ - private void setupEmitter(AxisWsClientGenerator wsc) { - jEmitter.setDebug(wsc.getConfig().isDebug()); - jEmitter.setVerbose(wsc.getConfig().isVerbose()); - jEmitter.setNamespaceMap(convert2HashMap(wsc.getRef().getMappingFile().getMappings())); - jEmitter.setOutputDir(wsc.getSources().getPath()); - } - - /** - * Converts Hashtable to HashMap. - * @param m Hashtable to be converted - * @return HashMap converted - */ - private HashMap convert2HashMap(Map m) { - HashMap ns2pkg = new HashMap(); - for (Iterator i = m.keySet().iterator(); i.hasNext();) { - String ns = (String) i.next(); - ns2pkg.put(ns, m.get(ns)); - } - return ns2pkg; - } - - /** - * Setup and runs the JOnASEmitter. - * - * @param wsc Configuration. - * - * @throws WsGenException When WSDL has not been properly parsed - * @throws SAXException Cannot parse WSDL document - * @throws WSDLException When WSDL is incorrect - * @throws ParserConfigurationException Cannot Configure Parser - * @throws IOException Import URL cannot be loaded - */ - public void run(AxisWsClientGenerator wsc) throws WsGenException, IOException, SAXException, WSDLException, ParserConfigurationException { - setup(wsc); - parser.run(wsdlURL, wsdlDoc); - } // run - -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/EWSGeneratorFactory.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/EWSGeneratorFactory.java deleted file mode 100644 index 7fa10f88fe1cc2891ab095e924127c152896c3d8..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/EWSGeneratorFactory.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.generator.ews; - -import org.ow2.jonas.deployment.ws.ServiceDesc; -import org.ow2.jonas.deployment.ws.ServiceRefDesc; -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.archive.Archive; -import org.ow2.jonas.generators.wsgen.ddmodifier.WebServicesDDModifier; -import org.ow2.jonas.generators.wsgen.ddmodifier.WsClientDDModifier; -import org.ow2.jonas.generators.wsgen.ddmodifier.WsEndpointDDModifier; -import org.ow2.jonas.generators.wsgen.generator.GeneratorFactory; -import org.ow2.jonas.generators.wsgen.generator.WsClientGenerator; -import org.ow2.jonas.generators.wsgen.generator.WsEndpointGenerator; - - - - -/** - * GeneratorFactory impl for EWS. - * - * @author Guillaume Sauthier - */ -public class EWSGeneratorFactory extends GeneratorFactory { - /** - * Return a new WsClientGenerator for the specific generation mecanism. - * - * @param serviceRef the service-ref containing information for client side - * generation process. - * @param ddm the XML modifier. - * @param archive the Archive to be modified - * - * @return a new WsClientGenerator. - * - * @throws GenBaseException When creation fails. - */ - public WsClientGenerator newGenerator(ServiceRefDesc serviceRef, - WsClientDDModifier ddm, Archive archive) throws GenBaseException { - return new EWSWsClientGenerator(getConfiguration(), serviceRef, ddm, archive); - } - - /** - * Return a new WsEndpointGenerator for the specific generation mecanism. - * - * @param serviceDesc the webservice-description containing information for - * server side generation process. - * @param ddm the XML modifier. - * @param wsddm webservices.xml DD modifier - * @param arch base archive - * - * @return a new WsEndpointGenerator. - * - * @throws GenBaseException When creation fails. - */ - public WsEndpointGenerator newGenerator(ServiceDesc serviceDesc, - WsEndpointDDModifier ddm, WebServicesDDModifier wsddm, Archive arch) throws GenBaseException { - return new EWSWsEndpointGenerator(getConfiguration(), serviceDesc, ddm, wsddm, arch); - } -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/EWSWsClientGenerator.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/EWSWsClientGenerator.java deleted file mode 100644 index 15b4480baf351aaa903b71065ff54957f80d7847..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/EWSWsClientGenerator.java +++ /dev/null @@ -1,311 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 2004-2005 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.generator.ews; - -import java.io.File; -import java.util.Iterator; -import java.util.List; - -import org.ow2.jonas.deployment.common.HandlerDesc; -import org.ow2.jonas.deployment.ws.ServiceRefDesc; -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.archive.Archive; -import org.ow2.jonas.generators.genbase.archive.Client; -import org.ow2.jonas.generators.genbase.archive.EjbJar; -import org.ow2.jonas.generators.genbase.archive.J2EEArchive; -import org.ow2.jonas.generators.genbase.archive.WebApp; -import org.ow2.jonas.generators.genbase.generator.Config; -import org.ow2.jonas.generators.genbase.utils.XMLUtils; -import org.ow2.jonas.generators.wsgen.WsGenException; -import org.ow2.jonas.generators.wsgen.ddmodifier.WsClientDDModifier; -import org.ow2.jonas.generators.wsgen.generator.WsClientGenerator; -import org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.JOnASJ2EEWebServicesContext; -import org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.ServiceReferenceContextImpl; -import org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.emitter.FullEmitter; -import org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.factory.JOnASClientGeneratorFactory; -import org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.wscf.JOnASWSCFHandler; -import org.ow2.jonas.lib.loader.AbsModuleClassLoader; -import org.ow2.jonas.lib.util.I18n; -import org.ow2.jonas.lib.util.Log; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import org.apache.axis.constants.Scope; -import org.apache.axis.wsdl.toJava.GeneratedFileInfo; -import org.apache.ws.ews.context.webservices.client.ServiceReferenceContext; - - - - -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; - -/** - * Generate WebServices client files dedicated to axis.
    • - * client-config.wsdd : if needed
    • java sources : from WSDL
    • - *
    - * @author Guillaume sauthier - */ -public class EWSWsClientGenerator extends WsClientGenerator { - - /** - * logger - */ - private static Logger logger = Log.getLogger(Log.JONAS_WSGEN_EWS_PREFIX); - - /** - * jonas-init-param name for client configuration file declaration - */ - private static final String CLIENT_CONFIG = "axis.clientConfigFile"; - - /** generated config file */ - private File generated = null; - - /** - * WEB-INF/ prefix - */ - private static final String WEB_PREFIX = "WEB-INF/"; - - /** - * I18n - */ - private static I18n i18n = I18n.getInstance(EWSWsClientGenerator.class); - - /** - * Creates a new AxisWsClientGenerator - * @param config Generator Configuration - * @param srd WebService Endpoint description - * @param ddm Web DD Modifier - * @param archive client archive containing WSDL - * @throws GenBaseException When instanciation fails - */ - public EWSWsClientGenerator(Config config, ServiceRefDesc srd, WsClientDDModifier ddm, Archive archive) - throws GenBaseException { - super(config, srd, ddm, archive); - } - - /** - * generate axis specific files - * @throws WsGenException if WSDL cannot be found in archive - */ - public void generate() throws WsGenException { - - // the source generation is possible only when a - // WSDL Definition is provided - // we need : - // - a: wsdl-file - // - b: jaxrpc-mapping-file - // - c: service-interface != javax.xml.rpc.Service - // - d: some port-component-ref - // = ((a && b) && (c || d)) - - boolean hasWSDL = getRef().getWsdlFileName() != null; - - if (hasWSDL) { - // classpath creation - J2EEArchive j2eeArchive = (J2EEArchive) getArchive(); - AbsModuleClassLoader cl = (AbsModuleClassLoader) j2eeArchive.getModuleClassloader(); - getConfig().setClasspath(getConfig().getClasspath() + cl.getClasspath()); - - try { - // WSDL + mapping file - FullEmitter wsEmitter = new FullEmitter(); - wsEmitter.setMappingFileInputStream(getRef().getMappingFileURL().openStream()); - JOnASClientGeneratorFactory factory = new JOnASClientGeneratorFactory(); - factory.setEmitter(wsEmitter); - - wsEmitter.setTypeMappingVersion("1.3"); - wsEmitter.setScope(Scope.REQUEST); - wsEmitter.setWrapArrays(true); - - // Classloader to use to check if classes are present before - // generating java classes - wsEmitter.setClassLoader(cl); - - wsEmitter.setFactory(factory); - //wsEmitter.setNowrap(true); - - wsEmitter.setJOnASWsContext(prepareJ2EEWebServicesContext(getRef())); - - wsEmitter.setOutputDir(this.getSources().getCanonicalPath()); - wsEmitter.setAllowInvalidURL(true); - - wsEmitter.run(getRef().getLocalWSDLURL().toExternalForm()); - - generated = new File(findClientConfigFile(wsEmitter.getGeneratedFileInfo())); - - getLogger().log(BasicLevel.INFO, "Web Services Classes successfully generated by EWS."); - getLogger().log(BasicLevel.INFO, - "Webservice client WSDD file '" + generated + "' sucessfully generated by EWS."); - } catch (Exception e) { - String err = getI18n().getMessage("EWSWsClientGenerator.generate.WSDL2Java", e.getMessage()); - logger.log(BasicLevel.ERROR, err, e); - throw new WsGenException(err, e); - } - - } - - } - - /** - * @param generatedFileInfo files generated by Axis - * @return Returns the first filename that matches "deploy-client-*.wsdd" - */ - private static String findClientConfigFile(GeneratedFileInfo generatedFileInfo) { - List generated = generatedFileInfo.getFileNames(); - boolean found = false; - String filename = null; - for (Iterator i = generated.iterator(); i.hasNext() && !found;) { - String entry = (String) i.next(); - // */deploy-client-*.wsdd - if (entry.matches(".*deploy-client-\\d+\\.wsdd$")) { - found = true; - filename = entry; - } - } - return filename; - } - - /** - * @param ref the ServiceRefDesc to be used in J2EE WS Context - * @return Returns a configured J2EEWebServiceContext - */ - private JOnASJ2EEWebServicesContext prepareJ2EEWebServicesContext(ServiceRefDesc ref) { - - JOnASJ2EEWebServicesContext wsCtx = new JOnASJ2EEWebServicesContext(); - ServiceReferenceContext sRefCtx = new ServiceReferenceContextImpl(); - sRefCtx.setServiceQName(ref.getServiceQName()); - - for (Iterator i = ref.getHandlerRefs().iterator(); i.hasNext();) { - HandlerDesc handler = (HandlerDesc) i.next(); - sRefCtx.addHandler(new JOnASWSCFHandler(handler)); - } - wsCtx.addServiceReferenceContext(sRefCtx); - return wsCtx; - } - - /** - * Add generated files in given archive - * @param archive archive where generated fils will be added. - * @throws WsGenException when files cannot be added - */ - public void addFiles(Archive archive) throws WsGenException { - if (archive instanceof WebApp) { - WebApp web = (WebApp) archive; - archive.addDirectoryIn("WEB-INF/classes/", getClasses()); - archive.addDirectoryIn("WEB-INF/sources/", getSources()); - - if (generated != null) { - archive.addFileIn("WEB-INF/", generated); - - // ensure the optionnal descriptor exists - if (!getModifier().hasJonasServiceRef()) { - boolean jwaFileExists = getArchive().getContainedFiles().contains("WEB-INF/jonas-web.xml"); - boolean jwaDocumentExists = web.getDescriptors().containsKey("WEB-INF/jonas-web.xml"); - if (!(jwaFileExists || jwaDocumentExists)) { - // jonas-web.xml doesn't exists - createEmptyJonasWeb((J2EEArchive) archive); - } - Element jsr = getModifier().createJonasServiceRef(getRef().getServiceRefName()); - // update - getModifier().setElement(jsr); - - } - - // add init param - getModifier().addJonasInitParam(CLIENT_CONFIG, WEB_PREFIX + generated.getName()); - } - } else if (archive instanceof EjbJar) { - archive.addDirectory(getClasses()); - - if (generated != null) { - archive.addFileIn("META-INF/", generated); - - // ensure the optionnal descriptor exists - if (!getModifier().hasJonasServiceRef()) { - Element jsr = getModifier().createJonasServiceRef(getRef().getServiceRefName()); - // update - getModifier().setElement(jsr); - } - - // add init param - getModifier().addJonasInitParam(CLIENT_CONFIG, "META-INF/" + generated.getName()); - } - } else { - // We have a Client archive - Client client = (Client) archive; - archive.addDirectory(getClasses()); - - if (generated != null) { - archive.addFileIn("META-INF/", generated); - - // ensure the optionnal descriptor exists - if (!getModifier().hasJonasServiceRef()) { - boolean jcFileExists = getArchive().getContainedFiles().contains("META-INF/jonas-client.xml"); - boolean jcDocumentExists = client.getDescriptors().containsKey("META-INF/jonas-client.xml"); - if (!(jcFileExists || jcDocumentExists)) { - // jonas-client.xml doesn't exists - createEmptyJonasClient((J2EEArchive) archive); - } - Element jsr = getModifier().createJonasServiceRef(getRef().getServiceRefName()); - // update - getModifier().setElement(jsr); - - } - - // add init param - getModifier().addJonasInitParam(CLIENT_CONFIG, "META-INF/" + generated.getName()); - } - } - } - - /** - * Add an empty jonas-web.xml in given J2EEArchive. - * @param archive archive to be updated - */ - private void createEmptyJonasWeb(J2EEArchive archive) { - Document doc = XMLUtils.newJonasWeb(); - archive.getDescriptors().put("WEB-INF/jonas-web.xml", doc); - getModifier().setDocument(doc); - } - - /** - * Add an empty jonas-client.xml in given J2EEArchive. - * @param archive archive to be updated - */ - private void createEmptyJonasClient(J2EEArchive archive) { - Document doc = XMLUtils.newJonasClient(); - archive.getDescriptors().put("META-INF/jonas-client.xml", doc); - getModifier().setDocument(doc); - } - - /** - * @return Returns the i18n. - */ - public static I18n getI18n() { - return i18n; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/EWSWsEndpointGenerator.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/EWSWsEndpointGenerator.java deleted file mode 100644 index b89229700e2fdddde219dcfafbd05509525d2156..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/EWSWsEndpointGenerator.java +++ /dev/null @@ -1,251 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.generator.ews; - -import java.io.File; -import java.util.Iterator; -import java.util.List; - -import org.ow2.jonas.deployment.ws.JaxRpcPortComponentDesc; -import org.ow2.jonas.deployment.ws.PortComponentDesc; -import org.ow2.jonas.deployment.ws.ServiceDesc; -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.archive.Archive; -import org.ow2.jonas.generators.genbase.archive.J2EEArchive; -import org.ow2.jonas.generators.genbase.archive.WebApp; -import org.ow2.jonas.generators.genbase.generator.Config; -import org.ow2.jonas.generators.wsgen.WsGenException; -import org.ow2.jonas.generators.wsgen.ddmodifier.WebServicesDDModifier; -import org.ow2.jonas.generators.wsgen.ddmodifier.WsEndpointDDModifier; -import org.ow2.jonas.generators.wsgen.generator.WsEndpointGenerator; -import org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.JOnASJ2EEWebServicesContext; -import org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.emitter.FullEmitter; -import org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.factory.JOnASEndpointGeneratorFactory; -import org.ow2.jonas.lib.loader.AbsModuleClassLoader; -import org.ow2.jonas.lib.util.I18n; -import org.ow2.jonas.lib.util.Log; -import org.w3c.dom.NodeList; - -import org.apache.axis.constants.Scope; -import org.apache.axis.wsdl.toJava.GeneratedFileInfo; -import org.apache.ws.ews.mapper.J2eeGeneratorFactory; -import org.apache.ws.ews.mapper.context.JAXRPCMapperContext; - - - - -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; - -/** - * Generate Axis specific config files for Endpoint - * @author Guillaume Sauthier - */ -public class EWSWsEndpointGenerator extends WsEndpointGenerator { - - /** - * logger - */ - private static Logger logger = Log.getLogger(Log.JONAS_WSGEN_EWS_PREFIX); - - /** - * Axis Servlet classname - */ - private static final String AXIS_SERVLET_CLASS = "org.ow2.jonas.ws.axis.JAxisServlet"; - - /** - * init-param name for declaring server configuration file - */ - private static final String SERVER_CONFIG = "axis.serverConfigFile"; - - /** - * generated server-config file - */ - private File generatedServerConfig; - - /** - * I18n - */ - private static I18n i18n = I18n.getInstance(EWSWsClientGenerator.class); - - /** - * Creates a new AxisWsEndpointGenerator - * @param config Generator Configuration - * @param serviceDesc WebService Endpoint description - * @param ddm Web DD Modifier - * @param wsddm webservices.xml DD modifier - * @param arch base archive - * @throws GenBaseException When instanciation fails - */ - public EWSWsEndpointGenerator(Config config, ServiceDesc serviceDesc, WsEndpointDDModifier ddm, - WebServicesDDModifier wsddm, Archive arch) throws GenBaseException { - super(config, serviceDesc, ddm, wsddm, arch); - } - - /** - * Generate server side configuration file - * @throws WsGenException When generation fails - */ - public void generate() throws WsGenException { - - // 1. Generation of wsdd server file - String filename = null; - try { - FullEmitter emitter = new FullEmitter(); - - emitter.setWscontext(prepareJ2EEWebServicesContext(getService())); - emitter.setMappingFileInputStream(getService().getMappingFileURL().openStream()); - emitter.setOutputDir(this.getSources().getCanonicalPath()); - J2eeGeneratorFactory factory = new JOnASEndpointGeneratorFactory(); - factory.setEmitter(emitter); - emitter.setFactory(factory); - emitter.setTypeMappingVersion("1.3"); - emitter.setScope(Scope.REQUEST); - emitter.setWrapArrays(true); - - emitter.setServerSide(true); - emitter.run(getService().getLocalWSDLURL().toExternalForm()); - - generatedServerConfig = new File(findServerConfigFile(emitter.getGeneratedFileInfo())); - filename = generatedServerConfig.getName(); - getLogger().log(BasicLevel.INFO, - "Webservice endpoint WSDD file '" + filename + "' sucessfully generated by EWS."); - } catch (Exception e) { - String err = i18n.getMessage("EWSWsEndpointGenerator.generate.WSDL2Java", getService().getName(), e - .getMessage()); - logger.log(BasicLevel.ERROR, err, e); - throw new WsGenException(err, e); - } - - // 2. classpath creation - J2EEArchive j2eeArchive = (J2EEArchive) getArchive(); - AbsModuleClassLoader cl = (AbsModuleClassLoader) j2eeArchive.getModuleClassloader(); - getConfig().setClasspath(getConfig().getClasspath() + cl.getClasspath()); - - // 3. Remove existing servlets - // * remove the servlet used by the port (store security informations) - // * remove the associated servlet-mapping (store old url-pattern value) - for (Iterator i = getService().getPortComponents().iterator(); i.hasNext();) { - PortComponentDesc desc = (PortComponentDesc) i.next(); - - String urlPatternOld = null; - NodeList securityRoleRefs = null; - - // port-component linked to a servlet : - if (desc.hasJaxRpcImpl()) { - JaxRpcPortComponentDesc jax = (JaxRpcPortComponentDesc) desc; - - if (logger.isLoggable(BasicLevel.DEBUG)) { - logger.log(BasicLevel.DEBUG, "Removing servlet '" + jax.getSibLink() + "'"); - } - - // remove servlet mapping - urlPatternOld = getModifier().removeServletMapping(jax.getSibLink()); - - // remove old servlet but pick up its security role refs - //getModifier().removeServlet(jax.getSibLink()); - securityRoleRefs = getModifier().removeServletWithSecurity(jax.getSibLink()); - } - - // in all case : - // create a servlet with all needed configuration - // and use our own - getModifier().addServlet(desc.getSibLink(), AXIS_SERVLET_CLASS); - getModifier().addServletParam(desc.getSibLink(), SERVER_CONFIG, filename); - getModifier().addServletParam(desc.getSibLink(), "axis.development.system", "true"); - - String mapping = null; - if (desc.getEndpointURI() != null) { - // simple style - mapping = desc.getEndpointURI(); - } else { - // old style - mapping = "/" + desc.getName() + "/*"; - } - getModifier().addServletMapping(desc.getSibLink(), mapping); - - if (desc.hasJaxRpcImpl()) { - // add the first element in the servletToSecurityRoleRefs map - // (currently consider that only one servlet with security - // constraints was removed !! - if there were more, keep the - // constraints of the last removed) - if (securityRoleRefs != null) { - getModifier().addServletSecurityRoleRefs(desc.getSibLink(), securityRoleRefs); - } - // update url-pattern - getModifier().updateSecurityConstraint(urlPatternOld, mapping); - } - } - } - - /** - * @param generatedFileInfo files generated by Axis - * @return Returns the first filename that matches "deploy-server-*.wsdd" - */ - private static String findServerConfigFile(GeneratedFileInfo generatedFileInfo) { - List generated = generatedFileInfo.getFileNames(); - boolean found = false; - String filename = null; - for (Iterator i = generated.iterator(); i.hasNext() && !found;) { - String entry = (String) i.next(); - // */deploy-server-*.wsdd - if (entry.matches(".*deploy-server-\\d+\\.wsdd$")) { - found = true; - filename = entry; - } - } - return filename; - } - - /** - * @param service the ServiceDesc to be used in J2EE WS Context - * @return Returns a configured J2EEWebServiceContext - */ - private JAXRPCMapperContext prepareJ2EEWebServicesContext(ServiceDesc service) { - JOnASJ2EEWebServicesContext ctx = new JOnASJ2EEWebServicesContext(); - ctx.setServiceDesc(service); - return ctx; - } - - /** - * Add generated files in given Archive - * @param archive WebApp archive - * @throws WsGenException When cannot add files in archive - */ - public void addFiles(Archive archive) throws WsGenException { - // archive must be a WebApp - if (!(archive instanceof WebApp)) { - String err = getI18n().getMessage("AxisWsEndpointGenerator.addFiles.illegal", archive.getRootFile()); - throw new IllegalArgumentException(err); - } - - WebApp web = (WebApp) archive; - web.addFileIn("WEB-INF/", generatedServerConfig); - - web.addDirectoryIn("WEB-INF/classes/", getClasses()); - web.addDirectoryIn("WEB-INF/sources/", getSources()); - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/JOnASJ2EEWebServicesContext.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/JOnASJ2EEWebServicesContext.java deleted file mode 100644 index 44a21bd77deb1eae4d81f03609bde0d246dc61a7..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/JOnASJ2EEWebServicesContext.java +++ /dev/null @@ -1,158 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee; - -import java.util.List; -import java.util.Vector; - -import javax.ejb.EJBContext; - -import org.ow2.jonas.deployment.ws.ServiceDesc; - -import org.apache.ws.ews.context.webservices.client.ServiceReferenceContext; -import org.apache.ws.ews.context.webservices.server.WSCFContext; -import org.apache.ws.ews.mapper.context.JAXRPCMapperContext; - - - -/** - * JOnAS implementation of the J2EEWebServiceContext from EWS - * @author Guillaume Sauthier - */ -public class JOnASJ2EEWebServicesContext implements JAXRPCMapperContext { - - /** - * list of service-ref (for client) - */ - private List srCtx; - - /** - * service description (for endpoint) - */ - private ServiceDesc serviceDesc = null; - - /** - * Default constructor - */ - public JOnASJ2EEWebServicesContext() { - super(); - this.srCtx = new Vector(); - } - - /** - * @deprecated not used by JOnAS Implementation - * @inheritDoc - * @see org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext#getWSCFContext() - */ - public WSCFContext getWSCFContext() { - return null; - } - - /** - * @deprecated not used by JOnAS Implementation - * @inheritDoc - * @see org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext#setWSCFContext(org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFContext) - */ - public void setWSCFContext(WSCFContext wscfcontext) { - } - - /** - * @deprecated not used by JOnAS Implementation - * @inheritDoc - * @see org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext#getJAXRPCMappingContext() - */ - public JAXRPCMapperContext getJAXRPCMappingContext() { - return null; - } - - /** - * @deprecated not used by JOnAS Implementation - * @inheritDoc - * @see org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext#setJAXRPCMappingContext(org.apache.geronimo.ews.ws4j2ee.context.JaxRpcMapperContext) - */ - public void setJAXRPCMappingContext(JAXRPCMapperContext context) { - } - - /** - * @deprecated not used by JOnAS Implementation - * @inheritDoc - * @see org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext#validate() - */ - public void validate() { - } - - /** - * @return Returns the serviceDesc. - */ - public ServiceDesc getServiceDesc() { - return serviceDesc; - } - - /** - * @param serviceDesc The serviceDesc to set. - */ - public void setServiceDesc(ServiceDesc serviceDesc) { - this.serviceDesc = serviceDesc; - } - - /** - * @deprecated not used by JOnAS Implementation - * @inheritDoc - * @see org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext#getEJBDDContext() - */ - public EJBContext getEJBDDContext() { - return null; - } - - /** - * @deprecated not used by JOnAS Implementation - * @inheritDoc - * @see org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext#setEJBDDContext(org.apache.geronimo.ews.ws4j2ee.context.j2eeDD.EJBContext) - */ - public void setEJBDDContext(EJBContext context) { - } - - /** - * @see org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext#getServiceReferanceContext(int) - */ - public ServiceReferenceContext getServiceReferenceContext(int index) { - return (ServiceReferenceContext) srCtx.get(index); - } - - /** - * @see org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext#addServiceReferanceContext(org.apache.geronimo.ews.ws4j2ee.context.webservices.client.interfaces.ServiceReferanceContext) - */ - public void addServiceReferenceContext(ServiceReferenceContext context) { - srCtx.add(context); - } - - /** - * @see org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext#getServiceReferanceContextCount() - */ - public int getServiceReferenceContextCount() { - return srCtx.size(); - } - -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/ServiceReferenceContextImpl.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/ServiceReferenceContextImpl.java deleted file mode 100644 index 2d4a33b6987d562aac323a916b9aefcd3ca6f3fe..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/ServiceReferenceContextImpl.java +++ /dev/null @@ -1,158 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee; - -import java.util.ArrayList; -import java.util.List; - -import javax.xml.namespace.QName; - -import org.apache.ws.ews.context.webservices.client.ServiceReferenceContext; -import org.apache.ws.ews.context.webservices.server.WSCFHandler; - -/** - * Implementation of EWS ServiceReferenceContext for JOnAS. - * - * @author Guillaume Sauthier - */ -public class ServiceReferenceContextImpl implements ServiceReferenceContext { - - /** - * The service [to be used] QName - */ - private QName serviceQName = null; - - /** - * handlers to be applied for this service-ref - */ - private List handlers = null; - - /** - * Default constructor - */ - public ServiceReferenceContextImpl() { - super(); - handlers = new ArrayList(); - } - - /** - * @deprecated not used by JOnAS - * @see org.apache.ws.ews.context.webservices.client.ServiceReferenceContext#setServiceInterface(java.lang.String) - */ - public void setServiceInterface(String arg0) { - - } - - /** - * @deprecated not used by JOnAS - * @see org.apache.ws.ews.context.webservices.client.ServiceReferenceContext#getServiceInterface() - */ - public String getServiceInterface() { - return null; - } - - /** - * @deprecated not used by JOnAS - * @see org.apache.ws.ews.context.webservices.client.ServiceReferenceContext#getWsdlFile() - */ - public String getWsdlFile() { - return null; - } - - /** - * @deprecated not used by JOnAS - * @see org.apache.ws.ews.context.webservices.client.ServiceReferenceContext#setWsdlFile(java.lang.String) - */ - public void setWsdlFile(String arg0) { - - } - - /** - * Set the QName of the service to be used - * @see org.apache.ws.ews.context.webservices.client.ServiceReferenceContext#setServiceQName(javax.xml.namespace.QName) - */ - public void setServiceQName(QName serviceQName) { - this.serviceQName = serviceQName; - } - - /** - * Returns the QName of the service to be used - * @see org.apache.ws.ews.context.webservices.client.ServiceReferenceContext#getServiceQName() - */ - public QName getServiceQName() { - return this.serviceQName; - } - - /** - * @deprecated not used by JOnAS - * @see org.apache.ws.ews.context.webservices.client.ServiceReferenceContext#getJaxrpcMappingFile() - */ - public String getJaxrpcMappingFile() { - return null; - } - - /** - * @deprecated not used by JOnAS - * @see org.apache.ws.ews.context.webservices.client.ServiceReferenceContext#setJaxrpcMappingFile(java.lang.String) - */ - public void setJaxrpcMappingFile(String arg0) { - - } - - /** - * @deprecated not used by JOnAS - * @see org.apache.ws.ews.context.webservices.client.ServiceReferenceContext#getServiceRefName() - */ - public String getServiceRefName() { - return null; - } - - /** - * @deprecated not used by JOnAS - * @see org.apache.ws.ews.context.webservices.client.ServiceReferenceContext#setServiceRefName(java.lang.String) - */ - public void setServiceRefName(String arg0) { - - } - - /** - * Return the array of Handlers to be pplied for this service-ref - * @see org.apache.ws.ews.context.webservices.client.ServiceReferenceContext#getHandlers() - */ - public WSCFHandler[] getHandlers() { - WSCFHandler[] handlersArray = new WSCFHandler[handlers.size()]; - return (WSCFHandler[]) handlers.toArray(handlersArray); - } - - /** - * Add a given handler to the list of applied handlers - * @param handler the added handler - * @see org.apache.ws.ews.context.webservices.client.ServiceReferenceContext#addHandler(org.apache.ws.ews.context.webservices.server.WSCFHandler) - */ - public void addHandler(WSCFHandler handler) { - this.handlers.add(handler); - } - -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/emitter/FullEmitter.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/emitter/FullEmitter.java deleted file mode 100644 index 4132d35253fa6f63da7fc8b8e31ed1c38636df80..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/emitter/FullEmitter.java +++ /dev/null @@ -1,128 +0,0 @@ -/** - * JOnAS : Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.emitter; - -import org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.JOnASJ2EEWebServicesContext; - -import org.apache.ws.ews.mapper.J2eeEmitter; - - -/** - * Allows to define more options like classloader. - * @author Florent Benoit - */ -public class FullEmitter extends J2eeEmitter implements JOnASWSEmitter { - - /** - * Classloader to use - */ - private ClassLoader classLoader = null; - - /** - * Generate bindings ? - */ - private boolean bindingGeneration = true; - - /** - * Generate Services ? - */ - private boolean serviceGeneration = true; - - /** - * Generate WSDDs ? - */ - private boolean deployGeneration = true; - - /** - * @return the classLoader. - */ - public ClassLoader getClassLoader() { - return classLoader; - } - - /** - * Set the classloader to use - * @param classLoader The classLoader to set. - */ - public void setClassLoader(ClassLoader classLoader) { - this.classLoader = classLoader; - } - - /** - * @see org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.emitter.JOnASWSEmitter#getJOnASWsContext() - */ - public JOnASJ2EEWebServicesContext getJOnASWsContext() { - return (JOnASJ2EEWebServicesContext) getWscontext(); - } - - /** - * @see org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.emitter.JOnASWSEmitter#setJOnASWsContext(org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.JOnASJ2EEWebServicesContext) - */ - public void setJOnASWsContext(JOnASJ2EEWebServicesContext context) { - setWscontext(context); - } - - /** - * @see org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.emitter.JOnASWSEmitter#hasBindingGeneration() - */ - public boolean hasBindingGeneration() { - return bindingGeneration; - } - - /** - * @see org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.emitter.JOnASWSEmitter#hasServiceGeneration() - */ - public boolean hasServiceGeneration() { - return serviceGeneration; - } - - /** - * @see org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.emitter.JOnASWSEmitter#hasDeployGeneration() - */ - public boolean hasDeployGeneration() { - return deployGeneration; - } - - /** - * @param bg generate bindings on/off - */ - public void setBindingGeneration(boolean bg) { - bindingGeneration = bg; - } - - /** - * @param sg generate services on/off - */ - public void setServiceGeneration(boolean sg) { - serviceGeneration = sg; - } - - /** - * @param dg generate deploy files on/off - */ - public void setDeployGeneration(boolean dg) { - deployGeneration = dg; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/emitter/JOnASWSEmitter.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/emitter/JOnASWSEmitter.java deleted file mode 100644 index 698811deda5eee8ab7a52b3cb338d75ba0a2e319..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/emitter/JOnASWSEmitter.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.emitter; - -import org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.JOnASJ2EEWebServicesContext; - - -/** - * JOnAS interface for code Emitter - * @author Guillaume Sauthier - */ -public interface JOnASWSEmitter { - - /** - * @return Returns the Ws Context - */ - JOnASJ2EEWebServicesContext getJOnASWsContext(); - - /** - * @param context set the WS Context - */ - void setJOnASWsContext(JOnASJ2EEWebServicesContext context); - - /** - * @return true if needs to generate bindings - */ - boolean hasBindingGeneration(); - - /** - * @return true if needs to generate services - */ - boolean hasServiceGeneration(); - - /** - * @return true if needs to generate deploy files - */ - boolean hasDeployGeneration(); - - /** - * @return the classLoader. - */ - ClassLoader getClassLoader(); - - /** - * Set the classloader to use - * @param classLoader The classLoader to set. - */ - void setClassLoader(ClassLoader classLoader); -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/factory/JOnASClientGeneratorFactory.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/factory/JOnASClientGeneratorFactory.java deleted file mode 100644 index 9fe3bff55df60c9f62a682acda0edda12d7ff0ad..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/factory/JOnASClientGeneratorFactory.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 2004-2005 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.factory; - -import javax.wsdl.Binding; -import javax.wsdl.Definition; -import javax.wsdl.PortType; -import javax.wsdl.Service; - -import org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.writer.J2EEClientDeployWriter; -import org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.writer.JOnASEWSBindingWriter; -import org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.writer.JOnASEWSServiceWriter; -import org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.writer.JOnASTypeWriter; - -import org.apache.axis.wsdl.gen.Generator; -import org.apache.axis.wsdl.gen.NoopGenerator; -import org.apache.axis.wsdl.symbolTable.BindingEntry; -import org.apache.axis.wsdl.symbolTable.ServiceEntry; -import org.apache.axis.wsdl.symbolTable.SymbolTable; -import org.apache.axis.wsdl.symbolTable.TypeEntry; -import org.apache.ws.ews.mapper.J2eeGeneratorFactory; - - -/** - * JOnAS implementation of J2EEGeneratorFactory for the client side. - * @author Guillaume Sauthier - */ -public class JOnASClientGeneratorFactory extends J2eeGeneratorFactory { - - /** - * @see org.apache.geronimo.ews.jaxrpcmapping.J2eeGeneratorFactory#addDefinitionGenerators() - */ - protected void addDefinitionGenerators() { - // for faults - // Do not emit Faults - //addGenerator(Definition.class, JavaDefinitionWriter.class); - // for deploy.wsdd - addGenerator(Definition.class, J2EEClientDeployWriter.class); - } - - /** - * Use the JOnASServiceWriter instead of default JavaServiceWriter - * @param service wsdl:service - * @param symbolTable symbol Table - * @return Returns the JOnASServiceWriter - */ - public Generator getGenerator(Service service, SymbolTable symbolTable) { - Generator writer = new JOnASEWSServiceWriter(emitter, service, symbolTable); - ServiceEntry sEntry = symbolTable.getServiceEntry(service.getQName()); - serviceWriters.addStuff(writer, sEntry, symbolTable); - return serviceWriters; - } - - /** - * Use the JOnASServiceWriter instead of default JavaServiceWriter - * @param binding wsdl:binding - * @param symbolTable symbol Table - * @return Returns the JOnASJ2eeBindingWriter - */ - public Generator getGenerator(Binding binding, SymbolTable symbolTable) { - Generator writer = new JOnASEWSBindingWriter(emitter, binding, symbolTable); - BindingEntry bEntry = symbolTable.getBindingEntry(binding.getQName()); - bindingWriters.addStuff(writer, bEntry, symbolTable); - return bindingWriters; - } - - /** - * Since this Generator doesn't output anything else than - * deploy-server.wsdd, other generator are NoopGenerator. - * @see org.apache.axis.wsdl.gen.GeneratorFactory#getGenerator(javax.wsdl.PortType, - * org.apache.axis.wsdl.symbolTable.SymbolTable) - */ - public Generator getGenerator(PortType portType, SymbolTable symbolTable) { - return new NoopGenerator(); - } - - /** - * Use the JOnASTypeWriter instead of default JavaTypeWriter - * @see org.apache.axis.wsdl.gen.GeneratorFactory#getGenerator(org.apache.axis.wsdl.symbolTable.TypeEntry, - * org.apache.axis.wsdl.symbolTable.SymbolTable) - */ - public Generator getGenerator(TypeEntry type, SymbolTable symbolTable) { - Generator writer = new JOnASTypeWriter(emitter, type, symbolTable); - typeWriters.addStuff(writer, type, symbolTable); - return typeWriters; - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/factory/JOnASEndpointGeneratorFactory.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/factory/JOnASEndpointGeneratorFactory.java deleted file mode 100644 index 546760a4a891b7727e38c4d8656efef30863379e..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/factory/JOnASEndpointGeneratorFactory.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.factory; - -import javax.wsdl.Binding; -import javax.wsdl.Definition; -import javax.wsdl.PortType; -import javax.wsdl.Service; - -import org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.writer.J2EEServerDeployWriter; -import org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.writer.JOnASTypeWriter; - -import org.apache.axis.wsdl.gen.Generator; -import org.apache.axis.wsdl.gen.NoopGenerator; -import org.apache.axis.wsdl.symbolTable.SymbolTable; -import org.apache.axis.wsdl.symbolTable.TypeEntry; -import org.apache.ws.ews.mapper.J2eeGeneratorFactory; - - - -/** - * JOnAS extension of the EWS J2EEGeneratorFactory that handles the jaxrpc mapping file. - * It only writes the deploy-server.wsdd ... - * @author Guillaume Sauthier - */ -public class JOnASEndpointGeneratorFactory extends J2eeGeneratorFactory { - - /** - * @see org.apache.geronimo.ews.jaxrpcmapping.J2eeGeneratorFactory#addDefinitionGenerators() - */ - protected void addDefinitionGenerators() { - addGenerator(Definition.class, J2EEServerDeployWriter.class); // for deploy.wsdd - } - - /** - * Since this Generator doesn't output anything else than deploy-server.wsdd, other generator are NoopGenerator. - * @see org.apache.axis.wsdl.gen.GeneratorFactory#getGenerator(javax.wsdl.Binding, org.apache.axis.wsdl.symbolTable.SymbolTable) - */ - public Generator getGenerator(Binding binding, SymbolTable symbolTable) { - return new NoopGenerator(); - } - - /** - * Since this Generator doesn't output anything else than deploy-server.wsdd, other generator are NoopGenerator. - * @see org.apache.axis.wsdl.gen.GeneratorFactory#getGenerator(javax.wsdl.PortType, org.apache.axis.wsdl.symbolTable.SymbolTable) - */ - public Generator getGenerator(PortType portType, SymbolTable symbolTable) { - return new NoopGenerator(); - } - - /** - * Since this Generator doesn't output anything else than deploy-server.wsdd, other generator are NoopGenerator. - * @see org.apache.axis.wsdl.gen.GeneratorFactory#getGenerator(javax.wsdl.Service, org.apache.axis.wsdl.symbolTable.SymbolTable) - */ - public Generator getGenerator(Service service, SymbolTable symbolTable) { - return new NoopGenerator(); - } - - /** - * Use the JOnASTypeWriter instead of default JavaTypeWriter - * @see org.apache.axis.wsdl.gen.GeneratorFactory#getGenerator(org.apache.axis.wsdl.symbolTable.TypeEntry, org.apache.axis.wsdl.symbolTable.SymbolTable) - */ - public Generator getGenerator(TypeEntry type, SymbolTable symbolTable) { - Generator writer = new JOnASTypeWriter(emitter, type, symbolTable); - typeWriters.addStuff(writer, type, symbolTable); - return typeWriters; - } -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/writer/J2EEClientDeployWriter.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/writer/J2EEClientDeployWriter.java deleted file mode 100644 index 163e17f988ad9e4ef5599ea530312e4ac357cd97..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/writer/J2EEClientDeployWriter.java +++ /dev/null @@ -1,264 +0,0 @@ -/* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.writer; - -import java.io.IOException; -import java.io.PrintWriter; -import java.util.Iterator; -import java.util.List; - -import javax.wsdl.Definition; -import javax.wsdl.Port; -import javax.wsdl.Service; -import javax.wsdl.extensions.UnknownExtensibilityElement; -import javax.wsdl.extensions.soap.SOAPBinding; -import javax.xml.namespace.QName; - -import org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.wscf.JOnASWSCFHandler; - -import org.apache.axis.Constants; -import org.apache.axis.constants.Style; -import org.apache.axis.constants.Use; -import org.apache.axis.utils.Messages; -import org.apache.axis.wsdl.symbolTable.BindingEntry; -import org.apache.axis.wsdl.symbolTable.SymbolTable; -import org.apache.axis.wsdl.toJava.Emitter; -import org.apache.axis.wsdl.toJava.Utils; -import org.apache.ws.ews.context.webservices.client.ServiceReferenceContext; -import org.apache.ws.ews.context.webservices.server.WSCFHandler; -import org.apache.ws.ews.context.webservices.server.WSCFInitParam; -import org.apache.ws.ews.context.webservices.server.WSCFSOAPHeader; - - -/** - * This is Wsdl2java's deploy Writer. It writes the deploy.wsdd file. - * Based on J2eeDeployWriter from Ias - * (http://cvs.apache.org/viewcvs.cgi/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/ws/J2eeDeployWriter.java?rev=1.13&view=markup) - */ -public class J2EEClientDeployWriter extends JOnASDeployWriter { - - /** - * WSDD Extension prefix - */ - private static final String WSDD_PREFIX = "deploy-client-"; - - /** - * Constructor. - * @param emitter J2eeEmitter - * @param definition wsdl:definition - * @param symbolTable SymbolTable - */ - public J2EEClientDeployWriter(Emitter emitter, Definition definition, SymbolTable symbolTable) { - super(emitter, definition, symbolTable); - } - - /** - * Generate deploy.wsdd. Only generate it if the emitter is generating - * server-side mappings. - * @throws IOException When generation fails - */ - public void generate() throws IOException { - - if (!emitter.isServerSide()) { - super.generate(); - } - } - - /** - * Write out deployment and undeployment instructions for each WSDL service - * @param pw PrintWriter - * @throws IOException IOException - */ - protected void writeDeployServices(PrintWriter pw) throws IOException { - - int sRefIndex = getJonasWSContext().getServiceReferenceContextCount(); - // should only have 1 service-ref - if (sRefIndex == 1) { - - ServiceReferenceContext ctx = getJonasWSContext().getServiceReferenceContext(0); - QName desiredServiceQName = ctx.getServiceQName(); - - Service myService = getDefinition().getService(desiredServiceQName); - - // Generate only if there is a Service - if (myService != null) { - pw.println(); - pw.println(" "); - pw.println(); - - for (Iterator portIterator = myService.getPorts().values().iterator(); portIterator.hasNext();) { - Port myPort = (Port) portIterator.next(); - BindingEntry bEntry = getSymbolTable().getBindingEntry(myPort.getBinding().getQName()); - - // If this isn't an SOAP binding, skip it - if (bEntry.getBindingType() != BindingEntry.TYPE_SOAP) { - continue; - } - - writeDeployPort(pw, myPort, bEntry, ctx); - } - } - } - } - - /** - * Write out deployment and undeployment instructions for given WSDL port - * @param pw PrintWriter - * @param port wsdl:port - * @param bEntry Axis BindingEntry - * @param ctx ServiceReferanceContext - */ - protected void writeDeployPort(PrintWriter pw, Port port, BindingEntry bEntry, ServiceReferenceContext ctx) { - - String serviceName = port.getName(); - boolean hasLiteral = bEntry.hasLiteral(); - boolean hasMIME = Utils.hasMIME(bEntry); - - - Use use = Use.DEFAULT; - String styleStr = ""; - Iterator iterator = bEntry.getBinding().getExtensibilityElements().iterator(); - - // iterate throught extensibilityElements of given Port's Binding - while (iterator.hasNext()) { - Object obj = iterator.next(); - - if (obj instanceof SOAPBinding) { - use = Use.ENCODED; - } else if (obj instanceof UnknownExtensibilityElement) { - - // TODO After WSDL4J supports soap12, change this code - UnknownExtensibilityElement unkElement = (UnknownExtensibilityElement) obj; - QName name = unkElement.getElementType(); - - if (name.getNamespaceURI().equals(Constants.URI_WSDL12_SOAP) && name.getLocalPart().equals("binding")) { - use = Use.ENCODED; - } - } - } - - if (getSymbolTable().isWrapped()) { - styleStr = " style=\"" + Style.WRAPPED + "\""; - use = Use.LITERAL; - } else { - styleStr = " style=\"" + bEntry.getBindingStyle().getName() + "\""; - if (hasLiteral) { - use = Use.LITERAL; - } - } - - String useStr = " use=\"" + use + "\""; - - pw.println(" "); - - // MIME attachments don't work with multiref, so turn it off. - if (hasMIME) { - pw.println(" "); - } - // force JAXRPC 1.1 Type Mapping - pw.println(" "); - - //writeDeployBinding(pw, bEntry); - writeDeployTypes(pw, bEntry.getBinding(), hasLiteral, hasMIME, use); - - WSCFHandler[] handlers = ctx.getHandlers(); - if (handlers != null && handlers.length != 0) { - pw.println(" "); - for (int i = 0; i < handlers.length; i++) { - writeHandlerForPort(pw, (JOnASWSCFHandler) handlers[i], port); - } - pw.println(" "); - } - pw.println(" "); - } - - /** - * Writes out a client-side handler - * @param pw PrintWriter - * @param handler EWS Handler description - * @param port wsdl:port - */ - private void writeHandlerForPort(PrintWriter pw, JOnASWSCFHandler handler, Port port) { - - /** - * If handler contains no port-names, add the handler - * else, check if the handler is applied to the current port - */ - List ports = handler.getPortNames(); - if (ports.isEmpty()) { - // handler applied for all ports - writeHandler(pw, handler); - } else if (ports.contains(port.getName())) { - // handler applied for current port - writeHandler(pw, handler); - } - } - /** - * Writes out a client-side handler - * @param pw PrintWriter - * @param handler EWS Handler description - */ - private void writeHandler(PrintWriter pw, JOnASWSCFHandler handler) { - - pw.println(" "); - WSCFInitParam[] param = handler.getInitParam(); - for (int i = 0; i < param.length; i++) { - pw.println(" "); - } - WSCFSOAPHeader[] headers = handler.getSoapHeader(); - for (int i = 0; i < headers.length; i++) { - pw.println("
    "); - } - pw.println(" "); - String[] roles = handler.getSoapRole(); - for (int i = 0; i < roles.length; i++) { - pw.println(" "); - } - } - - /** - * @return Returns the filename prefix - */ - protected String getPrefix() { - return WSDD_PREFIX; - } -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/writer/J2EEServerDeployWriter.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/writer/J2EEServerDeployWriter.java deleted file mode 100644 index 4e4ee0079a9f0957b2a4c1fd42e0ca22f45f57e4..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/writer/J2EEServerDeployWriter.java +++ /dev/null @@ -1,388 +0,0 @@ -/* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.writer; - -import java.io.IOException; -import java.io.PrintWriter; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import javax.wsdl.Binding; -import javax.wsdl.BindingOperation; -import javax.wsdl.Definition; -import javax.wsdl.Operation; -import javax.wsdl.OperationType; -import javax.wsdl.Port; -import javax.wsdl.Service; -import javax.wsdl.extensions.UnknownExtensibilityElement; -import javax.wsdl.extensions.soap.SOAPBinding; -import javax.xml.namespace.QName; - -import org.ow2.jonas.deployment.common.HandlerDesc; -import org.ow2.jonas.deployment.ws.PortComponentDesc; -import org.ow2.jonas.deployment.ws.SSBPortComponentDesc; -import org.ow2.jonas.deployment.ws.ServiceDesc; - -import org.apache.axis.Constants; -import org.apache.axis.constants.Scope; -import org.apache.axis.constants.Style; -import org.apache.axis.constants.Use; -import org.apache.axis.deployment.wsdd.WSDDConstants; -import org.apache.axis.utils.JavaUtils; -import org.apache.axis.utils.Messages; -import org.apache.axis.wsdl.symbolTable.BindingEntry; -import org.apache.axis.wsdl.symbolTable.Parameters; -import org.apache.axis.wsdl.symbolTable.SymbolTable; -import org.apache.axis.wsdl.toJava.Emitter; -import org.apache.axis.wsdl.toJava.Utils; - - - -/** - * This is Wsdl2java's deploy Writer. It writes the server-deploy-XX.wsdd file. - * Based on J2eeDeployWriter from Ias - * (http://cvs.apache.org/viewcvs.cgi/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/ws/J2eeDeployWriter.java?rev=1.13&view=markup) - */ -public class J2EEServerDeployWriter extends JOnASDeployWriter { - - /** - * WSDD Extension prefix - */ - private static final String WSDD_PREFIX = "deploy-server-"; - - /** - * Axis parameter name for SE interface name - */ - private static final String SERVICE_ENDPOINT_INTERFACE_NAME = "serviceEndpointInterfaceName"; - - /** - * Axis parameter name for SE jndi name - */ - private static final String SERVICE_ENDPOINT_JNDI_NAME = "serviceEndpointJndiName"; - - /** - * Constructor. - * @param emitter J2EEEmitter - * @param definition Definition - * @param symbolTable SymbolTable - */ - public J2EEServerDeployWriter(Emitter emitter, Definition definition, SymbolTable symbolTable) { - super(emitter, definition, symbolTable); - } // ctor - - /** - * Write out deployment and undeployment instructions for each WSDL service - * @param pw PrintWriter - * @throws IOException when services cannot be created - */ - protected void writeDeployServices(PrintWriter pw) throws IOException { - - // deploy the ports on each service - Map serviceMap = getDefinition().getServices(); - ServiceDesc desc = getJonasWSContext().getServiceDesc(); - - for (Iterator mapIterator = serviceMap.values().iterator(); mapIterator.hasNext();) { - Service myService = (Service) mapIterator.next(); - - pw.println(); - pw.println(" "); - pw.println(); - - for (Iterator portIterator = myService.getPorts().values().iterator(); portIterator.hasNext();) { - Port myPort = (Port) portIterator.next(); - BindingEntry bEntry = getSymbolTable().getBindingEntry(myPort.getBinding().getQName()); - - // If this isn't an SOAP binding, skip it - if (bEntry.getBindingType() != BindingEntry.TYPE_SOAP) { - continue; - } - - PortComponentDesc portDesc = findPortComponentDesc(desc, myPort); - - if (portDesc != null) { - // write ports described by the current ServiceDesc - writeDeployPort(pw, myService, bEntry, portDesc); - } - } - } - } // writeDeployServices - - /** - * @param desc JOnAS Service Description - * @param myPort wsdl:port - * @return Returns the JOnAS PortComponentDesc associated with the given wsdl:port - */ - private static PortComponentDesc findPortComponentDesc(ServiceDesc desc, Port myPort) { - - PortComponentDesc port = null; - List ports = desc.getPortComponents(); - for (Iterator i = ports.iterator(); i.hasNext() && port == null;) { - PortComponentDesc pcd = (PortComponentDesc) i.next(); - if (pcd.getQName().getLocalPart().equals(myPort.getName())) { - port = pcd; - } - } - return port; - } - - /** - * Write out deployment and undeployment instructions for given WSDL port - * @param pw PrintWriter - * @param service wsdl:service - * @param bEntry BindingEntry - * @param portComponentDesc JOnAS Port representation - * @throws IOException IOException - */ - protected void writeDeployPort(PrintWriter pw, Service service, BindingEntry bEntry, - PortComponentDesc portComponentDesc) throws IOException { - - String serviceName = portComponentDesc.getServiceName(); - boolean hasLiteral = bEntry.hasLiteral(); - boolean hasMIME = Utils.hasMIME(bEntry); - String prefix = WSDDConstants.NS_PREFIX_WSDD_JAVA; - String styleStr = ""; - Iterator iterator = bEntry.getBinding().getExtensibilityElements().iterator(); - - // iterate throught extensibilityElements of given Port's Binding - while (iterator.hasNext()) { - Object obj = iterator.next(); - - if (obj instanceof SOAPBinding) { - use = Use.ENCODED; - } else if (obj instanceof UnknownExtensibilityElement) { - - // TODO After WSDL4J supports soap12, change this code - UnknownExtensibilityElement unkElement = (UnknownExtensibilityElement) obj; - QName name = unkElement.getElementType(); - - if (name.getNamespaceURI().equals(Constants.URI_WSDL12_SOAP) && name.getLocalPart().equals("binding")) { - use = Use.ENCODED; - } - } - } - - if (getSymbolTable().isWrapped()) { - styleStr = " style=\"" + Style.WRAPPED + "\""; - use = Use.LITERAL; - } else { - styleStr = " style=\"" + bEntry.getBindingStyle().getName() + "\""; - - if (hasLiteral) { - use = Use.LITERAL; - } - } - - String useStr = " use=\"" + use + "\""; - - if (portComponentDesc.hasBeanImpl()) { - pw.println(" "); - - SSBPortComponentDesc ssbPCD = (SSBPortComponentDesc) portComponentDesc; - - pw.println(" "); - pw.println(" "); - - } else { - pw.println(" "); - pw.println(" "); - - } - - pw.println(" "); - pw.println(" "); - pw.println(" "); - - // MIME attachments don't work with multiref, so turn it off. - if (hasMIME) { - pw.println(" "); - } - - writeDeployBinding(pw, bEntry); - writeDeployTypes(pw, bEntry.getBinding(), hasLiteral, hasMIME, use); - - List handlers = portComponentDesc.getHandlers(); - if (!handlers.isEmpty()) { - pw.println(" "); - for (Iterator i = handlers.iterator(); i.hasNext();) { - writeHandler(pw, (HandlerDesc) i.next()); - } - pw.println(" "); - } - pw.println(" "); - } - - /** - * Write out deployment instructions for given WSDL binding - * @param pw PrintWriter - * @param bEntry BindingEntry - * @throws IOException IOException - */ - protected void writeDeployBinding(PrintWriter pw, BindingEntry bEntry) throws IOException { - - Binding binding = bEntry.getBinding(); - - pw.println(" "); - // force JAXRPC 1.1 Type Mapping - pw.println(" "); - - HashSet allowedMethods = new HashSet(); - - if (!emitter.isSkeletonWanted()) { - Iterator operationsIterator = binding.getBindingOperations().iterator(); - - for (; operationsIterator.hasNext();) { - BindingOperation bindingOper = (BindingOperation) operationsIterator.next(); - Operation operation = bindingOper.getOperation(); - OperationType type = operation.getStyle(); - String javaOperName = JavaUtils.xmlNameToJava(operation.getName()); - - // These operation types are not supported. The signature - // will be a string stating that fact. - if ((type == OperationType.NOTIFICATION) || (type == OperationType.SOLICIT_RESPONSE)) { - continue; - } - - allowedMethods.add(javaOperName); - - // We pass "" as the namespace argument because we're just - // interested in the return type for now. - Parameters params = getSymbolTable().getOperationParameters(operation, "", bEntry); - - if (params != null) { - - // Get the operation QName - QName elementQName = Utils.getOperationQName(bindingOper, bEntry, getSymbolTable()); - - // Get the operation's return QName and type - QName returnQName = null; - QName returnType = null; - - if (params.returnParam != null) { - returnQName = params.returnParam.getQName(); - returnType = Utils.getXSIType(params.returnParam); - } - - // Get the operations faults - Map faultMap = bEntry.getFaults(); - ArrayList faults = null; - - if (faultMap != null) { - faults = (ArrayList) faultMap.get(bindingOper); - } - - String soapAction = Utils.getOperationSOAPAction(bindingOper); - - // Write the operation metadata - writeOperation(pw, javaOperName, elementQName, returnQName, returnType, params, faults, soapAction); - } - } - } - - pw.print(" "); - } else { - boolean first = true; - - for (Iterator i = allowedMethods.iterator(); i.hasNext();) { - String method = (String) i.next(); - - if (first) { - pw.print(method); - - first = false; - } else { - pw.print(" " + method); - } - } - - pw.println("\"/>"); - } - - Scope scope = emitter.getScope(); - - if (scope != null) { - pw.println(" "); - } - } - - /** - * @param pw PrintWriter - * @param handler the server Handler to write - */ - protected void writeHandler(PrintWriter pw, HandlerDesc handler) { - pw.println(" "); - Map params = handler.getInitParams(); - for (Iterator i = params.keySet().iterator(); i.hasNext();) { - String pName = (String) i.next(); - pw.println(" "); - } - List headers = handler.getSOAPHeaders(); - for (Iterator i = headers.iterator(); i.hasNext();) { - QName sh = (QName) i.next(); - pw.println("
    "); - } - pw.println(" "); - List roles = handler.getSOAPRoles(); - for (Iterator i = roles.iterator(); i.hasNext();) { - String role = (String) i.next(); - pw.println(" "); - } - } - - /** - * @return Returns "deploy-server-" - */ - protected String getPrefix() { - return WSDD_PREFIX; - } - -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/writer/JOnASDeployWriter.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/writer/JOnASDeployWriter.java deleted file mode 100644 index 016b2af6614af1e3c8c1f777ba7a5bc89c096964..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/writer/JOnASDeployWriter.java +++ /dev/null @@ -1,558 +0,0 @@ -/* - * Copyright 2001-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.writer; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.OutputStreamWriter; -import java.io.PrintWriter; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Vector; - -import javax.wsdl.Binding; -import javax.wsdl.Definition; -import javax.wsdl.OperationType; -import javax.xml.namespace.QName; - -import org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.JOnASJ2EEWebServicesContext; -import org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.emitter.JOnASWSEmitter; - -import org.apache.axis.deployment.wsdd.WSDDConstants; -import org.apache.axis.constants.Use; -import org.apache.axis.utils.Messages; -import org.apache.axis.wsdl.symbolTable.FaultInfo; -import org.apache.axis.wsdl.symbolTable.Parameter; -import org.apache.axis.wsdl.symbolTable.Parameters; -import org.apache.axis.wsdl.symbolTable.SchemaUtils; -import org.apache.axis.wsdl.symbolTable.SymbolTable; -import org.apache.axis.wsdl.symbolTable.TypeEntry; -import org.apache.axis.wsdl.toJava.Emitter; -import org.apache.axis.wsdl.toJava.JavaWriter; -import org.apache.axis.wsdl.toJava.Utils; - - - -/** - * JOnAS Base DeployWriter. It's a placeholder for commonly used methods and fields. - * @author Guillaume Sauthier - * Based on J2eeDeployWriter from Ias - * (http://cvs.apache.org/viewcvs.cgi/ws-axis/contrib/ews/src/org/apache/geronimo/ews/ws4j2ee/toWs/ws/J2eeDeployWriter.java?rev=1.13&view=markup) - */ -public abstract class JOnASDeployWriter extends JavaWriter { - - /** - * JOnASJ2EEWebServicesContext storing JOnAS specific info. - */ - private JOnASJ2EEWebServicesContext jonasWSContext; - - /** - * WSDD Extension suffix - */ - protected static final String WSDD_SUFFIX = ".wsdd"; - - /** - * count generated files - */ - private static int count = 0; - - /** - * Definition base used to write deploy file - */ - private Definition definition = null; - - /** - * Symbol Table to use - */ - private SymbolTable symbolTable = null; - - /** Field use */ - protected Use use = Use.DEFAULT; - - /** - * Constructor. - * @param emitter J2EE Emitter - * @param definition Current Definition - * @param symbolTable SymbolTable - */ - public JOnASDeployWriter(Emitter emitter, Definition definition, SymbolTable symbolTable) { - - super(emitter, "deploy"); - this.definition = definition; - this.symbolTable = symbolTable; - if (emitter instanceof JOnASWSEmitter) { - this.jonasWSContext = ((JOnASWSEmitter) emitter).getJOnASWsContext(); - } - if (jonasWSContext == null) { - throw new RuntimeException("jonasWSContext can not be null"); - } - } - - /** - * @return Returns the fully-qualified name of the deploy.wsdd file to be generated. - */ - protected String getFileName() { - // put directly in "output" directory - String dir = emitter.getNamespaces().getAsDir(""); - return dir + getPrefix() + getCount() + WSDD_SUFFIX; - } - - /** - * Replace the default file header with the deployment doc file header. - * - * @param pw PrintWriter where descriptor has to be written - * @throws IOException not thrown - */ - protected void writeFileHeader(PrintWriter pw) throws IOException { - - pw.println(Messages.getMessage("deploy00")); - pw.println(Messages.getMessage("deploy02")); - pw.println(Messages.getMessage("deploy03")); - pw.println(Messages.getMessage("deploy05")); - pw.println(Messages.getMessage("deploy06")); - pw.println(Messages.getMessage("deploy07")); - pw.println(Messages.getMessage("deploy09")); - pw.println(); - pw.println(""); - } - - /** - * Write the body of the deploy.wsdd file. - * - * @param pw PrintWriter - * @throws IOException thrown by writeDeployServices - */ - protected void writeFileBody(PrintWriter pw) throws IOException { - writeDeployServices(pw); - pw.println(""); - } - - /** - * @return Returns the filename prefix. - */ - protected abstract String getPrefix(); - - /** - * Writes te list of wsdd:service - * @param pw PrintWriter - * @throws IOException implementation may throw IOException - */ - protected abstract void writeDeployServices(PrintWriter pw) throws IOException; - - /** - * Raw routine that writes out the typeMapping. - * @param pw PrintWriter - * @param namespaceURI xml type namespace - * @param localPart xml type localpart - * @param javaType java classname - * @param serializerFactory java serializer factory classname - * @param deserializerFactory java deserializer factory classname - * @param encodingStyle encoding style - */ - protected void writeTypeMapping(PrintWriter pw, String namespaceURI, String localPart, String javaType, - String serializerFactory, String deserializerFactory, String encodingStyle) { - - pw.println(" "); - } - - /** - * Raw routine that writes out the operation and parameters. - * - * @param pw PrintWriter - * @param javaOperName java method name - * @param elementQName wsdl operation qname - * @param returnQName wsdl return type qname - * @param returnType java return type classname ? - * @param params list of params used by this operation - * @param faults list of faults thrown by this operation - * @param soapAction soapAction value - */ - protected void writeOperation(PrintWriter pw, String javaOperName, - QName elementQName, QName returnQName, - QName returnType, Parameters params, - ArrayList faults, String soapAction) { - - pw.print(" "); - - Vector paramList = params.list; - - for (int i = 0; i < paramList.size(); i++) { - Parameter param = (Parameter) paramList.elementAt(i); - - // Get the parameter name QName and type QName - QName paramQName = param.getQName(); - QName paramType = Utils.getXSIType(param); - - pw.print(" "); - } - - if (faults != null) { - for (Iterator iterator = faults.iterator(); iterator.hasNext();) { - FaultInfo faultInfo = (FaultInfo) iterator.next(); - QName faultQName = faultInfo.getQName(); - - if (faultQName != null) { - String className = - Utils.getFullExceptionName(faultInfo.getMessage(), - symbolTable); - - pw.print(" "); - } - } - } - - pw.println(" "); - } - - /** - * Write out bean mappings for each type - * @param pw PrintWriter - * @param binding wsdl:binding - * @param hasLiteral has a literal type ? - * @param hasMIME has MIME type ? - * @param use Use - */ - protected void writeDeployTypes(PrintWriter pw, Binding binding, boolean hasLiteral, boolean hasMIME, Use use) { - - pw.println(); - - if (hasMIME) { - QName bQName = binding.getQName(); - - writeTypeMapping(pw, bQName.getNamespaceURI(), "DataHandler", "javax.activation.DataHandler", - "org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory", - "org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory", use.getEncoding()); - } - - boolean useJAF = false; - - Map types = getSymbolTable().getTypeIndex(); - Collection typeCollection = types.values(); - for (Iterator i = typeCollection.iterator(); i.hasNext();) { - TypeEntry type = (TypeEntry) i.next(); - - // Note this same check is repeated in JavaStubWriter. - boolean process = true; - - // 1) Don't register types we shouldn't - if (!Utils.shouldEmit(type)) { - process = false; - } - - if (process) { - String namespaceURI = type.getQName().getNamespaceURI(); - String localPart = type.getQName().getLocalPart(); - String javaType = type.getName(); - String serializerFactory; - String deserializerFactory; - String encodingStyle = ""; - QName innerType = null; - - if (!hasLiteral) { - encodingStyle = use.getEncoding(); - } - - if (javaType.endsWith("[]")) { - if (SchemaUtils.isListWithItemType(type.getNode())) { - serializerFactory = "org.apache.axis.encoding.ser.SimpleListSerializerFactory"; - deserializerFactory = "org.apache.axis.encoding.ser.SimpleListDeserializerFactory"; - } else { - serializerFactory = "org.apache.axis.encoding.ser.ArraySerializerFactory"; - deserializerFactory = "org.apache.axis.encoding.ser.ArrayDeserializerFactory"; - innerType = type.getComponentType(); - } - } else if ((type.getNode() != null) - && (Utils.getEnumerationBaseAndValues(type.getNode(), getSymbolTable()) != null)) { - serializerFactory = "org.apache.axis.encoding.ser.EnumSerializerFactory"; - deserializerFactory = "org.apache.axis.encoding.ser.EnumDeserializerFactory"; - } else if (type.isSimpleType()) { - serializerFactory = "org.apache.axis.encoding.ser.SimpleSerializerFactory"; - deserializerFactory = "org.apache.axis.encoding.ser.SimpleDeserializerFactory"; - } else if (type.getBaseType() != null) { - serializerFactory = "org.apache.axis.encoding.ser.SimpleSerializerFactory"; - deserializerFactory = "org.apache.axis.encoding.ser.SimpleDeserializerFactory"; - } else { - serializerFactory = "org.apache.axis.encoding.ser.BeanSerializerFactory"; - deserializerFactory = "org.apache.axis.encoding.ser.BeanDeserializerFactory"; - } - - List jafType = new Vector(); - jafType.add("java.awt.Image"); - jafType.add("javax.xml.transform.Source"); - jafType.add("javax.mail.internet.MimeMultipart"); - if (jafType.contains(javaType)) { - serializerFactory = "org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory"; - deserializerFactory = "org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory"; - useJAF = true; - } - - if (innerType == null) { - // no arrays - writeTypeMapping(pw, namespaceURI, localPart, javaType, - serializerFactory, deserializerFactory, - encodingStyle); - } else { - // arrays - writeArrayTypeMapping(pw, namespaceURI, localPart, javaType, - encodingStyle, innerType); - } - } - } - - if (useJAF) { - // mime don't work with ref - pw.println(" "); - } - } - - - /** - * Raw routine that writes out the arrayMapping. - * @param pw PrintWriter - * @param namespaceURI xml type namespace - * @param localPart xml type localpart - * @param javaType java classname - * @param encodingStyle encoding style - * @param innerType array component type QName - */ - protected void writeArrayTypeMapping( - PrintWriter pw, String namespaceURI, String localPart, String javaType, String encodingStyle, QName innerType) { - - pw.println(" "); - } - - /** - * Method getModeString - * - * @param mode Parameter mode (IN, INOUT, OUT) - * @return Parameter Mode String representation - */ - public String getModeString(byte mode) { - - if (mode == Parameter.IN) { - return "IN"; - } else if (mode == Parameter.INOUT) { - return "INOUT"; - } else { - return "OUT"; - } - } - - /** - * Method getPrintWriter - * @param filename file to open - * @return Returns the printWriter for the file - * @throws IOException When File cannot be open/written - */ - protected PrintWriter getPrintWriter(String filename) throws IOException { - - File file = new File(filename); - File parent = new File(file.getParent()); - - parent.mkdirs(); - - FileOutputStream out = new FileOutputStream(file); - OutputStreamWriter writer = new OutputStreamWriter(out, "UTF-8"); - - return new PrintWriter(writer); - } - - /** - * @return Returns the count. - */ - public static int getCount() { - return count++; - } - - /** - * @return Returns the definition. - */ - public Definition getDefinition() { - return definition; - } - - /** - * @return Returns the jonasWSContext. - */ - public JOnASJ2EEWebServicesContext getJonasWSContext() { - return jonasWSContext; - } - - /** - * @return Returns the symbolTable. - */ - public SymbolTable getSymbolTable() { - return symbolTable; - } - - /** - * Store operation type String representation - */ - private static Map mepStrings = new HashMap(); - static { - mepStrings.put(OperationType.REQUEST_RESPONSE, "request-response"); - mepStrings.put(OperationType.ONE_WAY, "oneway"); - } - - /** - * @param mep OperationType - * @return Returns the String representation of this type - */ - private String getMepString(OperationType mep) { - return (String) mepStrings.get(mep); - } -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/writer/JOnASEWSBindingWriter.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/writer/JOnASEWSBindingWriter.java deleted file mode 100644 index e603255d0f1d393f4fcd34b52cf1084481c39668..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/writer/JOnASEWSBindingWriter.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.writer; - -import javax.wsdl.Binding; - -import org.apache.axis.wsdl.gen.Generator; -import org.apache.axis.wsdl.symbolTable.BindingEntry; -import org.apache.axis.wsdl.symbolTable.PortTypeEntry; -import org.apache.axis.wsdl.symbolTable.SymbolTable; -import org.apache.ws.ews.mapper.J2eeBindingWriter; -import org.apache.ws.ews.mapper.J2eeEmitter; - - -/** - * Extends EWS J2eeBindingWriter to generate port interface only when needed. - * @author Guillaume Sauthier - */ -public class JOnASEWSBindingWriter extends J2eeBindingWriter implements Generator { - - /** - * @param emitter J2eeEmitter - * @param binding wsdl:binding containing port-interface infos - * @param st Entry table - */ - public JOnASEWSBindingWriter(J2eeEmitter emitter, Binding binding, SymbolTable st) { - super(emitter, binding, st); - } - - /** - * @see org.apache.geronimo.ews.jaxrpcmapping.J2eeBindingWriter#getJavaInterfaceWriter(org.apache.geronimo.ews.jaxrpcmapping.J2eeEmitter, org.apache.axis.wsdl.symbolTable.PortTypeEntry, org.apache.axis.wsdl.symbolTable.BindingEntry, org.apache.axis.wsdl.symbolTable.SymbolTable) - */ - protected Generator getJavaInterfaceWriter(J2eeEmitter emitter, PortTypeEntry ptEntry, BindingEntry bEntry, SymbolTable st) { - ClassLoader cl = ((org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.emitter.JOnASWSEmitter) emitter).getClassLoader(); - try { - cl.loadClass(ptEntry.getName()); - } catch (ClassNotFoundException cnfe) { - // class not available, generate it - return super.getJavaInterfaceWriter(emitter, ptEntry, bEntry, symbolTable); - } - return null; - } - - /** - * @see org.apache.geronimo.ews.jaxrpcmapping.J2eeBindingWriter#getJavaImplWriter(org.apache.geronimo.ews.jaxrpcmapping.J2eeEmitter, org.apache.axis.wsdl.symbolTable.BindingEntry, org.apache.axis.wsdl.symbolTable.SymbolTable) - */ - protected Generator getJavaImplWriter(J2eeEmitter arg0, BindingEntry arg1, - SymbolTable arg2) { - return null; - } - - /** - * @see org.apache.geronimo.ews.jaxrpcmapping.J2eeBindingWriter#getJavaSkelWriter(org.apache.geronimo.ews.jaxrpcmapping.J2eeEmitter, org.apache.axis.wsdl.symbolTable.BindingEntry, org.apache.axis.wsdl.symbolTable.SymbolTable) - */ - protected Generator getJavaSkelWriter(J2eeEmitter arg0, BindingEntry arg1, - SymbolTable arg2) { - return null; - } -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/writer/JOnASEWSServiceImplWriter.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/writer/JOnASEWSServiceImplWriter.java deleted file mode 100644 index ab0b69c38c507b305c030578d8464d076091a046..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/writer/JOnASEWSServiceImplWriter.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.writer; - -import org.apache.axis.wsdl.symbolTable.ServiceEntry; -import org.apache.axis.wsdl.symbolTable.SymbolTable; -import org.apache.axis.wsdl.toJava.Emitter; -import org.apache.axis.wsdl.toJava.JavaServiceImplWriter; - - -/** - * ServiceImplWriter that substitues Axis' Service implementation with our own. - * - * @author Guillaume Sauthier - */ -public class JOnASEWSServiceImplWriter extends JavaServiceImplWriter { - - /** - * Constructor. - * - * @param emitter JOnASEmitter - * @param sEntry ServiceEntry - * @param symbolTable SymbolTable - */ - public JOnASEWSServiceImplWriter(Emitter emitter, ServiceEntry sEntry, SymbolTable symbolTable) { - super(emitter, sEntry, symbolTable); - } - - /** - * @return Returns "extends org.ow2.jonas.ws.axis.JService ". - */ - protected String getExtendsText() { - return "extends org.ow2.jonas.ws.axis.JService "; - } // getExtendsText - - -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/writer/JOnASEWSServiceIntfWriter.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/writer/JOnASEWSServiceIntfWriter.java deleted file mode 100644 index 8c2b8f1b856f60945ec1c880d4de3ddc21aed2c1..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/writer/JOnASEWSServiceIntfWriter.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.writer; - -import org.apache.axis.wsdl.symbolTable.ServiceEntry; -import org.apache.axis.wsdl.symbolTable.SymbolTable; -import org.apache.axis.wsdl.toJava.Emitter; -import org.apache.axis.wsdl.toJava.JavaServiceIfaceWriter; - - -/** - * Used for service interface generation. - * The super class has protected constructor, so redefine it. - * @author Florent Benoit - */ -public class JOnASEWSServiceIntfWriter extends JavaServiceIfaceWriter { - - /** - * Constructor. - * @param emitter JOnASEmitter - * @param sEntry ServiceEntry - * @param symbolTable SymbolTable - */ - public JOnASEWSServiceIntfWriter(Emitter emitter, ServiceEntry sEntry, SymbolTable symbolTable) { - super(emitter, sEntry, symbolTable); - } - - -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/writer/JOnASEWSServiceWriter.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/writer/JOnASEWSServiceWriter.java deleted file mode 100644 index 79afc966116fd50de943b95c19234f3c926ba973..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/writer/JOnASEWSServiceWriter.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.writer; - -import javax.wsdl.Service; - -import org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.emitter.JOnASWSEmitter; - -import org.apache.axis.wsdl.symbolTable.ServiceEntry; -import org.apache.axis.wsdl.symbolTable.SymbolTable; -import org.apache.axis.wsdl.toJava.Emitter; -import org.apache.axis.wsdl.toJava.JavaServiceWriter; - -/** - * This is JOnASWsdl2java's Service Writer. It writes the following files, as - * appropriate: .java, Locator.java. - */ -public class JOnASEWSServiceWriter extends JavaServiceWriter { - - /** - * Constructor. - * @param emitter JOnASEmitter - * @param service Service - * @param symbolTable SymbolTable - */ - public JOnASEWSServiceWriter(Emitter emitter, Service service, SymbolTable symbolTable) { - super(emitter, service, symbolTable); - } // ctor - - /** - * setGenerators - * Logic to set the generators that are based on the Service. - * This logic was moved from the constructor so extended interfaces - * can more effectively use the hooks. - */ - protected void setGenerators() { - ServiceEntry sEntry = symbolTable.getServiceEntry(service.getQName()); - - if (sEntry.isReferenced()) { - serviceIfaceWriter = null; - testCaseWriter = null; - // Write service interface if : - // - class is not available - // - emitter is not a J2eeEmitter (for backward compliance) - if (emitter instanceof JOnASWSEmitter) { - ClassLoader cl = ((JOnASWSEmitter) emitter).getClassLoader(); - String className = sEntry.getName(); - try { - cl.loadClass(className); - } catch (ClassNotFoundException cnfe) { - // class not available, generate it - serviceIfaceWriter = new JOnASEWSServiceIntfWriter(emitter, sEntry, symbolTable); - } - } - - // overwrite Axis Writer - serviceImplWriter = new JOnASEWSServiceImplWriter(emitter, sEntry, symbolTable); - } - } -} // class JOnASServiceWriter diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/writer/JOnASTypeWriter.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/writer/JOnASTypeWriter.java deleted file mode 100644 index 67d06b35360dac8eb13545131fc85a8a726aacad..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/writer/JOnASTypeWriter.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.writer; - -import java.io.IOException; -import java.util.Vector; - -import javax.xml.namespace.QName; - -import org.w3c.dom.Node; - -import org.apache.axis.wsdl.gen.Generator; -import org.apache.axis.wsdl.symbolTable.SchemaUtils; -import org.apache.axis.wsdl.symbolTable.SymbolTable; -import org.apache.axis.wsdl.symbolTable.Type; -import org.apache.axis.wsdl.symbolTable.TypeEntry; -import org.apache.axis.wsdl.toJava.Emitter; -import org.apache.axis.wsdl.toJava.JavaGeneratorFactory; -import org.apache.axis.wsdl.toJava.JavaTypeWriter; -import org.apache.axis.wsdl.toJava.Utils; - -/** - * This is Wsdl2java's Type Writer. It writes the following files, as appropriate: - * .java, Holder.java. - */ -public class JOnASTypeWriter extends JavaTypeWriter implements Generator { - - /** Field typeWriter */ - private Generator jonasTypeWriter = null; - - /** - * Constructor. - * - * @param emitter the Emitter - * @param type Type to be generated - * @param symbolTable SymbolTable containing mapping informations - */ - public JOnASTypeWriter(Emitter emitter, TypeEntry type, - SymbolTable symbolTable) { - super(emitter, type, symbolTable); - if (type.isReferenced() && !type.isOnlyLiteralReferenced() && type instanceof Type) { - - // Determine what sort of type this is and instantiate - // the appropriate Writer. - Node node = type.getNode(); - - boolean isSimpleList = SchemaUtils.isListWithItemType(node); - // If it's an array, don't emit a class - if (!type.getName().endsWith("[]") && !isSimpleList) { - - // Generate the proper class for either "complex" or "enumeration" types - Vector v = Utils.getEnumerationBaseAndValues(node, symbolTable); - - if (v == null) { - // that's not an enumeration - TypeEntry base = - SchemaUtils.getComplexElementExtensionBase(node, - symbolTable); - - if (base == null) { - base = SchemaUtils.getComplexElementRestrictionBase( - node, symbolTable); - } - - if (base == null) { - QName baseQName = SchemaUtils.getSimpleTypeBase(node); - - if (baseQName != null) { - base = symbolTable.getType(baseQName); - } - } - Vector elements = type.getContainedElements(); - Vector attributes = type.getContainedAttributes(); - - // If this complexType is referenced in a - // fault context, emit a bean-like exception - // class - Boolean isComplexFault = (Boolean) type.getDynamicVar( - JavaGeneratorFactory.COMPLEX_TYPE_FAULT); - - if ((isComplexFault != null) && isComplexFault.booleanValue()) { - - jonasTypeWriter = getBeanHelperWriter(emitter, type, elements, base, attributes, true); - } else { - jonasTypeWriter = getBeanHelperWriter(emitter, type, elements, base, attributes, false); - } - } - } - } - } // ctor - - /** - * Write all the service bindnigs: service and testcase. - * - * @throws IOException if generation of Helper fails - */ - public void generate() throws IOException { - - if (jonasTypeWriter != null) { - jonasTypeWriter.generate(); - } - } - -} // class JavaTypeWriter diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/wscf/JOnASWSCFHandler.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/wscf/JOnASWSCFHandler.java deleted file mode 100644 index 4bb662f8b95d16c82c8d57ca1da55f432d14d45b..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/wscf/JOnASWSCFHandler.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.wscf; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Vector; - -import javax.xml.namespace.QName; - -import org.ow2.jonas.deployment.common.HandlerDesc; - -import org.apache.ws.ews.context.webservices.server.impl.AbstractWSCFHandler; - - - -/** - * JOnAS WSCFHandler implementation. - * That's used to fit into the EWS model. - * @author Guillaume Sauthier - */ -public class JOnASWSCFHandler extends AbstractWSCFHandler { - - /** - * port-name list - */ - private List portNames; - - /** - * @param handler JOnAS Handler implementation - */ - public JOnASWSCFHandler(HandlerDesc handler) { - // handler-class - this.handlerClass = handler.getHandlerClassName(); - // handler-name - this.handlerName = handler.getName(); - - // handler/init-param - this.initParam = new HashMap(); - for (Iterator i = handler.getInitParams().keySet().iterator(); i.hasNext();) { - String paramName = (String) i.next(); - this.initParam.put(paramName, new JOnASWSCFInitParam(paramName, handler.getInitParam(paramName))); - } - - // port-name list - this.portNames = new Vector(); - for (Iterator i = handler.getPortNames().iterator(); i.hasNext();) { - String sr = (String) i.next(); - this.portNames.add(sr); - } - - // soap-header* - this.soapHeader = new Vector(); - for (Iterator i = handler.getSOAPHeaders().iterator(); i.hasNext();) { - QName sh = (QName) i.next(); - this.soapHeader.add(new JOnASWSCFSOAPHeader(sh)); - } - - // soap-roles* - this.soapRole = new Vector(); - for (Iterator i = handler.getSOAPRoles().iterator(); i.hasNext();) { - String sr = (String) i.next(); - this.soapRole.add(sr); - } - } - - /** - * Gets the port name of the handler element - * - * @return port-name - */ - public List getPortNames() { - return portNames; - } -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/wscf/JOnASWSCFInitParam.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/wscf/JOnASWSCFInitParam.java deleted file mode 100644 index 743f2950ebc043ad8a375ab1a87463c5b5b4d15d..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/wscf/JOnASWSCFInitParam.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.wscf; - -import org.apache.ws.ews.context.webservices.server.impl.AbstractWSCFInitParam; - - -/** - * JOnAS WSCFInitParam implementation. - * That's used to fit into the EWS model. - * @author Guillaume Sauthier - */ -public class JOnASWSCFInitParam extends AbstractWSCFInitParam { - - /** - * @param paramName parameter name - * @param initParam parameter value - */ - public JOnASWSCFInitParam(String paramName, String initParam) { - this.paramName = paramName; - this.paramValue = initParam; - } - -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/wscf/JOnASWSCFSOAPHeader.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/wscf/JOnASWSCFSOAPHeader.java deleted file mode 100644 index 5e31eded0129a2f8c60ded71951f5d3d44012c79..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/generator/ews/wsdltoj2ee/wscf/JOnASWSCFSOAPHeader.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * JOnAS : Java(TM) OpenSource Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.generator.ews.wsdltoj2ee.wscf; - -import javax.xml.namespace.QName; - -import org.apache.ws.ews.context.webservices.server.impl.AbstractWSCFSOAPHeader; - - -/** - * JOnAS WSCFSOAPHeader implementation. - * That's used to fit into the EWS model. - * @author Guillaume Sauthier - */ -public class JOnASWSCFSOAPHeader extends AbstractWSCFSOAPHeader { - - /** - * @param sh SOAP Header QName - */ - public JOnASWSCFSOAPHeader(QName sh) { - this.localpart = sh.getLocalPart(); - this.namespaceURI = sh.getNamespaceURI(); - } - -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/modifier/ApplicationModifier.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/modifier/ApplicationModifier.java deleted file mode 100644 index 37fbad8c97e51c2190325cfe7cfc30e33ccad9ec..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/modifier/ApplicationModifier.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2003-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.modifier; - -import java.util.Iterator; -import java.util.jar.Attributes; - -import org.ow2.jonas.Version; -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.archive.Application; -import org.ow2.jonas.generators.genbase.archive.Archive; -import org.ow2.jonas.generators.genbase.archive.Client; -import org.ow2.jonas.generators.genbase.archive.EjbJar; -import org.ow2.jonas.generators.genbase.archive.WebApp; -import org.ow2.jonas.generators.genbase.modifier.AbsApplicationModifier; -import org.ow2.jonas.generators.wsgen.WsGenException; -import org.ow2.jonas.generators.wsgen.generator.GeneratorFactory; - - - -/** - * Modify a given Application. - * @author Guillaume Sauthier - */ -public class ApplicationModifier extends AbsApplicationModifier { - - /** - * Creates a new ApplicationModifier. - * @param archive the Application J2EE archive - * @throws WsGenException if the application modifier cannot be built - */ - public ApplicationModifier(Application archive) throws WsGenException { - super(archive, GeneratorFactory.getInstance().getConfiguration()); - } - - /** - * initialize modifier - */ - protected void init() { - - // fill ejbjar list - for (Iterator i = getApplication().getEjbJars(); i.hasNext();) { - EjbJar ejbjar = (EjbJar) i.next(); - getEjbModifiers().add(new EjbJarModifier(ejbjar)); - } - - // fill webapp list - for (Iterator i = getApplication().getWebApps(); i.hasNext();) { - WebApp webapp = (WebApp) i.next(); - getWebModifiers().add(new WebAppModifier(webapp)); - } - - // fill client list - for (Iterator i = getApplication().getClients(); i.hasNext();) { - Client client = (Client) i.next(); - getCltModifiers().add(new ClientModifier(client)); - } - } - - /** - * Update the Manifest of the Application before modifying it. - * @return Returns the modified Archive. - * @see org.ow2.jonas.generators.genbase.modifier.AbsApplicationModifier#modify() - */ - public Archive modify() throws GenBaseException { - // Update MANIFEST with Version Number - // used to say if WsGen has already been applied to this Module - Attributes main = this.getApplication().getManifest().getMainAttributes(); - main.put(new Attributes.Name(WsGenModifierConstants.WSGEN_JONAS_VERSION_ATTR), Version.getNumber()); - - return super.modify(); - } - - -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/modifier/ClientModifier.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/modifier/ClientModifier.java deleted file mode 100644 index fda91ae8e944d5d07049d6d48c1d07205859632d..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/modifier/ClientModifier.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2003-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.modifier; - -import java.io.File; -import java.util.Iterator; -import java.util.List; -import java.util.jar.Attributes; - -import org.ow2.jonas.Version; -import org.ow2.jonas.deployment.ws.ServiceRefDesc; -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.archive.Archive; -import org.ow2.jonas.generators.genbase.archive.Client; -import org.ow2.jonas.generators.genbase.modifier.ArchiveModifier; -import org.ow2.jonas.generators.wsgen.ddmodifier.WsClientDDModifier; -import org.ow2.jonas.generators.wsgen.generator.Generator; -import org.ow2.jonas.generators.wsgen.generator.GeneratorFactory; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - - - -import org.objectweb.util.monolog.api.BasicLevel; - -/** - * Modify a given Client. - * - * @author Guillaume Sauthier - */ -public class ClientModifier extends ArchiveModifier { - - /** client */ - private Client client; - - /** - * Creates a new ClientModifier object. - * - * @param client Client Archive - */ - public ClientModifier(Client client) { - super(client); - this.client = client; - } - - /** - * Modify the current archive and return a modified archive. - * - * @return a modified archive. - * - * @throws GenBaseException When Client Generation or storing phase fails. - */ - public Archive modify() throws GenBaseException { - - getLogger().log(BasicLevel.INFO, "Processing Client " + client.getName()); - - // Update MANIFEST with Version Number - // used to say if WsGen has already been applied to this Module - Attributes main = this.client.getManifest().getMainAttributes(); - main.put(new Attributes.Name(WsGenModifierConstants.WSGEN_JONAS_VERSION_ATTR), Version.getNumber()); - - GeneratorFactory gf = GeneratorFactory.getInstance(); - Document jclient = client.getJonasClientDoc(); - - List refs = client.getServiceRefDescs(); - for (Iterator i = refs.iterator(); i.hasNext();) { - ServiceRefDesc ref = (ServiceRefDesc) i.next(); - - // create dd modifier - Element base = null; - if (jclient != null) { - base = jclient.getDocumentElement(); - } - WsClientDDModifier ddm = new WsClientDDModifier(ref.getServiceRefName(), jclient, base); - - // launch generation - Generator g = gf.newGenerator(ref, ddm, client); - g.generate(); - g.compile(); - // add files in web archive - g.addFiles(client); - - // update the Document if it was created - // in the meantime - jclient = ddm.getDocument(); - } - - return save(gf.getConfiguration(), "clients" + File.separator + client.getRootFile().getName()); - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/modifier/EjbJarModifier.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/modifier/EjbJarModifier.java deleted file mode 100644 index 8fef43735e0bd89021ad0daa89e7faf93bd524b8..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/modifier/EjbJarModifier.java +++ /dev/null @@ -1,206 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2003-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.modifier; - -import java.io.File; -import java.util.Iterator; -import java.util.List; -import java.util.jar.Attributes; - -import org.objectweb.util.monolog.api.BasicLevel; -import org.ow2.jonas.Version; -import org.ow2.jonas.deployment.ws.ServiceDesc; -import org.ow2.jonas.deployment.ws.ServiceRefDesc; -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.archive.Application; -import org.ow2.jonas.generators.genbase.archive.Archive; -import org.ow2.jonas.generators.genbase.archive.DummyApplication; -import org.ow2.jonas.generators.genbase.archive.DummyWebApp; -import org.ow2.jonas.generators.genbase.archive.Ejb; -import org.ow2.jonas.generators.genbase.archive.EjbJar; -import org.ow2.jonas.generators.genbase.archive.WebApp; -import org.ow2.jonas.generators.genbase.modifier.ArchiveModifier; -import org.ow2.jonas.generators.wsgen.ddmodifier.ContextDDModifier; -import org.ow2.jonas.generators.wsgen.ddmodifier.WebJettyDDModifier; -import org.ow2.jonas.generators.wsgen.ddmodifier.WsClientDDModifier; -import org.ow2.jonas.generators.wsgen.ddmodifier.WsEndpointDDModifier; -import org.ow2.jonas.generators.wsgen.generator.Generator; -import org.ow2.jonas.generators.wsgen.generator.GeneratorFactory; -import org.ow2.jonas.generators.wsgen.generator.SecurityGenerator; -import org.w3c.dom.Document; - -/** - * Modify a given EjbJar. - * - * @author Guillaume Sauthier - */ -public class EjbJarModifier extends ArchiveModifier { - - /** modified ejbjar */ - private EjbJar ejbjar = null; - - /** - * Creates a new EjbJarModifier object. - * - * @param ejbjar EjbJar Archive - */ - public EjbJarModifier(final EjbJar ejbjar) { - super(ejbjar); - this.ejbjar = ejbjar; - } - - /** - * modify the current EjbJar. If EjbJar is contained in not an application - * and have webservices endpoints, A DummyApplication is created and - * modification process launched against the newly created application. If - * EjbJar is contained in an application + webservices endpoints, a - * DummyWebApp is created to hold "facade" servlet managing SOAP processing. - * - * @return an EjbJar or an Application Archive - * - * @throws GenBaseException When generation or storing fails - */ - @Override - public Archive modify() throws GenBaseException { - - getLogger().log(BasicLevel.INFO, "Processing EjbJar " + ejbjar.getName()); - - // MANIFEST attributes - Attributes main = this.ejbjar.getManifest().getMainAttributes(); - - // Add all MANIFEST entries from parent - if (this.getArchive() != null && this.getArchive().getArchive() != null) { - main.putAll(this.getArchive().getArchive().getManifest().getMainAttributes()); - } - - // Update MANIFEST with Version Number - // used to say if WsGen has already been applied to this Module - main.put(new Attributes.Name(WsGenModifierConstants.WSGEN_JONAS_VERSION_ATTR), Version.getNumber()); - - GeneratorFactory gf = GeneratorFactory.getInstance(); - Document jejbjar = ejbjar.getJonasEjbJarDoc(); - - // Webservices endpoint - List sds = ejbjar.getServiceDescs(); - - if (sds.size() != 0) { - if (ejbjar.getApplication() == null) { - // we have webservices outside of an application - - /** - * Process : - create a default Application - add EjbJar within - - * return ApplicationModifier.modify() - */ - String ejbName = ejbjar.getRootFile().getName(); - String earName = ejbName.substring(0, ejbName.length() - ".jar".length()) + ".ear"; - Application application = new DummyApplication(earName); - ejbjar.setApplication(application); - application.addEjbJar(ejbjar); - ApplicationModifier am = new ApplicationModifier(application); - - return am.modify(); - - } else { - // we have webservices inside of an application - - /** - * Process : - create a default WebApp - add in Application - - * iterate over the services - add files in web instead of - * ejbjar - */ - - String warName = null; - String war = ejbjar.getWarName(); - if (war != null) { - warName = war; - } else { - String ejbName = ejbjar.getRootFile().getName(); - String contextName = ejbName.substring(0, ejbName.length() - ".jar".length()); - warName = contextName + ".war"; - } - - Application application = ejbjar.getApplication(); - WebApp web = new DummyWebApp(application, warName); - - for (Iterator i = sds.iterator(); i.hasNext();) { - ServiceDesc sd = (ServiceDesc) i.next(); - - // create dd modifier - WsEndpointDDModifier ddm = new WsEndpointDDModifier(web.getWebAppDoc()); - - // launch generation - Generator g = gf.newGenerator(sd, ddm, null, ejbjar); - g.generate(); - g.compile(); - // add files in web archive - g.addFiles(web); - - //Now generate the security for the web app - Document context = web.getContextDoc(); - if (context == null) { - context = web.newContextDoc(); - } - ContextDDModifier cddm = new ContextDDModifier(context); - Document webJetty = web.getWebJettyDoc(); - if (webJetty == null) { - webJetty = web.newWebJettyDoc(); - } - WebJettyDDModifier wjddm = new WebJettyDDModifier(webJetty); - Document jonaswebservices = ejbjar.getJonasWebservicesDoc(); - SecurityGenerator sm = new SecurityGenerator(jonaswebservices); - sm.generate(ddm, cddm, wjddm); - - - } - // save webapp - application.addWebApp(new WebApp(save(gf.getConfiguration(), - "webapps" + File.separator + web.getName(), web)), ejbjar.getContextRoot()); - } - } - - // add client files - List ejbs = ejbjar.getEjbs(); - for (Iterator i = ejbs.iterator(); i.hasNext();) { - Ejb ejb = (Ejb) i.next(); - List refs = ejb.getServiceRefDescs(); - for (Iterator j = refs.iterator(); j.hasNext();) { - ServiceRefDesc ref = (ServiceRefDesc) j.next(); - - // create dd modifier - WsClientDDModifier ddm = new WsClientDDModifier(ref.getServiceRefName(), jejbjar, ejb.getJonasBeanElement()); - - // launch generation - Generator g = gf.newGenerator(ref, ddm, ejbjar); - g.generate(); - g.compile(); - // add files in web archive - g.addFiles(ejbjar); - } - } - - return save(gf.getConfiguration(), "ejbjars" + File.separator + ejbjar.getRootFile().getName()); - - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/modifier/ModifierFactory.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/modifier/ModifierFactory.java deleted file mode 100644 index b384880b6be77f32950d30b1851fee3af28cc1dd..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/modifier/ModifierFactory.java +++ /dev/null @@ -1,187 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2003-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.modifier; - -import java.io.File; - -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.archive.Application; -import org.ow2.jonas.generators.genbase.archive.Archive; -import org.ow2.jonas.generators.genbase.archive.Client; -import org.ow2.jonas.generators.genbase.archive.EjbJar; -import org.ow2.jonas.generators.genbase.archive.FileArchive; -import org.ow2.jonas.generators.genbase.archive.J2EEArchive; -import org.ow2.jonas.generators.genbase.archive.JarArchive; -import org.ow2.jonas.generators.genbase.archive.WebApp; -import org.ow2.jonas.generators.genbase.modifier.AbsModifierFactory; -import org.ow2.jonas.generators.genbase.modifier.ArchiveModifier; -import org.ow2.jonas.generators.wsgen.WsGenException; -import org.ow2.jonas.lib.util.I18n; -import org.ow2.util.archive.api.IArchive; -import org.ow2.util.archive.impl.ArchiveManager; -import org.ow2.util.ee.deploy.api.deployable.CARDeployable; -import org.ow2.util.ee.deploy.api.deployable.EARDeployable; -import org.ow2.util.ee.deploy.api.deployable.EJBDeployable; -import org.ow2.util.ee.deploy.api.deployable.IDeployable; -import org.ow2.util.ee.deploy.api.deployable.WARDeployable; -import org.ow2.util.ee.deploy.impl.helper.DeployableHelper; -import org.ow2.util.ee.deploy.impl.helper.UnpackDeployableHelper; -import org.ow2.util.url.URLUtils; - -/** - * Used to create the right ArchiveModifier from a given filename (ear, jar, - * war, ... - * @author Guillaume Sauthier - */ -public class ModifierFactory extends AbsModifierFactory { - - /** - * I18n. - */ - private static I18n i18n = I18n.getInstance(ModifierFactory.class); - - /** - * Empty Constructor for utility class. - */ - private ModifierFactory() { - } - - /** - * Returns an ArchiveModifier according to archive type - * (application, ejbjar, webapp or client). - * @param filename input filename. - * @return an ArchiveModifier. - * @exception GenBaseException when archive creation fails. - */ - public static ArchiveModifier getModifier(final String filename) throws GenBaseException { - return getModifier(filename, true, null); - } - - /** - * Returns an ArchiveModifier according to archive type (application, ejbjar, webapp or client). - * @param filename input filename. - * @param init Initialize the archive. - * @param deployable the current deployable (can be null) - * @return an ArchiveModifier. - * @exception GenBaseException when archive creation fails. - */ - public static ArchiveModifier getModifier(final String filename, final boolean init, final IDeployable deployable) - throws GenBaseException { - Archive archive = null; - J2EEArchive j2eeArchive = null; - ArchiveModifier modifier = null; - int mode; - IDeployable localDeployable = null; - - File file = new File(filename); - - if (file.exists()) { - if (file.isFile()) { - // Create the inner Archive - archive = new JarArchive(file); - } else { - // directory unpacked - // Create the inner Archive - archive = new FileArchive(file); - } - - try { - if (deployable == null) { - // Build Archive - IArchive fileArchive = ArchiveManager.getInstance().getArchive(file); - localDeployable = DeployableHelper.getDeployable(fileArchive); - } else { - localDeployable = deployable; - } - } catch (Exception e) { - throw new WsGenException("Cannot get a deployable for the archive '" + archive + "'", e); - } - - // now we are sure that filename is a correct jar - // Workaround for http://bugs.sun.com/view_bug.do?bug_id=6548436 - if (EARDeployable.class.isInstance(localDeployable)) { - if (archive instanceof JarArchive) { - try { - localDeployable = UnpackDeployableHelper.unpack(EARDeployable.class.cast(localDeployable), "genbase"); - archive = new FileArchive(URLUtils.urlToFile(localDeployable.getArchive().getURL())); - } catch (Exception e) { - throw new GenBaseException("Cannot unpack the deployable '" + deployable + "'.", e); - } - } - - // Application J2EE Archive - j2eeArchive = new Application(archive, localDeployable); - mode = APPLICATION; - } else if (EJBDeployable.class.isInstance(localDeployable)) { - // EjbJar J2EE Archive - j2eeArchive = new EjbJar(archive); - mode = EJBJAR; - - } else if (WARDeployable.class.isInstance(localDeployable)) { - // WebApp J2EE Archive - j2eeArchive = new WebApp(archive); - mode = WEBAPP; - - } else if (CARDeployable.class.isInstance(localDeployable)) { - // Client J2EE Archive - j2eeArchive = new Client(archive); - mode = CLIENT; - - } else { - // unsupported archive type - String err = i18n.getMessage("ModifierFactory.getModifier.unsupported", filename); - throw new WsGenException(err); - } - } else { - String err = i18n.getMessage("ModifierFactory.getModifier.notfound", filename); - throw new WsGenException(err); - } - - // init the archive - if (init) { - j2eeArchive.initialize(); - } - - // create the modifier - switch (mode) { - case APPLICATION: - modifier = new ApplicationModifier((Application) j2eeArchive); - break; - case EJBJAR: - modifier = new EjbJarModifier((EjbJar) j2eeArchive); - break; - case WEBAPP: - modifier = new WebAppModifier((WebApp) j2eeArchive); - break; - case CLIENT: - modifier = new ClientModifier((Client) j2eeArchive); - break; - default: - // cannot happen - } - - return modifier; - } -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/modifier/WebAppModifier.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/modifier/WebAppModifier.java deleted file mode 100644 index f85eb90cdde4968146fc1c39865c15830e9f942e..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/modifier/WebAppModifier.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2003-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.wsgen.modifier; - -import java.io.File; -import java.util.Iterator; -import java.util.List; -import java.util.jar.Attributes; - -import org.objectweb.util.monolog.api.BasicLevel; - -import org.ow2.jonas.Version; -import org.ow2.jonas.deployment.ws.ServiceDesc; -import org.ow2.jonas.deployment.ws.ServiceRefDesc; -import org.ow2.jonas.generators.genbase.GenBaseException; -import org.ow2.jonas.generators.genbase.archive.Archive; -import org.ow2.jonas.generators.genbase.archive.WebApp; -import org.ow2.jonas.generators.genbase.modifier.ArchiveModifier; -import org.ow2.jonas.generators.wsgen.ddmodifier.ContextDDModifier; -import org.ow2.jonas.generators.wsgen.ddmodifier.WebJettyDDModifier; -import org.ow2.jonas.generators.wsgen.ddmodifier.WebServicesDDModifier; -import org.ow2.jonas.generators.wsgen.ddmodifier.WsClientDDModifier; -import org.ow2.jonas.generators.wsgen.ddmodifier.WsEndpointDDModifier; -import org.ow2.jonas.generators.wsgen.generator.Generator; -import org.ow2.jonas.generators.wsgen.generator.GeneratorFactory; -import org.ow2.jonas.generators.wsgen.generator.SecurityGenerator; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -/** - * Modify a given WebApp. - * - * @author Guillaume Sauthier - */ -public class WebAppModifier extends ArchiveModifier { - - /** webapp */ - private WebApp web; - - /** - * Creates a new WebAppModifier - * - * @param webapp - * the WebApp J2EE archive - */ - public WebAppModifier(WebApp webapp) { - super(webapp); - web = webapp; - } - - /** - * Modify the current archive and return a modified archive. - * - * @return a modified archive. - * - * @throws GenBaseException - * When modification fails - */ - public Archive modify() throws GenBaseException { - - getLogger().log(BasicLevel.INFO, "Processing WebApp " + web.getName()); - - // Update MANIFEST with Version Number - // used to say if WsGen has already been applied to this Module - Attributes main = this.web.getManifest().getMainAttributes(); - main.put(new Attributes.Name(WsGenModifierConstants.WSGEN_JONAS_VERSION_ATTR), Version.getNumber()); - - GeneratorFactory gf = GeneratorFactory.getInstance(); - Document jwebapp = web.getJonasWebAppDoc(); - Document webapp = web.getWebAppDoc(); - Document webservices = web.getWebservicesDoc(); - Document jonasWebservices = web.getJonasWebservicesDoc(); - - List refs = web.getServiceRefDescs(); - - for (Iterator i = refs.iterator(); i.hasNext();) { - ServiceRefDesc ref = (ServiceRefDesc) i.next(); - - // create dd modifier - Element base = null; - if (jwebapp != null) { - base = jwebapp.getDocumentElement(); - } - WsClientDDModifier ddm = new WsClientDDModifier(ref.getServiceRefName(), jwebapp, base); - - // launch generation - Generator g = gf.newGenerator(ref, ddm, web); - g.generate(); - g.compile(); - - // add files in web archive - g.addFiles(web); - - // update the Document if it was created - // in the meantime - jwebapp = ddm.getDocument(); - - } - - // create dd modifier - WsEndpointDDModifier ddm = new WsEndpointDDModifier(webapp); - WebServicesDDModifier wsddm = null; - if (webservices != null) { - wsddm = new WebServicesDDModifier(webservices); - } - - List sds = web.getServiceDescs(); - - for (Iterator i = sds.iterator(); i.hasNext();) { - ServiceDesc sd = (ServiceDesc) i.next(); - - // launch generation - Generator g = gf.newGenerator(sd, ddm, wsddm, web); - g.generate(); - g.compile(); - - // add files in web archive - g.addFiles(web); - - //Now generate the security for the web app - Document context = web.getContextDoc(); - if (context == null) { - context = web.newContextDoc(); - } - ContextDDModifier cddm = new ContextDDModifier(context); - Document webJetty = web.getWebJettyDoc(); - if (webJetty == null) { - webJetty = web.newWebJettyDoc(); - } - WebJettyDDModifier wjddm = new WebJettyDDModifier(webJetty); - SecurityGenerator sm = new SecurityGenerator(jonasWebservices); - sm.generate(ddm, cddm, wjddm); - - } - - return save(gf.getConfiguration(), "webapps" + File.separator - + web.getName()); - } -} \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/modifier/WsGenModifierConstants.java b/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/modifier/WsGenModifierConstants.java deleted file mode 100644 index 3c75f4b4728694095ca2f7560380f38921fc60de..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/java/org/ow2/jonas/generators/wsgen/modifier/WsGenModifierConstants.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.wsgen.modifier; - -/** - * Modifier Constants for WsGen. - * - * @author Guillaume Sauthier - */ -public interface WsGenModifierConstants { - - /** - * Manifest Attribute for WsGen. - * Injected in the Manifest for updated archive. - */ - String WSGEN_JONAS_VERSION_ATTR = "WsGen-JOnAS-Version"; - -} diff --git a/jonas/modules/generators/jonas-wsgen/src/main/resources/META-INF/jonas-generators-wsgen.bnd b/jonas/modules/generators/jonas-wsgen/src/main/resources/META-INF/jonas-generators-wsgen.bnd deleted file mode 100644 index 5d390b4779197f96ca3b42d6e1c46c766b03c3bc..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/resources/META-INF/jonas-generators-wsgen.bnd +++ /dev/null @@ -1,34 +0,0 @@ -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 2007-2009 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -Export-Package org.ow2.jonas.generators.wsgen, \ - org.ow2.jonas.generators.wsgen.wrapper - -Private-Package org.ow2.jonas.generators.wsgen.*;-split-package:=merge-first - -Import-Package !org.apache.velocity.*,\ - javax.xml.namespace,\ - org.apache.xmlbeans.impl.schema,\ - * - -Embed-Dependency ews-mapper;inline=true \ No newline at end of file diff --git a/jonas/modules/generators/jonas-wsgen/src/main/resources/org/ow2/jonas/generators/wsgen/generator/I18n.properties b/jonas/modules/generators/jonas-wsgen/src/main/resources/org/ow2/jonas/generators/wsgen/generator/I18n.properties deleted file mode 100644 index 8f10e42f12a1dc5d9b70f29e0c3b145bd4dddf93..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/resources/org/ow2/jonas/generators/wsgen/generator/I18n.properties +++ /dev/null @@ -1,7 +0,0 @@ -# $Id$ - -GeneratorFactory.newInstance.instance Cannot instanciate ''{0}'' GeneratorFactory - -Generator.constr.ioe Cannot create temporary directories - -Generator.compile.error=Error when running javac for WebServices clients compilation. diff --git a/jonas/modules/generators/jonas-wsgen/src/main/resources/org/ow2/jonas/generators/wsgen/generator/axis/I18n.properties b/jonas/modules/generators/jonas-wsgen/src/main/resources/org/ow2/jonas/generators/wsgen/generator/axis/I18n.properties deleted file mode 100644 index 8f43bc4de5d8beee1bdff52f584c2e74b5b36719..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/resources/org/ow2/jonas/generators/wsgen/generator/axis/I18n.properties +++ /dev/null @@ -1,15 +0,0 @@ -# $Id$ - -JVelocity.constr.initFailure Cannot initialize the Velocity engine -JVelocity.constr.tmplError Cannot get the ''{0}'' template file -JVelocity.constr.notset System property 'jonas.root' not set - -JVelocity.generate.directories Cannot create the directory ''{0}'' -JVelocity.generate.file Cannot create the ''{0}'' file -JVelocity.generate.cannot Cannot generate the file ''{0}'' from the template. -JVelocity.generate.close Cannot close the file ''{0}'' - -AxisWsEndpointGenerator.generate.illegal ''{0}'' is not a WebApp instance -AxisWsClientGenerator.generate.wsdl Cannot retrieve WSDL file ''{0}'' from ''{1}'' - -AxisWsClientGenerator.generate.WSDL2Java Error when running axis WSDL2Java tool. diff --git a/jonas/modules/generators/jonas-wsgen/src/main/resources/org/ow2/jonas/generators/wsgen/generator/axis/deploy_client.vm b/jonas/modules/generators/jonas-wsgen/src/main/resources/org/ow2/jonas/generators/wsgen/generator/axis/deploy_client.vm deleted file mode 100644 index 9ba17a831f997cd5dd19ed2040b36135aa4d8a59..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/resources/org/ow2/jonas/generators/wsgen/generator/axis/deploy_client.vm +++ /dev/null @@ -1,32 +0,0 @@ - - - - -#foreach ($pc in $portComponents) - - - #foreach ($handler in $pc.getHandlers()) - - ## pour chaque init parameter - #foreach ($param in $handler.getInitParameters()) - - #end - ## pour chaque header - #foreach ($header in $handler.getHeaders()) -
    - #end - - #foreach ($role in $handler.getSoapRoles()) - - #end - #end - - -#end - -#foreach ($mapping in $mappings) - $mapping.toString() -#end - - diff --git a/jonas/modules/generators/jonas-wsgen/src/main/resources/org/ow2/jonas/generators/wsgen/generator/axis/deploy_endpoint.vm b/jonas/modules/generators/jonas-wsgen/src/main/resources/org/ow2/jonas/generators/wsgen/generator/axis/deploy_endpoint.vm deleted file mode 100644 index 54de608d445e5d6e00a8393a06dd8e3be18ac539..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/resources/org/ow2/jonas/generators/wsgen/generator/axis/deploy_endpoint.vm +++ /dev/null @@ -1,87 +0,0 @@ - - - - -#* *##foreach ($pc in $portComponents) -## start foreach pc - -#if ($pc.getWSDLFilename()) - $pc.getWSDLFilename() -#end -#if ($pc.getNamespace()) - - $pc.getNamespace() -#end - - -#if ($provider == "JOnASEJB") -## start if ejb -#set ($bean = $pc.getBean()) - - - - - -#foreach ($handler in $pc.getHandlers()) -##start foreach handlers - -## pour chaque init parameter -#foreach ($param in $handler.getInitParameters()) - -#end -## pour chaque header -#foreach ($header in $handler.getHeaders()) -
    -#end - -#foreach ($role in $handler.getSoapRoles()) - -#end -#end -## end foreach handlers - -#end -## end if ejb -#if ($provider == "RPC") -## start if rpc - -#if ($pc.getMethods().length() != 0) - -#else - -#end - -#foreach ($handler in $pc.getHandlers()) -##start foreach handlers - -## pour chaque init parameter -#foreach ($param in $handler.getInitParameters()) - -#end -## pour chaque header -#foreach ($header in $handler.getHeaders()) -
    -#end - -#end -## end foreach handlers - -#end -## end if rpc - - -#* *##end -## end foreach pc - -#foreach ($mapping in $mappings) - $mapping.toString() -#end - diff --git a/jonas/modules/generators/jonas-wsgen/src/main/resources/org/ow2/jonas/generators/wsgen/generator/ews/I18n.properties b/jonas/modules/generators/jonas-wsgen/src/main/resources/org/ow2/jonas/generators/wsgen/generator/ews/I18n.properties deleted file mode 100644 index c3f7a20720034fe96b2629078c1f395acf580fe1..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/resources/org/ow2/jonas/generators/wsgen/generator/ews/I18n.properties +++ /dev/null @@ -1,7 +0,0 @@ -# $Id$ - -AxisWsEndpointGenerator.generate.illegal ''{0}'' is not a WebApp instance -AxisWsClientGenerator.generate.wsdl Cannot retrieve WSDL file ''{0}'' from ''{1}'' - -EWSWsClientGenerator.generate.WSDL2Java Error when running axis WSDL2Java tool. ''{0}'' -EWSWsEndpointGenerator.generate.WSDL2Java Error when generating server-side deploy file for ''{0}''. ''{1}'' diff --git a/jonas/modules/generators/jonas-wsgen/src/main/resources/org/ow2/jonas/generators/wsgen/modifier/I18n.properties b/jonas/modules/generators/jonas-wsgen/src/main/resources/org/ow2/jonas/generators/wsgen/modifier/I18n.properties deleted file mode 100644 index 58bcd33df55fb717037e9e22927390a98d805f9f..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/jonas-wsgen/src/main/resources/org/ow2/jonas/generators/wsgen/modifier/I18n.properties +++ /dev/null @@ -1,5 +0,0 @@ -# $Id$ - -ModifierFactory.getModifier.notfound file not found ''{0}'' -ModifierFactory.getModifier.notjar ''{0}'' is not a jar file -ModifierFactory.getModifier.unsupported ''{0}'' is not a supported jar archive (should be EjbJar, WebApp, Client or Application) diff --git a/jonas/modules/generators/pom.xml b/jonas/modules/generators/pom.xml deleted file mode 100644 index e0fe01d54e9ec622bdf1054a4f8784627c0dde31..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/pom.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - org.ow2.jonas - jonas-modules - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - - jonas-generators - JOnAS :: Generators - - pom - - jonas-genbase - jonas-genclientstub - jonas-wsgen - jonas-genic - raconfig - - \ No newline at end of file diff --git a/jonas/modules/generators/raconfig/pom.xml b/jonas/modules/generators/raconfig/pom.xml deleted file mode 100644 index 579d3c716dddd9a77b585c169a639b7f5772d8cb..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/raconfig/pom.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - org.ow2.jonas - jonas-generators - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - - jonas-generators-raconfig - bundle - JOnAS :: Generators :: RAConfig - - - - org.ow2.jonas - jonas-commons - ${project.version} - - - org.ow2.jonas - jonas-naming - ${project.version} - - - org.ow2.jonas - jonas-deployment - ${project.version} - - - \ No newline at end of file diff --git a/jonas/modules/generators/raconfig/src/main/java/org/ow2/jonas/generators/raconfig/RAConfig.java b/jonas/modules/generators/raconfig/src/main/java/org/ow2/jonas/generators/raconfig/RAConfig.java deleted file mode 100644 index 696b6907b8cdd8e220582bb09c210a8cedf49fda..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/raconfig/src/main/java/org/ow2/jonas/generators/raconfig/RAConfig.java +++ /dev/null @@ -1,931 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2010 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): ____________________________________. - * Contributor(s): Eric Hardesty - * - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.generators.raconfig; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; -import java.io.InputStream; -import java.util.Enumeration; -import java.util.Iterator; -import java.util.Properties; -import java.util.zip.ZipEntry; -import java.util.zip.ZipFile; -import java.util.zip.ZipOutputStream; - -import javax.naming.Context; - -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.rar.ConfigPropertyDesc; -import org.ow2.jonas.deployment.rar.RarDeploymentDesc; -import org.ow2.jonas.deployment.rar.RarDeploymentDescException; -import org.ow2.jonas.deployment.rar.lib.RarDeploymentDescManager; -import org.ow2.jonas.deployment.rar.xml.Activationspec; -import org.ow2.jonas.deployment.rar.xml.Adminobject; -import org.ow2.jonas.deployment.rar.xml.ConfigProperty; -import org.ow2.jonas.deployment.rar.xml.ConnectionDefinition; -import org.ow2.jonas.deployment.rar.xml.Connector; -import org.ow2.jonas.deployment.rar.xml.InboundResourceadapter; -import org.ow2.jonas.deployment.rar.xml.JdbcConnParams; -import org.ow2.jonas.deployment.rar.xml.JonasActivationspec; -import org.ow2.jonas.deployment.rar.xml.JonasAdminobject; -import org.ow2.jonas.deployment.rar.xml.JonasConfigProperty; -import org.ow2.jonas.deployment.rar.xml.JonasConnectionDefinition; -import org.ow2.jonas.deployment.rar.xml.JonasConnector; -import org.ow2.jonas.deployment.rar.xml.JonasSecurityMapping; -import org.ow2.jonas.deployment.rar.xml.Messageadapter; -import org.ow2.jonas.deployment.rar.xml.Messagelistener; -import org.ow2.jonas.deployment.rar.xml.OutboundResourceadapter; -import org.ow2.jonas.deployment.rar.xml.PoolParams; -import org.ow2.jonas.deployment.rar.xml.RequiredConfigProperty; -import org.ow2.jonas.deployment.rar.xml.Resourceadapter; -import org.ow2.jonas.deployment.rar.xml.SecurityEntry; -import org.ow2.jonas.lib.naming.ComponentContext; -import org.ow2.jonas.lib.util.Base64; - -/** - * This class may be used to parse a resource adapter deployment descriptor and - * generate the corresponding properties files for the jca service java RAConfig - * -j jndiname -r rarlink -verbose java - * org.ow2.jonas.generators.raconfig.RAConfig -u jonas-ra.xml java - * org.ow2.jonas.generators.raconfig.RAConfig -dm -p db.properties - * - */ -public class RAConfig { - - /** - * Buffer Size - */ - private static final int BUFFER_SIZE = 500; - - /** JCA 1.5 */ - private static final double JCA_1_5 = 1.5; - - /** JCA 1.0 */ - private static final double JCA_1_0 = 1.0; - - RarDeploymentDesc rarDD = null; - - /** - * Validate the XML - */ - private static boolean validation = true; - - /** - * jonas-ra.xml XML filename - */ - private static final String JONAS_RA_FILENAME = "META-INF/jonas-ra.xml"; - - /** - * Constructor - */ - public RAConfig(final String fileName) throws RAConfigException { - ClassLoader curLoader = Thread.currentThread().getContextClassLoader(); - - try { - RarDeploymentDescManager.setParsingWithValidation(validation); - rarDD = getRarDD(fileName, curLoader); - } catch (Exception e) { - throw new RAConfigException(e); - } - - } - - /** - * Get an instance of an RAR deployment descriptor by parsing the ra.xml and - * jonas-ra.xml deployment descriptors. - * @param rarFileName the fileName of the rar file for the deployment - * descriptors. - * @param classLoader the classloader for the classes. - * @return an RAR deployment descriptor by parsing the ra.xml & jonas-ra.xml - * deployment descriptors. - * @throws DeploymentDescException if the deployment descriptors are - * corrupted. - */ - private RarDeploymentDesc getRarDD(final String rarFileName, final ClassLoader classLoader) throws DeploymentDescException { - - // The context to give for the creation of an instance - // of RarDeploymentDesc - Context contctx = null; - try { - contctx = new ComponentContext(rarFileName); - contctx.rebind("rarFileName", rarFileName); - contctx.rebind("classloader", classLoader); - } catch (Exception e) { - // An exception occurred trying to bind context - // logger.log(BasicLevel.ERROR, "Error when binding context for - // RarDeploymentDesc for '" + rarFileName + "'"); - // logger.log(BasicLevel.ERROR, e.getMessage()); - - throw new RarDeploymentDescException("Error during the deployment", e); - } - // want both ra.xml & jonas-ra.xml - return RarDeploymentDescManager.getInstance(contctx); - } - - public RarDeploymentDesc getRarDeploymentDesc() { - return rarDD; - } - - /** - * Process the ra.xml file in the input rar file and build the corresponding - * jonas-ra.xml. If the -p argument is specified, then retrieve the - * appropriate configuration values to pre-configure the corrsponding JDBC - * RA config properties. - * @param fileInputName String file name - * @param jndiname String jndi name - * @param rarlink String rar link - * @param dbProps Properties - * @param encrypt boolean - * @param securityfile String security file - * @param path String path - * @param isVerbose boolean - * @param createNew boolean - * @throws RAConfigException if an Exception occurs - */ - private static void buildXML(final String fileInputName, String jndiname, final String rarlink, final Properties dbProps, final boolean encrypt, - final String securityfile, final String path, final boolean isVerbose, final boolean createNew) throws RAConfigException { - - // Check if jonas-ra.xml already exists and return it - if (!createNew) { - boolean ext = extractJonasRAXml(fileInputName, path); - if (ext) { - return; - } - } - - RAConfig raxml = new RAConfig(fileInputName); - Connector conn = raxml.getRarDeploymentDesc().getConnector(); - double specVersion = 0.0; - ConfigPropertyDesc[] raProps = raxml.getRarDeploymentDesc().getRaConfigPropTags(); - if (raProps == null) { - throw new RAConfigException("RAR file doesn't contain ra.xml"); - } - if (conn.getSpecVersion().equals("1.0")) { - specVersion = JCA_1_0; - } else if (conn.getSpecVersion().equals("1.5")) { - specVersion = JCA_1_5; - } else { - throw new RAConfigException("ra.xml doesn't correct spec version"); - } - - JonasConnector jConn = new JonasConnector(); - PoolParams jPool = new PoolParams(); - JdbcConnParams jConnParams = new JdbcConnParams(); - JonasConfigProperty jCfg = null; - - String val = ""; - String str = ""; - - val = "0"; - if (dbProps.getProperty("jdbc.initconpool") != null && dbProps.getProperty("jdbc.initconpool").length() > 0) { - val = dbProps.getProperty("jdbc.initconpool").trim(); - } - jPool.setPoolInit(val); - - val = "0"; - if (dbProps.getProperty("jdbc.minconpool") != null && dbProps.getProperty("jdbc.minconpool").length() > 0) { - val = dbProps.getProperty("jdbc.minconpool").trim(); - } - jPool.setPoolMin(val); - - val = "-1"; - if (dbProps.getProperty("jdbc.maxconpool") != null && dbProps.getProperty("jdbc.maxconpool").length() > 0) { - val = dbProps.getProperty("jdbc.maxconpool").trim(); - } - jPool.setPoolMax(val); - - val = "0"; - if (dbProps.getProperty("jdbc.connmaxage") != null && dbProps.getProperty("jdbc.connmaxage").length() > 0) { - val = dbProps.getProperty("jdbc.connmaxage").trim(); - } - jPool.setPoolMaxAgeMinutes(val); - - val = "0"; - if (dbProps.getProperty("jdbc.maxopentime") != null && dbProps.getProperty("jdbc.maxopentime").length() > 0) { - val = dbProps.getProperty("jdbc.maxopentime").trim(); - } - jPool.setPoolMaxOpentime(val); - - val = "0"; - if (dbProps.getProperty("jdbc.maxwaiters") != null && dbProps.getProperty("jdbc.maxwaiters").length() > 0) { - val = dbProps.getProperty("jdbc.maxwaiters").trim(); - } - jPool.setPoolMaxWaiters(val); - - val = "0"; - if (dbProps.getProperty("jdbc.maxwaittime") != null && dbProps.getProperty("jdbc.maxwaittime").length() > 0) { - val = dbProps.getProperty("jdbc.maxwaittime").trim(); - } - jPool.setPoolMaxWaittime(val); - - val = "30"; - if (dbProps.getProperty("jdbc.samplingperiod") != null && dbProps.getProperty("jdbc.samplingperiod").length() > 0) { - val = dbProps.getProperty("jdbc.samplingperiod").trim(); - } - jPool.setPoolSamplingPeriod(val); - - val = "10"; - if (dbProps.getProperty("jdbc.pstmtmax") != null && dbProps.getProperty("jdbc.pstmtmax").length() > 0) { - val = dbProps.getProperty("jdbc.pstmtmax").trim(); - } - jPool.setPstmtMax(val); - - jConn.setLogEnabled("false"); - jConn.setLogTopic(""); - jConn.setNativeLib(""); - if (jndiname.length() == 0) { - jndiname = dbProps.getProperty("datasource.name", "").trim(); - } - - val = "0"; - if (dbProps.getProperty("jdbc.connchecklevel") != null && dbProps.getProperty("jdbc.connchecklevel").length() > 0) { - val = dbProps.getProperty("jdbc.connchecklevel").trim(); - } - jConnParams.setJdbcCheckLevel(val); - - val = ""; - if (dbProps.getProperty("jdbc.connteststmt") != null && dbProps.getProperty("jdbc.connteststmt").length() > 0) { - val = dbProps.getProperty("jdbc.connteststmt").trim(); - jConnParams.setJdbcTestStatement(val); - } - - if (specVersion == JCA_1_0) { - jConn.setJndiName(jndiname); - } - jConn.setRarlink(rarlink); - jConn.setPoolParams(jPool); - jConn.setJdbcConnParams(jConnParams); - - if (specVersion == JCA_1_0) { - val = ""; - str = ""; - for (int i = 0; i < raProps.length; i++) { - jCfg = new JonasConfigProperty(); - str = raProps[i].getConfigPropertyName(); - jCfg.setJonasConfigPropertyName(str); - if (dbProps.size() > 0) { - val = getProp(dbProps, str); - } else { - val = ""; - } - jCfg.setJonasConfigPropertyValue(val); - jConn.addJonasConfigProperty(jCfg); - } - } else if (specVersion == JCA_1_5) { - Resourceadapter rAdapter = conn.getResourceadapter(); - ConfigProperty cProperty = null; - // TODO rProperty never used !!! - RequiredConfigProperty rProperty = null; - // Process config properties if they exist - for (Iterator i = rAdapter.getConfigPropertyList().iterator(); i.hasNext();) { - cProperty = (ConfigProperty) i.next(); - jCfg = new JonasConfigProperty(); - str = cProperty.getConfigPropertyName(); - jCfg.setJonasConfigPropertyName(str); - if (dbProps.size() > 0) { - val = getProp(dbProps, str); - } else { - val = ""; - } - jCfg.setJonasConfigPropertyValue(val); - jConn.addJonasConfigProperty(jCfg); - } - - // is it the first jonas-connection-definition - boolean first = true; - - // Now process the outbound-resourceadapter - OutboundResourceadapter oRes = rAdapter.getOutboundResourceadapter(); - if (oRes != null) { - ConnectionDefinition cDef = null; - JonasConnectionDefinition jcDef = null; - for (Iterator it = oRes.getConnectionDefinitionList().iterator(); it.hasNext();) { - cDef = (ConnectionDefinition) it.next(); - jcDef = new JonasConnectionDefinition(); - jcDef.setId(cDef.getId()); - jcDef.addDescription(cDef.getManagedconnectionfactoryClass()); - - // This allows the jndi name to be set for the first - // jonas-connection-definition - // with a 1.5 version of the connector. - if (first && (jndiname.length() != 0)) { - jcDef.setJndiName(jndiname); - first = false; - } else { - jcDef.setJndiName(""); - } - - for (Iterator i = cDef.getConfigPropertyList().iterator(); i.hasNext();) { - cProperty = (ConfigProperty) i.next(); - jCfg = new JonasConfigProperty(); - str = cProperty.getConfigPropertyName(); - jCfg.setJonasConfigPropertyName(str); - jCfg.setJonasConfigPropertyValue(""); - jcDef.addJonasConfigProperty(jCfg); - } - jConn.addJonasConnectionDefinition(jcDef); - } - } - // Now process the inbound-resourceadapter - InboundResourceadapter iRes = rAdapter.getInboundResourceadapter(); - if (iRes != null) { - Messageadapter mAdapter = iRes.getMessageadapter(); - if (mAdapter != null) { - Messagelistener mList = null; - JonasActivationspec jaSpec = null; - Activationspec aSpec = null; - for (Iterator it = mAdapter.getMessagelistenerList().iterator(); it.hasNext();) { - mList = (Messagelistener) it.next(); - aSpec = mList.getActivationspec(); - if (aSpec != null) { - jaSpec = new JonasActivationspec(); - jaSpec.setId(mList.getId()); - jaSpec.addDescription(mList.getMessagelistenerType()); - jaSpec.setJndiName(""); - jConn.addJonasActivationspec(jaSpec); - } - } - } - } - // Now process the adminobject - for (Iterator it = rAdapter.getAdminobjectList().iterator(); it.hasNext();) { - Adminobject aObj = (Adminobject) it.next(); - JonasAdminobject jaObj = null; - if (aObj != null) { - jaObj = new JonasAdminobject(); - jaObj.setJonasAdminobjectinterface(aObj.getAdminobjectInterface()); - jaObj.setJonasAdminobjectclass(aObj.getAdminobjectClass()); - jaObj.setId(aObj.getId()); - jaObj.addDescription(aObj.getAdminobjectClass()); - jaObj.setJndiName(""); - // Process config properties if they exist - for (Iterator i = aObj.getConfigPropertyList().iterator(); i.hasNext();) { - cProperty = (ConfigProperty) i.next(); - jCfg = new JonasConfigProperty(); - str = cProperty.getConfigPropertyName(); - jCfg.setJonasConfigPropertyName(str); - jCfg.setJonasConfigPropertyValue(""); - jaObj.addJonasConfigProperty(jCfg); - } - jConn.addJonasAdminobject(jaObj); - } - } - } - - if (securityfile != null) { - Properties secProps = new Properties(); - File f = null; - try { - f = new File(securityfile); - FileInputStream is = new FileInputStream(f); - secProps.load(is); - } catch (FileNotFoundException e) { - System.err.println("Cannot find security properties file: " + securityfile); - System.err.println("Continuing with creation of jonas-ra.xml"); - } catch (IOException e) { - System.err.println(e); - } - - JonasSecurityMapping jsMap = new JonasSecurityMapping(); - String pName = null; - String user = null; - String pass = null; - String tmp = null; - int offset = 0; - SecurityEntry sEnt = null; - for (Enumeration e = secProps.propertyNames(); e.hasMoreElements();) { - pName = (String) e.nextElement(); - tmp = secProps.getProperty(pName); - offset = tmp.indexOf("::"); - if (offset < 0) { - System.err.println("Error in format of file: principalName = user::password"); - continue; - } - user = tmp.substring(0, offset); - pass = tmp.substring(offset + 2); - - sEnt = new SecurityEntry(); - sEnt.setPrincipalName(pName); - sEnt.setUser(user); - if (encrypt) { - try { - pass = new String(Base64.encode(pass.getBytes())); - sEnt.setEncrypted("" + encrypt); - } catch (Exception ex) { - System.err.println("Unable to encrypt the password."); - } - } - sEnt.setPassword(pass); - jsMap.addSecurityEntry(sEnt); - } - jConn.setJonasSecurityMapping(jsMap); - } - - try { - String tmpDir = path; - if (path.length() == 0) { - tmpDir = System.getProperty("java.io.tmpdir"); - } - String fileName = tmpDir; - int fileLen = fileName.length(); - if (fileName.charAt(fileLen - 1) != File.separatorChar) { - fileName += File.separatorChar; - } - fileName += "jonas-ra.xml"; - FileWriter fw = new FileWriter(fileName); - fw.write(jConn.toXML()); - fw.close(); - if (isVerbose) { - System.out.println("Build Jonas Specific DD File '" + fileName + "' OK"); - } - - } catch (Exception e) { - throw new RAConfigException("Error writing output", e); - } - } - - /** - * Mapping routine for the JDBC RA config values and the existing - * .properties values. - * @param prop Properties - * @param str String - * @return String - */ - private static String getProp(final Properties prop, final String str) { - // ra-keys | properties-keys - String[][] mapping = { {"connCheckLevel", "jdbc.connchecklevel"}, {"connMaxAge", "jdbc.connmaxage"}, - {"connTestStmt", "jdbc.connteststmt"}, {"URL", "datasource.url"}, {"dsClass", "datasource.classname"}, - {"user", "datasource.username"}, {"password", "datasource.password"}, - {"isolationLevel", "datasource.isolationlevel"}, {"mapperName", "datasource.mapper"},}; - - String ret = ""; - for (int i = 0; i < mapping.length; i++) { - if (mapping[i][0].equalsIgnoreCase(str)) { - String value = prop.getProperty(mapping[i][1]); - if (value == null) { - ret = ""; - } else { - ret = value.trim(); - } - } - } - - return ret; - } - - /** - * Update the RAR file - * @param infile String input RAR file - * @param outfile String output RAR file - * @param updatename String update file - * @param rarlink String RAR link - * @throws RAConfigException to throw if an Exception occurs - */ - private static void updateRAR(final String infile, final String outfile, final String updatename, final String rarlink) throws RAConfigException { - - ZipOutputStream zipOutput = null; - ZipFile zipFile = null; - Enumeration zippedFiles = null; - ZipEntry currEntry = null; - ZipEntry entry = null; - byte[] buffer = new byte[BUFFER_SIZE]; - int num = 0; - - String filename = infile; - String outfilename = infile; - boolean outNew = false; - if (outfile != null && outfile.length() != 0) { - outfilename = outfile; - outNew = true; - } - - try { - File file = new File(filename); - if (file.exists()) { - zipFile = new ZipFile(file.getAbsolutePath()); - // get an enumeration of all existing entries - zippedFiles = zipFile.entries(); - // create your output zip file - if (!outNew) { - zipOutput = new ZipOutputStream(new FileOutputStream(new File(file.getAbsolutePath() + "NEW"))); - } else { - File ofile = new File(outfilename); - if (ofile.exists()) { - ofile.delete(); - } - - zipOutput = new ZipOutputStream(new FileOutputStream(new File(outfilename))); - } - // Get all the data out of the previously zipped files and - // write - // it to a new ZipEntry to go into a new file archive - if ((outfile == null || outfile.length() == 0) && rarlink.length() == 0) { - while (zippedFiles.hasMoreElements()) { - // Retrieve entry of existing files - currEntry = (ZipEntry) zippedFiles.nextElement(); - if (currEntry.getName().equalsIgnoreCase(JONAS_RA_FILENAME)) { - continue; - } - // Read data from existing file - zipOutput.putNextEntry(new ZipEntry(currEntry.getName())); - InputStream reader = zipFile.getInputStream(currEntry); - while ((num = reader.read(buffer)) != -1) { - zipOutput.write(buffer, 0, num); - } - // Commit the data - zipOutput.flush(); - zipOutput.closeEntry(); - } - } - // Close the old zip file - zipFile.close(); - - // Write the 'new' file to the archive, commit, and close - entry = new ZipEntry(JONAS_RA_FILENAME); - zipOutput.putNextEntry(entry); - - // Read data from existing file - try { - BufferedReader reader = new BufferedReader(new FileReader(updatename)); - int ch = 0; - while ((ch = reader.read()) != -1) { - zipOutput.write(ch); - } - } catch (Exception ex) { - System.out.println("Error reading input file: " + updatename + " " + ex); - // Commit the data - zipOutput.flush(); - zipOutput.closeEntry(); - zipOutput.finish(); - zipOutput.close(); - } - // Commit the data - zipOutput.flush(); - zipOutput.closeEntry(); - zipOutput.finish(); - zipOutput.close(); - - if (!outNew) { - // delete the old file and rename the new one - File toBeDeleted = new File(file.getAbsolutePath()); - toBeDeleted.delete(); - File toBeRenamed = new File(file.getAbsolutePath() + "NEW"); - toBeRenamed.renameTo(file); - } - } else { - // create your output zip file - zipOutput = new ZipOutputStream(new FileOutputStream(new File(outfilename))); - - // Write the file to the archive, commit, and close - entry = new ZipEntry(JONAS_RA_FILENAME); - zipOutput.putNextEntry(entry); - // Read data from existing file - BufferedReader reader = new BufferedReader(new FileReader(updatename)); - int ch = 0; - while ((ch = reader.read()) != -1) { - zipOutput.write(ch); - } - - // Commit the data - zipOutput.flush(); - zipOutput.closeEntry(); - zipOutput.finish(); - zipOutput.close(); - } - // finally, we delete generated jonas-ra.xml - new File(updatename).delete(); - } catch (Exception ex) { - throw new RAConfigException(ex); - } - - } - - /** - * Extract the jonas-ra.xml file if it exists in the rar - * @param infile String rar file name - * @param path String path - */ - private static boolean extractJonasRAXml(final String infile, final String path) { - ZipFile zipFile = null; - ZipEntry entry = null; - byte[] buffer = new byte[BUFFER_SIZE]; - - String filename = infile; - File file = new File(filename); - if (file.exists()) { - try { - zipFile = new ZipFile(file.getAbsolutePath()); - entry = zipFile.getEntry(JONAS_RA_FILENAME); - if (entry != null) { - InputStream input = zipFile.getInputStream(entry); - String tmpDir = path; - if (path.length() == 0) { - tmpDir = System.getProperty("java.io.tmpdir"); - } - String fileName = tmpDir; - int fileLen = fileName.length(); - if (fileName.charAt(fileLen - 1) != File.separatorChar) { - fileName += File.separatorChar; - } - fileName += "jonas-ra.xml"; - - FileOutputStream output = new FileOutputStream(fileName); - for (int j = 0;;) { - int length = input.read(buffer); - if (length <= 0) { - break; - } - output.write(buffer, 0, length); - } - output.close(); - return true; - } - } catch (Exception ex) { - return false; - } - } - return false; - } - - /** - * Usage of RAConfig - */ - public static void usage() { - System.out.println(""); - System.out.println("Usage: java org.ow2.jonas.generators.raconfig.RAConfig [Output_File]"); - System.out.println(" to generate the jonas-ra.xml file for a Resource Adapter."); - System.out.println(" The output file will be written to the default location of the java "); - System.out.println(" system property 'java.io.tmpdir' unless the -path parameter is specified"); - System.out.println(""); - System.out.println(" Note: for a parameter either the whole name must be used or only the"); - System.out.println(" the capital letters, e.g. -jndiname or -j are equivalent"); - System.out.println(""); - System.out.println(" With Options:"); - System.out.println(" -? or -help print this help message"); - System.out.println(" -DM,-DS,-CP,-XA DriverManager, Datasource, ConnectionPoolDatasource,"); - System.out.println(" XAConnection only used with -p. Additional"); - System.out.println(" user configuration of the jonas-ra.xml file"); - System.out.println(" will be necessary for any option but -DM."); - System.out.println(" -Jndiname specifies the jndiname RA"); - System.out.println(" -Property specifies the database property file"); - System.out.println(" to process"); - System.out.println(" -Rarlink specifies the rar file to link to"); - System.out.println(" -Update update the input rar with the specified file"); - System.out.println(" unless an output_file named is specified"); - System.out.println(" -ENcrypt used with -sf to encrypt the passwords "); - System.out.println(" -SecurityFile security xml file to add to jonas-ra.xml "); - System.out.println(" -Verbose output the contents of the deployment descriptor "); - System.out.println(" -NoValidation turn off xml dtd/schema validation "); - System.out.println(" -PATH path where jonas-ra.xml should be written to "); - System.out.println(" default is System.property('java.io.tmpdir')"); - System.out.println(" -NEW don't extract jonas-ra.xml create a new one "); - System.out.println(""); - System.out.println(" Input_File Resource Adapter RAR file"); - System.out.println(" Output_File Resource Adapter RAR file only used with "); - System.out.println(" -p(required) or -u(optional)"); - System.out.println(""); - } - - // Main Method - /** - * Main routine - * @param args String [] input arguments - * @throws RAConfigException if an Exception occurs - */ - public static void main(final String[] args) throws RAConfigException { - boolean isHelp = false; - boolean isVerbose = false; - boolean doProperty = false; - boolean doUpdate = false; - boolean encrypt = false; - boolean newXml = false; - String fileInputName = null; - String fileOutputName = null; - String securityfile = null; - String jndiname = ""; - String rarlink = ""; - String updatename = ""; - String jdbcRarLink = ""; - String jonasRarStr = "JOnASJDBC_"; - String propertyFile = ""; - String path = ""; - // Get command args - - Properties dbProps = null; - - if (args.length < 1) { - isHelp = true; - } - for (int argn = 0; argn < args.length; argn++) { - String arg = args[argn].toLowerCase(); - if (arg.equals("-help") || arg.equals("-?")) { - isHelp = true; - continue; - } - if (arg.equals("-verbose") || arg.equals("-v")) { - isVerbose = true; - continue; - } - if (arg.equals("-encrypt") || arg.equals("-en")) { - encrypt = true; - continue; - } - if (arg.equals("-securityfile") || arg.equals("-sf")) { - if (argn + 1 == args.length || args[++argn].startsWith("-")) { - usage(); - throw new RAConfigException("Error with -sf input"); - } - securityfile = args[argn]; - continue; - } - if (arg.equals("-novalidation") || arg.equals("-nv")) { - validation = false; - continue; - } - if (arg.equals("-update") || arg.equals("-u")) { - doUpdate = true; - if (argn + 1 == args.length || args[++argn].startsWith("-")) { - usage(); - throw new RAConfigException("Error with -u input"); - } - updatename = args[argn]; - continue; - } - if (arg.equals("-jndiname") || arg.equals("-j")) { - if (argn + 1 == args.length || args[++argn].startsWith("-")) { - usage(); - throw new RAConfigException("Error with -j input"); - } - jndiname = args[argn]; - continue; - } - if (arg.equals("-rarlink") || arg.equals("-r")) { - if (argn + 1 == args.length || args[++argn].startsWith("-")) { - usage(); - throw new RAConfigException("Error with -r input"); - } - rarlink = args[argn]; - continue; - } - if (arg.equals("-property") || arg.equals("-p")) { - doProperty = true; - if (argn + 1 == args.length || args[++argn].startsWith("-")) { - usage(); - throw new RAConfigException("Error with -p input"); - } - propertyFile = args[argn]; - continue; - } - if (arg.equals("-dm")) { - jdbcRarLink = jonasRarStr + "DM"; - continue; - } - if (arg.equals("-ds")) { - jdbcRarLink = jonasRarStr + "DS"; - continue; - } - if (arg.equals("-xa")) { - jdbcRarLink = jonasRarStr + "XA"; - continue; - } - if (arg.equals("-cp")) { - jdbcRarLink = jonasRarStr + "CP"; - continue; - } - if (arg.equals("-path")) { - if (argn + 1 == args.length || args[++argn].startsWith("-")) { - usage(); - throw new RAConfigException("Error with -path"); - } - path = args[argn]; - continue; - } - if (arg.equals("-new")) { - newXml = true; - continue; - } - if (fileInputName == null) { - fileInputName = args[argn]; - if (!fileInputName.endsWith(".rar")) { - fileInputName += ".rar"; - } - } else if (doProperty || doUpdate) { - if (fileOutputName == null) { - fileOutputName = args[argn]; - if (!fileOutputName.endsWith(".rar")) { - fileOutputName += ".rar"; - } - } - } else { - usage(); - throw new RAConfigException("Error multiple input files specified without -property or -update"); - } - } - - // Usage ? - if (isHelp) { - usage(); - System.exit(0); - } - if (fileInputName == null) { - usage(); - throw new RAConfigException("Error missing input file"); - } - if (doProperty && fileOutputName == null) { - usage(); - throw new RAConfigException("Error missing output file"); - } - if (fileInputName.equals(fileOutputName)) { - throw new RAConfigException("Input and Output filenames cannot be the same"); - } - - dbProps = new Properties(); - if (doProperty) { - if (jdbcRarLink.length() > 0 && rarlink.length() == 0) { - rarlink = jdbcRarLink; - } - try { - dbProps.load(new FileInputStream(propertyFile)); - } catch (Exception ex) { - if (propertyFile.endsWith(".properties")) { - System.out.println("Error reading " + propertyFile + " " + ex); - } else { - try { - dbProps.load(new FileInputStream(propertyFile + ".properties")); - } catch (Exception ex1) { - System.out.println("Error reading " + propertyFile + " " + ex); - } - } - } - buildXML(fileInputName, jndiname, rarlink, dbProps, encrypt, securityfile, path, isVerbose, true); - if (updatename.length() == 0) { - updatename = System.getProperty("java.io.tmpdir") + File.separator + "jonas-ra.xml"; - } - updateRAR(fileInputName, fileOutputName, updatename, rarlink); - } else if (doUpdate) { - updateRAR(fileInputName, fileOutputName, updatename, rarlink); - } else { - buildXML(fileInputName, jndiname, rarlink, dbProps, encrypt, securityfile, path, isVerbose, newXml); - } - } - - /** - * This method is used to generate rar files from a Properties object - * @param props the properties object which fields are used to create the - * rar file - * @param rarLink rarlink - * @param inputfile the jonas rar file used - * @param outputfile the url of the rar file - * @throws RAConfigException when a problem occurs while generating the rar - * file - */ - public static void generateRars(final Properties props, final String rarLink, final String inputfile, - final String outputfile) throws RAConfigException { - String jndiname = ""; - Boolean encrypt = false; - String securityfile = null; - String path = ""; - Boolean isVerbose = false; - String updatename = ""; - - buildXML(inputfile, jndiname, rarLink, props, encrypt, securityfile, path, isVerbose, true); - if (updatename.length() == 0) { - updatename = System.getProperty("java.io.tmpdir") + File.separator + "jonas-ra.xml"; - } - updateRAR(inputfile, outputfile, updatename, rarLink); - - } -} diff --git a/jonas/modules/generators/raconfig/src/main/java/org/ow2/jonas/generators/raconfig/RAConfigException.java b/jonas/modules/generators/raconfig/src/main/java/org/ow2/jonas/generators/raconfig/RAConfigException.java deleted file mode 100644 index a4f7440ecc917b2c614e09ae2bf0c2d0b96ee173..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/raconfig/src/main/java/org/ow2/jonas/generators/raconfig/RAConfigException.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.generators.raconfig; - - -/** - * RAConfigException thrown when RAConfig fails. - * - * @author Guillaume Sauthier - */ -public class RAConfigException extends Exception { - - /** - * @param message inner message - */ - public RAConfigException(String message) { - super(message); - } - - /** - * @param cause inner cause - */ - public RAConfigException(Throwable cause) { - super(cause); - } - - /** - * @param message inner message - * @param cause inner cause - */ - public RAConfigException(String message, Throwable cause) { - super(message, cause); - } - -} diff --git a/jonas/modules/generators/raconfig/src/main/resources/META-INF/jonas-generators-raconfig.bnd b/jonas/modules/generators/raconfig/src/main/resources/META-INF/jonas-generators-raconfig.bnd deleted file mode 100644 index a35ec917a92240087ef34a698d926f6df66b4fc2..0000000000000000000000000000000000000000 --- a/jonas/modules/generators/raconfig/src/main/resources/META-INF/jonas-generators-raconfig.bnd +++ /dev/null @@ -1,24 +0,0 @@ -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 2007 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -Export-Package org.ow2.jonas.generators.raconfig diff --git a/jonas/modules/itests/applications/classloader/pom.xml b/jonas/modules/itests/applications/classloader/pom.xml deleted file mode 100644 index b64dac74caa021a4fed5b3f0e48c82bf6441bfc6..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/classloader/pom.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - org.ow2.jonas - jonas-itests-applications - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas - jonas-itests-applications-classloader - bundle - JOnAS :: iTests :: Applications :: ClassLoader - Application which check context classloader at startup - - - - - org.apache.felix - maven-bundle-plugin - true - - - org.ow2.jonas.tests.applications.classloader - - - - - - org.apache.felix - maven-ipojo-plugin - ${ipojo-maven-plugin.version} - - true - ipojo - - - - - ipojo-bundle - - - - - - - diff --git a/jonas/modules/itests/applications/classloader/src/main/java/org/ow2/jonas/tests/applications/classloader/ClassLoaderChecker.java b/jonas/modules/itests/applications/classloader/src/main/java/org/ow2/jonas/tests/applications/classloader/ClassLoaderChecker.java deleted file mode 100644 index 550bb0093829c0a46a9894d14287c10ff261b2ce..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/classloader/src/main/java/org/ow2/jonas/tests/applications/classloader/ClassLoaderChecker.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2011 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.tests.applications.classloader; - -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * Component used to check that the Thread context classloader doesn't contain - * the client.jar - * @author Florent Benoit - */ -public class ClassLoaderChecker { - - /** - * Logger. - */ - private Logger log = Logger.getLogger(ClassLoaderChecker.class.getName()); - - /** - * - */ - public void start() throws IOException { - // Write result into a file in work directory - - String jBase = System.getProperty("jonas.base"); - log.log(Level.INFO, "JONAS_BASE set to '" + jBase + "'."); - - FileWriter writer = null; - File jFile = new File(jBase + File.separator - + "classloader-results.txt"); - writer = new FileWriter(jFile); - - try { - - // Get current CL - ClassLoader currentCL = Thread.currentThread() - .getContextClassLoader(); - - // Expect to miss the client.jar classes but not the bootstrap - // classes that should be available - try { - currentCL - .loadClass("org.ow2.jonas.deployablemonitor.DeployableMonitorService"); - // problem, write it to the file - writer.write("KO\n"); - } catch (ClassNotFoundException e) { - // Not found as expected - writer.write("OK\n"); - } - - // No test with a bootstrap class - try { - currentCL.loadClass("org.ow2.jonas.launcher.felix.JOnAS"); - // ok, write it to the file - writer.write("OK\n"); - } catch (ClassNotFoundException e) { - // Not found as expected - writer.write("KO\n"); - } - } finally { - writer.write("\n"); - writer.flush(); - writer.close(); - - } - - } - -} diff --git a/jonas/modules/itests/applications/classloader/src/main/resources/metadata.xml b/jonas/modules/itests/applications/classloader/src/main/resources/metadata.xml deleted file mode 100644 index 6ab379282d2fe41906a22a103b53c38efeb3635c..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/classloader/src/main/resources/metadata.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/jonas/modules/itests/applications/connection-leaks/pom.xml b/jonas/modules/itests/applications/connection-leaks/pom.xml deleted file mode 100644 index f22d41629cbcfeff80f85ea266e6a757b3cae657..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/connection-leaks/pom.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - org.ow2.jonas - jonas-itests-applications - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas - jonas-itests-applications-connection-leaks - war - JOnAS :: iTests :: Applications :: Connection Leaks - Application which make connection leaks - - - - org.apache.tomcat - servlet-api - provided - - - - - connection-leaks.war - - - org.apache.maven.plugins - maven-war-plugin - - ${basedir}/src/main/webapp/WEB-INF/web.xml - - - - - diff --git a/jonas/modules/itests/applications/connection-leaks/src/main/java/org/ow2/jonas/tests/applications/connectionsleaks/ConnectionLeakServlet.java b/jonas/modules/itests/applications/connection-leaks/src/main/java/org/ow2/jonas/tests/applications/connectionsleaks/ConnectionLeakServlet.java deleted file mode 100644 index 4f75112054acbe575e6c139ee69449b607b3054d..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/connection-leaks/src/main/java/org/ow2/jonas/tests/applications/connectionsleaks/ConnectionLeakServlet.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2009 S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.tests.applications.connectionsleaks; - -import java.io.IOException; -import java.io.PrintWriter; -import java.sql.SQLException; - -import javax.naming.InitialContext; -import javax.naming.NamingException; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.sql.DataSource; - -/** - * This class is getting a JDBC connection and forgot to close the SQL Connection - * @author Florent Benoit - */ -public class ConnectionLeakServlet extends HttpServlet { - - /** - * Serial version UID. - */ - private static final long serialVersionUID = 1L; - - /** - * - */ - @Override - protected void doGet(final HttpServletRequest req, final HttpServletResponse response) throws ServletException, IOException { - response.setContentType("text/html"); - PrintWriter out = response.getWriter(); - out.println("Connection Leak Servlet"); - - DataSource ds = null; - try { - ds = (DataSource) new InitialContext().lookup("jdbc_1"); - ds.getConnection(); - out.println("Example OK"); - } catch (NamingException e) { - out.println("Cannot lookup get jdbc_1"); - e.printStackTrace(); - } catch (SQLException e) { - out.println("Cannot get a Connection"); - e.printStackTrace(); - } finally { - out.println(""); - out.close(); - } - - } -} diff --git a/jonas/modules/itests/applications/connection-leaks/src/main/webapp/WEB-INF/jonas-web.xml b/jonas/modules/itests/applications/connection-leaks/src/main/webapp/WEB-INF/jonas-web.xml deleted file mode 100644 index a91d645b82b53d36860ea1e1cc881a5aadfd12d4..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/connection-leaks/src/main/webapp/WEB-INF/jonas-web.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - connection-leaks - - diff --git a/jonas/modules/itests/applications/connection-leaks/src/main/webapp/WEB-INF/web.xml b/jonas/modules/itests/applications/connection-leaks/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index f09a3e280d839b7cf1f7b4fce0f1c9a1e94af0b9..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/connection-leaks/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - Make connection leaks - - ConnectionLeak - org.ow2.jonas.tests.applications.connectionsleaks.ConnectionLeakServlet - - - - ConnectionLeak - /ConnectionLeak - - - - - - ConnectionLeak - - - - diff --git a/jonas/modules/itests/applications/jaxws-add/assemblies/ear/pom.xml b/jonas/modules/itests/applications/jaxws-add/assemblies/ear/pom.xml deleted file mode 100644 index c93e712c794b09a8e066188a5a62cd8ba2f4cc61..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/jaxws-add/assemblies/ear/pom.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - org.ow2.jonas.jonas-itests-applications-jaxws-add - assemblies - 5.2.4-SNAPSHOT - - 4.0.0 - org.ow2.jonas.jonas-itests-applications-jaxws-add.assemblies - wsadd - ear - JOnAS :: iTests :: Applications :: JAX-WS Add sample :: Assemblies :: EAR - - - org.ow2.jonas.jonas-itests-applications-jaxws-add - module-addbean - ${project.version} - ejb - - - org.ow2.jonas.jonas-itests-applications-jaxws-add - module-wsadd-webapp - ${project.version} - war - - - - wsadd - - - org.apache.maven.plugins - maven-ear-plugin - 2.3.2 - - - - org.ow2.jonas.jonas-itests-applications-jaxws-add - module-addbean-api - lib/addbean-api.jar - - - org.ow2.jonas.jonas-itests-applications-jaxws-add - module-addbean - - - org.ow2.jonas.jonas-itests-applications-jaxws-add - module-wsadd-webapp - /wsadd-sample - - - - - true - - - true - - - - - diff --git a/jonas/modules/itests/applications/jaxws-add/assemblies/pom.xml b/jonas/modules/itests/applications/jaxws-add/assemblies/pom.xml deleted file mode 100644 index b180abd6ae2bc6b56f3accfad8fc0d580140d905..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/jaxws-add/assemblies/pom.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - org.ow2.jonas - jonas-itests-applications-jaxws-add - 5.2.4-SNAPSHOT - - 4.0.0 - org.ow2.jonas.jonas-itests-applications-jaxws-add - assemblies - pom - JOnAS :: iTests :: Applications :: JAX-WS Add sample :: Assemblies - Assemblies of Example Project - - ear - - - - wsadd - - diff --git a/jonas/modules/itests/applications/jaxws-add/modules/api/pom.xml b/jonas/modules/itests/applications/jaxws-add/modules/api/pom.xml deleted file mode 100644 index 2c8420c5196b78c65677e13ab1aa271538a22e66..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/jaxws-add/modules/api/pom.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - org.ow2.jonas.jonas-itests-applications-jaxws-add - modules - 5.2.4-SNAPSHOT - - 4.0.0 - org.ow2.jonas.jonas-itests-applications-jaxws-add - module-addbean-api - jar - JOnAS :: iTests :: Applications :: JAX-WS Add sample :: Modules :: Api - - - addbean-api - - - diff --git a/jonas/modules/itests/applications/jaxws-add/modules/api/src/main/java/org/ow2/jonas/tests/applications/wsadd/api/IAddBean.java b/jonas/modules/itests/applications/jaxws-add/modules/api/src/main/java/org/ow2/jonas/tests/applications/wsadd/api/IAddBean.java deleted file mode 100644 index ad8bddb517c65fd01b0d1d413fa9d99df7a124c8..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/jaxws-add/modules/api/src/main/java/org/ow2/jonas/tests/applications/wsadd/api/IAddBean.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2010 S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.tests.applications.wsadd.api; - -/** - * Add Bean interface. - * @author Helene Joanin - */ -public interface IAddBean { - - /** - * @return sum of two args - */ - int addFromBean(int op1, int op2); - -} diff --git a/jonas/modules/itests/applications/jaxws-add/modules/beans/pom.xml b/jonas/modules/itests/applications/jaxws-add/modules/beans/pom.xml deleted file mode 100644 index 7c7bd9d6e5306ccada4ecc6537267da473e85c9e..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/jaxws-add/modules/beans/pom.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - org.ow2.jonas.jonas-itests-applications-jaxws-add - modules - 5.2.4-SNAPSHOT - - 4.0.0 - org.ow2.jonas.jonas-itests-applications-jaxws-add - module-addbean - ejb - JOnAS :: iTests :: Applications :: JAX-WS Add sample :: Modules :: Beans - - - org.ow2.spec.ee - ow2-javaee-5-spec - 1.0.3 - provided - - - org.ow2.jonas.jonas-itests-applications-jaxws-add - module-addbean-api - ${project.version} - - - - addbean - - - org.apache.maven.plugins - maven-ejb-plugin - 2.1 - - 3.0 - - - - - - - codehaus - Codehaus Release Repo - http://repository.codehaus.org - - - diff --git a/jonas/modules/itests/applications/jaxws-add/modules/beans/src/main/java/org/ow2/jonas/tests/applications/wsadd/beans/AddBean.java b/jonas/modules/itests/applications/jaxws-add/modules/beans/src/main/java/org/ow2/jonas/tests/applications/wsadd/beans/AddBean.java deleted file mode 100644 index 11f8d7d606f4f9f7f08e6e02d57aad57c9a05f32..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/jaxws-add/modules/beans/src/main/java/org/ow2/jonas/tests/applications/wsadd/beans/AddBean.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 20010 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.tests.applications.wsadd.beans; - -import javax.ejb.Local; -import javax.ejb.Stateless; -import javax.ejb.TransactionAttribute; -import static javax.ejb.TransactionAttributeType.SUPPORTS; - -import org.ow2.jonas.tests.applications.wsadd.api.IAddBean; - - -/** - * Stateless Add. - * @author Helene Joanin - */ -@Stateless -@Local(IAddBean.class) -public class AddBean implements IAddBean { - - /** - * @return sum of the two args - */ - @TransactionAttribute(SUPPORTS) - public int addFromBean(int op1, int op2) { - return (op1 + op2); - } - -} diff --git a/jonas/modules/itests/applications/jaxws-add/modules/beans/src/main/resources/META-INF/ejb-jar.xml b/jonas/modules/itests/applications/jaxws-add/modules/beans/src/main/resources/META-INF/ejb-jar.xml deleted file mode 100644 index 4c8a66240a58b7654f220cb683f87cdb0ead8098..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/jaxws-add/modules/beans/src/main/resources/META-INF/ejb-jar.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - diff --git a/jonas/modules/itests/applications/jaxws-add/modules/pom.xml b/jonas/modules/itests/applications/jaxws-add/modules/pom.xml deleted file mode 100644 index 55509671629325df2ab179e3596da9b11ea78f4d..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/jaxws-add/modules/pom.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - org.ow2.jonas - jonas-itests-applications-jaxws-add - 5.2.4-SNAPSHOT - - 4.0.0 - org.ow2.jonas.jonas-itests-applications-jaxws-add - modules - pom - JOnAS :: iTests :: Applications :: JAX-WS Add sample :: Modules - - api - beans - webapp - - diff --git a/jonas/modules/itests/applications/jaxws-add/modules/webapp/pom.xml b/jonas/modules/itests/applications/jaxws-add/modules/webapp/pom.xml deleted file mode 100644 index b793dfbfe3a71fb065c9f404098d334d43c21693..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/jaxws-add/modules/webapp/pom.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - org.ow2.jonas.jonas-itests-applications-jaxws-add - modules - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas.jonas-itests-applications-jaxws-add - module-wsadd-webapp - war - JOnAS :: iTests :: Applications :: JAX-WS Add sample :: Modules :: Webapp - - - - org.ow2.spec.ee - ow2-javaee-5-spec - 1.0.3 - provided - - - org.ow2.jonas.jonas-itests-applications-jaxws-add - module-addbean-api - ${project.version} - - - org.ow2.bundles - ow2-audit-report - provided - - - - - module-wsadd-webapp - - - org.apache.maven.plugins - maven-war-plugin - - ${basedir}/src/main/webapp/WEB-INF/web.xml - - - - - diff --git a/jonas/modules/itests/applications/jaxws-add/modules/webapp/src/main/java/org/ow2/jonas/tests/applications/wsadd/ws/AuditPropagationServlet.java b/jonas/modules/itests/applications/jaxws-add/modules/webapp/src/main/java/org/ow2/jonas/tests/applications/wsadd/ws/AuditPropagationServlet.java deleted file mode 100644 index 86b93821a48d2453dba4ad4b07d54cdc2088aced..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/jaxws-add/modules/webapp/src/main/java/org/ow2/jonas/tests/applications/wsadd/ws/AuditPropagationServlet.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2011 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id: $ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.tests.applications.wsadd.ws; - -import java.io.IOException; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.ow2.util.auditreport.api.IAuditID; -import org.ow2.util.auditreport.impl.CurrentInvocationID; - -/** - * A {@code AuditPropagationServlet} is ... - * - * @author Guillaume Sauthier - */ -public class AuditPropagationServlet extends HttpServlet { - @Override - protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - - // The Audit ID should be installed in the ThreadLocal now ... - IAuditID id = CurrentInvocationID.getInstance().getAuditID(); - String result = "null"; - if (id != null) { - result = id.getID(); - } - - // Print back the result - resp.getWriter().println(result); - } -} diff --git a/jonas/modules/itests/applications/jaxws-add/modules/webapp/src/main/java/org/ow2/jonas/tests/applications/wsadd/ws/IWSAdd.java b/jonas/modules/itests/applications/jaxws-add/modules/webapp/src/main/java/org/ow2/jonas/tests/applications/wsadd/ws/IWSAdd.java deleted file mode 100644 index 4865c2c44685340cb5f6d8b9cc757185a14849c3..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/jaxws-add/modules/webapp/src/main/java/org/ow2/jonas/tests/applications/wsadd/ws/IWSAdd.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2010 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.tests.applications.wsadd.ws; - -import javax.jws.WebMethod; -import javax.jws.WebParam; -import javax.jws.WebService; -import javax.xml.ws.RequestWrapper; - -@WebService(name = "WSAdd", targetNamespace = "http://wsadd.applis.tests.jonas.ow2.org/") -public interface IWSAdd { - - @WebMethod(operationName = "add") - @RequestWrapper(localName = "addRequest") - public int add(@WebParam(name = "op1") int op1, @WebParam(name = "op2") int op2); - - public boolean checkEnvEntry(); - public boolean checkEjb(); - public boolean checkResource(); - -} diff --git a/jonas/modules/itests/applications/jaxws-add/modules/webapp/src/main/java/org/ow2/jonas/tests/applications/wsadd/ws/WSAdd.java b/jonas/modules/itests/applications/jaxws-add/modules/webapp/src/main/java/org/ow2/jonas/tests/applications/wsadd/ws/WSAdd.java deleted file mode 100644 index 0d8fc5e2efc579f33483ee49607df6123bd1dddd..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/jaxws-add/modules/webapp/src/main/java/org/ow2/jonas/tests/applications/wsadd/ws/WSAdd.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 20010 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.tests.applications.wsadd.ws; - -import javax.annotation.Resource; -import javax.ejb.EJB; -import javax.jms.Connection; -import javax.jms.ConnectionFactory; -import javax.jws.WebMethod; -import javax.jws.WebParam; -import javax.jws.WebService; -import javax.naming.InitialContext; -import javax.xml.ws.RequestWrapper; - -import org.ow2.jonas.tests.applications.wsadd.api.IAddBean; - - -@WebService(name="WSAdd",targetNamespace="http://wsadd.applis.tests.jonas.ow2.org/") -public class WSAdd implements IWSAdd { - - @WebMethod(operationName = "add") - @RequestWrapper(localName = "addRequest") - public int add(@WebParam(name = "op1") int op1, @WebParam(name = "op2") int op2) { - return op1 + op2; - } - - public boolean checkEnvEntry() { - try { - InitialContext ic = new InitialContext(); - String envValue = (String) ic.lookup("java:comp/env/location"); - return ("echirolles".equals(envValue)); - } catch (javax.naming.NamingException e) { - e.printStackTrace(); - return false; - } - - } - - @EJB - private IAddBean addBean; - public boolean checkEjb() { - int op1 = 10; - int op2 = 12; - int res = addBean.addFromBean(op1, op2); - return (res == (op1 + op2)); - } - - @Resource(mappedName="CF") - private ConnectionFactory cf; - public boolean checkResource() { - try { - Connection con = cf.createConnection(); - con.close(); - return true; - } catch (javax.jms.JMSException e) { - e.printStackTrace(); - return false; - } - } - -} diff --git a/jonas/modules/itests/applications/jaxws-add/modules/webapp/src/main/webapp/WEB-INF/jonas-web.xml b/jonas/modules/itests/applications/jaxws-add/modules/webapp/src/main/webapp/WEB-INF/jonas-web.xml deleted file mode 100644 index 3630a9b861cd9e34b12fcdee4c97d8d0eef6b37d..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/jaxws-add/modules/webapp/src/main/webapp/WEB-INF/jonas-web.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - /wsadd-sample - diff --git a/jonas/modules/itests/applications/jaxws-add/modules/webapp/src/main/webapp/WEB-INF/web.xml b/jonas/modules/itests/applications/jaxws-add/modules/webapp/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 48d2788b68640728464254db9f4a7cd1483ec225..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/jaxws-add/modules/webapp/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - This is an env entry - location - java.lang.String - echirolles - - - - InvocationIdPropagationChecker - org.ow2.jonas.tests.applications.wsadd.ws.AuditPropagationServlet - - - - InvocationIdPropagationChecker - /PropagationChecker - - - diff --git a/jonas/modules/itests/applications/jaxws-add/pom.xml b/jonas/modules/itests/applications/jaxws-add/pom.xml deleted file mode 100644 index 194054859ef54c722ea56557e83426846883742c..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/jaxws-add/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - org.ow2.jonas - jonas-itests-applications - 5.2.4-SNAPSHOT - - 4.0.0 - org.ow2.jonas - jonas-itests-applications-jaxws-add - pom - JOnAS :: iTests :: Applications :: JAX-WS Add sample :: Modules - - modules - assemblies - - diff --git a/jonas/modules/itests/applications/jaxws-sample/pom.xml b/jonas/modules/itests/applications/jaxws-sample/pom.xml deleted file mode 100644 index f9927e1140e972d9150c27a913752535cdda6983..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/jaxws-sample/pom.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - - org.ow2.jonas - jonas-itests-applications - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas - jonas-itests-applications-jaxws-sample - ear - JOnAS :: iTests :: Applications :: JAX-WS sample - JAX-WS sample from the JOnAS JAX-WS tutorial - - - ${project.build.directory}/jonas-full-${project.version} - - - - - - - maven-dependency-plugin - - - unpack-assembly - generate-resources - - unpack - - - - - org.ow2.jonas.assemblies.profiles - jonas-full - ${project.version} - bin - zip - ${project.build.directory} - - - true - true - - - - - - - maven-antrun-plugin - - - generate-jaxws-sample - generate-resources - - - - - - - - - - - - - run - - - - - - maven-ear-plugin - - - - ${project.version} - - - - - - - diff --git a/jonas/modules/itests/applications/pom.xml b/jonas/modules/itests/applications/pom.xml deleted file mode 100644 index 4968029b7c666c241e999a00d6cd7092c878c473..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/pom.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - org.ow2.jonas - jonas-itests - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas - jonas-itests-applications - pom - JOnAS :: iTests :: Applications - Applications used by tests - - - connection-leaks - classloader - jaxws-sample - versioning - jaxws-add - - - diff --git a/jonas/modules/itests/applications/versioning/pom.xml b/jonas/modules/itests/applications/versioning/pom.xml deleted file mode 100644 index 0dbfa6d13c6442bc654747a6043fecff6a09b316..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/pom.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - org.ow2.jonas - jonas-itests-applications - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas - jonas-itests-applications-versioning - JOnAS :: iTests :: Applications :: Versioning - Versioned applications (Web, EJB, EAR) - - diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/non-versioned-war/non-versioned-war.war b/jonas/modules/itests/applications/versioning/src/main/resources/non-versioned-war/non-versioned-war.war deleted file mode 100644 index 6572e8229c895ec3e79d2e7d50f04bd7ca096d32..0000000000000000000000000000000000000000 Binary files a/jonas/modules/itests/applications/versioning/src/main/resources/non-versioned-war/non-versioned-war.war and /dev/null differ diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/root-war/.classpath b/jonas/modules/itests/applications/versioning/src/main/resources/root-war/.classpath deleted file mode 100644 index 1984370d7e419030502cf0badeefd4da498057b1..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/root-war/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/root-war/.project b/jonas/modules/itests/applications/versioning/src/main/resources/root-war/.project deleted file mode 100644 index e78624882fd4b1ffb69c1982f0da147abc7228cb..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/root-war/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - Versioning test - version 1.0.0 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature - - diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/root-war/.settings/org.eclipse.jdt.core.prefs b/jonas/modules/itests/applications/versioning/src/main/resources/root-war/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 7e5eaefea5303efc4366cdafc137a2d084f28cc6..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/root-war/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,256 +0,0 @@ -#Wed Aug 13 13:44:14 CEST 2008 -eclipse.preferences.version=1 -org.eclipse.jdt.core.formatter.align_type_members_on_columns=false -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_assignment=0 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 -org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 -org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 -org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 -org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 -org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 -org.eclipse.jdt.core.formatter.blank_lines_after_package=1 -org.eclipse.jdt.core.formatter.blank_lines_before_field=0 -org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 -org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 -org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 -org.eclipse.jdt.core.formatter.blank_lines_before_method=1 -org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 -org.eclipse.jdt.core.formatter.blank_lines_before_package=0 -org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 -org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 -org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true -org.eclipse.jdt.core.formatter.comment.format_block_comments=true -org.eclipse.jdt.core.formatter.comment.format_header=true -org.eclipse.jdt.core.formatter.comment.format_html=true -org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true -org.eclipse.jdt.core.formatter.comment.format_line_comments=true -org.eclipse.jdt.core.formatter.comment.format_source_code=true -org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false -org.eclipse.jdt.core.formatter.comment.indent_root_tags=true -org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert -org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert -org.eclipse.jdt.core.formatter.comment.line_length=80 -org.eclipse.jdt.core.formatter.compact_else_if=true -org.eclipse.jdt.core.formatter.continuation_indentation=2 -org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 -org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true -org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true -org.eclipse.jdt.core.formatter.indent_empty_lines=false -org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true -org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true -org.eclipse.jdt.core.formatter.indentation.size=4 -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert -org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false -org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false -org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false -org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false -org.eclipse.jdt.core.formatter.lineSplit=130 -org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false -org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false -org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 -org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 -org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true -org.eclipse.jdt.core.formatter.tabulation.char=space -org.eclipse.jdt.core.formatter.tabulation.size=4 -org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/root-war/.settings/org.eclipse.jdt.ui.prefs b/jonas/modules/itests/applications/versioning/src/main/resources/root-war/.settings/org.eclipse.jdt.ui.prefs deleted file mode 100644 index 2b1bf7e3e2b550985fc660503ffd5d167ad1571d..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/root-war/.settings/org.eclipse.jdt.ui.prefs +++ /dev/null @@ -1,5 +0,0 @@ -#Wed Aug 13 13:44:14 CEST 2008 -eclipse.preferences.version=1 -formatter_profile=_Eclipse + spaces -formatter_settings_version=11 -org.eclipse.jdt.ui.text.custom_code_templates= diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/root-war/.settings/org.maven.ide.eclipse.prefs b/jonas/modules/itests/applications/versioning/src/main/resources/root-war/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 3c15060d32b9ea917fef3ab910bfb9062ecc27ce..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/root-war/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Wed Aug 13 13:43:52 CEST 2008 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -version=1 diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/root-war/pom.xml b/jonas/modules/itests/applications/versioning/src/main/resources/root-war/pom.xml deleted file mode 100644 index 90695bca864a12d786ae25bc2958d8d2f2800f19..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/root-war/pom.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - org.ow2.jonas - root-war - 1.0.0 - 4.0.0 - war - - - - - maven-war-plugin - - ${project.artifactId} - ${basedir} - - - ${version} - - - - - - - - - - javax.servlet - servlet-api - 2.5 - provided - - - diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/root-war/root-war.war b/jonas/modules/itests/applications/versioning/src/main/resources/root-war/root-war.war deleted file mode 100644 index eefc2bd52c10904f6d5b62c7ef618528f94bc3ee..0000000000000000000000000000000000000000 Binary files a/jonas/modules/itests/applications/versioning/src/main/resources/root-war/root-war.war and /dev/null differ diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/root-war/src/main/java/org/ow2/jonas/test/versioning/RedirectServletWithContext.java b/jonas/modules/itests/applications/versioning/src/main/resources/root-war/src/main/java/org/ow2/jonas/test/versioning/RedirectServletWithContext.java deleted file mode 100644 index 4e3d7155d3aeb39c6da849c782403dda6b83ad9a..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/root-war/src/main/java/org/ow2/jonas/test/versioning/RedirectServletWithContext.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.ow2.jonas.test.versioning; - -import java.io.IOException; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -public class RedirectServletWithContext extends HttpServlet { - - /** - * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse - * response) - */ - protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - response.sendRedirect(this.getServletContext().getContextPath() + "/somewhere"); - } -} diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/root-war/src/main/java/org/ow2/jonas/test/versioning/RedirectServletWithoutContext.java b/jonas/modules/itests/applications/versioning/src/main/resources/root-war/src/main/java/org/ow2/jonas/test/versioning/RedirectServletWithoutContext.java deleted file mode 100644 index afd826c8c1c0e80a35c85457d2798d2b903fb153..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/root-war/src/main/java/org/ow2/jonas/test/versioning/RedirectServletWithoutContext.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.ow2.jonas.test.versioning; - -import java.io.IOException; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -public class RedirectServletWithoutContext extends HttpServlet { - - /** - * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse - * response) - */ - protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - response.sendRedirect("somewhere"); - } -} diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/root-war/src/main/webapp/WEB-INF/jonas-web.xml b/jonas/modules/itests/applications/versioning/src/main/resources/root-war/src/main/webapp/WEB-INF/jonas-web.xml deleted file mode 100644 index 6ae64a5e7471857de057550c5184118ae6a48290..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/root-war/src/main/webapp/WEB-INF/jonas-web.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - / - - diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/root-war/src/main/webapp/WEB-INF/web.xml b/jonas/modules/itests/applications/versioning/src/main/resources/root-war/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 81788faffbfcbd14cb774c5d2d25932d0999c16d..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/root-war/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - root-war - - - RedirectServletWithContext - - org.ow2.jonas.test.versioning.RedirectServletWithContext - - - - RedirectServletWithContext - /redirect-servlet-with-context - - - - RedirectServletWithoutContext - - org.ow2.jonas.test.versioning.RedirectServletWithoutContext - - - - RedirectServletWithoutContext - /redirect-servlet-without-context - - diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/root-war/src/main/webapp/test.jsp b/jonas/modules/itests/applications/versioning/src/main/resources/root-war/src/main/webapp/test.jsp deleted file mode 100644 index ccb8bd446d335899548be77704797def2f46a484..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/root-war/src/main/webapp/test.jsp +++ /dev/null @@ -1,2 +0,0 @@ -Context URL: "<%= getServletContext().getContextPath() %>" -Test image: \ No newline at end of file diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/secured-war/secured-war.war b/jonas/modules/itests/applications/versioning/src/main/resources/secured-war/secured-war.war deleted file mode 100644 index 77fa39682a62a5b1cd5f6802a3d27d2bb33d6d09..0000000000000000000000000000000000000000 Binary files a/jonas/modules/itests/applications/versioning/src/main/resources/secured-war/secured-war.war and /dev/null differ diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/.classpath b/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/.classpath deleted file mode 100644 index b6774abec0641cc73021fec20224f7bfc0d8c26d..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/.project b/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/.project deleted file mode 100644 index e78624882fd4b1ffb69c1982f0da147abc7228cb..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - Versioning test - version 1.0.0 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature - - diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/.settings/org.eclipse.jdt.core.prefs b/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 7e5eaefea5303efc4366cdafc137a2d084f28cc6..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,256 +0,0 @@ -#Wed Aug 13 13:44:14 CEST 2008 -eclipse.preferences.version=1 -org.eclipse.jdt.core.formatter.align_type_members_on_columns=false -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_assignment=0 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 -org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 -org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 -org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 -org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 -org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 -org.eclipse.jdt.core.formatter.blank_lines_after_package=1 -org.eclipse.jdt.core.formatter.blank_lines_before_field=0 -org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 -org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 -org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 -org.eclipse.jdt.core.formatter.blank_lines_before_method=1 -org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 -org.eclipse.jdt.core.formatter.blank_lines_before_package=0 -org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 -org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 -org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true -org.eclipse.jdt.core.formatter.comment.format_block_comments=true -org.eclipse.jdt.core.formatter.comment.format_header=true -org.eclipse.jdt.core.formatter.comment.format_html=true -org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true -org.eclipse.jdt.core.formatter.comment.format_line_comments=true -org.eclipse.jdt.core.formatter.comment.format_source_code=true -org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false -org.eclipse.jdt.core.formatter.comment.indent_root_tags=true -org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert -org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert -org.eclipse.jdt.core.formatter.comment.line_length=80 -org.eclipse.jdt.core.formatter.compact_else_if=true -org.eclipse.jdt.core.formatter.continuation_indentation=2 -org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 -org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true -org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true -org.eclipse.jdt.core.formatter.indent_empty_lines=false -org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true -org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true -org.eclipse.jdt.core.formatter.indentation.size=4 -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert -org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false -org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false -org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false -org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false -org.eclipse.jdt.core.formatter.lineSplit=130 -org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false -org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false -org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 -org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 -org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true -org.eclipse.jdt.core.formatter.tabulation.char=space -org.eclipse.jdt.core.formatter.tabulation.size=4 -org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/.settings/org.eclipse.jdt.ui.prefs b/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/.settings/org.eclipse.jdt.ui.prefs deleted file mode 100644 index 2b1bf7e3e2b550985fc660503ffd5d167ad1571d..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/.settings/org.eclipse.jdt.ui.prefs +++ /dev/null @@ -1,5 +0,0 @@ -#Wed Aug 13 13:44:14 CEST 2008 -eclipse.preferences.version=1 -formatter_profile=_Eclipse + spaces -formatter_settings_version=11 -org.eclipse.jdt.ui.text.custom_code_templates= diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/.settings/org.maven.ide.eclipse.prefs b/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 3c15060d32b9ea917fef3ab910bfb9062ecc27ce..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Wed Aug 13 13:43:52 CEST 2008 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -version=1 diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/ear/pom.xml b/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/ear/pom.xml deleted file mode 100644 index 6c58e9fbeeb0d9eff5573ad8170eef863e8b600a..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/ear/pom.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - org.ow2.jonas - test-versioning - 1.0.0 - ../pom.xml - - 4.0.0 - ${parent.artifactId}-ear - ear - - - - ${pom.groupId} - ${parent.artifactId}-ejb - ${version} - ejb - - - ${pom.groupId} - ${parent.artifactId}-war - ${version} - war - - - - - - - maven-ear-plugin - - ${parent.artifactId} - ${parent.artifactId} - ${parent.artifactId} - ${basedir}/.. - 5 - - - ${pom.groupId} - - ${parent.artifactId}-war - - - /${parent.artifactId} - - - ${parent.artifactId}.war - - - - ${pom.groupId} - - ${parent.artifactId}-ejb - - - ${parent.artifactId}.jar - - - - - - ${version} - - - - - - - diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/ejb/pom.xml b/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/ejb/pom.xml deleted file mode 100644 index 93d02e5b3f2922cce6dd8c166965b9f31e9c55bc..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/ejb/pom.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - org.ow2.jonas - test-versioning - 1.0.0 - ../pom.xml - - 4.0.0 - ${parent.artifactId}-ejb - jar - - - - - maven-ejb-plugin - - 3.0 - ${parent.artifactId} - - - true - - - - - - - diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/ejb/src/main/java/org/ow2/jonas/test/versioning/TestBean.java b/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/ejb/src/main/java/org/ow2/jonas/test/versioning/TestBean.java deleted file mode 100644 index 8b9a551fe241baa9516c807bd0fe0311dfc0e39c..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/ejb/src/main/java/org/ow2/jonas/test/versioning/TestBean.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.ow2.jonas.test.versioning; - -public interface TestBean { - - /** - * @return Version number. - */ - String getVersion(); - -} diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/ejb/src/main/java/org/ow2/jonas/test/versioning/TestBeanImpl.java b/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/ejb/src/main/java/org/ow2/jonas/test/versioning/TestBeanImpl.java deleted file mode 100644 index caffcb2a1f98025933d1dc6239a28806efd74697..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/ejb/src/main/java/org/ow2/jonas/test/versioning/TestBeanImpl.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.ow2.jonas.test.versioning; - -import javax.ejb.Stateless; - -@Stateless -public class TestBeanImpl implements TestBean { - - private static String version = "1.0.0"; - - public String getVersion() { - return version; - } - -} diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/pom.xml b/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/pom.xml deleted file mode 100644 index e31146b3fc94d08d7afdfa43080d8374259a4cb5..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/pom.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - org.ow2.jonas - test-versioning - 1.0.0 - 4.0.0 - pom - - - install - - - maven-compiler-plugin - - 1.5 - 1.5 - - - - - - - ejb - war - ear - - - - - javax.servlet - servlet-api - 2.5 - provided - - - org.ow2.spec.ee - ow2-ejb-3.0-spec - 1.0-M1 - provided - - - diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/test-versioning.ear b/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/test-versioning.ear deleted file mode 100644 index 9e8599457c733ba1156d98ceaa75d268ef3dc026..0000000000000000000000000000000000000000 Binary files a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/test-versioning.ear and /dev/null differ diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/war/pom.xml b/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/war/pom.xml deleted file mode 100644 index cf38b4865077cefc8d5e1e377e74151ef8c805c7..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/war/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - org.ow2.jonas - test-versioning - 1.0.0 - ../pom.xml - - 4.0.0 - ${parent.artifactId}-war - war - - - - ${groupId} - ${parent.artifactId}-ejb - ${version} - provided - - - - - - - maven-war-plugin - - ${parent.artifactId} - - - true - - - - - - - diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/war/src/main/java/org/ow2/jonas/test/versioning/TestServlet.java b/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/war/src/main/java/org/ow2/jonas/test/versioning/TestServlet.java deleted file mode 100644 index b36f69edc969f0524052bb5f5522856076f825ce..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/war/src/main/java/org/ow2/jonas/test/versioning/TestServlet.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.ow2.jonas.test.versioning; - -import java.io.IOException; - -import javax.ejb.EJB; -import javax.servlet.ServletException; -import javax.servlet.ServletOutputStream; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -public class TestServlet extends HttpServlet { - - @EJB - private TestBean bean; - - private static String version = "1.0.0"; - - /** - * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse - * response) - */ - protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - request.getSession(true); - response.setContentType("text/html"); - - // Use response.getOutputStream() to test JONAS-166 - ServletOutputStream output = response.getOutputStream(); - output.println("WAR version: " + version); - output.println("EJB version: " + bean.getVersion()); - - // Write two context paths in order to test when offset is not 0 - StringBuilder sb = new StringBuilder(); - sb.append("Context URL: \"" + this.getServletContext().getContextPath() + "\", "); - sb.append("Test image: "); - output.println(sb.toString()); - } -} diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/war/src/main/webapp/WEB-INF/web.xml b/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/war/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 6c73668a4f0d785e20348ba07db9830b55476703..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/war/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - Versioning Test - - TestServlet - - org.ow2.jonas.test.versioning.TestServlet - - - - TestServlet - /test-servlet - - \ No newline at end of file diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/war/src/main/webapp/index.html b/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/war/src/main/webapp/index.html deleted file mode 100644 index 30856baef69c5be6ab4fcb2ef5ac43c8dd7bdd7d..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/war/src/main/webapp/index.html +++ /dev/null @@ -1,6 +0,0 @@ - - - -

    Hello, World!

    - - \ No newline at end of file diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/war/src/main/webapp/test.jsp b/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/war/src/main/webapp/test.jsp deleted file mode 100644 index ccb8bd446d335899548be77704797def2f46a484..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version1.0.0/war/src/main/webapp/test.jsp +++ /dev/null @@ -1,2 +0,0 @@ -Context URL: "<%= getServletContext().getContextPath() %>" -Test image: \ No newline at end of file diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/.classpath b/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/.classpath deleted file mode 100644 index b6774abec0641cc73021fec20224f7bfc0d8c26d..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/.project b/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/.project deleted file mode 100644 index 5505fc25e1caadac3dd303cc63fd5b7db18a95d8..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - Versioning test - version 2.0.0 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.maven.ide.eclipse.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.maven.ide.eclipse.maven2Nature - - diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/.settings/org.eclipse.jdt.core.prefs b/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 7e5eaefea5303efc4366cdafc137a2d084f28cc6..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,256 +0,0 @@ -#Wed Aug 13 13:44:14 CEST 2008 -eclipse.preferences.version=1 -org.eclipse.jdt.core.formatter.align_type_members_on_columns=false -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_assignment=0 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 -org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 -org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 -org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 -org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 -org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 -org.eclipse.jdt.core.formatter.blank_lines_after_package=1 -org.eclipse.jdt.core.formatter.blank_lines_before_field=0 -org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 -org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 -org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 -org.eclipse.jdt.core.formatter.blank_lines_before_method=1 -org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 -org.eclipse.jdt.core.formatter.blank_lines_before_package=0 -org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 -org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 -org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true -org.eclipse.jdt.core.formatter.comment.format_block_comments=true -org.eclipse.jdt.core.formatter.comment.format_header=true -org.eclipse.jdt.core.formatter.comment.format_html=true -org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true -org.eclipse.jdt.core.formatter.comment.format_line_comments=true -org.eclipse.jdt.core.formatter.comment.format_source_code=true -org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false -org.eclipse.jdt.core.formatter.comment.indent_root_tags=true -org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert -org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert -org.eclipse.jdt.core.formatter.comment.line_length=80 -org.eclipse.jdt.core.formatter.compact_else_if=true -org.eclipse.jdt.core.formatter.continuation_indentation=2 -org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 -org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true -org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true -org.eclipse.jdt.core.formatter.indent_empty_lines=false -org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true -org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true -org.eclipse.jdt.core.formatter.indentation.size=4 -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert -org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false -org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false -org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false -org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false -org.eclipse.jdt.core.formatter.lineSplit=130 -org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false -org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false -org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 -org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 -org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true -org.eclipse.jdt.core.formatter.tabulation.char=space -org.eclipse.jdt.core.formatter.tabulation.size=4 -org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/.settings/org.eclipse.jdt.ui.prefs b/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/.settings/org.eclipse.jdt.ui.prefs deleted file mode 100644 index 2b1bf7e3e2b550985fc660503ffd5d167ad1571d..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/.settings/org.eclipse.jdt.ui.prefs +++ /dev/null @@ -1,5 +0,0 @@ -#Wed Aug 13 13:44:14 CEST 2008 -eclipse.preferences.version=1 -formatter_profile=_Eclipse + spaces -formatter_settings_version=11 -org.eclipse.jdt.ui.text.custom_code_templates= diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/.settings/org.maven.ide.eclipse.prefs b/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/.settings/org.maven.ide.eclipse.prefs deleted file mode 100644 index 3c15060d32b9ea917fef3ab910bfb9062ecc27ce..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/.settings/org.maven.ide.eclipse.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Wed Aug 13 13:43:52 CEST 2008 -activeProfiles= -eclipse.preferences.version=1 -fullBuildGoals=process-test-resources -includeModules=false -resolveWorkspaceProjects=true -resourceFilterGoals=process-resources resources\:testResources -version=1 diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/ear/pom.xml b/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/ear/pom.xml deleted file mode 100644 index b5768499ab8e37484656bdc21780be2fd66c8f46..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/ear/pom.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - org.ow2.jonas - test-versioning - 2.0.0 - ../pom.xml - - 4.0.0 - ${parent.artifactId}-ear - ear - - - - ${pom.groupId} - ${parent.artifactId}-ejb - ${version} - ejb - - - ${pom.groupId} - ${parent.artifactId}-war - ${version} - war - - - - - - - maven-ear-plugin - - ${parent.artifactId} - ${parent.artifactId} - ${parent.artifactId} - ${basedir}/.. - 5 - - - ${pom.groupId} - - ${parent.artifactId}-war - - - /${parent.artifactId} - - - ${parent.artifactId}.war - - - - ${pom.groupId} - - ${parent.artifactId}-ejb - - - ${parent.artifactId}.jar - - - - - - ${version} - - - - - - - diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/ejb/pom.xml b/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/ejb/pom.xml deleted file mode 100644 index ff3aeddcecc1f8c99305b8b442e110b9fe1d78b9..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/ejb/pom.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - org.ow2.jonas - test-versioning - 2.0.0 - ../pom.xml - - 4.0.0 - ${parent.artifactId}-ejb - jar - - - - - maven-ejb-plugin - - 3.0 - ${parent.artifactId} - - - true - - - - - - - diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/ejb/src/main/java/org/ow2/jonas/test/versioning/TestBean.java b/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/ejb/src/main/java/org/ow2/jonas/test/versioning/TestBean.java deleted file mode 100644 index 8b9a551fe241baa9516c807bd0fe0311dfc0e39c..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/ejb/src/main/java/org/ow2/jonas/test/versioning/TestBean.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.ow2.jonas.test.versioning; - -public interface TestBean { - - /** - * @return Version number. - */ - String getVersion(); - -} diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/ejb/src/main/java/org/ow2/jonas/test/versioning/TestBeanImpl.java b/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/ejb/src/main/java/org/ow2/jonas/test/versioning/TestBeanImpl.java deleted file mode 100644 index c76bbc2539f0d60d0ac5013803e93f6e459c18c1..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/ejb/src/main/java/org/ow2/jonas/test/versioning/TestBeanImpl.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.ow2.jonas.test.versioning; - -import javax.ejb.Stateless; - -@Stateless -public class TestBeanImpl implements TestBean { - - private static String version = "2.0.0"; - - public String getVersion() { - return version; - } - -} diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/pom.xml b/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/pom.xml deleted file mode 100644 index acd4ada46a80f12a3d883fcb5b1dbbbffafc9f68..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/pom.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - org.ow2.jonas - test-versioning - 2.0.0 - 4.0.0 - pom - - - install - - - maven-compiler-plugin - - 1.5 - 1.5 - - - - - - - ejb - war - ear - - - - - javax.servlet - servlet-api - 2.5 - provided - - - org.ow2.spec.ee - ow2-ejb-3.0-spec - 1.0-M1 - provided - - - diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/test-versioning.ear b/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/test-versioning.ear deleted file mode 100644 index 4d2c54e1329cee7ae2ed1257bae457e9b3d3d4c0..0000000000000000000000000000000000000000 Binary files a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/test-versioning.ear and /dev/null differ diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/war/pom.xml b/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/war/pom.xml deleted file mode 100644 index 40315a970738b90e20f788277ebaa071d631eff4..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/war/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - org.ow2.jonas - test-versioning - 2.0.0 - ../pom.xml - - 4.0.0 - ${parent.artifactId}-war - war - - - - ${groupId} - ${parent.artifactId}-ejb - ${version} - provided - - - - - - - maven-war-plugin - - ${parent.artifactId} - - - true - - - - - - - diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/war/src/main/java/org/ow2/jonas/test/versioning/RedirectServletWithContext.java b/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/war/src/main/java/org/ow2/jonas/test/versioning/RedirectServletWithContext.java deleted file mode 100644 index 4e3d7155d3aeb39c6da849c782403dda6b83ad9a..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/war/src/main/java/org/ow2/jonas/test/versioning/RedirectServletWithContext.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.ow2.jonas.test.versioning; - -import java.io.IOException; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -public class RedirectServletWithContext extends HttpServlet { - - /** - * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse - * response) - */ - protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - response.sendRedirect(this.getServletContext().getContextPath() + "/somewhere"); - } -} diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/war/src/main/java/org/ow2/jonas/test/versioning/RedirectServletWithoutContext.java b/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/war/src/main/java/org/ow2/jonas/test/versioning/RedirectServletWithoutContext.java deleted file mode 100644 index afd826c8c1c0e80a35c85457d2798d2b903fb153..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/war/src/main/java/org/ow2/jonas/test/versioning/RedirectServletWithoutContext.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.ow2.jonas.test.versioning; - -import java.io.IOException; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -public class RedirectServletWithoutContext extends HttpServlet { - - /** - * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse - * response) - */ - protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - response.sendRedirect("somewhere"); - } -} diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/war/src/main/java/org/ow2/jonas/test/versioning/TestServlet.java b/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/war/src/main/java/org/ow2/jonas/test/versioning/TestServlet.java deleted file mode 100644 index 61944b21737a189ef9ac01dbf7c7329725ea25d2..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/war/src/main/java/org/ow2/jonas/test/versioning/TestServlet.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.ow2.jonas.test.versioning; - -import java.io.IOException; - -import javax.ejb.EJB; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -public class TestServlet extends HttpServlet { - - @EJB - private TestBean bean; - - private static String version = "2.0.0"; - - /** - * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse - * response) - */ - protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - request.getSession(true); - response.setContentType("text/html"); - response.getWriter().println("WAR version: " + version); - response.getWriter().println("EJB version: " + bean.getVersion()); - response.getWriter().println("Context URL: \"" + this.getServletContext().getContextPath() + "\""); - - // Split output to test JONAS-221 - final int firstDivider = 3; - final int secondDivider = 6; - String firstPart = this.getServletContext().getContextPath().substring(0, firstDivider); - String secondPart = this.getServletContext().getContextPath().substring(firstDivider, secondDivider); - String thirdPart = this.getServletContext().getContextPath().substring(secondDivider); - response.getWriter().print("Test image: "); - - // Output that looks like split but that actually isn't (JONAS-221) - response.getWriter().print("First part: " + firstPart); - response.getWriter().println(" ... and no other parts !"); - } -} diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/war/src/main/webapp/WEB-INF/web.xml b/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/war/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index bf5a54bcac775abdc8c1ef1a184b8fa0bba61847..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/war/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - Versioning Test - - - TestServlet - - org.ow2.jonas.test.versioning.TestServlet - - - - TestServlet - /test-servlet - - - - RedirectServletWithContext - - org.ow2.jonas.test.versioning.RedirectServletWithContext - - - - RedirectServletWithContext - /redirect-servlet-with-context - - - - RedirectServletWithoutContext - - org.ow2.jonas.test.versioning.RedirectServletWithoutContext - - - - RedirectServletWithoutContext - /redirect-servlet-without-context - - \ No newline at end of file diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/war/src/main/webapp/index.html b/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/war/src/main/webapp/index.html deleted file mode 100644 index 30856baef69c5be6ab4fcb2ef5ac43c8dd7bdd7d..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/war/src/main/webapp/index.html +++ /dev/null @@ -1,6 +0,0 @@ - - - -

    Hello, World!

    - - \ No newline at end of file diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/war/src/main/webapp/test.jsp b/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/war/src/main/webapp/test.jsp deleted file mode 100644 index ccb8bd446d335899548be77704797def2f46a484..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/version2.0.0/war/src/main/webapp/test.jsp +++ /dev/null @@ -1,2 +0,0 @@ -Context URL: "<%= getServletContext().getContextPath() %>" -Test image: \ No newline at end of file diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/welcome-file/pom.xml b/jonas/modules/itests/applications/versioning/src/main/resources/welcome-file/pom.xml deleted file mode 100644 index 2d64fad583e07be65cfb1fd5d9a10c66504cfa1e..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/welcome-file/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - 4.0.0 - org.ow2.jonas - test-versioning-welcome - 1.0.0 - war - - - - - maven-war-plugin - - ${project.artifactId} - ${basedir} - - - ${project.version} - - - - - - - diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/welcome-file/src/main/webapp/WEB-INF/jonas-web.xml b/jonas/modules/itests/applications/versioning/src/main/resources/welcome-file/src/main/webapp/WEB-INF/jonas-web.xml deleted file mode 100644 index e642c4cad17237e58eac1bbfab12196493845f6d..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/welcome-file/src/main/webapp/WEB-INF/jonas-web.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - welcome - diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/welcome-file/src/main/webapp/WEB-INF/web.xml b/jonas/modules/itests/applications/versioning/src/main/resources/welcome-file/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 6f38ec77e4563bb1d47345a9c17c5cead9c36106..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/welcome-file/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - Versioning Test Welcome Files - - index.jspx - - \ No newline at end of file diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/welcome-file/src/main/webapp/index.jspx b/jonas/modules/itests/applications/versioning/src/main/resources/welcome-file/src/main/webapp/index.jspx deleted file mode 100644 index 420b622a5954b844cd381a7fad6897b7a5b0dc6a..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/applications/versioning/src/main/resources/welcome-file/src/main/webapp/index.jspx +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Welcome - - - Welcome - - - \ No newline at end of file diff --git a/jonas/modules/itests/applications/versioning/src/main/resources/welcome-file/test-versioning-welcome.war b/jonas/modules/itests/applications/versioning/src/main/resources/welcome-file/test-versioning-welcome.war deleted file mode 100644 index a86f3d31eda09fa737e2c94385837c1eed4a599b..0000000000000000000000000000000000000000 Binary files a/jonas/modules/itests/applications/versioning/src/main/resources/welcome-file/test-versioning-welcome.war and /dev/null differ diff --git a/jonas/modules/itests/cargo/iiop/pom.xml b/jonas/modules/itests/cargo/iiop/pom.xml deleted file mode 100644 index 44d30fc1cb586eb5dc93eb83b0593239ef3ef743..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/cargo/iiop/pom.xml +++ /dev/null @@ -1,274 +0,0 @@ - - - - - org.ow2.jonas - jonas-itests-cargo - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas - jonas-itests-cargo-iiop - JOnAS :: iTests :: Cargo :: IIOP - Tests the JOnAS distribution via CARGO - - - - - - org.codehaus.mojo - build-helper-maven-plugin - ${build-helper.version} - - - generate-port-numbers - generate-test-sources - - reserve-network-port - - - - webcontainer.port - carol.port - jms.port - db.port - - - - - - - - - maven-dependency-plugin - - - unpack-assembly - generate-test-resources - - unpack - - - - - org.ow2.jonas.assemblies.profiles - jonas-full - ${project.version} - bin - zip - ${project.build.directory} - - - true - true - - - - copy-bundles - process-test-resources - - copy - - - - - org.ow2.jonas - jonas-itests-applications-classloader - ${project.version} - ipojo - jar - ${jonas.base}/deploy - - - true - true - - - - - - - - maven-antrun-plugin - - - copy-tests - generate-test-sources - - - - - - - - - - - - - run - - - - create-jonas-base-with-all-options - generate-test-resources - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - run - - - - - - - - org.codehaus.cargo - cargo-maven2-plugin - ${cargo.version} - - - start-jonas - pre-integration-test - - start - - - - stop-jonas - post-integration-test - - stop - - - - - - jonas5x - installed - ${jonas.root} - - - existing - ${jonas.base} - - localhost - ${webcontainer.port} - http - - - - org.ow2.jonas - jonas-itests-applications-connection-leaks - war - - - org.ow2.jonas - jonas-itests-applications-jaxws-sample - ear - - - org.ow2.jonas.jonas-itests-applications-jaxws-add.assemblies - wsadd - ear - - - - - - - - - maven-surefire-plugin - - true - - - - surefire-it - integration-test - - test - - - - - webcontainer.port - ${webcontainer.port} - - - carol.url - service:jmx:iiop://localhost/jndi/iiop://localhost:${carol.port}/iiopconnector_jonas - - - project.version - ${project.version} - - - jonas.base - ${jonas.base} - - - false - - - - - - - - diff --git a/jonas/modules/itests/cargo/irmi/pom.xml b/jonas/modules/itests/cargo/irmi/pom.xml deleted file mode 100644 index 9f9d30c3090c32ce7cedcaff7a7b1603b80eb498..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/cargo/irmi/pom.xml +++ /dev/null @@ -1,274 +0,0 @@ - - - - - org.ow2.jonas - jonas-itests-cargo - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas - jonas-itests-cargo-irmi - JOnAS :: iTests :: Cargo :: IRMI - Tests the JOnAS distribution via CARGO - - - - - - org.codehaus.mojo - build-helper-maven-plugin - ${build-helper.version} - - - generate-port-numbers - generate-test-sources - - reserve-network-port - - - - webcontainer.port - carol.port - jms.port - db.port - - - - - - - - - maven-dependency-plugin - - - unpack-assembly - generate-test-resources - - unpack - - - - - org.ow2.jonas.assemblies.profiles - jonas-full - ${project.version} - bin - zip - ${project.build.directory} - - - true - true - - - - copy-bundles - process-test-resources - - copy - - - - - org.ow2.jonas - jonas-itests-applications-classloader - ${project.version} - ipojo - jar - ${jonas.base}/deploy - - - true - true - - - - - - - - maven-antrun-plugin - - - copy-tests - generate-test-sources - - - - - - - - - - - - - run - - - - create-jonas-base-with-all-options - generate-test-resources - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - run - - - - - - - - org.codehaus.cargo - cargo-maven2-plugin - ${cargo.version} - - - start-jonas - pre-integration-test - - start - - - - stop-jonas - post-integration-test - - stop - - - - - - jonas5x - installed - ${jonas.root} - - - existing - ${jonas.base} - - localhost - ${webcontainer.port} - http - - - - org.ow2.jonas - jonas-itests-applications-connection-leaks - war - - - org.ow2.jonas - jonas-itests-applications-jaxws-sample - ear - - - org.ow2.jonas.jonas-itests-applications-jaxws-add.assemblies - wsadd - ear - - - - - - - - - maven-surefire-plugin - - true - - - - surefire-it - integration-test - - test - - - - - webcontainer.port - ${webcontainer.port} - - - carol.url - service:jmx:rmi://localhost/jndi/rmi://localhost:${carol.port}/irmiconnector_jonas - - - project.version - ${project.version} - - - jonas.base - ${jonas.base} - - - false - - - - - - - - diff --git a/jonas/modules/itests/cargo/jrmp/pom.xml b/jonas/modules/itests/cargo/jrmp/pom.xml deleted file mode 100644 index 2f28d31e53e5d6e921cc050cc26549b49467be8b..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/cargo/jrmp/pom.xml +++ /dev/null @@ -1,258 +0,0 @@ - - - - - org.ow2.jonas - jonas-itests-cargo - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas - jonas-itests-cargo-jrmp - JOnAS :: iTests :: Cargo :: JRMP - Tests the JOnAS distribution via CARGO - - - - - - org.codehaus.mojo - build-helper-maven-plugin - ${build-helper.version} - - - generate-port-numbers - generate-test-sources - - reserve-network-port - - - - webcontainer.port - carol.port - jms.port - db.port - - - - - - - - - maven-dependency-plugin - - - unpack-assembly - generate-test-resources - - unpack - - - - - org.ow2.jonas.assemblies.profiles - jonas-full - ${project.version} - bin - zip - ${project.build.directory} - - - true - true - - - - copy-bundles - process-test-resources - - copy - - - - - org.ow2.jonas - jonas-itests-applications-classloader - ${project.version} - ipojo - jar - ${jonas.base}/deploy - - - true - true - - - - - - - - - - maven-antrun-plugin - - - create-jonas-base-with-all-options - generate-test-resources - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - run - - - - - - - - org.codehaus.cargo - cargo-maven2-plugin - ${cargo.version} - - - start-jonas - pre-integration-test - - start - - - - stop-jonas - post-integration-test - - stop - - - - - - jonas5x - installed - ${jonas.root} - - - existing - ${jonas.base} - - localhost - ${webcontainer.port} - http - - - - org.ow2.jonas - jonas-itests-applications-connection-leaks - war - - - org.ow2.jonas - jonas-itests-applications-jaxws-sample - ear - - - org.ow2.jonas.jonas-itests-applications-jaxws-add.assemblies - wsadd - ear - - - - - - - - - maven-surefire-plugin - - true - - - - surefire-it - integration-test - - test - - - - - webcontainer.port - ${webcontainer.port} - - - carol.url - service:jmx:rmi://localhost/jndi/rmi://localhost:${carol.port}/jrmpconnector_jonas - - - project.version - ${project.version} - - - jonas.base - ${jonas.base} - - - false - - - - - - - - diff --git a/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/BugJonas290Test.java b/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/BugJonas290Test.java deleted file mode 100644 index fa9320b83c78ad1fb99ad40cd0a35f7bca2f151b..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/BugJonas290Test.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2009-2010 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.itests.cargo.jrmp; - -import java.net.URL; - -import org.testng.annotations.Test; - -/** - * Tests that the JONAS-290 bug doesn't happen. - * - * @author S. Ali Tokmen - */ -public class BugJonas290Test extends TestCommons { - - @Test - public void testJonas290() throws Exception { - String response = getContentAsString(new URL("http://localhost:" + webcontainerPort + "/jonas-290/")); - checkString(response, "Hello again, World"); - } - -} diff --git a/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/BugJonas292Test.java b/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/BugJonas292Test.java deleted file mode 100644 index cac9928aa2f13ec2b5638c218aabc8a8006d62e2..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/BugJonas292Test.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2009-2010 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.itests.cargo.jrmp; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.InputStream; -import java.util.List; - -import javax.management.Attribute; -import javax.management.ObjectName; -import org.apache.commons.io.IOUtils; - -import org.testng.Assert; -import org.testng.annotations.Test; - -/** - * Tests that the JONAS-292 bug doesn't happen. - * - * @author S. Ali Tokmen - */ -public class BugJonas292Test extends TestCommons { - - @Test - public void deactivateDevelopmentMode() throws Exception { - ObjectName depmonitor = new ObjectName("jonas:type=service,name=depmonitor"); - this.mBeanServerConnection.setAttribute(depmonitor, new Attribute("development", Boolean.FALSE)); - } - - @Test(dependsOnMethods = "deactivateDevelopmentMode") - public void testJonas292() throws Exception { - final ObjectName j2eeServer = new ObjectName("jonas:j2eeType=J2EEServer,name=jonas"); - - final String jonasBase = (String) this.mBeanServerConnection.getAttribute(j2eeServer, "jonasBase"); - Assert.assertNotNull(jonasBase, "jonasBase is null"); - final String fileName = "jonas-292.jar"; - final File targetFile = new File(jonasBase, "deploy/" + fileName); - final Object[] opParams = {targetFile.getAbsolutePath()}; - final String[] opSignature = {"java.lang.String"}; - - this.checkDeployableStatus(j2eeServer, "deployableJars", fileName, false); - this.checkDeployableStatus(j2eeServer, "deployableFiles", fileName, false); - this.checkDeployableStatus(j2eeServer, "deployedJars", fileName, false); - this.checkDeployableStatus(j2eeServer, "deployedFiles", fileName, false); - - try { - final InputStream fileContents = this.getClass().getClassLoader().getResourceAsStream(fileName); - Assert.assertNotNull(fileContents, "Cannot find " + fileName); - - FileOutputStream targetStream = new FileOutputStream(targetFile); - IOUtils.copy(fileContents, targetStream); - - targetStream.close(); - targetStream = null; - } finally { - System.gc(); - } - - try { - this.checkDeployableStatus(j2eeServer, "deployableJars", fileName, true); - this.checkDeployableStatus(j2eeServer, "deployableFiles", fileName, true); - this.checkDeployableStatus(j2eeServer, "deployedJars", fileName, false); - this.checkDeployableStatus(j2eeServer, "deployedFiles", fileName, false); - - mBeanServerConnection.invoke(j2eeServer, "deploy", opParams, opSignature); - - this.checkDeployableStatus(j2eeServer, "deployableJars", fileName, false); - this.checkDeployableStatus(j2eeServer, "deployableFiles", fileName, false); - this.checkDeployableStatus(j2eeServer, "deployedJars", fileName, true); - this.checkDeployableStatus(j2eeServer, "deployedFiles", fileName, true); - - mBeanServerConnection.invoke(j2eeServer, "undeploy", opParams, opSignature); - - this.checkDeployableStatus(j2eeServer, "deployableJars", fileName, true); - this.checkDeployableStatus(j2eeServer, "deployableFiles", fileName, true); - this.checkDeployableStatus(j2eeServer, "deployedJars", fileName, false); - this.checkDeployableStatus(j2eeServer, "deployedFiles", fileName, false); - } finally { - Assert.assertTrue(targetFile.delete(), "File " + targetFile + " cannot be deleted"); - } - } - - private void checkDeployableStatus(final ObjectName j2eeServer, final String attribute, final String fileName, - final boolean status) throws Exception { - - boolean found = false; - List files = (List) this.mBeanServerConnection.getAttribute(j2eeServer, attribute); - for (String file : files) { - if (file.contains(fileName)) { - found = true; - break; - } - } - - Assert.assertEquals(found, status, "File " + fileName + " is " + (status ? "not " : "") + "in the " + attribute - + " list: " + files); - } - -} diff --git a/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/BugJonas96Test.java b/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/BugJonas96Test.java deleted file mode 100644 index a3839d9499c0f6470fa56b93bc03bddceec3c080..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/BugJonas96Test.java +++ /dev/null @@ -1,115 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2009-2010 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.itests.cargo.jrmp; - -import java.io.File; -import java.util.List; - -import javax.management.Attribute; -import javax.management.ObjectName; - -import org.testng.Assert; -import org.testng.annotations.Test; - -/** - * Tests that the JONAS-96 bug doesn't happen. - * - * @author S. Ali Tokmen - */ -public class BugJonas96Test extends TestCommons { - - @Test - public void deactivateDevelopmentMode() throws Exception { - ObjectName depmonitor = new ObjectName("jonas:type=service,name=depmonitor"); - this.mBeanServerConnection.setAttribute(depmonitor, new Attribute("development", Boolean.FALSE)); - } - - @Test(dependsOnMethods = "deactivateDevelopmentMode") - public void testEar() throws Exception { - checkIfFileAppearsAsDeployed("dummy.ear", "Ear"); - } - - @Test(dependsOnMethods = "deactivateDevelopmentMode") - public void testJar() throws Exception { - checkIfFileAppearsAsDeployed("dummy.jar", "Jar"); - } - - @Test(dependsOnMethods = "deactivateDevelopmentMode") - public void testRar() throws Exception { - checkIfFileAppearsAsDeployed("dummy.rar", "Rar"); - } - - @Test(dependsOnMethods = "deactivateDevelopmentMode") - public void testWar() throws Exception { - checkIfFileAppearsAsDeployed("dummy.war", "War"); - } - - @Test(dependsOnMethods = "deactivateDevelopmentMode") - public void testFile() throws Exception { - checkIfFileAppearsAsDeployed("dummy.xml", "File"); - } - - private void checkIfFileAppearsAsDeployed(final String fileName, final String type) throws Exception { - // Connect to the JMX server - List files; - ObjectName j2eeServer = new ObjectName("jonas:j2eeType=J2EEServer,name=jonas"); - - files = (List) this.mBeanServerConnection.getAttribute(j2eeServer, "deployable" + type + "s"); - for (String file : files) { - Assert.assertFalse(file.contains(fileName), "File " + fileName + " already exists: " + file); - } - files = (List) this.mBeanServerConnection.getAttribute(j2eeServer, "deployableFiles"); - for (String file : files) { - Assert.assertFalse(file.contains(fileName), "File " + fileName + " already exists: " + file); - } - - String jonasBase = (String) this.mBeanServerConnection.getAttribute(j2eeServer, "jonasBase"); - Assert.assertNotNull(jonasBase, "jonasBase is null"); - File testFile = new File(jonasBase, "deploy/" + fileName); - testFile.createNewFile(); - - try { - boolean found = false; - files = (List) this.mBeanServerConnection.getAttribute(j2eeServer, "deployable" + type + "s"); - for (String file : files) { - if (file.contains(file)) { - found = true; - break; - } - } - Assert.assertTrue(found, "File " + fileName + " doesn't appear in the deployable" + type + "s list"); - files = (List) this.mBeanServerConnection.getAttribute(j2eeServer, "deployableFiles"); - for (String file : files) { - if (file.contains(file)) { - return; - } - } - Assert.fail("File " + fileName + " doesn't appear in the deployableFiles list"); - } finally { - Assert.assertTrue(testFile.delete(), "File " + testFile + " cannot be deleted"); - } - } - -} diff --git a/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/CargoTest.java b/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/CargoTest.java deleted file mode 100644 index 00d08bd90dcde9e6609f7895a884a4dcfc685afd..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/CargoTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2009-2010 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.itests.cargo.jrmp; - -import java.net.URL; - -import org.testng.Assert; -import org.testng.annotations.Test; - -/** - * Tests the JOnAS - CARGO plug-in. This test is expected to work with JOnAS 4 - * and JOnAS 5 without any issues. - * - * @author S. Ali Tokmen - * @author Florent Benoit junit->TestNG - */ -public class CargoTest extends TestCommons { - - @Test - public void testCargo() throws Exception { - final URL url = new URL("http://localhost:" + this.webcontainerPort + "/cargocpc/index.html"); - final String expected = "Cargo Ping Component used to verify if the container is started."; - - String content = null; - final long stopTime = System.currentTimeMillis() + TestCommons.TIMEOUT * 1000; - while (System.currentTimeMillis() < stopTime) { - Thread.sleep(1000); - content = this.getContentAsString(url); - if (content.contains(expected)) { - break; - } - } - - Assert.assertTrue(content.contains(expected), content + " does not contain " + expected); - } - -} diff --git a/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/ClassLoaderTest.java b/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/ClassLoaderTest.java deleted file mode 100644 index c9521e803849b634748016646b459db1801dc891..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/ClassLoaderTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2009-2010 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.itests.cargo.jrmp; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; - -import org.testng.Assert; -import org.testng.annotations.Test; - -/** - * Tests that the JONAS-364 bug doesn't happen. - * @author Florent - */ -public class ClassLoaderTest extends TestCommons { - - @Test - public void testJonas364() throws Exception { - String jBase = getJOnASBase(); - Assert.assertNotNull(jBase, "Unable to get JOnAS Base property"); - - // Check the file with result is here - File resultFile = new File(jBase + File.separator + "classloader-results.txt"); - - Assert.assertTrue(resultFile.exists(), "No results for classloader"); - - // Read the first line - FileReader fReader = new FileReader(resultFile); - BufferedReader bufferedReader = new BufferedReader(fReader); - String firstLine = bufferedReader.readLine(); - Assert.assertEquals(firstLine, "OK"); - String secondLine = bufferedReader.readLine(); - Assert.assertEquals(secondLine, "OK"); - - } - -} diff --git a/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/CookieManager.java b/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/CookieManager.java deleted file mode 100644 index f10c6a88aaadd5dbd0af69d29f331132f52d40d6..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/CookieManager.java +++ /dev/null @@ -1,165 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2010 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.itests.cargo.jrmp; - -import java.io.IOException; -import java.net.URLConnection; -import java.text.DateFormat; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -/** - * HTTP cookie manager. - * - * @author S. Ali Tokmen - */ -public class CookieManager { - - private static final String DATE_FORMAT = "EEE, dd-MMM-yyyy hh:mm:ss z"; - - private static final DateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT); - - private List cookies; - - /** - * Constructs a cookie manager with no cookies. - */ - public CookieManager() { - this.cookies = new ArrayList(); - } - - /** - * Constructs a cookie manager with no cookies. - * - * @param copy CookieManager to copy cookies from. - */ - public CookieManager(CookieManager copy) { - if (copy != null) { - this.cookies = new ArrayList(copy.cookies); - } else { - this.cookies = new ArrayList(); - } - } - - /** - * Adds a cookie to the cookies list. - * - * @param cookie Cookie string to add. - */ - private void addCookie(String cookie) { - String key = cookie.substring(0, cookie.indexOf('=')); - for (String c : this.cookies) { - String k = c.substring(0, c.indexOf('=')); - if (k.equals(key)) { - this.cookies.remove(cookie); - break; - } - } - this.cookies.add(cookie); - } - - /** - * Retrieves and stores cookies returned by the host on the other side of - * the the open java.net.URLConnection. The connection MUST have been opened - * using the connect() method or a IOException will be thrown. - * - * @param conn A URLConnection - must be open, or IOException will be thrown - * @throws IOException Thrown if conn is not open. - */ - public void storeCookies(URLConnection conn) throws IOException { - String headerName = null; - for (int i = 1; (headerName = conn.getHeaderFieldKey(i)) != null; i++) { - if ("Set-Cookie".equals(headerName)) { - addCookie(conn.getHeaderField(i)); - } - } - } - - /** - * Prior to opening a URLConnection, calling this method will set all - * unexpired cookies that match the path or subpaths for thi underlying URL. - * The connection MUST NOT have been opened method or an IOException will be - * thrown. - * - * @param conn A URLConnection - must NOT be open, or IOException will be - * thrown - * @throws IOException Thrown if conn has already been opened. - * @throws ParseException Thrown if the "expires" field of the cookie is not - * a valid date. - */ - public void setCookies(URLConnection conn) throws IOException, ParseException { - StringBuilder cookies = new StringBuilder(); - for (String cookie : this.cookies) { - String c = null; - String domain = ""; - String path = ""; - Date expires = null; - for (String part : cookie.split(";")) { - if (c == null) { - c = part; - } - String[] parts = part.trim().split("="); - if (parts.length == 2) { - if ("domain".equals(parts[0])) { - domain = parts[1]; - } else if ("path".equals(parts[0])) { - path = parts[1]; - } else if ("expires".equals(parts[0])) { - expires = dateFormat.parse(parts[1]); - } - } - } - if (c == null) { - break; - } - if (expires != null) { - if ((new Date()).after(expires)) { - break; - } - } - if (!conn.getURL().getHost().endsWith(domain)) { - break; - } - if (!conn.getURL().getPath().startsWith(path)) { - break; - } - if (cookies.length() > 0) { - cookies.append("; "); - } - cookies.append(c); - } - if (cookies.length() > 0) { - conn.setRequestProperty("Cookie", cookies.toString()); - } - } - - @Override - public String toString() { - return super.toString() + this.cookies; - } -} diff --git a/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/JDBCConnectionLeakTest.java b/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/JDBCConnectionLeakTest.java deleted file mode 100644 index 801d039253d5178190407bd84e07452e450f001e..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/JDBCConnectionLeakTest.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2009-2010 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.itests.cargo.jrmp; - -import java.net.URL; - -import javax.management.Attribute; -import javax.management.ObjectName; - -import org.testng.Assert; -import org.testng.annotations.Test; - -/** - * Tests the JDBC connection leak servlet. - * - * @author Florent Benoit - */ -public class JDBCConnectionLeakTest extends TestCommons { - - /** - * Test that the connection leak closing mechanism is working - * @throws Exception - */ - @Test - public void testConnectionLeak() throws Exception { - int CONNECTION_LEAKS_REQUEST = 3; - - ObjectName datasourceON = - new ObjectName("jonas:j2eeType=JCAConnectionFactory,name=jdbc_1,JCAResource=jdbc_1,J2EEServer=jonas"); - ObjectName jndiJDBCInterceptorON = new ObjectName("jonas:type=service,name=jndi-interceptors,interceptor=" - + "org.ow2.jonas.jndi.interceptors.impl.datasource.DataSourceLeakDetectorContextInterceptor"); - - // Check there is no busy connections - Integer currentBusy = (Integer) this.mBeanServerConnection.getAttribute(datasourceON, "currentBusy"); - Assert.assertNotNull(currentBusy); - Assert.assertEquals(currentBusy.intValue(), 0); - - // Do some connection leaks - for (int i = 0; i < CONNECTION_LEAKS_REQUEST; i++) { - hitConnectionLeakServlet(); - } - - // Check busy are still to 0 (automatic close of connection leak is working) - // Wait a little - Thread.sleep(2000); - currentBusy = (Integer) this.mBeanServerConnection.getAttribute(datasourceON, "currentBusy"); - Assert.assertEquals(currentBusy.intValue(), 0); - - // Disable automatic close of connection leaks - Attribute attribute = new Attribute("forceClose", false); - this.mBeanServerConnection.setAttribute(jndiJDBCInterceptorON, attribute); - - // Do some connection leaks - for (int i = 0; i < CONNECTION_LEAKS_REQUEST; i++) { - hitConnectionLeakServlet(); - } - - // Check that now we have busy connections - // Wait a little - Thread.sleep(2000); - currentBusy = (Integer) this.mBeanServerConnection.getAttribute(datasourceON, "currentBusy"); - Assert.assertEquals(currentBusy.intValue(), CONNECTION_LEAKS_REQUEST); - } - - /** - * Make a request and check that the result is OK - */ - protected void hitConnectionLeakServlet() throws Exception { - // Connect on the servlet that is making connection leaks - final URL url = new URL("http://localhost:" + this.webcontainerPort + "/connection-leaks/"); - final String expected = "Example OK"; - - String content = null; - final long stopTime = System.currentTimeMillis() + TestCommons.TIMEOUT * 1000; - while (System.currentTimeMillis() < stopTime) { - Thread.sleep(1000); - content = this.getContentAsString(url); - if (content.contains(expected)) { - break; - } - } - // Check expected value - Assert.assertTrue(content.contains(expected), content + " does not contain " + expected); - } - -} diff --git a/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/JaxWSAddTest.java b/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/JaxWSAddTest.java deleted file mode 100644 index 548550aa60d5202b38c756109859654d3ab9b20f..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/JaxWSAddTest.java +++ /dev/null @@ -1,141 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2010 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.itests.cargo.jrmp; - -import java.lang.reflect.Method; -import java.net.URL; -import java.util.Random; - -import org.testng.Assert; -import org.testng.annotations.Test; - -import org.apache.cxf.endpoint.Client; -import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory; - -/** - * Tests the JAX-WS WSAdd service. - */ -public class JaxWSAddTest extends TestCommons { - - private String serviceURL; - - private URL wsdlURL; - - @Test - public void waitForWSAddServiceInitialization() throws Exception { - this.serviceURL = "http://localhost:" + this.webcontainerPort + "/wsadd-sample/WSAddService"; - this.wsdlURL = new URL(this.serviceURL + "?wsdl"); - - final String expected = "http://wsadd.applis.tests.jonas.ow2.org/"; - - String content = null; - final long stopTime = System.currentTimeMillis() + TestCommons.TIMEOUT * 1000; - while (System.currentTimeMillis() < stopTime) { - Thread.sleep(1000); - content = this.getContentAsString(this.wsdlURL); - if (content.contains(expected)) { - break; - } - } - - Assert.assertTrue(content.contains(expected), content + " does not contain " + expected); - } - - - @Test(dependsOnMethods = "waitForWSAddServiceInitialization") - public void testWSAddService() throws Exception { - final Random random = new Random(System.currentTimeMillis()); - final int op1 = random.nextInt(); - final int op2 = random.nextInt(); - - JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance(); - Client client = dcf.createClient(this.wsdlURL); - - Object addRequest = Thread.currentThread().getContextClassLoader().loadClass("org.ow2.jonas.tests.applis.wsadd.AddRequest").newInstance(); - Method setOp1 = addRequest.getClass().getMethod("setOp1", Integer.TYPE); - Method setOp2 = addRequest.getClass().getMethod("setOp2", Integer.TYPE); - setOp1.invoke(addRequest, op1); - setOp2.invoke(addRequest, op2); - Object addResponse = client.invoke("add", addRequest)[0]; - - Method getReturn = addResponse.getClass().getMethod("getReturn"); - String sresult = getReturn.invoke(addResponse).toString(); - int result = 0; - try { - result = Integer.parseInt(sresult); - } catch (NumberFormatException e) { - Assert.fail("did not get a add result value: " + sresult); - } - - Assert.assertEquals(result, op1+op2, "add result incorrect: " + result + ", " + op1 + ", " + op2); - - } - - // uncomment the test to reproduce the Bug JIRA #213 - //@Test(dependsOnMethods = "waitForWSAddServiceInitialization") - public void testEnvEntryInWSBug213() throws Exception { - JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance(); - Client client = dcf.createClient(this.wsdlURL); - - Object checkResponse = client.invoke("checkEnvEntry")[0]; - - Method getReturn = checkResponse.getClass().getMethod("getReturn"); - String sresult = getReturn.invoke(checkResponse).toString(); - boolean result = result = Boolean.valueOf(sresult); - Assert.assertTrue(result, "Env-Entry in WS-Pojo checking failed"); - - } - - // uncomment the test to reproduce the Bug JIRA #215 - //@Test(dependsOnMethods = "waitForWSAddServiceInitialization") - public void testEjbInWSBug215() throws Exception { - JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance(); - Client client = dcf.createClient(this.wsdlURL); - - Object checkResponse = client.invoke("checkEjb")[0]; - - Method getReturn = checkResponse.getClass().getMethod("getReturn"); - String sresult = getReturn.invoke(checkResponse).toString(); - boolean result = result = Boolean.valueOf(sresult); - Assert.assertTrue(result, "@EJB in WS-Pojo checking failed"); - - } - - // uncomment the test to reproduce the Bug JIRA #215 - //@Test(dependsOnMethods = "waitForWSAddServiceInitialization") - public void testResourceInWSBug215() throws Exception { - JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance(); - Client client = dcf.createClient(this.wsdlURL); - - Object checkResponse = client.invoke("checkResource")[0]; - - Method getReturn = checkResponse.getClass().getMethod("getReturn"); - String sresult = getReturn.invoke(checkResponse).toString(); - boolean result = result = Boolean.valueOf(sresult); - Assert.assertTrue(result, "@Resource in WS-Pojo checking failed"); - - } - -} diff --git a/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/JaxWSTest.java b/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/JaxWSTest.java deleted file mode 100644 index 7b2bdf17bfd8c0e820943d8a46591b84005c5371..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/JaxWSTest.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2009-2010 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.itests.cargo.jrmp; - -import java.lang.reflect.Method; -import java.net.URL; -import java.util.UUID; - -import org.testng.Assert; -import org.testng.annotations.Test; - -import org.apache.cxf.endpoint.Client; -import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory; - -/** - * Tests the JAX-WS services. - */ -public class JaxWSTest extends TestCommons { - - private String serviceURL; - - private URL wsdlURL; - - @Test - public void waitForQuoteServiceInitialization() throws Exception { - this.serviceURL = "http://localhost:" + this.webcontainerPort + "/quote/QuoteReporterService"; - this.wsdlURL = new URL(this.serviceURL + "?wsdl"); - - final String expected = "http://jonas.ow2.org/tutorial/jaxws/quote"; - - String content = null; - final long stopTime = System.currentTimeMillis() + TestCommons.TIMEOUT * 1000; - while (System.currentTimeMillis() < stopTime) { - Thread.sleep(1000); - content = this.getContentAsString(this.wsdlURL); - if (content.contains(expected)) { - break; - } - } - - Assert.assertTrue(content.contains(expected), content + " does not contain " + expected); - } - - @Test(dependsOnMethods = "waitForQuoteServiceInitialization") - public void checkBugJonas131() throws Exception { - // JONAS-131: When exposing WebServices with OnDemand feature enabled, - // the specified URL, where the webservice is available, is displayed - // using the "onDemand" port and not the web application server port. - - final String content = this.getContentAsString(this.wsdlURL); - Assert.assertTrue(content.contains(this.serviceURL), content + " does not contain " + this.wsdlURL); - } - - @Test(dependsOnMethods = "waitForQuoteServiceInitialization") - public void testQuoteService() throws Exception { - final String quoteTicker = UUID.randomUUID().toString(); - - JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance(); - Client client = dcf.createClient(this.wsdlURL); - - Object quoteResponse = client.invoke("getQuote", quoteTicker)[0]; - Method getTicker = quoteResponse.getClass().getMethod("getTicker"); - Method getValue = quoteResponse.getClass().getMethod("getValue"); - - String ticker = getTicker.invoke(quoteResponse).toString(); - String value = getValue.invoke(quoteResponse).toString(); - - Assert.assertEquals(ticker, quoteTicker); - try { - Double.parseDouble(value); - } catch (NumberFormatException e) { - Assert.fail("did not get a ticker value: " + value); - } - } - -} diff --git a/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/TestCommons.java b/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/TestCommons.java deleted file mode 100644 index a1d819c1a118f0214ce550e80e06601bc6986420..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/TestCommons.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2009-2010 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.itests.cargo.jrmp; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.util.HashMap; -import java.util.Map; - -import javax.management.MBeanServerConnection; -import javax.management.remote.JMXConnector; -import javax.management.remote.JMXConnectorFactory; -import javax.management.remote.JMXServiceURL; - -import org.testng.Assert; -import org.testng.annotations.BeforeClass; - -/** - * Common test files. - * - * @author S. Ali Tokmen - */ -public class TestCommons { - - protected static final int TIMEOUT = 10; - - protected MBeanServerConnection mBeanServerConnection; - - protected int webcontainerPort; - - @BeforeClass - public void setUp() throws Exception { - String webcontainerPort = System.getProperty("webcontainer.port"); - Assert.assertNotNull(webcontainerPort, "webcontainer.port not set!"); - this.webcontainerPort = Integer.parseInt(webcontainerPort); - - this.mBeanServerConnection = getMBeanServerConnection("jonas", "jonas"); - } - - /** - * Get an MBeanServerConnection using the provided credentials. - * @param username User name. - * @param password Password. - * @return An MBeanServerConnection. - * @throws Exception If anything fails, for example invalid credentials. - */ - protected MBeanServerConnection getMBeanServerConnection(final String username, final String password) throws Exception { - String carolUrl = System.getProperty("carol.url"); - Assert.assertNotNull(carolUrl, "carol.url not set!"); - - Map properties = new HashMap(1); - if (username != null && password != null) { - properties.put(JMXConnector.CREDENTIALS, new String[] { username, password } ); - } - JMXServiceURL address = new JMXServiceURL(carolUrl); - JMXConnector jmxConnector = JMXConnectorFactory.connect(address, properties); - return jmxConnector.getMBeanServerConnection(); - } - - /** - * Get the URL content as a String. - * @param url the url - * @return the URL content as a String - * @throws IOException if an I/O exception occurs. - */ - protected String getContentAsString(final URL url) throws IOException { - final InputStream inStream = url.openStream(); - final ByteArrayOutputStream bos = new ByteArrayOutputStream(); - try { - int c; - while ((c = inStream.read()) != -1) { - bos.write(c); - } - } finally { - inStream.close(); - bos.flush(); - } - final String urlString = bos.toString(); - return urlString; - } - - /** - * Check if needle appears in haystack. - * @param haystack Haystack to look in. - * @param needle Needle to look for. - */ - protected void checkString(final String haystack, final String needle) { - if (!haystack.contains(needle)) { - Assert.fail("\"" + needle + "\" not found in \"" + haystack + "\""); - } - } - - /** - * @return jonasBase - */ - protected String getJOnASBase() { - return System.getProperty("jonas.base"); - } - -} diff --git a/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/VersioningTest.java b/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/VersioningTest.java deleted file mode 100644 index 9124f03d1679bd3fd6ce97494c25ca4d02ecd7b4..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/VersioningTest.java +++ /dev/null @@ -1,664 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2010 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.itests.cargo.jrmp; - -import java.io.BufferedReader; -import java.io.FileNotFoundException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.net.Authenticator; -import java.net.HttpURLConnection; -import java.net.URL; -import java.util.List; -import java.util.Map; - -import javax.management.Attribute; -import javax.management.ObjectName; - -import org.apache.commons.codec.binary.Base64; -import org.apache.commons.io.IOUtils; - -import org.testng.Assert; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - -/** - * Versioning Service test suite.
    - *
    - * Note that this also tests various other Java EE aspects of JOnAS, including - * EJB3, the @EJB annotation in servlets, login modules, etc. - * - * @author S. Ali Tokmen - */ -public class VersioningTest extends TestCommons { - - /** - * J2EEServer object name. - */ - private static ObjectName j2eeServer; - - /** - * Versioning service object name. - */ - private static ObjectName versioning; - - /** - * Was versioning started at the beginning of the test? - */ - private static boolean versioningStarted; - - /** - * Old default deployment policy if versioning was started at the beginning - * of the test. - */ - private static String defaultDeploymentPolicy; - - /** - * File name of the version 1.0.0. - */ - private static String version1File; - - /** - * File name of the version 2.0.0. - */ - private static String version2File; - - /** - * File name of the secured-war. - */ - private static String securedWarFile; - - /** - * File name of the non-versioned-war. - */ - private static String nonVersionedWarFile; - - /** - * File name of the root-war. - */ - private static String rootWarFile; - - /** - * Cookie manager that will be used as soon as version 1.0.0 gets deployed. - * It is expected to stay on version 1.0.0. - */ - private static CookieManager client1; - - /** - * Cookie manager that will be used as soon as version 2.0.0 gets deployed. - * It is expected to stay on version 1.0.0. - */ - private static CookieManager client2; - - /** - * Cookie manager that will be used as soon as version 2.0.0 gets set as - * default version. It is expected to stay on version 2.0.0. - */ - private static CookieManager client3; - - private String projectVersion; - - @Override - @BeforeClass - public void setUp() throws Exception { - super.setUp(); - - // Create all cookie managers - client1 = new CookieManager(); - client2 = new CookieManager(); - client3 = new CookieManager(); - - // ObjectNames used by these tests - j2eeServer = ObjectName.getInstance("jonas:j2eeType=J2EEServer,name=jonas"); - versioning = ObjectName.getInstance("jonas:type=service,name=versioning"); - - projectVersion = System.getProperty("project.version"); - Assert.assertNotNull(projectVersion, "project.version not set!"); - } - - @Test - public void deactivateDevelopmentMode() throws Exception { - ObjectName depmonitor = new ObjectName("jonas:type=service,name=depmonitor"); - this.mBeanServerConnection.setAttribute(depmonitor, new Attribute("development", Boolean.FALSE)); - } - - @SuppressWarnings("unchecked") - @Test(dependsOnMethods = "deactivateDevelopmentMode") - public void enableVersioning() throws Exception { - final Object[] opParams = {"versioning"}; - final String[] opSignature = {"java.lang.String"}; - - if ("RUNNING".equals(mBeanServerConnection.invoke(j2eeServer, "getServiceState", opParams, opSignature))) { - versioningStarted = true; - defaultDeploymentPolicy = (String) mBeanServerConnection.getAttribute(versioning, "DefaultDeploymentPolicy"); - mBeanServerConnection.invoke(j2eeServer, "stopService", opParams, opSignature); - } - - mBeanServerConnection.invoke(j2eeServer, "startService", opParams, opSignature); - while (!"RUNNING".equals(mBeanServerConnection.invoke(j2eeServer, "getServiceState", opParams, opSignature))) { - System.out.println("versioning service not RUNNING yet..."); - Thread.sleep(1000); - } - - // Get the Versioning service - boolean versioningEnabled = ((Boolean) mBeanServerConnection.getAttribute(versioning, "VersioningEnabled")).booleanValue(); - if (!versioningEnabled) { - Assert.fail("Cannot enable the versioning service"); - } - } - - @Test(dependsOnMethods = "enableVersioning") - public void testDeployRootWar() throws Exception { - rootWarFile = deployApplication("root-war/root-war.war"); - } - - @Test(dependsOnMethods = "testDeployRootWar") - public void testRootWar() throws Exception { - String response = getURL("http://localhost:" + webcontainerPort + "/test.jsp", null, null); - - checkString(response, "Context URL: \"\""); - checkString(response, "Test image: "); - } - - @Test(dependsOnMethods = "testDeployRootWar") - public void testRootWarVersionedURL() throws Exception { - String response = getURL("http://localhost:" + webcontainerPort + "/-1.0.0/test.jsp", null, null); - - checkString(response, "Context URL: \"/-1.0.0\""); - checkString(response, "Test image: "); - } - - @Test(dependsOnMethods = "testDeployRootWar") - public void testRootRedirectWithContext() throws Exception { - URL redirect = new URL("http://localhost:" + webcontainerPort + "/redirect-servlet-with-context"); - - HttpURLConnection connection = (HttpURLConnection) redirect.openConnection(); - try { - connection.setInstanceFollowRedirects(false); - - Assert.assertEquals(connection.getResponseCode(), HttpURLConnection.HTTP_MOVED_TEMP); - - String location = connection.getHeaderField("Location"); - Assert.assertEquals(location, "http://localhost:" + webcontainerPort + "/somewhere"); - } finally { - connection.disconnect(); - connection = null; - System.gc(); - } - } - - @Test(dependsOnMethods = "testDeployRootWar") - public void testRootRedirectWithoutContext() throws Exception { - URL redirect = new URL("http://localhost:" + webcontainerPort + "/redirect-servlet-without-context"); - - HttpURLConnection connection = (HttpURLConnection) redirect.openConnection(); - try { - connection.setInstanceFollowRedirects(false); - - Assert.assertEquals(connection.getResponseCode(), HttpURLConnection.HTTP_MOVED_TEMP); - - String location = connection.getHeaderField("Location"); - Assert.assertEquals(location, "http://localhost:" + webcontainerPort + "/somewhere"); - } finally { - connection.disconnect(); - connection = null; - System.gc(); - } - } - - @Test(dependsOnMethods = {"testRootWar", "testRootWarVersionedURL", "testRootRedirectWithContext", - "testRootRedirectWithoutContext"}) - public void testDeployVersion1() throws Exception { - version1File = deployApplication("version1.0.0/test-versioning.ear"); - - verifyVersion(client1, "1.0.0"); - } - - @Test(dependsOnMethods = "enableVersioning") - public void testDeployVersionedWelcomeFiles() throws Exception { - String deployed = deployApplication("welcome-file/test-versioning-welcome.war"); - - // Expect a 302 for virtual context access without trailing '/' - assertHttpRedirectIsOk("http://localhost:" + webcontainerPort + "/welcome", - "http://localhost:" + webcontainerPort + "/welcome/"); - - // Expect a normal HTML response - String content = getURL("http://localhost:" + webcontainerPort + "/welcome/"); - System.out.println(content); - Assert.assertTrue(content.contains("Welcome")); - - // Expect a 302 for versioned context access without trailing '/' - assertHttpRedirectIsOk("http://localhost:" + webcontainerPort + "/welcome-1.0.0", - "http://localhost:" + webcontainerPort + "/welcome-1.0.0/"); - - // Expect a normal HTML response - String content2 = getURL("http://localhost:" + webcontainerPort + "/welcome-1.0.0/"); - System.out.println(content2); - Assert.assertTrue(content2.contains("Welcome")); - - undeployApplication(deployed); - } - - private void assertHttpRedirectIsOk(String in, String expected) throws Exception { - - URL redirect = new URL(in); - HttpURLConnection connection = (HttpURLConnection) redirect.openConnection(); - try { - connection.setInstanceFollowRedirects(false); - - Assert.assertEquals(connection.getResponseCode(), HttpURLConnection.HTTP_MOVED_TEMP); - - String location = connection.getHeaderField("Location"); - Assert.assertEquals(location, expected); - } finally { - connection.disconnect(); - connection = null; - System.gc(); - } - - } - - @Test(dependsOnMethods = "testDeployVersion1") - public void testDeployVersion2() throws Exception { - version2File = deployApplication("version2.0.0/test-versioning.ear"); - - verifyVersion(client1, "1.0.0"); - verifyVersion(client2, "1.0.0"); - } - - @Test(dependsOnMethods = "testDeployVersion2") - public void testSetDefaultVersion2() throws Exception { - final Object[] opParams = {"/test-versioning-2.0.0", "Default"}; - final String[] opSignature = {"java.lang.String", "java.lang.String"}; - - ObjectName webModule = ObjectName.getInstance( - "jonas:j2eeType=WebModule,name=//localhost/test-versioning,J2EEApplication=none,J2EEServer=jonas,virtualContext=true"); - mBeanServerConnection.invoke(webModule, "rebindContext", opParams, opSignature); - - verifyVersion(client1, "1.0.0"); - verifyVersion(client2, "1.0.0"); - verifyVersion(client3, "2.0.0"); - } - - @Test(dependsOnMethods = "testSetDefaultVersion2") - public void testRedirectWithContext() throws Exception { - URL redirect = new URL("http://localhost:" + webcontainerPort + "/test-versioning/redirect-servlet-with-context"); - - HttpURLConnection connection = (HttpURLConnection) redirect.openConnection(); - try { - connection.setInstanceFollowRedirects(false); - - Assert.assertEquals(connection.getResponseCode(), HttpURLConnection.HTTP_MOVED_TEMP); - - String location = connection.getHeaderField("Location"); - Assert.assertEquals(location, "http://localhost:" + webcontainerPort + "/test-versioning/somewhere"); - } finally { - connection.disconnect(); - connection = null; - System.gc(); - } - } - - @Test(dependsOnMethods = "testSetDefaultVersion2") - public void testRedirectWithoutContext() throws Exception { - URL redirect = new URL("http://localhost:" + webcontainerPort + "/test-versioning/redirect-servlet-without-context"); - - HttpURLConnection connection = (HttpURLConnection) redirect.openConnection(); - try { - connection.setInstanceFollowRedirects(false); - - Assert.assertEquals(connection.getResponseCode(), HttpURLConnection.HTTP_MOVED_TEMP); - - String location = connection.getHeaderField("Location"); - Assert.assertEquals(location, "http://localhost:" + webcontainerPort + "/test-versioning/somewhere"); - } finally { - connection.disconnect(); - connection = null; - System.gc(); - } - } - - @Test(dependsOnMethods = "testSetDefaultVersion2") - public void testUndeployVersion1() throws Exception { - undeployApplication(version1File); - - verifyVersion(client1, "2.0.0"); - verifyVersion(client2, "2.0.0"); - verifyVersion(client3, "2.0.0"); - } - - @Test(dependsOnMethods = {"testUndeployVersion1", "testRedirectWithContext", "testRedirectWithoutContext"}) - public void testUndeployVersion2() throws Exception { - undeployApplication(version2File); - - verifyVersion(client1, null); - verifyVersion(client2, null); - verifyVersion(client3, null); - } - - @Test(dependsOnMethods = {"testRootWar", "testRootWarVersionedURL"}) - public void testDeploySecuredWar() throws Exception { - securedWarFile = deployApplication("secured-war/secured-war.war"); - } - - @Test(dependsOnMethods = "testDeploySecuredWar") - public void testSecuredWarWithoutCredentials() throws Exception { - String response = getURL("http://localhost:" + webcontainerPort + "/secured-war/", null, null); - checkString(response, "Connection error: [401] Unauthorized"); - } - - @Test(dependsOnMethods = "testDeploySecuredWar") - public void testSecuredWarWithIncorrectCredentials() throws Exception { - String response = getURL("http://localhost:" + webcontainerPort + "/secured-war/", "jetty", "jetty"); - checkString(response, "Connection error: [403] Forbidden"); - } - - @Test(dependsOnMethods = "testDeploySecuredWar") - public void testSecuredWarWithCorrectCredentials() throws Exception { - String response = getURL("http://localhost:" + webcontainerPort + "/secured-war/", "jonas", "jonas"); - checkString(response, "Hello, World"); - } - - @Test(dependsOnMethods = "testDeploySecuredWar") - public void testDeployNonVersionedWarUnderTheSecuredWarContext() throws Exception { - nonVersionedWarFile = deployApplication("non-versioned-war/non-versioned-war.war"); - } - - @Test(dependsOnMethods = "testDeployNonVersionedWarUnderTheSecuredWarContext") - public void testNonVersionedWarUnderTheSecuredWarContext() throws Exception { - String response = getURL("http://localhost:" + webcontainerPort + "/secured-war/non-versioned/", null, null); - checkString(response, "Hello again, World"); - } - - @Test(dependsOnMethods = {"testSecuredWarWithoutCredentials", "testSecuredWarWithIncorrectCredentials", - "testSecuredWarWithCorrectCredentials", "testNonVersionedWarUnderTheSecuredWarContext"}) - public void testUndeploySecuredWar() throws Exception { - undeployApplication(securedWarFile); - - String response = getURL("http://localhost:" + webcontainerPort + "/secured-war/", null, null); - checkString(response, "Connection error: [404] Not Found"); - } - - @Test(dependsOnMethods = {"testUndeploySecuredWar"}) - public void testUndeployNonVersionedWarUnderTheSecuredWarContext() throws Exception { - undeployApplication(nonVersionedWarFile); - - String response = getURL("http://localhost:" + webcontainerPort + "/secured-war/non-versioned/", null, null); - checkString(response, "Connection error: [404] Not Found"); - } - - @Test(dependsOnMethods = {"testUndeployVersion2", "testUndeployNonVersionedWarUnderTheSecuredWarContext"}) - public void testUndeployRootWar() throws Exception { - undeployApplication(rootWarFile); - - String response = getURL("http://localhost:" + webcontainerPort + "/test.jsp", null, null); - // Might be Bad Request (400) or Not Found (404), see JONAS-121 - // The tomcat7 itests module will check for "Connection error: Not Found" - checkString(response, "Connection error: [404] Not Found"); - } - - @Test(dependsOnMethods = "enableVersioning") - public void testJonas239() throws Exception { - final String JAXWS_SAMPLE = "jonas-itests-applications-jaxws-sample"; - String jaxWsSampleURL = null; - List deployedEars = (List) mBeanServerConnection.getAttribute(j2eeServer, "deployedEars"); - for (String deployedEar : deployedEars) { - if (deployedEar.contains(JAXWS_SAMPLE)) { - jaxWsSampleURL = deployedEar; - break; - } - } - Assert.assertNotNull(jaxWsSampleURL, "Cannot find " + JAXWS_SAMPLE + " in " + deployedEars); - - // Redeploy to have it versioned - final Object[] opParams = {jaxWsSampleURL}; - final String[] opSignature = {"java.lang.String"}; - mBeanServerConnection.invoke(j2eeServer, "undeploy", opParams, opSignature); - mBeanServerConnection.invoke(j2eeServer, "deploy", opParams, opSignature); - - String wsdl; - final String originalURL = "http://localhost:" + webcontainerPort + "/quote/QuoteReporterService"; - final String versionedURL = "http://localhost:" + webcontainerPort + "/quote-" + projectVersion - + "/QuoteReporterService"; - - wsdl = getURL(originalURL + "?wsdl"); - Assert.assertTrue(wsdl.contains(originalURL), "The WSDL does not contain " + originalURL + ":\n" + wsdl); - Assert.assertFalse(wsdl.contains(versionedURL), "The WSDL contains " + versionedURL + ":\n" + wsdl); - - wsdl = getURL(versionedURL + "?wsdl"); - Assert.assertTrue(wsdl.contains(versionedURL), "The WSDL does not contain " + versionedURL + ":\n" + wsdl); - Assert.assertFalse(wsdl.contains(originalURL), "The WSDL contains " + originalURL + ":\n" + wsdl); - } - - @Test(dependsOnMethods = {"testUndeployRootWar", "testJonas239"}) - public void testDisableVersioning() throws Exception { - final Object[] opParams = {"versioning"}; - final String[] opSignature = {"java.lang.String"}; - mBeanServerConnection.invoke(j2eeServer, "stopService", opParams, opSignature); - while ("RUNNING".equals(mBeanServerConnection.invoke(j2eeServer, "getServiceState", opParams, opSignature))) { - System.out.println("versioning service still RUNNING..."); - Thread.sleep(1000); - } - if (versioningStarted) { - versioningStarted = true; - mBeanServerConnection.invoke(j2eeServer, "startService", opParams, opSignature); - mBeanServerConnection.setAttribute(versioning, new Attribute("DefaultDeploymentPolicy", defaultDeploymentPolicy)); - } - } - - private String deployApplication(final String filename) throws Exception { - Object[] opParams; - String[] opSignature; - - System.out.println("Now deploying " + filename); - InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(filename); - if (inputStream == null) { - throw new FileNotFoundException("Cannot find \"" + filename + "\" in the class loader"); - } - byte[] bytesOfFile = IOUtils.toByteArray(inputStream); - - String deployFilename; - if (filename.contains("/")) { - deployFilename = filename.substring(filename.lastIndexOf('/')); - } else { - deployFilename = filename; - } - opParams = new Object[] {bytesOfFile, deployFilename, false}; - opSignature = new String[] {"[B", "java.lang.String", "boolean"}; - String sendFile = (String) mBeanServerConnection.invoke(j2eeServer, "sendFile", opParams, opSignature); - - opParams = new Object[] {sendFile}; - opSignature = new String[] {"java.lang.String"}; - mBeanServerConnection.invoke(j2eeServer, "deploy", opParams, opSignature); - - return sendFile; - } - - private void undeployApplication(final String filename) throws Exception { - System.out.println("Now undeploying " + filename); - - Object[] opParams; - String[] opSignature; - - opParams = new Object[] {filename}; - opSignature = new String[] {"java.lang.String"}; - mBeanServerConnection.invoke(j2eeServer, "undeploy", opParams, opSignature); - mBeanServerConnection.invoke(j2eeServer, "removeModuleFile", opParams, opSignature); - } - - private void verifyVersion(final CookieManager cookies, final String version) throws Exception { - String staticResponse = getURL("http://localhost:" + webcontainerPort + "/test-versioning", - version == null, cookies); - String servletResponse = getURL("http://localhost:" + webcontainerPort + "/test-versioning/test-servlet", - version == null, cookies); - if (version != null) { - checkString(staticResponse, "Hello, World"); - - checkString(servletResponse, "WAR version: " + version); - checkString(servletResponse, "EJB version: " + version); - - checkString(servletResponse, "Context URL: \"/test-versioning\""); - checkString(servletResponse, "Test image: "); - - // Output that looks like split but that actually isn't (JONAS-221) - if ("2.0.0".equals(version)) { - checkString(servletResponse, "First part: /te ... and no other parts !"); - } - } - - String jspResponse = getURL("http://localhost:" + webcontainerPort + "/test-versioning/test.jsp", - version == null, cookies); - if (version != null) { - checkString(jspResponse, "Context URL: \"/test-versioning\""); - checkString(jspResponse, "Test image: "); - } - } - - private String getURL(final String url, final boolean expect404, final CookieManager cookies) throws Exception { - URL urlObject = new URL(url); - HttpURLConnection connection = (HttpURLConnection) urlObject.openConnection(); - try { - System.out.println("Sending cookies: " + cookies); - cookies.setCookies(connection); - if (expect404) { - try { - connection.getInputStream(); - } catch (Exception ignored) { - // We'll check the response code only - } - - if (connection.getResponseCode() != HttpURLConnection.HTTP_NOT_FOUND) { - Assert.fail("Did not get an error " + HttpURLConnection.HTTP_NOT_FOUND + " but rather a code " - + connection.getResponseCode() + " (" + connection.getResponseMessage() - + ") after application undeployment!"); - } - - return null; - } else { - InputStream inputStream; - try { - inputStream = connection.getInputStream(); - } catch (Exception e) { - Assert.fail("HTTP request failed: " + connection.getResponseCode() + " " + connection.getResponseMessage()); - return null; - } - BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); - StringBuilder builder = new StringBuilder(); - - String inputLine; - while ((inputLine = reader.readLine()) != null) { - builder.append(inputLine); - builder.append(' '); - } - reader.close(); - - cookies.storeCookies(connection); - System.out.println("Received cookies: " + cookies); - - return builder.toString(); - } - } finally { - connection.disconnect(); - connection = null; - System.gc(); - } - } - - private String getURL(final String url) throws Exception { - return getURL(url, null, null); - } - - private String getURL(final String url, final String username, final String password) throws Exception { - HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection(); - try { - connection.setRequestMethod("GET"); - - if (username != null) { - Base64 enc = new Base64(); - String authData = username + ":" + password; - String base64AuthData = enc.encodeToString(authData.getBytes("UTF-8")); - if (base64AuthData.contains("=")) { - // Cut the string at the first equals sign - // For some reason, the Base64 implementation adds characters - // afterwards, which get refused by the URL validator - base64AuthData = base64AuthData.substring(0, base64AuthData.indexOf('=')); - } - String basicHeader = "Basic " + base64AuthData + '='; - - System.out.println("Setting Authorization header: " + basicHeader); - connection.setRequestProperty("Authorization", basicHeader); - } else { - // FIXME: this can be removed as soon as - // https://issues.apache.org/jira/browse/CXF-2702 - // gets fixed and CXF 2.2.7 gets released. - Authenticator.setDefault(null); - } - - String response = null; - int responseCode = connection.getResponseCode(); - - if (responseCode == HttpURLConnection.HTTP_OK) { - InputStream is = connection.getInputStream(); - try { - response = IOUtils.toString(is); - } finally { - is.close(); - is = null; - } - } else { - StringBuilder sb = new StringBuilder(); - sb.append("Connection error: "); - sb.append("["); - sb.append(connection.getResponseCode()); - sb.append("] "); - sb.append(connection.getResponseMessage()); - printHeaders(sb, connection.getHeaderFields()); - response = sb.toString(); - } - - return response; - } finally { - connection.disconnect(); - connection = null; - System.gc(); - } - } - - private void printHeaders(StringBuilder sb, Map> headers) { - sb.append("\n"); - sb.append("Headers: "); - sb.append(headers.keySet()); - sb.append("\n"); - for(Map.Entry< String, List < String >> entry : headers.entrySet()) { - String header = entry.getKey(); - sb.append(" * "); - sb.append(header); - sb.append(" : "); - sb.append(entry.getValue()); - sb.append("\n"); - } - } - -} diff --git a/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/WebServicesAuditTestCase.java b/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/WebServicesAuditTestCase.java deleted file mode 100644 index 98d45242a69acb05cb69662eec247f782c0dd3cb..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/cargo/jrmp/src/test/java/org/ow2/jonas/itests/cargo/jrmp/WebServicesAuditTestCase.java +++ /dev/null @@ -1,156 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2011 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id: $ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.itests.cargo.jrmp; - -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; - -import javax.management.MBeanServerConnection; -import javax.management.Notification; -import javax.management.NotificationListener; -import javax.management.ObjectName; -import javax.xml.namespace.QName; - -import org.apache.http.HttpEntity; -import org.apache.http.HttpResponse; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.entity.InputStreamEntity; -import org.apache.http.impl.client.DefaultHttpClient; -import org.ow2.jonas.ws.jaxws.base.audit.JaxwsAuditReport; -import org.ow2.util.auditreport.impl.util.ObjectEncoder; -import org.testng.annotations.Test; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.fail; - -/** - * A {@code WebServicesAuditTestCase} is ... - * - * @author Guillaume Sauthier - */ -public class WebServicesAuditTestCase extends TestCommons { - - private JaxwsAuditReport report; - private boolean ok = false; - - @Test - public void testInvocationIdIsPropagatedThroughHttp() throws Exception { - String serviceURL = "http://localhost:" + this.webcontainerPort + "/wsadd-sample/PropagationChecker"; - - String invocationId = "parent/0:local/1"; - - DefaultHttpClient httpclient = new DefaultHttpClient(); - - HttpGet get = new HttpGet(serviceURL); - get.setHeader("Invocation-ID", invocationId); - HttpResponse response = httpclient.execute(get); - - - // Get hold of the response entity - HttpEntity entity = response.getEntity(); - - // If the response does not enclose an entity, there is no need - // to worry about connection release - if (entity != null) { - InputStream instream = entity.getContent(); - - BufferedReader reader = new BufferedReader(new InputStreamReader(instream)); - // do something useful with the response - String line = reader.readLine(); - assertEquals(line, invocationId); - - // Closing the input stream will trigger connection release - instream.close(); - - // When HttpClient instance is no longer needed, - // shut down the connection manager to ensure - // immediate deallocation of all system resources - httpclient.getConnectionManager().shutdown(); - - } else { - fail("No output for PropagateServlet, was expecting an Invocation-ID"); - } - - } - - @Test(timeOut = 11000) - public void testNotificationReportIsSend() throws Exception { - - final QName serviceQName = new QName("http://wsadd.applis.tests.jonas.ow2.org/", "WSAddService"); - final QName portQName = new QName("http://wsadd.applis.tests.jonas.ow2.org/", "WSAddPort"); - final QName operationQName = new QName("http://wsadd.applis.tests.jonas.ow2.org/", "add"); - - // Hookup a Listener - mBeanServerConnection.addNotificationListener(endpointHandler(), new NotificationListener() { - public void handleNotification(Notification notification, Object handback) { - - assertNotNull(notification.getMessage()); - report = ObjectEncoder.decode(notification.getMessage(), JaxwsAuditReport.class); - - assertEquals(QName.valueOf(report.getServiceQName()), serviceQName); - assertEquals(QName.valueOf(report.getPortQName()), portQName); - assertEquals(QName.valueOf(report.getOperationQName()), operationQName); - - ok = true; - } - }, null, null); - - // Call the webservice - String serviceURL = "http://localhost:" + this.webcontainerPort + "/wsadd-sample/WSAddService"; - - // Trigger the report generation - DefaultHttpClient client = new DefaultHttpClient(); - HttpPost post = new HttpPost(serviceURL); - InputStreamEntity entity = new InputStreamEntity(getClass().getResourceAsStream("../jrmp/soap-request-add.xml"), -1); - entity.setContentType("application/soap+xml"); - post.setEntity(entity); - client.execute(post); - - // Wait for some times before failing the tests - // That let some times for the report to be generated - // wait up to 10 seconds (20 * 500ms) - int i = 0; - int times = 20; - int sleepTime = 500; - while((report == null) || (i < times)) { - Thread.sleep(sleepTime); - i++; - } - - // Fail if the report was not generated - if (!ok) { - fail("Report was not generated after " + ((i * sleepTime) / 1000) + " seconds"); - } - - } - - private ObjectName endpointHandler() throws Exception { - return ObjectName.getInstance("jonas:type=Auditors,auditorType=wsendpoint"); - } -} diff --git a/jonas/modules/itests/cargo/jrmp/src/test/resources/jonas-290.war b/jonas/modules/itests/cargo/jrmp/src/test/resources/jonas-290.war deleted file mode 100644 index 097ac744894e76cfff0a80f99ac112798e72c30f..0000000000000000000000000000000000000000 Binary files a/jonas/modules/itests/cargo/jrmp/src/test/resources/jonas-290.war and /dev/null differ diff --git a/jonas/modules/itests/cargo/jrmp/src/test/resources/jonas-292.jar b/jonas/modules/itests/cargo/jrmp/src/test/resources/jonas-292.jar deleted file mode 100644 index 368ec8249789bbe6ad07f7771d423e5ded5bfa2c..0000000000000000000000000000000000000000 Binary files a/jonas/modules/itests/cargo/jrmp/src/test/resources/jonas-292.jar and /dev/null differ diff --git a/jonas/modules/itests/cargo/jrmp/src/test/resources/org/ow2/jonas/itests/cargo/jrmp/soap-request-add.xml b/jonas/modules/itests/cargo/jrmp/src/test/resources/org/ow2/jonas/itests/cargo/jrmp/soap-request-add.xml deleted file mode 100644 index 2b0fa6565e7632af2d69cbd816f9d830277ca244..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/cargo/jrmp/src/test/resources/org/ow2/jonas/itests/cargo/jrmp/soap-request-add.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - 1 - 1 - - - diff --git a/jonas/modules/itests/cargo/pom.xml b/jonas/modules/itests/cargo/pom.xml deleted file mode 100644 index 45aa2ec4966dcbf834f776843d9a3b9949f35219..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/cargo/pom.xml +++ /dev/null @@ -1,156 +0,0 @@ - - - - - org.ow2.jonas - jonas-itests - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas - jonas-itests-cargo - JOnAS :: iTests :: Cargo - Tests the JOnAS distribution via CARGO - pom - - - - org.testng - testng - test - - - commons-codec - commons-codec - 1.4 - test - - - commons-io - commons-io - 1.4 - test - - - - - com.sun.xml.bind - jaxb-xjc - 2.1.12 - test - - - org.apache.cxf - cxf-rt-frontend-jaxws - ${cxf.version} - test - - - org.apache.cxf - cxf-rt-transports-http - ${cxf.version} - test - - - - - org.ow2.jonas - jonas-itests-applications-connection-leaks - ${project.version} - war - - - org.ow2.jonas - jonas-itests-applications-jaxws-sample - ${project.version} - ear - - - org.ow2.jonas - jonas-itests-applications-versioning - ${project.version} - - - org.ow2.jonas.jonas-itests-applications-jaxws-add.assemblies - wsadd - ${project.version} - ear - - - org.ow2.jonas - jonas-itests-applications-classloader - ${project.version} - ipojo - jar - - - - - org.apache.httpcomponents - httpclient - 4.0.3 - test - - - org.apache.httpcomponents - httpcore - 4.0.1 - test - - - org.ow2.bundles - ow2-audit-report - - - org.ow2.jonas - jonas-webservices-jaxws - ${project.version} - - - - - - jrmp - iiop - irmi - security - - - - - - - 1.6 - - - tomcat7 - - - - - diff --git a/jonas/modules/itests/cargo/security/pom.xml b/jonas/modules/itests/cargo/security/pom.xml deleted file mode 100644 index 01be362dcba3c1f49736ee73d9648596abdfdbd7..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/cargo/security/pom.xml +++ /dev/null @@ -1,309 +0,0 @@ - - - - - org.ow2.jonas - jonas-itests-cargo - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas - jonas-itests-cargo-security - JOnAS :: iTests :: Cargo :: JMX security - Tests the JOnAS distribution via CARGO - - - - - - org.codehaus.mojo - build-helper-maven-plugin - ${build-helper.version} - - - generate-port-numbers - generate-test-sources - - reserve-network-port - - - - webcontainer.port - carol.port - jms.port - db.port - - - - - - - - - maven-dependency-plugin - - - unpack-assembly - generate-test-resources - - unpack - - - - - org.ow2.jonas.assemblies.profiles - jonas-full - ${project.version} - bin - zip - ${project.build.directory} - - - true - true - - - - copy-bundles - process-test-resources - - copy - - - - - org.ow2.jonas - jonas-itests-applications-classloader - ${project.version} - ipojo - jar - ${jonas.base}/deploy - - - true - true - - - - - - - - maven-antrun-plugin - - - copy-tests - generate-test-sources - - - - - - - - - - - - - - - - - - run - - - - create-jonas-base-with-all-options - generate-test-resources - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - run - - - - - - - - org.codehaus.cargo - cargo-maven2-plugin - ${cargo.version} - - - start-jonas - pre-integration-test - - start - - - - stop-jonas - post-integration-test - - stop - - - - - - jonas5x - installed - ${jonas.root} - - - existing - ${jonas.base} - - localhost - ${webcontainer.port} - http - jonas - jonas - - - - org.ow2.jonas - jonas-itests-applications-connection-leaks - war - - - org.ow2.jonas - jonas-itests-applications-jaxws-sample - ear - - - org.ow2.jonas.jonas-itests-applications-jaxws-add.assemblies - wsadd - ear - - - - - - - - - maven-surefire-plugin - - true - - - - surefire-it - integration-test - - test - - - - - webcontainer.port - ${webcontainer.port} - - - carol.url - service:jmx:rmi://localhost/jndi/rmi://localhost:${carol.port}/jrmpconnector_jonas - - - project.version - ${project.version} - - - jonas.base - ${jonas.base} - - - false - - - - - - - - diff --git a/jonas/modules/itests/cargo/security/src/test/java/org/ow2/jonas/itests/cargo/jmx_security/JmxSecurityTest.java b/jonas/modules/itests/cargo/security/src/test/java/org/ow2/jonas/itests/cargo/jmx_security/JmxSecurityTest.java deleted file mode 100644 index 8cfd02fdb36fd4dfac6b3a8b7c941b8d1090a7ab..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/cargo/security/src/test/java/org/ow2/jonas/itests/cargo/jmx_security/JmxSecurityTest.java +++ /dev/null @@ -1,115 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2010 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.itests.cargo.jmx_security; - -import java.lang.reflect.UndeclaredThrowableException; - -import javax.management.Attribute; -import javax.management.AttributeNotFoundException; -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; - -import org.testng.Assert; -import org.testng.annotations.Test; - -/** - * Tests JMX security. - * - * @author S. Ali Tokmen - */ -public class JmxSecurityTest extends TestCommons { - - @Test - public void connectWithoutCredentials() throws Exception { - try { - this.getMBeanServerConnection(null, null); - Assert.fail("No SecurityException raised"); - } catch (SecurityException expected) { - // Expected - } - } - - @Test - public void connectWithWrongCredentials() throws Exception { - try { - this.getMBeanServerConnection("invalid", "invalid"); - Assert.fail("No SecurityException raised"); - } catch (SecurityException expected) { - // Expected - } - } - - @Test - public void connectWithReadonlyCredentials() throws Exception { - MBeanServerConnection mBeanServerConnection = this.getMBeanServerConnection("monitor", "jonas"); - - ObjectName cargocpc = new ObjectName( - "jonas:j2eeType=WebModule,name=//localhost/cargocpc,J2EEApplication=null,J2EEServer=jonas"); - - mBeanServerConnection.getAttribute(cargocpc, "cookies"); - try { - mBeanServerConnection.setAttribute(cargocpc, new Attribute("cookies", Boolean.FALSE)); - Assert.fail("No UndeclaredThrowableException raised"); - } catch (UndeclaredThrowableException e) { - Assert.assertNotNull(e.getCause()); - Assert.assertEquals(e.getCause().getClass(), IllegalAccessException.class); - } - try { - mBeanServerConnection.invoke(cargocpc, "reload", null, null); - Assert.fail("No UndeclaredThrowableException raised"); - } catch (UndeclaredThrowableException e) { - Assert.assertNotNull(e.getCause()); - Assert.assertEquals(e.getCause().getClass(), IllegalAccessException.class); - } - } - - @Test - public void connectWithReadWriteCredentials() throws Exception { - MBeanServerConnection mBeanServerConnection = this.getMBeanServerConnection("jonas", "jonas"); - - ObjectName cargocpc = new ObjectName( - "jonas:j2eeType=WebModule,name=//localhost/cargocpc,J2EEApplication=null,J2EEServer=jonas"); - - mBeanServerConnection.getAttribute(cargocpc, "cookies"); - mBeanServerConnection.setAttribute(cargocpc, new Attribute("cookies", Boolean.FALSE)); - mBeanServerConnection.invoke(cargocpc, "reload", null, null); - } - - @Test(dependsOnMethods = "connectWithReadonlyCredentials") - public void testJonas385() throws Exception { - MBeanServerConnection mBeanServerConnection = this.getMBeanServerConnection("monitor", "jonas"); - - ObjectName cargocpc = new ObjectName( - "jonas:j2eeType=WebModule,name=//localhost/cargocpc,J2EEApplication=null,J2EEServer=jonas"); - - try { - mBeanServerConnection.getAttribute(cargocpc, "attributeThatDoesntExist"); - Assert.fail("No AttributeNotFoundException raised"); - } catch (AttributeNotFoundException expected) { - // That one was expected - } - } - -} diff --git a/jonas/modules/itests/cargo/tomcat7/pom.xml b/jonas/modules/itests/cargo/tomcat7/pom.xml deleted file mode 100644 index 62f1a3dd321cb2887abac85121829bc2f250af70..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/cargo/tomcat7/pom.xml +++ /dev/null @@ -1,282 +0,0 @@ - - - - - org.ow2.jonas - jonas-itests-cargo - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas - jonas-itests-cargo-tomcat7 - JOnAS :: iTests :: Cargo :: Tomcat 7.x - Tests the JOnAS distribution via CARGO - - - - - - org.codehaus.mojo - build-helper-maven-plugin - ${build-helper.version} - - - generate-port-numbers - generate-test-sources - - reserve-network-port - - - - webcontainer.port - carol.port - jms.port - db.port - - - - - - - - - maven-dependency-plugin - - - unpack-assembly - generate-test-resources - - unpack - - - - - org.ow2.jonas.assemblies.profiles - jonas-full - ${project.version} - bin - zip - ${project.build.directory} - - - true - true - - - - copy-bundles - process-test-resources - - copy - - - - - org.ow2.jonas - jonas-itests-applications-classloader - ${project.version} - ipojo - jar - ${jonas.base}/deploy - - - true - true - - - - - - - - maven-antrun-plugin - - - copy-tests - generate-test-sources - - - - - - - - - - - - - - - - run - - - - create-jonas-base-with-all-options - generate-test-resources - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - run - - - - - - - - org.codehaus.cargo - cargo-maven2-plugin - ${cargo.version} - - - start-jonas - pre-integration-test - - start - - - - stop-jonas - post-integration-test - - stop - - - - - - jonas5x - installed - ${jonas.root} - - - existing - ${jonas.base} - - localhost - ${webcontainer.port} - http - - - - org.ow2.jonas - jonas-itests-applications-connection-leaks - war - - - org.ow2.jonas - jonas-itests-applications-jaxws-sample - ear - - - org.ow2.jonas.jonas-itests-applications-jaxws-add.assemblies - wsadd - ear - - - - - - - - - maven-surefire-plugin - - true - - - - surefire-it - integration-test - - test - - - - - webcontainer.port - ${webcontainer.port} - - - carol.url - service:jmx:rmi://localhost/jndi/rmi://localhost:${carol.port}/jrmpconnector_jonas - - - project.version - ${project.version} - - - jonas.base - ${jonas.base} - - - false - - - - - - - - diff --git a/jonas/modules/itests/intravm/pom.xml b/jonas/modules/itests/intravm/pom.xml deleted file mode 100644 index 5df31346e4bfd142d5bfa830fc8480c8eb263260..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/intravm/pom.xml +++ /dev/null @@ -1,264 +0,0 @@ - - - - - org.ow2.jonas - jonas-itests - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas - jonas-itests-intravm - jar - JOnAS :: iTests :: Intra VM - Allows to run OSGi tests on the server side - - - - - org.ow2.jonas.launchers - felix-launcher - ${project.version} - test - - - org.ow2.jonas - jonas-commons - - - - - - - org.ow2.jonas - jonas-services-api - ${project.version} - test - - - - - org.ow2.bundles - ow2-util-log - test - - - - - - org.ow2.bundles - ow2-util-file - test - - - - - org.ow2.bundles - ow2-util-url - test - - - - org.apache.tomcat - servlet-api - test - - - - - org.testng - testng - 5.11 - jdk15 - test - - - - - - org.ops4j.pax.swissbox - pax-swissbox-tinybundles - 1.2.0 - test - - - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - ${build-helper.version} - - - generate-port-numbers - generate-test-sources - - reserve-network-port - - - - webcontainer.port - carol.port - jms.port - db.port - - - - - - - - - maven-dependency-plugin - - - unpack-assembly - generate-test-resources - - unpack - - - - - org.ow2.jonas.assemblies.profiles - jonas-full - ${project.version} - bin - zip - - - - ${project.build.directory} - - true - true - - - - - - - - maven-antrun-plugin - - - create-jonas-base-with-all-options - generate-test-resources - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - run - - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - once - classes - 10 - - ${jonas.base}/conf - - - - jonas.root - ${jonas.root} - - - jonas.base - ${jonas.base} - - - ipojo.log.level - ERROR - - - java.security.policy - ${jonas.base}/conf/java.policy - - - java.security.auth.login.config - ${jonas.base}/conf/jaas.config - - - java.endorsed.dirs - ${jonas.root}/lib/endorsed - - - jonas.felix.configuration.file - ${jonas.base}/conf/felix-config.properties - - - - - - - diff --git a/jonas/modules/itests/intravm/src/test/java/org/ow2/jonas/itests/intravm/JOnASLauncher.java b/jonas/modules/itests/intravm/src/test/java/org/ow2/jonas/itests/intravm/JOnASLauncher.java deleted file mode 100644 index aac748d277edba074b72920b44e4586af508a14f..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/intravm/src/test/java/org/ow2/jonas/itests/intravm/JOnASLauncher.java +++ /dev/null @@ -1,207 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2007-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.itests.intravm; - -import java.util.concurrent.locks.Lock; -import java.util.concurrent.locks.ReentrantReadWriteLock; - -import org.osgi.framework.BundleContext; -import org.osgi.framework.ServiceReference; -import org.ow2.jonas.depmonitor.MonitoringService; -import org.ow2.jonas.launcher.felix.JOnAS; -import org.ow2.util.log.Log; -import org.ow2.util.log.LogFactory; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; - -/** - * Abstract class for starting/stopping JOnAS and providing an access to OSGi - * through BundleContext. - * @author Florent Benoit - */ -public class JOnASLauncher { - - /** - * One second delay. - */ - private static final long ONE_SECOND = 1000L; - - /** - * Waiting time = 30 seconds. - */ - private static final long WAITING_SERVCICES_TIME = 30 * ONE_SECOND; - - /** - * Lock. - */ - private volatile static Lock lock = new ReentrantReadWriteLock().writeLock(); - - /** - * Counter of start of JOnAS. - */ - private static int count = 0; - - /** - * JOnAS instance. - */ - private static JOnAS jonas = null; - - /** - * OSGi bundle context. - */ - private static BundleContext bundleContext = null; - - /** - * Server ready. - */ - private static boolean ready = false; - - /** - * Server is stopping. - */ - private static boolean stopping = false; - - /** - * Server is stopping soon. - */ - private static boolean lastCallStopping = false; - - /** - * Logger. - */ - private static Log logger = LogFactory.getLog(JOnASLauncher.class); - - /** - * Start the JOnAS server. - * @throws Exception if server cannot be started. - */ - @BeforeClass - public void startServer() throws Exception { - try { - lock.lock(); - - if (jonas == null) { - jonas = new JOnAS(true); - // Get Bundle Context - bundleContext = jonas.getFramework().getBundleContext(); - - // Start JOnAS - new Thread() { - @Override - public void run() { - try { - jonas.start(); - } catch (Exception e) { - logger.error("Cannot start the server", e); - throw new IllegalStateException("Cannot start the server", e); - } - } - }.start(); - - // wait for depMonitor service - final long maxWaitTime = System.currentTimeMillis() + WAITING_SERVCICES_TIME; - ServiceReference serviceManagerServiceReference = null; - while (serviceManagerServiceReference == null && System.currentTimeMillis() < maxWaitTime) { - serviceManagerServiceReference = getBundleContext().getServiceReference(MonitoringService.class.getName()); - if (serviceManagerServiceReference == null) { - Thread.sleep(ONE_SECOND); - } else { - ready = true; - } - } - logger.info("The JOnAS server is ready, tests can be launched."); - } else { - logger.info("The JOnAS server is already launched"); - } - count++; - } finally { - lock.unlock(); - } - } - - /** - * Stop the JOnAS server. - * @throws Exception if server cannot be stopped - */ - @AfterClass - public void stopServer() throws Exception { - count--; - if (count == 1) { - lastCallStopping = true; - } - // last call to the stop is performing the stop; - if (count == 0) { - if (jonas != null) { - stopping = true; - logger.info("The JOnAS server is being stopped."); - jonas.stop(); - } - } - } - - /** - * @return true if server is ready - */ - public boolean isReady() { - return ready; - } - - /** - * Waits that the server is ready. - * @throws InterruptedException if exception - */ - public void waitReady() throws InterruptedException { - while (!ready) { - Thread.sleep(ONE_SECOND); - } - } - - /** - * Waits that the server is ready. - * @throws InterruptedException if exception - */ - public void waitStopping() throws InterruptedException { - while (!stopping) { - Thread.sleep(ONE_SECOND); - } - } - - /** - * Waits that the server is ready. - * @throws InterruptedException if exception - */ - public void waitStoppingSoon() throws InterruptedException { - while (!lastCallStopping) { - Thread.sleep(ONE_SECOND); - } - } - /** - * @return the bundle context. - */ - protected BundleContext getBundleContext() { - return bundleContext; - } -} diff --git a/jonas/modules/itests/intravm/src/test/java/org/ow2/jonas/itests/intravm/osgi/httpservice/OSGiHttpServiceTest.java b/jonas/modules/itests/intravm/src/test/java/org/ow2/jonas/itests/intravm/osgi/httpservice/OSGiHttpServiceTest.java deleted file mode 100644 index e6a133d901be61a28d8919af0750d21132fe159b..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/intravm/src/test/java/org/ow2/jonas/itests/intravm/osgi/httpservice/OSGiHttpServiceTest.java +++ /dev/null @@ -1,443 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.itests.intravm.osgi.httpservice; - -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.lang.reflect.Method; -import java.net.URL; - -import org.ops4j.pax.swissbox.tinybundles.core.TinyBundle; -import org.ops4j.pax.swissbox.tinybundles.core.TinyBundles; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleException; -import org.osgi.framework.Constants; -import org.osgi.framework.InvalidSyntaxException; -import org.osgi.framework.ServiceReference; -import org.osgi.service.http.HttpService; -import org.ow2.jonas.itests.intravm.JOnASLauncher; -import org.ow2.jonas.itests.intravm.osgi.httpservice.resource.RegisterResourceTestActivator; -import org.ow2.jonas.itests.intravm.osgi.httpservice.servlet.RegisterServletTestActivator; -import org.ow2.jonas.itests.intravm.osgi.httpservice.servlet.SimpleTestServlet; -import org.ow2.jonas.management.ServiceManager; -import org.ow2.util.file.FileUtils; -import org.ow2.util.url.URLUtils; -import org.testng.Assert; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - -/** - * Tests of the OSGi http service. - * @author Guillaume Porcher - * @author Florent Benoit - */ -public class OSGiHttpServiceTest extends JOnASLauncher { - - /** - * URL for the resource bundle. - */ - private URL resourceBundleURL = null; - - /** - * URL for the first servlet bundle. - */ - private URL servletBundle1URL = null; - - /** - * URL for the second servlet bundle. - */ - private URL servletBundle2URL = null; - - /** - * One second delay. - */ - private static final long ONE_SECOND = 1000L; - - /** - * Waiting time = 5 seconds. - */ - private static final long SLEEP = 5 * ONE_SECOND; - - /** - * HTTP service. - */ - private Object httpService = null; - - /** - * Port number. - */ - private String httpServicePort = null; - - /** - * JOnAS service manager service. - */ - private Object serviceManager = null; - - /** - * Create bundles in order to be ready for the tests. - * @throws Exception - */ - @BeforeClass - public void createBundles() throws Exception { - // create bundle for resources - TinyBundle resourceBundle = TinyBundles.newBundle(); - resourceBundle.add("files/index.html", OSGiHttpServiceTest.class.getClassLoader().getResource("index.html")); - resourceBundle.add("files/folder/test.html", OSGiHttpServiceTest.class.getClassLoader().getResource("test.html")); - resourceBundle.add(RegisterResourceTestActivator.class); - resourceBundle.set(Constants.BUNDLE_SYMBOLICNAME, "RegisterResourceBundle"); - resourceBundle.set(Constants.BUNDLE_ACTIVATOR, RegisterResourceTestActivator.class.getName()); - InputStream resourceBundleInputStream = resourceBundle.build(TinyBundles.withBnd()); - File bundleFile = File.createTempFile("rsrbundle", ".jar"); - FileUtils.dump(resourceBundleInputStream, bundleFile); - resourceBundleURL = URLUtils.fileToURL(bundleFile); - - // Create bundle for servlet - TinyBundle servletBundle1 = TinyBundles.newBundle(); - servletBundle1.add(RegisterServletTestActivator.class); - servletBundle1.add(SimpleTestServlet.class); - servletBundle1.set(Constants.BUNDLE_SYMBOLICNAME, "RegisterServletBundle"); - servletBundle1.set(Constants.BUNDLE_ACTIVATOR, RegisterServletTestActivator.class.getName()); - servletBundle1.set(Constants.EXPORT_PACKAGE, ""); - servletBundle1.set(Constants.BUNDLE_VERSION, "1.0.0"); - InputStream servletBundle1InputStream = servletBundle1.build(TinyBundles.withBnd()); - File servlet1File = File.createTempFile("servletbundle1", ".jar"); - FileUtils.dump(servletBundle1InputStream, servlet1File); - servletBundle1URL = URLUtils.fileToURL(servlet1File); - - // Create bundle for servlet with version 2 - TinyBundle servletBundle2 = TinyBundles.newBundle(); - servletBundle2.add(RegisterServletTestActivator.class); - servletBundle2.add(SimpleTestServlet.class); - servletBundle2.set(Constants.BUNDLE_SYMBOLICNAME, "RegisterServletBundle2"); - servletBundle2.set(Constants.BUNDLE_ACTIVATOR, RegisterServletTestActivator.class.getName()); - servletBundle2.set(Constants.EXPORT_PACKAGE, ""); - servletBundle2.set(Constants.BUNDLE_VERSION, "2.0.0"); - InputStream servletBundle2InputStream = servletBundle2.build(TinyBundles.withBnd()); - File servlet2File = File.createTempFile("servletbundle2", ".jar"); - FileUtils.dump(servletBundle2InputStream, servlet2File); - servletBundle2URL = URLUtils.fileToURL(servlet2File); - - } - - /** - * Test the access to the HTTP service. - * @throws InterruptedException if waiting fails - */ - @BeforeClass - public void waitForServices() throws InterruptedException { - // wait for initialization - final long maxWaitTime = System.currentTimeMillis() + SLEEP; - - ServiceReference httpServiceReference = null; - while (httpServiceReference == null && System.currentTimeMillis() < maxWaitTime) { - Thread.sleep(ONE_SECOND); - httpServiceReference = getBundleContext().getServiceReference(HttpService.class.getName()); - } - Assert.assertNotNull(httpServiceReference, "HttpService is not registered"); - httpService = getBundleContext().getService(httpServiceReference); - Assert.assertNotNull(httpService, "HttpService is not registered"); - httpServicePort = (String) httpServiceReference.getProperty("org.osgi.service.http.port"); - - ServiceReference serviceManagerServiceReference = null; - while (serviceManagerServiceReference == null && System.currentTimeMillis() < maxWaitTime) { - serviceManagerServiceReference = getBundleContext().getServiceReference(ServiceManager.class.getName()); - if (serviceManagerServiceReference == null) { - Thread.sleep(ONE_SECOND); - } - } - Assert.assertNotNull(serviceManagerServiceReference, "ServiceManager is not registered"); - serviceManager = getBundleContext().getService(serviceManagerServiceReference); - - } - - /** - * Test backwards compatibility. - * @throws Exception on failure - */ - @Test - public void testContextRoot() throws Exception { - // wait for context root - final String expected = "JOnAS Root Context"; - final URL url = new URL("http://localhost:" + httpServicePort + "/"); - isExpectedContent(expected, url); - } - - /** - * Test for registering a servlet on the http service. - * @throws Exception if registering fails - */ - @Test - public void testRegisterServlet() throws Exception { - - String context = "/simpleServletTest"; - Method[] methods = httpService.getClass().getDeclaredMethods(); - for (Method method : methods) { - if (method.getName().equals("registerServlet")) { - method.invoke(httpService, context, new SimpleTestServlet("2503"), null, null); - } - } - - // check index.html - final URL url = new URL("http://localhost:" + httpServicePort + context); - isExpectedContent("This is a test content version 2503 for request", url); - - Method unregisterServletMethod = httpService.getClass().getDeclaredMethod("unregister", String.class); - unregisterServletMethod.invoke(httpService, context); - - try { - url.openStream(); - Assert.fail("url still available"); - } catch (final IOException e) { - Assert.assertTrue(e.getMessage().contains("HTTP response code: 400") || e.getMessage().contains(url.toString())); - } - } - - /** - * Test for {@link HttpService#registerResources(String, String, org.osgi.service.http.HttpContext)}. - * @throws InvalidSyntaxException - * @throws IOException - * @throws InterruptedException - * @throws BundleException - */ - @Test - public void testRegisterResources() throws Exception { - - // start resource bundle - final Bundle resourceBundle = getBundleContext().installBundle(resourceBundleURL.toString()); - resourceBundle.start(); - - // check index.html - final URL url = new URL("http://localhost:" + httpServicePort + "/test/index.html"); - final URL refUrl = OSGiHttpServiceTest.class.getClassLoader().getResource("index.html"); - this.checkContent(url, refUrl); - - // check folder/test.html - final URL url2 = new URL("http://localhost:" + httpServicePort + "/test/folder/test.html"); - final URL refUrl2 = OSGiHttpServiceTest.class.getClassLoader().getResource("test.html"); - this.checkContent(url2, refUrl2); - - resourceBundle.stop(); - resourceBundle.uninstall(); - - // check url not available - final URL url3 = new URL("http://localhost:" + httpServicePort + "/test/index.html"); - try { - url3.openStream(); - Assert.fail("url still available"); - } catch (final IOException e) { - Assert.assertTrue(e.getMessage().contains("HTTP response code: 400") || e.getMessage().contains(url3.toString())); - } - } - - /** - * Test for - * {@link HttpService#registerServlet(String, javax.servlet.Servlet, java.util.Dictionary, org.osgi.service.http.HttpContext)} - * . - * @throws InvalidSyntaxException - * @throws IOException - * @throws InterruptedException - * @throws BundleException - */ - @Test - public void testRegisterBundleServlet() throws InvalidSyntaxException, IOException, InterruptedException, BundleException { - - // start servlet bundle - final Bundle bundle = getBundleContext().installBundle(servletBundle1URL.toString()); - bundle.start(); - - // check index.html - final URL url = new URL("http://localhost:" + httpServicePort + "/servletTest/index.html"); - - final String expected = "This is a test content version 1.0.0 for request: /index.html"; - Assert.assertEquals(expected, this.getContentAsString(url)); - - bundle.stop(); - bundle.uninstall(); - - // check url not available - final URL url2 = new URL("http://localhost:" + httpServicePort + "/servletTest/index.html"); - try { - url2.openStream(); - Assert.fail("url available"); - } catch (final IOException e) { - Assert.assertTrue(e.getMessage().contains("HTTP response code: 400") || e.getMessage().contains(url2.toString())); - } - } - - /** - * Enable versioning. - * @throws Exception on failure - */ - @Test - public void enableVersioning() throws Exception { - Method getServiceStateMethod = serviceManager.getClass().getDeclaredMethod("getServiceState", String.class); - Method startServiceMethod = serviceManager.getClass().getDeclaredMethod("startService", String.class); - - String state = (String) getServiceStateMethod.invoke(serviceManager, "versioning"); - Assert.assertNull(state, "the versioning service is not active by default"); - - startServiceMethod.invoke(serviceManager, "versioning"); - - final long maxWaitTime = System.currentTimeMillis() + SLEEP; - while (!"RUNNING".equals(state) && System.currentTimeMillis() < maxWaitTime) { - Thread.sleep(ONE_SECOND); - state = (String) getServiceStateMethod.invoke(serviceManager, "versioning"); - } - Assert.assertEquals("RUNNING", state, "the versioning service is not running"); - } - - /** - * Test for servlet versioning. - * @throws InvalidSyntaxException - * @throws IOException - * @throws InterruptedException - * @throws BundleException - */ - @Test(dependsOnMethods = {"testRegisterServlet", "enableVersioning"}) - public void testVersioning() throws InvalidSyntaxException, IOException, InterruptedException, BundleException { - - final URL url = new URL("http://localhost:" + httpServicePort + "/servletTest/index.html"); - - // start bundle v1 - final Bundle bundle1 = getBundleContext().installBundle(servletBundle1URL.toString()); - bundle1.start(); - - // check versioned url is available - final URL url1 = new URL("http://localhost:" + httpServicePort + "/servletTest-1.0.0/index.html"); - final String expected1 = "This is a test content version 1.0.0 for request: /index.html"; - Assert.assertEquals(expected1, this.getContentAsString(url1)); - - // check non-versioned url is available and pointing to v1 - Assert.assertEquals(expected1, this.getContentAsString(url)); - - // start bundle 2 - final Bundle bundle2 = getBundleContext().installBundle(servletBundle2URL.toString()); - bundle2.start(); - - // check versioned url is available - final URL url2 = new URL("http://localhost:" + httpServicePort + "/servletTest-2.0.0/index.html"); - final String expected2 = "This is a test content version 2.0.0 for request: /index.html"; - Assert.assertEquals(expected2, this.getContentAsString(url2)); - - // check non-versioned url is available and still pointing to v1 - Assert.assertEquals(expected1, this.getContentAsString(url)); - - // stop bundle 1 - bundle1.stop(); - - // check non-versioned url is unavailable - try { - url.openStream(); - Assert.fail("url still available"); - } catch (final IOException e) { - Assert.assertTrue(e.getMessage().contains("HTTP response code: 400") || e.getMessage().contains(url.toString())); - } - - // check versioned url is available - Assert.assertEquals(expected2, this.getContentAsString(url2)); - - // cleanup - bundle1.uninstall(); - bundle2.stop(); - bundle2.uninstall(); - } - - /** - * Checks the string content in local and remote urls are the same. Throw - * {@link AssertionError} if they are not the same. - * @param remoteURL the remote url - * @param localURL the reference url - * @throws IOException if an I/O exception occurs. - * @throws InterruptedException if sleeping is not done - */ - private void checkContent(final URL remoteURL, final URL localURL) throws IOException, InterruptedException { - // wait for initialization - final long stopTime = System.currentTimeMillis() + SLEEP; - - final String localContent = this.getContentAsString(localURL); - - String remoteContent = null; - while (System.currentTimeMillis() < stopTime) { - Thread.sleep(ONE_SECOND); - remoteContent = this.getContentAsString(remoteURL); - if (remoteContent.equals(localContent)) { - break; - } - } - - Assert.assertEquals(remoteContent, localContent); - } - - /** - * Check that the content on the given URL is the expected content. - * @param expectedContent the expected content - * @param url the url on which to get content - * @throws InterruptedException if cannot wait - * @throws IOException if stream is not opened - */ - protected void isExpectedContent(final String expectedContent, final URL url) throws InterruptedException, IOException { - // wait for initialization - final long maxWaitTime = System.currentTimeMillis() + SLEEP; - - String content = null; - while (System.currentTimeMillis() < maxWaitTime) { - Thread.sleep(ONE_SECOND); - content = this.getContentAsString(url); - if (content != null && content.contains(expectedContent)) { - return; - } - } - Assert.fail("The content '" + content + "' does not contain '" + expectedContent + "'."); - } - - /** - * Get the URL content as a String. - * @param url the url - * @return the URL content as a String or the exception message - * @throws IOException if there is a problem with streams - */ - private String getContentAsString(final URL url) throws IOException { - final InputStream inStream = url.openStream(); - final ByteArrayOutputStream bos = new ByteArrayOutputStream(); - try { - int c; - while ((c = inStream.read()) != -1) { - bos.write(c); - } - } finally { - if (inStream != null) { - inStream.close(); - } - if (bos != null) { - bos.flush(); - } - } - final String urlString = bos.toString(); - return urlString; - } -} diff --git a/jonas/modules/itests/intravm/src/test/java/org/ow2/jonas/itests/intravm/osgi/httpservice/resource/RegisterResourceTestActivator.java b/jonas/modules/itests/intravm/src/test/java/org/ow2/jonas/itests/intravm/osgi/httpservice/resource/RegisterResourceTestActivator.java deleted file mode 100644 index 4472f62668d2c0d77583dbfbd3c3c40a58cdda80..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/intravm/src/test/java/org/ow2/jonas/itests/intravm/osgi/httpservice/resource/RegisterResourceTestActivator.java +++ /dev/null @@ -1,93 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.itests.intravm.osgi.httpservice.resource; - -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; -import org.osgi.framework.ServiceEvent; -import org.osgi.framework.ServiceListener; -import org.osgi.framework.ServiceReference; -import org.osgi.service.http.HttpService; - -/** - * @author Guillaume Porcher - */ -public class RegisterResourceTestActivator implements BundleActivator, ServiceListener { - - BundleContext context; - - public void start(final BundleContext context) throws Exception { - this.context = context; - - final ServiceReference ref = this.context.getServiceReference(HttpService.class.getName()); - if (ref != null) { - this.register(ref); - } - this.context.addServiceListener(this, "(objectclass=" + HttpService.class.getName() + ")"); - } - - /* - * (non-Javadoc) - * @see - * org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) - */ - public void stop(final BundleContext context) throws Exception { - final ServiceReference ref = this.context.getServiceReference(HttpService.class.getName()); - if (ref != null) { - this.unregister(ref); - } - } - - public void serviceChanged(final ServiceEvent event) { - if (event.getType() == ServiceEvent.REGISTERED) { - this.register(event.getServiceReference()); - } else if (event.getType() == ServiceEvent.UNREGISTERING) { - this.unregister(event.getServiceReference()); - } - } - - private void register(final ServiceReference serviceReference) { - try { - final HttpService httpService = (HttpService) this.context.getService(serviceReference); - httpService.registerResources("/test", "/files", null); - } catch (final Exception e) { - throw new RuntimeException(e); - } - } - - /** - * @param serviceReference - */ - private void unregister(final ServiceReference serviceReference) { - try { - final HttpService httpService = (HttpService) this.context.getService(serviceReference); - httpService.unregister("/test"); - } catch (final Exception e) { - throw new RuntimeException(e); - } - - } - -} diff --git a/jonas/modules/itests/intravm/src/test/java/org/ow2/jonas/itests/intravm/osgi/httpservice/servlet/RegisterServletTestActivator.java b/jonas/modules/itests/intravm/src/test/java/org/ow2/jonas/itests/intravm/osgi/httpservice/servlet/RegisterServletTestActivator.java deleted file mode 100644 index 9bdea9381da326d7ab95d11c6a8cc602b0d4b6f7..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/intravm/src/test/java/org/ow2/jonas/itests/intravm/osgi/httpservice/servlet/RegisterServletTestActivator.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.itests.intravm.osgi.httpservice.servlet; - -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; -import org.osgi.framework.Constants; -import org.osgi.framework.ServiceEvent; -import org.osgi.framework.ServiceListener; -import org.osgi.framework.ServiceReference; -import org.osgi.service.http.HttpService; - -/** - * @author Guillaume Porcher - */ -public class RegisterServletTestActivator implements BundleActivator, ServiceListener { - - BundleContext context; - - String version; - - public void start(final BundleContext context) throws Exception { - this.version = (String) context.getBundle().getHeaders().get(Constants.BUNDLE_VERSION); - try { - this.context = context; - - final ServiceReference ref = this.context.getServiceReference(HttpService.class.getName()); - if (ref != null) { - this.register(ref); - } - this.context.addServiceListener(this, "(objectclass=" + HttpService.class.getName() + ")"); - } catch (final Exception e) { - e.printStackTrace(); - throw e; - } - } - - /* - * (non-Javadoc) - * @see - * org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) - */ - public void stop(final BundleContext context) throws Exception { - final ServiceReference ref = this.context.getServiceReference(HttpService.class.getName()); - if (ref != null) { - this.unregister(ref); - } - } - - public void serviceChanged(final ServiceEvent event) { - if (event.getType() == ServiceEvent.REGISTERED) { - this.register(event.getServiceReference()); - } else if (event.getType() == ServiceEvent.UNREGISTERING) { - this.unregister(event.getServiceReference()); - } - } - - private void register(final ServiceReference serviceReference) { - try { - final HttpService httpService = (HttpService) this.context.getService(serviceReference); - - httpService.registerServlet("/servletTest", new SimpleTestServlet(this.version), null, null); - } catch (final Exception e) { - e.printStackTrace(); - throw new RuntimeException(e); - } - } - - /** - * @param serviceReference - */ - private void unregister(final ServiceReference serviceReference) { - try { - final HttpService httpService = (HttpService) this.context.getService(serviceReference); - httpService.unregister("/servletTest"); - } catch (final Exception e) { - throw new RuntimeException(e); - } - - } - -} diff --git a/jonas/modules/itests/intravm/src/test/java/org/ow2/jonas/itests/intravm/osgi/httpservice/servlet/SimpleTestServlet.java b/jonas/modules/itests/intravm/src/test/java/org/ow2/jonas/itests/intravm/osgi/httpservice/servlet/SimpleTestServlet.java deleted file mode 100644 index 33b875f706885e2fedc52f4f7d154032717259dd..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/intravm/src/test/java/org/ow2/jonas/itests/intravm/osgi/httpservice/servlet/SimpleTestServlet.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.itests.intravm.osgi.httpservice.servlet; - -import java.io.IOException; -import java.io.PrintStream; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * @author Guillaume Porcher - * - */ -public class SimpleTestServlet extends HttpServlet { - - public static String CONTENT = "This is a test content version %s for request: %s"; - - private final String version; - - /** - * - */ - public SimpleTestServlet(final String version) { - this.version = version; - } - - @Override - protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { - - final PrintStream ps = new PrintStream(resp.getOutputStream()); - ps.printf(SimpleTestServlet.CONTENT, this.version, req.getPathInfo()); - ps.close(); - } - -} diff --git a/jonas/modules/itests/intravm/src/test/java/org/ow2/jonas/itests/intravm/workdir/TestWorkDir.java b/jonas/modules/itests/intravm/src/test/java/org/ow2/jonas/itests/intravm/workdir/TestWorkDir.java deleted file mode 100644 index fe0ea1c80178561af9cf57603fd6ccfbc5ed1159..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/intravm/src/test/java/org/ow2/jonas/itests/intravm/workdir/TestWorkDir.java +++ /dev/null @@ -1,92 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2010 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.itests.intravm.workdir; - -import java.io.File; -import java.util.Arrays; - -import org.ow2.jonas.itests.intravm.JOnASLauncher; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - - -/** - * Ensures that the default work dir. - * @author Florent Benoit - */ -public class TestWorkDir extends JOnASLauncher { - - /** - * JONAS_BASE. - */ - private String jonasBase = null; - - /** - * Init properties. - */ - @BeforeClass - public void init() throws Exception { - this.jonasBase = System.getProperty("jonas.base"); - } - - /** - * Test that the default JONAS_BASE/work directory is not present on the - * filesystem. - * @throws Exception on failure - */ - @Test - public void testNotAvailableDefaultWorkDir() throws Exception { - waitStoppingSoon(); - File defaultWorkDir = new File(jonasBase, "work"); - if (defaultWorkDir.exists()) { - throw new Exception("The directory '" + defaultWorkDir - + "' exists while it shouldn't as a new work directory has been set"); - } - - } - - /** - * Test that the defined JOnAS work directory is present on the filesystem - * and contains some files. - * @throws Exception on failure - */ - @Test - public void testExistsNewWorkDir() throws Exception { - waitStoppingSoon(); - File workDir = new File(jonasBase, "work-tests"); - if (!workDir.exists()) { - throw new Exception("The directory '" + workDir - + "' doesn't exists while it should as a new work directory has been set"); - } - File[] files = workDir.listFiles(); - if (files.length < 3) { - throw new Exception("The directory '" + workDir + "' should contains some sub directories. Found '" - + Arrays.asList(files) + "'."); - } - - } - -} diff --git a/jonas/modules/itests/intravm/src/test/resources/index.html b/jonas/modules/itests/intravm/src/test/resources/index.html deleted file mode 100644 index 8678a52e5bedf46c20dad3daaa61d2017d2d92df..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/intravm/src/test/resources/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - -Test page - - - It works ! - - \ No newline at end of file diff --git a/jonas/modules/itests/intravm/src/test/resources/test.html b/jonas/modules/itests/intravm/src/test/resources/test.html deleted file mode 100644 index 0e0f481455c3d08e4316acee7763291a62647c87..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/intravm/src/test/resources/test.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - -Nested Test page - - - It works ! - - \ No newline at end of file diff --git a/jonas/modules/itests/osgi/equinox/pom.xml b/jonas/modules/itests/osgi/equinox/pom.xml deleted file mode 100644 index 7bdee7f26cbd0d264e8e8b60649da8ef28264b4c..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/osgi/equinox/pom.xml +++ /dev/null @@ -1,347 +0,0 @@ - - - - - org.ow2.jonas - jonas-itests-osgi - 5.2.0-M1-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas - jonas-itests-equinox - pom - JOnAS :: iTests :: OSGi :: Equinox - Tests the OSGi Bundles of JOnAS with Eclipse Equinox - - - - - - org.codehaus.mojo - build-helper-maven-plugin - ${build-helper.version} - - - generate-port-numbers - generate-test-sources - - reserve-network-port - - - - webcontainer.port - carol.port - jms.port - db.port - - - - - - - - - maven-dependency-plugin - - - unpack-assembly - generate-test-resources - - unpack - - - - - org.ow2.jonas.assemblies.profiles - jonas-full - ${project.version} - bin - zip - - - - ${project.build.directory} - - true - true - - - - - - - - maven-antrun-plugin - - - create-jonas-base-with-all-options - generate-test-resources - - - - - - - - - - - - - - - - - - - - - - - - - - run - - - - - - - - org.ow2.util.maven - maven-osgi-plugin-launcher-core - - - - org.eclipse - osgi - 3.5.0.v20090520 - - - - ${basedir}/../../../tools/launchers/felix-launcher/src/main/resources/org/ow2/jonas/launcher/felix/javase-profiles.properties - ${basedir}/../../../tools/launchers/felix-launcher/src/main/resources/org/ow2/jonas/launcher/felix/defaults.properties - ${basedir}/../../../tools/launchers/felix-launcher/src/main/resources/org/ow2/jonas/launcher/felix/gateway.properties - - - ${basedir}/../../../tools/launchers/felix-launcher/target/generated-resources/org/ow2/jonas/launcher/felix/jonas-autodeploy-bundles.properties - - - - jonas.base - ${jonas.base} - - - jonas.root - ${jonas.root} - - - java.security.auth.login.config - ${jonas.base}/conf/jaas.config - - - m2.repository - ${settings.localRepository} - - - java.naming.factory.initial - - org.ow2.carol.jndi.spi.MultiOrbInitialContextFactory - - - - java.security.policy - ${jonas.base}/conf/java.policy - - - java.security.auth.login.config - ${jonas.base}/conf/jaas.config - - - - javax.security.jacc.PolicyConfigurationFactory.provider - - - org.ow2.jonas.lib.security.jacc.JPolicyConfigurationFactory - - - - monolog.wrappers - - mx4j.log.CommonsLogger,mx4j.log.Logger,java.util.logging.Logger,org.ow2.util.log.JDKLogger, - org.apache.juli.logging.DirectJDKLog,org.ow2.carol.util.configuration.TraceCarol - - - - java.awt.headless - true - - - ipojo.log.level - ERROR - - - - - bootstrap.kill.timeout - 420 - - - - - true - - - - ${itestsdebug} - 8000 - - - - 30 - - - 10 - - - - - 20 - org.ow2.easybeans.examples.* - - - - - - ${jonas.base}/conf/ - - - - - org.ow2.easybeans.osgi - easybeans-examples-entitybean - ${easybeans.version} - - - - org.ow2.easybeans.osgi - easybeans-examples-mdb - ${easybeans.version} - - - - org.ow2.easybeans.osgi - easybeans-examples-migrationejb21 - ${easybeans.version} - - - - org.ow2.easybeans.osgi - easybeans-example-osgi - ${easybeans.version} - - - - org.ow2.easybeans.osgi - easybeans-examples-security - ${easybeans.version} - - - - org.ow2.easybeans.osgi - easybeans-examples-statefulbean - ${easybeans.version} - - - - org.ow2.easybeans.osgi - easybeans-examples-statelessbean - ${easybeans.version} - - - - org.ow2.easybeans.osgi - easybeans-examples-timerservice - ${easybeans.version} - - - - - - - - start-framework - pre-integration-test - - start - - - - - stop-framework - post-integration-test - - stop - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - ${basedir}/target - - ${basedir}/../src/test/configuration/testng.xml - - - - rmi.port - ${carol.port} - - - - ${jonas.root}/lib/client.jar - - - - - testing-jonas-full - integration-test - - test - - - - - - - diff --git a/jonas/modules/itests/osgi/felix/pom.xml b/jonas/modules/itests/osgi/felix/pom.xml deleted file mode 100644 index 4956201902a3865b7464675dd2bd6330db2011bf..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/osgi/felix/pom.xml +++ /dev/null @@ -1,368 +0,0 @@ - - - - - org.ow2.jonas - jonas-itests-osgi - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas - jonas-itests-felix - pom - JOnAS :: iTests :: OSGi :: Felix - Tests the OSGi Bundles of JOnAS with Apache Felix - - - - - - org.codehaus.mojo - build-helper-maven-plugin - ${build-helper.version} - - - generate-port-numbers - generate-test-sources - - reserve-network-port - - - - webcontainer.port - carol.port - jms.port - db.port - - - - - - - - - maven-dependency-plugin - - - unpack-assembly - generate-test-resources - - unpack - - - - - org.ow2.jonas.assemblies.profiles - jonas-full - ${project.version} - bin - zip - - - - ${project.build.directory} - - true - true - - - - unpack-properties-fiile - generate-test-resources - - unpack - - - - - org.ow2.jonas.launchers - felix-launcher - ${project.version} - - - - ${project.build.directory}/launcher - - true - true - - - - - - - - maven-antrun-plugin - - - create-jonas-base-with-all-options - generate-test-resources - - - - - - - - - - - - - - - - - - - - - - - - - - run - - - - - - - - org.ow2.util.maven - maven-osgi-plugin-launcher-core - - - - org.apache.felix - org.apache.felix.framework - ${felix.framework.version} - - - - ${project.build.directory}/launcher/org/ow2/jonas/launcher/felix/javase-profiles.properties - ${project.build.directory}/launcher/org/ow2/jonas/launcher/felix/defaults.properties - ${project.build.directory}/launcher/org/ow2/jonas/launcher/felix/gateway.properties - - - ${project.build.directory}/launcher/org/ow2/jonas/launcher/felix/jonas-autodeploy-bundles.properties - - - - jonas.base - ${jonas.base} - - - jonas.root - ${jonas.root} - - - java.security.auth.login.config - ${jonas.base}/conf/jaas.config - - - m2.repository - ${settings.localRepository} - - - java.naming.factory.initial - - org.ow2.carol.jndi.spi.MultiOrbInitialContextFactory - - - - java.security.policy - ${jonas.base}/conf/java.policy - - - java.security.auth.login.config - ${jonas.base}/conf/jaas.config - - - - javax.security.jacc.PolicyConfigurationFactory.provider - - - org.ow2.jonas.lib.security.jacc.JPolicyConfigurationFactory - - - - monolog.wrappers - - mx4j.log.CommonsLogger,mx4j.log.Logger,java.util.logging.Logger,org.ow2.util.log.JDKLogger, - org.apache.juli.logging.DirectJDKLog,org.ow2.carol.util.configuration.TraceCarol - - - - java.awt.headless - true - - - ipojo.log.level - ERROR - - - - - bootstrap.kill.timeout - 420 - - - - - true - - - - ${itestsdebug} - 8000 - - - - 30 - - - 10 - - - - - 20 - org.ow2.easybeans.examples.* - - - - - - ${jonas.base}/conf/ - - - - - org.ow2.easybeans.osgi - easybeans-examples-entitybean - ${easybeans.version} - - - - org.ow2.easybeans.osgi - easybeans-examples-mdb - ${easybeans.version} - - - - org.ow2.easybeans.osgi - easybeans-examples-migrationejb21 - ${easybeans.version} - - - - org.ow2.easybeans.osgi - easybeans-example-osgi - ${easybeans.version} - - - - org.ow2.easybeans.osgi - easybeans-examples-security - ${easybeans.version} - - - - org.ow2.easybeans.osgi - easybeans-examples-statefulbean - ${easybeans.version} - - - - org.ow2.easybeans.osgi - easybeans-examples-statelessbean - ${easybeans.version} - - - - org.ow2.easybeans.osgi - easybeans-examples-timerservice - ${easybeans.version} - - - - - - - - start-framework - pre-integration-test - - start - - - - - stop-framework - post-integration-test - - stop - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - ${basedir}/target - - ${basedir}/../src/test/configuration/testng.xml - - - - rmi.port - ${carol.port} - - - - ${jonas.root}/lib/client.jar - - - - - testing-jonas-full - integration-test - - test - - - - - - - diff --git a/jonas/modules/itests/osgi/knopflerfish/pom.xml b/jonas/modules/itests/osgi/knopflerfish/pom.xml deleted file mode 100644 index 464bdaee67998eb822915deccb1c6633f2ee71d5..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/osgi/knopflerfish/pom.xml +++ /dev/null @@ -1,369 +0,0 @@ - - - - - org.ow2.jonas - jonas-itests-osgi - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas - jonas-itests-knopflerfish - pom - JOnAS :: iTests :: OSGi :: Knopflerfish - Tests the OSGi Bundles of JOnAS with Knopflerfish - - - - - - org.codehaus.mojo - build-helper-maven-plugin - ${build-helper.version} - - - generate-port-numbers - generate-test-sources - - reserve-network-port - - - - webcontainer.port - carol.port - jms.port - db.port - - - - - - - - - maven-dependency-plugin - - - unpack-assembly - generate-test-resources - - unpack - - - - - org.ow2.jonas.assemblies.profiles - jonas-full - ${project.version} - bin - zip - - - - ${project.build.directory} - - true - true - - - - unpack-properties-fiile - generate-test-resources - - unpack - - - - - org.ow2.jonas.launchers - felix-launcher - ${project.version} - - - - ${project.build.directory}/launcher - - true - true - - - - - - - - maven-antrun-plugin - - - create-jonas-base-with-all-options - generate-test-resources - - - - - - - - - - - - - - - - - - - - - - - - - - - run - - - - - - - - org.ow2.util.maven - maven-osgi-plugin-launcher-core - - - - org.knopflerfish - knopflerfish-framework - 3.0.0.beta-3 - - - - ${project.build.directory}/launcher/org/ow2/jonas/launcher/felix/javase-profiles.properties - ${project.build.directory}/launcher/org/ow2/jonas/launcher/felix/defaults.properties - ${project.build.directory}/launcher/org/ow2/jonas/launcher/felix/gateway.properties - - - ${project.build.directory}/launcher/org/ow2/jonas/launcher/felix/jonas-autodeploy-bundles.properties - - - - jonas.base - ${jonas.base} - - - jonas.root - ${jonas.root} - - - java.security.auth.login.config - ${jonas.base}/conf/jaas.config - - - m2.repository - ${settings.localRepository} - - - java.naming.factory.initial - - org.ow2.carol.jndi.spi.MultiOrbInitialContextFactory - - - - java.security.policy - ${jonas.base}/conf/java.policy - - - java.security.auth.login.config - ${jonas.base}/conf/jaas.config - - - - javax.security.jacc.PolicyConfigurationFactory.provider - - - org.ow2.jonas.lib.security.jacc.JPolicyConfigurationFactory - - - - monolog.wrappers - - mx4j.log.CommonsLogger,mx4j.log.Logger,java.util.logging.Logger,org.ow2.util.log.JDKLogger, - org.apache.juli.logging.DirectJDKLog,org.ow2.carol.util.configuration.TraceCarol - - - - java.awt.headless - true - - - ipojo.log.level - ERROR - - - - - bootstrap.kill.timeout - 420 - - - - - true - - - - ${itestsdebug} - 8000 - - - - 30 - - - 10 - - - - - 20 - org.ow2.easybeans.examples.* - - - - - - ${jonas.base}/conf/ - - - - - org.ow2.easybeans.osgi - easybeans-examples-entitybean - ${easybeans.version} - - - - org.ow2.easybeans.osgi - easybeans-examples-mdb - ${easybeans.version} - - - - org.ow2.easybeans.osgi - easybeans-examples-migrationejb21 - ${easybeans.version} - - - - org.ow2.easybeans.osgi - easybeans-example-osgi - ${easybeans.version} - - - - org.ow2.easybeans.osgi - easybeans-examples-security - ${easybeans.version} - - - - org.ow2.easybeans.osgi - easybeans-examples-statefulbean - ${easybeans.version} - - - - org.ow2.easybeans.osgi - easybeans-examples-statelessbean - ${easybeans.version} - - - - org.ow2.easybeans.osgi - easybeans-examples-timerservice - ${easybeans.version} - - - - - - - - start-framework - pre-integration-test - - start - - - - - stop-framework - post-integration-test - - stop - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - ${basedir}/target - - ${basedir}/../src/test/configuration/testng.xml - - - - rmi.port - ${carol.port} - - - - ${jonas.root}/lib/client.jar - - - - - testing-jonas-full - integration-test - - test - - - - - - - diff --git a/jonas/modules/itests/osgi/pom.xml b/jonas/modules/itests/osgi/pom.xml deleted file mode 100644 index 3bf6b69c086c361d20bb11b4371715f90a4b916b..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/osgi/pom.xml +++ /dev/null @@ -1,132 +0,0 @@ - - - - - org.ow2.jonas - jonas-itests - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas - jonas-itests-osgi - pom - JOnAS :: iTests :: OSGi - Integration Tests on OSGi - - - - - org.ow2.easybeans.osgi - easybeans-osgi-itests-base - ${easybeans.version} - tests - test - - - - - org.testng - testng - 5.1 - jdk15 - test - - - - - org.ow2.easybeans.osgi - easybeans-client-fix - ${easybeans.version} - test - - - - - org.ow2.easybeans - easybeans-example-entitybean - ${easybeans.version} - test - - - - org.ow2.easybeans - easybeans-example-messagedrivenbean - ${easybeans.version} - test - - - - org.ow2.easybeans - easybeans-example-migrationejb21 - ${easybeans.version} - test - - - - org.ow2.easybeans.osgi - easybeans-example-osgi - ${easybeans.version} - test - - - - org.ow2.easybeans - easybeans-example-security - ${easybeans.version} - test - - - - org.ow2.easybeans - easybeans-example-statefulbean - ${easybeans.version} - test - - - - org.ow2.easybeans - easybeans-example-statelessbean - ${easybeans.version} - test - - - - org.ow2.easybeans - easybeans-example-timerservice - ${easybeans.version} - test - - - - - felix - - knopflerfish - - - diff --git a/jonas/modules/itests/osgi/src/test/configuration/testng.xml b/jonas/modules/itests/osgi/src/test/configuration/testng.xml deleted file mode 100644 index 6fcc41fe2b262a7b0983cc2b5dcf6c07761dc0b0..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/osgi/src/test/configuration/testng.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - diff --git a/jonas/modules/itests/pom.xml b/jonas/modules/itests/pom.xml deleted file mode 100644 index d2504195294dce42446f8c7a45980117377234d0..0000000000000000000000000000000000000000 --- a/jonas/modules/itests/pom.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - org.ow2.jonas - jonas-modules - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas - jonas-itests - pom - JOnAS :: iTests - Integration Tests - - - db,resource,ejb3,jaxws,web,ear,audit,depmonitor - ${project.build.directory}/jonas-full-${project.version} - ${project.build.directory}/jonas-base - - - - - - - maven-enforcer-plugin - - - enforce-java - - enforce - - - - - - - 2.1 - - - 1.5 - - - - - - - - - - - maven.test.skip - - - maven.test.skip - !true - - - - applications - cargo - osgi - intravm - - - - diff --git a/jonas/modules/libraries/externals/asm/pom.xml b/jonas/modules/libraries/externals/asm/pom.xml deleted file mode 100755 index 8dbaadf8a3f32542771c62b6d885ec59412e4a9f..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/asm/pom.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - org.ow2.jonas.osgi - jonas-externals - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas.osgi - asm - bundle - JOnAS :: Libraries :: Externals :: ASM - - - 2.2.3 - - - - - asm - asm - ${asm.version} - - - asm - asm-commons - ${asm.version} - - - asm - asm-util - ${asm.version} - - - asm - asm-tree - ${asm.version} - - - asm - asm-attrs - ${asm.version} - - - asm - asm-analysis - ${asm.version} - - - diff --git a/jonas/modules/libraries/externals/asm/src/main/resources/META-INF/asm.bnd b/jonas/modules/libraries/externals/asm/src/main/resources/META-INF/asm.bnd deleted file mode 100755 index f2553b9c531e4858ed04a86b1c6adf9fb3bf49d9..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/asm/src/main/resources/META-INF/asm.bnd +++ /dev/null @@ -1,30 +0,0 @@ -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 2008-2011 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -# List of packages exported by the bundle. -Export-Package org.objectweb.asm.*;version=${asm.version} - --versionpolicy [${version;==;${@}},${version;+;${@}}) - -# No private package. - diff --git a/jonas/modules/libraries/externals/javaee-api/pom.xml b/jonas/modules/libraries/externals/javaee-api/pom.xml deleted file mode 100644 index f599aa8eab7e80ba52a0ef285b366dc1fdbf399c..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/javaee-api/pom.xml +++ /dev/null @@ -1,225 +0,0 @@ - - - - - org.ow2.jonas.osgi - jonas-externals - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas.osgi - javaee-api - bundle - JOnAS :: Libraries :: Externals :: Java EE API - - - - - - org.ow2.spec.ee - ow2-ejb-3.0-spec - provided - - - - - org.apache.geronimo.specs - geronimo-jaxrpc_1.1_spec - - - - - org.ow2.spec.ee - ow2-jpa-1.0-spec - ${ow2.spec.version} - provided - - - org.ow2.spec.ee - ow2-connector-1.5-spec - provided - - - org.ow2.spec.ee - ow2-jta-1.1-spec - provided - - - org.ow2.spec.ee - ow2-deployment-1.2-spec - provided - - - org.ow2.spec.ee - ow2-jsr77-1.1-spec - provided - - - - - org.apache.axis - axis-jaxrpc - provided - - - wsdl4j - wsdl4j - 1.6.1 - provided - - - - org.apache.tomcat - servlet-api - provided - - - - org.mortbay.jetty - jsp-api-2.1 - - 6.1.5 - - - org.mortbay.jetty - servlet-api-2.5 - - - - - - - org.apache.geronimo.specs - geronimo-jaxr_1.0_spec - 1.1 - provided - - - org.apache.geronimo.specs - geronimo-ws-metadata_2.0_spec - 1.1.2 - provided - - - - org.apache.servicemix.specs - org.apache.servicemix.specs.stax-api-1.0 - 1.5.0 - provided - - - javax.security - jacc - provided - - - javax.mail - mail - provided - - - org.apache.geronimo.specs - geronimo-jms_1.1_spec - provided - - - org.apache.geronimo.specs - geronimo-jaxws_2.1_spec - 1.0 - provided - - - - org.apache.servicemix.specs - org.apache.servicemix.specs.jaxb-api-2.1 - 1.2.0 - provided - - - - org.apache.servicemix.specs - org.apache.servicemix.specs.stax-api-1.0 - - - org.apache.geronimo.specs - geronimo-activation_1.1_spec - - - - - javax.xml.soap - com.springsource.javax.xml.soap - 1.3.0 - provided - - - - javax.faces - jsf-api - provided - - - - - javax.faces - jsf-impl - - - - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - generate-tld-assembly - package - - attached - - - - src/main/assembly/assembly.xml - - - - - - - - - diff --git a/jonas/modules/libraries/externals/javaee-api/src/main/assembly/assembly.xml b/jonas/modules/libraries/externals/javaee-api/src/main/assembly/assembly.xml deleted file mode 100644 index 2d9729a21145f395631c7f208d127f71d741ff02..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/javaee-api/src/main/assembly/assembly.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - tld - - jar - - - - false - - - - - - - / - - true - true - - - **/*.tld - - - - org.mortbay.jetty:jsp-api-2.1 - javax.faces:jsf-impl - - - - diff --git a/jonas/modules/libraries/externals/javaee-api/src/main/java/javax/xml/bind/ContextFinder.java b/jonas/modules/libraries/externals/javaee-api/src/main/java/javax/xml/bind/ContextFinder.java deleted file mode 100644 index 99495059bee598acb3f751922b7ab4473b71d545..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/javaee-api/src/main/java/javax/xml/bind/ContextFinder.java +++ /dev/null @@ -1,183 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package javax.xml.bind; - -import java.lang.reflect.Method; -import java.util.Map; -import java.util.Properties; -import java.io.IOException; -import java.io.InputStream; -import java.io.BufferedReader; -import java.io.InputStreamReader; - -/** - * Copied from artifact org.apache.servicemix.specs:org.apache.servicemix.specs.jaxb-api-2.1. - */ -class ContextFinder { - - private static final String PLATFORM_DEFAULT_FACTORY_CLASS = "com.sun.xml.bind.v2.ContextFactory"; - private static final String JAXB_CONTEXT_PROPERTY = JAXBContext.class.getName(); - private static final String JAXB_CONTEXT_FACTORY = JAXBContext.JAXB_CONTEXT_FACTORY; - - public static JAXBContext find(String contextPath, ClassLoader classLoader, Map properties) throws JAXBException { - String className = null; - // Patch for bug https://issues.apache.org/activemq/browse/SMX4-329 - if (contextPath == null || contextPath.length() == 0) { - throw new JAXBException("Invalid contextPath (empty or null)"); - } - String[] packages = contextPath.split(":"); - if (packages == null || packages.length == 0) { - throw new JAXBException("Invalid contextPath (no packages)"); - } - for (String pkg : packages) { - String url = pkg.replace('.', '/') + "/jaxb.properties"; - className = loadClassNameFromProperties(url, classLoader); - if (className != null) { - break; - } - } - if (className == null) { - className = System.getProperty(JAXB_CONTEXT_PROPERTY); - } - if (className == null) { - String url = "META-INF/services/" + JAXB_CONTEXT_PROPERTY; - className = loadClassName(url, classLoader); - } - if (className == null) { - className = PLATFORM_DEFAULT_FACTORY_CLASS; - } - Class spi = loadSpi(className, classLoader); - try { - Method m = spi.getMethod("createContext", new Class[] { String.class, ClassLoader.class, Map.class }); - return (JAXBContext) m.invoke(null, new Object[] { contextPath, classLoader, properties }); - } catch (Throwable t) { - // Ignored - } - // Fallback for JAXB 1.0 compatibility (at least JAXB TCK tests are using that feature) - try { - Method m = spi.getMethod("createContext", new Class[] { String.class, ClassLoader.class, }); - return (JAXBContext) m.invoke(null, new Object[] { contextPath, classLoader }); - } catch (Throwable t) { - throw new JAXBException("Unable to create context", t); - } - } - - - public static JAXBContext find(Class[] classes, Map properties) throws JAXBException { - String className = null; - for (Class cl : classes) { - Package pkg = cl.getPackage(); - if (pkg != null) { - String url = pkg.getName().replace('.', '/') + "/jaxb.properties"; - className = loadClassNameFromProperties(url, cl.getClassLoader()); - if (className != null) { - break; - } - } - } - if (className == null) { - className = System.getProperty(JAXB_CONTEXT_PROPERTY); - } - if (className == null) { - String url = "META-INF/services/" + JAXB_CONTEXT_PROPERTY; - className = loadClassName(url, Thread.currentThread().getContextClassLoader()); - } - if (className == null) { - className = PLATFORM_DEFAULT_FACTORY_CLASS; - } - Class spi = loadSpi(className, Thread.currentThread().getContextClassLoader()); - try { - Method m = spi.getMethod("createContext", new Class[] { Class[].class, Map.class }); - return (JAXBContext) m.invoke(null, new Object[] { classes, properties }); - } catch (Throwable t) { - throw new JAXBException("Unable to create context", t); - } - } - - private static String loadClassNameFromProperties(String url, ClassLoader classLoader) throws JAXBException { - try { - InputStream is; - if (classLoader != null) { - is = classLoader.getResourceAsStream(url); - } else { - is = ClassLoader.getSystemResourceAsStream(url); - } - if (is != null) { - try { - Properties props = new Properties(); - props.load(is); - String className = props.getProperty(JAXB_CONTEXT_FACTORY); - if (className == null) { - throw new JAXBException("jaxb.properties file " + url + " should contain a " + JAXB_CONTEXT_FACTORY + " property"); - } - return className.trim(); - } finally { - is.close(); - } - } else { - return null; - } - } catch (IOException e) { - throw new JAXBException(e); - } - } - - private static String loadClassName(String url, ClassLoader classLoader) throws JAXBException { - try { - InputStream is; - if (classLoader != null) { - is = classLoader.getResourceAsStream(url); - } else { - is = ClassLoader.getSystemResourceAsStream(url); - } - if (is != null) { - try { - BufferedReader r = new BufferedReader(new InputStreamReader(is, "UTF-8")); - return r.readLine().trim(); - } finally { - is.close(); - } - } - return null; - } catch (IOException e) { - throw new JAXBException(e); - } - } - - private static Class loadSpi(String className, ClassLoader classLoader) throws JAXBException { - Class spiClass; - try { - spiClass = org.apache.servicemix.specs.locator.OsgiLocator.locate(JAXBContext.class.getName()); - if (spiClass != null) { - return spiClass; - } - } catch (Throwable t) { - } - try { - if (classLoader != null) { - spiClass = classLoader.loadClass(className); - } else { - spiClass = Class.forName(className); - } - } catch (ClassNotFoundException e) { - throw new JAXBException("Provider " + className + " not found", e); - } - return spiClass; - } - - -} diff --git a/jonas/modules/libraries/externals/javaee-api/src/main/java/javax/xml/bind/TypeConstraintException.java b/jonas/modules/libraries/externals/javaee-api/src/main/java/javax/xml/bind/TypeConstraintException.java deleted file mode 100644 index ebc2ae0e4c4b4df82a3daa28e106335c96c9bee1..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/javaee-api/src/main/java/javax/xml/bind/TypeConstraintException.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package javax.xml.bind; - -import java.io.PrintStream; - -/** - * Copied from artifact org.apache.servicemix.specs:org.apache.servicemix.specs.jaxb-api-2.1. - */ -public class TypeConstraintException extends RuntimeException { - - private String errorCode; - private Throwable linkedException; - - public TypeConstraintException(String message) { - this(message, null, null); - } - - public TypeConstraintException(String message, String errorCode) { - this(message, errorCode, null); - } - - public TypeConstraintException(String message, String errorCode, Throwable cause) { - super(message); - this.errorCode = errorCode; - this.linkedException = cause; - } - - public TypeConstraintException(String message, Throwable cause) { - this(message, null, cause); - } - - public TypeConstraintException(Throwable cause) { - this(null, null, cause); - } - - public String getErrorCode() { - return errorCode; - } - - public Throwable getLinkedException() { - // Do not use getCause() as the cause was never initialized in the constructor - return linkedException; - } - - public synchronized void setLinkedException(Throwable linkedException) { - this.linkedException = linkedException; - } - - public String toString() { - return linkedException != null ? - super.toString() + "\n - with linked exception:\n[" + linkedException.toString() + "]" : - super.toString(); - } - - public void printStackTrace() { - printStackTrace(System.err); - } - - public void printStackTrace(PrintStream ps) { - if (this.linkedException != null) { - this.linkedException.printStackTrace(ps); - ps.println("--------------- linked to ------------------"); - } - super.printStackTrace(ps); - } - -} \ No newline at end of file diff --git a/jonas/modules/libraries/externals/javaee-api/src/main/java/org/apache/taglibs/standard/tag/common/xml/TransformSupport.java b/jonas/modules/libraries/externals/javaee-api/src/main/java/org/apache/taglibs/standard/tag/common/xml/TransformSupport.java deleted file mode 100644 index d09e2400d58f249efb8d6e9116b7086c04211cf3..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/javaee-api/src/main/java/org/apache/taglibs/standard/tag/common/xml/TransformSupport.java +++ /dev/null @@ -1,425 +0,0 @@ -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved. - * - * Portions Copyright Apache Software Foundation. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can obtain - * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html - * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt. - * Sun designates this particular file as subject to the "Classpath" exception - * as provided by Sun in the GPL Version 2 section of the License file that - * accompanied this code. If applicable, add the following below the License - * Header, with the fields enclosed by brackets [] replaced by your own - * identifying information: "Portions Copyrighted [year] - * [name of copyright owner]" - * - * Contributor(s): - * - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ - -package org.apache.taglibs.standard.tag.common.xml; - -import java.io.IOException; -import java.io.InputStream; -import java.io.Reader; -import java.io.StringReader; -import java.io.Writer; -import java.util.List; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.JspTagException; -import javax.servlet.jsp.PageContext; -import javax.servlet.jsp.tagext.BodyTagSupport; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.Result; -import javax.xml.transform.Source; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerConfigurationException; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.URIResolver; -import javax.xml.transform.dom.DOMResult; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.sax.SAXSource; -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.stream.StreamSource; - -import org.apache.taglibs.standard.resources.Resources; -import org.apache.taglibs.standard.tag.common.core.ImportSupport; -import org.apache.taglibs.standard.tag.common.core.Util; -import org.w3c.dom.Document; -import org.w3c.dom.Node; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; -import org.xml.sax.XMLReader; -import org.xml.sax.helpers.XMLReaderFactory; - -/** - *

    - * Support for tag handlers for <transform>, the XML transformation tag. - *

    - * @author Shawn Bayern - */ -public abstract class TransformSupport extends BodyTagSupport { - - // ********************************************************************* - // Protected state - - protected Object xml; // attribute - - protected String xmlSystemId; // attribute - - protected Object xslt; // attribute - - protected String xsltSystemId; // attribute - - protected Result result; // attribute - - // ********************************************************************* - // Private state - - private String var; // 'var' attribute - - private int scope; // processed 'scope' attr - - private Transformer t; // actual Transformer - - private TransformerFactory tf; // reusable factory - - private DocumentBuilder db; // reusable factory - - private DocumentBuilderFactory dbf; // reusable factory - - // ********************************************************************* - // Constructor and initialization - - public TransformSupport() { - super(); - init(); - } - - private void init() { - xml = xslt = null; - xmlSystemId = xsltSystemId = null; - var = null; - result = null; - tf = null; - scope = PageContext.PAGE_SCOPE; - } - - // ********************************************************************* - // Tag logic - - @Override - public int doStartTag() throws JspException { - /* - * We can set up our Transformer here, so we do so, and we let it - * receive parameters directly from subtags (instead of caching them. - */ - try { - - // ************************************ - // Initialize - - // set up our DocumentBuilderFactory if necessary - if (dbf == null) { - dbf = DocumentBuilderFactory.newInstance(); - dbf.setNamespaceAware(true); - dbf.setValidating(false); - } - if (db == null) { - db = dbf.newDocumentBuilder(); - } - - // set up the TransformerFactory if necessary - if (tf == null) { - tf = TransformerFactory.newInstance(); - } - - // ************************************ - // Produce transformer - - Source s; - if (xslt != null) { - if (!(xslt instanceof String) && !(xslt instanceof Reader) && !(xslt instanceof javax.xml.transform.Source)) { - throw new JspTagException(Resources.getMessage("TRANSFORM_XSLT_UNRECOGNIZED")); - } - s = getSource(xslt, xsltSystemId); - } else { - throw new JspTagException(Resources.getMessage("TRANSFORM_NO_TRANSFORMER")); - } - tf.setURIResolver(new JstlUriResolver(pageContext)); - t = tf.newTransformer(s); - - // ############################################### - // Patch for xalan 2.7.0 - // The method newTransformer(s) should throw a - // TransformerConfigurationException if the XSLT source is not valid - // instead of returning an object Transformer null - if (t == null) { - throw new TransformerConfigurationException(); - } - // ############################################### - - return EVAL_BODY_BUFFERED; - - } catch (SAXException ex) { - throw new JspException(ex); - } catch (ParserConfigurationException ex) { - throw new JspException(ex); - } catch (IOException ex) { - throw new JspException(ex); - } catch (TransformerConfigurationException ex) { - throw new JspException(ex); - } - } - - // parse 'xml' or body, transform via our Transformer, - // and store as 'var' or through 'result' - @Override - public int doEndTag() throws JspException { - try { - - // ************************************ - // Determine source XML - - // if we haven't gotten a source, use the body (which may be empty) - Object xml = this.xml; - if (xml == null) { - if (bodyContent != null && bodyContent.getString() != null) { - xml = bodyContent.getString().trim(); - } else { - xml = ""; - } - } - - // let the Source be with you - Source source = getSource(xml, xmlSystemId); - - // ************************************ - // Conduct the transformation - - // we can assume at most one of 'var' or 'result' is specified - if (result != null) { - // we can write directly to the Result - t.transform(source, result); - } else if (var != null) { - // we need a Document - Document d = db.newDocument(); - Result doc = new DOMResult(d); - t.transform(source, doc); - pageContext.setAttribute(var, d, scope); - } else { - Result page = new StreamResult(new SafeWriter(pageContext.getOut())); - t.transform(source, page); - } - - return EVAL_PAGE; - } catch (SAXException ex) { - throw new JspException(ex); - } catch (ParserConfigurationException ex) { - throw new JspException(ex); - } catch (IOException ex) { - throw new JspException(ex); - } catch (TransformerException ex) { - throw new JspException(ex); - } - } - - // Releases any resources we may have (or inherit) - @Override - public void release() { - init(); - } - - // ********************************************************************* - // Public methods for subtags - - /** Sets (adds) a transformation parameter on our transformer. */ - public void addParameter(final String name, final Object value) { - t.setParameter(name, value); - } - - // ********************************************************************* - // Utility methods - - /** - * Wraps systemId with a "jstl:" prefix to prevent the parser from thinking - * that the URI is truly relative and resolving it against the current - * directory in the filesystem. - */ - private static String wrapSystemId(final String systemId) { - if (systemId == null) { - return "jstl:"; - } else if (ImportSupport.isAbsoluteUrl(systemId)) { - return systemId; - } else { - return ("jstl:" + systemId); - } - } - - /** - * Retrieves a Source from the given Object, whether it be a String, Reader, - * Node, or other supported types (even a Source already). If 'url' is true, - * then we must be passed a String and will interpret it as a URL. A null - * input always results in a null output. - */ - private Source getSource(final Object o, final String systemId) throws SAXException, ParserConfigurationException, - IOException { - if (o == null) { - return null; - } else if (o instanceof Source) { - return (Source) o; - } else if (o instanceof String) { - // if we've got a string, chain to Reader below - return getSource(new StringReader((String) o), systemId); - } else if (o instanceof Reader) { - // explicitly go through SAX to maintain control - // over how relative external entities resolve - XMLReader xr = XMLReaderFactory.createXMLReader(); - xr.setEntityResolver(new ParseSupport.JstlEntityResolver(pageContext)); - InputSource s = new InputSource((Reader) o); - s.setSystemId(wrapSystemId(systemId)); - Source result = new SAXSource(xr, s); - result.setSystemId(wrapSystemId(systemId)); - return result; - } else if (o instanceof Node) { - return new DOMSource((Node) o); - } else if (o instanceof List) { - // support 1-item List because our XPath processor outputs them - List l = (List) o; - if (l.size() == 1) { - return getSource(l.get(0), systemId); // unwrap List - } else { - throw new IllegalArgumentException(Resources.getMessage("TRANSFORM_SOURCE_INVALID_LIST")); - } - } else { - throw new IllegalArgumentException(Resources.getMessage("TRANSFORM_SOURCE_UNRECOGNIZED") + o.getClass()); - } - } - - // ********************************************************************* - // Tag attributes - - public void setVar(final String var) { - this.var = var; - } - - public void setScope(final String scope) { - this.scope = Util.getScope(scope); - } - - // ********************************************************************* - // Private utility classes - - /** - * A Writer based on a wrapped Writer but ignoring requests to close() and - * flush() it. (Someone must have wrapped the toilet in my office - * similarly...) - */ - private static class SafeWriter extends Writer { - private Writer w; - - public SafeWriter(final Writer w) { - this.w = w; - } - - @Override - public void close() { - } - - @Override - public void flush() { - } - - @Override - public void write(final char[] cbuf, final int off, final int len) throws IOException { - w.write(cbuf, off, len); - } - } - - // ********************************************************************* - // JSTL-specific URIResolver class - - /** Lets us resolve relative external entities. */ - private static class JstlUriResolver implements URIResolver { - private final PageContext ctx; - - public JstlUriResolver(final PageContext ctx) { - this.ctx = ctx; - } - - public Source resolve(final String href, String base) throws TransformerException { - - // pass if we don't have a systemId - if (href == null) { - return null; - } - - // remove "jstl" marker from 'base' - // NOTE: how 'base' is determined varies among different Xalan - // xsltc implementations - int index; - if (base != null && (index = base.indexOf("jstl:")) != -1) { - base = base.substring(index + 5); - } - - // we're only concerned with relative URLs - if (ImportSupport.isAbsoluteUrl(href) || (base != null && ImportSupport.isAbsoluteUrl(base))) { - return null; - } - - // base is relative; remove everything after trailing '/' - if (base == null || base.lastIndexOf("/") == -1) { - base = ""; - } else { - base = base.substring(0, base.lastIndexOf("/") + 1); - } - - // concatenate to produce the real URL we're interested in - String target = base + href; - - // for relative URLs, load and wrap the resource. - // don't bother checking for 'null' since we specifically want - // the parser to fail if the resource doesn't exist - InputStream s; - if (target.startsWith("/")) { - s = ctx.getServletContext().getResourceAsStream(target); - if (s == null) { - throw new TransformerException(Resources.getMessage("UNABLE_TO_RESOLVE_ENTITY", href)); - } - } else { - String pagePath = ((HttpServletRequest) ctx.getRequest()).getServletPath(); - String basePath = pagePath.substring(0, pagePath.lastIndexOf("/")); - s = ctx.getServletContext().getResourceAsStream(basePath + "/" + target); - if (s == null) { - throw new TransformerException(Resources.getMessage("UNABLE_TO_RESOLVE_ENTITY", href)); - } - } - return new StreamSource(s); - } - } - -} diff --git a/jonas/modules/libraries/externals/javaee-api/src/main/resources/META-INF/javaee-api.bnd b/jonas/modules/libraries/externals/javaee-api/src/main/resources/META-INF/javaee-api.bnd deleted file mode 100644 index 2adc740a8c87fbaf8987e5762cec6d6e947e3324..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/javaee-api/src/main/resources/META-INF/javaee-api.bnd +++ /dev/null @@ -1,79 +0,0 @@ -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 2007-2011 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -# javax.xml.namespace got from the JDK. -# com.ibm , ..not needed (?) -# Ensure consistency by forcing import on interceptor 1.0 (if 1.1 is here, -# wire will be created between this bundle and the interceptor 1.1 bundle) -Import-Package !javax.activation.*,\ - !com.sun.org.apache.*,\ - !com.ibm.*,\ - javax.interceptor.*;version=1.0,\ - javax.xml.namespace,\ - * - -# These resources must be present. They cannot be exported. -Include-Resource @mail-1.4.jar!/META-INF/javamail.default.providers, \ - @mail-1.4.jar!/META-INF/javamail.default.address.map, \ - @mail-1.4.jar!/META-INF/javamail.charset.map, \ - @mail-1.4.jar!/META-INF/mailcap - -# List of packages exported by the bundle. -# TODO mail and activation implementations should be in jonas-mail -Export-Package com.ibm.wsdl.*,\ - com.sun.activation.*,\ - com.sun.mail.*,\ - javax.activation.*;version=1.1,\ - javax.annotation.*;version=1.0,\ - javax.faces.*;version=1.2;-split-package:=merge-first,\ - javax.ejb.*;version=3.0,\ - javax.el.*;version=2.1,\ - javax.enterprise.deploy.*;version=1.2,\ - javax.interceptor;version=1.0,\ - javax.jms.*;version=1.1,\ - javax.jws.*;version=2.0,\ - javax.mail.*;version=1.4,\ - javax.management.j2ee.*;version=1.2,\ - javax.persistence.*;version=1.0,\ - javax.resource.*;version=1.5,\ - javax.security.jacc;version=1.1,\ - javax.servlet.jsp.*;version=2.1,\ - javax.servlet.*;version=2.5,\ - javax.transaction.*;version=1.1.0,\ - javax.wsdl.*;version=1.2,\ - javax.xml.bind.*;version=2.1;-split-package:=merge-first,\ - javax.xml.rpc.*;version=1.1,\ - javax.xml.soap.*;version=1.3,\ - javax.xml.stream.*;version=1.0,\ - javax.xml.transform.stax;version=1.0, \ - javax.xml.ws.*;version=2.1,\ - javax.*;-split-package:=merge-first,\ - org.apache.taglibs.*;version=2.1;-split-package:=merge-first - -# Private package (Some OSGi utility to help SPI loading) -Private-Package org.apache.servicemix.specs.locator - -Bundle-Activator org.apache.servicemix.specs.locator.Activator - -# JSTL Taglib may import JDBC Drivers and we don't know the name of the JDBC Driver, so we need the wildcard. -DynamicImport-Package * diff --git a/jonas/modules/libraries/externals/javaee-api/src/main/resources/javax/servlet/jsp/resources/jsp_2_0.xsd b/jonas/modules/libraries/externals/javaee-api/src/main/resources/javax/servlet/jsp/resources/jsp_2_0.xsd deleted file mode 100644 index a27f3bc7b7570dcaec881a9e3b2e06854b35e7b8..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/javaee-api/src/main/resources/javax/servlet/jsp/resources/jsp_2_0.xsd +++ /dev/null @@ -1,288 +0,0 @@ - - - - - - @(#)jsp_2_0.xsds 1.17 03/18/03 - - - - - - - This is the XML Schema for the JSP 2.0 deployment descriptor - types. The JSP 2.0 schema contains all the special - structures and datatypes that are necessary to use JSP files - from a web application. - - The contents of this schema is used by the web-app_2_4.xsd - file to define JSP specific content. - - - - - - - - The following conventions apply to all J2EE - deployment descriptor elements unless indicated otherwise. - - - In elements that specify a pathname to a file within the - same JAR file, relative filenames (i.e., those not - starting with "/") are considered relative to the root of - the JAR file's namespace. Absolute filenames (i.e., those - starting with "/") also specify names in the root of the - JAR file's namespace. In general, relative names are - preferred. The exception is .war files where absolute - names are preferred for consistency with the Servlet API. - - - - - - - - - - - - - - The jsp-configType is used to provide global configuration - information for the JSP files in a web application. It has - two subelements, taglib and jsp-property-group. - - - - - - - - - - - - - - - - - - The jsp-file element contains the full path to a JSP file - within the web application beginning with a `/'. - - - - - - - - - - - - - - - - The jsp-property-groupType is used to group a number of - files so they can be given global property information. - All files so described are deemed to be JSP files. The - following additional properties can be described: - - - Control whether EL is ignored - - Control whether scripting elements are invalid - - Indicate pageEncoding information. - - Indicate that a resource is a JSP document (XML) - - Prelude and Coda automatic includes. - - - - - - - - - - - - Can be used to easily set the isELIgnored - property of a group of JSP pages. By default, the - EL evaluation is enabled for Web Applications using - a Servlet 2.4 or greater web.xml, and disabled - otherwise. - - - - - - - - - The valid values of page-encoding are those of the - pageEncoding page directive. It is a - translation-time error to name different encodings - in the pageEncoding attribute of the page directive - of a JSP page and in a JSP configuration element - matching the page. It is also a translation-time - error to name different encodings in the prolog - or text declaration of a document in XML syntax and - in a JSP configuration element matching the document. - It is legal to name the same encoding through - mulitple mechanisms. - - - - - - - - - Can be used to easily disable scripting in a - group of JSP pages. By default, scripting is - enabled. - - - - - - - - - If true, denotes that the group of resources - that match the URL pattern are JSP documents, - and thus must be interpreted as XML documents. - If false, the resources are assumed to not - be JSP documents, unless there is another - property group that indicates otherwise. - - - - - - - - - The include-prelude element is a context-relative - path that must correspond to an element in the - Web Application. When the element is present, - the given path will be automatically included (as - in an include directive) at the beginning of each - JSP page in this jsp-property-group. - - - - - - - - - The include-coda element is a context-relative - path that must correspond to an element in the - Web Application. When the element is present, - the given path will be automatically included (as - in an include directive) at the end of each - JSP page in this jsp-property-group. - - - - - - - - - - - - - - - The taglibType defines the syntax for declaring in - the deployment descriptor that a tag library is - available to the application. This can be done - to override implicit map entries from TLD files and - from the container. - - - - - - - - - - A taglib-uri element describes a URI identifying a - tag library used in the web application. The body - of the taglib-uri element may be either an - absolute URI specification, or a relative URI. - There should be no entries in web.xml with the - same taglib-uri value. - - - - - - - - - - the taglib-location element contains the location - (as a resource relative to the root of the web - application) where to find the Tag Library - Description file for the tag library. - - - - - - - - - - - diff --git a/jonas/modules/libraries/externals/javaee-api/src/main/resources/javax/servlet/jsp/resources/jsp_2_1.xsd b/jonas/modules/libraries/externals/javaee-api/src/main/resources/javax/servlet/jsp/resources/jsp_2_1.xsd deleted file mode 100644 index 1f4f8ff2f6e274c39aa91a168703ac9eeedee04b..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/javaee-api/src/main/resources/javax/servlet/jsp/resources/jsp_2_1.xsd +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/jonas/modules/libraries/externals/javaee-api/src/main/resources/javax/servlet/jsp/resources/jspxml.dtd b/jonas/modules/libraries/externals/javaee-api/src/main/resources/javax/servlet/jsp/resources/jspxml.dtd deleted file mode 100644 index 5d8515d49204b1a6ce8894b86ab41e4bb745600a..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/javaee-api/src/main/resources/javax/servlet/jsp/resources/jspxml.dtd +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas/modules/libraries/externals/javaee-api/src/main/resources/javax/servlet/jsp/resources/jspxml.xsd b/jonas/modules/libraries/externals/javaee-api/src/main/resources/javax/servlet/jsp/resources/jspxml.xsd deleted file mode 100644 index 2532dc4aa73573c909260cc91afb3cb56e2db0b8..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/javaee-api/src/main/resources/javax/servlet/jsp/resources/jspxml.xsd +++ /dev/null @@ -1,514 +0,0 @@ - - - - - - - - - - - - - - - - -]> - - - - - - - - - XML Schema for JSP 2.0. - - This schema is based upon the recent (May 5th, 2001) - W3C recommendation for XML Schema. - - A JSP translator should reject an XML-format file that is - not strictly valid according to this schema or does not observe - the constraints documented here. A translator is not required - to use this schema for validation or to use a validating parser. - - - - - - - - - - Body defines the "top-level" elements in root and beanInfo. - There are probably other elements that should use it. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A request-time expression value - - - - - - - - - - - Bool would be boolean except it does not accept 1 and 0. - - - - - - - - - - - - - - Identifier is an unqualified Java identifier. - - - - - - - - - - - TypeName is one or more Java identifiers separated by dots - with no whitespace. - - - - - - - - - - - ImportList is one or more typeNames separated by commas. - Whitespace is allowed before and after the comma. - - - - - - - - - - - SetProp is an Identifier or *. - - - - - - - - - - - RelativeURL is a uriReference with no colon character - before the first /, ? or #, if any (RFC2396). - - - - - - - - - - - - - - - Length is nn or nn%. - - - - - - - - - - - - Buffer Size with an explicit value - - - - - - - - - - - Buffer Size with a "none" value - - - - - - - - - - - Buffer size is xkb or none. - - - - - - - - - Content type and character encoding for this page. - - - - - - - - - - - Page Encoding for this page. - - - - - - - - - - - valid scope values - - - - - - - - - - - - - - valid values for a plugin type - - - - - - - - - - - - Buffer size is xkb. - - - - - - - - - - - - - - - - - The root element of all JSP documents is named root. - - Authors may, if they wish, include schema location information. - If specified, the information may appear as attributes of - the root element as follows: - - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://java.sun.com/JSP/Page xsd-file-location" - - Documents should not specify the system identifier of a DTD - in a DOCTYPE declaration. - - - - - - - - - - - - - - - directive.page is the "page directive". - - - - - - - - - - - - - - - - - - - - - - - directive.include is the "include directive". - This element does not appear on XML views of JSP pages. - - - - - - - - - - - The representation of a scriplet. - - - - - - - - The reprsentation of a declaration. - - - - - - - - The representation of an expression. - - - - - - - - Verbatim template text. - - - - - - - - useBean instantiates or accesses a bean in the specified scope. - - Constraint: The allowed combinations of attributes are: - - class [type] | type [( class | beanName)] - - - - - - - - - - - - - - - - - - - - setProperty changes the value of an object property. - - Constraint: The object named by the name must have been - "introduced" to the JSP processor using either the - jsp:useBean action or a custom action with an associated - VariableInfo entry for this name. - - Exact valid combinations are not expressable in XML Schema. - They are: - - name="Identifier" property="*" - name="Identifier" property="Identfiier" param="string" - name="Identifier" property="Identifier" value="string" - - - - - - - - - - - - - - - getProperty obtains the value of an object property. - - Constraint: The object named by the name must have been - "introduced" to the JSP processor using either the - jsp:useBean action or a custom action with an associated - VariableInfo entry for this name. - - ???The spec is interpreted as restricting the values of - property to Identifier. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas/modules/libraries/externals/javaee-api/src/main/resources/javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd b/jonas/modules/libraries/externals/javaee-api/src/main/resources/javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd deleted file mode 100644 index cd15422dec096fd43df66b09e12f25405e9a7a9e..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/javaee-api/src/main/resources/javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas/modules/libraries/externals/javaee-api/src/main/resources/javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd b/jonas/modules/libraries/externals/javaee-api/src/main/resources/javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd deleted file mode 100644 index a3e39f54f356dc1096d9849820be6cc199c53805..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/javaee-api/src/main/resources/javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd +++ /dev/null @@ -1,478 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas/modules/libraries/externals/javaee-api/src/main/resources/javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd b/jonas/modules/libraries/externals/javaee-api/src/main/resources/javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd deleted file mode 100644 index 447394adef1b081785e7bee757b2f08738d46fe2..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/javaee-api/src/main/resources/javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd +++ /dev/null @@ -1,989 +0,0 @@ - - - - - - - %W% %G% - - - - - - ... - - - The instance documents may indicate the published - version of the schema using xsi:schemaLocation attribute - for J2EE namespace with the following location: - - http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd - - ]]> - - - - - - - - - - - - - - The taglib tag is the document root. - The definition of taglib is provided - by the tldTaglibType. - - - - - - - - The taglib element contains, among other things, tag and - tag-file elements. - The name subelements of these elements must each be unique. - - - - - - - - - - - - The taglib element contains function elements. - The name subelements of these elements must each be unique. - - - - - - - - - - - - - - - - - Specifies the type of body that is valid for a tag. - This value is used by the JSP container to validate - that a tag invocation has the correct body syntax and - by page composition tools to assist the page author - in providing a valid tag body. - - There are currently four values specified: - - tagdependent The body of the tag is interpreted by the tag - implementation itself, and is most likely - in a different "language", e.g embedded SQL - statements. - - JSP The body of the tag contains nested JSP - syntax. - - empty The body must be empty - - scriptless The body accepts only template text, EL - Expressions, and JSP action elements. No - scripting elements are allowed. - - - - - - - - - - - - - - - - - - - - - The extensibleType is an abstract base type that is used to - define the type of extension-elements. Instance documents - must substitute a known type to define the extension by - using xsi:type attribute to define the actual type of - extension-elements. - - - - - - - - - - - - - The function element is used to provide information on each - function in the tag library that is to be exposed to the EL. - - The function element may have several subelements defining: - - description Optional tag-specific information - - display-name A short name that is intended to be - displayed by tools - - icon Optional icon element that can be used - by tools - - name A unique name for this function - - function-class Provides the name of the Java class that - implements the function - - function-signature Provides the signature, as in the Java - Language Specification, of the Java - method that is to be used to implement - the function. - - example Optional informal description of an - example of a use of this function - - function-extension Zero or more extensions that provide extra - information about this function, for tool - consumption - - - - - - - - - - - A unique name for this function. - - - - - - - - - Provides the fully-qualified class name of the Java - class containing the static method that implements - the function. - - - - - - - - - - Provides the signature, of the static Java method that is - to be used to implement the function. The syntax of the - function-signature element is as follows: - - FunctionSignature ::= ReturnType S MethodName S? - '(' S? Parameters? S? ')' - - ReturnType ::= Type - - MethodName ::= Identifier - - Parameters ::= Parameter - | ( Parameter S? ',' S? Parameters ) - - Parameter ::= Type - - Where: - - * Type is a basic type or a fully qualified Java class name - (including package name), as per the 'Type' production - in the Java Language Specification, Second Edition, - Chapter 18. - - * Identifier is a Java identifier, as per the 'Identifier' - production in the Java Language Specification, Second - Edition, Chapter 18. - - Example: - - java.lang.String nickName( java.lang.String, int ) - - - - - - - - - - The example element contains an informal description - of an example of the use of this function. - - - - - - - - - - Function extensions are for tool use only and must not affect - the behavior of a container. - - - - - - - - - - - - - - - Defines an action in this tag library that is implemented - as a .tag file. - - The tag-file element has two required subelements: - - description Optional tag-specific information - - display-name A short name that is intended to be - displayed by tools - - icon Optional icon element that can be used - by tools - - name The unique action name - - path Where to find the .tag file implementing this - action, relative to the root of the web - application or the root of the JAR file for a - tag library packaged in a JAR. This must - begin with /WEB-INF/tags if the .tag file - resides in the WAR, or /META-INF/tags if the - .tag file resides in a JAR. - - example Optional informal description of an - example of a use of this tag - - tag-extension Zero or more extensions that provide extra - information about this tag, for tool - consumption - - - - - - - - - - - - - The example element contains an informal description - of an example of the use of a tag. - - - - - - - - - - Tag extensions are for tool use only and must not affect - the behavior of a container. - - - - - - - - - - - - - - - The tag defines a unique tag in this tag library. It has one - attribute, id. - - The tag element may have several subelements defining: - - description Optional tag-specific information - - display-name A short name that is intended to be - displayed by tools - - icon Optional icon element that can be used - by tools - - name The unique action name - - tag-class The tag handler class implementing - javax.servlet.jsp.tagext.JspTag - - tei-class An optional subclass of - javax.servlet.jsp.tagext.TagExtraInfo - - body-content The body content type - - variable Optional scripting variable information - - attribute All attributes of this action that are - evaluated prior to invocation. - - dynamic-attributes Whether this tag supports additional - attributes with dynamic names. If - true, the tag-class must implement the - javax.servlet.jsp.tagext.DynamicAttributes - interface. Defaults to false. - - example Optional informal description of an - example of a use of this tag - - tag-extension Zero or more extensions that provide extra - information about this tag, for tool - consumption - - - - - - - - - - - - Defines the subclass of javax.serlvet.jsp.tagext.JspTag - that implements the request time semantics for - this tag. (required) - - - - - - - - - - Defines the subclass of javax.servlet.jsp.tagext.TagExtraInfo - for this tag. (optional) - - If this is not given, the class is not consulted at - translation time. - - - - - - - - - Specifies the format for the body of this tag. - The default in JSP 1.2 was "JSP" but because this - is an invalid setting for simple tag handlers, there - is no longer a default in JSP 2.0. A reasonable - default for simple tag handlers is "scriptless" if - the tag can have a body. - - - - - - - - - - - - The example element contains an informal description - of an example of the use of a tag. - - - - - - - - - - Tag extensions are for tool use only and must not affect - the behavior of a container. - - - - - - - - - - - - - - - The attribute element defines an attribute for the nesting - tag. The attributre element may have several subelements - defining: - - description a description of the attribute - - name the name of the attribute - - required whether the attribute is required or - optional - - rtexprvalue whether the attribute is a runtime attribute - - type the type of the attributes - - fragment whether this attribute is a fragment - - - - - - - - - - - Defines if the nesting attribute is required or - optional. - - If not present then the default is "false", i.e - the attribute is optional. - - - - - - - - - - - - Defines if the nesting attribute can have scriptlet - expressions as a value, i.e the value of the - attribute may be dynamically calculated at request - time, as opposed to a static value determined at - translation time. - - If not present then the default is "false", i.e the - attribute has a static value - - - - - - - - - - Defines the Java type of the attributes value. For - static values (those determined at translation time) - the type is always java.lang.String. - - - - - - - - - - "true" if this attribute is of type - javax.jsp.tagext.JspFragment, representing dynamic - content that can be re-evaluated as many times - as needed by the tag handler. If omitted or "false", - the default is still type="java.lang.String" - - - - - - - - - - - - - - - - - Defines the canonical name of a tag or attribute being - defined. - - The name must conform to the lexical rules for an NMTOKEN. - - - - - - - - - - - - - - - - The tld-extensionType is used to indicate - extensions to a specific TLD element. - - It is used by elements to designate an extension block - that is targeted to a specific extension designated by - a set of extension elements that are declared by a - namespace. The namespace identifies the extension to - the tool that processes the extension. - - The type of the extension-element is abstract. Therefore, - a concrete type must be specified by the TLD using - xsi:type attribute for each extension-element. - - - - - - - - - - - - - - - - - - - - The taglib tag is the document root, it defines: - - description a simple string describing the "use" of this taglib, - should be user discernable - - display-name the display-name element contains a - short name that is intended to be displayed - by tools - - icon optional icon that can be used by tools - - tlib-version the version of the tag library implementation - - short-name a simple default short name that could be - used by a JSP authoring tool to create - names with a mnemonic value; for example, - the it may be used as the prefered prefix - value in taglib directives - - uri a uri uniquely identifying this taglib - - validator optional TagLibraryValidator information - - listener optional event listener specification - - tag tags in this tag library - - tag-file tag files in this tag library - - function zero or more EL functions defined in this - tag library - - taglib-extension zero or more extensions that provide extra - information about this taglib, for tool - consumption - - - - - - - - - - Describes this version (number) of the taglibrary. - It is described as a dewey decimal. - - - - - - - - - - - Defines a simple default name that could be used by - a JSP authoring tool to create names with a - mnemonicvalue; for example, it may be used as the - preferred prefix value in taglib directives. Do - not use white space, and do not start with digits - or underscore. - - - - - - - - - - Defines a public URI that uniquely identifies this - version of the taglibrary. Leave it empty if it - does not apply. - - - - - - - - - - - - - - - - - Taglib extensions are for tool use only and must not affect - the behavior of a container. - - - - - - - - - - Describes the JSP version (number) this taglibrary - requires in order to function (dewey decimal) - - - - - - - - - - - - - - - A validator that can be used to validate - the conformance of a JSP page to using this tag library is - defined by a validatorType. - - - - - - - - - - - Defines the TagLibraryValidator class that can be used - to validate the conformance of a JSP page to using this - tag library. - - - - - - - - - The init-param element contains a name/value pair as an - initialization param. - - - - - - - - - - - - - - - - - This type defines scope of the scripting variable. See - TagExtraInfo for details. The allowed values are, - "NESTED", "AT_BEGIN" and "AT_END". - - - - - - - - - - - - - - - - - - - - The variableType provides information on the scripting - variables defined by using this tag. It is a (translation - time) error for a tag that has one or more variable - subelements to have a TagExtraInfo class that returns a - non-null value from a call to getVariableInfo(). - - The subelements of variableType are of the form: - - description Optional description of this - variable - - name-given The variable name as a constant - - name-from-attribute The name of an attribute whose - (translation time) value will - give the name of the - variable. One of name-given or - name-from-attribute is required. - - variable-class Name of the class of the variable. - java.lang.String is default. - - declare Whether the variable is declared - or not. True is the default. - - scope The scope of the scripting varaible - defined. NESTED is default. - - - - - - - - - - - - The name for the scripting variable. - - - - - - - - - - The name of an attribute whose - (translation-time) value will give the name of - the variable. - - - - - - - - - - The optional name of the class for the scripting - variable. The default is java.lang.String. - - - - - - - - - - - - Whether the scripting variable is to be defined - or not. See TagExtraInfo for details. This - element is optional and "true" is the default. - - - - - - - - - The element is optional and "NESTED" is the default. - - - - - - - - - - diff --git a/jonas/modules/libraries/externals/javaee-api/src/main/resources/javax/servlet/jsp/resources/web-jsptaglibrary_2_1.xsd b/jonas/modules/libraries/externals/javaee-api/src/main/resources/javax/servlet/jsp/resources/web-jsptaglibrary_2_1.xsd deleted file mode 100644 index 46b89222bf201a9b8aa238f9db0af4b1f40f550e..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/javaee-api/src/main/resources/javax/servlet/jsp/resources/web-jsptaglibrary_2_1.xsd +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas/modules/libraries/externals/jaxp-ri/pom.xml b/jonas/modules/libraries/externals/jaxp-ri/pom.xml deleted file mode 100644 index 56f376dfefafa534764e2dabdc6b52bf5e05655c..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/jaxp-ri/pom.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - org.ow2.jonas.osgi - jonas-externals - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas.osgi - jaxp-ri - bundle - JOnAS :: Libraries :: Externals :: JAXP-RI - - - 1.4.2 - - - - - com.sun.xml.parsers - jaxp-ri - ${jaxp-ri.version} - - - - diff --git a/jonas/modules/libraries/externals/jaxp-ri/src/main/resources/META-INF/jaxp-ri.bnd b/jonas/modules/libraries/externals/jaxp-ri/src/main/resources/META-INF/jaxp-ri.bnd deleted file mode 100644 index 0844b487bab4bf89a0a0f08685a8dd361aa24d14..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/jaxp-ri/src/main/resources/META-INF/jaxp-ri.bnd +++ /dev/null @@ -1,36 +0,0 @@ -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 2008 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# --------------------------------------------------------------------------- -# $Id: javaee-api.bnd 13444 2008-03-28 15:57:28Z benoitf $ -# --------------------------------------------------------------------------- - -# List of packages exported by the bundle. -# For now, export only some packages of JAXP-RI dependency --exportcontents com.sun.org.apache.xalan.internal.*;version=${jaxp-ri.version}, \ - com.sun.org.apache.xerces.internal.*;version=${jaxp-ri.version}, \ - com.sun.org.apache.xml.internal.*;version=${jaxp-ri.version}, \ - com.sun.org.apache.xpath.internal.*;version=${jaxp-ri.version} - -Private-Package !* - -Import-Package !com.sun.java_cup.internal, \ - * - -Embed-Dependency jaxp-ri;inline=true diff --git a/jonas/modules/libraries/externals/monolog/pom.xml b/jonas/modules/libraries/externals/monolog/pom.xml deleted file mode 100644 index b40132500d999962e059ac63dbdc2ea2e5724131..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/monolog/pom.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - org.ow2.jonas.osgi - jonas-externals - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas.osgi - monolog - bundle - JOnAS :: Libraries :: Externals :: Monolog Pack - - - - org.objectweb.monolog - monolog - ${monolog.version} - - - \ No newline at end of file diff --git a/jonas/modules/libraries/externals/monolog/src/main/resources/META-INF/monolog.bnd b/jonas/modules/libraries/externals/monolog/src/main/resources/META-INF/monolog.bnd deleted file mode 100644 index 38d1917296da647fc35920957ebfa030cd6696f1..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/monolog/src/main/resources/META-INF/monolog.bnd +++ /dev/null @@ -1,49 +0,0 @@ -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 2007 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -# Empty export package list -Export-Package - -# FIXME Reduce exported packages list --exportcontents org.objectweb.util.monolog.api.*,\ - org.objectweb.util.monolog.file.*,\ - org.objectweb.util.monolog.wrapper.printwriter,\ - org.objectweb.util.monolog.wrapper.p6spy,\ - org.objectweb.util.monolog.wrapper.javaLog,\ - org.objectweb.util.monolog.wrapper.velocity,\ - org.objectweb.util.monolog - -# Just to clear some warnings -Private-Package !* - -# P6Spy and Log4J are optional -Import-Package com.p6spy.*;resolution:=optional,\ - org.apache.*;resolution:=optional,\ - org.objectweb.util.monolog.wrapper.log4jMini;resolution:=optional,\ - * - -Embed-Dependency monolog;inline=true - -# Allow to resolve P6Spy/Velocity and Log4J if bundles are provided after the start of the Monolog Bundle -DynamicImport-Package com.p6spy.*,\ - org.apache.* diff --git a/jonas/modules/libraries/externals/neethi/pom.xml b/jonas/modules/libraries/externals/neethi/pom.xml deleted file mode 100755 index b93364baf5d996624a8357ca3388b7c8f94f74ae..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/neethi/pom.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - org.ow2.jonas.osgi - jonas-externals - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas.osgi - neethi - bundle - JOnAS :: Libraries :: Externals :: Neethi - - - - 2.0.4 - 1.2.7 - - - - - org.apache.neethi - neethi - ${neethi.version} - - - - org.apache.ws.commons.axiom - axiom-api - ${axiom.version} - - - org.apache.ws.commons.axiom - axiom-impl - ${axiom.version} - - - diff --git a/jonas/modules/libraries/externals/neethi/src/main/resources/META-INF/neethi.bnd b/jonas/modules/libraries/externals/neethi/src/main/resources/META-INF/neethi.bnd deleted file mode 100755 index 330cc68cf200fdd96e1e90380789b3ec3c9cdbdb..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/neethi/src/main/resources/META-INF/neethi.bnd +++ /dev/null @@ -1,32 +0,0 @@ -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 2008-2009 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# --------------------------------------------------------------------------- -# $Id: javaee-api.bnd 13444 2008-03-28 15:57:28Z benoitf $ -# --------------------------------------------------------------------------- - -# List of packages exported by the bundle. -Export-Package org.apache.neethi.*;version=${neethi.version} - -Import-Package org.jaxen.*;resolution:=optional,\ - * - -# Axiom as Private-Package -Embed-Dependency axiom-api;inline=true,\ - axiom-impl;inline=true diff --git a/jonas/modules/libraries/externals/pom.xml b/jonas/modules/libraries/externals/pom.xml deleted file mode 100644 index 4b8a2784dc9bcc82143aa5976281b30e0ccc4ca7..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/pom.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - org.ow2.jonas - jonas-libraries - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas.osgi - jonas-externals - pom - JOnAS :: Libraries :: Externals - - - asm - javaee-api - jaxp-ri - saaj-ri - monolog - ws-security - neethi - xmlbeans - - - diff --git a/jonas/modules/libraries/externals/saaj-ri/pom.xml b/jonas/modules/libraries/externals/saaj-ri/pom.xml deleted file mode 100644 index b5d63d3d444a757275fe5efe905e710d85901ec5..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/saaj-ri/pom.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - org.ow2.jonas.osgi - jonas-externals - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas.osgi - saaj-ri - bundle - JOnAS :: Libraries :: Externals :: SAAJ-RI - - - 1.3.2 - - - - - com.sun.xml.messaging.saaj - saaj-impl - ${saaj-ri.version} - - - javax.xml.soap - saaj-api - - - - - org.apache.geronimo.specs - geronimo-saaj_1.3_spec - provided - - - javax.activation - activation - 1.1 - provided - - - - diff --git a/jonas/modules/libraries/externals/saaj-ri/src/main/java/com/sun/xml/messaging/saaj/client/p2p/HttpSOAPConnection.java b/jonas/modules/libraries/externals/saaj-ri/src/main/java/com/sun/xml/messaging/saaj/client/p2p/HttpSOAPConnection.java deleted file mode 100644 index 743b2fd3171435a1ef509ca9ad7dba0cde326684..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/saaj-ri/src/main/java/com/sun/xml/messaging/saaj/client/p2p/HttpSOAPConnection.java +++ /dev/null @@ -1,814 +0,0 @@ -/* - * The contents of this file are subject to the terms - * of the Common Development and Distribution License - * (the "License"). You may not use this file except - * in compliance with the License. - * - * You can obtain a copy of the license at - * https://jwsdp.dev.java.net/CDDLv1.0.html - * See the License for the specific language governing - * permissions and limitations under the License. - * - * When distributing Covered Code, include this CDDL - * HEADER in each file and include the License file at - * https://jwsdp.dev.java.net/CDDLv1.0.html If applicable, - * add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your - * own identifying information: Portions Copyright [yyyy] - * [name of copyright owner] - */ -/* - * $Id$ - * $Revision: 1.7 $ - * $Date: 2008/09/29 06:48:21 $ - */ - -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common Development - * and Distribution License("CDDL") (collectively, the "License"). You - * may not use this file except in compliance with the License. You can obtain - * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html - * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific - * language governing permissions and limitations under the License. - * - * When distributing the software, include this License Header Notice in each - * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt. - * Sun designates this particular file as subject to the "Classpath" exception - * as provided by Sun in the GPL Version 2 section of the License file that - * accompanied this code. If applicable, add the following below the License - * Header, with the fields enclosed by brackets [] replaced by your own - * identifying information: "Portions Copyrighted [year] - * [name of copyright owner]" - * - * Contributor(s): - * - * If you wish your version of this file to be governed by only the CDDL or - * only the GPL Version 2, indicate your decision by adding "[Contributor] - * elects to include this software in this distribution under the [CDDL or GPL - * Version 2] license." If you don't indicate a single choice of license, a - * recipient has the option to distribute your version of this file under - * either the CDDL, the GPL Version 2 or to extend the choice of license to - * its licensees as provided above. However, if you add GPL Version 2 code - * and therefore, elected the GPL Version 2 license, then the option applies - * only if the new code is made subject to such option by the copyright - * holder. - */ -package com.sun.xml.messaging.saaj.client.p2p; - -import com.sun.xml.messaging.saaj.SOAPExceptionImpl; -import com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl; -import com.sun.xml.messaging.saaj.util.Base64; -import com.sun.xml.messaging.saaj.util.ByteInputStream; -import com.sun.xml.messaging.saaj.util.JaxmURI; -import com.sun.xml.messaging.saaj.util.LogDomainConstants; -import com.sun.xml.messaging.saaj.util.ParseUtil; - -import javax.xml.soap.MessageFactory; -import javax.xml.soap.MimeHeader; -import javax.xml.soap.MimeHeaders; -import javax.xml.soap.SOAPConnection; -import javax.xml.soap.SOAPConstants; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.lang.reflect.Method; -import java.net.HttpURLConnection; -import java.net.MalformedURLException; -import java.net.URL; -import java.security.AccessController; -import java.security.PrivilegedExceptionAction; -import java.security.Provider; -import java.security.Security; -import java.util.Iterator; -import java.util.StringTokenizer; -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * This represents a "connection" to the simple HTTP-based provider. - * - * @author Anil Vijendran (akv@eng.sun.com) - * @author Rajiv Mordani (rajiv.mordani@sun.com) - * @author Manveen Kaur (manveen.kaur@sun.com) - * - */ -public class HttpSOAPConnection extends SOAPConnection { - - public static final String vmVendor = System.getProperty("java.vendor.url"); - private static final String sunVmVendor = "http://java.sun.com/"; - private static final String ibmVmVendor = "http://www.ibm.com/"; - private static final boolean isSunVM = sunVmVendor.equals(vmVendor) ? true: false; - private static final boolean isIBMVM = ibmVmVendor.equals(vmVendor) ? true : false; - private static final String JAXM_URLENDPOINT="javax.xml.messaging.URLEndpoint"; - - protected static final Logger log = - Logger.getLogger(LogDomainConstants.HTTP_CONN_DOMAIN, - "com.sun.xml.messaging.saaj.client.p2p.LocalStrings"); - - private static final String defaultProxyHost = null; - private static final int defaultProxyPort = -1; - - MessageFactory messageFactory = null; - - boolean closed = false; - - public HttpSOAPConnection() throws SOAPException { - proxyHost = defaultProxyHost; - proxyPort = defaultProxyPort; - - try { - messageFactory = MessageFactory.newInstance(SOAPConstants.DYNAMIC_SOAP_PROTOCOL); - } catch (NoSuchMethodError ex) { - //fallback to default SOAP 1.1 in this case for backward compatibility - messageFactory = MessageFactory.newInstance(); - } catch (Exception ex) { - log.log(Level.SEVERE, "SAAJ0001.p2p.cannot.create.msg.factory", ex); - throw new SOAPExceptionImpl("Unable to create message factory", ex); - } - } - - public void close() throws SOAPException { - if (closed) { - log.severe("SAAJ0002.p2p.close.already.closed.conn"); - throw new SOAPExceptionImpl("Connection already closed"); - } - - messageFactory = null; - closed = true; - } - - public SOAPMessage call(SOAPMessage message, Object endPoint) - throws SOAPException { - if (closed) { - log.severe("SAAJ0003.p2p.call.already.closed.conn"); - throw new SOAPExceptionImpl("Connection is closed"); - } - - Class urlEndpointClass = null; - ClassLoader loader = Thread.currentThread().getContextClassLoader(); - try { - if (loader != null) { - urlEndpointClass = loader.loadClass(JAXM_URLENDPOINT); - } else { - urlEndpointClass = Class.forName(JAXM_URLENDPOINT); - } - } catch (ClassNotFoundException ex) { - //Do nothing. URLEndpoint is available only when JAXM is there. - log.finest("SAAJ0090.p2p.endpoint.available.only.for.JAXM"); - } - - if (urlEndpointClass != null) { - if (urlEndpointClass.isInstance(endPoint)) { - String url = null; - - try { - Method m = urlEndpointClass.getMethod("getURL", (Class[])null); - url = (String) m.invoke(endPoint, (Object[])null); - } catch (Exception ex) { - // TBD -- exception chaining - log.log(Level.SEVERE,"SAAJ0004.p2p.internal.err",ex); - throw new SOAPExceptionImpl( - "Internal error: " + ex.getMessage()); - } - try { - endPoint = new URL(url); - } catch (MalformedURLException mex) { - log.log(Level.SEVERE,"SAAJ0005.p2p.", mex); - throw new SOAPExceptionImpl("Bad URL: " + mex.getMessage()); - } - } - } - - if (endPoint instanceof String) { - try { - endPoint = new URL((String) endPoint); - } catch (MalformedURLException mex) { - log.log(Level.SEVERE, "SAAJ0006.p2p.bad.URL", mex); - throw new SOAPExceptionImpl("Bad URL: " + mex.getMessage()); - } - } - - if (endPoint instanceof URL) - try { - PriviledgedPost pp = - new PriviledgedPost(this, message, (URL) endPoint); - SOAPMessage response = - (SOAPMessage) AccessController.doPrivileged(pp); - - return response; - } catch (Exception ex) { - // TBD -- chaining? - throw new SOAPExceptionImpl(ex); - } else { - log.severe("SAAJ0007.p2p.bad.endPoint.type"); - throw new SOAPExceptionImpl("Bad endPoint type " + endPoint); - } - } - - static class PriviledgedPost implements PrivilegedExceptionAction { - - HttpSOAPConnection c; - SOAPMessage message; - URL endPoint; - - PriviledgedPost( - HttpSOAPConnection c, - SOAPMessage message, - URL endPoint) { - this.c = c; - this.message = message; - this.endPoint = endPoint; - } - - public Object run() throws Exception { - return c.post(message, endPoint); - } - } - - // TBD - // Fix this to do things better. - - private String proxyHost = null; - - static class PriviledgedSetProxyAction implements PrivilegedExceptionAction { - - String proxyHost = null; - int proxyPort = 0; - - PriviledgedSetProxyAction(String host, int port) { - this.proxyHost = host; - this.proxyPort = port; - } - - public Object run() throws Exception { - System.setProperty("http.proxyHost", proxyHost); - System.setProperty("http.proxyPort", new Integer(proxyPort).toString()); - log.log(Level.FINE, "SAAJ0050.p2p.proxy.host", - new String[] { proxyHost }); - log.log(Level.FINE, "SAAJ0051.p2p.proxy.port", - new String[] { new Integer(proxyPort).toString() }); - return proxyHost; - } - } - - - public void setProxy(String host, int port) { - try { - proxyPort = port; - PriviledgedSetProxyAction ps = new PriviledgedSetProxyAction(host, port); - proxyHost = (String) AccessController.doPrivileged(ps); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - - public String getProxyHost() { - return proxyHost; - } - - private int proxyPort = -1; - - public int getProxyPort() { - return proxyPort; - } - - SOAPMessage post(SOAPMessage message, URL endPoint) throws SOAPException { - boolean isFailure = false; - - URL url = null; - HttpURLConnection httpConnection = null; - - int responseCode = 0; - try { - if (endPoint.getProtocol().equals("https")) - //if(!setHttps) - initHttps(); - // Process the URL - JaxmURI uri = new JaxmURI(endPoint.toString()); - String userInfo = uri.getUserinfo(); - - url = endPoint; - - if (dL > 0) - d("uri: " + userInfo + " " + url + " " + uri); - - // TBD - // Will deal with https later. - if (!url.getProtocol().equalsIgnoreCase("http") - && !url.getProtocol().equalsIgnoreCase("https")) { - log.severe("SAAJ0052.p2p.protocol.mustbe.http.or.https"); - throw new IllegalArgumentException( - "Protocol " - + url.getProtocol() - + " not supported in URL " - + url); - } - httpConnection = (HttpURLConnection) createConnection(url); - - httpConnection.setRequestMethod("POST"); - - httpConnection.setDoOutput(true); - httpConnection.setDoInput(true); - httpConnection.setUseCaches(false); - HttpURLConnection.setFollowRedirects(true); - - if (message.saveRequired()) - message.saveChanges(); - - MimeHeaders headers = message.getMimeHeaders(); - - // JOnAS Start Change - // ------------------------------------------------------------- - // If there is still no SOAPAction header just before writing the - // SOAPMessage, add a default one (only for SOAP 1.1). - // ------------------------------------------------------------- - if(message instanceof Message1_1Impl) { - if (headers.getHeader("SOAPAction") == null) { - // Set the default SOAPAction header: "" - headers.addHeader("SOAPAction", "\"\""); - } - } - // ------------------------------------------------------------- - // JOnAS End Change - - Iterator it = headers.getAllHeaders(); - boolean hasAuth = false; // true if we find explicit Auth header - while (it.hasNext()) { - MimeHeader header = (MimeHeader) it.next(); - - String[] values = headers.getHeader(header.getName()); - - if (values.length == 1) - httpConnection.setRequestProperty( - header.getName(), - header.getValue()); - else { - StringBuffer concat = new StringBuffer(); - int i = 0; - while (i < values.length) { - if (i != 0) - concat.append(','); - concat.append(values[i]); - i++; - } - - httpConnection.setRequestProperty( - header.getName(), - concat.toString()); - } - - if ("Authorization".equals(header.getName())) { - hasAuth = true; - log.fine("SAAJ0091.p2p.https.auth.in.POST.true"); - } - } - - if (!hasAuth && userInfo != null) { - initAuthUserInfo(httpConnection, userInfo); - } - - OutputStream out = httpConnection.getOutputStream(); - message.writeTo(out); - - out.flush(); - out.close(); - - httpConnection.connect(); - - try { - - responseCode = httpConnection.getResponseCode(); - - // let HTTP_INTERNAL_ERROR (500) through because it is used for SOAP faults - if (responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR) { - isFailure = true; - } - //else if (responseCode != HttpURLConnection.HTTP_OK) - //else if (!(responseCode >= HttpURLConnection.HTTP_OK && responseCode < 207)) - else if ((responseCode / 100) != 2) { - log.log(Level.SEVERE, - "SAAJ0008.p2p.bad.response", - new String[] {httpConnection.getResponseMessage()}); - throw new SOAPExceptionImpl( - "Bad response: (" - + responseCode - + httpConnection.getResponseMessage()); - - } - } catch (IOException e) { - // on JDK1.3.1_01, we end up here, but then getResponseCode() succeeds! - responseCode = httpConnection.getResponseCode(); - if (responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR) { - isFailure = true; - } else { - throw e; - } - - } - - } catch (SOAPException ex) { - throw ex; - } catch (Exception ex) { - log.severe("SAAJ0009.p2p.msg.send.failed"); - throw new SOAPExceptionImpl("Message send failed", ex); - } - - SOAPMessage response = null; - if (responseCode == HttpURLConnection.HTTP_OK || isFailure) { - try { - MimeHeaders headers = new MimeHeaders(); - - String key, value; - - // Header field 0 is the status line so we skip it. - - int i = 1; - - while (true) { - key = httpConnection.getHeaderFieldKey(i); - value = httpConnection.getHeaderField(i); - - if (key == null && value == null) - break; - - if (key != null) { - StringTokenizer values = - new StringTokenizer(value, ","); - while (values.hasMoreTokens()) - headers.addHeader(key, values.nextToken().trim()); - } - i++; - } - - InputStream httpIn = - (isFailure - ? httpConnection.getErrorStream() - : httpConnection.getInputStream()); - - byte[] bytes = readFully(httpIn); - - int length = - httpConnection.getContentLength() == -1 - ? bytes.length - : httpConnection.getContentLength(); - - // If no reply message is returned, - // content-Length header field value is expected to be zero. - if (length == 0) { - response = null; - log.warning("SAAJ0014.p2p.content.zero"); - } else { - ByteInputStream in = new ByteInputStream(bytes, length); - response = messageFactory.createMessage(headers, in); - } - - httpIn.close(); - httpConnection.disconnect(); - - } catch (SOAPException ex) { - throw ex; - } catch (Exception ex) { - log.log(Level.SEVERE,"SAAJ0010.p2p.cannot.read.resp", ex); - throw new SOAPExceptionImpl( - "Unable to read response: " + ex.getMessage()); - } - } - return response; - } - - // Object identifies where the request should be sent. - // It is required to support objects of type String and java.net.URL. - - public SOAPMessage get(Object endPoint) throws SOAPException { - if (closed) { - log.severe("SAAJ0011.p2p.get.already.closed.conn"); - throw new SOAPExceptionImpl("Connection is closed"); - } - Class urlEndpointClass = null; - - try { - urlEndpointClass = Class.forName("javax.xml.messaging.URLEndpoint"); - } catch (Exception ex) { - //Do nothing. URLEndpoint is available only when JAXM is there. - } - - if (urlEndpointClass != null) { - if (urlEndpointClass.isInstance(endPoint)) { - String url = null; - - try { - Method m = urlEndpointClass.getMethod("getURL", (Class[])null); - url = (String) m.invoke(endPoint, (Object[])null); - } catch (Exception ex) { - log.severe("SAAJ0004.p2p.internal.err"); - throw new SOAPExceptionImpl( - "Internal error: " + ex.getMessage()); - } - try { - endPoint = new URL(url); - } catch (MalformedURLException mex) { - log.severe("SAAJ0005.p2p."); - throw new SOAPExceptionImpl("Bad URL: " + mex.getMessage()); - } - } - } - - if (endPoint instanceof String) { - try { - endPoint = new URL((String) endPoint); - } catch (MalformedURLException mex) { - log.severe("SAAJ0006.p2p.bad.URL"); - throw new SOAPExceptionImpl("Bad URL: " + mex.getMessage()); - } - } - - if (endPoint instanceof URL) - try { - PriviledgedGet pg = new PriviledgedGet(this, (URL) endPoint); - SOAPMessage response = - (SOAPMessage) AccessController.doPrivileged(pg); - - return response; - } catch (Exception ex) { - throw new SOAPExceptionImpl(ex); - } else - throw new SOAPExceptionImpl("Bad endPoint type " + endPoint); - } - - static class PriviledgedGet implements PrivilegedExceptionAction { - - HttpSOAPConnection c; - URL endPoint; - - PriviledgedGet(HttpSOAPConnection c, URL endPoint) { - this.c = c; - this.endPoint = endPoint; - } - - public Object run() throws Exception { - return c.get(endPoint); - } - } - - SOAPMessage get(URL endPoint) throws SOAPException { - boolean isFailure = false; - - URL url = null; - HttpURLConnection httpConnection = null; - - int responseCode = 0; - try { - /// Is https GET allowed?? - if (endPoint.getProtocol().equals("https")) - initHttps(); - // Process the URL - JaxmURI uri = new JaxmURI(endPoint.toString()); - String userInfo = uri.getUserinfo(); - - url = endPoint; - - if (dL > 0) - d("uri: " + userInfo + " " + url + " " + uri); - - // TBD - // Will deal with https later. - if (!url.getProtocol().equalsIgnoreCase("http") - && !url.getProtocol().equalsIgnoreCase("https")) { - log.severe("SAAJ0052.p2p.protocol.mustbe.http.or.https"); - throw new IllegalArgumentException( - "Protocol " - + url.getProtocol() - + " not supported in URL " - + url); - } - httpConnection = (HttpURLConnection) createConnection(url); - - httpConnection.setRequestMethod("GET"); - - httpConnection.setDoOutput(true); - httpConnection.setDoInput(true); - httpConnection.setUseCaches(false); - HttpURLConnection.setFollowRedirects(true); - - httpConnection.connect(); - - try { - - responseCode = httpConnection.getResponseCode(); - - // let HTTP_INTERNAL_ERROR (500) through because it is used for SOAP faults - if (responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR) { - isFailure = true; - } else if ((responseCode / 100) != 2) { - log.log(Level.SEVERE, - "SAAJ0008.p2p.bad.response", - new String[] { httpConnection.getResponseMessage()}); - throw new SOAPExceptionImpl( - "Bad response: (" - + responseCode - + httpConnection.getResponseMessage()); - - } - } catch (IOException e) { - // on JDK1.3.1_01, we end up here, but then getResponseCode() succeeds! - responseCode = httpConnection.getResponseCode(); - if (responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR) { - isFailure = true; - } else { - throw e; - } - - } - - } catch (SOAPException ex) { - throw ex; - } catch (Exception ex) { - log.severe("SAAJ0012.p2p.get.failed"); - throw new SOAPExceptionImpl("Get failed", ex); - } - - SOAPMessage response = null; - if (responseCode == HttpURLConnection.HTTP_OK || isFailure) { - try { - MimeHeaders headers = new MimeHeaders(); - - String key, value; - - // Header field 0 is the status line so we skip it. - - int i = 1; - - while (true) { - key = httpConnection.getHeaderFieldKey(i); - value = httpConnection.getHeaderField(i); - - if (key == null && value == null) - break; - - if (key != null) { - StringTokenizer values = - new StringTokenizer(value, ","); - while (values.hasMoreTokens()) - headers.addHeader(key, values.nextToken().trim()); - } - i++; - } - - InputStream httpIn = - (isFailure - ? httpConnection.getErrorStream() - : httpConnection.getInputStream()); - - byte[] bytes = readFully(httpIn); - - int length = - httpConnection.getContentLength() == -1 - ? bytes.length - : httpConnection.getContentLength(); - - // If no reply message is returned, - // content-Length header field value is expected to be zero. - if (length == 0) { - response = null; - log.warning("SAAJ0014.p2p.content.zero"); - } else { - - ByteInputStream in = new ByteInputStream(bytes, length); - response = messageFactory.createMessage(headers, in); - } - - httpIn.close(); - httpConnection.disconnect(); - - } catch (SOAPException ex) { - throw ex; - } catch (Exception ex) { - log.log(Level.SEVERE, - "SAAJ0010.p2p.cannot.read.resp", - ex); - throw new SOAPExceptionImpl( - "Unable to read response: " + ex.getMessage()); - } - } - return response; - } - - private byte[] readFully(InputStream istream) throws IOException { - ByteArrayOutputStream bout = new ByteArrayOutputStream(); - byte[] buf = new byte[1024]; - int num = 0; - - while ((num = istream.read(buf)) != -1) { - bout.write(buf, 0, num); - } - - byte[] ret = bout.toByteArray(); - - return ret; - } - - //private static String SSL_PKG = "com.sun.net.ssl.internal.www.protocol"; - //private static String SSL_PROVIDER = - // "com.sun.net.ssl.internal.ssl.Provider"; - private static final String SSL_PKG; - private static final String SSL_PROVIDER; - - static { - if (isIBMVM) { - SSL_PKG ="com.ibm.net.ssl.internal.www.protocol"; - SSL_PROVIDER ="com.ibm.net.ssl.internal.ssl.Provider"; - } else { - //if not IBM VM default to Sun. - SSL_PKG = "com.sun.net.ssl.internal.www.protocol"; - SSL_PROVIDER ="com.sun.net.ssl.internal.ssl.Provider"; - } - } - - private void initHttps() { - //if(!setHttps) { - String pkgs = System.getProperty("java.protocol.handler.pkgs"); - log.log(Level.FINE, - "SAAJ0053.p2p.providers", - new String[] { pkgs }); - - if (pkgs == null || pkgs.indexOf(SSL_PKG) < 0) { - if (pkgs == null) - pkgs = SSL_PKG; - else - pkgs = pkgs + "|" + SSL_PKG; - System.setProperty("java.protocol.handler.pkgs", pkgs); - log.log(Level.FINE, - "SAAJ0054.p2p.set.providers", - new String[] { pkgs }); - try { - Class c = Class.forName(SSL_PROVIDER); - Provider p = (Provider) c.newInstance(); - Security.addProvider(p); - log.log(Level.FINE, - "SAAJ0055.p2p.added.ssl.provider", - new String[] { SSL_PROVIDER }); - //System.out.println("Added SSL_PROVIDER " + SSL_PROVIDER); - //setHttps = true; - } catch (Exception ex) { - } - } - //} - } - - private void initAuthUserInfo(HttpURLConnection conn, String userInfo) { - String user; - String password; - if (userInfo != null) { // get the user and password - //System.out.println("UserInfo= " + userInfo ); - int delimiter = userInfo.indexOf(':'); - if (delimiter == -1) { - user = ParseUtil.decode(userInfo); - password = null; - } else { - user = ParseUtil.decode(userInfo.substring(0, delimiter++)); - password = ParseUtil.decode(userInfo.substring(delimiter)); - } - - String plain = user + ":"; - byte[] nameBytes = plain.getBytes(); - byte[] passwdBytes = password.getBytes(); - - // concatenate user name and password bytes and encode them - byte[] concat = new byte[nameBytes.length + passwdBytes.length]; - - System.arraycopy(nameBytes, 0, concat, 0, nameBytes.length); - System.arraycopy( - passwdBytes, - 0, - concat, - nameBytes.length, - passwdBytes.length); - String auth = "Basic " + new String(Base64.encode(concat)); - conn.setRequestProperty("Authorization", auth); - if (dL > 0) - d("Adding auth " + auth); - } - } - - private static final int dL = 0; - private void d(String s) { - log.log(Level.SEVERE, - "SAAJ0013.p2p.HttpSOAPConnection", - new String[] { s }); - System.err.println("HttpSOAPConnection: " + s); - } - - private HttpURLConnection createConnection(URL endpoint) - throws IOException { - return (HttpURLConnection) endpoint.openConnection(); - } - -} \ No newline at end of file diff --git a/jonas/modules/libraries/externals/saaj-ri/src/main/resources/META-INF/saaj-ri.bnd b/jonas/modules/libraries/externals/saaj-ri/src/main/resources/META-INF/saaj-ri.bnd deleted file mode 100644 index f3d9d4498b07a67925cb7846cbee9157528f3e4f..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/saaj-ri/src/main/resources/META-INF/saaj-ri.bnd +++ /dev/null @@ -1,30 +0,0 @@ -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 2008 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# --------------------------------------------------------------------------- -# $Id: javaee-api.bnd 13444 2008-03-28 15:57:28Z benoitf $ -# --------------------------------------------------------------------------- - -Import-Package !com.sun.*, \ - !org.jvnet.fastinfoset, \ - * - - -# List of packages exported by the bundle. -Export-Package com.sun.xml.messaging.saaj.*;version=${saaj-ri.version};-split-package:=merge-first diff --git a/jonas/modules/libraries/externals/ws-security/pom.xml b/jonas/modules/libraries/externals/ws-security/pom.xml deleted file mode 100644 index 4d867b366bff7b864531e0c36708768c41d4902e..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/ws-security/pom.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - org.ow2.jonas.osgi - jonas-externals - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas.osgi - ws-security - bundle - JOnAS :: Libraries :: Externals :: WS-Security - - - - xfire - opensaml - 1.0.1 - - - xml-security - xmlsec - 1.3.0 - - - org.apache.axis - addressing - 1.0 - - - wss4j - wss4j - 1.1.0-jonas-patch - - - bouncycastle - bcprov-jdk15 - 136 - - - \ No newline at end of file diff --git a/jonas/modules/libraries/externals/ws-security/src/main/resources/META-INF/ws-security.bnd b/jonas/modules/libraries/externals/ws-security/src/main/resources/META-INF/ws-security.bnd deleted file mode 100644 index 609462a3e806b5fde7a8e3a74fe5cc2186383d51..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/ws-security/src/main/resources/META-INF/ws-security.bnd +++ /dev/null @@ -1,40 +0,0 @@ -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 2007 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -# Export class from boucycastle because the jar contains also other files to not include -Export-Package org.bouncycastle.* - -Import-Package javax.xml.transform,\ - org.apache.xpath,\ - org.apache.xpath.compiler,\ - org.apache.xpath.functions,\ - org.apache.xpath.objects,\ - org.apache.xml.utils,\ - *;resolution:=optional - -Private-Package !* - --exportcontents org.apache.ws.security,\ - org.apache.ws.security.handler - -Embed-Dependency *;scope=compile|runtime;inline=true;artifactId=!bcprov-jdk15 \ No newline at end of file diff --git a/jonas/modules/libraries/externals/xmlbeans/pom.xml b/jonas/modules/libraries/externals/xmlbeans/pom.xml deleted file mode 100644 index ec5a7f4d92fec281f6096aca66c43e41e8e47189..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/xmlbeans/pom.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - org.ow2.jonas.osgi - jonas-externals - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas.osgi - xmlbeans - bundle - JOnAS :: Libraries :: Externals :: XmlBeans - - - 2.4.0 - - - - - org.apache.xmlbeans - xmlbeans - ${xmlbeans.version} - - - - diff --git a/jonas/modules/libraries/externals/xmlbeans/src/main/resources/META-INF/xmlbeans.bnd b/jonas/modules/libraries/externals/xmlbeans/src/main/resources/META-INF/xmlbeans.bnd deleted file mode 100644 index 94e30368bea6c65c0418740b0d484df0459e48ab..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/externals/xmlbeans/src/main/resources/META-INF/xmlbeans.bnd +++ /dev/null @@ -1,34 +0,0 @@ -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 2009 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# --------------------------------------------------------------------------- -# $Id: javaee-api.bnd 13444 2008-03-28 15:57:28Z benoitf $ -# --------------------------------------------------------------------------- - --exportcontents org.apache.xmlbeans.*;version=${xmlbeans.version} - -Import-Package !com.sun.*,\ - !org.apache.tools.ant.*,\ - !org.apache.xml.resolver.*,\ - org.w3c.dom,\ - * - -Private-Package !* - -Embed-Dependency xmlbeans;inline=true diff --git a/jonas/modules/libraries/jonas-audit-jms/pom.xml b/jonas/modules/libraries/jonas-audit-jms/pom.xml deleted file mode 100644 index 7600a8f6c3dd53896906cb8389f4b9b011d986a2..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-audit-jms/pom.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - org.ow2.jonas - jonas-libraries - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas - jonas-audit-jms - bundle - JOnAS :: Libraries :: JOnAS Audit JMS interceptor - - - - org.objectweb.joram - joram-client-jms - ${joram.version} - provided - - - org.ow2.bundles - ow2-audit-report - ${ow2-bundles.version} - provided - - - diff --git a/jonas/modules/libraries/jonas-audit-jms/src/main/java/org/ow2/jonas/audit/jms/interceptor/JMSClientInterceptor.java b/jonas/modules/libraries/jonas-audit-jms/src/main/java/org/ow2/jonas/audit/jms/interceptor/JMSClientInterceptor.java deleted file mode 100644 index 9191627d6186cbbe997cdb94c71fc8a792101308..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-audit-jms/src/main/java/org/ow2/jonas/audit/jms/interceptor/JMSClientInterceptor.java +++ /dev/null @@ -1,78 +0,0 @@ -/** - * JOnAS - * Copyright (C) 2010 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.audit.jms.interceptor; - -import javax.jms.JMSException; -import javax.jms.Message; -import javax.jms.Session; - -import org.objectweb.joram.client.jms.MessageInterceptor; -import org.ow2.util.auditreport.api.IAuditID; -import org.ow2.util.auditreport.api.ICurrentInvocationID; -import org.ow2.util.auditreport.impl.CurrentInvocationID; -import org.ow2.util.log.Log; -import org.ow2.util.log.LogFactory; - -/** - * Client Interceptor. - * @author Florent Benoit - */ -public class JMSClientInterceptor implements MessageInterceptor { - - /** - * Logger. - */ - private Log logger = LogFactory.getLog(JMSClientInterceptor.class); - - /** - * Handle the given message. - * @param msg the given message - * @param session the JMS Session - */ - public void handle(final Message msg, final Session session) { - - // Get current ID - ICurrentInvocationID currentInvocationID = CurrentInvocationID.getInstance(); - - // Existing ID ? - IAuditID localID = currentInvocationID.getAuditID(); - - // If there is an ID, propagate it - if (localID != null) { - localID.increment(); - - // Store it in the message - try { - msg.setStringProperty(IAuditID.class.getName(), localID.getID()); - } catch (JMSException e) { - // Unable to set the property - logger.warn("Unable to set the property ''{0}'' on the message", IAuditID.class.getName(), e); - } - - } - } - -} diff --git a/jonas/modules/libraries/jonas-audit-jms/src/main/resources/META-INF/jonas-audit-jms.bnd b/jonas/modules/libraries/jonas-audit-jms/src/main/resources/META-INF/jonas-audit-jms.bnd deleted file mode 100644 index 6ea4771d179d7bbafa9cce1e30618f5178cc7310..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-audit-jms/src/main/resources/META-INF/jonas-audit-jms.bnd +++ /dev/null @@ -1,24 +0,0 @@ -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 2010 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -Export-Package org.ow2.jonas.audit.jms.interceptor diff --git a/jonas/modules/libraries/jonas-bootstrap-loader/pom.xml b/jonas/modules/libraries/jonas-bootstrap-loader/pom.xml deleted file mode 100644 index 696fb19debeadb532d73a52dba3fec4973bc46e4..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-bootstrap-loader/pom.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - org.ow2.jonas - jonas-libraries - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas - jonas-bootstrap-loader - - bundle - - JOnAS :: Libraries :: Bootstrap :: Loader - - - - diff --git a/jonas/modules/libraries/jonas-bootstrap-loader/src/main/java/org/ow2/jonas/lib/bootstrap/loader/JClassLoader.java b/jonas/modules/libraries/jonas-bootstrap-loader/src/main/java/org/ow2/jonas/lib/bootstrap/loader/JClassLoader.java deleted file mode 100644 index fc9db55eefd6e7a0524fc30632b768c3ec914395..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-bootstrap-loader/src/main/java/org/ow2/jonas/lib/bootstrap/loader/JClassLoader.java +++ /dev/null @@ -1,204 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id:JClassLoader.java 10822 2007-07-04 08:26:06Z durieuxp $ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.bootstrap.loader; - -import java.io.File; -import java.net.URL; -import java.net.URLClassLoader; - -/** - * This class implements a URLClassLoader, that permits to add some URLs in it. - * @author Ludovic Bert - * @author Florent Benoit - */ -public class JClassLoader extends URLClassLoader { - - /** - * JClassLoader name - */ - private String name = null; - - /** - * Need to recompute toString() value ? (urls have changed) - * True by default (not done). - * Then, compute is done only when required and if needed - */ - private boolean recomputeToString = true; - - /** - * Need to recompute getClassPath() value ? (urls have changed) - * True by default (not done). - * Then, compute is done only when required and if needed - */ - private boolean recomputeClassPath = true; - - /** - * String representation used by toString() method - */ - private String toStringValue = null; - - /** - * Classpath value - */ - private String classpath = null; - - /** - * Constructs a new ClassLoader with the specified URLs. - * @param name ClassLoader name (used for Display) - * @param urls the URLs to add at the ClassLoader creation. - * @param parent parent ClassLoader, null if no parent. - */ - public JClassLoader(String name, URL[] urls, ClassLoader parent) { - super(urls, parent); - this.name = name; - this.recomputeToString = true; - this.recomputeClassPath = true; - } - - /** - * Constructs a new ClassLoader with the specified URLs. - * Uses the default delegation parent classloader. - * @param name ClassLoader name (used for Display) - * @param urls the URLs to add at the ClassLoader creation. - */ - public JClassLoader(String name, URL[] urls) { - super(urls, Thread.currentThread().getContextClassLoader()); - this.name = name; - this.recomputeToString = true; - this.recomputeClassPath = true; - } - - /** - * Add the specified URL to this ClassLoader. - * @param url the URL to add to this ClassLoader. - */ - public void addURL(URL url) { - if (url != null) { - super.addURL(url); - } - this.recomputeToString = true; - this.recomputeClassPath = true; - } - - /** - * Add the specified URLs to this ClassLoader. - * @param urls the URLs to add to this ClassLoader. - */ - public void addURLs(URL[] urls) { - if (urls != null) { - for (int i = 0; i < urls.length; i++) { - if (urls[i] != null) { - super.addURL(urls[i]); - } - } - } - this.recomputeToString = true; - this.recomputeClassPath = true; - } - - /** - * Display all the URLs from the class loader - */ - public void printURLs() { - System.out.println(name + " ClassLoader :"); - URL[] urls = super.getURLs(); - for (int i = 0; i < urls.length; i++) { - System.out.println("url=" + (new File(urls[i].getFile())).getAbsolutePath()); - } - // display parent classloader - if (getParent() != null && getParent() instanceof JClassLoader) { - System.out.println("parent :"); - ((JClassLoader) getParent()).printURLs(); - } - } - - /** - * Get the class path of this classloader - * @return the class path of this classloader - */ - public String getClassPath() { - // urls have changed, need to build value - if (recomputeClassPath) { - computeClassPath(); - } - return classpath; - } - - /** - * Displays useful information - * @return information - */ - public String toString() { - // urls have changed, need to build value - if (recomputeToString) { - computeToString(); - } - return toStringValue; - } - - /** - * Compute a string representation used by toString() method - */ - private void computeToString() { - StringBuffer sb = new StringBuffer(); - sb.append(this.getClass().getName()); - sb.append("["); - sb.append(name); - sb.append(", urls="); - URL[] urls = getURLs(); - for (int u = 0; u < urls.length; u++) { - sb.append(urls[u]); - if (u != urls.length - 1) { - sb.append(";"); - } - } - sb.append("]"); - toStringValue = sb.toString(); - - // value is updated, no need to do it again. - recomputeToString = false; - } - - /** - * Compute classpath value - */ - private void computeClassPath() { - String cp = ""; - // add parent classpath before - if (getParent() != null && getParent() instanceof JClassLoader) { - cp += ((JClassLoader) getParent()).getClassPath(); - } - URL[] urls = super.getURLs(); - for (int i = 0; i < urls.length; i++) { - cp = cp + File.pathSeparator + (new File(urls[i].getFile())).getAbsolutePath(); - } - classpath = cp; - // update value - recomputeClassPath = false; - } - - -} diff --git a/jonas/modules/libraries/jonas-bootstrap-loader/src/main/resources/META-INF/jonas-bootstrap-loader.bnd b/jonas/modules/libraries/jonas-bootstrap-loader/src/main/resources/META-INF/jonas-bootstrap-loader.bnd deleted file mode 100644 index e6f4e4ce1b823aaf84e236ba09310f56e217c4d7..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-bootstrap-loader/src/main/resources/META-INF/jonas-bootstrap-loader.bnd +++ /dev/null @@ -1,25 +0,0 @@ -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 2008 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -Import-Package !* -Export-Package org.ow2.jonas.lib.bootstrap.loader diff --git a/jonas/modules/libraries/jonas-commons/pom.xml b/jonas/modules/libraries/jonas-commons/pom.xml deleted file mode 100644 index 38022ed4be28af4d24bfbe145b9c492e3af1cbd5..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/pom.xml +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - org.ow2.jonas - jonas-libraries - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas - jonas-commons - bundle - JOnAS :: Libraries :: Commons - - - org.ow2.carol - carol - provided - - - org.ow2.jonas - jonas-version - ${project.version} - - - org.ow2.jonas - jonas-services-api - ${project.version} - - - org.ow2.jonas.osgi - javaee-api - ${project.version} - compile - - - org.objectweb.monolog - monolog-api - ${monolog.version} - - - org.objectweb.monolog - monolog-core - ${monolog.version} - - - org.objectweb.monolog - monolog-wrapper-p6spy - ${monolog.version} - - - org.ow2.bundles - ow2-util-log - - - - - p6spy - p6spy - - - org.ow2.bundles - ow2-util-file - - - org.ow2.bundles - ow2-util-url - - - org.ow2.bundles - ow2-util-xmlconfig - ${ow2-bundles.version} - provided - - - org.ow2.jonas - jonas-bootstrap-loader - ${project.version} - - - org.ow2.jonas - jonas-management-javaee - ${project.version} - provided - - - org.testng - testng - test - - - org.hamcrest - hamcrest-all - 1.1 - test - - - diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/bootstrap/Bootstrap.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/bootstrap/Bootstrap.java deleted file mode 100644 index 15cc5eb26e35e763bcb0813fda0c0f6191c19ad6..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/bootstrap/Bootstrap.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id:Bootstrap.java 10822 2007-07-04 08:26:06Z durieuxp $ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.bootstrap; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import org.ow2.jonas.lib.bootstrap.loader.JClassLoader; - - -/** - * This class load all the jars needed to start JOnAS and after this, it launch - * the JOnAS server (Server class). - * @author Ludovic Bert (initial developer) - * @author Florent Benoit (initial developer) - * @author Philippe Durieux (new jonas jar files architecture) - */ -public class Bootstrap { - - /** - * Required JVM version - */ - private static final String REQUIRED_JVM_VERSION = "1.5"; - - /** - * Empty, private Constructor for Utility Class - */ - private Bootstrap() { - } - - /** - * Server main routine (Load all the jars needed to start jonas) - * @param args the list of the args to give to the bootstrap class. - */ - public static void main(final String[] args) { - String classToRun = args[0]; - - // JDK 1.5 or higher is required - String specVersion = System.getProperty("java.specification.version"); - if (specVersion.compareTo(REQUIRED_JVM_VERSION) < 0) { - String implVersion = System.getProperty("java.vm.version"); - System.err.println("A '" + REQUIRED_JVM_VERSION + "' JVM version or higher is required for JOnAS. Current JVM implementation version is '" - + implVersion + "' with specification '" + specVersion + "'"); - System.exit(0); - } - - try { - - LoaderManager lm = LoaderManager.getInstance(); - JClassLoader jonasLoader = null; - - jonasLoader = lm.getExternalLoader(); - - Thread.currentThread().setContextClassLoader(jonasLoader); - - //jonasLoader.printURLs(); // DEBUG - - // Launch the "class_to_run" by using our classloader. - Class clazz = jonasLoader.loadClass(classToRun); - Class[] argList = new Class[] {args.getClass()}; - Method meth = clazz.getMethod("main", argList); - String[] newArgs = new String[args.length - 1]; - System.arraycopy(args, 1, newArgs, 0, newArgs.length); - meth.invoke(null, new Object[] {newArgs}); - } catch (InvocationTargetException ite) { - Throwable t = ite.getTargetException(); - String message = t.getMessage(); - if (t instanceof Error) { - System.err.println("Error during execution of " + classToRun + " : " + message); - } else if (t instanceof Exception) { - System.err.println("Exception during execution of " + classToRun + " : " + message); - } - t.printStackTrace(System.err); - System.exit(2); - } catch (Exception e) { - System.err.println(classToRun + " reflection error : " + e); - e.printStackTrace(); - System.exit(2); - } - } -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/bootstrap/JFileFilter.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/bootstrap/JFileFilter.java deleted file mode 100644 index 84afef4b1d73f9f79d427466defcbf95fe380ef6..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/bootstrap/JFileFilter.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Florent BENOIT & Ludovic BERT - * -------------------------------------------------------------------------- - * $Id:JFileFilter.java 10822 2007-07-04 08:26:06Z durieuxp $ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.bootstrap; - -//import java -import java.util.StringTokenizer; -import java.io.File; -import java.io.FileFilter; - -/** - * This class implements a FileFilter, used to list files of a directory. - * @author Ludovic Bert - * @author Florent Benoit - */ -public class JFileFilter implements FileFilter { - - /** - * The extensions that match in the file filter. - */ - private String[] extensions = null; - - /** - * Contruct a new JFileFilter with the specified filter. - * @param filter the filter to use. A comma-separated list of the allowed - * extensions. For instance ".jar,.dtd", note that ".*" is allowed. - */ - public JFileFilter(String filter) { - StringTokenizer st = new StringTokenizer(filter, ","); - int tokenCount = st.countTokens(); - extensions = new String[tokenCount]; - for (int i = 0; i < tokenCount; i++) { - extensions[i] = st.nextToken(); - } - } - - /** - * Tests whether or not the specified abstract pathname should be included - * in a pathname list. - * @param pathname the abstract pathname to be tested. - * @return true if and only if pathname should be included. - */ - public boolean accept(File pathname) { - if (pathname.isDirectory()) { - return true; - } else { - for (int i = 0; i < extensions.length; i++) { - if (extensions[i].equals(".*")) { - return true; - } else { - if (pathname.getName().endsWith(extensions[i])) { - return true; - } - } - } - return false; - } - } -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/bootstrap/JProp.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/bootstrap/JProp.java deleted file mode 100644 index c74f6eb36c0e2c9ae52bb1f3c049fc471d052a41..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/bootstrap/JProp.java +++ /dev/null @@ -1,747 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): ____________________________________. - * Contributor(s): Adriana Danes - * - * -------------------------------------------------------------------------- - * $Id:JProp.java 10822 2007-07-04 08:26:06Z durieuxp $ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.lib.bootstrap; - -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.FileWriter; -import java.io.IOException; -import java.util.Enumeration; -import java.util.Hashtable; -import java.util.Properties; -import java.util.StringTokenizer; - -import javax.naming.Context; - -import org.ow2.jonas.lib.util.ConfigurationConstants; -import org.ow2.jonas.properties.ServerProperties; - - -/** - * This class manages configuration properties for a JOnAS Server. - * It adopts the singleton design-pattern. Configuration parameters - * are read from .properties file (jonas.properties or resource.properties). - * In order to support dynamically created resources, JProp also allows for - * a .properties file generation using a java.lang.Properties object content - * @author jonas-team - * @author Adriana Danes - * @author Florent Benoit - *
      - *
    • - * ../03/2003 Adriana Danes - *
        - *
      1. Manage unique instances for resource.properties - *
      2. Replace 'config' with 'conf' - *
      3. Change initial configuration policy : read properties file in a sole location : JONAS_BASE/CONFIG_DIR/ - *
      4. Replace method name getFilesEnv to getConfigFileEnv - *
      - *
    • - * 05/05/2003 Adriana Danes. Support JProp instance creation for dynamically created resources. - *
    - * 05/2003 Florent Benoit. Add support of xml files and checkstyle - */ -public class JProp implements ServerProperties { - - /** - * Domain name. - */ - public static final String DOMAIN_NAME = "domain.name"; - - /** - * -Djonas.base property. - */ - public static final String JONAS_BASE = "jonas.base"; - - /** - * jonas.master property. - */ - public static final String JONAS_MASTER = "jonas.master"; - - /** - * jonas.development property. - */ - public static final String JONAS_DEVELOPMENT = "jonas.development"; - - /** - * configuration directory name. - */ - private static final String CONFIG_DIR = "conf"; - - /** - * Repositories directory name. - */ - private static final String REPOSITORIES_DIR = "repositories"; - - /** - * System properties. - */ - private static Properties systEnv = System.getProperties(); - - /** - * JONAS_ROOT. - */ - private static String jonasRoot = systEnv.getProperty("jonas.root"); - - /** - * JONAS_BASE. - */ - private static String jonasBase = systEnv.getProperty(JONAS_BASE); - - /** - * Separator of file. - */ - private static String fileSeparator = systEnv.getProperty("file.separator"); - - /** - * Content of the file (xml). - */ - private String configFileXml = null; - - /** - * Content of a text file (may be a .properties file. - */ - private String versionFileContent = null; - - /** - * Properties of the config file. - */ - private Properties configFileEnv = new Properties(); - - /** - * System properties + properties of the file. - */ - private Properties allEnv = null; - - /** - * Name of the property file. - */ - private String propFileName = null; - - /** - * The JProp singleton for jonas.properties file. - */ - private static JProp unique = null; - - /** - * The multiple JProp objects for the resources configuration files (resource.properties) - * the keys are the configuration file names and the values, the JProp objects. - */ - private static Hashtable multiple = new Hashtable(); - - /** - * Default master value. - */ - private boolean master = false; - - /** - * Default execution mode value set to development. - */ - private boolean development = true; - - /** - * Private constructor which reads a resource.properties file. - * @param fileName the file name to read (the resource name) - */ - private JProp(final String fileName) { - readFile(fileName); - } - - /** - * Public constructor which reads the JONAS properties file (jonas.properties). - */ - public JProp() { - readFile(ConfigurationConstants.DEFAULT_JONAS_PREFIX); - } - - /** - * private constructor which writes properties in the provided file. - * @param fileName the file name in which configuration properties are written - * @param props configuration properties used to initialize the resource - */ - private JProp(final String fileName, final Properties props) { - writePropsToFile(fileName, props); - } - - /** - * private constructor which writes text in the provided file. - * @param fileName the file name in which configuration is written - * @param txt xml configuration for this resource - */ - private JProp(final String fileName, final String txt) { - writeXmlToFile(fileName, txt); - } - - /** - * Get the unique instance corresponding to the JOnAS server. - * Create it at first call. - * @return unique instance corresponding to the JOnAS server. - */ - public static JProp getInstance() { - if (unique == null) { - unique = new JProp(); - } - return unique; - } - - /** - * Get one of the multiple instances corresponding to a given resource. - * Create it at first call with a given configuration file name - * @param fileName the name of the configuration file which is given by the resource name - * @return one of the multiple instances corresponding to a given resource. - */ - public static JProp getInstance(final String fileName) { - if (!multiple.containsKey(fileName)) { - multiple.put(fileName, new JProp(fileName)); - } - return multiple.get(fileName); - } - - /** - * Get one of the multiple instances corresponding to a given resource. - * Create it at first call with a given configuration file name - * @param fileName the name of the configuration file - * @param props the content of the configuration file to be written in fileName - * @return one of the multiple instances corresponding to a given resource. - */ - public static JProp getInstance(final String fileName, final Properties props) { - if (!multiple.containsKey(fileName)) { - multiple.put(fileName, new JProp(fileName, props)); - } - return multiple.get(fileName); - } - - /** - * Remove the JProp instance corresponding to the given file name from the 'multiple' - * data structure. - * @param fileName file name corresponding to the name of the resource to be removed - */ - public static void removeInstance(final String fileName) { - if (multiple.containsKey(fileName)) { - multiple.remove(fileName); - } - } - - /** - * Remove the JProp instance corresponding to the given file name from the 'multiple' - * data structure and delete the file. - * @param fileName file name corresponding to the name of the resource to be removed - * and deleted from the file system - */ - public static void deleteInstance(final String fileName) { - if (multiple.containsKey(fileName)) { - multiple.remove(fileName); - // Check the JONAS_BASE environment property - if (jonasBase == null) { - return; - } - jonasBase = jonasBase.trim(); - - // JONAS_BASE/conf/fileName - String propFileName = jonasBase + fileSeparator + CONFIG_DIR + fileSeparator + fileName + ".properties"; - File del = new File(propFileName); - del.delete(); - } - } - - /** - * Write configuration properties in file getProperty(JONAS_BASE)/conf/fileName - * @param fileName name of the configuration file to write - * @param props Properties to register in the fileName file - * @throws Exception if it can't write to the specified file - */ - private void writePropsToFile(final String fileName, final Properties props) { - - // Check the JONAS_BASE environment property - if (jonasBase == null) { - throw new RuntimeException("JOnAS configuration error: environment property jonas.base not set!"); - } - jonasBase = jonasBase.trim(); - if (jonasBase.length() <= 0) { - throw new RuntimeException("JOnAS configuration error: jonas.base is null"); - } - - // JONAS_BASE/conf/fileName - propFileName = jonasBase + fileSeparator + CONFIG_DIR + fileSeparator + fileName + ".properties"; - - try { - FileOutputStream os = new FileOutputStream(propFileName); - props.store(os, "This file is generated by JOnAS"); - os.close(); - } catch (FileNotFoundException e) { - // File propFileName could not be opened - propFileName = null; - throw new RuntimeException("Cannot write config file :" + e); - } catch (IOException e) { - throw new RuntimeException("Cannot write config file :" + e); - } - configFileEnv = (Properties) props.clone(); - allEnv = configFileEnv; - } - - - /** - * Write xml configuration in file getProperty(JONAS_BASE)/conf/fileName - * @param fileName name of the configuration file to write - * @param txt text to write - * @throws Exception if it can't write to the specified file - */ - private void writeXmlToFile(final String fileName, final String txt) { - - // Check the JONAS_BASE environment property - if (jonasBase == null) { - throw new RuntimeException("JOnAS configuration error: environment property jonas.base not set!"); - } - jonasBase = jonasBase.trim(); - - // JONAS_BASE/conf/fileName - propFileName = jonasBase + fileSeparator + CONFIG_DIR + fileSeparator + fileName + ".properties"; - - try { - BufferedWriter out = new BufferedWriter(new FileWriter(new File(propFileName))); - out.write(txt); - out.flush(); - out.close(); - } catch (FileNotFoundException e) { - // File propFileName could not be opened - propFileName = null; - throw new RuntimeException("Cannot write xml configuration file:" + e); - } catch (IOException e) { - throw new RuntimeException("Cannot write xml configuration file:" + e); - } - } - - - /** - * Read the content of the specified file. It can be an xml or properties file - * @param fileName name of the properties configuration file to read - * @throws Exception if it fails - */ - private void readFile(final String fileName) { - // Check the JONAS_BASE environment property - if (jonasBase == null) { - throw new RuntimeException("JOnAS configuration error: environment property jonas.base not set!"); - } - jonasBase = jonasBase.trim(); - if (jonasBase.length() <= 0) { - throw new RuntimeException("JOnAS configuration error: jonas.base is null"); - } - - - if (fileName.equals(ConfigurationConstants.DEFAULT_JONAS_VERSIONS)) { - readVersionFile(); - return; - } - - // JONAS_BASE/conf/fileName - String fileFullPathname = jonasBase + fileSeparator + CONFIG_DIR + fileSeparator + fileName; - - if (fileFullPathname.toLowerCase().endsWith(".xml")) { - readXmlFile(fileFullPathname); - } else { - readPropsFile(fileFullPathname); - } - } - - private void readVersionFile() { - String fileFullPathname = jonasRoot + fileSeparator + ConfigurationConstants.DEFAULT_JONAS_VERSIONS; - try { - File f = new File(fileFullPathname); - int length = (int) f.length(); - FileInputStream fis = new FileInputStream(f); - byte[] buffer = new byte[length]; - fis.read(buffer); - fis.close(); - versionFileContent = new String(buffer); - } catch (FileNotFoundException e) { - throw new RuntimeException("Cannot find file " + fileFullPathname); - } catch (IOException e) { - throw new RuntimeException("Cannot read file " + fileFullPathname); - } - } - - /** - * Read initial configuration properties in file getProperty(JONAS_BASE)/conf/fileName - * These properties may be overridden by system properties, provided on the java command line. - * @param fileName name of the configuration file to read - * @throws Exception if it fails - */ - private void readPropsFile(final String fileName) { - - // Update filename of this JProp - this.propFileName = fileName; - - if (!fileName.endsWith(".properties")) { - propFileName += ".properties"; - } - - File f = null; - try { - f = new File(propFileName); - FileInputStream is = new FileInputStream(f); - configFileEnv.load(is); - } catch (FileNotFoundException e) { - throw new RuntimeException("Cannot find properties for " + propFileName); - } catch (IOException e) { - throw new RuntimeException("Cannot load properties for " + propFileName); - } - - allEnv = (Properties) configFileEnv.clone(); - // Overriddes with syst properties - if (f.getName().equalsIgnoreCase("jonas.properties")) { - for (Enumeration e = systEnv.keys(); e.hasMoreElements();) { - Object key = e.nextElement(); - String value = ((String) systEnv.get(key)).trim(); - allEnv.put(key, value); - } - - String serverName; - // If no system properties is set for the server name and that the - // property is missing in the jonas.properties file, use the - // default value - if (!systEnv.containsKey(ConfigurationConstants.JONAS_NAME_PROP)) { - if (!configFileEnv.containsKey(ConfigurationConstants.JONAS_NAME_PROP)) { - allEnv.put(ConfigurationConstants.JONAS_NAME_PROP, ConfigurationConstants.DEFAULT_JONAS_NAME); - } else { - allEnv.put(ConfigurationConstants.JONAS_NAME_PROP, configFileEnv.getProperty(ConfigurationConstants.JONAS_NAME_PROP)); - } - } - serverName = ((String) allEnv.get(ConfigurationConstants.JONAS_NAME_PROP)).trim(); - - // If no system properties is set for the domain name and that the - // property is missing in the jonas.properties file, use the - // server name as default value - if (!allEnv.containsKey(ConfigurationConstants.DOMAIN_NAME_PROP) && !systEnv.containsKey(ConfigurationConstants.DOMAIN_NAME_PROP)) { - if (!configFileEnv.containsKey(ConfigurationConstants.DOMAIN_NAME_PROP)) { - allEnv.put(ConfigurationConstants.DOMAIN_NAME_PROP, serverName); - } else { - allEnv.put(ConfigurationConstants.DOMAIN_NAME_PROP, configFileEnv.getProperty(ConfigurationConstants.DOMAIN_NAME_PROP)); - } - } - } - - if (allEnv.containsKey(JONAS_MASTER)) { - if(Boolean.parseBoolean(allEnv.getProperty(JONAS_MASTER))) { - setMaster(true); - } - } - - if (allEnv.containsKey(JONAS_DEVELOPMENT)) { - if(!Boolean.parseBoolean(allEnv.getProperty(JONAS_DEVELOPMENT))) { - setDevelopment(false); - } - } - } - - /** - * Read initial configuration in file getProperty(JONAS_BASE)/conf/fileName - * @param fileName name of the xml configuration file to read - */ - private void readXmlFile(final String fileName) { - - // Update filename of this JProp - this.propFileName = fileName; - - try { - File f = new File(propFileName); - int length = (int) f.length(); - FileInputStream fis = new FileInputStream(f); - byte[] buffer = new byte[length]; - fis.read(buffer); - fis.close(); - configFileXml = new String(buffer); - } catch (FileNotFoundException e) { - throw new RuntimeException("Cannot find file " + propFileName); - } catch (IOException e) { - throw new RuntimeException("Cannot read file " + propFileName); - } - } - - /** - * Static method which return the jonas.root property - * @return the jonas.root property - */ - public static String getJonasRoot() { - return jonasRoot; - } - - /** - * Static method which return the jonas.base property - * @return the jonas.base property - */ - public static String getJonasBase() { - return jonasBase; - } - - /** - * Static method which returns the configuration directory in jonas.base - * @return The configuration directory in jonas.base - */ - public static String getConfDir() { - return jonasBase + File.separator + CONFIG_DIR; - } - - /** - * Static method which returns the repositories directory in jonas.root - * @return The repositories directory in jonas.root - */ - public static String getRepositoriesRootDir() { - return jonasRoot + File.separator + REPOSITORIES_DIR; - } - - /** - * Static method which returns the repositories directory in jonas.base - * @return The repositories directory in jonas.base - */ - public static String getRepositoriesBaseDir() { - return jonasBase + File.separator + REPOSITORIES_DIR; - } - - /** - * Returns properties filename - * - * @return JOnAS properties filename - */ - public String getPropFile() { - return propFileName; - } - - /** - * Returns JOnAS environment as configured with configuration file properties content and - * system properties. - * @return JOnAS properties - */ - public Properties getEnv() { - return allEnv; - } - - /** - * Returns JOnAS environment as configured with files properties only. - * - * @return JOnAS properties - */ - public Properties getConfigFileEnv() { - return configFileEnv; - } - - public String getPropFileName() { - return propFileName; - } - /** - * Returns xml content of the resource file. - * - * @return xml content of the resource file - */ - public String getConfigFileXml() { - return configFileXml; - } - - public String getVersionFile() { - return versionFileContent; - } - - /** - * Returns the value of the related property. With default values. - * @param key the search key - * @param defaultVal if the key is not found return this default value - * @return property value - */ - public String getValue(final String key, final String defaultVal) { - String retProperty = allEnv.getProperty(key, defaultVal); - return retProperty.trim(); - } - - /** - * Returns the value of the related property. - * The method returns null if the property is not found. - * @param key the wanted key - * @return property value, null if not exist - */ - public String getValue(final String key) { - - String retProperty = allEnv.getProperty(key); - if (retProperty != null) { - retProperty = retProperty.trim(); - } - return retProperty; - } - - /** - * Returns the value of the related property as boolean. - * @param key the wanted key - * @param def default run if not found - * @return property value, true or false. - */ - public boolean getValueAsBoolean(final String key, final boolean def) { - boolean ret = def; - String value = this.getValue(key); - if (value != null && value.equalsIgnoreCase("true")) { - ret = true; - } - return ret; - } - - /** - * Returns the value of the related property as String []. - * The method returns null if the property is not found. - * @param key the wanted key - * @return property value, null if not exist - */ - public String[] getValueAsArray(final String key) { - - String [] res = null; - String value = this.getValue(key); - if (value != null) { - StringTokenizer st = new StringTokenizer(value, ","); - res = new String [st.countTokens()]; - int i = 0; - while (st.hasMoreTokens()) { - res[i++] = st.nextToken().trim(); - } - } - return res; - } - - /** - * String representation of the object for trace purpose - * @return String representation of this object - */ - @Override - public String toString() { - String s = new String(); - for (Enumeration e = this.configFileEnv.keys(); e.hasMoreElements();) { - Object key = e.nextElement(); - Object value = this.configFileEnv.get(key); - s = s.concat(" " + key + " = " + value + "\n"); - } - if (s.length() > 0) { - // take of the last '\n' - s = s.substring(0, s.length() - 1); - } - return s; - } - - /** - * Bind all the properties found in file properties in a naming context - * the naming context must be allocated by the caller - * @param ctx given context for bindings properties - * @throws Exception if it fails - */ - public void env2Ctx(final Context ctx) throws Exception { - Enumeration e = configFileEnv.propertyNames(); - String key = null; - while (e.hasMoreElements()) { - key = (String) e.nextElement(); - ctx.bind(key, configFileEnv.getProperty(key, "")); - } - } - - /** - * Displays the JOnAS properties values, as they are set by the - * different property files. - * @param args the arguments for launching this program - */ - public static void main(final String args[]) { - - JProp jonasProperties = null; - try { - jonasProperties = JProp.getInstance(); - } catch (Exception e) { - System.err.println(e); - System.exit(2); - } - for (Enumeration e = jonasProperties.configFileEnv.keys(); e.hasMoreElements();) { - Object key = e.nextElement(); - Object value = jonasProperties.configFileEnv.get(key); - System.out.println(key.toString() + "=" + value.toString()); - } - } - - // ----------------------------------------------------------------------------- - // Implementation of ServerProperties - // ----------------------------------------------------------------------------- - - /** - * @return The Domain Name - */ - public String getDomainName() { - return getValue(ConfigurationConstants.DOMAIN_NAME_PROP, null); - } - - /** - * @return the Server Name - */ - public String getServerName() { - return getValue(ConfigurationConstants.JONAS_NAME_PROP, null); - } - - /** - * @return the VERSIONS file content as a String. - */ - public String getVersionsFile() { - JProp jp = JProp.getInstance(ConfigurationConstants.DEFAULT_JONAS_VERSIONS); - return jp.versionFileContent; - } - - public boolean isMaster() { - return master; - } - - public void setMaster(final boolean master) { - this.master = master; - } - - public boolean isDevelopment() { - return development; - } - - public void setDevelopment(final boolean development) { - this.development = development; - } - - /** - * @return work directory - */ - public String getWorkDirectory() { - String workDirProperty = getValue(ConfigurationConstants.WORK_DIRECTORY_PROP, - ConfigurationConstants.DEFAULT_WORK_DIRECTORY); - - // If absolute, no JONAS_BASE prefix - File f = new File(workDirProperty); - if (f.isAbsolute()) { - return workDirProperty; - } - // Else, prefix it with JONAS_BASE - return jonasBase + File.separator + workDirProperty; - } - -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/bootstrap/JURLs.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/bootstrap/JURLs.java deleted file mode 100644 index fc65d3f8c928e8f25a344f098463af7ebea147fb..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/bootstrap/JURLs.java +++ /dev/null @@ -1,239 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Florent BENOIT & Ludovic BERT - * -------------------------------------------------------------------------- - * $Id:JURLs.java 10822 2007-07-04 08:26:06Z durieuxp $ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.bootstrap; - -import java.util.Enumeration; -import java.util.Vector; -import java.io.File; -import java.net.URL; -import java.net.MalformedURLException; - -/** - * This implements an utility class that list the URLs of the jars to load at - * the launch time of the JOnAS server. - * @author Ludovic Bert - * @author Florent Benoit - */ -public class JURLs extends Vector { - - /** - * Construct an empty JURLs. - */ - public JURLs() { - super(); - } - - /** - * Add the specified file or directory to this JURLs. Note that in the case - * of a directory this method add only the content of this one. - * @param file the specified file or directory to add to this JURLs. - * @throws MalformedURLException to indicate that a malformed URL has - * occured. - */ - public void add(File file) throws MalformedURLException { - add(file, null, null, null); - } - - /** - * Add the specified directory to this JURLs. Note that this method add the - * URL of the specified directory and not the content of this directory. - * @param file the directory to add to this JURLs. - * @throws MalformedURLException to indicate that a malformed URL has - * occured. - */ - public void addDir(File file) throws MalformedURLException { - if (!file.exists() || !file.isDirectory()) { - String err = "Warning: Resource " + file.getName(); - err += " cannot be loaded : The directory does not exist"; - System.out.println(err); - } else { - if (!contains(file.toURL())) { - add(file.toURL()); - } - } - } - - /** - * Add the content of the specified directory to this JURLs, by using the - * specified filter. - * @param file the directory to add to this JURLs. - * @param filter the filter to use to add the content of this directory, - * null if not use the filter. - * @throws MalformedURLException to indicate that a malformed URL has - * occured. - */ - public void add(File file, String filter) throws MalformedURLException { - if (file.isDirectory()) { - add(file, filter, null, null); - } else { - String err = "Warning: Resource " + file.getName(); - err += " cannot be loaded : It is not a directory"; - System.out.println(err); - } - } - - /** - * Add the content of the specified directory to this JURLs if the contained - * file not starts with the specified prefix. - * @param file the directory to add to this JURLs. - * @param prefix the prefix to ignore, null if not use the prefix. - * @throws MalformedURLException to indicate that a malformed URL has - * occured. - */ - public void addNotStartWith(File file, String prefix) throws MalformedURLException { - - if (file.isDirectory()) { - add(file, null, prefix, null); - } else { - String err = "Warning: Resource " + file.getName(); - err += " cannot be loaded : It is not a directory"; - System.out.println(err); - } - } - - /** - * Add the content of the specified directory to this JURLs if the contained - * file not ends with the specified suffix. - * @param file the directory to add to this JURLs. - * @param suffix the suffix to ignore, null if not use the suffix. - * @throws MalformedURLException to indicate that a malformed URL has - * occured. - */ - public void addNotEndWith(File file, String suffix) throws MalformedURLException { - - if (file.isDirectory()) { - add(file, null, null, suffix); - } else { - String err = "Warning: Resource " + file.getName(); - err += " cannot be loaded : It is not a directory"; - System.out.println(err); - } - } - - /** - * Add the content of the specified directory to this JURLs by using a file - * filter and if the contained file not starts with the prefix and not ends - * with the suffix. - * @param file the directory to add to this JURLs. - * @param filter the filter to use to add the content of this directory, - * null if not use the filter. - * @param prefix the prefix to ignore, null if not use the prefix. - * @param suffix the suffix to ignore, null if not use the suffix. - * @throws MalformedURLException to indicate that a malformed URL has - * occured. - */ - public void add(File file, String filter, String prefix, String suffix) throws MalformedURLException { - if (!file.exists()) { - String err = "Warning: Resource " + file.getPath(); - err += " cannot be loaded : The file or directory does not exist"; - err += "(Check your environment variable)"; - System.out.println(err); - } else { - if (file.isFile()) { - if (!isMatching(file, prefix, suffix) && !contains(file.toURL())) { - // System.out.println("Adding URL "+file.toURL()); // DEBUG - add(file.toURL()); - } - } else { - File[] childrenFiles = null; - if (filter != null) { - childrenFiles = file.listFiles(new JFileFilter(filter)); - } else { - childrenFiles = file.listFiles(); - } - for (int i = 0; i < childrenFiles.length; i++) { - add(childrenFiles[i], filter, prefix, suffix); - } - } - } - } - - /** - * Return true if only if the file starts with the specified prefix or ends - * with the specified suffix. - * @param file the file to match. - * @param prefix the prefix to use for the matching, null if do not use the - * prefix. - * @param suffix the suffix to use for the matching, null if do not use the - * suffix. - * @return true if only if the file starts with the specified prefix or ends - * with the specified suffix. - */ - private boolean isMatching(File file, String prefix, String suffix) { - String fileName = file.getName(); - if (prefix == null) { - if (suffix == null) { - return false; - } else { - return fileName.endsWith(suffix); - } - } else { - if (suffix == null) { - return fileName.startsWith(prefix); - } else { - return fileName.startsWith(prefix) || fileName.endsWith(suffix); - } - } - } - - /** - * Merge the specified JURls to this JURLs. - * @param jurl the JURls to merge with this JURLs. - */ - public void merge(JURLs jurl) { - for (Enumeration e = jurl.elements(); e.hasMoreElements();) { - URL url = (URL) e.nextElement(); - if (!contains(url)) { - add(url); - } - } - } - - /** - * Remove the specified file of this JURLs - * @param file the file to be removed - * @throws MalformedURLException to indicate that a malformed URL has - * occured. - */ - public void remove(File file) throws MalformedURLException { - if (file.exists()) { - remove(file.toURL()); - } else { - String err = "Warning: Resource " + file.getName(); - err += " cannot be removed : It doesn't exist"; - System.out.println(err); - } - } - - /** - * Return an array containing all the URLs of this JURLs. - * @return an array containing all the URLs of this JURLs. - */ - public URL[] toURLs() { - return (URL[]) super.toArray(new URL[elementCount]); - } -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/bootstrap/LoaderManager.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/bootstrap/LoaderManager.java deleted file mode 100644 index 299e13602c78aec4104b4e03a293babae4a2e555..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/bootstrap/LoaderManager.java +++ /dev/null @@ -1,177 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2010 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id:LoaderManager.java 10822 2007-07-04 08:26:06Z durieuxp $ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.bootstrap; - -import java.io.File; -import java.net.URL; - -import org.ow2.jonas.lib.bootstrap.loader.JClassLoader; -import org.ow2.jonas.lib.loader.FilteringClassLoader; -import org.ow2.jonas.lib.loader.OSGiClassLoader; -import org.ow2.util.url.URLUtils; - -/** - * This class create all the ClassLoader necessary for JOnAS. - * @author Guillaume Sauthier - * @author Francois Fornaciari - */ -public final class LoaderManager { - - /** - * LoaderManager unique instance. - */ - private static LoaderManager instance = null; - - /** - * External ClassLoader. - */ - private JClassLoader externalClassLoader = null; - - /** - * $JONAS_ROOT. - */ - private String jonasRoot = null; - - /** - * $JONAS_BASE. - */ - private String jonasBase = null; - - /** - * $JONAS_ROOT/lib. - */ - private File jonasRootLib = null; - - /** - * $JONAS_ROOT/lib/ext. - */ - private File jonasRootLibExt = null; - - /** - * Relative library path. - */ - private static final String LIB = "lib"; - - /** - * Relative external library path : ext. - */ - private static final String EXTERNAL_FOLDER = "ext"; - - /** - * Relative external library path : lib/ext. - */ - private static final String LIB_EXTERNAL = LIB + File.separator + "ext"; - - /** - * Relative external library path : ext. - */ - private static final String TLD_FOLDER = "internal-ee-tld"; - - /** - * Initialize main directories. - */ - private LoaderManager() { - jonasRoot = JProp.getJonasRoot(); - jonasBase = JProp.getJonasBase(); - jonasRootLib = new File(jonasRoot, LIB); - jonasRootLibExt = new File(jonasRootLib, EXTERNAL_FOLDER); - } - - /** - * @return Returns the unique instance of LoaderManager. - */ - public static LoaderManager getInstance() { - if (instance == null) { - instance = new LoaderManager(); - } - return instance; - } - - /** - * @return Returns the External ClassLoader which contains user libraries. - * @throws Exception When ClassLoader cannot be created. - */ - public JClassLoader getExternalLoader() throws Exception { - if (externalClassLoader == null) { - externalClassLoader = createExternalClassLoader(); - } - return externalClassLoader; - } - - /** - * Constructs the External ClassLoader. - * - * @return Returns the External ClassLoader. - * @throws Exception When ClassLoader cannot be created from CLASSPATH or resources cannot be added to URLs List. - */ - private JClassLoader createExternalClassLoader() throws Exception { - JURLs jurls = new JURLs(); - - // Add TLD Java EE file - jurls.add(new File(jonasRootLib, TLD_FOLDER), "javaee-tld.jar"); - - // Load $JONAS_ROOT/lib/ext/*.jar - jurls.add(jonasRootLibExt, ".jar"); - - // Add $JONAS_BASE/lib/ext only if $JONAS_BASE != $JONAS_ROOT - // $JONAS_BASE/lib/ext is added before $JONAS_ROOT/lib/ext - if (!jonasRoot.toLowerCase().equals(jonasBase.toLowerCase())) { - File jonasBaseLibExt = new File(jonasBase, LIB_EXTERNAL); - if (jonasBaseLibExt.exists()) { - jurls.add(jonasBaseLibExt, ".jar"); - } - } - - return new JClassLoader("External", - jurls.toURLs(), - createSystemFilteringClassLoader()); - } - - /** - * Creates a {@code FilteringClassLoader} instance delegating to its parent - * {@code OSGiClassLoader}. - * Filters are loaded from the {@code $[jonas.base]/conf/classloader-default-filtering.xml}. - * If no XML definition file is found, it returns a non-filtrant loader. - * @return a configured FilteringClassLoader - */ - private FilteringClassLoader createSystemFilteringClassLoader() { - - // OSGiClassLoader delegates class loading to the bundle ClassLoader - // so we can benefit of OSGi properties (Dynamic-Import, ...) - FilteringClassLoader loader = new FilteringClassLoader(new OSGiClassLoader()); - - File xmlConfigFile = new File(new File(JProp.getConfDir()), - FilteringClassLoader.XML_FILE); - if (xmlConfigFile.isFile()) { - URL systemDefinitionUrl = URLUtils.fileToURL(xmlConfigFile); - loader.setDefinitionUrl(systemDefinitionUrl); - } // else will be a transparent ClassLoader (no filters) - - loader.start(); - - return loader; - } -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/bootstrap/RemoteClassLoaderSpi.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/bootstrap/RemoteClassLoaderSpi.java deleted file mode 100644 index fffd5f6f4ae0f95868a5ad265db0c1ce18563b8b..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/bootstrap/RemoteClassLoaderSpi.java +++ /dev/null @@ -1,256 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2008 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id:RemoteClassLoaderSpi.java 10822 2007-07-04 08:26:06Z durieuxp $ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.bootstrap; - -import java.net.MalformedURLException; -import java.net.URI; -import java.net.URISyntaxException; -import java.net.URL; -import java.net.URLClassLoader; -import java.rmi.server.RMIClassLoader; -import java.rmi.server.RMIClassLoaderSpi; -import java.util.StringTokenizer; - -import org.ow2.carol.util.configuration.CarolDefaultValues; -import org.ow2.jonas.lib.bootstrap.loader.JClassLoader; - -/** - * Class RemoteClassLoaderSpi is the CAROL JRMP CLass Loader SPI - * for serialization performances. - * @author Guillaume Riviere (Guillaume.Riviere@inrialpes.fr) - * @author S. Ali Tokmen - */ -public class RemoteClassLoaderSpi extends RMIClassLoaderSpi { - - /** - * Carol was already initialized - */ - private static boolean carolIsInitialized = false; - - /** - * Local call optimization is set - */ - private static boolean carolIsOptimized = false; - - /** - * Current provider - */ - private final RMIClassLoaderSpi defaultProvider = RMIClassLoader.getDefaultProviderInstance(); - - /** - * Loads a class from a codebase URL path, optionally using the supplied - * loader. - * @param codebase the list of URLs (separated by spaces) to load the class - * from, or null - * @param name the name of the class to load - * @param defaultLoader additional contextual class loader to use, or - * null - * @return the Class object representing the loaded class - * @throws MalformedURLException if codebase is non-null - * and contains an invalid URL, or if codebase is - * null and the system property - * java.rmi.server.codebase contains an invalid URL - * @throws ClassNotFoundException if a definition for the class could not be - * found at the specified location - */ - public Class loadClass(String codebase, String name, ClassLoader defaultLoader) throws MalformedURLException, - ClassNotFoundException { - return defaultProvider.loadClass(normalizeCodebase(codebase), name, defaultLoader); - } - - /** - * Loads a dynamic proxy class (see {@link java.lang.reflect.Proxy} that - * implements a set of interfaces with the given names from a codebase URL - * path, optionally using the supplied loader. - * @param codebase the list of URLs (space-separated) to load classes from, - * or null - * @param interfaces the names of the interfaces for the proxy class to - * implement - * @return a dynamic proxy class that implements the named interfaces - * @param defaultLoader additional contextual class loader to use, or - * null - * @throws MalformedURLException if codebase is non-null - * and contains an invalid URL, or if codebase is - * null and the system property - * java.rmi.server.codebase contains an invalid URL - * @throws ClassNotFoundException if a definition for one of the named - * interfaces could not be found at the specified location, or if - * creation of the dynamic proxy class failed (such as if - * {@link java.lang.reflect.Proxy#getProxyClass(ClassLoader,Class[])} - * would throw an IllegalArgumentException for the - * given interface list) - */ - public Class loadProxyClass(String codebase, String[] interfaces, ClassLoader defaultLoader) - throws MalformedURLException, ClassNotFoundException { - return defaultProvider.loadProxyClass(normalizeCodebase(codebase), interfaces, defaultLoader); - } - - /** - * Returns a class loader that loads classes from the given codebase URL - * path. - * @param codebase the list of URLs (space-separated) from which the - * returned class loader will load classes from, or null - * @return a class loader that loads classes from the given codebase URL - * path - * @throws MalformedURLException if codebase is non-null - * and contains an invalid URL, or if codebase is - * null and the system property - * java.rmi.server.codebase contains an invalid URL - */ - public ClassLoader getClassLoader(String codebase) throws MalformedURLException { - return defaultProvider.getClassLoader(normalizeCodebase(codebase)); - } - - /** - * Returns the annotation string (representing a location for the class - * definition) that RMI will use to annotate the class descriptor when - * marshalling objects of the given class.
    - * By default, remove rmi annotations of JClassLoader class. Between two - * JOnAS, commons classes are the same, don't need t have a bigger - * annotation. When local call is set, always disable annotation. - * @param cl the class to obtain the annotation for - * @return a string to be used to annotate the given class when it gets - * marshalled, or null - */ - public String getClassAnnotation(Class cl) { - ClassLoader loader = cl.getClassLoader(); - - // Init values - if (!carolIsInitialized) { - String sValue = System.getProperty(CarolDefaultValues.LOCALREG_JRMP_PROPERTY, "init"); - if (!sValue.equals("init")) { - carolIsOptimized = new Boolean(sValue).booleanValue(); - carolIsInitialized = true; - } - } - - if (loader instanceof JClassLoader) { - return null; - } else if ((loader instanceof URLClassLoader) && (carolIsOptimized)) { - return null; - } else { - return defaultProvider.getClassAnnotation(cl); - } - } - - /** - * The standard separator between codebases is the space character and - * many operating systems use paths with spaces. One classical example - * would be C:\Program Files\JOnAS\ in Windows. - * - * This function does the necessary transformation in order the codebase to - * be separated correctly and the file:/C:/Program Files/JOnAS/ path - * not to be interpreted as two separate codebases (Namely, - * file:/C:/Program and /JOnAS/). It also successfully - * normalizes multiple paths in one codebase (for example, - * file:/C:/Program Files/foo.jar file:/C:/Program Files/bar.jar). - * - * @param input Codebase to normalize (may be null). - * - * @return Normalized codebase. - * - * @throws MalformedURLException If URL really is malformed. - */ - static String normalizeCodebase(final String input) throws MalformedURLException { - // null is a perfectly valid codebase - if (input == null) { - return null; - } - - StringBuffer codebase = new StringBuffer(); - StringBuffer current = new StringBuffer(); - StringTokenizer stok = new StringTokenizer(input, " \t\n\r\f", false); - - while (stok.hasMoreTokens()) { - String item = stok.nextToken(); - - // Ignore empty tokens - if (item.length() < 1) { - continue; - } - - if (item.indexOf(':') != -1) { - // This is the beginning of a new URL, - // therefore the end of an the previous URL - onGotURL(current, codebase); - } else { - // This is the inner part of a URL that contains a space - current.append(' '); - } - - current.append(item); - } - - // Make sure we don't miss the last URL - onGotURL(current, codebase); - - if (codebase.length() > 0) { - return codebase.toString(); - } else { - return null; - } - } - - /** - * Callback when the {@link RemoteClassLoaderSpi#normalizeCodebase(String)} - * method has recognized a URL. The URL (that may be empty) will be escaped - * using {@link java.net.URL} and added to the codebase. - * - * @param current Recognized URL. - * @param codebase Base to add the reformatted URL to. - * - * @throws MalformedURLException If URL current's content is invalid. - */ - static void onGotURL(final StringBuffer current, final StringBuffer codebase) throws MalformedURLException { - // Ignore empty recognitions - if (current.length() < 1) { - return; - } - - URL url; - String currentToString = current.toString(); - try { - // Check if the URL is valid, therefore already escaped correctly - url = new URI(new URL(currentToString).toString()).toURL(); - } catch (URISyntaxException e) { - try { - // Given URL wasn't escaped correctly, escape spaces - url = new URI(new URL(currentToString.replaceAll("\\ ", "%20")).toString()).toURL(); - } catch (URISyntaxException ie) { - // URL is really not valid - url = null; - } - } - - if (url != null) { - if (codebase.length() > 0) { - codebase.append(' '); - } - codebase.append(url.toString()); - current.setLength(0); - } - } -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/cpmanager/EarClassPathManager.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/cpmanager/EarClassPathManager.java deleted file mode 100644 index 582e7fcad2d5b30ae597547a582c34f8ff2d6eda..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/cpmanager/EarClassPathManager.java +++ /dev/null @@ -1,334 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Florent BENOIT & Ludovic BERT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.cpmanager; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.StringTokenizer; -import java.util.jar.Attributes; -import java.util.jar.JarFile; -import java.util.jar.Manifest; -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; -import org.ow2.jonas.lib.util.Log; -import org.ow2.util.url.URLUtils; - -/** - * JOnAS Ear class path manager class. This class provides a way for managing - * the class-path dependency libraries. - * @author Florent Benoit - * @author Ludovic Bert - * @author Nicolas Van Caneghem Allow the - * deployment of an exploded ear - */ -public class EarClassPathManager { - - /** - * Logger for this service. - */ - private Logger logger = null; - - /** - * Urls of the class path manager. - */ - private URL[] urls = null; - - /** - * List of jars that must be parsed. - */ - private JarList toParse = null; - - /** - * List of jars that have been parsed. - */ - private JarList parsed = null; - - /** - * List of jars which are libraries. - */ - private JarList libraries = null; - - /** - * List of the ejb jars. - */ - private JarList ejbs = null; - - /** - * List of the war files. - */ - private JarList wars = null; - - /** - * List of the client jars. - */ - private JarList clients = null; - - /** - * Directory of the ear. - */ - private URL directory = null; - - /** - * Construct an instance of a EarClassPathManager. - * @param ejbs JarList of ejb-jar - * @param wars JarList of war - * @param directory URL of the directory - * @throws EarClassPathManagerException if we can't create the manager - */ - public EarClassPathManager(final JarList ejbs, final JarList wars, final URL directory) throws EarClassPathManagerException { - - //we init the logger - logger = Log.getLogger(Log.JONAS_EAR_PREFIX); - - if ((ejbs == null) || (wars == null) || (directory == null)) { - throw new EarClassPathManagerException("The constructor EarClassPathManager can't accept null parameters"); - } - - //check protocol - if (!directory.getProtocol().equalsIgnoreCase("file")) { - throw new EarClassPathManagerException("Only the file:/ URL can be used"); - } - this.ejbs = ejbs; - this.wars = wars; - this.clients = new JarList(); - this.directory = directory; - } - - /** - * Construct an instance of a EarClassPathManager. - * @param clients JarList of the clients - * @param directory URL of the directory - * @throws EarClassPathManagerException if we can't create the manager - */ - public EarClassPathManager(final JarList clients, final URL directory) throws EarClassPathManagerException { - - if ((clients == null) || (directory == null)) { - throw new EarClassPathManagerException("The constructor EarClassPathManager can't accept null parameters"); - } - - //check protocol - if (!directory.getProtocol().equalsIgnoreCase("file")) { - throw new EarClassPathManagerException("Only the file:/ URL can be used"); - } - this.ejbs = new JarList(); - this.wars = new JarList(); - this.clients = clients; - this.directory = directory; - } - - /** - * Get the class-path from the MANIFEST.MF file of the specified archive. - * @param url the URL of the JAR file which contains the MANIFEST file. - * @return the class-path from the MANIFEST.MF file of the specified - * archive. - * @throws IOException if creation of a file based upon the url failed - * @throws EarClassPathManagerException if it failed - */ - private JarList getManifestClassPath(final URL url) throws EarClassPathManagerException, IOException { - - if (url == null) { - throw new EarClassPathManagerException("JarList.getManifestClassPath : The url parameter can't be null"); - } - - Manifest manifest = null; - - if (new File(url.getFile()).isDirectory()) { - File manifestFile = new File(url.getFile() + File.separator + JarFile.MANIFEST_NAME); - if (manifestFile.exists()) { - InputStream is = null; - try { - is = new FileInputStream(manifestFile); - manifest = new Manifest(is); - } finally { - if (is != null) { - is.close(); - } - } - } - - } else { - //Construct a JarFile in order to access to the manifest - // IOException it if failed - JarFile jarFile = null; - - try { - jarFile = new JarFile(URLUtils.urlToFile(url)); - //get manifest from the jarFile - manifest = jarFile.getManifest(); - } finally { - if (jarFile != null) { - jarFile.close(); - } - } - - } - - //classpath - String classPath = null; - - //Only if a manifest is found - if (manifest != null) { - //get attributes (classpath) - Attributes attributes = manifest.getMainAttributes(); - classPath = attributes.getValue(Attributes.Name.CLASS_PATH); - } - - //New JarList - JarList jarList = null; - - //The jarList will be Empty if classpath is null or populate with - // classpath entries - if (classPath != null) { - jarList = new JarList(new StringTokenizer(classPath)); - } else { - jarList = new JarList(); - } - - //Return the list - return jarList; - } - - /** - * Get the list of the URLs. - * @return the list of the URLs. - * @throws EarClassPathManagerException if we can't resolve the path - */ - public URL[] getResolvedClassPath() throws EarClassPathManagerException { - - //If we don't have already compute - if (urls == null) { - resolveClassPath(); - } - - //return the cache - return urls; - } - - /** - * Resolve the class-path dependencies of WAR and JAR files. - * @throws EarClassPathManagerException if it failed - */ - private void resolveClassPath() throws EarClassPathManagerException { - - //Set the list to parsed - toParse = new JarList(); - - //Set the list already parsed - parsed = new JarList(); - - //Set the list of libraries - libraries = new JarList(); - - //add the ejbs, wars and clients to this list - toParse.merge(ejbs); - toParse.merge(wars); - toParse.merge(clients); - - //dependencies list - JarList lstOfFilesDep = new JarList(); - - //Url of the current filename - URL depUrl = null; - - //While there are elements to analyse - while (toParse.size() > 0) { - - //File to look for Manifest - String fileName = (String) toParse.firstElement(); - - if (fileName.endsWith("/")) { - throw new EarClassPathManagerException("In j2ee application, Class-Path with directory is forbidden. '" - + fileName + "' is not authorized."); - } - try { - //Get dependency entries - depUrl = new URL(directory.toExternalForm() + "/" + fileName); - lstOfFilesDep = getManifestClassPath(depUrl); - } catch (MalformedURLException mue) { - lstOfFilesDep.removeAllElements(); - logger.log(BasicLevel.ERROR, "Error while trying to get the url for " - + directory.toExternalForm() + File.separator + fileName + " : ", mue); - } catch (IOException ioe) { - lstOfFilesDep.removeAllElements(); - logger.log(BasicLevel.ERROR, "Error while reading manifest file from the file " + fileName - + " : ", ioe); - } - - String parentDir = new File(fileName).getParent(); - //subDirectory (the parent dir or "") - String subDir = null; - if (parentDir != null) { - subDir = parentDir; - } else { - subDir = ""; - } - - //Set the relative path of EAR / file - lstOfFilesDep.setRelativePath(subDir); - - //Merge the list - toParse.merge(lstOfFilesDep); - - //Add the parsed file - parsed.add(fileName); - - //Add to the libraries if it's not an EJB or a WEB application - if (isALibrary(fileName)) { - libraries.add(fileName); - } - - //Remove all the parsed files - toParse.remove(parsed); - - } - - //We've got the list of files, its the JarList : parsed - try { - urls = libraries.getURLs(directory.toExternalForm()); - } catch (JarListException e) { - throw new EarClassPathManagerException( - "Error while geting the URLs of the jars files which must be loaded at the EAR level"); - - } - - } - - /** - * Check if the file is a library , ie : - It's not an EJB Jar. - It's not a - * War. - * @param fileName name of the file to check - * @return true if it's not either an ejbjar either a war file. (a library). - */ - private boolean isALibrary(final String fileName) { - return (!ejbs.contains(fileName) && !wars.contains(fileName)); - } - -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/cpmanager/EarClassPathManagerException.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/cpmanager/EarClassPathManagerException.java deleted file mode 100644 index c3fcc08fb69f4fd9172fc94233e51ce38c1c8ec0..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/cpmanager/EarClassPathManagerException.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Florent BENOIT & Ludovic BERT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.cpmanager; - -/** - * The class EarClassPathManagerException indicates conditions - * that a reasonable application might want to catch. - * @author Florent Benoit - * @author Ludovic Bert - */ -public class EarClassPathManagerException extends Exception { - - /** - * Constructs a new EarClassPathManagerException with no detail - * message. - */ - public EarClassPathManagerException() { - super(); - } - - /** - * Constructs a new EarClassPathManagerException with the specified - * message. - * @param message the detail message. - */ - public EarClassPathManagerException(String message) { - super(message); - } -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/cpmanager/JarList.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/cpmanager/JarList.java deleted file mode 100644 index 8dc0e3c160c806173117dcb90c1964c01a0cc8de..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/cpmanager/JarList.java +++ /dev/null @@ -1,159 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2011 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id:JarList.java 10672 2007-06-19 07:18:50Z sauthieg $ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.cpmanager; - -//java import -import java.io.File; -import java.io.IOException; -import java.net.URL; -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.List; -import java.util.StringTokenizer; -import java.util.Vector; - -import org.ow2.util.url.URLUtils; - -/** - * JOnAS Jar list This class provides a way for managing the class-path - * dependency libraries. - * @author Florent Benoit - * @author Ludovic Bert - */ -public class JarList extends Vector { - - /** - * Construct an instance of a JarList - */ - public JarList() { - super(); - } - - /** - * Construct an instance of a JarList - * @param st a String tokenizer - */ - public JarList(StringTokenizer st) { - super(); - - //add each entries - while (st.hasMoreTokens()) { - String fileName = st.nextToken(); - add(fileName); - } - } - - /** - * Construct an instance of a JarList - * @param strs an array of files - */ - public JarList(String[] strs) { - super(); - - for (int i = 0; i < strs.length; i++) { - add(strs[i]); - } - } - - /** - * Add the specified file to the current list. - * @param fileName the name of the file to add. - */ - public void add(String fileName) { - if (!contains(fileName) && !fileName.equals("")) { - super.add(fileName); - } - } - - /** - * Get the URLs of all the JAR file list append to dirName. - * @param dirName the name of the directory where we append the files (URL format). - * @return the absolute URLs of the JAR files. - * @throws JarListException if url are malformed - */ - public URL[] getURLs(String dirName) throws JarListException { - - List verifiedUrls = new ArrayList(); - for (int i = 0; i < elementCount; i++) { - String s = (String) elementData[i]; - try { - URL potentialUrl = new URL(dirName + File.separator + s); - File potentialFile = URLUtils.urlToFile(potentialUrl); - if (potentialFile.exists()) { - // Avoid incorporating an URL pointing to a non-existent file - URL verifiedUrl = URLUtils.fileToURL(potentialFile.getCanonicalFile()); - verifiedUrls.add(verifiedUrl); - } - } catch (IOException e) { - throw new JarListException("Error when trying to get the canonical form for the file " + elementData[i]); - } - } - return verifiedUrls.toArray(new URL[verifiedUrls.size()]); - } - - /** - * Merge the specified JarList to the current JarList without adding - * duplicate entry. - * @param jarList the list to merge. - */ - public void merge(JarList jarList) { - for (Enumeration e = jarList.elements(); e.hasMoreElements();) { - String s = (String) e.nextElement(); - //call add which call super.add - add(s); - } - } - - /** - * Remove all the entries contained in the jarList to the current jarList. - * @param jarList the jarList to remove. - */ - public void remove(JarList jarList) { - - for (Enumeration e = jarList.elements(); e.hasMoreElements();) { - String s = (String) e.nextElement(); - if (contains(s)) { - remove(s); - } - } - } - - /** - * Set the relative path of the current list. This is useful in the case of - * an EAR file because the class-path is relative to the JAR file and not - * the EAR file. - * @param path the path for set the relative path - */ - public void setRelativePath(String path) { - if (path.equals("")) { - return; - } - - for (int i = 0; i < elementCount; i++) { - elementData[i] = path + File.separator + elementData[i]; - } - } -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/cpmanager/JarListException.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/cpmanager/JarListException.java deleted file mode 100644 index 560d1f7689aa8e6fcab1703e97fa136c95dc7e19..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/cpmanager/JarListException.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Florent BENOIT & Ludovic BERT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.cpmanager; - -/** - * The class JarListException indicates conditions that a reasonable application - * might want to catch. - * @author Florent Benoit - * @author Ludovic Bert - */ -public class JarListException extends Exception { - - /** - * Constructs a new JarListException with no detail message. - */ - public JarListException() { - super(); - } - - /** - * Constructs a new JarListException with the specified message. - * @param message the detail message. - */ - public JarListException(String message) { - super(message); - } -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/execution/ExecutionResult.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/execution/ExecutionResult.java deleted file mode 100644 index 47b5b7a5e2106faecdc2914546be5a4b06f09390..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/execution/ExecutionResult.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.execution; - -/** - * Store the result of an {@link IExecution}. - * @param result object type. - * @author Guillaume Sauthier - */ -public class ExecutionResult { - - /** - * Object result of the execution. - */ - private T result; - - /** - * Exception (if any). - */ - private Exception exception; - - /** - * @return the result - */ - public T getResult() { - return result; - } - /** - * @param result the result to set - */ - public void setResult(final T result) { - this.result = result; - } - /** - * @return the exception - */ - public Exception getException() { - return exception; - } - /** - * @param exception the Exception to set - */ - public void setException(final Exception exception) { - this.exception = exception; - } - - /** - * @return true if errors were thrown during the execution. - */ - public boolean hasException() { - return exception != null; - } -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/execution/IExecution.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/execution/IExecution.java deleted file mode 100644 index 895cc1e500a46e18b649242a0fb8f10c3ba2d38a..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/execution/IExecution.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -/** - * - */ -package org.ow2.jonas.lib.execution; - -/** - * Defines a job execution. - * @param returned type - * @author Guillaume Sauthier - */ -public interface IExecution { - - /** - * Execute some user's code. - * @return an Object instance if something has to be - * returned (null otherwise). - * @throws Exception may be thrown by the user code. - */ - T execute() throws Exception; -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/execution/RunnableHelper.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/execution/RunnableHelper.java deleted file mode 100644 index a6da4ee49e258aa80fd66a0aa3a7def652811dc0..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/execution/RunnableHelper.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.execution; - -import java.security.AccessController; -import java.security.PrivilegedAction; - -/** - * Helps to run blocks of code under a controlled environment. - * @author Guillaume Sauthier - */ -public final class RunnableHelper { - - /** - * Private empty constructor for utility class. - */ - private RunnableHelper() { } - - /** - * Run a code block in the context of a given ClassLoader. - * @param loader The {@link ClassLoader} to be used as TCCL. - * @param exec code block. - * @param execution result type. - * @return the result of this execution. - */ - public static ExecutionResult execute(final ClassLoader loader, - final IExecution exec) { - - ExecutionResult result = new ExecutionResult(); - - // Store the old loader - ClassLoader old = getThreadContextClassLader(); - try { - // Set the new one - Thread.currentThread().setContextClassLoader(loader); - - // Run the code and store the result - result.setResult(exec.execute()); - - } catch (Exception e) { - result.setException(e); - } finally { - // Revert to the previous loader - Thread.currentThread().setContextClassLoader(old); - } - - // return the result holder - return result; - } - - /** - * @return Return the current {@link Thread} context ClassLoader - * (using a priviledged block). - */ - public static ClassLoader getThreadContextClassLader() { - return AccessController.doPrivileged(new PrivilegedAction() { - public ClassLoader run() { - return Thread.currentThread().getContextClassLoader(); - } - }); - } -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/AbsModuleClassLoader.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/AbsModuleClassLoader.java deleted file mode 100644 index 808b52cd8a2cc66f096c1f54a9e2bf004b09d2b3..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/AbsModuleClassLoader.java +++ /dev/null @@ -1,196 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.loader; - -import java.io.File; -import java.io.IOException; -import java.net.URL; -import java.net.URLClassLoader; -import java.util.List; -import java.util.Iterator; - -import org.ow2.jonas.lib.loader.factory.URLFactory; -import org.ow2.jonas.lib.loader.locator.Locator; - - -/** - * The AbsModuleClassLoader class is used in JOnAS - * for loading web, ejbjars and client modules. - * - * @author Guillaume Sauthier - */ -public abstract class AbsModuleClassLoader extends URLClassLoader { - - /** factories used to create URLs for URLClassLoader. */ - private URLFactory[] factories; - - /** locators used to search jar/dir for files, directories, ... */ - private Locator[] locators; - - /** bases URLs. */ - private URL[] bases; - - /** - * Create a new AbsModuleClassLoader for a list of URLs. - * - * @param modules the list of URL to be used in the ClassLoader. - * - * @throws IOException when Initialization fails. - */ - public AbsModuleClassLoader(URL[] modules) throws IOException { - super(new URL[0]); - bases = modules; - init(); - } - - /** - * Create a new AbsModuleClassLoader for a list of URLs with a specified parent loader. - * - * @param modules the list of URL to be used in the ClassLoader. - * @param parent the parent ClassLoader to be used. - * - * @throws IOException when Initialization fails. - */ - public AbsModuleClassLoader(URL[] modules, ClassLoader parent) throws IOException { - super(new URL[0], parent); - bases = modules; - init(); - } - - /** - * Base Initialization of the ClassLoader, storage of URL list. - * - * @throws IOException when URL pointed file is not supported (not an jar nor a directory). - */ - protected void init() throws IOException { - factories = new URLFactory[bases.length]; - locators = new Locator[bases.length]; - - // Create factories and locator for each URL - for (int i = 0; i < bases.length; i++) { - - factories[i] = URLFactory.getFactory(bases[i]); - locators[i] = Locator.getLocator(bases[i]); - } - } - - /** - * Add specified location into the repository. - * If location is found in multiple URLs of the bases, new - * URLs will be added multiple times. - * - * @param location an entry name (for a jar) or a path name (for a directory) - * - * @throws IOException when constructed URL is malformed - */ - protected void addInRepository(String location) throws IOException { - // test existence in each base URL - for (int i = 0; i < bases.length; i++) { - if (locators[i].hasDirectory(location) - || locators[i].hasFile(location)) { - addURL(factories[i].getURL(location)); - } - } - } - - /** - * Add specified location childs into the repository. - * Search will be performed on the bases URLs. - * - * @param location an entry name (for a jar) or a path name (for a directory) - * - * @throws IOException When a directory content cannot be explored. - * - * TODO test existence is now done in AbsModuleClassLoader - */ - protected void addContentInRepository(String location) throws IOException { - // test existence in each base URL - for (int i = 0; i < bases.length; i++) { - List list = locators[i].listContent(location); - for (Iterator l = list.iterator(); l.hasNext();) { - // TODO Exclude non jar content ! - addURL(factories[i].getURL((String) l.next())); - } - } - } - - /** - * @return Returns a String representation of the AbsModuleClassLoader - */ - public String toString() { - StringBuffer sb = new StringBuffer(); - - sb.append("classloader : " + getClass().getName() + "\n"); - sb.append("\tmodules bases (not in loader!) : \n"); - for (int i = 0; i < bases.length; i++) { - sb.append("\t\t -" + bases[i] + "\n"); - } - sb.append("\trepositories :\n"); - URL[] rep = getURLs(); - for (int i = 0; i < rep.length; i++) { - sb.append("\t\t -" + rep[i] + "\n"); - } - sb.append("\tparent : " + getParent() + "\n"); - - return sb.toString(); - } - - /** - * @return Returns the bases. - */ - public URL[] getBases() { - return bases; - } - - /** - * @return Returns a String representation of the classpath used by this classloader - */ - public String getClasspath() { - URL[] urls = getURLs(); - StringBuffer cp = new StringBuffer(); - for (int i = 0; i < urls.length; i++) { - String url = urls[i].getFile(); - // do not add URL with !/ inside - if (url.indexOf("!/") == -1) { - cp.append(File.pathSeparator + url); - } - } - if (getParent() instanceof AbsModuleClassLoader) { - AbsModuleClassLoader module = (AbsModuleClassLoader) getParent(); - cp.append(module.getClasspath()); - } - return cp.toString(); - } - - /** - * Appends the specified URL to the list of URLs to search for - * classes and resources. - * @param url the URL to be added to the search path of URLs - */ - public void addURL(URL url) { - super.addURL(url); - } -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/ClientClassLoader.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/ClientClassLoader.java deleted file mode 100644 index e271ce72519bab3e440e8ab398e7bba6c43647cb..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/ClientClassLoader.java +++ /dev/null @@ -1,91 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.loader; - -import java.io.IOException; -import java.net.URL; - -/** - * ClassLoader used for loading Client classes and resources - * - * @author Guillaume Sauthier - */ -public class ClientClassLoader extends AbsModuleClassLoader { - - /** classes are located in the module root */ - private static final String CLASSES_DIRECTORY = ""; - - /** WSDL files are located in META-INF/wsdl directory */ - private static final String WSDL_DIRECTORY = "META-INF/wsdl/"; - - /** - * Create a new ClientClassLoader with default parent ClassLoader - * - * @param module an URL of Client files - * - * @throws IOException if creation fails - */ - public ClientClassLoader(final URL module) throws IOException { - super(new URL[]{module}); - } - - /** - * Create a new ClientClassLoader with specified parent ClassLoader - * - * @param module an URL of Client files - * @param parent the parent ClassLoader to use - * - * @throws IOException if creation fails - */ - public ClientClassLoader(final URL module, final ClassLoader parent) throws IOException { - super(new URL[]{module}, parent); - } - - /** - * Create a new ClientClassLoader with specified parent ClassLoader - * - * @param modules an URL[] of Client files + dependencies - * @param parent the parent ClassLoader to use - * - * @throws IOException if creation fails - */ - public ClientClassLoader(final URL[] modules, final ClassLoader parent) throws IOException { - super(modules, parent); - } - - /** - * Add the directory and the content of - * META-INF/wsdl/ in the ClassLoader. - * - * @throws IOException When initialisation fails. - */ - @Override - protected void init() throws IOException { - super.init(); - addInRepository(CLASSES_DIRECTORY); - addInRepository(WSDL_DIRECTORY); - } -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/EjbJarClassLoader.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/EjbJarClassLoader.java deleted file mode 100644 index c2a382039f5d6623df2e553b82ca0f385e38658d..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/EjbJarClassLoader.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Guillaume SAUTHIER - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.loader; - -import java.io.IOException; -import java.net.URL; - -/** - * ClassLoader used for loading EJB classes and resources - * - * @author Guillaume Sauthier - */ -public class EjbJarClassLoader extends AbsModuleClassLoader { - - /** classes are located in the module root */ - private static final String CLASSES_DIRECTORY = ""; - - /** WSDL files are located in META-INF/wsdl directory */ - private static final String WSDL_DIRECTORY = "META-INF/wsdl/"; - - /** - * Create a new EjbJarClassLoader with default parent ClassLoader - * - * @param modules an URL[] of EjbJar files - * - * @throws IOException if creation fails - */ - public EjbJarClassLoader(URL[] modules) throws IOException { - super(modules); - } - - /** - * Create a new EjbJarClassLoader with specified parent ClassLoader - * - * @param modules an URL[] of EjbJar files - * @param parent the parent ClassLoader to use - * - * @throws IOException if creation fails - */ - public EjbJarClassLoader(URL[] modules, ClassLoader parent) throws IOException { - super(modules, parent); - } - - /** - * Add the directory and the content of META-INF/wsdl/ in the ClassLoader - * - * @throws IOException When WEB-INF/classes and WEB-INF/wsdl directories cannot be added - * in loader - */ - protected void init() throws IOException { - super.init(); - addInRepository(CLASSES_DIRECTORY); - addInRepository(WSDL_DIRECTORY); - } -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/FilteringClassLoader.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/FilteringClassLoader.java deleted file mode 100644 index 3dedcf4c5f06e8181ef4d77278a682baa28ad950..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/FilteringClassLoader.java +++ /dev/null @@ -1,252 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2009-2010 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.loader; - -import java.net.URL; -import java.net.URLClassLoader; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.ow2.jonas.lib.loader.xml.FiltersDefinition; -import org.ow2.util.log.Log; -import org.ow2.util.log.LogFactory; -import org.ow2.util.xmlconfig.XMLConfiguration; -import org.ow2.util.xmlconfig.XMLConfigurationException; -import org.ow2.util.xmlconfig.properties.SystemPropertyResolver; - - - -/** - * ClassLoader that allows to filter the classes or resources that are loaded.
    - * It is extending URLClassLoader as for example Tomcat is looking for getURLs() method, etc. - * @author Florent Benoit - */ -public class FilteringClassLoader extends URLClassLoader { - - /** - * Name of the XML file inside modules. - */ - public static final String CLASSLOADER_FILTERING_FILE = "classloader-filtering.xml"; - - /** - * Name of the XML file. - */ - public static final String XML_FILE = "classloader-default-filtering.xml"; - - /** - * Mapping file of the XML file. - */ - public static final String MAPPING_FILE = "classloader-default-filtering-mapping.xml"; - - - /** - * System property for disabling the Filtering. - */ - public static final String DISABLE_FILTERING_PROPERTY_NAME = "jonas-disable-filtering-class-loader"; - - /** - * Logger. - */ - private static Log logger = LogFactory.getLog(FilteringClassLoader.class); - - /** - * If transparent, there will be no filtering (by default: filtering enabled). - */ - private boolean transparent = false; - - /** - * Lock to inhibits any change after the loader has been started. - */ - private boolean started = false; - - /** - * Url of the filtering definition. - */ - private URL definitionUrl; - - /** - * List of default filters. - */ - private List filters = null; - - /** - * Build a new filtering classloader by using the given parent classloader. - * @param parentClassLoader the given parent classloader - */ - public FilteringClassLoader(final ClassLoader parentClassLoader) { - super(new URL[0], parentClassLoader); - } - - public boolean isTransparent() { - return transparent; - } - - public void setTransparent(final boolean transparent) { - if (!started) { - this.transparent = transparent; - } - } - - public URL getDefinitionUrl() { - return definitionUrl; - } - - public void setDefinitionUrl(final URL definitionUrl) { - if (!started) { - this.definitionUrl = definitionUrl; - } - } - - public void start() { - this.started = true; - - // Allow to disable this filtering by the admin - if (!transparent) { - if (Boolean.getBoolean(DISABLE_FILTERING_PROPERTY_NAME)) { - this.transparent = true; - logger.debug("FilteringClassLoader has been disabled."); - } - } - - // Load default filters if option is enabled - if (!transparent && (definitionUrl != null)) { - loadFilters(); - } - } - - /** - * Load the default filters. - */ - private void loadFilters() { - - // Parse with XML config - XMLConfiguration xmlConfiguration = new XMLConfiguration(MAPPING_FILE); - - // Set the source configuration(s) - xmlConfiguration.addConfigurationFile(definitionUrl); - - // Resolve properties as system properties - xmlConfiguration.setPropertyResolver(new SystemPropertyResolver()); - - // Use a map for some properties - Map contextualInstances = new HashMap(); - - // Sets the contextual instances - xmlConfiguration.setContextualInstances(contextualInstances); - - // Start configuration of this object - ClassLoader old = Thread.currentThread().getContextClassLoader(); - try { - Thread.currentThread().setContextClassLoader(FilteringClassLoader.class.getClassLoader()); - xmlConfiguration.configure(this); - } catch (XMLConfigurationException e) { - throw new IllegalArgumentException("Cannot configure the Filters inside the Filtering Classloader", e); - } finally { - Thread.currentThread().setContextClassLoader(old); - } - } - - /** - * Loads the class if it is not filtered. - * @param name the name of the class. - * @param resolve if true, resolve the class - * @return The resulting Class object - * @throws ClassNotFoundException If the class was not found or if it is - * filtered - */ - @Override - public Class loadClass(final String name, final boolean resolve) throws ClassNotFoundException { - - // If the class filtering is enabled and that the class is filtered, throws a CNFE exception - if (isFiltered(name)) { - throw new ClassNotFoundException("The class '" + name - + "' is a filtered class so it cannot be found in the Application Server classloader." - + " The class should be added into the application classloader."); - } - - return super.loadClass(name, resolve); - } - - /** - * Find the given resource specified by its name. - * @param name the resource name - * @return the URL if the resource has been found, else null - */ - @Override - public URL getResource(final String name) { - // If the resource filtering is enabled and that the resource is filtered, return null - if (isFiltered(name)) { - logger.debug("The resource ''{0}'' has been asked but as it is a filtered resource, return null", name); - return null; - } - - return super.getResource(name); - } - - /** - * Detects if the given class/resource should be filtered or not. - * @param name the name of the class - * @return true if it should be filtered, else false - */ - protected boolean isFiltered(final String name) { - if (transparent || name == null || filters == null) { - return false; - } - - // Finding a matching pattern - for (String pattern : filters) { - if (name.matches(pattern)) { - return true; - } - } - - // Not filtered ! - return false; - } - - /** - * @return a cloned filter list (so that it cannot be changed after the start-up). - */ - public List getFilters() { - List clone = new ArrayList(); - if (filters != null) { - clone.addAll(filters); - } - return clone; - } - - /** - * Sets the filters definition element. - * @param filters the filters definition element. - */ - public void setFiltersDefinition(final FiltersDefinition filters) { - this.filters = filters.getFilters(); - } - - -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/OSGiClassLoader.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/OSGiClassLoader.java deleted file mode 100644 index 07024a0bb941a0396afcb0354e59e1e8c594d1f0..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/OSGiClassLoader.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.loader; - -import java.io.InputStream; -import java.net.URL; -import java.net.URLClassLoader; - -/** - * {@link OSGiClassLoader} delegates class loading to the OSGi framework. - * @author Francois Fornaciari - */ -public class OSGiClassLoader extends URLClassLoader { - - /** - * This bundle's Bundle ClassLoader. - */ - private ClassLoader classLoader = null; - - /** - * Construct a new delegating ClassLoader. - */ - public OSGiClassLoader() { - super(new URL[0]); - this.classLoader = getClass().getClassLoader(); - } - - /** - * {@inheritDoc} - * @see java.lang.ClassLoader#loadClass(java.lang.String) - */ - @Override - public Class loadClass(final String name) throws ClassNotFoundException { - return classLoader.loadClass(name); - } - - /** - * {@inheritDoc} - * @see java.lang.ClassLoader#loadClass(java.lang.String, boolean) - */ - @Override - public Class loadClass(final String name, final boolean flag) throws ClassNotFoundException { - return loadClass(name); - } - - /** - * {@inheritDoc} - * @see java.lang.ClassLoader#getResource(java.lang.String) - */ - @Override - public URL getResource(final String name) { - // First look if OSGi can find the resource we want - URL resource = null; - try { - resource = classLoader.getResource(name); - } catch (IllegalArgumentException e) { - // Fall-back: if not found, try the usual getResource() search mechanism. - // This will let our services to access properties file that are in JB/conf - try { - resource = super.getResource(name); - } catch (IllegalArgumentException e2) { - return resource; - } - - } - if (resource == null ) { - resource = super.getResource(name); - } - // Finally return the resource (may be null) - return resource; - } - - /** - * {@inheritDoc} - * @see java.lang.ClassLoader#getResourceAsStream(java.lang.String) - */ - @Override - public InputStream getResourceAsStream(final String name) { - // First look if OSGi can find the resource we want - InputStream is = classLoader.getResourceAsStream(name); - - // Fall-back: if not found, try the usual getResourceAsStream() search mechanism. - // This will let our services to access properties file that are in JB/conf - if (is == null) { - is = super.getResourceAsStream(name); - } - - // Finally return the resource (may be null) - return is; - } - -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/SimpleWebappClassLoader.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/SimpleWebappClassLoader.java deleted file mode 100644 index 14a217f4dcd62e38bcd2af61c714b47cd0b6a997..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/SimpleWebappClassLoader.java +++ /dev/null @@ -1,78 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Guillaume SAUTHIER - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.loader; - -import java.io.IOException; -import java.net.URL; - -/** - * ClassLoader specialized for WebApps. It add only the WEB-INF/wsdl/ directory - * of the war in the URL repository. Used because Catalina doesn't automatically - * add this resources in its own ClassLoader - * - * @author Guillaume Sauthier - */ -public class SimpleWebappClassLoader extends AbsModuleClassLoader { - - /** WSDL directory in a Web module */ - private static final String WSDL_DIRECTORY = "WEB-INF/wsdl/"; - - /** - * Create a new SimpleWebappClassLoader with default parent ClassLoader - * - * @param module an URL of Web file - * - * @throws IOException if creation fails - */ - public SimpleWebappClassLoader(URL module) throws IOException { - super(new URL[] {module}); - } - - /** - * Create a new SimpleWebappClassLoader with specified parent ClassLoader - * - * @param module an URL of Web file - * @param parent the parent ClassLoader - * - * @throws IOException if creation fails - */ - public SimpleWebappClassLoader(URL module, ClassLoader parent) throws IOException { - super(new URL[] {module}, parent); - } - - /** - * Add the WEB-INF/wsdl/ directory in the ClassLoader. - * - * @throws IOException if META-INF/wsdl and ejb-jar root directories cannot - * be inserted in loader - */ - protected void init() throws IOException { - super.init(); - addInRepository(WSDL_DIRECTORY); - addInRepository(""); - } -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/ThreadContextClassLoader.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/ThreadContextClassLoader.java deleted file mode 100644 index 7233f354c65c246fb28649cd52d86429c1576c62..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/ThreadContextClassLoader.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.lib.loader; - -import java.io.InputStream; -import java.net.URL; - -/** - * Delegate all call to the Thread context ClassLoader. - * @author Guillaume Sauthier - */ -public class ThreadContextClassLoader extends ClassLoader { - - /** - * - */ - public ThreadContextClassLoader() { - super(); - } - - /** - * @see java.lang.ClassLoader#clearAssertionStatus() - */ - public synchronized void clearAssertionStatus() { - getContextClassLoader().clearAssertionStatus(); - } - - /** - * @see java.lang.ClassLoader#getResource(java.lang.String) - */ - public URL getResource(String name) { - return getContextClassLoader().getResource(name); - } - - /** - * @see java.lang.ClassLoader#getResourceAsStream(java.lang.String) - */ - public InputStream getResourceAsStream(String name) { - return getContextClassLoader().getResourceAsStream(name); - } - - /** - * @see java.lang.ClassLoader#loadClass(java.lang.String) - */ - public Class loadClass(String name) throws ClassNotFoundException { - return getContextClassLoader().loadClass(name); - } - - /** - * @see java.lang.ClassLoader#setClassAssertionStatus(java.lang.String, - * boolean) - */ - public synchronized void setClassAssertionStatus(String className, boolean enabled) { - getContextClassLoader().setClassAssertionStatus(className, enabled); - } - - /** - * @see java.lang.ClassLoader#setDefaultAssertionStatus(boolean) - */ - public synchronized void setDefaultAssertionStatus(boolean enabled) { - getContextClassLoader().setDefaultAssertionStatus(enabled); - } - - /** - * @see java.lang.ClassLoader#setPackageAssertionStatus(java.lang.String, - * boolean) - */ - public synchronized void setPackageAssertionStatus(String packageName, boolean enabled) { - getContextClassLoader().setPackageAssertionStatus(packageName, enabled); - } - - /** - * @return Thread context ClassLoader - */ - private ClassLoader getContextClassLoader() { - return Thread.currentThread().getContextClassLoader(); - } -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/WebappClassLoader.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/WebappClassLoader.java deleted file mode 100644 index 0daf0f33c126d62464e7a7ce04b38c0dfe89cb8f..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/WebappClassLoader.java +++ /dev/null @@ -1,89 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2003-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.loader; - -import java.io.IOException; -import java.net.URL; - -/** - * ClassLoader specialized for WebApps. It add the WEB-INF/wsdl/ directory - * of the war in the URL repository, the base URL of the jar file and the - * WEB-INF/classes/ directory. - * Used in WsGen. - * - * @author Guillaume Sauthier - */ -public class WebappClassLoader extends SimpleWebappClassLoader { - - /** Classes directory entry name in Web module */ - private static final String CLASSES_DIRECTORY = "WEB-INF/classes/"; - - /** Libraries directory entry name in Web module */ - private static final String LIB_DIRECTORY = "WEB-INF/lib/"; - - /** - * Create a new WebappClassLoader with default parent ClassLoader - * - * @param module an URL of Web file - * - * @throws IOException if creation fails - */ - public WebappClassLoader(URL module) throws IOException { - super(module); - } - - /** - * Create a new WebappClassLoader with specified parent ClassLoader - * - * @param module an URL of Web file - * @param parent the parent ClasLoader - * - * @throws IOException if creation fails - */ - public WebappClassLoader(URL module, ClassLoader parent) throws IOException { - super(module, parent); - } - - /** - * Add the WEB-INF/classes/ directory and the content of - * WEB-INF/lib/ in the ClassLoader - * - * @throws IOException if cannot add in repository specified paths - */ - protected void init() throws IOException { - super.init(); - addInRepository(CLASSES_DIRECTORY); - addContentInRepository(LIB_DIRECTORY); - } - - /** - * @return Returns the Base URL for this ClassLoader - */ - public URL getBaseURL() { - return getBases()[0]; - } - -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/factory/DirURLFactory.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/factory/DirURLFactory.java deleted file mode 100644 index a3a880ac878a7733c81d244e2bc8d1c28ee03a1a..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/factory/DirURLFactory.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Guillaume SAUTHIER - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.loader.factory; - -import java.net.URL; -import java.io.IOException; - -/** - * A DirURLFactory is used to create URLs - * from an URL (pointing to a directory) and paths. - * Example :
    - * base : file:/path/
    - * path : META-INF/directory/
    - * results : file:/path/META-INF/directory/
    - * - * @author Guillaume Sauthier - */ -public class DirURLFactory extends URLFactory { - - /** the base URL */ - private URL base; - - /** - * Create a new DirURLFactory using the specified base URL. - * - * @param url the base url. (must be a directory) - */ - public DirURLFactory(URL url) { - base = url; - } - - /** - * Returns a new URL basically adding path to the base URL. - * - * @param path the path to add to the URL. (must not start with "/") - * - * @return a new URL of the form . - * - * @throws IOException when created URL is invalid. - */ - public URL getURL(String path) throws IOException { - return new URL(base + path); - } - -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/factory/JarURLFactory.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/factory/JarURLFactory.java deleted file mode 100644 index 6d62af2524245055b78770011480c321cd2bf174..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/factory/JarURLFactory.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Guillaume SAUTHIER - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.loader.factory; - -import java.net.URL; -import java.io.IOException; - -/** - * A JarURLFactory is used to create URLs - * from a JarURL (jar:XXX) and paths. - * Example :
    - * base : file:lib.jar
    - * path : META-INF/directory/
    - * results : jar:file:lib.jar!/META-INF/directory/
    - * - * @author Guillaume Sauthier - */ -public class JarURLFactory extends URLFactory { - - /** the base URL */ - private URL base; - - /** Jar URl prefix */ - private static final String JAR = "jar:"; - - /** - * Jar URL separator - */ - private static final String SEP = "!/"; - - /** - * Create a new JarURLFactory using the specified base URL. - * - * @param url the base url. (must be a Jar archive) - */ - public JarURLFactory(URL url) { - base = url; - } - - /** - * Returns a new URL basically adding path to the base URL. - * returns the base URL when "" is used as parameter. - * - * @param path the path to add to the URL. (must not start with "/") - * - * @return a new URL of the form jar:!/. - * - * @throws IOException when created URL is invalid. - */ - public URL getURL(String path) throws IOException { - if (path.equals("")) { - return base; - } else { - return new URL(JAR + base + SEP + path); - } - } - -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/factory/URLFactory.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/factory/URLFactory.java deleted file mode 100644 index 61c7c2c51a4bfa8ffc187869bb3e5404bd3b77a0..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/factory/URLFactory.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Guillaume SAUTHIER - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.loader.factory; - -import java.net.URL; -import java.io.IOException; - -/** - * An URLFactory is used to create a URL from a base URL. - * - * @author Guillaume Sauthier - */ -public abstract class URLFactory { - - /** - * Returns a new URL basically adding path to the base URL. - * - * @param path the path to add to the URL. - * - * @return a new URL. - * - * @throws IOException when created URL is invalid. - */ - public abstract URL getURL(String path) throws IOException; - - /** - * Return a new URLFactory in function of the URL type. - * an URL pointing to a jar file will return a JarURLFactory - * and an URL pointing to a directory file will return a DirURLFactory. - * - * @param url the base URL - * - * @return a new URLFactory in function of the URL type. - * - * @throws IOException when cannot find a specialized factory for the given URL. - */ - public static URLFactory getFactory(URL url) throws IOException { - - String path = url.getPath(); - if (path.matches(".*\\..ar")) { - // jar detected if path ends with .?ar (*.jar, *.war, *.ear) - return new JarURLFactory(url); - } else if (path.endsWith("/")) { - // directory detected if url ends with a separator / - return new DirURLFactory(url); - } else { - String err = "Unsupported URL '" + url + "' support " - + "only jar archive and directory"; - throw new IOException(err); - } - } - -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/locator/DirLocator.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/locator/DirLocator.java deleted file mode 100644 index 3180771953957b8cdb71a7e185eaa2999ff93a6e..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/locator/DirLocator.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Guillaume SAUTHIER - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.lib.loader.locator; - -import java.io.File; -import java.io.IOException; -import java.net.URL; -import java.util.List; -import java.util.Vector; - -import org.ow2.util.url.URLUtils; - -/** - * A DirLocator is used to look up for a file - * inside a directory. - * - * @author Guillaume Sauthier - */ -public class DirLocator extends Locator { - - /** - * Wrapped File where search will be performed. - */ - private File file = null; - - /** - * Construct a new DirLocator from an URL pointing to a directory. - * - * @param jar URL pointing to a directory. - * - * @throws IOException When - */ - public DirLocator(final URL jar) throws IOException { - this.file = URLUtils.urlToFile(jar); - - if (!file.exists()) { - throw new IOException("File " + file + " does not exists."); - } - if (!file.isDirectory()) { - throw new IOException("File " + file + " is not a directory."); - } - } - - /** - * Returns true when file was found. - * - * @param path the path to the file to look up - * - * @return true when file was found, otherwise false. - */ - @Override - public boolean hasFile(final String path) { - - File child = new File(file, path); - return (child.exists() && child.isFile()); - } - - /** - * Returns true when directory was found. - * - * @param path the path to the directory to look up - * - * @return true when directory was found, otherwise false. - */ - @Override - public boolean hasDirectory(final String path) { - - File child = new File(file, path); - return (child.exists() && child.isDirectory()); - } - - /** - * Returns a list of filename stored in path. - * - * @param path the path to the directory where looking for files - * - * @return a list of filename stored in path. - */ - @Override - public List listContent(final String path) { - - File child = new File(file, path); - List libs = new Vector(); - // List directory content - if (child.isDirectory()) { - addContent(child, libs); - } - - return libs; - } - - /** - * Add only files in the given List. - * Recursive! - * - * @param f base directory to explore - * @param l file list to be filled - */ - private void addContent(final File f, final List l) { - File[] childs = f.listFiles(); - if (childs != null) { - for (int i = 0; i < childs.length; i++) { - if (childs[i].isDirectory()) { - addContent(childs[i], l); - } else if (childs[i].isFile()) { - l.add(childs[i].getPath().substring(file.getPath().length())); - } - } - } - } - -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/locator/JarFileLocator.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/locator/JarFileLocator.java deleted file mode 100644 index 813c6f424e61d827b41a2bb9ee0d711484396613..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/locator/JarFileLocator.java +++ /dev/null @@ -1,117 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Guillaume SAUTHIER - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.lib.loader.locator; - -import java.io.IOException; -import java.net.URL; -import java.util.Enumeration; -import java.util.List; -import java.util.Vector; -import java.util.jar.JarFile; -import java.util.zip.ZipEntry; - -/** - * A JarfileLocator is used to look up for a file inside a Jar - * archive. Works only for local jars. - * - * @author Guillaume Sauthier - */ -public class JarFileLocator extends Locator { - - /** - * Wrapped JarFile where searches will be performed. - */ - private JarFile file = null; - - /** - * Construct a new JarFileLocator from an URL representing a Jar. - * - * @param jar URL pointing to a Jar file - * - * @throws IOException When URL is not a JarFile. - */ - public JarFileLocator(final URL jar) throws IOException { - String filename = jar.getFile(); - file = new JarFile(filename); - } - - /** - * Returns true when file was found. - * - * @param path the path to the file to look up - * - * @return true when file was found, otherwise false. - */ - @Override - public boolean hasFile(final String path) { - - ZipEntry entry = file.getEntry(path); - return (entry != null); - } - - /** - * Returns true when directory was found. - * - * @param path the path to the directory to look up - * - * @return true when directory was found, otherwise false. - */ - @Override - public boolean hasDirectory(final String path) { - - boolean found = false; - for (Enumeration e = file.entries(); e.hasMoreElements() && !found;) { - ZipEntry entry = (ZipEntry) e.nextElement(); - if (entry.getName().startsWith(path)) { - return true; - } - } - - return false; - } - - /** - * Returns a list of filename stored in path. - * - * @param path the path to the directory where looking for files - * - * @return a list of filename stored in path. - */ - @Override - public List listContent(final String path) { - - List libs = new Vector(); - for (Enumeration e = file.entries(); e.hasMoreElements();) { - ZipEntry entry = (ZipEntry) e.nextElement(); - if (entry.getName().startsWith(path)) { - libs.add(entry.getName()); - } - } - - return libs; - } - -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/locator/Locator.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/locator/Locator.java deleted file mode 100644 index 99de059b2d4dc8ceca89ce3e6c85af18360684a0..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/locator/Locator.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Guillaume SAUTHIER - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.loader.locator; - -import java.io.IOException; -import java.net.URL; -import java.util.List; - -/** - * A Locator is used to hide System specific - * when looking for a file. - * - * @author Guillaume Sauthier - */ -public abstract class Locator { - - /** - * Returns true when file was found. - * - * @param path the path to the file to look up - * - * @return true when file was found, otherwise false. - */ - public abstract boolean hasFile(String path); - - /** - * Returns true when directory was found. - * - * @param path the path to the directory to look up - * - * @return true when directory was found, otherwise false. - */ - public abstract boolean hasDirectory(String path); - - /** - * Returns a list of filename stored in path. - * - * @param path the path to the directory where looking for files - * - * @return a list of filename stored in path. - */ - public abstract List listContent(String path); - - /** - * Return a new Locator in function of the URL type. - * an URL pointing to a jar file will return a JarFileLocator - * and an URL pointing to a directory file will return a DirFileLocator. - * - * @param url the base URL - * - * @return a new Locator in function of the URL type. - * - * @throws IOException when cannot find a specialized locator for the given URL. - */ - public static Locator getLocator(URL url) throws IOException { - - String path = url.getPath(); - if (path.matches(".*\\..ar")) { - // jar detected if path ends with .?ar (*.jar, *.war, *.ear) - return new JarFileLocator(url); - } else if (path.endsWith("/")) { - // directory detected if url ends with a separator / - return new DirLocator(url); - } else { - String err = "Unsupported URL '" + url + "' support " - + "only jar archive and directory"; - throw new IOException(err); - } - } -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/xml/FiltersDefinition.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/xml/FiltersDefinition.java deleted file mode 100644 index 5095fe26d37c2d637dd9cc21aef326bc6738e236..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/loader/xml/FiltersDefinition.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2009 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.loader.xml; - -import java.util.ArrayList; -import java.util.List; - -/** - * A {@code FiltersDefinition} is the XML representation of the {@code <filters>} (or - * {@code <default-filters>}) elements.
    - * It defines a set of filter name. - * @author Florent Benoit - * - */ -public class FiltersDefinition { - - /** - * List of filters. - */ - private List filters = new ArrayList(); - - /** - * @return list of filters. - */ - public List getFilters() { - return filters; - } - - /** - * Sets the list of filters. - * @param filters the given value - */ - public void setFilters(final List filters) { - this.filters = filters; - } - -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/service/AbsServiceImpl.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/service/AbsServiceImpl.java deleted file mode 100644 index f1ed7c83d2f611d130d65ff786f7160cc03fc47e..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/service/AbsServiceImpl.java +++ /dev/null @@ -1,227 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.lib.service; - -import java.util.ArrayList; -import java.util.List; - -import javax.naming.Context; - -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; -import org.ow2.jonas.lib.util.Log; -import org.ow2.jonas.properties.ServerProperties; -import org.ow2.jonas.service.Service; -import org.ow2.jonas.service.ServiceException; - -import org.ow2.jonas.lib.management.javaee.ManagedObject; -/** - * Abstract implementation of a {@link Service}. - */ -public abstract class AbsServiceImpl extends ManagedObject implements Service { - - /** - * Logger. - */ - private static Logger logger = Log.getLogger("org.ow2.jonas.service"); - - /** - * service name. - */ - private String name = null; - - /** - * service status. - */ - private boolean started = false; - - /** - * Server Properties. - */ - private ServerProperties serverProps; - - /** - * Initialize the service. - * @param ctx configuration of the service - * @throws ServiceException service initialization failed - */ - public void init(final Context ctx) throws ServiceException { - // Only call doInit(Context) for old fashioned services - this.doInit(ctx); - } - - /** - * Get the Server Properties. - */ - public ServerProperties getServerProperties() { - return this.serverProps; - } - - /** - * Set the Server Properties. - * @param props {@link ServerProperties} instance - */ - public void setServerProperties(final ServerProperties props) { - this.serverProps = props; - } - - /** - * Start the service. - * @throws ServiceException service start-up failed - */ - public void start() throws ServiceException { - this.doStart(); - this.started = true; - } - - /** - * Stop the service. - * @throws ServiceException service stopping failed - */ - public void stop() throws ServiceException { - if (this.isStarted()) { - this.doStop(); - this.started = false; - } - } - - /** - * Returns true if the service is started, false otherwise. - * @return true if the service is started - */ - public boolean isStarted() { - return this.started; - } - - /** - * Returns the service's name. - * @return the service name - */ - public String getName() { - return this.name; - } - - /** - * Set the service's name. - * @param name the name to set - */ - public void setName(final String name) { - this.name = name; - } - - /** - * Return the domain's name of this service. - * @return the domain name - */ - public String getDomainName() { - return serverProps.getDomainName(); - } - - /** - * Return the JOnAS server's name of this service. - * @return the server name - */ - public String getJonasServerName() { - return serverProps.getServerName(); - } - - /** - * Default initialization method to be overridden by sub-classes. - * @param ctx configuration of the service - * @throws ServiceException service initialization failed - * @deprecated - */ - @Deprecated - protected void doInit(final Context ctx) throws ServiceException { - logger.log(BasicLevel.WARN, "Deprecated initialization method. New services must have setters."); - } - - /** - * Abstract start-up method to be implemented by sub-classes. - * @throws ServiceException service start-up failed - */ - protected abstract void doStart() throws ServiceException; - - /** - * Abstract method for service stopping to be implemented by sub-classes. - * @throws ServiceException service stopping failed - */ - protected abstract void doStop() throws ServiceException; - - /** - * @return a String representation of a given Service. - * @see java.lang.Object#toString() - */ - @Override - public String toString() { - return this.getClass().getSimpleName() + "[name:" + getName() + ", started:" + isStarted() + "]"; - } - - /** - * Utility Exception throwing method to identify the error source. - * @param message Descriptive requirement message. - * @throws ServiceException always. - */ - protected void throwRequirementException(final String message) throws ServiceException { - StringBuilder sb = new StringBuilder(); - sb.append("Service: '" + getName() + "' requires: "); - sb.append(message); - throw new ServiceException(sb.toString()); - } - - /** - * Utility method to convert a given String of comma-separated elements to a List. - * @param value String value - * @return List constructed from the given String - */ - protected static List convertToList(final String value) { - // only handle String list - // separator is the ',' - String[] values = value.split(","); - List injection = new ArrayList(); - - // We should have at least 1 real value - if (!((values.length == 1) && ("".equals(values[0])))) { - for (int i = 0; i < values.length; i++) { - String part = values[i]; - injection.add(part.trim()); - } - } - return injection; - } - - /** - * Value used as sequence number by reconfiguration notifications. - */ - private long sequenceNumber; - - /** - * Return a sequence number and increase this number. - * @return a sequence number - */ - public long getSequenceNumber() { - return ++sequenceNumber; - } -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/Base64.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/Base64.java deleted file mode 100644 index ca8251f45b4218b1f317cb90289b0f87dfda6e61..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/Base64.java +++ /dev/null @@ -1,194 +0,0 @@ -/** - * Base64 - encode/decode data using the Base64 encoding scheme - * Copyright (c) 1998 by Kevin Kelley - * Contact: Kevin Kelley - * 30718 Rd. 28, La Junta, CO, 81050 USA. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - */ - -package org.ow2.jonas.lib.util; - -/** - * Provides encoding of raw bytes to base64-encoded characters, and - * decoding of base64 characters to raw bytes. - * - * @author Kevin Kelley (kelley@ruralnet.net) - * @version 1.3 - * @date 06 August 1998 - * @modified 14 February 2000 - * @modified 22 September 2000 - */ -public class Base64 { - - /** - * Default empty constructor for utility class. - */ - private Base64() {} - - /** - * code characters for values 0..63. - */ - private static char[] alphabet = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" - .toCharArray(); - - /** - * lookup table for converting base64 characters to value in range 0..63. - */ - private static byte[] codes = new byte[256]; - - static { - for (int i = 0; i < 256; i++) { - codes[i] = -1; - } - for (int i = 'A'; i <= 'Z'; i++) { - codes[i] = (byte) (i - 'A'); - } - for (int i = 'a'; i <= 'z'; i++) { - codes[i] = (byte) (26 + i - 'a'); - } - for (int i = '0'; i <= '9'; i++) { - codes[i] = (byte) (52 + i - '0'); - } - codes['+'] = 62; - codes['/'] = 63; - } - - - - /** - * returns an array of base64-encoded characters to represent the - * passed data array. - * - * @param data the array of bytes to encode - * @return base64-coded character array. - */ - public static char[] encode(final byte[] data) { - char[] out = new char[((data.length + 2) / 3) * 4]; - - // - // 3 bytes encode to 4 chars. Output is always an even - // multiple of 4 characters. - // - for (int i = 0, index = 0; i < data.length; i += 3, index += 4) { - boolean quad = false; - boolean trip = false; - - int val = (0xFF & (int) data[i]); - val <<= 8; - if ((i + 1) < data.length) { - val |= (0xFF & (int) data[i + 1]); - trip = true; - } - val <<= 8; - if ((i + 2) < data.length) { - val |= (0xFF & (int) data[i + 2]); - quad = true; - } - out[index + 3] = alphabet[(quad ? (val & 0x3F) : 64)]; - val >>= 6; - out[index + 2] = alphabet[(trip ? (val & 0x3F) : 64)]; - val >>= 6; - out[index + 1] = alphabet[val & 0x3F]; - val >>= 6; - out[index + 0] = alphabet[val & 0x3F]; - } - return out; - } - - /** - * Decodes a BASE-64 encoded stream to recover the original - * data. White space before and after will be trimmed away, - * but no other manipulation of the input will be performed. - * - * As of version 1.2 this method will properly handle input - * containing junk characters (newlines and the like) rather - * than throwing an error. It does this by pre-parsing the - * input and generating from that a count of VALID input - * characters. - * @param data BASE-64 encoded stream - * @return original data - **/ - public static byte[] decode(final char[] data) { - // as our input could contain non-BASE64 data (newlines, - // whitespace of any sort, whatever) we must first adjust - // our count of USABLE data so that... - // (a) we don't misallocate the output array, and - // (b) think that we miscalculated our data length - // just because of extraneous throw-away junk - - int tempLen = data.length; - for (int ix = 0; ix < data.length; ix++) { - if ((data[ix] > 255) || codes[ data[ix] ] < 0) { - --tempLen; // ignore non-valid chars and padding - } - } - // calculate required length: - // -- 3 bytes for every 4 valid base64 chars - // -- plus 2 bytes if there are 3 extra base64 chars, - // or plus 1 byte if there are 2 extra. - - int len = (tempLen / 4) * 3; - if ((tempLen % 4) == 3) { - len += 2; - } - if ((tempLen % 4) == 2) { - len += 1; - } - - byte[] out = new byte[len]; - - - - int shift = 0; // # of excess bits stored in accum - int accum = 0; // excess bits - int index = 0; - - // we now go through the entire array (NOT using the 'tempLen' value) - for (int ix = 0; ix < data.length; ix++) { - int value = (data[ix] > 255) ? -1 : codes[ data[ix] ]; - - if (value >= 0) { // skip over non-code - accum <<= 6; // bits shift up by 6 each time thru - shift += 6; // loop, with new bits being put in - accum |= value; // at the bottom. - if (shift >= 8) { // whenever there are 8 or more shifted in, - shift -= 8; // write them out (from the top, leaving any - out[index++] = // excess at the bottom for next iteration. - (byte) ((accum >> shift) & 0xff); - } - } - // we will also have skipped processing a padding null byte ('=') here; - // these are used ONLY for padding to an even length and do not legally - // occur as encoded data. for this reason we can ignore the fact that - // no index++ operation occurs in that special case: the out[] array is - // initialized to all-zero bytes to start with and that works to our - // advantage in this combination. - } - - // if there is STILL something wrong we just have to throw up now! - if (index != out.length) { - throw new Error("Miscalculated data length (wrote " + index + " instead of " + out.length + ")"); - } - - return out; - } - - - -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/BeanNaming.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/BeanNaming.java deleted file mode 100644 index 911de16f51dc320cd36af4048bcf1fa334c74da5..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/BeanNaming.java +++ /dev/null @@ -1,180 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.util; - -import java.io.File; -import java.lang.reflect.Method; -import java.util.StringTokenizer; - -import javax.security.jacc.EJBMethodPermission; - -/** - * This class is made for hiding Naming convention in all JOnAS framework.
    - * (Among other things, names of the implementation classes of the Enterprise - * Bean's Home and Enterprise Bean Remote interfaces generated by the GenIC - * tools.)
    - * It is used by the EJB generation tools and framework - * - * @author Helene Joanin - * @author Joe Gittings has proposed to code method signature in order to avoid same signature for inherited methods - * @author Christophe Ney [cney@batisseurs.com] - * @author Sebastien Chassande-Barrioz - */ -public class BeanNaming { - - /** - * returns the name of the package of the given full name - */ - public static String getPackageName(String name) { - if (name == null) { return null; } - int idx = name.lastIndexOf('.'); - return (idx == -1 ? "" : name.substring(0, idx)); - } - - /** - * return full name of a class for given package and class names - * - * @param packageName - * possibly empty package name - * @param name - * class name - * @return fully qualified class name - */ - public static String getClassName(String packageName, String name) { - return (packageName.length() == 0) ? name : packageName + "." + name; - } - - /** - * returns the basename of the given full name - */ - public static String getBaseName(String fullName) { - String baseName = null; - if (fullName != null) { - int idx = fullName.lastIndexOf('.'); - int len = fullName.length(); - if (idx == -1) { - baseName = fullName; - } else { - if (idx != (len - 1)) { - baseName = fullName.substring(idx + 1, len); - } else { - baseName = ""; - } - } - } - return baseName; - } - - /** - * returns the full path of the file name. mainly replace '.' by '/'. - */ - public static String getPath(String fullName) { - String pkg = new String(); - StringTokenizer stk = new StringTokenizer(fullName, "."); - int nb = stk.countTokens(); - for (int i = 0; i < nb; i++) { - pkg = pkg.concat(stk.nextToken()); - if (i < nb - 1) { - pkg = pkg + File.separatorChar; - } - } - return pkg; - } - - /** - * returns the given string with the first character converted to upper case - */ - public static String firstToUpperCase(String s) { - String value; - if (s.length() > 0) { - char c = Character.toUpperCase(s.charAt(0)); - value = new String(c + s.substring(1)); - } else { - value = new String(); - } - return (value); - } - - /** - * returns the name of the JOnAS specific deployment descriptor file's name - * corresponding to the given standard deployment descriptor file's name. - * (ex: returns "jonas-XXX.xml" for "XXX.xml" and "../../jonas-XXX.xml" for - * "../../XXX.xml") - */ - public static String getJonasXmlName(String stdXmlName) { - - String jonasXmlName = new String(); - File f = new File(stdXmlName); - String p = f.getParent(); - String n = f.getName(); - if (p != null) { - jonasXmlName = jonasXmlName.concat(p); - jonasXmlName = jonasXmlName.concat(File.separator); - } - jonasXmlName = jonasXmlName.concat("jonas-"); - jonasXmlName = jonasXmlName.concat(n); - - return (jonasXmlName); - } - - /** - * returns the name of the parent directory - */ - public static String getParentName(String fileName) { - File f = new File(fileName); - return f.getParent(); - } - - /** - * Gets a string that represents the signature of a method - * - * @param ejbName - * name of the ejb - * @param method - * Method on which the signature is required - * @return string that represents the signature of a method - */ - public static String getSignature(String ejbName, Method method) { - - Class clazz = method.getDeclaringClass(); - String methItf = ""; - - if (javax.ejb.EJBHome.class.isAssignableFrom(clazz)) { - methItf = "Home"; - } else if (javax.ejb.EJBObject.class.isAssignableFrom(clazz)) { - methItf = "Remote"; - } else if (javax.ejb.EJBLocalHome.class.isAssignableFrom(clazz)) { - methItf = "LocalHome"; - } else if (javax.ejb.EJBLocalObject.class.isAssignableFrom(clazz)) { - methItf = "Local"; - } else if (java.rmi.Remote.class.isAssignableFrom(clazz)) { - methItf = "ServiceEndpoint"; - } - - return new EJBMethodPermission(ejbName, methItf, method).getActions(); - } -} - diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/Cmd.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/Cmd.java deleted file mode 100644 index 13951671a060268604c49d3bffd0ddd40a6fc1af..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/Cmd.java +++ /dev/null @@ -1,306 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.util; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.OutputStream; -import java.io.PrintStream; -import java.lang.reflect.Constructor; -import java.lang.reflect.Method; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLClassLoader; -import java.util.Enumeration; -import java.util.Iterator; -import java.util.List; -import java.util.Vector; - -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; - -/** - * This class allows to run a command in sub-process. - * @author Helene Joanin : Initial developer - * @author Christophe Ney : Fix to handle arguments containing white spaces. - * @author Nozomi Matsumura : GenIC i18n problem. GenIC invoke javac and javac's output has non asc-ii characters, - * javac's output did not show collectly. - * @author Guillaume Tulloup : Invoke directly the com.sun.tools.javac.Main.compile() method to work around a limitation on Windows. - * (See bug #100587) - * @author Helene Joanin : Invoke directly the com.sun.tools.rmic.Main.compile() method to work around a limitation on Windows. - */ - -public class Cmd { - - /** - * Class name of the sun javac compiler - */ - private static final String COMPILER_CLASS_NAME = "com.sun.tools.javac.Main"; - /** - * Class name of the sun rmic compiler - */ - private static final String RMICOMPILER_CLASS_NAME = "sun.rmi.rmic.Main"; - - /** - * Command arguments list (included the command name) - */ - private Vector mCmd = new Vector(); - - /** - * Command environment variables - */ - private String[] mEnv = null; - - /** - * Invoke (or not) the compile method of the corresponding sun compiler class - */ - private boolean tryToInvoke = false; - - /** - * The Common Logger. - */ - private static final Logger logger = Log.getLogger("org.ow2.jonas.cmd"); - - /** - * Construtor method of Cmd class. - * @param cmd command - * @param invoke try to invoke directly the method of the java class of the - * command - */ - public Cmd(final String cmd, final boolean invoke) { - mCmd.addElement(cmd); - tryToInvoke = invoke; - } - - /** - * Construtor method of Cmd class. Equivalent to Cmd(cmd, false). - * @param cmd command - */ - public Cmd(final String cmd) { - this(cmd, false); - } - - /** - * Construtor method of Cmd class. - * @param cmd command - * @param env environment of the command - * @param invoke invoke the compile method of the class instead of execute the command - */ - public Cmd(final String cmd, final String[] env, final boolean invoke) { - this(cmd, invoke); - mEnv = env; - } - - /** - * Add a new argument to the command. - * @param arg argument added to the tail of the command argument list - */ - public void addArgument(final String arg) { - mCmd.addElement(arg); - } - - /** - * Add a new argument to the command. - * @param args argument added to the tail of the command argument list - */ - public void addArguments(final List args) { - for (Iterator it = args.iterator(); it.hasNext();) { - mCmd.addElement(it.next()); - } - } - - /** - * Execute the command. (In case of the exit value of the command is not 0, - * the output and error streams of the command is traced.) - * @return false if the command cannot be executed, or if its exit value is - * not 0. - */ - public boolean run() { - - if (tryToInvoke) { - File toolsJar = new File(System.getProperty("java.home") + File.separator + "lib" + File.separator + "tools.jar"); - if (toolsJar.exists()) { - ClassLoader classLoader = getClass().getClassLoader(); - try { - classLoader = new URLClassLoader(new URL[]{toolsJar.toURL()}, classLoader); - } catch (MalformedURLException e) { - logger.log(BasicLevel.WARN, "The tools.jar file was not found in "+ toolsJar.getParent() + "."); - } - - if ((((String) mCmd.get(0)).endsWith("javac"))) { - // Bug #100587 fixed to work around a limitation on Windows - return compile(classLoader); - } - if ((((String) mCmd.get(0)).endsWith("rmic"))) { - return rmicompile(classLoader); - } - } - } - - RunnableStreamListener out, err; - Process proc = null; - boolean val = true; - try { - String[] cmd = new String[mCmd.size()]; - mCmd.copyInto(cmd); - proc = Runtime.getRuntime().exec(cmd, mEnv); - } catch (IOException e) { - logger.log(BasicLevel.ERROR, "exception", e); - return (false); - } - out = new RunnableStreamListener(new BufferedReader(new InputStreamReader(proc.getInputStream())), System.out); - new Thread(out, "stdout listener for " + this.toString()).start(); - err = new RunnableStreamListener(new BufferedReader(new InputStreamReader(proc.getErrorStream())), System.err); - new Thread(err, "stderr listener for " + this.toString()).start(); - try { - val = proc.waitFor() == 0; - } catch (InterruptedException e) { - logger.log(BasicLevel.ERROR, "exception", e); - val = false; - } finally { - // destroy the process - if (proc != null) { - proc.destroy(); - } - } - - return (val); - } - - /** - * invoke the compile method of the compiler javac class - * @return false in error case - */ - private boolean compile(final ClassLoader classLoader) { - // first arg should not be added because it's the name of the command - String[] args = new String[mCmd.size() - 1]; - for (int i = 0; i < mCmd.size() - 1; i++) { - args[i] = (String) mCmd.get(i + 1); - } - - try { - // Use reflection - Class c = Class.forName(COMPILER_CLASS_NAME, false, classLoader); - Object compiler = c.newInstance(); - java.lang.reflect.Method compile = c.getMethod("compile", new Class[] {(new String[] {}).getClass()}); - int result = ((Integer) compile.invoke(compiler, new Object[] {args})).intValue(); - return (result == 0); - } catch (Exception e) { - logger.log(BasicLevel.ERROR, "exception", e); - return false; - } - } - - /** - * invoke the main method of the rmi compiler rmic class - * @return false in error case - */ - private boolean rmicompile(final ClassLoader classLoader) { - // first arg should not be added because it's the name of the command - String[] args = new String[mCmd.size() - 1]; - for (int i = 0; i < mCmd.size() - 1; i++) { - args[i] = (String) mCmd.get(i + 1); - } - - try { - // Use reflection - Class c = Class.forName(RMICOMPILER_CLASS_NAME, false, classLoader); - - Constructor cons = c.getConstructor(new Class[] { OutputStream.class, String.class }); - Object rmic = cons.newInstance(new Object[] { System.out, "rmic" }); - - Method doRmic = c.getMethod("compile", new Class[] { String[].class }); - Boolean result = (Boolean) doRmic.invoke(rmic, new Object[] { args }); - - return result; - } catch (Exception e) { - logger.log(BasicLevel.ERROR, "exception", e); - return false; - } - } - - /** - * @return iterator over the command line - */ - public Iterator getCommandLine() { - return mCmd.iterator(); - } - - /** - * @return the string representation of the object for UI purpose - */ - @Override - public String toString() { - StringBuffer buf = new StringBuffer(); - Enumeration e = mCmd.elements(); - while (e.hasMoreElements()) { - String arg = (String) e.nextElement(); - if (arg == null) { - arg = "null"; - } - for (int i = 0; i < arg.length(); i++) { - if (Character.isWhitespace(arg.charAt(i))) { - arg = "\"" + arg + "\""; - break; - } - } - buf.append(arg); - buf.append(' '); - } - return buf.toString().trim(); - } - -} - -/** - * To run the command happily, and to swallow the stdout from the process - */ -class RunnableStreamListener implements Runnable { - - BufferedReader in_; - - PrintStream stream_; - - RunnableStreamListener(final BufferedReader in, final PrintStream stream) { - in_ = in; - stream_ = stream; - } - - public void run() { - String line; - try { - while ((line = in_.readLine()) != null) { - stream_.println(line); - } - } catch (IOException e) { - stream_.println(e.toString()); - } - - } -} - diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/ConfigurationConstants.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/ConfigurationConstants.java deleted file mode 100644 index b28e8190ef3d65d7da9b19f4d7396237f3273b67..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/ConfigurationConstants.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2008 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.lib.util; - -/** - * @author eyindanga - * - */ -public interface ConfigurationConstants { - - /** - * JOnAS Development mode. - */ - String JONAS_PROPERTIES_PROP = "jonas.properties"; - - - /** - * System property name for JONAS_ROOT. - */ - String JONAS_ROOT_PROP = "jonas.root"; - - /** - * System property name for JONAS_BASE. - */ - String JONAS_BASE_PROP = "jonas.base"; - - /** - * JOnAS Development mode. - */ - String JONAS_DEVELOPER_PROP = "jonas.developer"; - - /** - * File name where JOnAS components versions are stored. - */ - String DEFAULT_JONAS_VERSIONS = "VERSIONS"; - - /** - * Prefix for jonas.properties file - */ - String DEFAULT_JONAS_PREFIX = "jonas"; - /** - * JOnAS server name - */ - String JONAS_NAME_PROP = "jonas.name"; - - /** - * jonas.master property - */ - String JONAS_MASTER_PROP = "jonas.master"; - - /** - * Work directory property. - */ - String WORK_DIRECTORY_PROP = "jonas.workdirectory"; - - /** - * Default work directory name. - */ - String DEFAULT_WORK_DIRECTORY = "work"; - - /** - * configuration directory name (changed from 'config' to 'conf' !!) - */ - String DEFAULT_CONFIG_DIR = "conf"; - - /** - * Default server name - */ - String DEFAULT_JONAS_NAME = "jonas"; - - /** - * Default server name - */ - String DEFAULT_DOMAIN_NAME = "jonas"; - - /** - * domain.name property - */ - String DOMAIN_NAME_PROP = "domain.name"; - -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/DirFilter.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/DirFilter.java deleted file mode 100644 index d49fcb2e8e0c9e6bf4b6f689b1e6f9c2af46e744..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/DirFilter.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.lib.util; - -import java.io.File; -import java.io.FilenameFilter; - -/** - * Filter used to seek directories - * @author durieuxp - */ -public class DirFilter implements FilenameFilter { - - String prefix = null; - String suffix = null; - - public DirFilter(String p1, String s1) { - prefix = p1; - suffix = s1; - } - - public boolean accept(File dir, String name) { - if (name.endsWith("~")) { - return false; - } - if (suffix != null && ! name.endsWith(suffix)) { - return false; - } - if (prefix != null && ! name.startsWith(prefix)) { - return false; - } - return true; - } - -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/Env.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/Env.java deleted file mode 100644 index f0988512daa7ccce841ee7a127568c9d08cd3b70..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/Env.java +++ /dev/null @@ -1,120 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): ____________________________________. - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.util; - -/** - * This class manages global variables and properties used by EJB Server. A - * static design pattern is used. - */ -public class Env { - - /** - * No public constructor : utility class - */ - private Env() { - - } - - // Variables related to Java Version - public static final int JAVA_1_1_6 = 116; - - public static final int JAVA_1_1_7 = 117; - - public static final int JAVA_1_1_8 = 118; - - public static final int JAVA_1_2 = 120; - - public static final int JAVA_1_3 = 130; - - public static final int JAVA_1_4 = 140; - - private static int javaVersion = -1; - - /** - * @return true if the os.name starts with "Windows" - */ - public static boolean isOsWindows() { - String osName = System.getProperty("os.name", ""); - return (osName.startsWith("Windows")); - } - - /** - * @return true if the os.name starts with "Mac OS X" - */ - public static boolean isOsMacOsX() { - String osName = System.getProperty("os.name", ""); - return (osName.startsWith("Mac OS X")); - } - - /** - * Gets Java Version. - * @return javaVersion or -1 if error - */ - public static int getJavaVersion() { - - if (javaVersion == -1) { - // Sets Java Version - String strjv = System.getProperty("java.version", ""); - if (strjv.indexOf("1.1.6") == 0) { - javaVersion = JAVA_1_1_6; - } - if (strjv.indexOf("1.1.7") == 0) { - javaVersion = JAVA_1_1_7; - } - if (strjv.indexOf("1.1.8") == 0) { - javaVersion = JAVA_1_1_8; - } - if (strjv.indexOf("1.2") == 0) { - javaVersion = JAVA_1_2; - } - if (strjv.indexOf("1.3") == 0) { - javaVersion = JAVA_1_3; - } - if (strjv.indexOf("1.4") == 0) { - javaVersion = JAVA_1_4; - } - } - return javaVersion; - } - - /** - * @return true if JDK 1.2 or later - */ - public static boolean isJAVA2() { - return (getJavaVersion() >= JAVA_1_2); - } - - /** - * @return true if JDK 1.4 or later - */ - public static boolean isJAVA4() { - return (getJavaVersion() >= JAVA_1_4); - } -} - diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/I18n.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/I18n.java deleted file mode 100644 index 2d304e8ae00f879fc0148f7e7faf94eb80826e4a..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/I18n.java +++ /dev/null @@ -1,254 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.util; - -import java.text.MessageFormat; -import java.util.HashMap; -import java.util.Locale; -import java.util.Map; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - - -/** - * This class defines the way for getting message with - * ResourceBundle for different language. - * Inspired from http://java.sun.com/docs/books/tutorial/i18n/ - * @author Florent Benoit - */ -public final class I18n { - - /** - * Name of the resource bundle to use. - */ - private static final String RESOURCE_BUNDLE_NAME = "I18n"; - - /** - * List of our I18n objects. - */ - private static Map bundles = null; - - /** - * Internal Resource Bundle. - */ - private ResourceBundle resourceBundle = null; - - /** - * Constructor (private access, use getInstance instead). - * @param packageName name of the package for the bundle - * @param cl the classloader used to load bundle - */ - private I18n(final String packageName, final ClassLoader cl) { - - String bundleName = packageName + "." + RESOURCE_BUNDLE_NAME; - - // Resource bundle is on the form packageName.I18n.properties - try { - Locale locale = Locale.getDefault(); - resourceBundle = ResourceBundle.getBundle(bundleName, locale, cl); - } catch (MissingResourceException mre) { - String err = "Error when trying to get a ResourceBundle for package '" + packageName + "' : " + mre.getMessage(); - throw new IllegalStateException(err); - } - } - - /** - * Gets the instance for a given class. - * @param c the class for which we want a bundle - * @return I18n object - */ - public static I18n getInstance(final Class c) { - return getInstance(c.getPackage().getName(), c.getClassLoader()); - } - - /** - * Gets the instance for a given class. - * @param c the class for which we want a bundle - * @param cl the classloader used to load bundle - * @return I18n object - */ - public static I18n getInstance(final Class c, final ClassLoader cl) { - return getInstance(c.getPackage().getName(), cl); - } - - /** - * Gets the instance for a given package. - * @param packageName the package for which we want a bundle - * @return I18n object - */ - public static I18n getInstance(final String packageName) { - return getInstance(packageName, Thread.currentThread().getContextClassLoader()); - } - - /** - * Gets the instance for a given package. - * @param packageName the package for which we want a bundle - * @param cl the classloader used to load bundle - * @return I18n object - */ - public static I18n getInstance(final String packageName, final ClassLoader cl) { - if (bundles == null) { - bundles = new HashMap(); - } - - I18n i18n = (I18n) bundles.get(packageName); - if (i18n != null) { - return i18n; - } - - - i18n = new I18n(packageName, cl); - bundles.put(packageName, i18n); - return i18n; - } - - /** - * Gets the formatted string with the given arguments. - * @param key the keystring on which to apply arguments - * @param args the object arguments for the formatter - * @return the formatted string - */ - public String getMessage(final String key, final Object[] args) { - String value = getMessage(key); - return MessageFormat.format(value, args); - } - - - /** - * Gets the value of the given key. - * @param key the keystring to retrieve - * @return the value for the given key or the key if the value can not be found - */ - public String getMessage(final String key) { - String ret = null; - - // No bundle, return key - if (resourceBundle == null) { - return key; - } - - try { - ret = resourceBundle.getString(key); - } catch (MissingResourceException mre) { - // key not found, return the key - ret = key; - } - - return ret; - } - - /** - * Gets the formatted string with the given arguments. - * @param key the keystring on which to apply arguments - * @param obj the object argument for the formatter - * @return the formatted string - */ - public String getMessage(final String key, final Object obj) { - return getMessage(key, new Object[] {obj}); - } - - - /** - * Gets the formatted string with the given arguments. - * @param key the keystring on which to apply arguments - * @param obj1 the first object argument for the formatter - * @param obj2 the second object argument for the formatter - * @return the formatted string - */ - public String getMessage(final String key, final Object obj1, final Object obj2) { - return getMessage(key, new Object[] {obj1, obj2 }); - } - - /** - * Gets the formatted string with the given arguments. - * @param key the keystring on which to apply arguments - * @param obj1 the first object argument for the formatter - * @param obj2 the second object argument for the formatter - * @param obj3 the third object argument for the formatter - * @return the formatted string - */ - public String getMessage(final String key, final Object obj1, final Object obj2, final Object obj3) { - return getMessage(key, new Object[] {obj1, obj2, obj3 }); - } - - - /** - * Gets the formatted string with the given arguments. - * @param key the keystring on which to apply arguments - * @param obj1 argument for the formatter - * @param obj2 argument for the formatter - * @param obj3 argument for the formatter - * @param obj4 argument for the formatter - * @return the formatted string - */ - public String getMessage(final String key, final Object obj1, final Object obj2, final Object obj3, final Object obj4) { - return getMessage(key, new Object[] {obj1, obj2, obj3, obj4 }); - } - - - /** - * Gets the formatted string with the given arguments. - * @param key the keystring on which to apply arguments - * @param obj1 argument for the formatter - * @param obj2 argument for the formatter - * @param obj3 argument for the formatter - * @param obj4 argument for the formatter - * @param obj5 argument for the formatter - * @return the formatted string - */ - public String getMessage(final String key, - final Object obj1, - final Object obj2, - final Object obj3, - final Object obj4, - final Object obj5) { - return getMessage(key, new Object[] {obj1, obj2, obj3, obj4, obj5 }); - } - - - /** - * Gets the formatted string with the given arguments. - * @param key the keystring on which to apply arguments - * @param obj1 argument for the formatter - * @param obj2 argument for the formatter - * @param obj3 argument for the formatter - * @param obj4 argument for the formatter - * @param obj5 argument for the formatter - * @param obj6 argument for the formatter - * @return the formatted string - */ - public String getMessage(final String key, - final Object obj1, - final Object obj2, - final Object obj3, - final Object obj4, - final Object obj5, - final Object obj6) { - return getMessage(key, new Object[] {obj1, obj2, obj3, obj4, obj5, obj6 }); - } - -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/JJarFile.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/JJarFile.java deleted file mode 100644 index 5ba8f3e0ef1da3e26696bc0534fc2f912effb5ee..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/JJarFile.java +++ /dev/null @@ -1,120 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.lib.util; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.InputStream; -import java.io.IOException; -import java.util.jar.JarFile; -import java.util.jar.JarEntry; - -/** - * This class implements a JarFile that adds a extract/write method. - * @author Eric Hardesty - */ -public class JJarFile extends JarFile { - - /** - * Size of the buffer. - */ - private static final int BUFFER_SIZE = 2048; - - /** - * Constructs a new JarFile with the specified File. - * @param file the jar file to be opened - */ - public JJarFile(File file) throws IOException { - super(file); - } - - /** - * Constructs a new JarFile with the specified File. - * @param file the jar file to be opened - * @param verity boolean to verify if the JarFile is signed - */ - public JJarFile(File file, boolean verify) throws IOException { - super(file, verify); - } - - /** - * Constructs a new JarFile with the specified File. - * @param file the jar file to be opened - * @param verity boolean to verify if the JarFile is signed - * @param mode int of the mode to open the jar - */ - public JJarFile(File file, boolean verify, int mode) throws IOException { - super(file, verify, mode); - } - - /** - * Constructs a new JarFile with the specified File. - * @param name the name of the jar file to be opened - */ - public JJarFile(String name) throws IOException { - super(name); - } - - /** - * Constructs a new JarFile with the specified File. - * @param name the name of the jar file to be opened - * @param verity boolean to verify if the JarFile is signed - */ - public JJarFile(String name, boolean verify) throws IOException { - super(name, verify); - } - - /** - * Extract the specified Jar Entry to the path given - * @param jEnt the JarEntry to extract - * @param filename the filename to write the extracted file - */ - public void extract(JarEntry jEnt, String filename) throws IOException { - - try { - //File output - FileOutputStream out = new FileOutputStream(filename); - InputStream jis = this.getInputStream(jEnt); - int n = 0; - try { - //buffer - byte buffer[] = new byte[BUFFER_SIZE]; - - while ((n = jis.read(buffer)) > 0) { - out.write(buffer, 0, n); - } - } finally { - out.close(); - jis.close(); - } - } catch (IOException e) { - throw new IOException("Error while uncompressing the file " + filename + ": " + e.getMessage()); - } - - } - -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/JModule.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/JModule.java deleted file mode 100644 index f8f930567d00b322a6cb2030ca641d920af6c0b7..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/JModule.java +++ /dev/null @@ -1,339 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id: - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.util; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Properties; - -import org.ow2.jonas.lib.bootstrap.JProp; - -/** - * This class implements utility methods for the manipulation of application modules. - * @author Adriana Danes - */ -public class JModule { - - /** - * file extension containing the different module types. - */ - public static final String EJBJAR_EXTENSION = "jar"; - public static final String RAR_EXTENSION = "rar"; - public static final String WAR_EXTENSION = "war"; - public static final String EAR_EXTENSION = "ear"; - - /** - * Child directory of a expanded container. - */ - public static final String EJBJAR_CHILD_DIR = "META-INF"; - public static final String RAR_CHILD_DIR = "META-INF"; - public static final String WAR_CHILD_DIR = "WEB-INF"; - public static final String EAR_CHILD_DIR = "META-INF"; - - /** - * xml file in a child directory of a expanded container. - */ - public static final String EJBJAR_CONFIRM_FILE = "ejb-jar.xml"; - public static final String RAR_CONFIRM_FILE = "ra.xml"; - public static final String WAR_CONFIRM_FILE = "web.xml"; - public static final String EAR_CONFIRM_FILE = "application.xml"; - - public static final String JONAS_BASE = JProp.getJonasBase(); - public static final String DEPLOY_DIR = JONAS_BASE + File.separator + "deploy"; - /** - * properties file extension. - */ - public static final String PROPS_EXTENSION = "properties"; - - - /** - * name of the directory containig configuration. - */ - public static final String CONF_DIR = "conf"; - - public static ArrayList getFilesInDir(final String dirName, final String extension) throws Exception { - ArrayList al = new ArrayList(); - File file = new File(dirName); - String[] files = file.list(); - int pos; - String fileName; - if (files != null) { - for (int i = 0; i < files.length; i++) { - file = new File(dirName, files[i]); - if (file.isFile()) { - fileName = file.getName().toLowerCase(); - pos = fileName.lastIndexOf(extension); - if (pos > -1) { - if (pos == (fileName.length() - extension.length())) { - al.add(file.getName()); - } - } - } - } - } - Collections.sort(al); - return al; - } - - public static ArrayList getDatasourcePropsInDir() throws Exception { - // Get all files include in configuration directory - ArrayList al = getFilesInDir(JProp.getJonasBase() + File.separator + CONF_DIR, PROPS_EXTENSION); - // Keep all datasources properties - String sPath; - Properties oProps = new Properties(); - boolean bDelete; - int i = 0; - while (i < al.size()) { - sPath = JProp.getJonasBase() + File.separator + CONF_DIR + File.separator - + al.get(i).toString(); - bDelete = true; - try { - oProps.clear(); - oProps.load(new FileInputStream(sPath)); - // Detect datasource property - if (oProps.getProperty("datasource.name") != null) { - // Remove Extension - int iPos = al.get(i).toString().toLowerCase().lastIndexOf(".properties"); - al.set(i, al.get(i).toString().substring(0, iPos)); - // Next - i++; - bDelete = false; - } - } catch (Exception e) { - // none - } finally { - // Remove no-datasource - if (bDelete) { - al.remove(i); - } - } - } - return al; - } - - public static ArrayList getMailFactoryPropsInDir(final String type) throws Exception { - // Get all files include in configuration directory - ArrayList al = getFilesInDir(JProp.getJonasBase() + File.separator + CONF_DIR, PROPS_EXTENSION); - // Keep all datasources properties - String sPath; - Properties oProps = new Properties(); - boolean bDelete; - int i = 0; - while (i < al.size()) { - sPath = JProp.getJonasBase() + File.separator + CONF_DIR + File.separator - + al.get(i).toString(); - bDelete = true; - try { - oProps.clear(); - oProps.load(new FileInputStream(sPath)); - // Detect mail factory property - if (oProps.getProperty("mail.factory.name") != null) { - boolean bToReturn; - if (type == null) { - // any type OK - bToReturn = true; - } else { - // Check type - if (oProps.getProperty("mail.factory.type").equals(type)) { - bToReturn = true; - } else { - bToReturn = false; - } - } - if (bToReturn) { - // Remove Extension - int iPos = al.get(i).toString().toLowerCase().lastIndexOf(".properties"); - al.set(i, al.get(i).toString().substring(0, iPos)); - // Next - i++; - bDelete = false; - } - } - } catch (Exception e) { - // none - } finally { - // Remove no-mail factory - if (bDelete) { - al.remove(i); - } - } - } - return al; - } - - public static ArrayList getMailFactoryPropsInDir() throws Exception { - return getMailFactoryPropsInDir(null); - } - - /** - * Return the URL list of files (possibly directories) having a given extension located in a given directory. - * @param dirName name of the directory to lookup - * @param extension extension to check - * @return list of URLs of the files/directories which were found - * @throws MalformedURLException If the path cannot be parsed as a URL - * @throws IOException If an I/O error occurs, which is possible because the - * construction of the canonical pathname may require - * file system queries - */ - public static ArrayList getInstalledFileInDir(final String dirName, final String extension) throws MalformedURLException, IOException { - ArrayList al = new ArrayList(); - // Search all files in directory - File oFile = new File(dirName); - String[] asFiles = oFile.list(); - if (asFiles != null) { - // Loop for each found file - for (int i = 0; i < asFiles.length; i++) { - oFile = new File(dirName, asFiles[i]); - // Detect extension - String sFilename = oFile.getName().toLowerCase(); - int iPos = sFilename.lastIndexOf(extension); - if (iPos > -1 && iPos == (sFilename.length() - extension.length())) { - URL url = oFile.getCanonicalFile().toURL(); - al.add(url); - } - } - } - return al; - } - - /** - * Return the list of all installed containers in a directory. - * The container may be :
    - * - a archive file container with a known extension : jar, war, ear, rar
    - * - a directory where the container is expanded
    - * To control if a directory contains a expanded container, it's necessary - * to provide the child directory and the xml file that confirm the expanded container.
    - * Parameter example to retrieve :
    - * - web application : war, WEB-INF, web.xml - * - application : ear, META-INF, application.xml - * - ejb container : jar, META-INF, ejb-jar.xml - * - resource : rar, META-INF, ra.xml - * - * @param p_DirName The name of the directory to find - * @param p_Extension The extension of container (jar, war, ear, rar) - * @param p_DirChildConfirm The child directory that confirm the container - * @param p_FileConfirm The xml file inside the child directory that confirm the container - * @return A list of absolute path container - * @throws Exception - */ - public static ArrayList getInstalledContainersInDir(final String p_DirName, - final String p_Extension, - final String p_DirChildConfirm, - final String p_FileConfirm) - throws Exception { - - // Return variable - ArrayList al = new ArrayList(); - // Variables used in loop - int iPos; - String sFilename; - File oDirChild; - File oFileConfirm; - // Search all files in directory - File oFile = new File(p_DirName); - String[] asFiles = oFile.list(); - - if (asFiles != null) { - // Loop for each found file - for (int i = 0; i < asFiles.length; i++) { - oFile = new File(p_DirName, asFiles[i]); - // Detect file with extension - if (oFile.isFile()) { - sFilename = oFile.getName().toLowerCase(); - iPos = sFilename.lastIndexOf(p_Extension); - if (iPos > -1) { - if (iPos == (sFilename.length() - p_Extension.length())) { - al.add(oFile.getCanonicalFile().toURL().getPath()); - } - } - } - // Detect directory of expanded container - else if (oFile.isDirectory()) { - oDirChild = new File(oFile, p_DirChildConfirm); - if (oDirChild.exists() && oDirChild.isDirectory()) { - oFileConfirm = new File(oDirChild, p_FileConfirm); - if (oFileConfirm.exists()) { - al.add(oFile.getCanonicalFile().toURL().getPath()); - } - } - } - } - } - return al; - } - - /** - * Return the list of all installed modules/apps in a directory. - * The container may be :
    - * - a archive file container with a known extension : jar, war, ear, rar
    - * - a directory where the container is expanded
    - * - * @param dirName The name of the directory to find - * @param extension The extension of container (jar, war, ear, rar) - * @return A list of absolute paths - * @throws Exception - */ - public static ArrayList getInstalledContainersInDir(final String dirName, final String extension) - throws Exception { - - // Return variable - ArrayList al = new ArrayList(); - // Variables used in loop - int iPos; - String sFilename; - // Search all files in directory - File oFile = new File(dirName); - String[] asFiles = oFile.list(); - - if (asFiles != null) { - // Loop for each found file - for (int i = 0; i < asFiles.length; i++) { - oFile = new File(dirName, asFiles[i]); - // Detect file with extension - if (oFile.isFile()) { - sFilename = oFile.getName().toLowerCase(); - iPos = sFilename.lastIndexOf(extension); - if (iPos > -1) { - if (iPos == (sFilename.length() - extension.length())) { - al.add(oFile.getCanonicalFile().toURL().getPath()); - } - } - } - // Detect directory of expanded container - else if (oFile.isDirectory()) { - // yet not support - } - } - } - return al; - } - -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/JNDIUtils.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/JNDIUtils.java deleted file mode 100644 index 10ded06de956db9620d0b3376e07eeeb841c77b7..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/JNDIUtils.java +++ /dev/null @@ -1,220 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Guillaume Sauthier - * Contributor(s): - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.lib.util; - -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; - -import javax.naming.BinaryRefAddr; -import javax.naming.RefAddr; -import javax.naming.Reference; -import javax.naming.StringRefAddr; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.OptionalDataException; - -/** - * JNDIUtils groups all commonly used methods for JNDI. - * @author Guillaume Sauthier - */ -public class JNDIUtils { - - /** - * Private empty Constructor for Utility classes - */ - private JNDIUtils() { } - - /** - * Return an array of byte from a given object - * @param obj the object from which we must extract the bytes. - * @return the byte[] from an object - */ - public static byte[] getBytesFromObject(Object obj) { - return getBytesFromObject(obj, null); - } - - /** - * Return an array of byte from a given object - * @param obj the object from which we must extract the bytes. - * @param logger logger to log exceptions - * @return the byte[] from an object - */ - public static byte[] getBytesFromObject(Object obj, Logger logger) { - - if (obj == null) { - return null; - } - - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - - ObjectOutputStream oos = null; - byte[] bytes = null; - - try { - oos = new ObjectOutputStream(baos); - oos.writeObject(obj); - bytes = baos.toByteArray(); - } catch (Exception e) { - //Can't tranform - return null; - } finally { - try { - oos.close(); - baos.close(); - } catch (Exception e) { - if (logger != null) { - logger.log(BasicLevel.DEBUG, "Cannot close output streams : '" + e.getMessage() + "'"); - } - } - } - return bytes; - } - - /** - * Return an object from an array of bytes. Useful for BinaryRefAddr - * Useful for BinaryRefAddr - * @param bytes an array of bytes - * @return an object or null if there is an error of if it's empty - */ - public static Object getObjectFromBytes(byte[] bytes) { - return getObjectFromBytes(bytes, null); - } - - /** - * Return an object from an array of bytes. - * Useful for BinaryRefAddr - * @param bytes an array of bytes - * @param logger logger to log exceptions - * @return an object or null if there is an error of if it's empty - */ - public static Object getObjectFromBytes(byte[] bytes, Logger logger) { - //Declaration - ByteArrayInputStream bis = null; - ObjectInputStream ois = null; - Object obj = null; - - if (bytes == null) { - return null; - } - - bis = new ByteArrayInputStream(bytes); - try { - ois = new ObjectInputStream(bis); - obj = ois.readObject(); - - } catch (ClassNotFoundException cfe) { - if (logger != null) { - logger.log(BasicLevel.DEBUG, "Cannot get object from bytes : " + cfe.getMessage()); - } - } catch (OptionalDataException ode) { - if (logger != null) { - logger.log(BasicLevel.DEBUG, "Cannot get object from bytes : " + ode.getMessage()); - } - } catch (IOException ioe) { - if (logger != null) { - logger.log(BasicLevel.DEBUG, "Cannot get object from bytes : " + ioe.getMessage()); - } - } finally { - try { - bis.close(); - ois.close(); - } catch (Exception e) { - if (logger != null) { - logger.log(BasicLevel.DEBUG, "Cannot close input stream : " + e.getMessage()); - } - } - } - return obj; - } - - /** - * Insert a key/value String/String couple in the given Reference as a StringRefAddr. - * @param ref Reference to be modified - * @param key Address' key - * @param value Address' value - */ - public static void insertInto(final Reference ref, final String key, final String value) { - if (value != null) { - RefAddr addr = new StringRefAddr(key, value); - ref.add(addr); - } // else, print a debug message ? - } - - /** - * Insert a key/value String/Object couple in the given Reference after serialization of the value. - * @param ref Reference to be modified - * @param key Address' key - * @param value Object value (will be serialized) - */ - public static void insertInto(final Reference ref, final String key, final Object value) { - if (value != null) { - RefAddr addr = new BinaryRefAddr(key, getBytesFromObject(value)); - ref.add(addr); - } // else, print a debug message ? - } - - /** - * Extract a String value with the given key, from the Reference. - * @param ref Reference that holds the value within - * @param key Key of the value - * @return the String value - */ - public static String extractStringFrom(final Reference ref, final String key) { - StringRefAddr addr = (StringRefAddr) ref.get(key); - if (addr == null) { - return null; - } - return (String) addr.getContent(); - } - - /** - * Extract an Object from the Reference. Notice that this object have to - * be castable to the given Class parameter. The ClassLoader where this - * class live is used to deserialize the object. - * If it cannot load the requested class, a ClassLoading error will probably occur. - * @param ref Reference that holds the serialized version of the requested object - * @param key Object's key - * @param type Object's type (may be an interface) - * @return an Object casted with Class - */ - public static T extractObjectFrom(final Reference ref, - final String key, - final Class type) { - BinaryRefAddr addr = (BinaryRefAddr) ref.get(key); - if (addr == null) { - return null; - } - byte[] serialized = (byte[]) addr.getContent(); - Object result = getObjectFromBytes(serialized); - return type.cast(result); - } - -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/JonasObjectName.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/JonasObjectName.java deleted file mode 100644 index f67e3cccd0f3b94f4a4f3851a01ac31813b38447..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/JonasObjectName.java +++ /dev/null @@ -1,855 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.util; - -import javax.management.MalformedObjectNameException; -import javax.management.ObjectName; - -/** - * A set of static classes used to build the names of proprietary MBeans used in JOnAS and in Joram. - * @author Bruno Michel - * @author Guillaume Riviere - * @author Florent Benoit - * @author Ludovic Bert - * @author Miroslav Halas - * @author Adriana Danes - */ -public class JonasObjectName { - - /** - * Create ObjectName for the JMX Connector Server which is an MBean inside the target MBeanServer. - * @param protocol used protocol - * @param connectorName name used to distinguish connector servers using the same protocol - * @return ObjectName for the JMX Connector Server MBean - */ - public static ObjectName jmxConnectorServer(final String protocol, final String connectorName) { - try { - return ObjectName.getInstance("connectors:protocol=" + protocol + ",name=" + connectorName); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * @param domainName domain name - * @return ObjectName for reconfiguration manager MBean - */ - public static ObjectName serverConfig(final String domainName) { - try { - return ObjectName.getInstance(domainName + ":type=management,name=reconfigManager"); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * @param domainName the domain name - * @return ObjectName for an web services - */ - public static ObjectName wsService(final String domainName) { - try { - return ObjectName.getInstance(domainName + ":type=WebService,*"); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * @param domainName the domain name - * @return ObjectName for the ejb service MBean - */ - public static ObjectName ejbService(final String domainName) { - try { - return ObjectName.getInstance(domainName + ":type=service,name=ejbContainers"); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * @param domainName the domain name - * @return ObjectName for the ejb3 service MBean - */ - public static ObjectName ejb3Service(final String domainName) { - try { - return ObjectName.getInstance(domainName + ":type=service,name=ejb3"); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * @param domainName the domain name - * @return ObjectName for the validation service MBean - */ - public static ObjectName validationService(final String domainName) { - try { - return ObjectName.getInstance(domainName + ":type=service,name=validation"); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * Return the earService (Jmx). - * @param domainName the domain name - * @return the Ear service. - */ - public static ObjectName earService(final String domainName) { - try { - return ObjectName.getInstance(domainName + ":type=service,name=ear"); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * Return the deployableMonitorService (Jmx). - * @param domainName the domain name - * @return the DeployableMonitor service. - */ - public static ObjectName deployableMonitorService(final String domainName) { - try { - return ObjectName.getInstance(domainName + ":type=service,name=depmonitor"); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * Return the mailService (Jmx). - * @param domainName the domain name - * @return the Mail service. - */ - public static ObjectName mailService(final String domainName) { - try { - return ObjectName.getInstance(domainName + ":type=service,name=mail"); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * Return the JNDI Interceptors Object Name (Jmx). - * @param domainName the domain name - * @return the ObjectName of the JNDI Interceptor component. - */ - public static ObjectName jndiInterceptors(final String domainName) { - try { - return ObjectName.getInstance(domainName + ":type=service,name=jndi-interceptors"); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * ObjectName for a given context interceptor. - * @param domainName the JMX domain - * @param interceptorName the name of the interceptor - * @return the built object name - */ - public static ObjectName jndiContextInterceptor(final String domainName, final String interceptorName) { - try { - StringBuffer sb = new StringBuffer(domainName); - sb.append(":type=service"); - sb.append(",name=jndi-interceptors"); - sb.append(",interceptor="); - sb.append(interceptorName); - return new ObjectName(sb.toString()); - } catch (javax.management.MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - - - /** - * Return the webContainerService MBean ObjectName. - * @param domainName the domain name - * @return the web container service. - */ - public static ObjectName webContainerService(final String domainName) { - try { - return ObjectName.getInstance(domainName + ":type=service,name=webContainers"); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * Return the jaxrpcService MBean ObjectName - * @param domainName the domain name - * @return the JAX-RPC service. - */ - public static ObjectName jaxrpcService(final String domainName) { - try { - return ObjectName.getInstance(domainName + ":type=service,name=jaxrpc"); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * Return the jaxwsService MBean ObjectName - * @param domainName the domain name - * @return the JAX-WS service. - */ - public static ObjectName jaxwsService(final String domainName) { - try { - return ObjectName.getInstance(domainName + ":type=service,name=jaxws"); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * Return the wsdlPublisher MBean ObjectName - * @param domainName the domain name - * @return the WSDL Publisher service. - */ - public static ObjectName wsdlPublisherService(final String domainName) { - try { - return ObjectName.getInstance(domainName + ":type=service,name=wsdl-publisher"); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * @param domainName the domain name - * @return ObjectName for dbm service MBean - */ - public static ObjectName databaseService(final String domainName) { - try { - return ObjectName.getInstance(domainName + ":type=service,name=database"); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * @param domainName the domain name - * @return ObjectName for resource service MBean - */ - public static ObjectName resourceService(final String domainName) { - try { - return ObjectName.getInstance(domainName + ":type=service,name=resource"); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * @param domainName the domain name - * @return ObjectName for jtm service MBean - */ - public static ObjectName transactionService(final String domainName) { - try { - return ObjectName.getInstance(domainName + ":type=service,name=jtm"); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * @param domainName domain name - * @return ObjectName for JOnAS logging MBeans - */ - public static ObjectName logService(final String domainName) { - try { - return ObjectName.getInstance(domainName + ":type=service,name=log"); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - /** - * @return ObjectName for JOnAS logging MBeans - */ - public static ObjectName logService() { - try { - return ObjectName.getInstance("*:type=service,name=log"); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * Create ObjectName for the LogBuffer MBean - * @param domainName domain name - * @param name LogBuffer name - * @return ObjectName for the LogBuffer MBean - */ - public static ObjectName logBuffer(final String domainName, final String name) { - try { - return ObjectName.getInstance(domainName + ":type=LogBuffer,name=" + name); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * Create ObjectName for the LogBuffer MBean - * @param domainName domain name - * @param name LogBuffer name - * @return ObjectName for the LogBuffer MBean - */ - public static ObjectName logBuffers(final String domainName) { - try { - return ObjectName.getInstance(domainName + ":type=LogBuffer,*"); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - /** - * Construct ObjectName for the discovery service MBean - * @param domainName the domain name - * @return ObjectName for the discovery service MBean - */ - public static ObjectName discoveryService(final String domainName) { - try { - return ObjectName.getInstance(domainName + ":type=service,name=discovery"); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * @param domainName the domain name - * @return ObjectName for jms service MBean - */ - public static ObjectName jmsService(final String domainName) { - try { - return ObjectName.getInstance(domainName + ":type=service,name=jms"); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * @param domainName the domain name - * @return ObjectName for jtm service MBean - */ - public static ObjectName securityService(final String domainName) { - try { - return ObjectName.getInstance(domainName + ":type=service,name=security"); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * @return ObjectName for jmx service MBean - */ - public static ObjectName jmxService() { - try { - return ObjectName.getInstance("JMImplementation:type=MBeanServerDelegate"); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * War MBean ObjectName - * @param domainName domain name - * @param filename name of the file containing the war - * @return War MBean ObjectName - * @throws MalformedObjectNameException Could not construct ObjectName - */ - public static ObjectName war(final String domainName, final String filename) - throws MalformedObjectNameException { - return ObjectName.getInstance(domainName + ":type=war,fname=" + fileNameForObjectName(filename)); - } - - /** - * Return an objectName for the WorkCleaner. - * @param domainName domain name - * @return an objectName for the WorkCleaner - */ - public static ObjectName workCleaner(final String domainName) { - try { - return ObjectName.getInstance(domainName + ":type=service,name=workcleaner"); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * Return an objectName for the versioning service. - * @param domainName domain name - * @return an objectName for the versioning service. - */ - public static ObjectName versioning(final String domainName) { - try { - return ObjectName.getInstance(domainName + ":type=service,name=versioning"); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * Return an objectName for the smartclient service. - * @param domainName domain name - * @return an objectName for the smartclient service. - */ - public static ObjectName smartclient(final String domainName) { - try { - return ObjectName.getInstance(domainName + ":type=service,name=smartclient"); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * Return an objectName for the WorkManager - * @param domainName domain name - * @return an objectName for the WorkManager - */ - public static ObjectName workManager(final String domainName) { - try { - return ObjectName.getInstance(domainName + ":type=service,name=workmanager"); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * Return an objectName for a Security memory factory. - * @param domainName the domain name - * @param name the name of the security memory factory - * @return an objectName for the security memory factory. - * @throws MalformedObjectNameException if the objectname can't be build - */ - public static ObjectName securityMemoryFactory(final String domainName, final String name) - throws MalformedObjectNameException { - return ObjectName.getInstance(domainName + ":type=securityfactory,subtype=memory,name=" + name); - } - - /** - * Return an objectName for a Security datasource factory. - * @param domainName the domain name - * @param name the name of the security datasource factory - * @return an objectName for the security datasource factory. - * @throws MalformedObjectNameException if the objectname can't be build - */ - public static ObjectName securityDatasourceFactory(final String domainName, final String name) - throws MalformedObjectNameException { - return ObjectName.getInstance(domainName + ":type=securityfactory,subtype=datasource,name=" + name); - } - - /** - * Return an objectName for a Security ldap factory. - * @param domainName the domain name - * @param name the name of the security ldap factory - * @return an objectName for the security ldap factory. - * @throws MalformedObjectNameException if the objectname can't be build - */ - public static ObjectName securityLdapFactory(final String domainName, final String name) - throws MalformedObjectNameException { - return ObjectName.getInstance(domainName + ":type=securityfactory,subtype=ldap,name=" + name); - } - - /** - * Return an objectName for a user - * @param resource the name of the resource on which the user depends - * @param username the name of the user - * @param domainName the domain name - * @return an objectName for the user MBean - * @throws MalformedObjectNameException if the objectname can't be build - */ - public static ObjectName user(final String domainName, final String resource, final String username) - throws MalformedObjectNameException { - return ObjectName.getInstance(domainName + ":type=security,subtype=users,resource=" + resource - + ",name=" + username); - } - - /** - * Return an objectName for a group - * @param resource the name of the resource on which the group depends - * @param groupname the name of the group - * @param domainName the domain name - * @return an objectName for the group MBean - * @throws MalformedObjectNameException if the objectname can't be build - */ - public static ObjectName group(final String domainName, final String resource, final String groupname) - throws MalformedObjectNameException { - return ObjectName.getInstance(domainName + ":type=security,subtype=groups,resource=" + resource - + ",name=" + groupname); - } - - /** - * Return an objectName for a role - * @param resource the name of the resource on which the role depends - * @param rolename the name of the role - * @param domainName the domain name - * @return an objectName for the user MBean - * @throws MalformedObjectNameException if the objectname can't be build - */ - public static ObjectName role(final String domainName, final String resource, final String rolename) - throws MalformedObjectNameException { - return ObjectName.getInstance(domainName + ":type=security,subtype=roles,resource=" + resource - + ",name=" + rolename); - } - - /** - * ObjectName for all war MBeans in the domain - * @param domainName domain name - * @return ObjectName for all war MBeans in the domain - */ - public static ObjectName allWars(final String domainName) { - try { - return ObjectName.getInstance(domainName + ":type=war,*"); - } catch (MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - public static String getType(final ObjectName obj) { - return obj.getKeyProperty("type"); - } - - public static String fileNameForObjectName(final String fileName) { - return fileName.replace(':', '|'); - } - - /** - * Return an objectName for the Security factory name. - * @param domainName the domain name - * @return an objectName for the security factory name. - * @throws MalformedObjectNameException if the objectname can't be build - */ - public static ObjectName allSecurityFactories(final String domainName) - throws MalformedObjectNameException { - return ObjectName.getInstance(domainName + ":type=securityfactory,*"); - } - - /** - * Return an objectName for all the Security memory factories. - * @param domainName the domain name - * @return an objectName for all the security memory factories - * @throws MalformedObjectNameException if the objectname can't be build - */ - public static ObjectName allSecurityMemoryFactories(final String domainName) - throws MalformedObjectNameException { - return ObjectName.getInstance(domainName + ":type=securityfactory,subtype=memory,*"); - } - - /** - * Return an objectName for all the Security datasource factories. - * @param domainName the domain name - * @return an objectName for all the security datasource factories - * @throws MalformedObjectNameException if the objectname can't be build - */ - public static ObjectName allSecurityDatasourceFactories(final String domainName) - throws MalformedObjectNameException { - return ObjectName.getInstance(domainName + ":type=securityfactory,subtype=datasource,*"); - } - - /** - * Return an objectName for all the Security ldap factories. - * @param domainName the domain name - * @return an objectName for all the security ldap factories - * @throws MalformedObjectNameException if the objectname can't be build - */ - public static ObjectName allSecurityLdapFactories(final String domainName) - throws MalformedObjectNameException { - return ObjectName.getInstance(domainName + ":type=securityfactory,subtype=ldap,*"); - } - - /** - * Return an objectName for all users in a resource. - * @param domainName the management domain name - * @param pResource the name of the resource on which the user depends - * @return an objectName for the user MBean - * @throws MalformedObjectNameException if the objectname can't be build - */ - public static ObjectName allUsers(final String domainName, final String pResource) - throws MalformedObjectNameException { - return ObjectName.getInstance(domainName + ":type=security,subtype=users,resource=" - + pResource + ",*"); - } - - /** - * Return an objectName for all roles in a resource. - * @param domainName the management domain name - * @param pResource the name of the resource on which the role depends - * @return an objectName for the user MBean - * @throws MalformedObjectNameException if the objectname can't be build - */ - public static ObjectName allRoles(final String domainName, final String pResource) - throws MalformedObjectNameException { - return ObjectName.getInstance(domainName + ":type=security,subtype=roles,resource=" - + pResource + ",*"); - } - - /** - * Return an objectName for all groups in a resource. - * @param domainName the management domain name - * @param pResource the name of the resource on which the group depends - * @return an objectName for the user MBean - * @throws MalformedObjectNameException if the objectname can't be build - */ - public static ObjectName allGroups(final String domainName, final String pResource) - throws MalformedObjectNameException { - return ObjectName.getInstance(domainName + ":type=security,subtype=groups,resource=" - + pResource + ",*"); - } - - /** - * A different implementation should allow returning a logical name. - * This is done currently in the invoke method of ManagementReprImpl/Mx4jManagementReprImpl classes. - * @return String representation of the ObjectName - */ - @Override - public String toString() { - return super.toString(); - } - - /** - * @return ObjectName for discovery manager MBean - * @param domainName the management domain name - * @exception MalformedObjectNameException Could not create ObjectName with the given String - */ - public static ObjectName discoveryManager(final String domainName) throws MalformedObjectNameException { - return ObjectName.getInstance(domainName + ":type=management,name=discoveryManager,server=JOnAS"); - } - - /** - * @return ObjectName for Jgroups discovery manager MBean - * @param domainName the management domain name - * @exception MalformedObjectNameException Could not create ObjectName with the given String - */ - public static ObjectName jgroupsDiscoveryManager(final String domainName, final String discoveryType, final String srvName) throws MalformedObjectNameException { - return ObjectName.getInstance(domainName + ":type=management,name=discoveryManager"+discoveryType+",server="+srvName); - } - - /** - * @return ObjectName for discovery client MBean - * @param domainName the management domain name - * @exception MalformedObjectNameException Could not create ObjectName with the given String - */ - public static ObjectName discoveryClient(final String domainName) throws MalformedObjectNameException { - return ObjectName.getInstance(domainName + ":type=management,name=discoveryClient,server=JOnAS"); - } - /** - * @return ObjectName for discovery enroller MBean - * @param domainName the management domain name - * @exception MalformedObjectNameException Could not create ObjectName with the given String - */ - public static ObjectName discoveryEnroller(final String domainName) throws MalformedObjectNameException { - return ObjectName.getInstance(domainName + ":type=management,name=discoveryEnroller,server=JOnAS"); - } - - /** - * @return ObjectName for ServerProxy MBean - * @exception MalformedObjectNameException Could not create ObjectName with the given String - */ - public static ObjectName serverProxy(final String domainName, final String serverName) throws MalformedObjectNameException { - return ObjectName.getInstance(domainName + ":type=ServerProxy,name=" + serverName); - } - - /** - * @return ObjectName for ServerProxy MBean - * @exception MalformedObjectNameException Could not create ObjectName with the given String - */ - public static ObjectName serverProxys(final String domainName) throws MalformedObjectNameException { - return ObjectName.getInstance(domainName + ":type=ServerProxy,*"); - } - - /** - * Build an ObjectName for a Cluster defined by its type and its name. - * @param name Name of the Cluster - * @param type Type: JkCluster, TomcatCluster, JoramCluster, EjbHaCluster, CmiCluster, ... - * @return ObjectName for a Cluster - * @throws MalformedObjectNameException - */ - public static ObjectName cluster(final String domainName, final String name, final String type) throws MalformedObjectNameException { - return ObjectName.getInstance(domainName + ":type=" + type + ",name=" + name); - } - - /** - * Build an ObjectName for a Cluster defined by its type only. - * @param type Type: JkCluster, TomcatCluster, JoramCluster, EjbHaCluster, CmiCluster, ... - * @return ObjectName for a Cluster - * @throws MalformedObjectNameException - */ - public static ObjectName clusters(final String domainName, final String type) throws MalformedObjectNameException { - return ObjectName.getInstance(domainName + ":type=" + type + ",*"); - } - - /** - * Build an ObjectName for a ClusterMember. - * All ClusterMember have the same type, regardless the cluster type. - * @param name Name of the ClusterMember - * @param type type of the cluster (ex: JkCluster or TomcatCluster) - * @param cluster Name of the Cluster - * @return ObjectName for a ClusterMember - * @throws MalformedObjectNameException - */ - public static ObjectName clusterMember(final String domainName, final String name, final String type, final String cluster) throws MalformedObjectNameException { - return ObjectName.getInstance(domainName + ":type=" + type + "Member,name=" + name + "," + type + "=" + cluster); - } - - public static ObjectName clusterDaemon(final String domainName) throws Exception { - return ObjectName.getInstance(domainName + ":type=ClusterDaemon"); - } - - /** - * @param name name of the ClusterDaemon - * @return - * @exception MalformedObjectNameException Could not create ObjectName with the given String - */ - public static ObjectName clusterDaemonProxy(final String domainName, final String name) throws MalformedObjectNameException { - return ObjectName.getInstance(domainName + ":type=ClusterDaemonProxy,name=" + name); - } - - /** - * @param name name of the ClusterDaemon - * @return - * @exception MalformedObjectNameException Could not create ObjectName with the given String - */ - public static ObjectName clusterDaemonProxys(final String domainName) throws MalformedObjectNameException { - return ObjectName.getInstance(domainName + ":type=ClusterDaemonProxy,*"); - } - - /** - * @param domainName the management domain name - * @return ObjectName for the generic archive configurationMBean - */ - public static ObjectName ArchiveConfig(final String domainName) { - try { - return new ObjectName(":type=archiveConfig,name=ArchiveConfigMBean"); - } catch (javax.management.MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * @param domainName the management domain name - * @return ObjectName for RAR specific archive configuration MBean - */ - public static ObjectName RarConfig(final String domainName) { - try { - return new ObjectName(":type=archiveConfig,name=RarConfigMBean"); - } catch (javax.management.MalformedObjectNameException e) { - // this should never occur - return null; - } - } - - /** - * @param domainName - * @return - * @throws MalformedObjectNameException - */ - public static ObjectName jgroupsDiscoveryCommManager(final String domainName, final String discoveryType, final String srvName) throws MalformedObjectNameException { - return ObjectName.getInstance(domainName + ":type=management,name=discoveryCommManager"+discoveryType+",server="+srvName); - } - - /** - * Build an ObjectName for the CMIClient MBean. - * @param domainName the management domain name - * @param serverName the managed server - * @return ObjectName for a CMIClient - * @throws MalformedObjectNameException if an ObjectName cannot be created with the given String - */ - public static ObjectName cmiClient(final String domainName, final String serverName) throws MalformedObjectNameException { - return ObjectName.getInstance(domainName + ":type=cmi,name=CMIClient,J2EEServer=" + serverName); - } - - /** - * Build an ObjectName for the CMIServer MBean. - * @param domainName the management domain name - * @param serverName the managed server - * @return ObjectName for a CMIServer - * @throws MalformedObjectNameException if an ObjectName cannot be created with the given String - */ - public static ObjectName cmiServer(final String domainName, final String serverName) throws MalformedObjectNameException { - return ObjectName.getInstance(domainName + ":type=cmi,name=CMIServer,J2EEServer=" + serverName); - } - - /** - * Build an ObjectName for the Repository MBean. - * @param domainName the management domain name - * @return ObjectName for a Repository Service - * @throws MalformedObjectNameException if an ObjectName cannot be created with the given String - */ - public static ObjectName repository(final String domainName) throws MalformedObjectNameException { - return ObjectName.getInstance(domainName +":type=deployment,name=repository"); - } - - /** - * Build an ObjectName for the DeploymentPlan MBean. - * @param domainName the management domain name - * @return ObjectName for a deploymentPlan Service - * @throws MalformedObjectNameException if an ObjectName cannot be created with the given String - */ - public static ObjectName deploymentPlan(final String domainName) throws MalformedObjectNameException { - return ObjectName.getInstance(domainName +":type=deployment,name=deploymentPlan"); - } - - - /** - * Build an ObjectName for the ResourceMonitor MBean. - * @param domainName the management domain name - * @return ObjectName for a resource monitor Service - * @throws MalformedObjectNameException if an ObjectName cannot be created with the given String - */ - public static ObjectName resourceMonitor(final String domainName) throws MalformedObjectNameException { - return ObjectName.getInstance(domainName +":type=deployment,name=resourceMonitor"); - } -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/JoramObjectName.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/JoramObjectName.java deleted file mode 100644 index 21c3675dc949112b28fd0bfb9e94c284cd5bf070..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/JoramObjectName.java +++ /dev/null @@ -1,138 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005-2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.util; - -import javax.management.MalformedObjectNameException; -import javax.management.ObjectName; - -/** - * A set of static methods used to build the names of proprietary MBeans used in Joram. - * @author Adriana Danes - */ -public class JoramObjectName { - - /** - * JORAM MOM Domain. - */ - static final String JORAM_DOMAIN = "Joram"; - - /** - * JORAM Client Domain. - */ - static final String JORAM_CLIENT_DOMAIN = "joramClient"; - - /** - * @return Returns an ObjectName pattern for JORAM Client MBeans. - * @throws MalformedObjectNameException Could not create {@link ObjectName} - */ - public static ObjectName joramClientMBeans() throws MalformedObjectNameException { - return ObjectName.getInstance(JORAM_CLIENT_DOMAIN + ":*"); - } - - /** - * @return ObjectName for the current JoramAdapter MBean - * @exception MalformedObjectNameException Could not create ObjectName with the given String - */ - public static ObjectName joramAdapter() throws MalformedObjectNameException { - return ObjectName.getInstance(JORAM_CLIENT_DOMAIN + ":type=JoramAdapter"); - } - - /** - * Create ObjectName for a Joram managed queue. - * @param name queue name - * @return ObjectName for a Joram managed queue - * @exception MalformedObjectNameException Could not create ObjectName with the given String - */ - public static ObjectName joramQueue(final String name) throws MalformedObjectNameException { - return ObjectName.getInstance(JORAM_CLIENT_DOMAIN + ":type=Queue,name=" + name); - } - - /** - * Create ObjectName for all Joram managed queues - * @return ObjectName for a Joram managed queue - * @exception MalformedObjectNameException Could not create ObjectName with the given String - */ - public static ObjectName joramQueues() throws MalformedObjectNameException { - return ObjectName.getInstance(JORAM_CLIENT_DOMAIN + ":type=Queue,*"); - } - - /** - * Create ObjectName for a Joram managed dead message queue. - * @param name queue name - * @return ObjectName for a Joram managed dead message queue - * @exception MalformedObjectNameException Could not create ObjectName with the given String - */ - public static ObjectName joramDmQueue(final String name) throws MalformedObjectNameException { - return ObjectName.getInstance(JORAM_CLIENT_DOMAIN + ":type=Queue.dmq,name=" + name); - } - /** - * Create ObjectName for all Joram managed dead message queues - * @return ObjectName for a Joram managed dead message queue - * @exception MalformedObjectNameException Could not create ObjectName with the given String - */ - public static ObjectName joramDmQueues() throws MalformedObjectNameException { - return ObjectName.getInstance(JORAM_CLIENT_DOMAIN + ":type=Queue.dmq,*"); - } - - /** - * Create ObjectName for a Joram managed topic - * @param name topic name - * @return ObjectName for a Joram managed topic - * @exception MalformedObjectNameException Could not create ObjectName with the given String - */ - public static ObjectName joramTopic(final String name) throws MalformedObjectNameException { - return ObjectName.getInstance(JORAM_CLIENT_DOMAIN + ":type=Topic,name=" + name); - } - - /** - * Create ObjectName for all Joram managed topics - * @return ObjectName for a Joram managed topic - * @exception MalformedObjectNameException Could not create ObjectName with the given String - */ - public static ObjectName joramTopics() throws MalformedObjectNameException { - return ObjectName.getInstance(JORAM_CLIENT_DOMAIN + ":type=Topic,*"); - } - - /** - * Create ObjectName for a Joram managed user - * @param name user name - * @return ObjectName for a Joram managed user - * @exception MalformedObjectNameException Could not create ObjectName with the given String - */ - public static ObjectName joramUser(final String name) throws MalformedObjectNameException { - return ObjectName.getInstance(JORAM_CLIENT_DOMAIN + ":type=User,name=" + name); - } - - /** - * Create ObjectName for all Joram managed users - * @return ObjectName for a Joram managed user - * @exception MalformedObjectNameException Could not create ObjectName with the given String - */ - public static ObjectName joramUsers() throws MalformedObjectNameException { - return ObjectName.getInstance(JORAM_CLIENT_DOMAIN + ":type=User,*"); - } - -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/Log.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/Log.java deleted file mode 100644 index d9f168c77fe8624f4eecd3ea5bc73bc5d15ca919..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/Log.java +++ /dev/null @@ -1,493 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.lib.util; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.InputStream; -import java.io.PrintWriter; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.Enumeration; -import java.util.Properties; - -import org.objectweb.util.monolog.Monolog; -import org.objectweb.util.monolog.api.Handler; -import org.objectweb.util.monolog.api.HandlerFactory; -import org.objectweb.util.monolog.api.Level; -import org.objectweb.util.monolog.api.LevelFactory; -import org.objectweb.util.monolog.api.Logger; -import org.objectweb.util.monolog.api.LoggerFactory; -import org.objectweb.util.monolog.api.MonologFactory; -import org.objectweb.util.monolog.file.DottedStringTools; -import org.objectweb.util.monolog.file.monolog.PropertiesConfAccess; -import org.objectweb.util.monolog.wrapper.printwriter.PrintWriterImpl; -import org.ow2.jonas.lib.bootstrap.JProp; - -/** - * This class provides utility method for using Monolog. - * @author Philippe Coq. - * @author Sebastien Chassande-Barrioz sebastien.chassande@inrialpes.fr - * @author Philippe Durieux - * @author Florent Benoit & Ludovic Bert - * @author Adriana Danes : change MBean implementation model from inheritance to delegation - */ -public class Log { - - /** - * name of the config file - initialized by the configure method. - */ - private static String configFile = "trace"; - - /** - * This class is actually a wrapper on the unique loggerFactory - */ - private static LoggerFactory lf = null; - - /** - * Properties used for Logging system. - * Kept here mainly for debugging - */ - private static Properties props = null; - - /** - * Config file name for the Logging system. - */ - private static String configFileName = null; - - // List of topic used inside JOnAS - // This list may be not exhaustive since many topics can be added for - // different purposes or to refine debugging. - // To get the complete list, use "jonas admin -t" - public static final String JONAS_ADMIN_PREFIX = "org.ow2.jonas.admin"; - public static final String JONAS_BOOTSTRAP_PREFIX = "org.ow2.jonas.bootstrap"; - public static final String JONAS_CLUSTER_DAEMON = "org.ow2.jonas.cluster.daemon"; - public static final String JONAS_DB_PREFIX = "org.ow2.jonas.db"; - public static final String JONAS_DBM_PREFIX = "org.ow2.jonas.dbm"; - public static final String JONAS_DEPLOY_PREFIX = "org.ow2.jonas.deployment"; - public static final String JONAS_DISCOVERY_PREFIX = "org.ow2.jonas.discovery"; - public static final String JONAS_EAR_PREFIX = "org.ow2.jonas.ear"; - public static final String JONAS_EJB_PREFIX = "org.ow2.jonas.ejb"; - public static final String SPY_LOGGER_NAME = "org.ow2.jonas.ee.jdbc.sql"; - public static final String JONAS_JAXR_PREFIX = "org.ow2.jonas.ee.scout"; - public static final String JONAS_GENBASE_PREFIX = "org.ow2.jonas.generators.genbase"; - public static final String JONAS_GENIC_PREFIX = "org.ow2.jonas.generators.genic"; - public static final String JONAS_GENIC_VELOCITY_PREFIX = "org.ow2.jonas.generators.genic.velocity"; - public static final String JONAS_WSGEN_PREFIX = "org.ow2.jonas.generators.wsgen"; - public static final String JONAS_WSGEN_EWS_PREFIX = "org.ow2.jonas.generators.wsgen.ews"; - public static final String JONAS_JCA_PREFIX = "org.ow2.jonas.jca"; - public static final String JONAS_JMX_PREFIX = "org.ow2.jonas.jmx"; - public static final String JONAS_WORK_MGR_PREFIX = "org.ow2.jonas.lib.work"; - public static final String JONAS_LOADER_PREFIX = "org.ow2.jonas.loader"; - public static final String JONAS_MAIL_PREFIX = "org.ow2.jonas.mail"; - public static final String JONAS_MANAGEMENT_PREFIX = "org.ow2.jonas.management"; - public static final String JONAS_MANAGEMENT_EVENT_PREFIX = "org.ow2.jonas.management.event"; - public static final String JONAS_NAMING_PREFIX = "org.ow2.jonas.naming"; - public static final String JONAS_PROPCTX_PREFIX = "org.ow2.jonas.propagation"; - public static final String JONAS_REGISTRY_PREFIX = "org.ow2.jonas.registry"; - public static final String JONAS_SECURITY_PREFIX = "org.ow2.jonas.security"; - public static final String JONAS_CSIV2_SECURITY_PREFIX = "org.ow2.jonas.security.csiv2"; - public static final String JONAS_CSIV2_DETAILS_SECURITY_PREFIX = "org.ow2.jonas.security.csiv2_details"; - public static final String JONAS_JACC_SECURITY_PREFIX = "org.ow2.jonas.security.jacc"; - public static final String JONAS_WS_SECURITY_PREFIX = "org.ow2.jonas.security.ws"; - public static final String JONAS_SERVER_PREFIX = "org.ow2.jonas.server"; - public static final String JONAS_WEB_PREFIX = "org.ow2.jonas.web"; - public static final String JONAS_DEPLOY_WORK_PREFIX = "org.ow2.jonas.work"; - public static final String JONAS_TESTS_PREFIX = "org.ow2.jonas_tests"; - - /** - * Output tag for the handler - */ - private static final String HANDLER_OUTPUT_ATTRIBUTE = "output"; - - /** - * Output tag which must be replaced by JOnAS - */ - private static final String AUTOMATIC_CONFIG = "automatic"; - - /** - * Directory for the logs $JONAS_BASE/logs - */ - private static final String LOG_DIRECTORY = "logs"; - - /** - * Format of a timestamp log. - */ - private static final String TIMESTAMP_FORMAT = "-yyyy-MM-dd"; - - /** - * Suffix of a log file. - */ - private static final String SUFFIX_LOGFILE = "log"; - - /** - * Default logger factory - */ - private static final String DEFAULT_LOGGERFACTORY = "org.objectweb.util.monolog.wrapper.javaLog.LoggerFactory"; - - /** - * Is in ClientContainer ? - */ - private static boolean clientcontainer = false; - - /** - * JProp fully qualified Classname - */ - private static final String JPROP_CLASSNAME = "org.ow2.jonas.lib.bootstrap.JProp"; - - /** - * Default Private Constructor for utility classes - */ - private Log() { } - - /** - * Configure Logger. - * @param file The configuration file for monolog (usually: trace.properties) - */ - public static void configure(final String file) { - configFile = file; - getLoggerFactory(); - if (!clientcontainer) { - // TODO find a good place for this initialization - // to allow using Monolog when want traces of P6Spy usage in SQL requests - //P6SpyLogger.logger = lf.getLogger(SPY_LOGGER_NAME); - // ----------- - // Comment out call until JONAS uses Log4j - // TraceTm.configure(lf); - } - } - - - - /** - * Use a Monolog class ? - */ - private static String JMX_HANDLER_TYPE = "jmx"; - - /** - * @return a jmx handler. If several, return the first one. - * If none, return null; - */ - public static Handler getJmxHandler() { - Handler[] handlers = Monolog.getMonologFactory().getHandlers(); - for (int i = 0; i < handlers.length; i++) { - Handler handler = handlers[i]; - if (handler.getType().equals(JMX_HANDLER_TYPE)) { - return handler; - } - } - return null; - } - - /** - * Return a given Monolog handler - * @param handlerName the name of the handler - * @return the corresponding Monolog handler - */ - public static Handler getHandler(final String handlerName) { - Handler[] handlers = Monolog.getMonologFactory().getHandlers(); - for (int i = 0; i < handlers.length; i++) { - Handler handler = handlers[i]; - String handType = handler.getType(); - String handName = handler.getName(); - String[] attNames = handler.getAttributeNames(); - } - return Monolog.getMonologFactory().getHandler(handlerName); - - } - - /** - * It returns the unique LoggerFactory used in JOnAS. - * initialize it if not already done. - * @return the unique LoggerFactory used in JOnAS. - */ - public static synchronized LoggerFactory getLoggerFactory() { - if (lf == null) { - try { - // Detect client case = no JONAS_BASE - if (isClient()) { - clientcontainer = true; - InputStream is = null; - - // Is there a specific file to use instead the default name - String traceClient = System.getProperty("jonas.client.trace.file"); - if (traceClient != null) { - try { - is = new FileInputStream(new File(traceClient)); - } catch (FileNotFoundException fne) { - System.err.println("Can not init logger with the supplied file '" + traceClient + "'" + - ", this file doesn't exist. Init with default values."); - - } - } else { - //Client - //Is there a trace properties file in the classpath ? - is = Thread.currentThread().getContextClassLoader().getResourceAsStream("traceclient.properties"); - } - if (is == null) { - // no traceclient.properties found - // using a default configuration - props = new Properties(); - props.put("log.config.classname", DEFAULT_LOGGERFACTORY); - props.put("logger.root.level", "INFO"); - } else { - // use the configuration of the properties file. - props = new Properties(); - props.load(is); - } - lf = Monolog.getMonologFactory(props); - return lf; - } - // server case - // get jonas configuration properties - Object jProp = null; - try { - jProp = JProp.getInstance(); - // Run jonas - // Create a JProp object for the configFile - JProp.getInstance(configFile); - } catch (Exception e) { - System.err.println("Can't read jonas.properties. Check that you have defined a $JONAS_BASE variable"); - } - - - // load properties from config file - props = JProp.getInstance(configFile).getConfigFileEnv(); - configFileName = JProp.getInstance(configFile).getPropFileName(); - - String jonasBase = null; - String nameOfServer = null; - if (jProp != null) { - jonasBase = JProp.getJonasBase(); - nameOfServer = ((JProp) jProp).getValue("jonas.name", "jonas"); - } else { - // Set default - jonasBase = "."; - nameOfServer = "jonas"; - } - - // Before sending props, replace AUTOMATIC pattern by a file in $JONAS_BASE/logs/ - // File are named TIMESTAMP_FORMAT.SUFFIX_LOGFILE - File logDirFile = new File(jonasBase + File.separator + LOG_DIRECTORY); - - // Properties sent may be updated if AUTOMATIC_CONFIG is used - // Updated properties are in - Properties updatedProps = null; - - //Create a date format - SimpleDateFormat sdf = new SimpleDateFormat(TIMESTAMP_FORMAT); - String date = sdf.format(new Date()); - // How many AUTOMATIC field have been replaced - int nbAut = 0; - - File logFile = null; - for (Enumeration keys = props.keys(); keys.hasMoreElements();) { - String key = (String) keys.nextElement(); - if (key == null) { - continue; - } - - if (key.startsWith(PropertiesConfAccess.HANDLER_FIELD)) { - String temp = DottedStringTools.getFirst(key); - - if (temp == null) { - continue; - } - - temp = DottedStringTools.getEnd(key); - if (temp == null) { - continue; - } - - String handlerName = DottedStringTools.getBegin(temp); - - String stringType = props.getProperty(PropertiesConfAccess.HANDLER_FIELD + PropertiesConfAccess.DOT + handlerName + PropertiesConfAccess.DOT + PropertiesConfAccess.HANDLER_TYPE_ATTRIBUTE, null); - String stringOutput = props.getProperty(PropertiesConfAccess.HANDLER_FIELD + PropertiesConfAccess.DOT + handlerName + PropertiesConfAccess.DOT + HANDLER_OUTPUT_ATTRIBUTE, null); - // Got the type and the output - // --> Compare with the pattern AUTOMATIC_CONFIG for the FILE type. - if ((stringType != null) && (stringOutput != null)) { - if (PropertiesConfAccess.HANDLER_TYPE_ATTRIBUTE_FILE_VALUE.equalsIgnoreCase(stringType) - || (PropertiesConfAccess.HANDLER_TYPE_ATTRIBUTE_ROLLING_FILE_VALUE.equalsIgnoreCase(stringType))) { - if (stringOutput.equalsIgnoreCase(AUTOMATIC_CONFIG)) { - // OK, it's match - String fileName = null; - - if (nbAut > 0) { - // Add an unique entry by adding nbAut value. - fileName = nameOfServer + date + PropertiesConfAccess.DOT + nbAut + PropertiesConfAccess.DOT + SUFFIX_LOGFILE; - } else { - // this is the first occurence of AUTOMATIC_CONFIG, create updatedProps - updatedProps = (Properties) props.clone(); - fileName = nameOfServer + date + PropertiesConfAccess.DOT + SUFFIX_LOGFILE; - } - - // Create the directory if it doesn't exists - if (!logDirFile.exists()) { - logDirFile.mkdirs(); - } - logFile = new File(logDirFile, fileName); - - updatedProps.setProperty(PropertiesConfAccess.HANDLER_FIELD + PropertiesConfAccess.DOT + handlerName + PropertiesConfAccess.DOT + HANDLER_OUTPUT_ATTRIBUTE, logFile.getPath()); - nbAut++; - - } - else { - // not automatic -- change relative file name to be relative to JONAS_BASE/logs - logFile = new File(stringOutput); - if (!logFile.isAbsolute()) { - // file name is relative so try to create in JONAS_BASE/logs - // Create the directory if it doesn't exists - if (!logDirFile.exists()) { - logDirFile.mkdirs(); - } - logFile = new File(logDirFile, stringOutput); - if (nbAut == 0) { - updatedProps = (Properties) props.clone(); - nbAut++; - } - if (stringOutput.endsWith(".automatic") || - stringOutput.endsWith(".auto")) { - nbAut++; - String autoStr = logFile.getPath().substring(0, logFile.getPath().lastIndexOf('.')) + date + - PropertiesConfAccess.DOT + nbAut + PropertiesConfAccess.DOT + SUFFIX_LOGFILE; - logFile = new File(autoStr); - } - updatedProps.setProperty(PropertiesConfAccess.HANDLER_FIELD + PropertiesConfAccess.DOT + handlerName + PropertiesConfAccess.DOT + HANDLER_OUTPUT_ATTRIBUTE, logFile.getPath()); - } else { - File logFileParent = logFile.getParentFile(); - if (!logFileParent.exists()) { - logFileParent.mkdirs(); - } - } - } - } - } - } - } - - // Instanciate the LoggerFactory - String b = props.getProperty("log.config.classname", null); - if (b == null) { - System.err.println("Malformed configuration log file: log.config.classname not available"); - return null; - } - lf = (LoggerFactory) Class.forName(b).newInstance(); - - // Configure the LoggerFactory with the updated properties or the initial ones - if (updatedProps == null) { - PropertiesConfAccess.load(props, lf, (HandlerFactory) lf, (LevelFactory) lf); - } else { - PropertiesConfAccess.load(updatedProps, lf, (HandlerFactory) lf, (LevelFactory) lf); - } - //Register the monolog factory in Monolog - Monolog.monologFactory = (MonologFactory) lf; - } catch (Exception e) { - System.err.println("Cannot get LoggerFactory:" + e); - e.printStackTrace(); - } - } - return lf; - } - - /** - * @return Returns true if we are in a client context - */ - private static boolean isClient() { - boolean hasJonasBase = System.getProperty("jonas.base") != null; - boolean hasJonasRoot = System.getProperty("jonas.root") != null; - boolean hasJProp = true; - try { - Log.class.getClassLoader().loadClass(JPROP_CLASSNAME); - } catch (ClassNotFoundException cnfe) { - hasJProp = false; - } - // a server has the 3 params, all other case are clients case - return !(hasJProp && hasJonasBase && hasJonasRoot); - } - - /** - * Reset logger factory - */ - public static void reset() { - lf = null; - } - - /** - * Returns the standard PrintWriter associated to the logger defined by - * its topic. - * This is mainly used for DBM and Connectors. - */ - public static PrintWriter getLogWriter(final String topic) { - // TODO : should not create a new object at each call - return new PrintWriterImpl(getLogger(topic), getLoggerFactory()); - } - - /** - * Shortcut that returns the LevelFactory - */ - public static LevelFactory getLevelFactory() { - return (LevelFactory) getLoggerFactory(); - } - - /** - * Shortcut to get the Logger by its topic name. - * @param topic the topic of the returned logger - * @return always a logger instance (never null value). - */ - public static Logger getLogger(final String topic) { - return getLoggerFactory().getLogger(topic); - } - - public static Properties getProperties() { - return props; - } - - public static String getConfigFileName() { - return configFileName; - } - - public static void setConfigFileName(final String configFileName) { - Log.configFileName = configFileName; - } - - /** - * Set the given log level to the specified logger. - * @param loggerName name of the loger to be configured - * @param level target level - * @return the previous level of the logger - */ - public static Level setComponentLogLevel(final String loggerName, - final Level level) { - Logger log = Log.getLogger(loggerName); - Level old = log.getCurrentLevel(); - log.setLevel(level); - return old; - } - - -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/ModuleNamingUtils.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/ModuleNamingUtils.java deleted file mode 100644 index f6800bcd993b232becfc6dd28f224db8d935c771..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/ModuleNamingUtils.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.util; - -import java.io.File; -import java.net.URL; - -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; - -/** - * Utility class to build J2eeApplicationNames. - * @Deprecated Use Deployable.getModuleName() instead - */ -@Deprecated -public class ModuleNamingUtils { - - private static Logger logger = Log.getLogger(Log.JONAS_EAR_PREFIX); - - /** - * Build the J2EEApplication name. - * @param pUrl The URL of Ear file - * @return The J2EEApplication name - */ - public static String fromURL(final URL pUrl) { - String sName = null; - try { - sName = new File(pUrl.getFile()).getName(); - if ("file".equals(pUrl.getProtocol())) { - sName = fromFileName(sName); - } - } catch (NullPointerException e) { - logger.log(BasicLevel.DEBUG, "Can't build j2ee application", e); - } - return sName; - } - - /** - * Build the J2EEApplication name. - * @param pFilename The name of Ear file - * @return The J2EEApplication name - */ - public static String fromFileName(final String pFilename) { - String sName = null; - try { - sName = new File(pFilename).getName(); - int iPos = sName.lastIndexOf('.'); - if (iPos > -1) { - sName = sName.substring(0, iPos); - } - } catch (NullPointerException e) { - logger.log(BasicLevel.DEBUG, "Can't build j2ee application : " + e); - } - return sName; - } -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/NetUtils.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/NetUtils.java deleted file mode 100644 index 870d9fe9b0dde6ecbfb887e1c78c37bae5c6b639..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/NetUtils.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005-2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.lib.util; - -import java.net.Inet4Address; -import java.net.InetAddress; -import java.net.NetworkInterface; -import java.net.SocketException; -import java.net.UnknownHostException; -import java.util.Enumeration; - -/** - * {@link NetUtils} is meant to provide routine network related information to - * components of JONAS. One of the main purposes is to allow the server to - * extract it's own IP address correctly. This addresses a bug in java when - * dealing with Linux boxes on DHCP trying to extract their own IP addresses and - * always getting the loop back address instead of the external one. - * - * @link http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4060691 - * - * @author Vivek Lakshmanan - */ -public class NetUtils { - - /** - * IPv4 Loop back address. - */ - public static final String LOOP_BACK_ADDR = "127.0.0.1"; - - /** - * Get the string form of the local IP address and not naively assume - * InetAddress.getLocalHost().getHostAddress() is the - * correct value. See the class description above for details. - * - * @return A string representing the IPv4 localhost IP address. - * @throws UnknownHostException - */ - public static String getLocalAddress() throws UnknownHostException { - - InetAddress localhost = InetAddress.getLocalHost(); - // Check if the value of the localhost address is a loop back address. - if (localhost.getHostAddress().equals(LOOP_BACK_ADDR)) { - // If so, try to find a non-loop back address (IPv4 only) - try { - NetworkInterface inter = null; - InetAddress addr = null; - // Get all network interfaces on this machine. - Enumeration networkEnum = NetworkInterface.getNetworkInterfaces(); - while (networkEnum.hasMoreElements()) { - inter = (NetworkInterface) networkEnum.nextElement(); - Enumeration enumAddr = inter.getInetAddresses(); - // Check all addresses for this interface. - while (enumAddr.hasMoreElements()) { - addr = (InetAddress) enumAddr.nextElement(); - // Check only IP v4 addresses. - if (addr instanceof Inet4Address) { - if (!addr.isLoopbackAddress()) { - // Found a non-loop back address so return it. - return addr.getHostAddress(); - } - } - - } - } - - // No non-loop back IP v4 addresses found so return loop back - // address. - return localhost.getHostAddress(); - - } catch (SocketException e) { - return localhost.getHostAddress(); - } - } else { - // Got a non-loop back address so return it. - return localhost.getHostAddress(); - } - } - -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/PropDump.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/PropDump.java deleted file mode 100644 index cf1e5447950066ead719840a7a9b68ac2fad5f1c..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/PropDump.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.util; - -import java.util.Enumeration; -import java.util.Properties; -import org.objectweb.util.monolog.api.Logger; - -/** - * Used to print out properties - */ -public class PropDump { - - /** - * Prints out the {@link Properties}. - * @param header Display header - * @param props Properties to be printed - * @param logger {@link Logger} to use - * @param logLevel Log level - */ - public static void print(final String header, - final Properties props, - final Logger logger, - final int logLevel) { - - logger.log(logLevel, header); - logger.log(logLevel, "================================="); - String aName = null; - String aValue = null; - for (Enumeration pNames = props.propertyNames(); pNames.hasMoreElements();) { - aName = (String) pNames.nextElement(); - aValue = (String) props.getProperty(aName); - if (aValue != null) { - logger.log(logLevel, aName + " = " + aValue); - } - } - logger.log(logLevel, "================================="); - } -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/XMLSerializer.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/XMLSerializer.java deleted file mode 100644 index b312cc490e3a8cbd98d3b3f80b81c97bbe9d9e1b..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/util/XMLSerializer.java +++ /dev/null @@ -1,127 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.lib.util; - -import java.io.IOException; -import java.io.OutputStream; -import java.io.Writer; - -import org.w3c.dom.DOMImplementation; -import org.w3c.dom.Document; -import org.w3c.dom.bootstrap.DOMImplementationRegistry; -import org.w3c.dom.ls.DOMImplementationLS; -import org.w3c.dom.ls.LSOutput; -import org.w3c.dom.ls.LSSerializer; - - -/** - * Serialize a given DOM Document. - * Handle namespaces nicely. - * - * @author Guillaume Sauthier - */ -public class XMLSerializer { - - /** - * Default Line separator (unix). - */ - private static final String DEF_LINE_SEP = "\n"; - - /** - * Document to be formated and serialized - */ - private Document doc; - - /** - * DOM L3 Serializer. - */ - private LSSerializer serializer; - - /** - * DOM L3 output. - */ - private LSOutput output; - - /** - * Creates a new XMLSerializer object. - * @param doc Document to be serialized - */ - public XMLSerializer(Document doc) { - // Store the ref - this.doc = doc; - - // Create the LSSerializer and LSOutput instances - DOMImplementationRegistry registry; - try { - registry = DOMImplementationRegistry.newInstance(); - } catch (Exception e) { - throw new RuntimeException("Cannot get the system DOMImplementationRegistry", e); - } - DOMImplementation impl = registry.getDOMImplementation("LS 3.0"); - DOMImplementationLS factory = (DOMImplementationLS) impl; - - // Define the format for the xml document - serializer = factory.createLSSerializer(); - serializer.setNewLine(DEF_LINE_SEP); - output = factory.createLSOutput(); - output.setEncoding("UTF-8"); - - //DOMConfiguration dc = serializer.getDomConfig(); - //dc.setParameter("format-pretty-print", Boolean.TRUE); - //dc.setParameter("schema-type", "http://www.w3.org/2001/XMLSchema"); - - } - - /** - * Serialize the encapsulated Document into the OutputStream - * - * @param os output stream - * - * @throws IOException When serialization fails - */ - public void serialize(OutputStream os) throws IOException { - output.setByteStream(os); - serialize(); - } - - /** - * Serialize the encapsulated Document into the Writer - * - * @param writer writer - * - * @throws IOException When serialization fails - */ - public void serialize(Writer writer) throws IOException { - output.setCharacterStream(writer); - serialize(); - } - - /** - * Serialize the wrapped Document. - */ - private void serialize() { - serializer.write(doc, output); - } -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/windows/WinSysEnv.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/windows/WinSysEnv.java deleted file mode 100644 index 36c1ffb22caebac93a5ab4f0dbd9b11a0c96db08..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/windows/WinSysEnv.java +++ /dev/null @@ -1,139 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2006 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Francois Waeselynck - * Contributor(s): Benoit Pelletier - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.windows; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -//import java.util.Iterator; -import java.util.Properties; - -import org.ow2.jonas.lib.util.Log; -//import java.util.Map.Entry; -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; - -/** - * This class provides some utilities for the windows environment - */ -public class WinSysEnv { - - /** - * Maintains an image of the environment - */ - private static Properties env = null; - - /** - * Logger - */ - private static Logger logger = Log.getLogger(WinSysEnv.class.getName()); - - - /** - * Get a variable from the windows env - * @param var variable name - * @return the variable value - */ - public static String get(String var) { - if (env == null) load(); - String value = null; - if (env != null) value = (String) env.getProperty(var); - return value; - } - - /** - * Get the windows env - * @return properties - */ - public static Properties getEnv() { - if (env == null) load(); - return env; - } - - /** - * Get the windows environment - * - */ - private static void load() { - - if (env == null) { - Properties props = new Properties(); - Runtime rt = Runtime.getRuntime(); - Process proc = null; - try { - proc = rt.exec("cmd /c SET"); - BufferedReader r = new BufferedReader(new InputStreamReader( - proc.getInputStream())); - String ln = null; - while ((ln = r.readLine()) != null) { - //System.out.println(ln); - int ix = ln.indexOf("="); - props.setProperty(ln.substring(0, ix), ln.substring(ix + 1)); - } - if (proc != null) - proc.waitFor(); - } catch (IOException e1) { - logger.log(BasicLevel.ERROR, "Cannot get System environment : " + e1); - } catch (InterruptedException e) { - // Do nothing - } - env = props; - } - } - - /** - * main - * For test purposes - * @param args - */ - /* - public static void main(String[] args) { - - Properties props = System.getProperties(); - - // props.list(System.out); - - Iterator it = props.entrySet().iterator(); - while (it.hasNext()) { - Entry p = (Entry) it.next(); - System.out.println(p.getKey() + "=" + p.getValue()); - - } - System.out.println("\n=========\nWinSysEnv\n========="); - System.out.println("SystemRoot="+WinSysEnv.get("SystemRoot")); - props = WinSysEnv.getEnv(); - it = props.entrySet().iterator(); - while (it.hasNext()) { - Entry p = (Entry) it.next(); - System.out.println(p.getKey() + "=" + p.getValue()); - } - } - */ - -} diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/work/AbsCleanTask.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/work/AbsCleanTask.java deleted file mode 100644 index dd36f99bbcd881c99a91da4f70642f47afec2720..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/work/AbsCleanTask.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2008 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Benoit PELLETIER - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.work; - -import java.io.File; -import java.util.Enumeration; -import java.util.Vector; - -import org.ow2.jonas.workcleaner.CleanTask; -import org.ow2.jonas.workcleaner.LogEntry; -import org.ow2.jonas.workcleaner.WorkCleanerException; -import org.ow2.util.file.FileUtils; -import org.ow2.util.file.FileUtilsException; -import org.ow2.util.log.Log; -import org.ow2.util.log.LogFactory; - -/** - * Abstract Clean Task class which define a generic job executed by the cleaner thread. - * @author Benoit PELLETIER - */ -public abstract class AbsCleanTask implements CleanTask { - - /** - * Logger. - */ - private Log logger = LogFactory.getLog(AbsCleanTask.class); - - /** - * Default constructor : Construct a new cleaner. - */ - protected AbsCleanTask() { - } - - /** - * Check if the package pointed by the log entry is currently deploy. - * @param logEntry entry in a deploy log - * @return true if the package pointed by the log entry is currently deployed - * @throws WorkCleanerException If it fails - */ - protected abstract boolean isDeployedLogEntry(LogEntry logEntry) throws WorkCleanerException; - - /** - * Returns the {@link DeployerLog} of the task. - * @return The DeployerLog of the task - */ - public abstract DeployerLog getDeployerLog(); - - /** - * Return true if the work copy exists and is up to date. - * @param logEntry entry in a deploy log - * @return true if the work copy exists and is up to date - * @throws WorkCleanerException if it fails - */ - public boolean isValidLogEntry(final LogEntry logEntry) throws WorkCleanerException { - String lastModifiedFileName = null; - File logEntryFile = logEntry.getOriginal(); - String logEntryUnpackedDir = logEntry.getCopy().getName(); - - logger.debug("LogEntry <" + logEntryFile.getName() + "> exists :" + logEntryFile.exists()); - - // If the file doesn't exist, return - if (!logEntryFile.exists()) { - return false; - } - - // Get the file name containing the last modification date - try { - lastModifiedFileName = FileUtils.lastModifiedFileName(logEntryFile); - } catch (FileUtilsException e) { - logger.error("Cannot retrieve the working file name for the deployable '{0}'", logEntryFile); - } - - logger.debug("LogEntry lastModificationFileName :" + lastModifiedFileName); - logger.debug("LogEntry isValid :" + lastModifiedFileName.equalsIgnoreCase(logEntryUnpackedDir)); - - // Compare the two file names - return (lastModifiedFileName.equalsIgnoreCase(logEntryUnpackedDir)); - - } - - /** - * Run the clean task. - * @throws WorkCleanerException if it failed. - */ - public void execute() throws WorkCleanerException { - logger.debug("Execute called"); - - // Get the entries from the logger - Vector logEntries = getLogEntries(); - - // Check if the files in this vector exists - LogEntry logEntry = null; - - for (Enumeration e = logEntries.elements(); e.hasMoreElements();) { - logEntry = e.nextElement(); - logger.debug("LogEntry <" + logEntry.getOriginal().getName() + "," + logEntry.getCopy().getName() + ">"); - - // If the package is deployed, do nothing - if (isDeployedLogEntry(logEntry)) { - logger.debug("LogEntry currently deployed - > do nothing"); - continue; - } - - // If the source package file doesn't exists anymore or if the file is present but don't care the right last - // modification date - if (!isValidLogEntry(logEntry)) { - - // We try to remove the entry - if (removeLogEntry(logEntry)) { - // Enumeration is now inconsistent, so we 're restarting the loop - e = logEntries.elements(); - } - } - // Else last modification dates always the same - } - } - - /** - * Remove the work copy specified in the log entry and the log entry. - * @param logEntry entry in a deploy log - * @return true if the log entry has been removed successfully - * @throws WorkCleanerException if it fails - */ - public boolean removeLogEntry(final LogEntry logEntry) throws WorkCleanerException { - if (FileUtils.delete(logEntry.getCopy())) { - try { - getDeployerLog().removeEntry(logEntry); - return true; - } catch (DeployerLogException edle) { - throw new WorkCleanerException("Can't remove an entry" + edle.getMessage()); - } - } - return false; - } - - /** - * Gets the log entries. - * @return the log entries - */ - public Vector getLogEntries() { - return getDeployerLog().getEntries(); - } - - /** - * Get logger. - * @return the logger - */ - protected Log getLogger() { - return logger; - } -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/work/DeployerLog.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/work/DeployerLog.java deleted file mode 100644 index 5d94f1d688528ea0e9e81063e5e87b0d8d58be45..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/work/DeployerLog.java +++ /dev/null @@ -1,262 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Florent BENOIT & Ludovic BERT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.work; - -//import java -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; -import java.io.PrintWriter; -import java.util.Enumeration; -import java.util.StringTokenizer; -import java.util.Vector; - -import org.ow2.jonas.workcleaner.LogEntry; -import org.ow2.util.log.Log; -import org.ow2.util.log.LogFactory; - - -/** - * Class which permits to store or load the association between the name of a package and the timestamped work copy associated. - * @author Florent Benoit - * @author Ludovic Bert - */ -public class DeployerLog { - - /** - * The logger. - */ - private Log logger = LogFactory.getLog(DeployerLog.class); - - /** - * Separator char of a entry in the log file. - */ - private static final String SEPARATOR_ENTRY = ";"; - - /** - * File for logging. - */ - private File logFile; - - /** - * The current entries of the logFile. - */ - private Vector logEntries = null; - - /** - * Constructor for the deployerLog. - * @param logFile the file which is used for read/write entries - * @throws DeployerLogException if the loadentries failed. - */ - public DeployerLog(final File logFile) throws DeployerLogException { - logger.debug("logfile=" + logFile.getName()); - - this.logFile = logFile; - logEntries = new Vector(); - loadEntries(); - } - - /** - * @return the logger - */ - protected Log getLogger() { - return logger; - } - - /** - * load the entries of the log file. - * @throws DeployerLogException if the load failed. - */ - private synchronized void loadEntries() throws DeployerLogException { - - BufferedReader br = null; - try { - br = new BufferedReader(new FileReader(logFile)); - } catch (FileNotFoundException e) { - throw new DeployerLogException("Can not read the " + logFile + " file"); - } - String line = null; - - String field = null; - File originalField = null; - File copyField = null; - StringTokenizer st = null; - - try { - //Read the text file - while ((line = br.readLine()) != null) { - - //parse the String - st = new StringTokenizer(line, SEPARATOR_ENTRY); - field = st.nextToken(); - if (field == null) { - throw new DeployerLogException("Inconsistent line in the file " + logFile); - } - originalField = new File(field); - - field = st.nextToken(); - if (field == null) { - throw new DeployerLogException("Inconsistent line in the file " + logFile); - } - - copyField = new File(field); - - logger.debug("Entry[originalField=" + originalField + ",copyField=" + copyField + "]"); - logEntries.add(new LogEntryImpl(originalField, copyField)); - } - // Close the input stream - br.close(); - } catch (IOException ioe) { - throw new DeployerLogException("Error while reading the log file " + logFile + " :" + ioe.getMessage()); - } - } - - /** - * Dump(save) the entries to the log file. - * @throws DeployerLogException if the save failed. - */ - private synchronized void saveEntries() throws DeployerLogException { - - PrintWriter pw = null; - try { - pw = new PrintWriter(new BufferedWriter(new FileWriter(logFile))); - } catch (IOException e) { - throw new DeployerLogException("Problem while trying to get an output stream for the " + logFile + " file"); - } - - LogEntry logEntry = null; - String original = null; - String copy = null; - String line = null; - for (Enumeration e = logEntries.elements(); e.hasMoreElements();) { - logEntry = e.nextElement(); - - //get the infos - - try { - original = logEntry.getOriginal().getCanonicalPath(); - copy = logEntry.getCopy().getCanonicalPath(); - } catch (IOException ioe) { - throw new DeployerLogException("Problem while trying to get files names "); - } - - //create the line - line = original + SEPARATOR_ENTRY + copy; - - //dump the line - pw.println(line); - } - // Close the stream - pw.close(); - } - - /** - * Return the entries of the file. - * @return a vector of LogEntry item. - */ - public synchronized Vector getEntries() { - return logEntries; - } - - /** - * Remove the given entry and return the entries of the file. - * @param entry the LogEntry which must be remove. - * @return the new vector of LogEntry item. - * @throws DeployerLogException if the remove can't be done - */ - public synchronized Vector removeEntry(final LogEntry entry) throws DeployerLogException { - if (logEntries == null) { - throw new DeployerLogException("Can not remove a entry, the vector is null"); - } - - if (!logEntries.contains(entry)) { - throw new DeployerLogException("Can not remove entry " + entry + ". There is no such entry"); - } - - //remove can be done - logEntries.remove(entry); - - //write to the file. - saveEntries(); - - //return the new vector - return logEntries; - } - - /** - * Add the entry and return the new entries. - * @param original the name of the file - * @param copy the copy of the file - * @return the new vector of LogEntry item. - * @throws DeployerLogException if the add can't be done - */ - public synchronized Vector addEntry(final File original, final File copy) throws DeployerLogException { - if (logEntries == null) { - throw new DeployerLogException("Can not add an entry, the vector is null"); - } - - //add only if it's not already present - LogEntry logEntry = null; - File originalEntry = null; - File copyEntry = null; - - boolean found = false; - Enumeration e = logEntries.elements(); - - //add only if the entry is not found - while (e.hasMoreElements() && !found) { - logEntry = e.nextElement(); - - originalEntry = logEntry.getOriginal(); - copyEntry = logEntry.getCopy(); - - if (originalEntry.getPath().equals(original.getPath()) && copyEntry.getPath().equals(copy.getPath())) { - found = true; - } - } - if (found) { - return logEntries; - } - - //add entry - logEntry = new LogEntryImpl(original, copy); - - //add can be done - logEntries.add(logEntry); - - //write to the file. - saveEntries(); - - //return the new vector - return logEntries; - } - -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/work/DeployerLogException.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/work/DeployerLogException.java deleted file mode 100644 index 273837219022c377fbf4926b1a18b59446fe19f3..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/work/DeployerLogException.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Florent BENOIT & Ludovic BERT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.work; - -/** - * The class DeployerLogException indicates conditions that a reasonable - * application might want to catch. - * @author Florent Benoit - * @author Ludovic Bert - */ - -public class DeployerLogException extends Exception { - - /** - * Constructs a new DeployerLogException with no detail message. - */ - public DeployerLogException() { - super(); - } - - /** - * Constructs a new DeployerLogException with the specified message. - * @param message the detail message. - */ - public DeployerLogException(String message) { - super(message); - } -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/work/LogEntryImpl.java b/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/work/LogEntryImpl.java deleted file mode 100644 index 550e7b47b912198f8ce8c6e7aecfaa0e14c653af..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/java/org/ow2/jonas/lib/work/LogEntryImpl.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Florent BENOIT & Ludovic BERT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.lib.work; - -// import java -import java.io.File; - -import org.ow2.jonas.workcleaner.LogEntry; - -/** - * Class wich represent an entry in a log file : a original associate with its work copy. - * @author Florent Benoit - * @author Ludovic Bert - * @author Benoit PELLETIER - */ -public class LogEntryImpl implements LogEntry { - - /** - * The original file. - */ - private File original = null; - - /** - * The copy file / directory. - */ - private File copy = null; - - /** - * Constructor of a log entry. - * @param original the file to copy - * @param copy name of the copy - */ - public LogEntryImpl(final File original, final File copy) { - super(); - this.original = original; - this.copy = copy; - } - - /** - * Return the ear file of this ear log entry. - * @return the ear file of this ear log entry. - */ - public File getOriginal() { - return original; - } - - /** - * Return the unpacked directory. - * @return the unpacked directory. - */ - public File getCopy() { - return copy; - } - -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-commons/src/main/resources/META-INF/jonas-commons.bnd b/jonas/modules/libraries/jonas-commons/src/main/resources/META-INF/jonas-commons.bnd deleted file mode 100644 index 8df47153d8fc66ac9708a39c2da3f4ea23c1789f..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/resources/META-INF/jonas-commons.bnd +++ /dev/null @@ -1,27 +0,0 @@ -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 2007 Bull S.A.S. -# Contact: jonas-team@ow2.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -Export-Package org.ow2.jonas.lib.* --exportcontents org.ow2.jonas.lib.mapping - -DynamicImport-Package * diff --git a/jonas/modules/libraries/jonas-commons/src/main/resources/org/ow2/jonas/lib/loader/mapping/classloader-default-filtering-mapping.xml b/jonas/modules/libraries/jonas-commons/src/main/resources/org/ow2/jonas/lib/loader/mapping/classloader-default-filtering-mapping.xml deleted file mode 100644 index e3a9edde1f215bce93cc5bef5190187da647661b..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/main/resources/org/ow2/jonas/lib/loader/mapping/classloader-default-filtering-mapping.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - filters - default-filters - - - - - diff --git a/jonas/modules/libraries/jonas-commons/src/test/java/org/ow2/jonas/lib/cpmanager/JarListTestCase.java b/jonas/modules/libraries/jonas-commons/src/test/java/org/ow2/jonas/lib/cpmanager/JarListTestCase.java deleted file mode 100644 index eea2f92832d75df0517ff57506b49afef39a0cc2..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/test/java/org/ow2/jonas/lib/cpmanager/JarListTestCase.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2011 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id: $ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.lib.cpmanager; - -import java.io.File; -import java.net.URL; - -import org.hamcrest.Matchers; -import org.ow2.util.url.URLUtils; -import org.testng.annotations.Test; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.*; - -public class JarListTestCase { - - @Test - public void testReferenceToMissingArchiveIsOmitted() throws Exception { - JarList list = new JarList(); - list.add("$$$$non-existent.jar"); - - String userDir = System.getProperty("user.dir"); - File userDirFile = new File(userDir); - URL userDirUrl = URLUtils.fileToURL(userDirFile); - URL[] urls = list.getURLs(userDirUrl.toExternalForm()); - - assertThat(urls, is(Matchers.notNullValue())); - assertThat(urls.length, is(equalTo(0))); - } - -} diff --git a/jonas/modules/libraries/jonas-commons/src/test/java/org/ow2/jonas/lib/loader/FilteringClassLoaderTestCase.java b/jonas/modules/libraries/jonas-commons/src/test/java/org/ow2/jonas/lib/loader/FilteringClassLoaderTestCase.java deleted file mode 100644 index 32c06bf7df0500ab121d2bb67c7143a434da3f6e..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/test/java/org/ow2/jonas/lib/loader/FilteringClassLoaderTestCase.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2010 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id: $ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.lib.loader; - -import java.net.URL; - -import org.testng.Assert; -import org.testng.annotations.Test; - -/** - * A {@code FilteringClassLoaderTestCase} is ... - * - * @author Guillaume Sauthier - */ -public class FilteringClassLoaderTestCase { - - private ClassLoader getParent() { - return FilteringClassLoaderTestCase.class.getClassLoader(); - } - - private URL getResource(String name) { - return FilteringClassLoaderTestCase.class.getResource(name); - } - - @Test - public void testAdminCanForceDisabledFiltering() throws Exception { - FilteringClassLoader loader = new FilteringClassLoader(getParent()); - loader.setTransparent(false); - loader.setDefinitionUrl(getResource("/test-default-filters.xml")); - System.setProperty(FilteringClassLoader.DISABLE_FILTERING_PROPERTY_NAME, "true"); - - loader.start(); - - Assert.assertTrue(loader.isTransparent(), "ClassLoader is not transparent"); - - System.getProperties().remove(FilteringClassLoader.DISABLE_FILTERING_PROPERTY_NAME); - - } - - @Test - public void testXmlParsingWithDefaultFiltersDefinition() throws Exception { - FilteringClassLoader loader = new FilteringClassLoader(getParent()); - loader.setDefinitionUrl(getResource("/test-default-filters.xml")); - - loader.start(); - - Assert.assertTrue(loader.getFilters().contains("the.system.filter.*"), - "ClassLoader has not the expected filtering content"); - } - - @Test - public void testXmlParsingWithFiltersDefinition() throws Exception { - FilteringClassLoader loader = new FilteringClassLoader(getParent()); - loader.setDefinitionUrl(getResource("/test-app-filters.xml")); - - loader.start(); - - Assert.assertTrue(loader.getFilters().contains("my.app.filter.*"), - "ClassLoader has not the expected filtering content"); - } -} diff --git a/jonas/modules/libraries/jonas-commons/src/test/resources/test-app-filters.xml b/jonas/modules/libraries/jonas-commons/src/test/resources/test-app-filters.xml deleted file mode 100644 index 04b67a3aaedf1a4f0293e30d08175f66ebbde3ab..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/test/resources/test-app-filters.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - my.app.filter.* - - diff --git a/jonas/modules/libraries/jonas-commons/src/test/resources/test-default-filters.xml b/jonas/modules/libraries/jonas-commons/src/test/resources/test-default-filters.xml deleted file mode 100644 index 08c2807426f46281d9ff7f04f57301f62ffdbab2..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-commons/src/test/resources/test-default-filters.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - the.system.filter.* - - diff --git a/jonas/modules/libraries/jonas-datasources/binding/pom.xml b/jonas/modules/libraries/jonas-datasources/binding/pom.xml deleted file mode 100644 index 43fc8b663bd49379d4ac58f9ace4b264d6deeae2..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-datasources/binding/pom.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - - org.ow2.jonas - jonas-datasource - 5.2.4-SNAPSHOT - ../pom.xml - - - - 4.0.0 - org.ow2.jonas - jonas-datasource-binding - JOnAS :: Libraries :: Datasource :: Binding - Binding for datasource - - - - - maven2-repository.dev.java.net - Java.net Maven 2 Repository - http://download.java.net/maven/2 - - - - - - maven2-repository.dev.java.net - Java.net Maven 2 Repository - http://download.java.net/maven/2 - - - - - - - src/main/resources - - *.xsd - - org/ow2/jonas/datasource/binding/schema/ - - - - - org.jvnet.jaxb2.maven2 - maven-jaxb2-plugin - 0.7.3 - - - schemas - - generate - - - org.ow2.jonas.datasource.binding - true - - - - - - - - diff --git a/jonas/modules/libraries/jonas-datasources/binding/src/main/resources/jonas-datasources-1.0.xsd b/jonas/modules/libraries/jonas-datasources/binding/src/main/resources/jonas-datasources-1.0.xsd deleted file mode 100644 index 3bfcc9b6f8c19d039106e39a67aaf88ff209529f..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-datasources/binding/src/main/resources/jonas-datasources-1.0.xsd +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - @(#)jonas-datasources-1.0.xsd 09/2010 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas/modules/libraries/jonas-datasources/deploy/api/pom.xml b/jonas/modules/libraries/jonas-datasources/deploy/api/pom.xml deleted file mode 100644 index 24dca6c68cf69ae2fbfb54a25dc6c8a49f1eed8e..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-datasources/deploy/api/pom.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - org.ow2.jonas - jonas-datasource-deploy - 5.2.4-SNAPSHOT - - 4.0.0 - org.ow2.jonas - jonas-datasource-deploy-api - jar - JOnAS :: Libraries :: Datasource :: Deploy :: API - API of the deployable part for the datasource - - - - org.ow2.jonas - jonas-dbm - ${project.version} - - - - org.ow2.util - util-ee-deploy-api - ${ow2-bundles.version} - - - org.ow2.util - util-plan-deploy-api - ${ow2-bundles.version} - - - org.ow2.jonas - jonas-datasource-binding - ${project.version} - - - diff --git a/jonas/modules/libraries/jonas-datasources/deploy/api/src/main/java/org/ow2/jonas/datasource/deploy/deployable/api/DatasourceDeployable.java b/jonas/modules/libraries/jonas-datasources/deploy/api/src/main/java/org/ow2/jonas/datasource/deploy/deployable/api/DatasourceDeployable.java deleted file mode 100644 index f04f840544a1c0fedfdfce4ae3034d8c531827a0..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-datasources/deploy/api/src/main/java/org/ow2/jonas/datasource/deploy/deployable/api/DatasourceDeployable.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2010 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.datasource.deploy.deployable.api; - -import org.ow2.jonas.datasource.binding.Datasources; -import org.ow2.util.plan.deploy.deployable.api.FileDeployable; - -/** - * Represents a Datasource deployable. - * @author meldja - */ -public interface DatasourceDeployable extends FileDeployable { - - /** - * Namespace for datasources. - */ - public static String NAMESPACE = "http://jonas.ow2.org/ns/datasource/1.0"; - -} diff --git a/jonas/modules/libraries/jonas-datasources/deploy/impl/pom.xml b/jonas/modules/libraries/jonas-datasources/deploy/impl/pom.xml deleted file mode 100644 index fab27ee9be6ecc478d9b884f6513c40207df4ead..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-datasources/deploy/impl/pom.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - org.ow2.jonas - jonas-datasource-deploy - 5.2.4-SNAPSHOT - - 4.0.0 - org.ow2.jonas - jonas-datasource-deploy-impl - jar - JOnAS :: Libraries :: Datasource :: Deploy :: Impl - Implementation of the deployable part for the datasource - - - org.ow2.util - util-archive-api - ${ow2-util.version} - - - - org.ow2.util - util-ee-deploy-api - ${ow2-bundles.version} - - - - org.ow2.util - util-ee-deploy-impl - ${ow2-bundles.version} - - - - org.ow2.jonas - jonas-datasource-reader - ${project.version} - - - - org.ow2.jonas - jonas-datasource-deploy-api - ${project.version} - - - - - org.testng - testng - 5.1 - jdk15 - test - - - - org.ow2.util - util-plan-deploy-impl - ${ow2-bundles.version} - - - diff --git a/jonas/modules/libraries/jonas-datasources/deploy/impl/src/main/java/org/ow2/jonas/datasource/deploy/deployable/impl/DatasourceDeployableImpl.java b/jonas/modules/libraries/jonas-datasources/deploy/impl/src/main/java/org/ow2/jonas/datasource/deploy/deployable/impl/DatasourceDeployableImpl.java deleted file mode 100644 index 17ee50703eabadc00829f66e37320e84ccf6a419..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-datasources/deploy/impl/src/main/java/org/ow2/jonas/datasource/deploy/deployable/impl/DatasourceDeployableImpl.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2010 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.datasource.deploy.deployable.impl; - -import org.ow2.jonas.datasource.binding.Datasources; -import org.ow2.jonas.datasource.deploy.deployable.api.DatasourceDeployable; -import org.ow2.util.archive.api.IFileArchive; -import org.ow2.util.ee.deploy.impl.deployable.AbsDeployable; - -/** - * @author Djamel eddine ZABCHI - */ -public class DatasourceDeployableImpl extends AbsDeployable implements DatasourceDeployable { - - /** - * The attached DatasourceType object. - */ - private Datasources attachedDatasources = null; - - /** - * Defines and create a deployable for the given archive. - * @param archive the given archive. - */ - public DatasourceDeployableImpl(final IFileArchive archive) { - super(archive); - } - - public Datasources getAttachedData() { - return this.attachedDatasources; - } - - public void setAttachedData(final Datasources attachedData) { - this.attachedDatasources = attachedData; - - } - -} diff --git a/jonas/modules/libraries/jonas-datasources/deploy/impl/src/test/java/org/ow2/jonas/datasource/deploy/deployable/impl/DatasourceDeployableTest.java b/jonas/modules/libraries/jonas-datasources/deploy/impl/src/test/java/org/ow2/jonas/datasource/deploy/deployable/impl/DatasourceDeployableTest.java deleted file mode 100644 index 5e3448468bc5bd6e5ec11d303362afd4071d1b43..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-datasources/deploy/impl/src/test/java/org/ow2/jonas/datasource/deploy/deployable/impl/DatasourceDeployableTest.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2010 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.datasource.deploy.deployable.impl; - -import org.ow2.util.archive.api.IFileArchive; -import org.ow2.util.archive.impl.ArchiveManager; -import org.ow2.util.plan.deploy.deployable.internal.xmlhelper.XmlHelper; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; -import org.testng.Assert; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; - -import java.io.File; - -public class DatasourceDeployableTest { - - /** - * Path to the test example for datasource. - */ - private static final String DATASOURCE_XML_PATH = - "src/test/resources/exemple-datasource.xml"; - - /** - * Datasource namespace. - */ - private static final String DATASOURCE_NS = - "http://jonas.ow2.org/ns/datasource/1.0"; - - /** - * Archive made from the datasource. - */ - private IFileArchive datasourceArchive = null; - - - /** - * xmlHelper - */ - private XmlHelper xmlHelper = null; - - /** - * DatasourceDeployableImpl - */ - DatasourceDeployableImpl dsDeployable = null; - - - - /** - * Prepares test data. - * @throws Exception - */ - @BeforeClass - public void init() throws Exception { - - datasourceArchive = (IFileArchive) ArchiveManager.getInstance() - .getArchive(new File(DATASOURCE_XML_PATH)); - Assert.assertNotNull(datasourceArchive); - xmlHelper = new XmlHelper(); - - } - - @Test - public void testDatasourceConstructor() throws Exception { - dsDeployable = new DatasourceDeployableImpl(datasourceArchive); - Assert.assertNotNull(dsDeployable); - } - - @Test - public void testRootElementNameSpace() throws Exception { - Assert.assertEquals(xmlHelper.getRootElementNameSpace( - datasourceArchive.getFile()), DATASOURCE_NS); - } -} diff --git a/jonas/modules/libraries/jonas-datasources/deploy/impl/src/test/java/org/ow2/jonas/datasource/deploy/deployable/impl/FileDeployableFactoryTest.java b/jonas/modules/libraries/jonas-datasources/deploy/impl/src/test/java/org/ow2/jonas/datasource/deploy/deployable/impl/FileDeployableFactoryTest.java deleted file mode 100644 index 9ff42fa3d716e44f36f966b85e66dc5aa54c259f..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-datasources/deploy/impl/src/test/java/org/ow2/jonas/datasource/deploy/deployable/impl/FileDeployableFactoryTest.java +++ /dev/null @@ -1,138 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2010 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.datasource.deploy.deployable.impl; - -import java.io.File; - -import org.ow2.util.archive.api.IFileArchive; -import org.ow2.util.archive.impl.ArchiveManager; -import org.ow2.util.ee.deploy.api.deployable.IDeployable; -import org.ow2.util.ee.deploy.impl.helper.DeployableHelper; -import org.ow2.util.plan.deploy.deployable.api.FileDeployable; -import org.ow2.util.plan.deploy.deployable.api.factory.IFileDeployableFactoryManager; -import org.ow2.util.plan.deploy.deployable.api.factory.XmlFileDeployableFactory; -import org.ow2.util.plan.deploy.deployable.impl.factory.DefaultFileDeployableFactoryManager; -import org.ow2.util.plan.deploy.deployable.impl.factory.XmlFileDeployableFactoryImpl; -import org.testng.Assert; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - -/** - * Test class for the deployable factories. - * @author Alexis RENOUX - */ -public class FileDeployableFactoryTest { - - /** - * Path to the test example for datasource. - */ - private static final String DATASOURCE_XML_PATH = - "src/test/resources/exemple-datasource.xml"; - - /** - * Datasource namespace. - */ - private static final String DATASOURCE_NS = - "http://jonas.ow2.org/ns/datasource/1.0"; - - /** - * Archive made from the datasource. - */ - private IFileArchive datasourceArchive = null; - - /** - * The xml deployable factory. - */ - private XmlFileDeployableFactory factory = null; - - /** - * The deployable factory manager. - */ - private IFileDeployableFactoryManager manager = null; - - /** - * Prepares test data. - * @throws Exception - */ - @BeforeClass - public void init() throws Exception { - // ClassCastException - datasourceArchive = (IFileArchive) ArchiveManager.getInstance() - .getArchive(new File(DATASOURCE_XML_PATH)); - Assert.assertNotNull(datasourceArchive); - - factory = new XmlFileDeployableFactoryImpl(); - factory.registerFileDeployable( - DatasourceDeployableImpl.class, - DATASOURCE_NS); - - manager = new DefaultFileDeployableFactoryManager(); - manager.addFileDeployableFactory(factory); - } - - /** - * Test datasource conversion with the factory. - * @throws Exception - */ - @Test - public void convertDatasourceArchiveToDeployable() throws Exception { - FileDeployable fileDeployable = factory.getFileDeployable(datasourceArchive); - Assert.assertEquals(fileDeployable.getClass(),DatasourceDeployableImpl.class); - } - - /** - * Test datasource conversion with the manager. - * @throws Exception - */ - @Test - public void convertDatasourceArchiveWithManager() throws Exception { - FileDeployable fileDeployable = manager.getFileDeployable(datasourceArchive); - Assert.assertEquals(fileDeployable.getClass(),DatasourceDeployableImpl.class); - } - - - /** - * Test deployment plan conversion with the DeployableHelper+factory. - * @throws Exception - */ - @Test - public void convertWithDeployableHelper() throws Exception { - DeployableHelper.setFileDeployableFactory(factory); - IDeployable deployable = DeployableHelper.getDeployable(datasourceArchive); - Assert.assertEquals(deployable.getClass(), DatasourceDeployableImpl.class); - } - - /** - * Test deployment plan conversion with the DeployableHelper+manager. - * @throws Exception - */ - @Test - public void convertWithDeployableHelperAndManager() throws Exception { - DeployableHelper.setFileDeployableFactory(manager); - IDeployable deployable = DeployableHelper.getDeployable(datasourceArchive); - Assert.assertEquals(deployable.getClass(), DatasourceDeployableImpl.class); - } - -} diff --git a/jonas/modules/libraries/jonas-datasources/deploy/impl/src/test/resources/exemple-datasource.xml b/jonas/modules/libraries/jonas-datasources/deploy/impl/src/test/resources/exemple-datasource.xml deleted file mode 100644 index c392ff4a94139d78c2ae88dbe3bfac24641f4176..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-datasources/deploy/impl/src/test/resources/exemple-datasource.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - jdbc_1 - jdbc:oacle:thin://localhost:1521/db_oracle - oracle.jdbc.driver.OracleDriver - jonasoracle - jonaspassoracle - rdb.oracle - - - 0 - 4167260737 - string - 5 - 10 - 100 - 899460641 - 394024595 - 150826366 - - - - - - jdbc_1 - jdbc:hsqldb:hsql://localhost:9001/db_jonas - org.hsqldb.jdbcDriver - jonas - jonas - rdb.hsql - - - 0 - 1448 - 60 - string - 15 - 100 - 577956569 - 5 - 100 - - - diff --git a/jonas/modules/libraries/jonas-datasources/deploy/pom.xml b/jonas/modules/libraries/jonas-datasources/deploy/pom.xml deleted file mode 100644 index 067ecd04aedc39a349306d215a61b97531fbea88..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-datasources/deploy/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - org.ow2.jonas - jonas-datasource - 5.2.4-SNAPSHOT - - 4.0.0 - org.ow2.jonas - jonas-datasource-deploy - pom - JOnAS :: Libraries :: Datasource :: Deploy - Deployable part for the datasource - - - api - impl - - diff --git a/jonas/modules/libraries/jonas-datasources/deployer/pom.xml b/jonas/modules/libraries/jonas-datasources/deployer/pom.xml deleted file mode 100644 index 499d081de4e3874e97b4f831286af3fb3ceb9e0f..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-datasources/deployer/pom.xml +++ /dev/null @@ -1,179 +0,0 @@ - - - - - org.ow2.jonas - jonas-datasource - 5.2.4-SNAPSHOT - - 4.0.0 - org.ow2.jonas - jonas-datasource-deployer - JOnAS :: Libraries :: Datasource :: Deployer - Deployer for datasource - - - ${basedir}/target - - - - - org.ow2.util - util-ee-deploy-api - ${ow2-bundles.version} - - - - org.ow2.util - util-archive-api - ${ow2-bundles.version} - - - - org.ow2.util - util-archive-impl - ${ow2-bundles.version} - - - - org.ow2.util - util-url - ${ow2-bundles.version} - - - - org.ow2.jonas - jonas-datasource-reader - ${project.version} - - - - org.ow2.jonas - jonas-datasource-deploy-api - ${project.version} - - - - org.ow2.jonas - jonas-version - ${project.version} - - - - org.ow2.jonas - jonas-commons - ${project.version} - - - - - org.testng - testng - 5.8 - jdk15 - test - - - org.ow2.jonas - jonas-generators-raconfig - ${project.version} - - - org.ow2.util - util-ee-deploy-impl - ${ow2-bundles.version} - - - org.ow2.jonas - jonas-datasource-binding - ${project.version} - - - - org.ow2.jonas - jonas-datasource-deploy-impl - ${project.version} - test - - - - org.ow2.jonas - jonas-jca-jdbc-dm - ${project.version} - rar - test - - - - - - - maven-dependency-plugin - - - copy rar - - copy - - generate-test-resources - - - - org.ow2.jonas - jonas-jca-jdbc-dm - rar - true - ${output.dir} - jonas-jca-jdbc-dm.rar - - - - - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - once - classes - 10 - - - rar.path - ${output.dir}/jonas-jca-jdbc-dm.rar - - - - - - - diff --git a/jonas/modules/libraries/jonas-datasources/deployer/src/main/java/org/ow2/jonas/datasource/deployer/api/IDatasourceDeployer.java b/jonas/modules/libraries/jonas-datasources/deployer/src/main/java/org/ow2/jonas/datasource/deployer/api/IDatasourceDeployer.java deleted file mode 100644 index 39125d62fcd3d6b7b5bc607d1417c564fdc414a4..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-datasources/deployer/src/main/java/org/ow2/jonas/datasource/deployer/api/IDatasourceDeployer.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2010 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.datasource.deployer.api; - -import org.ow2.util.ee.deploy.api.deployer.IDeployer; -import org.ow2.util.ee.deploy.api.deployer.IDeployerManager; - -/** - * Interface for deployment plans deployer. - * @author Alexis RENOUX - */ -public interface IDatasourceDeployer extends IDeployer { - - /** - * Returns the deployer manager. - * @return the deployer manager. - */ - IDeployerManager getDeployerManager(); - - /** - * Sets the deployer manager. - * @param deployerManager the new deployer manager. - */ - void setDeployerManager(IDeployerManager deployerManager); -} diff --git a/jonas/modules/libraries/jonas-datasources/deployer/src/main/java/org/ow2/jonas/datasource/deployer/impl/DatasourceDeployer.java b/jonas/modules/libraries/jonas-datasources/deployer/src/main/java/org/ow2/jonas/datasource/deployer/impl/DatasourceDeployer.java deleted file mode 100644 index d044f9eff6e7498b38e42efcb6b6e11540bfeb63..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-datasources/deployer/src/main/java/org/ow2/jonas/datasource/deployer/impl/DatasourceDeployer.java +++ /dev/null @@ -1,421 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2010-2012 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.datasource.deployer.impl; - -import java.io.File; -import java.io.IOException; -import java.net.URI; -import java.net.URL; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Properties; - -import org.ow2.jonas.datasource.binding.DatasourceType; -import org.ow2.jonas.datasource.binding.Datasources; -import org.ow2.jonas.datasource.deploy.deployable.api.DatasourceDeployable; -import org.ow2.jonas.datasource.deployer.api.IDatasourceDeployer; -import org.ow2.jonas.datasource.reader.DatasourceXmlReader; -import org.ow2.jonas.generators.raconfig.RAConfig; -import org.ow2.jonas.generators.raconfig.RAConfigException; -import org.ow2.jonas.lib.work.DeployerLog; -import org.ow2.jonas.properties.ServerProperties; -import org.ow2.util.archive.api.ArchiveException; -import org.ow2.util.archive.api.IArchive; -import org.ow2.util.archive.impl.ArchiveManager; -import org.ow2.util.ee.deploy.api.deployable.IDeployable; -import org.ow2.util.ee.deploy.api.deployer.DeployerException; -import org.ow2.util.ee.deploy.api.deployer.IDeployerManager; -import org.ow2.util.ee.deploy.api.deployer.UnsupportedDeployerException; -import org.ow2.util.ee.deploy.impl.helper.DeployableHelper; -import org.ow2.util.ee.deploy.impl.helper.DeployableHelperException; -import org.ow2.util.log.Log; -import org.ow2.util.log.LogFactory; -import org.ow2.util.url.URLUtils; - -/** - * This deployer will deploy Datasource module. Generating .RAR files and deploy - * them. - * @author Alexis RENOUX - */ -public class DatasourceDeployer implements IDatasourceDeployer { - - /** - * Logger. - */ - private Log logger = LogFactory.getLog(DatasourceDeployer.class); - - /** - * The Deployer Manager that will be used to deploy RAR files. - */ - private IDeployerManager deployerManager = null; - - /** - * The datasourceReader that will be used to read the datasource XML file. - */ - private DatasourceXmlReader datasourceReader; - - /** - * The default RAR creation path. - */ - private static final String DEFAULT_ARCHIVE_PATH = "deployer" + File.separator +"datasources"; - - /** - * Working directory - */ - protected File archiveFile = null; - - /** - * The datasources that were deployed, and the generated RARs. - */ - private Map>> datasourceDeployables = new HashMap>>(); - - /** - * Server Properties. - */ - protected ServerProperties serverProps; - - /** - * Reference to the {@link DeployerLog} which is the class that manage the - * accesses to the log file (to remove the jar). - */ - protected DeployerLog deployerLog = null; - - /** - * Internal JDBC RAR used to build datasource RAR - */ - private String dmRar; - - /** - * Creates a new DatasourceDeployer. - */ - public DatasourceDeployer() throws IOException { - - } - - /** - * Resource service used by this deployer. - */ - // private ResourceService resourceService = null; - /** - * Undeploy the given Datasource. (Not implemented yet) - * @param datasourceDeployable the deployable to remove. - * @throws DeployerException if the Datasource is not undeployed. - */ - protected void undeployDatasource(final DatasourceDeployable datasourceDeployable) throws DeployerException { - logger.info("Undeploying {0}", datasourceDeployable); - - URI uri = getUri(datasourceDeployable); - for (IDeployable rar : datasourceDeployables.get(uri)) { - // Undeploy the RAR file - try { - this.deployerManager.undeploy(rar); - } catch (DeployerException e) { - throw new DeployerException("Exception while undeploying deployable " + rar, e); - } catch (UnsupportedDeployerException e) { - throw new DeployerException("No deployer found for deployable " + rar, e); - } - } - - // Remove the entry deployment was succesfull. - this.datasourceDeployables.remove(uri); - - } - - /** - * Deploy the given Datasource. - * @param deployable the deployable to add. - * @throws DeployerException if the Datasource is not deployed. - */ - protected void deployDatasource(final IDeployable deployable) throws DeployerException { - logger.debug("Request to deploy {0} received", deployable); - - if (deployable == null) { - throw new DeployerException("Null deployable"); - } - - if (!(DatasourceDeployable.class.isAssignableFrom(deployable.getClass()))) { - throw new DeployerException("Bad deployable type " + deployable.getClass()); - } - - logger.info("Deploying datasource {0}", deployable); - - DatasourceDeployable datasourceDeployable = DatasourceDeployable.class.cast(deployable); - - datasourceReader = new DatasourceXmlReader(); - if (datasourceReader == null) { - throw new DeployerException("Deployment aborted - The DatasourceReader is null"); - } - - File xmlfile = this.getFile(datasourceDeployable); - Datasources datasources = null; - - // Create java objects from XML file - try { - datasources = datasourceReader.extractDataSources(xmlfile); - } catch (Exception e) { - throw new DeployerException("Error while parsing file " + xmlfile + " - Deployment aborted", e); - } - - if (datasources == null) { - throw new DeployerException("The deployable " + deployable + " resolved in null datasource - Deployment aborted"); - } - - datasourceDeployable.setAttachedData(datasources); - List> generatedResourceAdapters = new ArrayList>(); - - for (DatasourceType ds : datasources.getDatasources()) { - DatasourceType dsInitialized = datasourceReader.initDataSource(ds); - // Get the Properties java object from datasourceType - Properties properties = datasourceReader.getProperties(dsInitialized); - String fileIn = null; - String fileOut = null; - String fileName = ""; - try { - fileName = "ds-" + dsInitialized.getDatasourceConfiguration().getName().replace('/', '_') + "-"; - fileOut = File.createTempFile(fileName, ".rar", archiveFile).getAbsolutePath(); - } catch (IOException e1) { - String msg = "Error while creating temp file <" + fileName + ".rar> in directory <" + archiveFile.getPath() + ">"; - throw new DeployerException(msg, e1); - } - - // Generate .rar (only DM are supported) - fileIn = dmRar; - - logger.info("Generate RAR {0} -> {1}", fileIn, fileOut); - - try { - RAConfig.generateRars(properties, "JOnASJDBC_DM", fileIn, fileOut); - } catch (RAConfigException e) { - logger.error("Failure to deploy datasource {0}", ds); - throw new DeployerException(e); - } - - /* - * Deploy .rar 1- Create IArchive 2- Create Deployable 3- Deploy - */ - - // Create an IArchive - File generatedFile = new File(fileOut); - - if (!generatedFile.exists()) { - logger.error("RAR was not generated with RAConfig- {0}", fileOut); - throw new DeployerException("RAR was not generated <" + fileOut + ">"); - } - - IArchive archiveRar = ArchiveManager.getInstance().getArchive(generatedFile); - if (archiveRar == null) { - throw new DeployerException("Null archive for file " + fileOut); - } - - // Create a Deployable - IDeployable rardeployable = null; - try { - rardeployable = DeployableHelper.getDeployable(archiveRar); - } catch (DeployableHelperException e) { - throw new DeployerException(e); - } - if (rardeployable == null) { - throw new DeployerException("Null deployable for archive " + archiveRar); - } - - // Deploy - try { - this.deployerManager.deploy(rardeployable); - } catch (DeployerException e) { - throw new DeployerException("Exception while deploying deployable " + rardeployable, e); - } catch (UnsupportedDeployerException e) { - throw new DeployerException("No deployer found for deployable " + rardeployable, e); - } - - // Here deployment was successful. - generatedResourceAdapters.add(rardeployable); - - try { - // The file is unpacked, so log it - if (deployerLog != null) { - File unpackedFile = URLUtils.urlToFile(datasourceDeployable.getArchive().getURL()); - deployerLog.addEntry(xmlfile, new File(fileOut)); - } - } catch (Exception e) { - throw new DeployerException("Cannot get the url of the initial deployable for the datasource Module '" + deployable - + "'.", e); - } - } - - this.datasourceDeployables.put(xmlfile.toURI(), generatedResourceAdapters); - - } - - /** - * Allows to get a File from the given DataSource Deployable. - * @param datasourceDeployable the given DataSource deployable. - * @return a File object of this deployable - * @throws DeployerException if the File can't be obtained. - */ - protected File getFile(final DatasourceDeployable datasourceDeployable) throws DeployerException { - // Get URL - URL datasourceURL = null; - try { - datasourceURL = datasourceDeployable.getArchive().getURL(); - } catch (ArchiveException e) { - throw new DeployerException("Cannot get URL from Datasource deployable '" + datasourceDeployable + "'.", e); - } - - // Get File - return URLUtils.urlToFile(datasourceURL); - } - - /** - * {@inheritDoc} - */ - public void deploy(final IDeployable deployable) throws DeployerException { - check(deployable); - - // Deploy the Datasource Deployable - - if (DatasourceDeployable.class.isAssignableFrom(deployable.getClass())) { - deployDatasource(deployable); - } - } - - /** - * {@inheritDoc} - */ - public boolean isDeployed(final IDeployable deployable) throws DeployerException { - if (this.supports(deployable)) { - return (this.datasourceDeployables.get(getUri(deployable)) != null); - } else { - return false; - } - - } - - /** - * Extract the URI of the given Deployable - * @param deployable the given DataSource deployable. - * @return the URI identifying this deployable - * @throws DeployerException if the URI can't be obtained. - */ - protected URI getUri(final IDeployable deployable) { - // Get URI - try { - return deployable.getArchive().getURL().toURI(); - } catch (Exception e) { - // Should never happen - throw new RuntimeException("Cannot get URI from Datasource deployable '" + deployable + "'.", e); - } - } - - /** - * check if the RAR is currently deployed - */ - public boolean isDeployed(final String rarFileName) { - - return datasourceDeployables.containsValue(rarFileName); - - } - - /** - * {@inheritDoc} - */ - public boolean supports(final IDeployable deployable) { - return (DatasourceDeployable.class.isAssignableFrom(deployable.getClass())); - } - - /** - * {@inheritDoc} - */ - public void undeploy(final IDeployable deployable) throws DeployerException { - if (!this.supports(deployable)) { - throw new DeployerException("Cannot undeploy non-datasource deployable " + deployable + "."); - } - if (!this.isDeployed(deployable)) { - throw new DeployerException("Cannot undeploy datasource deployable " + deployable + " - it is not deployed."); - } - undeployDatasource(DatasourceDeployable.class.cast(deployable)); - } - - /** - * Check if the given deployable is deployable or not. - * @param deployable the deployable to check. - * @throws DeployerException if the deployable is not supported. - */ - private void check(final IDeployable deployable) throws DeployerException { - if (!supports(deployable)) { - throw new DeployerException("The deployment of the deployable'" + deployable - + "' is not supported by this deployer."); - } - } - - /** - * {@inheritDoc} - */ - public IDeployerManager getDeployerManager() { - return deployerManager; - } - - /** - * {@inheritDoc} - */ - public void setDeployerManager(final IDeployerManager deployerManager) { - this.deployerManager = deployerManager; - } - - /** - * Set the Server Properties. - * @param props {@link ServerProperties} instance - */ - public void setServerProperties(final ServerProperties props) { - this.serverProps = props; - } - - /** - * Create working directory for the deployer. - */ - protected void initWorkingDirectory() { - if (archiveFile == null) { - archiveFile = new File(serverProps.getWorkDirectory() + File.separator + DEFAULT_ARCHIVE_PATH + File.separator + serverProps.getServerName()); - archiveFile.mkdirs(); - } - } - - /** - * @return Get path to the DM rar - */ - public String getDmRar() { - return dmRar; - } - - /** - * set the DM RAR path - * @param dmRar path to rar file - */ - public void setDmRar(final String dmRar) { - this.dmRar = dmRar; - } - -} diff --git a/jonas/modules/libraries/jonas-datasources/deployer/src/test/java/org/ow2/jonas/datasource/deployer/TestDatasourceDeployer.java b/jonas/modules/libraries/jonas-datasources/deployer/src/test/java/org/ow2/jonas/datasource/deployer/TestDatasourceDeployer.java deleted file mode 100644 index 8264516a2e09cebb9505089e9f5e520b4780e61c..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-datasources/deployer/src/test/java/org/ow2/jonas/datasource/deployer/TestDatasourceDeployer.java +++ /dev/null @@ -1,179 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2010 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.datasource.deployer; - -import java.io.File; -import java.io.IOException; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; - -import org.ow2.jonas.datasource.deploy.deployable.api.DatasourceDeployable; -import org.ow2.jonas.datasource.deploy.deployable.impl.DatasourceDeployableImpl; -import org.ow2.jonas.datasource.deployer.impl.DatasourceDeployer; -import org.ow2.util.archive.api.IFileArchive; -import org.ow2.util.archive.impl.FileArchiveImpl; -import org.ow2.util.ee.deploy.api.deployer.DeployerException; -import org.ow2.util.ee.deploy.api.deployer.IDeployer; -import org.ow2.util.ee.deploy.impl.deployer.DeployerManager; -import org.testng.Assert; -import org.testng.FileAssert; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; -import org.ow2.jonas.properties.ServerProperties; -import java.util.Properties; - - -/** - * Test class for the DatasourceDeployer. - * What needs to be tested : - * - Given a Datasource XML file, the deployer accepts to deploy it - * - a RAR file is generated - * - The jonas-rar.xml is inside and contains the required data - * - undeployment works - * @author Alexis Renoux. - * @author Mickaël LEDUQUE. - */ -public class TestDatasourceDeployer { - - /** - * The XML File. - */ - private File xmlfile = null; - - /** - * The archive. - */ - private IFileArchive archive = null; - - /** - * The deployable. - */ - private DatasourceDeployable deployable = null; - - /** - * The datasource deployer. - */ - private DatasourceDeployer datasourceDeployer; - - /** - * The directory to resources. - */ - private static final String TEST_XML_DIR = "src" + File.separator + "test" + File.separator + "resources"; - - /** - * The path to the datasource test file. - */ - private static final String TEST_XML_PATH = TEST_XML_DIR + File.separator + "datasources.xml"; - - /** - * The fake rar deployer. - */ - private TestRarDeployer rarDeployer; - - @BeforeClass - public void init() throws Exception { - xmlfile = new File(TEST_XML_PATH); - archive = new FileArchiveImpl(xmlfile); - datasourceDeployer = new DatasourceDeployer(); - datasourceDeployer.setServerProperties(new MyProperties()); - datasourceDeployer.setDmRar(System.getProperty("rar.path")); - deployable = new DatasourceDeployableImpl(archive); - DeployerManager deployerManager = new DeployerManager(); - rarDeployer = new TestRarDeployer(); - deployerManager.register(rarDeployer); - datasourceDeployer.setDeployerManager(deployerManager); - - } - - @Test() - public void deployerSupportsDeployable() { - Assert.assertTrue(datasourceDeployer.supports(deployable)); - } - - @Test(dependsOnMethods = {"deployerSupportsDeployable"}) - public void tryDeploy() throws Exception { - datasourceDeployer.deploy(deployable); - } - - @Test(dependsOnMethods = {"tryDeploy"}) - public void rarDeployed() throws DeployerException { - Assert.assertTrue(this.datasourceDeployer.isDeployed(deployable)); - Assert.assertEquals(this.rarDeployer.getDeployed().size(), 2); - } - - private class MyProperties implements ServerProperties { - - - public String getValue(String key) { - return System.getenv("JONAS_ROOT"); - } - - public String getValue(String key, String defaultVal) { - return defaultVal; - } - - public boolean getValueAsBoolean(String key, boolean def) { - return def; - } - - public String[] getValueAsArray(String key) { - String [] str = new String[5]; - return str; - } - - public String getDomainName() { - return "domain"; - } - - public String getServerName() { - return "server"; - } - - public String getPropFileName() { - return "file"; - } - - public Properties getConfigFileEnv() { - return new Properties(); - } - - public String getVersionsFile() { - return "file"; - } - - public boolean isMaster() { - return false; - } - - public boolean isDevelopment() { - return false; - } - - public String getWorkDirectory() { - return System.getProperty("java.io.tmpdir") ; - - } - - } -} diff --git a/jonas/modules/libraries/jonas-datasources/deployer/src/test/java/org/ow2/jonas/datasource/deployer/TestRarDeployer.java b/jonas/modules/libraries/jonas-datasources/deployer/src/test/java/org/ow2/jonas/datasource/deployer/TestRarDeployer.java deleted file mode 100644 index d3a5d954339397a0333eab8b54e866f4c0af548e..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-datasources/deployer/src/test/java/org/ow2/jonas/datasource/deployer/TestRarDeployer.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2010 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.datasource.deployer; - -import java.util.ArrayList; -import java.util.List; - -import org.ow2.util.ee.deploy.api.deployable.IDeployable; -import org.ow2.util.ee.deploy.api.deployable.RARDeployable; -import org.ow2.util.ee.deploy.api.deployer.DeployerException; -import org.ow2.util.ee.deploy.api.deployer.IDeployer; -import org.ow2.util.log.Log; -import org.ow2.util.log.LogFactory; - -/** - * Fake RAR deployer for the tests. - * @author mleduque - * - */ -public class TestRarDeployer implements IDeployer { - - /** - * The logger. - */ - private Log logger = LogFactory.getLog(TestRarDeployer.class); - - /** - * The deployed deployables. - */ - private List> deployed = new ArrayList>(); - - /** - * {@inheritDoc} - */ - public void deploy(final IDeployable deployable) throws DeployerException { - logger.info("Deploying deployable {0}", deployable); - if (deployable != null && supports(deployable)) { - logger.info("Deployable {0} supported by this deployer.", deployable); - this.deployed.add(deployable); - } - } - - /** - * {@inheritDoc} - */ - public boolean isDeployed(final IDeployable deployable) throws DeployerException { - logger.info("Deployed objects : {0}", this.deployed); - return (this.deployed.contains(deployable)); - } - - /** - * {@inheritDoc} - */ - public boolean supports(final IDeployable deployable) { - return (RARDeployable.class.isAssignableFrom(deployable.getClass())); - } - - /** - * {@inheritDoc} - */ - public void undeploy(final IDeployable deployable) throws DeployerException { - if (deployable != null && supports(deployable)) { - if (!isDeployed(deployable)) { - throw new DeployerException("Deplyable is not deployed."); - } - this.deployed.remove(deployable); - } else { - throw new DeployerException("Invalid deployable"); - } - } - - /** - * Returns the list of deployed objects. - * @return the list of deployed objects. - */ - public List> getDeployed() { - return this.deployed; - } - -} diff --git a/jonas/modules/libraries/jonas-datasources/deployer/src/test/resources/datasources.xml b/jonas/modules/libraries/jonas-datasources/deployer/src/test/resources/datasources.xml deleted file mode 100644 index 249d2c91f37d3990e8f7548680e68cb0d17c782e..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-datasources/deployer/src/test/resources/datasources.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - jdbc_1 - jdbc:oracle:thin://localhost:1521/db_oracle - oracle.jdbc.driver.OracleDriver - jonasoracle - jonaspassoracle - rdb.oracle - - - 0 - 600 - select 1 - 5 - 100 - 100 - 50 - - - - - - jdbc_2 - jdbc:hsqldb:hsql://localhost:9001/db_jonas - org.hsqldb.jdbcDriver - jonas - jonas - rdb.hsql - - - 0 - 1448 - 60 - string - 1 - 10 - 100 - 30 - 5 - 100 - - - diff --git a/jonas/modules/libraries/jonas-datasources/pom.xml b/jonas/modules/libraries/jonas-datasources/pom.xml deleted file mode 100644 index 79c232f5ccd4eb9afdf1e49b09c480b2b9103500..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-datasources/pom.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - org.ow2.jonas - jonas-libraries - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas - jonas-datasource - pom - JOnAS :: Libraries :: Datasource - Datasource modules - - - reader - deploy - deployer - binding - - - ${ow2-bundles.version} - - diff --git a/jonas/modules/libraries/jonas-datasources/reader/pom.xml b/jonas/modules/libraries/jonas-datasources/reader/pom.xml deleted file mode 100644 index c6ad8cfbd594f9b21ec98c483aa74db05fce6e88..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-datasources/reader/pom.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - org.ow2.jonas - jonas-datasource - 5.2.4-SNAPSHOT - - 4.0.0 - org.ow2.jonas - jonas-datasource-reader - JOnAS :: Libraries :: Datasource :: Reader - Parser for datasource xml file - - - org.ow2.jonas - jonas-dbm - ${project.version} - - - - org.ow2.jonas - jonas-datasource-binding - ${project.version} - - - - - org.testng - testng - 5.8 - jdk15 - test - - - - diff --git a/jonas/modules/libraries/jonas-datasources/reader/src/main/java/org/ow2/jonas/datasource/reader/DatasourceValidator.java b/jonas/modules/libraries/jonas-datasources/reader/src/main/java/org/ow2/jonas/datasource/reader/DatasourceValidator.java deleted file mode 100644 index 304519dc9cfee89c5fe315b56b8cb620482699cf..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-datasources/reader/src/main/java/org/ow2/jonas/datasource/reader/DatasourceValidator.java +++ /dev/null @@ -1,85 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2010 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.datasource.reader; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; - -import javax.xml.XMLConstants; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.Source; -import javax.xml.transform.stream.StreamSource; -import javax.xml.validation.Schema; -import javax.xml.validation.SchemaFactory; -import javax.xml.validation.Validator; - -import org.xml.sax.SAXException; - -/** - * Class that does validation on a datasource. - * @author Tarik Ihadjadene - */ -public class DatasourceValidator { - - /** - * Private no-args constructor. - */ - @SuppressWarnings("unused") - private DatasourceValidator() { - } - - /** - * XML Schema for DataSources. - */ - private static final String DATASOURCE_XSD = "/org/ow2/jonas/datasource/binding/schema/jonas-datasources-1.0.xsd"; - - /** - * Gets the XML file and tries to validate it. - * @param xmlFile the file to validate. - * @throws SAXException if a SAX exception is triggered. - * @throws ParserConfigurationException if the parser couldn't be - * configured. - * @throws IOException if the file couldn't be read. - */ - public DatasourceValidator(final File xmlFile) throws SAXException, ParserConfigurationException, IOException { - - SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); - InputStream is = getClass().getResourceAsStream(DATASOURCE_XSD); - if (is == null) { - System.out.println("is == null"); - } - Source source = new StreamSource(is); - if (source == null) { - System.out.println("source == null"); - } - Schema schema = schemaFactory.newSchema(source); - Validator validator = schema.newValidator(); - - Source xmlSource = new StreamSource(xmlFile); - - validator.validate(xmlSource); - } -} diff --git a/jonas/modules/libraries/jonas-datasources/reader/src/main/java/org/ow2/jonas/datasource/reader/DatasourceXmlReader.java b/jonas/modules/libraries/jonas-datasources/reader/src/main/java/org/ow2/jonas/datasource/reader/DatasourceXmlReader.java deleted file mode 100644 index bd0f54633b4b296d6b4d962f5628831c2140593e..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-datasources/reader/src/main/java/org/ow2/jonas/datasource/reader/DatasourceXmlReader.java +++ /dev/null @@ -1,218 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2010 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.datasource.reader; - -import java.io.File; -import java.math.BigInteger; -import java.util.Properties; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Unmarshaller; - -import org.ow2.jonas.datasource.binding.ConnectionManagerConfigurationType; -import org.ow2.jonas.datasource.binding.DatasourceConfigurationType; -import org.ow2.jonas.datasource.binding.DatasourceType; -import org.ow2.jonas.datasource.binding.Datasources; -import org.ow2.jonas.datasource.binding.ObjectFactory; -import org.ow2.jonas.dbm.internal.DBMConstants; - -/** - * This class is used to transform an XML file to java objects and then to - * generate Properties objects from java objects. - * @author Rodrigue SOUBEIGA - * @author Mickaël LEDUQUE - */ -public class DatasourceXmlReader implements IDatasourceXmlReader { - - /** - * {@inheritDoc} - */ - public boolean isXmlValid(final File xmlFile) { - try { - new DatasourceValidator(xmlFile); - } catch (Exception e) { - e.printStackTrace(); - return false; - } - - return true; - } - - /** - * {@inheritDoc} - */ - @SuppressWarnings("unchecked") - public Datasources extractDataSources(final File xmlFile) throws JAXBException { - - if (!isXmlValid(xmlFile)) { - throw new JAXBException("XML file is not valid."); - } - - JAXBContext jc = JAXBContext.newInstance(ObjectFactory.class); - Unmarshaller unmarshaller = jc.createUnmarshaller(); - Datasources theDatasources = (Datasources) unmarshaller.unmarshal(xmlFile); - - return theDatasources; - } - - /** - * {@inheritDoc} - */ - public DatasourceType initDataSource(final DatasourceType dataSource) { - - this.initConnectionManagerConfiguration(dataSource.getConnectionManagerConfiguration()); - this.initDatasourceConfiguration(dataSource.getDatasourceConfiguration()); - - return dataSource; - } - - /** - * {@inheritDoc} - */ - public Properties getProperties(final DatasourceType dataSource) { - // TODO use constants? (Mickaël) - // Yes, they are even defined in DBMConstants AFAIK - Properties props = new Properties(); - DatasourceConfigurationType dsConfig = dataSource.getDatasourceConfiguration(); - ConnectionManagerConfigurationType cmConfig = dataSource.getConnectionManagerConfiguration(); - - props.setProperty(DBMConstants.NAME, dsConfig.getName()); - props.setProperty(DBMConstants.URL, dsConfig.getUrl()); - props.setProperty(DBMConstants.CLASSNAME, dsConfig.getClassname()); - props.setProperty(DBMConstants.USERNAME, dsConfig.getUsername()); - props.setProperty(DBMConstants.PASSWORD, dsConfig.getPassword()); - props.setProperty(DBMConstants.MAPPERNAME, dsConfig.getMapper()); - props.setProperty(DBMConstants.DESCRIPTION, dsConfig.getDescription()); - props.setProperty(DBMConstants.ISOLATIONLEVEL, dsConfig.getIsolationlevel()); - - props.setProperty(DBMConstants.CONNCHECKLEVEL, String.valueOf(cmConfig.getConnchecklevel())); - props.setProperty(DBMConstants.CONNMAXAGE, String.valueOf(cmConfig.getConnmaxage())); - props.setProperty(DBMConstants.MAXOPENTIME, String.valueOf(cmConfig.getMaxopentime())); - props.setProperty(DBMConstants.CONNTESTSTMT, cmConfig.getConnteststmt()); - props.setProperty(DBMConstants.INITCONPOOL, String.valueOf(cmConfig.getInitconpool())); - props.setProperty(DBMConstants.MINCONPOOL, String.valueOf(cmConfig.getMinconpool())); - props.setProperty(DBMConstants.MAXCONPOOL, String.valueOf(cmConfig.getMaxconpool())); - props.setProperty(DBMConstants.SAMPLINGPERIOD, String.valueOf(cmConfig.getSamplingperiod())); - props.setProperty(DBMConstants.MAXWAITTIME, String.valueOf(cmConfig.getMaxwaittime())); - props.setProperty(DBMConstants.MAXWAITERS, String.valueOf(cmConfig.getMaxwaiters())); - props.setProperty(DBMConstants.PSTMTMAX, String.valueOf(cmConfig.getPstmtmax())); - - return props; - } - - /** - * This method is used to initialize the fields of a - * ConnectionmanagerConfigurationType. - * @param cmConfig the object which fields must be initialized. - */ - private void initConnectionManagerConfiguration(final ConnectionManagerConfigurationType cmConfig) { - String buffer; - - cmConfig.setConnchecklevel(Integer.valueOf(initParam(DBMConstants.DEF_CONNCHECKLEVEL, cmConfig.getConnchecklevel()))); - - buffer = initParam(DBMConstants.DEF_CONNMAXAGE, cmConfig.getConnmaxage()); - cmConfig.setConnmaxage(BigInteger.valueOf(Long.valueOf(buffer))); - - buffer = initParam(DBMConstants.DEF_MAXOPENTIME, cmConfig.getMaxopentime()); - cmConfig.setMaxopentime(BigInteger.valueOf(Long.valueOf(buffer))); - - buffer = initParam(DBMConstants.DEF_CONNTESTSTMT, cmConfig.getConnteststmt()); - cmConfig.setConnteststmt(buffer); - - buffer = initParam(DBMConstants.DEF_PSTMTMAX, cmConfig.getPstmtmax()); - cmConfig.setPstmtmax(BigInteger.valueOf(Long.valueOf(buffer))); - - buffer = initParam(DBMConstants.DEF_INITCONPOOL, cmConfig.getInitconpool()); - cmConfig.setInitconpool(BigInteger.valueOf(Long.valueOf(buffer))); - - buffer = initParam(DBMConstants.DEF_MINCONPOOL, cmConfig.getMinconpool()); - cmConfig.setMinconpool(BigInteger.valueOf(Long.valueOf(buffer))); - - buffer = initParam(DBMConstants.DEF_MAXCONPOOL, cmConfig.getMaxconpool()); - cmConfig.setMaxconpool(BigInteger.valueOf(Long.valueOf(buffer))); - - buffer = initParam(DBMConstants.DEF_MAXWAITTIME, cmConfig.getMaxwaittime()); - cmConfig.setMaxwaittime(BigInteger.valueOf(Long.valueOf(buffer))); - - buffer = initParam(DBMConstants.DEF_MAXWAITERS, cmConfig.getMaxwaiters()); - cmConfig.setMaxwaiters(BigInteger.valueOf(Long.valueOf(buffer))); - - buffer = initParam(DBMConstants.DEF_SAMPLINGPERIOD, cmConfig.getSamplingperiod()); - cmConfig.setSamplingperiod(BigInteger.valueOf(Long.valueOf(buffer))); - } - - /** - * This method is used to initialize the fields of a - * DatasourceConfigurationType. - * @param dsConfig the object which fields must be initialized. - */ - private void initDatasourceConfiguration(final DatasourceConfigurationType dsConfig) { - String buffer; - - buffer = initParam(DBMConstants.NAME, dsConfig.getName()); - dsConfig.setName(buffer); - - buffer = initParam(DBMConstants.DEF_CLASSNAME, dsConfig.getClassname()); - dsConfig.setClassname(buffer); - - buffer = initParam(DBMConstants.DEF_URL, dsConfig.getUrl()); - dsConfig.setUrl(buffer); - - buffer = initParam(DBMConstants.DEF_DESCRIPTION, dsConfig.getDescription()); - dsConfig.setDescription(buffer); - - buffer = initParam(DBMConstants.DEF_USERNAME, dsConfig.getUsername()); - dsConfig.setUsername(buffer); - - buffer = initParam(DBMConstants.DEF_PASSWORD, dsConfig.getPassword()); - dsConfig.setPassword(buffer); - - buffer = initParam(DBMConstants.DEF_ISOLATIONLEVEL, dsConfig.getIsolationlevel()); - dsConfig.setIsolationlevel(buffer); - - buffer = initParam(DBMConstants.DEF_MAPPERNAME, dsConfig.getMapper()); - dsConfig.setMapper(buffer); - - } - - /** - * Returns the value of the parameter if it is not null or a default - * constant if not. - * @param paramDefaut represents the default constant value of the - * parameter. - * @param paramUser represents the old value of the parameter. - * @return a string which is the value of the parameter. - */ - private String initParam(final String paramDefaut, final Object paramUser) { - - if (paramUser == null) { - return paramDefaut; - } else { - return String.valueOf(paramUser); - } - - } -} diff --git a/jonas/modules/libraries/jonas-datasources/reader/src/main/java/org/ow2/jonas/datasource/reader/IDatasourceXmlReader.java b/jonas/modules/libraries/jonas-datasources/reader/src/main/java/org/ow2/jonas/datasource/reader/IDatasourceXmlReader.java deleted file mode 100644 index a3779dea04d2060e1ccc2ff112e24192e1af408a..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-datasources/reader/src/main/java/org/ow2/jonas/datasource/reader/IDatasourceXmlReader.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2010 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.datasource.reader; - -import java.io.File; -import java.util.Properties; - -import javax.xml.bind.JAXBException; - -import org.ow2.jonas.datasource.binding.DatasourceType; -import org.ow2.jonas.datasource.binding.Datasources; - -/** - * This is the interface which enable different operation on a XML file. - * @author Rodrigue SOUBEIGA - */ -public interface IDatasourceXmlReader { - - /** - * Initializes a DatasourceType object. - * @param dataSource which must be initialized. - * @return a DatasourceType object which is initialized - */ - DatasourceType initDataSource(DatasourceType dataSource); - - /** - * Returns a boolean which allows to know if the XML file is valid. - * @param xmlFile the XML file to analyze. - * @return a boolean which is true iff the XML file is valid. - */ - boolean isXmlValid(File xmlFile); - - /** - * Returns an list of datasourceType from an XML file. - * @param xmlFile the XML file which must be convert to java objects. - * @return a list of datasourceType - * @throws JAXBException if a problem occurs while creating the list of - * DatasourceType objects - */ - Datasources extractDataSources(File xmlFile) throws JAXBException; - - /** - * Converts a datasourceType object to a Properties object. - * @param datasource the DatasourceType object to convert. - * @return a Properties object from the conversion of a datasourceType - * object. - */ - Properties getProperties(final DatasourceType datasource); - -} diff --git a/jonas/modules/libraries/jonas-datasources/reader/src/test/java/org/ow2/jonas/datasource/reader/DatasourceReaderTest.java b/jonas/modules/libraries/jonas-datasources/reader/src/test/java/org/ow2/jonas/datasource/reader/DatasourceReaderTest.java deleted file mode 100644 index 959bd57f59b5824da838e1463f935200c1027e45..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-datasources/reader/src/test/java/org/ow2/jonas/datasource/reader/DatasourceReaderTest.java +++ /dev/null @@ -1,146 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2010 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.datasource.reader; - -import java.io.File; -import java.util.List; - -import javax.xml.bind.JAXBException; - -import org.ow2.jonas.datasource.binding.DatasourceType; -import org.testng.Assert; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - -/** - * This is the class test of the XmlTransform class. - * @author Rodrigue SOUBEIGA - */ - -public class DatasourceReaderTest { - - /** - * Path to the valid xml file for datasource. - */ - private static final String DATASOURCE_VALID_XML_PATH = "src/test/resources/exemple-datasource-good.xml"; - - /** - * The list of DatasourceType provide by the xml file. - */ - private List datasourceList = null; - - /** - * The instance of XmlTransfor class it is used in order to test the - * differents method of the XmlTransform class. - */ - private DatasourceXmlReader classtransform; - - /** - * The file object created from the xmlFile. - */ - private File datasourceFile; - - /** - * The method used to initialise the different objects needed to execute - * tests methods. - */ - @BeforeClass - public void init() { - this.datasourceFile = new File(DATASOURCE_VALID_XML_PATH); - - this.classtransform = new DatasourceXmlReader(); - - } - - /** - * We test if the xml file exists. - */ - @Test - public void fileExist() { - Assert.assertTrue(datasourceFile.exists()); - } - - /** - * Test of the extraction of the datasourceType list from the xml file. - * @throws Exception - */ - - @Test - public void extractDataSourcesTest() throws Exception { - - datasourceList = classtransform.extractDataSources(datasourceFile).getDatasources(); - Assert.assertNotNull(datasourceList, "Datasources unmarshalling failed"); - - } - - /** - * Test of the DatasourceType initialisation. - */ - @Test(dependsOnMethods = {"datasoureConfigurationContentsTest"}) - public void initdataSourceTest() { - for (DatasourceType ds : datasourceList) { - ds.getConnectionManagerConfiguration().setConnteststmt(null); - ds = classtransform.initDataSource(ds); - String response = ds.getConnectionManagerConfiguration().getConnteststmt(); - Assert.assertNotNull(response, "Initialisation failure : connteststmt."); - - ds.getDatasourceConfiguration().setUsername(null); - ds = classtransform.initDataSource(ds); - response = ds.getDatasourceConfiguration().getUsername(); - Assert.assertNotNull(response, "Initialisation failure : username."); - - } - } - - /** - * Test of the DatasourceConfiguration initialisation with a specific xml - * file. - */ - @Test(dependsOnMethods = {"extractDataSourcesTest"}) - public void datasoureConfigurationContentsTest() { - // Check the first datasource - DatasourceType ds1 = datasourceList.get(0); - Assert.assertEquals(ds1.getDatasourceConfiguration().getName(), "jdbc_1"); - Assert.assertEquals(ds1.getDatasourceConfiguration().getUrl(), "jdbc:oracle:thin://localhost:1521/db_oracle"); - Assert.assertEquals(ds1.getDatasourceConfiguration().getClassname(), "oracle.jdbc.driver.OracleDriver"); - Assert.assertEquals(ds1.getDatasourceConfiguration().getUsername(), "jonasoracle"); - Assert.assertEquals(ds1.getDatasourceConfiguration().getPassword(), "jonaspassoracle"); - Assert.assertEquals(ds1.getDatasourceConfiguration().getMapper(), "rdb.oracle"); - Assert.assertEquals(ds1.getDatasourceConfiguration().getDescription(), null); - Assert.assertEquals(ds1.getDatasourceConfiguration().getIsolationlevel(), null); - - // Check the second datasource - DatasourceType ds2 = datasourceList.get(1); - Assert.assertEquals(ds2.getDatasourceConfiguration().getName(), "jdbc_1"); - Assert.assertEquals(ds2.getDatasourceConfiguration().getUrl(), "jdbc:hsqldb:hsql://localhost:9001/db_jonas"); - Assert.assertEquals(ds2.getDatasourceConfiguration().getClassname(), "org.hsqldb.jdbcDriver"); - Assert.assertEquals(ds2.getDatasourceConfiguration().getUsername(), "jonas"); - Assert.assertEquals(ds2.getDatasourceConfiguration().getPassword(), "jonas"); - Assert.assertEquals(ds2.getDatasourceConfiguration().getMapper(), "rdb.hsql"); - Assert.assertEquals(ds2.getDatasourceConfiguration().getDescription(), null); - Assert.assertEquals(ds2.getDatasourceConfiguration().getIsolationlevel(), null); - - } -} diff --git a/jonas/modules/libraries/jonas-datasources/reader/src/test/java/org/ow2/jonas/datasource/reader/DatasourceValidatorTest.java b/jonas/modules/libraries/jonas-datasources/reader/src/test/java/org/ow2/jonas/datasource/reader/DatasourceValidatorTest.java deleted file mode 100644 index e40e6a211205e0812bf0f1039d2ab455757a9c0d..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-datasources/reader/src/test/java/org/ow2/jonas/datasource/reader/DatasourceValidatorTest.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2010 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.datasource.reader; - -import java.io.File; -import java.io.IOException; - -import javax.xml.parsers.ParserConfigurationException; - -import org.testng.annotations.BeforeClass; -import org.testng.annotations.ExpectedExceptions; -import org.testng.annotations.Test; -import org.testng.Assert; - -import org.xml.sax.SAXException; - -public class DatasourceValidatorTest { - - /** - * Path to the valid xml file for datasource. - */ - private static final String DATASOURCE_VALID_XML_PATH = - "src/test/resources/exemple-datasource-good.xml"; - - /** - * Path to the invalide xml file for datasource. - */ - private static final String DATASOURCE_INVALID_XML_PATH = - "src/test/resources/exemple-datasource-bad.xml"; - - /** - * Valid XML File - */ - private File goodXML; - - - /** - * Invalid XML File - */ - private File badXML; - - @BeforeClass - public void init(){ - goodXML = new File(DATASOURCE_VALID_XML_PATH); - Assert.assertNotNull(goodXML); - - badXML = new File(DATASOURCE_INVALID_XML_PATH); - Assert.assertNotNull(badXML); - } - - @Test - public void testValidXmlFile() throws Exception { - DatasourceValidator xmlTest = null; - xmlTest = new DatasourceValidator(goodXML); - Assert.assertFalse(xmlTest == null); - } - - - @Test(expectedExceptions = {SAXException.class}) - public void testInvalidXmlFile() throws SAXException, ParserConfigurationException, IOException { - DatasourceValidator xmlTest = new DatasourceValidator(badXML); - - } -} diff --git a/jonas/modules/libraries/jonas-datasources/reader/src/test/resources/exemple-datasource-bad.xml b/jonas/modules/libraries/jonas-datasources/reader/src/test/resources/exemple-datasource-bad.xml deleted file mode 100644 index 3ec0895f964226ba176928e830d60de169431cf3..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-datasources/reader/src/test/resources/exemple-datasource-bad.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - incorrect - - diff --git a/jonas/modules/libraries/jonas-datasources/reader/src/test/resources/exemple-datasource-good.xml b/jonas/modules/libraries/jonas-datasources/reader/src/test/resources/exemple-datasource-good.xml deleted file mode 100644 index 5465e048207417284f0ff3eab51592a7a7e08a2d..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-datasources/reader/src/test/resources/exemple-datasource-good.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - jdbc_1 - jdbc:oracle:thin://localhost:1521/db_oracle - oracle.jdbc.driver.OracleDriver - jonasoracle - jonaspassoracle - rdb.oracle - - - 0 - 4167260737 - string - 5 - 10 - 100 - 899460641 - 394024595 - 150826366 - - - - - - jdbc_1 - jdbc:hsqldb:hsql://localhost:9001/db_jonas - org.hsqldb.jdbcDriver - jonas - jonas - rdb.hsql - - - 0 - 1448 - 60 - string - 15 - 100 - 577956569 - 5 - 100 - - - diff --git a/jonas/modules/libraries/jonas-deployment/pom.xml b/jonas/modules/libraries/jonas-deployment/pom.xml deleted file mode 100644 index 6272bc45b47d72fe7ecc29eaa5fc7f76cc56af83..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/pom.xml +++ /dev/null @@ -1,167 +0,0 @@ - - - - - org.ow2.jonas - jonas-libraries - 5.2.4-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas - jonas-deployment - bundle - JOnAS :: Libraries :: Deployment - - - org.ow2.jonas - jonas-commons - ${project.version} - - - org.objectweb.monolog - monolog-api - ${monolog.version} - - - org.ow2.carol - carol - provided - - - org.apache.axis - axis-jaxrpc - - - org.apache.geronimo.specs - geronimo-corba_2.3_spec - - - commons-digester - commons-digester - - - commons-beanutils - commons-beanutils - - - wsdl4j - wsdl4j - 1.6.1 - - - org.apache.tomcat - servlet-api - - - org.ow2.jonas - jonas-services-api - ${project.version} - - - org.ow2.jonas - jonas-deployment-api - ${project.version} - - - org.ow2.bundles - ow2-util-ee-deploy-api - - - org.ow2.bundles - ow2-util-ee-deploy-impl - - - org.ow2.bundles - ow2-util-ee-metadata-war-impl - - - org.ow2.bundles - ow2-util-ee-metadata-car-api - - - org.ow2.bundles - ow2-util-ee-metadata-common-api - - - org.ow2.bundles - ow2-util-ee-metadata-common-impl - - - org.ow2.bundles - ow2-util-ee-metadata-car-impl - - - xml-apis - xml-apis - 1.0.b2 - - - - org.ow2.easybeans - easybeans-api - - - org.ow2.easybeans - easybeans-deployment - - - org.ow2.easybeans - easybeans-util - - - org.ow2.easybeans - easybeans-asm - 3.0 - - - org.ow2.easybeans - easybeans-asm-commons - 3.0 - - - org.ow2.easybeans - easybeans-asm-tree - 3.0 - - - org.ow2.bundles - ow2-util-event-impl - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - - diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/AppClientDTDs.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/AppClientDTDs.java deleted file mode 100644 index db9ac9e1f47cfd6e974ab7ef477d3fb33e68ddaa..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/AppClientDTDs.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.client; - - -import org.ow2.jonas.deployment.common.CommonsDTDs; -import org.ow2.jonas.deployment.common.util.ResourceHelper; - -/** - * This class defines the declarations of DTDs for application-client.xml and jonas-client.xml. - * @author Florent Benoit - */ -public class AppClientDTDs extends CommonsDTDs { - - /** - * Package name. - */ - private static final String PACKAGE = ResourceHelper.getResourcePackage(AppClientDTDs.class); - - /** - * List of application-client dtds. - */ - private static final String[] APPCLIENT_DTDS = new String[] { - PACKAGE + "application-client_1_2.dtd", - PACKAGE + "application-client_1_3.dtd" - }; - - /** - * List of application-client publicId. - */ - private static final String[] APPCLIENT_DTDS_PUBLIC_ID = new String[] { - "-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.2//EN", - "-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN" - }; - - - - - /** - * Build a new object for web.xml DTDs handling. - */ - public AppClientDTDs() { - super(); - addMapping(APPCLIENT_DTDS, APPCLIENT_DTDS_PUBLIC_ID); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/AppClientSchemas.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/AppClientSchemas.java deleted file mode 100644 index 9cb2bb741314ad22ca61ac333f24e6b81d169d08..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/AppClientSchemas.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.client; - -import org.ow2.jonas.deployment.common.CommonsSchemas; -import org.ow2.jonas.deployment.common.util.ResourceHelper; - -/** - * This class defines the declarations of Schemas for appliation-client.xml and jonas-client.xml. - * @author Philippe Coq - */ -public class AppClientSchemas extends CommonsSchemas { - - /** - * Package name. - */ - private static final String PACKAGE = ResourceHelper.getResourcePackage(AppClientSchemas.class); - - /** - * List of schemas used for application-client.xml. - */ - private static final String[] APPCLIENT_SCHEMAS = new String[] { - PACKAGE + "application-client_1_4.xsd", - PACKAGE + "application-client_5.xsd" - }; - - - /** - * Build a new object for Schemas handling. - */ - public AppClientSchemas() { - super(); - addSchemas(APPCLIENT_SCHEMAS); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/ClientContainerDeploymentDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/ClientContainerDeploymentDesc.java deleted file mode 100644 index a99b228c18cca0714af50c8f6878a8e6a839c0ff..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/ClientContainerDeploymentDesc.java +++ /dev/null @@ -1,288 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.client; - - -// import java -import org.ow2.jonas.deployment.api.IEJBRefDesc; -import org.ow2.jonas.deployment.api.IEnvEntryDesc; -import org.ow2.jonas.deployment.api.IMessageDestinationRefDesc; -import org.ow2.jonas.deployment.api.IPersistenceUnitRefDesc; -import org.ow2.jonas.deployment.api.IResourceEnvRefDesc; -import org.ow2.jonas.deployment.api.IResourceRefDesc; -import org.ow2.jonas.deployment.client.xml.ApplicationClient; -import org.ow2.jonas.deployment.client.xml.JonasClient; -import org.ow2.jonas.deployment.client.xml.JonasSecurity; -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.common.JndiEnvRefsGroupDesc; -import org.ow2.util.ee.metadata.car.api.ICarDeployableMetadata; - - -/** - * This class do the parsing of the application-client.xml file and jonas-client.xml files and - * contruct a data structure associated to these two files. - * @author Florent Benoit - * @author Philippe Coq - */ -public class ClientContainerDeploymentDesc extends JndiEnvRefsGroupDesc { - - /** - * The name of the callback handler - */ - private String callbackHandler = null; - - /** - * The name of the jaas config file - */ - private String jaasFile = null; - - /** - * The name of the jaas entry - */ - private String jaasEntry = null; - - /** - * The username to use for the callback handler - */ - private String username = null; - - /** - * The password to use for the callback handler - */ - private String password = null; - - /** - * Xml content of the standard deployement descriptor file - */ - private String xmlContent = ""; - - /** - * Xml content of the JOnAS deployement descriptor file - */ - private String jonasXmlContent = ""; - - /** - * Application-Client archive metadatas. - */ - private ICarDeployableMetadata carDeployableMetadata; - - /** - * Construct an instance of a ClientContainerDeploymentDesc.
    - * Constructor is private, call one of the static getInstance - * method instead. - * @param classLoader the classloader for the classes. - * @param applicationClient the data structure of the application-client (application-client.xml) - * @param jonasClient the data structure of the jonas-client (jonas-client.xml) - * @throws DeploymentDescException if the deployment - * descriptors are corrupted. - */ - public ClientContainerDeploymentDesc(final ClassLoader classLoader, - final ApplicationClient applicationClient, - final JonasClient jonasClient) - throws DeploymentDescException { - super(classLoader, applicationClient, jonasClient, null); - - // callbackHandler - callbackHandler = null; - if (applicationClient.getCallbackHandler() != null) { - callbackHandler = applicationClient.getCallbackHandler(); - } - - JonasSecurity jonasSecurity = jonasClient.getJonasSecurity(); - if (jonasSecurity != null) { - // jaas config file - jaasFile = null; - if (jonasSecurity.getJaasfile() != null) { - jaasFile = jonasSecurity.getJaasfile(); - } - - // jaas entry - jaasEntry = null; - if (jonasSecurity.getJaasentry() != null) { - jaasEntry = jonasSecurity.getJaasentry(); - } - - // username - username = null; - if (jonasSecurity.getUsername() != null) { - username = jonasSecurity.getUsername(); - } - - // password - password = null; - if (jonasSecurity.getPassword() != null) { - password = jonasSecurity.getPassword(); - } - } - - - } - - /** - * Get the name of the jaas configuration file - * @return the name of the jaas configuration file - */ - public String getJaasFile() { - return jaasFile; - } - - /** - * Get the entry in the jaas configuration file - * @return the entry in the jaas configuration file - */ - public String getJaasEntry() { - return jaasEntry; - } - - /** - * Get the username used for a callback handler - * @return the username used for a callback handler - */ - public String getUsername() { - return username; - } - - /** - * Get the password used for a callback handler - * @return the password used for a callback handler - */ - public String getPassword() { - return password; - } - - /** - * Get the callback handler of this client application. - * @return the callback handler of this client application. - */ - public String getCallbackHandler() { - return callbackHandler; - } - - /** - * Return the content of the web.xml file - * @return the content of the web.xml file - */ - public String getXmlContent() { - return xmlContent; - } - - /** - * Return the content of the jonas-web.xml file - * @return the content of the jonas-web.xml file - */ - public String getJOnASXmlContent() { - return jonasXmlContent; - } - - /** - * @param xmlContent XML Content - */ - public void setXmlContent(final String xmlContent) { - this.xmlContent = xmlContent; - } - - /** - * @param jonasXmlContent XML Content - */ - public void setJOnASXmlContent(final String jonasXmlContent) { - this.jonasXmlContent = jonasXmlContent; - } - - /** - * Return a String representation of the ClientContainerDeploymentDesc. - * @return a String representation of the ClientContainerDeploymentDesc. - */ - @Override - public String toString() { - StringBuffer ret = new StringBuffer(); - - // Return the displayName - ret.append("\ngetDisplayName()=" + getDisplayName()); - - // Return the resource-env-ref - IResourceEnvRefDesc[] rer = getResourceEnvRefDesc(); - for (int i = 0; i < rer.length; i++) { - ret.append("\ngetResourceEnvRefDesc(" + i + ")=" + rer[i].getClass().getName()); - ret.append(rer[i].toString()); - } - - // Return the resource-ref - IResourceRefDesc[] resourceRefDesc = getResourceRefDesc(); - for (int i = 0; i < resourceRefDesc.length; i++) { - ret.append("\ngetResourceRefDesc(" + i + ")=" + resourceRefDesc[i].getClass().getName()); - ret.append(resourceRefDesc[i].toString()); - } - - // Return the env-entry - IEnvEntryDesc[] envEntries = getEnvEntryDesc(); - for (int i = 0; i < envEntries.length; i++) { - ret.append("\ngetEnvEntryDesc(" + i + ")=" + envEntries[i].getClass().getName()); - ret.append(envEntries[i].toString()); - } - - // Return the ejb-ref - IEJBRefDesc[] ejbRefDesc = getEjbRefDesc(); - for (int i = 0; i < ejbRefDesc.length; i++) { - ret.append("\ngetEjbRefDesc(" + i + ")=" + ejbRefDesc[i].getClass().getName()); - ret.append(ejbRefDesc[i].toString()); - } - - // Return the message-destination-ref - IMessageDestinationRefDesc[] mdRefDesc = getMessageDestinationRefDesc(); - for (int i = 0; i < mdRefDesc.length; i++) { - ret.append("\ngetMessageDestinationRefDesc(" + i + ")=" + mdRefDesc[i].getClass().getName()); - ret.append(mdRefDesc[i].toString()); - } - - // Return the persistence-unit-ref - IPersistenceUnitRefDesc[] persistUnitRefDesc = getPersistenceUnitRefs(); - for (int i = 0; i < persistUnitRefDesc.length; i++) { - ret.append("\ngetPersistenceUnitRefs(" + i + ")=" + persistUnitRefDesc[i].getClass().getName()); - ret.append(persistUnitRefDesc[i].toString()); - } - - // Return the callbackHandler - ret.append("\ngetCallbackHandler()=" + getCallbackHandler()); - - return ret.toString(); - } - - /** - * Store a reference to this application-client metadatas - * @param carDeployableMetadata application-client metadatas - */ - public void setCarMetadata(ICarDeployableMetadata carDeployableMetadata) { - this.carDeployableMetadata = carDeployableMetadata; - } - - /** - * @return this application-client metadatas. - */ - public ICarDeployableMetadata getCarDeployableMetadata() { - return this.carDeployableMetadata; - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/ClientContainerDeploymentDescException.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/ClientContainerDeploymentDescException.java deleted file mode 100644 index eb21df0b498c035f2b1fa22f83d7a7013433c506..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/ClientContainerDeploymentDescException.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer : Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.client; - -import org.ow2.jonas.deployment.common.DeploymentDescException; - -/** - * This class ClientContainerDeploymentDescException indicates conditions - * that a reasonable application might want to catch. - * @author Florent Benoit - */ -public class ClientContainerDeploymentDescException - extends DeploymentDescException { - - /** - * Constructs a new ClientContainerDeploymentDescException with no detail - * message. - */ - public ClientContainerDeploymentDescException() { - super(); - } - - /** - * Constructs a new ClientContainerDeploymentDescException with the specified - * message. - * @param message the detail message. - */ - public ClientContainerDeploymentDescException(String message) { - super(message); - } - - /** - * Constructs a new ClientContainerDeploymentDescException with the specified - * message and cause. - * @param message the detail message. - * @param cause The error or exception that cause this exception. - */ - public ClientContainerDeploymentDescException(String message, - Throwable cause) { - super(message, cause); - } - - /** - * Construct an exception from a causing exception. - * @param cause The error or exception that cause this exception. - * The message will be take be this object's message. - */ - public ClientContainerDeploymentDescException(Throwable cause) { - super(cause); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/JonasAppClientDTDs.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/JonasAppClientDTDs.java deleted file mode 100644 index 1e93a1c391d9e5a3a3044106e3a94e2893987c8d..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/JonasAppClientDTDs.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.client; - -import org.ow2.jonas.deployment.common.CommonsDTDs; -import org.ow2.jonas.deployment.common.util.ResourceHelper; - -/** - * This class defines the declarations of DTDs for jonas-client.xml. - * @author Florent Benoit - */ -public class JonasAppClientDTDs extends CommonsDTDs { - - /** - * Package name. - */ - private static final String PACKAGE = ResourceHelper.getResourcePackage(JonasAppClientDTDs.class); - - /** - * List of jonas-client-app dtds. - */ - private static final String[] JONAS_APPCLIENT_DTDS = new String[] { - PACKAGE + "jonas-client_3_2.dtd" - - }; - - /** - * List of jonas-client-app publicId. - */ - private static final String[] JONAS_APPCLIENT_DTDS_PUBLIC_ID = new String[] { - "-//ObjectWeb//DTD JOnAS Client 3.2//EN" - }; - - - /** - * Build a new object for jonas-client.xml DTDs handling. - */ - public JonasAppClientDTDs() { - super(); - addMapping(JONAS_APPCLIENT_DTDS, JONAS_APPCLIENT_DTDS_PUBLIC_ID); - } - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/JonasAppClientSchemas.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/JonasAppClientSchemas.java deleted file mode 100644 index 318850d712ea52dfabe6d75a536df1ac76618ed3..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/JonasAppClientSchemas.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Philippe Coq - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.client; - -import org.ow2.jonas.deployment.common.CommonsSchemas; -import org.ow2.jonas.deployment.common.util.ResourceHelper; - -/** - * This class defines the declarations of Schemas for and jonas-web.xml. - * @author Philippe Coq - */ -public class JonasAppClientSchemas extends CommonsSchemas { - - /** - * Package name. - */ - private static final String PACKAGE = ResourceHelper.getResourcePackage(JonasAppClientSchemas.class); - - /** - * List of schemas used for jonas-web.xml. - */ - private static final String[] JONAS_APPCLIENT_SCHEMAS = new String[] { - PACKAGE + "jonas-client_4_0.xsd", - PACKAGE + "jonas-client_4_1.xsd", - PACKAGE + "jonas-client_4_1_2.xsd", - PACKAGE + "jonas-client_4_1_4.xsd", - PACKAGE + "jonas-client_4_2.xsd", - PACKAGE + "jonas-client_5_0.xsd" - }; - - - /** - * Build a new object for Schemas handling. - */ - public JonasAppClientSchemas() { - super(); - addSchemas(JONAS_APPCLIENT_SCHEMAS); - } - - /** - * @return Returns the last Schema. - */ - public static String getLastSchema() { - return getLastSchema(JONAS_APPCLIENT_SCHEMAS, PACKAGE); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/lib/ClientDeploymentDescManager.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/lib/ClientDeploymentDescManager.java deleted file mode 100644 index ba27be7c70afb505b6b70166b2ca8d1ecc7c5353..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/lib/ClientDeploymentDescManager.java +++ /dev/null @@ -1,1145 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.client.lib; - -//import java - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Reader; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLClassLoader; -import java.rmi.RemoteException; -import java.util.Enumeration; -import java.util.Hashtable; -import java.util.List; -import java.util.StringTokenizer; -import java.util.jar.JarFile; -import java.util.zip.ZipEntry; - -import javax.annotation.Resource; -import javax.naming.InitialContext; -import javax.naming.NamingException; -import javax.rmi.PortableRemoteObject; - -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; -import org.ow2.easybeans.resolver.api.EZBJNDIBeanData; -import org.ow2.easybeans.resolver.api.EZBJNDIData; -import org.ow2.easybeans.resolver.api.EZBRemoteJNDIResolver; -import org.ow2.jonas.deployment.api.IServiceRefDesc; -import org.ow2.jonas.deployment.client.AppClientDTDs; -import org.ow2.jonas.deployment.client.AppClientSchemas; -import org.ow2.jonas.deployment.client.ClientContainerDeploymentDesc; -import org.ow2.jonas.deployment.client.ClientContainerDeploymentDescException; -import org.ow2.jonas.deployment.client.JonasAppClientDTDs; -import org.ow2.jonas.deployment.client.JonasAppClientSchemas; -import org.ow2.jonas.deployment.client.rules.ApplicationClientRuleSet; -import org.ow2.jonas.deployment.client.rules.JonasClientRuleSet; -import org.ow2.jonas.deployment.client.xml.ApplicationClient; -import org.ow2.jonas.deployment.client.xml.JonasClient; -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.common.EjbRefDesc; -import org.ow2.jonas.deployment.common.MessageDestinationRefDesc; -import org.ow2.jonas.deployment.common.digester.JDigester; -import org.ow2.jonas.deployment.common.lib.AbsDeploymentDescManager; -import org.ow2.jonas.deployment.common.xml.EjbRef; -import org.ow2.jonas.deployment.common.xml.JonasEjbRef; -import org.ow2.jonas.deployment.common.xml.JonasMessageDestination; -import org.ow2.jonas.deployment.common.xml.JonasResource; -import org.ow2.jonas.deployment.common.xml.JonasServiceRef; -import org.ow2.jonas.deployment.common.xml.MessageDestinationRef; -import org.ow2.jonas.deployment.common.xml.PersistenceUnitRef; -import org.ow2.jonas.deployment.common.xml.ResourceRef; -import org.ow2.jonas.deployment.ejb.DeploymentDesc; -import org.ow2.jonas.deployment.ejb.lib.EjbDeploymentDescManager; -import org.ow2.jonas.deployment.ws.PortComponentDesc; -import org.ow2.jonas.deployment.ws.PortComponentRefDesc; -import org.ow2.jonas.deployment.ws.ServiceDesc; -import org.ow2.jonas.deployment.ws.WSDeploymentDesc; -import org.ow2.jonas.deployment.ws.lib.WSDeploymentDescManager; -import org.ow2.jonas.lib.loader.WebappClassLoader; -import org.ow2.jonas.lib.util.Log; -import org.ow2.util.archive.api.IArchive; -import org.ow2.util.archive.impl.ArchiveManager; -import org.ow2.util.ee.deploy.api.deployable.CARDeployable; -import org.ow2.util.ee.deploy.impl.helper.DeployableHelper; -import org.ow2.util.ee.deploy.impl.helper.UnpackDeployableHelper; -import org.ow2.util.ee.metadata.car.api.ICarDeployableMetadata; -import org.ow2.util.ee.metadata.car.impl.CarDeployableMetadataFactory; -import org.ow2.util.ee.metadata.car.impl.enc.CarENCBindingBuilder; -import org.ow2.util.ee.metadata.common.api.enc.IENCBinding; -import org.ow2.util.ee.metadata.common.api.enc.IENCBindingHolder; -import org.ow2.util.ee.metadata.common.api.struct.IJAnnotationResource; -import org.ow2.util.ee.metadata.common.api.struct.IJEjbEJB; -import org.ow2.util.ee.metadata.common.api.struct.IJavaxPersistenceUnit; -import org.ow2.util.ee.metadata.common.api.struct.IJaxwsWebServiceRef; -import org.ow2.util.ee.metadata.common.impl.enc.ENCBindingException; -import org.ow2.util.url.URLUtils; - - -/** - * This class provide a way for managing the ClientContainerDeploymentDesc. - * @author Florent Benoit - */ -public class ClientDeploymentDescManager extends AbsDeploymentDescManager { - - /** - * The unique instance of the ClientDeploymentDescManager. - */ - private static ClientDeploymentDescManager unique; - - /** - * Reference on the EjbDeploymentDescManager. - */ - private EjbDeploymentDescManager ejbDDManager = null; - - /** - * Associate a ear classLoader to an hashtable which contains association - * between Urls of wars and their optional alt-dd - */ - private Hashtable earCLAltDDBindings = null; - - /** - * The path to the application-client.xml file. - */ - public static final String CLIENT_FILE_NAME = "META-INF/application-client.xml"; - - /** - * The path to the jonas-client.xml file. - */ - public static final String JONAS_CLIENT_FILE_NAME = "META-INF/jonas-client.xml"; - - /** - * Digester used to parse application-client.xml - */ - private static JDigester appClientDigester = null; - - /** - * Digester use to parse jonas-client.xml - */ - private static JDigester jonasAppClientDigester = null; - - /** - * Flag for parser validation - */ - private static boolean parsingWithValidation = true; - - /** - * Rules to parse the application-client.xml - */ - private static ApplicationClientRuleSet appClientRuleSet = new ApplicationClientRuleSet(); - - /** - * Rules to parse the jonas-client.xml - */ - private static JonasClientRuleSet jonasAppClientRuleSet = new JonasClientRuleSet(); - - /** - * logger. - */ - private static Logger logger = Log.getLogger(ClientDeploymentDescManager.class.getName()); - - /** - * Contructs a unique ClientDeploymentDescManager - */ - private ClientDeploymentDescManager() { - ejbDDManager = EjbDeploymentDescManager.getInstance(); - earCLAltDDBindings = new Hashtable(); - } - - /** - * Get an instance of the ClientDeploymentDescManager. - * @return the instance of the ClientDeploymentDescManager. - */ - public static ClientDeploymentDescManager getInstance() { - if (unique == null) { - unique = new ClientDeploymentDescManager(); - } - return unique; - } - - /** - * Get the specified client deployment descriptor. - * @param url the url where to load xml deployment descriptors. - * @param loaderForCls classloader used to load client classes. - * @param earLoader the ear classloader. - * @return ClientContainerDeploymentDesc the client deployment descriptor. - * @throws DeploymentDescException when - * ClientContainerDeploymentDesc cannot be created with the given - * files. - */ - public ClientContainerDeploymentDesc getDeploymentDesc(final URL url, final ClassLoader loaderForCls, final ClassLoader earLoader) - throws DeploymentDescException { - - // Check if the jar exists ... - if (!URLUtils.urlToFile(url).exists()) { - String err = "Cannot get the deployment descriptor for "; - err = err + "'" + url.getFile() + "'. The file doesn't exist."; - throw new ClientContainerDeploymentDescException(err); - } - - //url used to load an alternate DDesc in the EAR case - URL altDDUrl = null; - - //check if it's an Ear case or not - Hashtable urlAltddBindings = null; - if (earLoader != null) { - //Mapping ? - urlAltddBindings = (Hashtable) earCLAltDDBindings.get(earLoader); - if (urlAltddBindings == null) { - //If there is no mapping, the setAltDD function was badly - // called - String err = "Cannot find if there is alt-dd for '" + url.getFile() - + "', the setAltDD function was badly called"; - throw new ClientContainerDeploymentDescException(err); - } - //Now we can get the optional alt-dd url file - altDDUrl = (URL) urlAltddBindings.get(url); - } - - // ... and get the instance of the ClientContainerDeploymentDesc. - // If there is an alternate url for the application-client.xml, call the - // method with this param. - ClientContainerDeploymentDesc clientDD = null; - try { - if (altDDUrl != null) { - clientDD = getInstance(URLUtils.urlToFile(url).getPath(), loaderForCls, altDDUrl.getFile()); - } else { - clientDD = getInstance(URLUtils.urlToFile(url).getPath(), loaderForCls); - } - } catch (org.ow2.jonas.deployment.common.DeploymentDescException dde) { - throw new ClientContainerDeploymentDescException(dde); - } - - // Resolve the ejb-link for ejb-ref - EjbRefDesc[] ejbRef = clientDD.getEjbRefDesc(); - for (int i = 0; i < ejbRef.length; i++) { - if (ejbRef[i].getJndiName() == null) { - String ejbLink = ejbRef[i].getEjbLink(); - String ejbRefType = ejbRef[i].getEjbRefType(); - String home = ejbRef[i].getHome(); - String remote = ejbRef[i].getRemote(); - if (ejbLink != null) { - if (earLoader == null) { - throw new ClientContainerDeploymentDescException( - "Ejb-link is not authorized from a single client jar. The client jar must be in an ear."); - } else { - String jndiName = null; - // First, try to get JNDI name through the manager before trying with the remote JNDI resolver. - try { - jndiName = getJndiName(url, ejbLink, earLoader, ejbRefType); - } catch (DeploymentDescException e) { - - // log first exception - if (logger.isLoggable(BasicLevel.DEBUG)) { - logger.log(BasicLevel.DEBUG, "Unable to get JNDI name with the EJB DD manager", e); - } - - // Was not able to get a JNDI name, try with the remote object. - EZBRemoteJNDIResolver jndiResolver = null; - - // Get object - Object o = null; - try { - o = new InitialContext().lookup("EZB_Remote_JNDIResolver"); - } catch (NamingException ne) { - // No Remote JNDI resolver, so throw first exception - logger.log(BasicLevel.DEBUG, "No Remote EJB3 JNDI Resolver found"); - throw e; - } - - // Object is here, so we can cast it - jndiResolver = (EZBRemoteJNDIResolver) PortableRemoteObject.narrow(o, EZBRemoteJNDIResolver.class); - - // Ask the Resolver with interface name and bean name - String interfaceName = remote; - if (home != null && !"".equals(home)) { - interfaceName = home; - } - String beanName = ejbLink; - List jndiDataList = null; - try { - jndiDataList = jndiResolver.getEJBJNDINames(interfaceName, beanName); - } catch (RemoteException re) { - // No Remote JNDI resolver, so throw first exception - throw new DeploymentDescException("Unable to get EJB-LINK for interface'" + interfaceName + "' and beanName'" + beanName + "'", re); - } - - // Data is here, check if it is empty or not - if (jndiDataList.size() == 0) { - throw new DeploymentDescException("Unable to get EJB-LINK for interface'" + interfaceName + "' and beanName'" + beanName + "', no data was found on the remote side."); - } else if (jndiDataList.size() > 1) { - // too many entries - throw new DeploymentDescException("Unable to get EJB-LINK for interface'" + interfaceName + "' and beanName'" + beanName + "', too many answers : '" + jndiDataList + "'."); - } - - // Only one item found, so get JNDI Name from this object - EZBJNDIBeanData jndiData = jndiDataList.get(0); - // Update JNDI name - jndiName = jndiData.getName(); - if (logger.isLoggable(BasicLevel.DEBUG)) { - logger.log(BasicLevel.DEBUG, "Found JNDI Name '" + jndiName + "' for interface'" + interfaceName + "' and beanName'" + beanName + "', too many answers : '" + jndiDataList + "'."); - } - } - ejbRef[i].setJndiName(jndiName); - } - } - } - } - // Resolve the port-component-link for service-ref - IServiceRefDesc[] serviceRef = clientDD.getServiceRefDesc(); - - for (int i = 0; i < serviceRef.length; i++) { - - List pcRefs = serviceRef[i].getPortComponentRefs(); - for (int j = 0; j < pcRefs.size(); j++) { - // for each service portComponents : resolve links - PortComponentRefDesc pcr = (PortComponentRefDesc) pcRefs.get(j); - String pclink = pcr.getPortComponentLink(); - if (pclink != null) { - // a pc link is defined, we resolve it - PortComponentDesc pcDesc = getPCDesc(url, pclink, earLoader); - pcr.setPortComponentDesc(pcDesc); - } - } - } - - - // Resolve the message-destination-link for message-destination-ref - MessageDestinationRefDesc[] mdRef = clientDD.getMessageDestinationRefDesc(); - for (int i = 0; i < mdRef.length; i++) { - if (mdRef[i].getJndiName() == null) { - String jndiName = mdRef[i].getJndiName(); - String mdLink = mdRef[i].getMessageDestinationLink(); - String mdType = mdRef[i].getMessageDestinationType(); - String mdUsage = mdRef[i].getMessageDestinationUsage(); - if (mdLink != null) { - if (earLoader == null) { - throw new ClientContainerDeploymentDescException( - "Message-destination-link is not authorized from a single client jar. The client jar must be in an ear."); - } else { - jndiName = getMDJndiName(url, mdLink, mdType, mdUsage, earLoader); - // String jndiName = getMdJndiName(url, mdLink, - // earLoader, mdType); - mdRef[i].setJndiName(jndiName); - } - } - } - } - return clientDD; - } - /** - * Return the port component desc from the pcLink string. pcLink format : - * filename.[jar or war]#portComponentName in the same Ear File - * @param warURL the url of the war being parsed. This is needed because - * pcLink is relative. With the url and the pcLink, we can know where - * the file is locate. - * @param pcLink the pcLink tag of an port-component-ref. - * @param earLoader the classloader of the ear. - * @return the pcLink portComponent. - * @throws DeploymentDescException when it failed - */ - private PortComponentDesc getPCDesc(final URL warURL, final String pcLink, final ClassLoader earLoader) - throws DeploymentDescException { - - // Extract from the pc link - // - the name of the file - // - the name of the bean - String moduleLink = null; - String pcNameLink = null; - - // Check the format of the pc-link. It must contains .jar# or .war# - if ((pcLink.toLowerCase().indexOf(".war" + LINK_SEPARATOR) == -1) - && (pcLink.toLowerCase().indexOf(".jar" + LINK_SEPARATOR) == -1)) { - // the pc link is not in war or jar file - String err = "PC-link " + pcLink - + " has a bad format. Correct format : filename.(jar|war)#portComponentName"; - throw new DeploymentDescException(err); - } - StringTokenizer st = new StringTokenizer(pcLink, LINK_SEPARATOR); - - // We must have only two elements after this step, one for the fileName - // before the # and the name of the bean after the # char - if (st.countTokens() != 2 || pcLink.startsWith(LINK_SEPARATOR) || pcLink.endsWith(LINK_SEPARATOR)) { - String err = "PC-link " + pcLink - + " has a bad format. Correct format : filename.[jar or war]#portComponentName"; - throw new DeploymentDescException(err); - } - - //Get the token - moduleLink = st.nextToken(); - pcNameLink = st.nextToken(); - - // Now construct the URL from the absolute path from the url module and - // the relative path from moduleJarLink - URL moduleLinkUrl = null; - try { - moduleLinkUrl = new File(URLUtils.urlToFile(warURL).getParent() + File.separator + moduleLink) - .getCanonicalFile().toURL(); - } catch (MalformedURLException mue) { - String err = "Error when creating an url for the module filename. Error :" + mue.getMessage(); - throw new DeploymentDescException(err); - } catch (IOException ioe) { - String err = "Error when creating/accessing a file. Error :" + ioe.getMessage(); - throw new DeploymentDescException(err); - } - - // Check if the jar exist. - if (!new File(moduleLinkUrl.getFile()).exists()) { - String err = "Cannot get the deployment descriptor for '" + moduleLinkUrl.getFile() - + "'. The file doesn't exist."; - throw new DeploymentDescException(err); - } - - // We've got the url - // Now, We can ask the Deployment Descriptor of this url - ClassLoader loaderForCls = null; - ClassLoader current = Thread.currentThread().getContextClassLoader(); - if (moduleLink.toLowerCase().endsWith(".war")) { - try { - // webservice in webapp - loaderForCls = new WebappClassLoader(moduleLinkUrl, current); - } catch (IOException ioe) { - throw new DeploymentDescException("Unable to create Web ClassLoader", ioe); - } - } else { - // webservice in ejbjar - loaderForCls = current; - } - - WSDeploymentDesc wsDD = null; - - try { - wsDD = WSDeploymentDescManager.getInstance().getDeploymentDesc(moduleLinkUrl, loaderForCls, earLoader); - } catch (DeploymentDescException e) { - String err = "Cannot get the deployment descriptor for '" + moduleLinkUrl.getFile() + "'."; - throw new DeploymentDescException(err, e); - } - if (wsDD == null) { - // the module doesn't contain port components. - String err = "Port component link " + pcNameLink + " not found in " + moduleLinkUrl.getFile(); - throw new DeploymentDescException(err); - } - - //get port component desc //pcNameLink - List sdl = wsDD.getServiceDescs(); - boolean isFound = false; - PortComponentDesc pcd = null; - for (int i = 0; (i < sdl.size()) && !isFound; i++) { - if (sdl.get(i) != null) { - pcd = ((ServiceDesc) sdl.get(i)).getPortComponent(pcNameLink); - isFound = (pcd != null); - // we stop when we have found the good portComponent - } - } - if (!isFound) { - // the module doesn't contain port components. - String err = "the port component link " + pcNameLink + " doesn't exist in " + moduleLinkUrl.getFile(); - throw new DeploymentDescException(err); - } - - return pcd; - } - - - /** - * Get an instance of a Client deployment descriptor by parsing the - * application-client.xml and jonas-client.xml deployment descriptors. - * @param clientFileName the fileName of the client file for the deployment - * descriptors. - * @param classLoaderForCls the classloader for the classes. - * @return a Client deployment descriptor by parsing the - * application-client.xml and jonas-client.xml deployment - * descriptors. - * @throws DeploymentDescException if the deployment descriptors are - * corrupted. - */ - public static ClientContainerDeploymentDesc getInstance(final String clientFileName, final ClassLoader classLoaderForCls) - throws DeploymentDescException { - - return getInstance(clientFileName, classLoaderForCls, null); - } - - /** - * Get an instance of a Client deployment descriptor by parsing the - * application-client.xml and jonas-client.xml deployment descriptors. - * @param clientFileName the fileName of the client file for the deployment - * descriptors. - * @param classLoaderForCls the classloader for the classes. - * @param altClientXmlFilename the fileName to the application-client.xml - * for the alt-dd tag in the Ear Case. This is used for specify an - * alternate DDesc file. - * @return a Client deployment descriptor by parsing the - * application-client.xml and jonas-client.xml deployment - * descriptors. - * @throws DeploymentDescException if the deployment descriptors are - * corrupted. - */ - public static ClientContainerDeploymentDesc getInstance(final String clientFileName, final ClassLoader classLoaderForCls, - final String altClientXmlFilename) - - throws DeploymentDescException { - - // clientjar file - JarFile clientFile = null; - - // Input streams - InputStream applicationClientInputStream = null; - InputStream jonasClientInputStream = null; - - // ZipEntry - ZipEntry applicationClientZipEntry = null; - ZipEntry jonasClientZipEntry = null; - - // Clients - ApplicationClient applicationClient; - JonasClient jonasClient; - - // Init xml contents values; - String xmlContent = ""; - String jonasXmlContent = ""; - - // Build the file - File fClient = new File(clientFileName); - - //Check if the file exists. - if (!(fClient.exists())) { - String err = "' " + clientFileName + "' was not found."; - throw new ClientContainerDeploymentDescException(err); - } - - //Check if the Alt deploymentDesc file exists. - //But only if it's a non null value because it's optionnal. - if ((altClientXmlFilename != null) && (!new File(altClientXmlFilename).exists())) { - String err = "The file for the altdd tag for the EAR case '" + altClientXmlFilename + "' was not found."; - throw new ClientContainerDeploymentDescException(err); - } - - // load the application-client deployment descriptor data - // (META-INF/application-client.xml - // and META-INF/jonas-client.xml) - //No alt-dd case - if (altClientXmlFilename == null) { - try { - clientFile = new JarFile(clientFileName); - - //Lookup in the JAR - //Check the client entry - applicationClientZipEntry = clientFile.getEntry(CLIENT_FILE_NAME); - if (applicationClientZipEntry != null) { - //Get the stream - applicationClientInputStream = clientFile.getInputStream(applicationClientZipEntry); - xmlContent = xmlContent(applicationClientInputStream); - // necessary to have a not empty InputStream !!! - applicationClientInputStream = clientFile.getInputStream(applicationClientZipEntry); - } - } catch (Exception e) { - if (clientFile != null) { - try { - clientFile.close(); - } catch (IOException ioe) { - //We can't close the file - } - } - throw new ClientContainerDeploymentDescException( - "Can not read the XML deployment descriptors of the client jar file '" + clientFileName + "'.", - e); - } - } else { - try { - applicationClientInputStream = new FileInputStream(altClientXmlFilename); - xmlContent = xmlContent(applicationClientInputStream); - // necessary to have a not empty InputStream !!! - applicationClientInputStream = new FileInputStream(altClientXmlFilename); - } catch (FileNotFoundException ioe) { - throw new ClientContainerDeploymentDescException("The altDD file '" + altClientXmlFilename - + "' was not found."); - } catch (Exception e) { - if (applicationClientInputStream != null) { - try { - applicationClientInputStream.close(); - } catch (IOException ioe) { - // Can't close the file - } - } - throw new ClientContainerDeploymentDescException("Cannot read the XML deployment descriptors of the client jar file '" - + clientFileName + "'.", e); - } - } - - if (applicationClientInputStream != null) { - applicationClient = loadApplicationClient(new InputStreamReader(applicationClientInputStream), CLIENT_FILE_NAME); - } else { - applicationClient = new ApplicationClient(); - } - - try { - clientFile = new JarFile(clientFileName); - - // Lookup in the JAR - // Check the client entry - jonasClientZipEntry = clientFile.getEntry(JONAS_CLIENT_FILE_NAME); - if (jonasClientZipEntry != null) { - //Get the stream - jonasClientInputStream = clientFile.getInputStream(jonasClientZipEntry); - jonasXmlContent = xmlContent(jonasClientInputStream); - // necessary to have a not empty InputStream !!! - jonasClientInputStream = clientFile.getInputStream(jonasClientZipEntry); - } - } catch (Exception e) { - if (clientFile != null) { - try { - clientFile.close(); - } catch (IOException ioe) { - //We can't close the file - } - } - throw new ClientContainerDeploymentDescException( - "Can not read the XML deployment descriptors of the client jar file '" + clientFileName + "'.", e); - } - - // load jonas-client deployment descriptor data - // (META-INF/jonas-client.xml) - if (jonasClientInputStream != null) { - jonasClient = loadJonasClient(new InputStreamReader(jonasClientInputStream), JONAS_CLIENT_FILE_NAME); - try { - jonasClientInputStream.close(); - } catch (IOException e) { - // Nothing to do - } - } else { - jonasClient = new JonasClient(); - } - - // Compute Metadatas - ICarDeployableMetadata carDeployableMetadata = getCarMetadata(clientFileName, classLoaderForCls); - - - // Get Holder and complete metadata - IENCBindingHolder holder = completeClient(carDeployableMetadata, - applicationClient, - jonasClient, - classLoaderForCls); - - // instantiate client deployment descriptor - ClientContainerDeploymentDesc clientDD = new ClientContainerDeploymentDesc(classLoaderForCls, applicationClient, jonasClient); - clientDD.setXmlContent(xmlContent); - clientDD.setJOnASXmlContent(jonasXmlContent); - clientDD.setENCBindingHolder(holder); - - clientDD.setCarMetadata(carDeployableMetadata); - - return clientDD; - } - - /** - * Extract all the metadatas from the application client. - * @param clientFileName the client - * @param classLoader the classloader used for the client - * @return the metadata structure associated to this client - * @throws ClientContainerDeploymentDescException if an error occured during annotation/XML parsing - */ - public static ICarDeployableMetadata getCarMetadata(final String clientFileName, final ClassLoader classLoader) throws ClientContainerDeploymentDescException { - // Analyze metadata of the client - - File clientFile = new File(clientFileName); - - // First, get an archive - IArchive archive = ArchiveManager.getInstance().getArchive(clientFile); - - ICarDeployableMetadata carDeployableMetadata; - CARDeployable carDeployable; - try { - // Workaround for http://bugs.sun.com/view_bug.do?bug_id=6548436 - carDeployable = CARDeployable.class.cast(DeployableHelper.getDeployable(archive)); - // check if client is uncompressed - if (!clientFile.isDirectory()) { - carDeployable = UnpackDeployableHelper.unpack(carDeployable); - logger.log(BasicLevel.DEBUG, "Unpack an application-client to create metadata"); - } - carDeployableMetadata = new CarDeployableMetadataFactory().createDeployableMetadata(carDeployable, classLoader); - } catch (Exception e) { - throw new ClientContainerDeploymentDescException(e); - } - return carDeployableMetadata; - } - - /** - * Complete the given applicationClient object and jonasClient by reading annotations. - * @param carDeployableMetadata given war file to analyze - * @param applicationClient the web app struct - * @param jonasClient the jonas webapp struct - * @param classLoader the classloader used to get the classes - * @return the binding holder - * @throws ClientContainerDeploymentDescException if complete is not done - */ - public static IENCBindingHolder completeClient(final ICarDeployableMetadata carDeployableMetadata, - final ApplicationClient applicationClient, - final JonasClient jonasClient, - final ClassLoader classLoader) throws ClientContainerDeploymentDescException { - - // Complete the standard application-client object with the annotations found - IENCBindingHolder encBindingHolder = null; - try { - encBindingHolder = CarENCBindingBuilder.analyze(carDeployableMetadata); - } catch (ENCBindingException e) { - logger.log(BasicLevel.ERROR, "Unable to analyze metadata of '" + carDeployableMetadata + "'", e); - } - - // Get @PersistenceUnit annotations bindings - List> persistenceUnitBindings = encBindingHolder.getPersistenceUnitBindings(); - // Adds each binding as a persistence unit object - for (IENCBinding persistenceUnitBinding : persistenceUnitBindings) { - // get object - IJavaxPersistenceUnit annotationPersistenceUnit = persistenceUnitBinding.getValue(); - PersistenceUnitRef persistenceUnitRef = new PersistenceUnitRef(); - applicationClient.addPersistenceUnitRef(persistenceUnitRef); - // set the ref name - persistenceUnitRef.setPersistenceUnitRefName(annotationPersistenceUnit.getName()); - // set the unit name - persistenceUnitRef.setPersistenceUnitName(annotationPersistenceUnit.getUnitName()); - } - - // Get @Resource annotations bindings - List> resourcesBindings = encBindingHolder.getResourceBindings(); - // Adds each binding as a resource object - for (IENCBinding resourceBinding : resourcesBindings) { - - // get object - IJAnnotationResource annotationResource = resourceBinding.getValue(); - - // Build a new object and add it (if not a session context) - if ("javax.ejb.SessionContext".equals(annotationResource.getType())) { - continue; - } else if ("org.omg.CORBA.ORB".equals(annotationResource.getType())) { - continue; - } else if ("javax.transaction.UserTransaction".equals(annotationResource.getType())) { - continue; - } - - // Already present ? - String resourceName = resourceBinding.getName(); - if (containsResource(resourceName, applicationClient)) { - continue; - } - - String messageDestinationLink = annotationResource.getMessageDestinationLink(); - - // Resource ref - if (messageDestinationLink == null) { - ResourceRef resourceRef = new ResourceRef(); - applicationClient.addResourceRef(resourceRef); - - // Sets the name - resourceRef.setResRefName(resourceBinding.getName()); - - // Set auth - Resource.AuthenticationType authType = annotationResource.getAuthenticationType(); - if (authType.equals(Resource.AuthenticationType.CONTAINER)) { - resourceRef.setResAuth("Container"); - } else { - resourceRef.setResAuth("Application"); - } - - // Sets type - resourceRef.setResType(annotationResource.getType()); - - // if there is a mapped name, add a jonas-resource element - String mappedName = annotationResource.getMappedName(); - if (mappedName != null) { - JonasResource jonasResource = new JonasResource(); - jonasResource.setResRefName(annotationResource.getName()); - jonasResource.setJndiName(mappedName); - jonasClient.addJonasResource(jonasResource); - } - } else { - // Message destination ref - MessageDestinationRef messageDestinationRef = new MessageDestinationRef(); - applicationClient.addMessageDestinationRef(messageDestinationRef); - - // Sets the name - messageDestinationRef.setMessageDestinationRefName(resourceBinding.getName()); - - // Set auth - messageDestinationRef.setMessageDestinationLink(messageDestinationLink); - - // Sets type - messageDestinationRef.setMessageDestinationType(annotationResource.getType()); - - // if there is a mapped name, add a jonas-resource element - String mappedName = annotationResource.getMappedName(); - if (mappedName != null) { - JonasMessageDestination jonasMessageDestination = new JonasMessageDestination(); - jonasMessageDestination.setMessageDestinationName(annotationResource.getName()); - jonasMessageDestination.setJndiName(mappedName); - jonasClient.addJonasMessageDestination(jonasMessageDestination); - } - - } - - } - - // Get @EJB annotations bindings - List> ejbsBindings = encBindingHolder.getEJBBindings(); - - // Adds each binding as a resource object - for (IENCBinding ejbBinding : ejbsBindings) { - // Build a new object and add it - EjbRef ejbRef = new EjbRef(); - applicationClient.addEjbRef(ejbRef); - - // Sets the name - ejbRef.setEjbRefName(ejbBinding.getName()); - - // get object - IJEjbEJB jEJB = ejbBinding.getValue(); - - // if there is a mapped name, add a jonas-resource element - String mappedName = jEJB.getMappedName(); - if (mappedName != null) { - JonasEjbRef jonasEjbRef = new JonasEjbRef(); - jonasEjbRef.setEjbRefName(ejbBinding.getName()); - jonasEjbRef.setJndiName(mappedName); - jonasClient.addJonasEjbRef(jonasEjbRef); - } - } - - // Iterates on jonas-service-ref elements to see if there are some values to override - List> webServicesBindings = encBindingHolder.getWebServicesBindings(); - for (IENCBinding binding : webServicesBindings) { - IJaxwsWebServiceRef wsr = binding.getValue(); - JonasServiceRef jsr = findJonasServiceRef(jonasClient.getJonasServiceRefList(), wsr.getName()); - - // Found a matching jonas-service-ref - if (jsr != null) { - mergeWebServiceRef(jsr, wsr); - } - } - - return encBindingHolder; - } - - /** - * Load the application-client.xml file. - * @param reader the reader of the XML file. - * @param fileName the name of the file (application-client.xml). - * @return a structure containing the result of the application-client.xml - * parsing. - * @throws DeploymentDescException if the deployment descriptor is - * corrupted. - */ - public static ApplicationClient loadApplicationClient(final Reader reader, final String fileName) - throws DeploymentDescException { - - ApplicationClient appc = new ApplicationClient(); - - // No reader, return now the object - if (reader == null) { - return appc; - } - - // Create if null - if (appClientDigester == null) { - // Create and initialize the digester - appClientDigester = new JDigester(appClientRuleSet, getParsingWithValidation(), true, new AppClientDTDs(), - new AppClientSchemas()); - } - - try { - appClientDigester.parse(reader, fileName, appc); - } catch (DeploymentDescException e) { - throw e; - } finally { - appClientDigester.push(null); - } - return appc; - } - - /** - * Load the jonas-client.xml file. - * @param reader the stream of the XML file. - * @param fileName the name of the file (jonas-client.xml). - * @return a structure containing the result of the jonas-client.xml - * parsing. - * @throws DeploymentDescException if the deployment descriptor is - * corrupted. - */ - public static JonasClient loadJonasClient(final Reader reader, final String fileName) throws DeploymentDescException { - - JonasClient jc = new JonasClient(); - - // Create if null - if (jonasAppClientDigester == null) { - jonasAppClientDigester = new JDigester(jonasAppClientRuleSet, getParsingWithValidation(), true, - new JonasAppClientDTDs(), new JonasAppClientSchemas()); - } - - try { - jonasAppClientDigester.parse(reader, fileName, jc); - - } catch (DeploymentDescException e) { - throw e; - } finally { - jonasAppClientDigester.push(null); - } - return jc; - } - - /** - * Return the JNDI name from the ejbLink string. ejbLink format : - * filename.jar#beanName in the same Ear File - * @param clientURL the url of the jar being parsed. This is needed because - * ejbLink is relative. With the url and the ejbLink, we can know - * where the file is locate. - * @param ejbLink the ejbLink tag of an ejb-ref. - * @param earLoader the classloader of the ear. - * @param ejbType the type of the referenced ejb in the ejb-ref tag. - * @return the JNDI name if found, null otherwise - * @throws DeploymentDescException when it failed - */ - private String getJndiName(final URL clientURL, final String ejbLink, final ClassLoader earLoader, final String ejbType) - throws DeploymentDescException { - // Now ask EJB deployment Desc manager - // Last arg is always true as it is always ejb ref and not local ref from a client - return ejbDDManager.getJndiName(clientURL, ejbLink, earLoader, ejbType, null, true); - } - - /** - * Make a cleanup of the cache of deployment descriptor. This method must - * Return the JNDI name from the mdLink string. mdLink format : - * filename.jar#mdName in the same Ear File - * @param clientURL the url of the jar being parsed. This is needed because - * mdLink is relative. With the url and the mdLink, we can know where - * the file is locate. - * @param mdLink the mdLink tag of a message-destination-ref - * @param mdType the type of the referenced mdb in the - * message-destination-ref tag. - * @param mdUsage the usage of the referenced mdb in the - * message-destination-ref tag. - * @param earLoader the classloader of the ear. - * @return the JNDI name if found, null otherwise - * @throws ClientContainerDeploymentDescException when it failed - */ - private String getMDJndiName(final URL clientURL, final String mdLink, final String mdType, final String mdUsage, final ClassLoader earLoader) - throws ClientContainerDeploymentDescException { - - // Extract from the mdb link - // - the name of the file - // - the name of the destination - String ejbJarLink = null; - String destNameLink = null; - DeploymentDesc dd = null; - - JonasMessageDestination md = null; - // contains ejb-jar name - if (mdLink.indexOf("#") > 0) { - ejbJarLink = mdLink.split("#")[0]; - destNameLink = mdLink.split("#")[1]; - } else { - // ask for any jar - destNameLink = mdLink; - } - if (ejbJarLink != null) { - //Check if ejbJarLink is a jar or not - if (!ejbJarLink.endsWith(".jar")) { - String err = "Ejbjar filename " + ejbJarLink + " from the message-destination-link " + mdLink - + " has a bad format. Correct format : filename.jar"; - throw new ClientContainerDeploymentDescException(err); - } - // Now construct the URL from the absolute path from the url clientURL - // and - // the relative path from ejbJarLink - URL ejbJarLinkUrl = null; - try { - ejbJarLinkUrl = new File(new File(clientURL.getFile()).getParent() + File.separator + ejbJarLink) - .getCanonicalFile().toURL(); - } catch (MalformedURLException mue) { - String err = "Error when creating an url for the ejb jar filename. Error :" + mue.getMessage(); - throw new ClientContainerDeploymentDescException(err); - } catch (IOException ioe) { - String err = "Error when creating/accessing a file. Error :" + ioe.getMessage(); - throw new ClientContainerDeploymentDescException(err); - } - - // Check if the jar exist. - if (!new File(ejbJarLinkUrl.getFile()).exists()) { - String err = "Cannot get the deployment descriptor for '" + ejbJarLinkUrl.getFile() - + "'. The file doesn't exist."; - throw new ClientContainerDeploymentDescException(err); - } - - // We've got the url - // Now, We can ask the Deployment Descriptor of this url - URL[] ddURL = new URL[1]; - ddURL[0] = ejbJarLinkUrl; - URLClassLoader loaderForClsEjb = new URLClassLoader(ddURL, earLoader); - try { - dd = ejbDDManager.getDeploymentDesc(ejbJarLinkUrl, loaderForClsEjb, earLoader); - } catch (DeploymentDescException e) { - String err = "Cannot get the deployment descriptor for '" + ejbJarLinkUrl.getFile() + "'."; - throw new ClientContainerDeploymentDescException(err, e); - } - - md = dd.getJonasMessageDestination(mdLink); - } - if (md == null) { - - String err = "No message-destination-link was found for '" + mdLink + "' in the file " - + clientURL.getFile() + " specified."; - ClientContainerDeploymentDescException e = new ClientContainerDeploymentDescException(err); - - // Not found, try with the remote resolver - - // Was not able to get a JNDI name, try with the remote object. - EZBRemoteJNDIResolver jndiResolver = null; - - // Get object - Object o = null; - try { - o = new InitialContext().lookup("EZB_Remote_JNDIResolver"); - } catch (NamingException ne) { - // No Remote JNDI resolver, so throw first exception - logger.log(BasicLevel.DEBUG, "No Remote EJB3 JNDI Resolver found"); - throw e; - } - - // Object is here, so we can cast it - jndiResolver = (EZBRemoteJNDIResolver) PortableRemoteObject.narrow(o, EZBRemoteJNDIResolver.class); - - // Ask the Resolver - List jndiDataList = null; - try { - jndiDataList = jndiResolver.getMessageDestinationJNDINames(destNameLink); - } catch (RemoteException re) { - // No Remote JNDI resolver, so throw first exception - throw new ClientContainerDeploymentDescException("Unable to get EJB-LINK for destination '" + destNameLink + "'", re); - } - - // Data is here, check if it is empty or not - if (jndiDataList.size() == 0) { - throw new ClientContainerDeploymentDescException("Unable to get EJB-LINK for destination '" + destNameLink + "'"); - } else if (jndiDataList.size() > 1) { - // too many entries - throw new ClientContainerDeploymentDescException("Unable to get EJB-LINK for destination '" + destNameLink + "', too many answers : '" + jndiDataList + "'."); - } - - // Only one item found, so get JNDI Name from this object - EZBJNDIData jndiData = jndiDataList.get(0); - // Update JNDI name - return jndiData.getName(); - - } - - //Check if the type & usage of the message-destination-ref is correct. - //For now checkTypeUsage(clientURL, mdType, mdUsage, dd); - - return md.getJndiName(); - } - - /** - * Make a cleanup of the cache of deployment descriptor. This method must be - * invoked after the ear deployment by the EAR service. - * @param earClassLoader the ClassLoader of the ear application to remove - * from the cache. - */ - public void removeCache(final ClassLoader earClassLoader) { - //Remove the altdd mapping - earCLAltDDBindings.remove(earClassLoader); - - //Then remove the cache of the ejb dd manager - ejbDDManager.removeCache(earClassLoader); - } - - /** - * Set the alt deployment desc which are used instead of the web.xml file - * which is in the war file. The alt-dd tag is in the application.xml file - * of the ear files and is used ony in the EAR case. ie : deployment of wars - * packaged into EAR applications. alt-dd tag is optionnal - * @param earClassLoader the ear classloader which is used for mapped the - * URLs of the wars to the Alt dd. - * @param urls the urls of the wars - * @param altDDs the alt-dd name for the specified war URLs - */ - public void setAltDD(final ClassLoader earClassLoader, final URL[] urls, final URL[] altDDs) { - - //Associate an url to a altDD url - Hashtable urlAltddBindings = new Hashtable(); - - //Fill the hashtable for each url - for (int i = 0; i < urls.length; i++) { - if (altDDs[i] != null) { - urlAltddBindings.put(urls[i], altDDs[i]); - } - } - - //Bind the hashtable - earCLAltDDBindings.put(earClassLoader, urlAltddBindings); - - } - - /** - * Get the size of the cache (number of entries in the cache). This method - * is used only for the tests. - * @return the size of the cache (number of entries in the cache). - */ - public int getCacheSize() { - int bufferSize = 0; - - Enumeration keys = earCLAltDDBindings.keys(); - while (keys.hasMoreElements()) { - ClassLoader loader = (ClassLoader) keys.nextElement(); - Hashtable hashtab = (Hashtable) earCLAltDDBindings.get(loader); - bufferSize = bufferSize + hashtab.size(); - } - - return bufferSize; - } - - /** - * Controls whether the parser is reporting all validity errors. - * @return if true, all external entities will be read. - */ - public static boolean getParsingWithValidation() { - return parsingWithValidation; - } - - /** - * Controls whether the parser is reporting all validity errors. - * @param validation if true, all external entities will be read. - */ - public static void setParsingWithValidation(final boolean validation) { - ClientDeploymentDescManager.parsingWithValidation = validation; - } - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/rules/ApplicationClientRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/rules/ApplicationClientRuleSet.java deleted file mode 100644 index c8afb60b2925d6be408a0d4179dd7cea48302214..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/rules/ApplicationClientRuleSet.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: jonas-team - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.client.rules; - -import org.ow2.jonas.deployment.common.rules.EnvironmentRuleSet; -import org.ow2.jonas.deployment.common.rules.IconRuleSet; -import org.ow2.jonas.deployment.common.rules.JRuleSetBase; -import org.ow2.jonas.deployment.common.rules.MessageDestinationRuleSet; - -import org.apache.commons.digester.Digester; - -/** - * This class defines the rules to analyze the element application-client - * - * @author jonas-team - */ -public class ApplicationClientRuleSet extends JRuleSetBase { - - /** - *

    RuleSet for processing the contents of a - *application-client definition element. - * - * @author jonas-team - */ - - /** - * Construct an object with a specific prefix - */ - public ApplicationClientRuleSet() { - super("application-client/"); - } - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - - public void addRuleInstances(Digester digester) { - digester.addRuleSet(new IconRuleSet(prefix)); - digester.addCallMethod(prefix + "display-name", - "setDisplayName", 0); - digester.addCallMethod(prefix + "description", - "setDescription", 0); - digester.addRuleSet(new EnvironmentRuleSet(prefix)); - digester.addCallMethod(prefix + "callback-handler", - "setCallbackHandler", 0); - digester.addRuleSet(new MessageDestinationRuleSet(prefix)); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/rules/JonasClientRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/rules/JonasClientRuleSet.java deleted file mode 100644 index 03c5d6e1f1bb90e584ce87d0144766da4cdb601d..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/rules/JonasClientRuleSet.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: jonas-team - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.client.rules; - -import org.ow2.jonas.deployment.common.rules.JRuleSetBase; -import org.ow2.jonas.deployment.common.rules.JonasEjbRefRuleSet; -import org.ow2.jonas.deployment.common.rules.JonasMessageDestinationRefRuleSet; -import org.ow2.jonas.deployment.common.rules.JonasMessageDestinationRuleSet; -import org.ow2.jonas.deployment.common.rules.JonasResourceEnvRuleSet; -import org.ow2.jonas.deployment.common.rules.JonasResourceRuleSet; -import org.ow2.jonas.deployment.common.rules.JonasServiceRefRuleSet; - -import org.apache.commons.digester.Digester; - -/** - * This class defines the rules to analyze the element jonas-client - * - * @author jonas-team - */ - -public class JonasClientRuleSet extends JRuleSetBase { - - /** - *

    RuleSet for processing the contents of a - *jonas-client definition element. - * - * @author jonas-team - */ - - /** - * Construct an object with a specific prefix - */ - public JonasClientRuleSet() { - super("jonas-client/"); - } - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - - public void addRuleInstances(Digester digester) { - digester.addRuleSet(new JonasEjbRefRuleSet(prefix)); - digester.addRuleSet(new JonasResourceRuleSet(prefix)); - digester.addRuleSet(new JonasResourceEnvRuleSet(prefix)); - digester.addRuleSet(new JonasSecurityRuleSet(prefix)); - digester.addRuleSet(new JonasServiceRefRuleSet(prefix)); - digester.addRuleSet(new JonasMessageDestinationRefRuleSet(prefix)); - digester.addRuleSet(new JonasMessageDestinationRuleSet(prefix)); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/rules/JonasSecurityRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/rules/JonasSecurityRuleSet.java deleted file mode 100644 index 79eb69db732c9bc72e0e9bae3a1eb9a842a652fb..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/rules/JonasSecurityRuleSet.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: jonas-team - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.client.rules; - -import org.ow2.jonas.deployment.common.rules.JRuleSetBase; - -import org.apache.commons.digester.Digester; - -/** - * This class defines the rules to analyze the element jonas-security - * - * @author jonas-team - */ - -public class JonasSecurityRuleSet extends JRuleSetBase { - - /** - *

    RuleSet for processing the contents of a - *jonas-security definition element. - * - * @author jonas-team - */ - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public JonasSecurityRuleSet(String prefix) { - super(prefix); - } - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "jonas-security", - "org.ow2.jonas.deployment.client.xml.JonasSecurity"); - digester.addSetNext(prefix + "jonas-security", - "setJonasSecurity", - "org.ow2.jonas.deployment.client.xml.JonasSecurity"); - digester.addCallMethod(prefix + "jonas-security/jaasfile", - "setJaasfile", 0); - digester.addCallMethod(prefix + "jonas-security/jaasentry", - "setJaasentry", 0); - digester.addCallMethod(prefix + "jonas-security/username", - "setUsername", 0); - digester.addCallMethod(prefix + "jonas-security/password", - "setPassword", 0); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/wrapper/ClientManagerWrapper.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/wrapper/ClientManagerWrapper.java deleted file mode 100644 index 529d35b2de482e0ab0d090449f9d4145c2de42d3..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/wrapper/ClientManagerWrapper.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial Developer : Guillaume Sauthier - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.client.wrapper; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.net.URL; -import java.net.URLClassLoader; - -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; -import org.ow2.jonas.deployment.client.ClientContainerDeploymentDesc; -import org.ow2.jonas.deployment.client.ClientContainerDeploymentDescException; -import org.ow2.jonas.lib.bootstrap.LoaderManager; -import org.ow2.jonas.lib.util.Log; - -/** - * Wrap the call to ClientDeploymentDescManager during JOnAS runtime to solve - * classloader problem with Digester. - * - * @author Guillaume Sauthier - */ -public class ClientManagerWrapper { - - /** - * logger - */ - private static Logger logger = Log.getLogger("org.ow2.jonas.deployment.client"); - - /** - * Private Empty constructor for utility class. - */ - private ClientManagerWrapper() { } - - /** - * Wrap the ClientDeploymentDescManager.getDeploymentDesc(URL, ClassLoader, - * ClassLoader). - * - * @param url URL of the client to deploy - * @param moduleCL ClassLoader of the Client - * @param earCL ClassLoader of the application wrapping the client. - * - * @return the ClientContainerDeploymentDesc found at the given URL. - * @throws ClientContainerDeploymentDescException When deployment fails. - */ - public static ClientContainerDeploymentDesc getDeploymentDesc(final URL url, final ClassLoader moduleCL, final ClassLoader earCL) - throws ClientContainerDeploymentDescException { - LoaderManager lm = LoaderManager.getInstance(); - ClientContainerDeploymentDesc ccDD = null; - - try { - ClassLoader ext = lm.getExternalLoader(); - Class manager = ext.loadClass("org.ow2.jonas.deployment.client.lib.ClientDeploymentDescManager"); - Method m = manager.getDeclaredMethod("getInstance", new Class[] {}); - Object instance = m.invoke(null, new Object[] {}); - m = manager.getDeclaredMethod("getDeploymentDesc", new Class[] {URL.class, ClassLoader.class, - ClassLoader.class}); - ccDD = (ClientContainerDeploymentDesc) m.invoke(instance, new Object[] {url, moduleCL, earCL}); - } catch (InvocationTargetException ite) { - Throwable t = ite.getTargetException(); - if (ClientContainerDeploymentDescException.class.isInstance(t)) { - throw (ClientContainerDeploymentDescException) ite.getTargetException(); - } else { - throw new ClientContainerDeploymentDescException("ClientDeploymentDescManager.getDeploymentDesc fails", t); - } - } catch (Exception e) { - e.printStackTrace(); - // TODO add i18n here - throw new ClientContainerDeploymentDescException("Problems when using reflection on ClientDeploymentDescManager", e); - } - - return ccDD; - } - - /** - * Wrap the ClientDeploymentDescManager.getInstance().setAltDD(ClassLoader, URL[], URL[]) - * - * @param earClassLoader ClassLoader of the Application wrapping the Client - * @param clientUrls Array of ClientApplication URL - * @param clientsAltDDs Array of Client Alternative Deployment Desc URL - */ - public static void setAltDD(final URLClassLoader earClassLoader, final URL[] clientUrls, final URL[] clientsAltDDs) { - LoaderManager lm = LoaderManager.getInstance(); - try { - ClassLoader ext = lm.getExternalLoader(); - Class manager = ext.loadClass("org.ow2.jonas.deployment.client.lib.ClientDeploymentDescManager"); - Method m = manager.getDeclaredMethod("getInstance", new Class[] {}); - Object instance = m.invoke(null, new Object[] {}); - m = manager.getDeclaredMethod("setAltDD", new Class[] {ClassLoader.class, URL[].class, URL[].class}); - m.invoke(instance, new Object[] {earClassLoader, clientUrls, clientsAltDDs}); - } catch (Exception e) { - // Should never occurs - logger.log(BasicLevel.ERROR, e); - } - } - -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/xml/ApplicationClient.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/xml/ApplicationClient.java deleted file mode 100644 index 6e9039be8ee843a9f44eed060f9346fcff0844aa..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/xml/ApplicationClient.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: jonas-team - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.client.xml; - -import org.ow2.jonas.deployment.common.xml.AbsEnvironmentElement; -import org.ow2.jonas.deployment.common.xml.JndiEnvRefsGroupXml; -import org.ow2.jonas.deployment.common.xml.TopLevelElement; - -/** - * This class defines the implementation of the element application-client - * @author jonas-team - */ - -public class ApplicationClient extends AbsEnvironmentElement implements TopLevelElement, JndiEnvRefsGroupXml { - - /** - * callback-handler - */ - private String callbackHandler = null; - - /** - * Constructor - */ - public ApplicationClient() { - super(); - } - - /** - * @return the callback-handler - */ - public String getCallbackHandler() { - return callbackHandler; - } - - /** - * Set the callback-handler - * @param callbackHandler callbackHandler - */ - public void setCallbackHandler(final String callbackHandler) { - this.callbackHandler = callbackHandler; - } - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - @Override - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // icon - sb.append(getIcon().toXML(indent)); - // display-name - sb.append(xmlElement(getDisplayName(), "display-name", indent)); - // description - sb.append(xmlElement(getDescription(), "description", indent)); - // env-entry - sb.append(getEnvEntryList().toXML(indent)); - // ejb-ref - sb.append(getEjbRefList().toXML(indent)); - // service-ref - sb.append(getServiceRefList().toXML(indent)); - // resource-ref - sb.append(getResourceRefList().toXML(indent)); - // resource-env-ref - sb.append(getResourceEnvRefList().toXML(indent)); - // message-destination-ref - sb.append(getMessageDestinationRefList().toXML(indent)); - // persistence-unit-ref - sb.append(getPersistenceUnitRefList().toXML(indent)); - // callback-handler - sb.append(xmlElement(callbackHandler, "callback-handler", indent)); - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } - -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/xml/JonasClient.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/xml/JonasClient.java deleted file mode 100644 index 9bde26e3a036af99be23ae47b5f37b77c62ba386..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/xml/JonasClient.java +++ /dev/null @@ -1,166 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: jonas-team - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.client.xml; - -import org.ow2.jonas.deployment.client.JonasAppClientSchemas; -import org.ow2.jonas.deployment.common.CommonsSchemas; -import org.ow2.jonas.deployment.common.xml.AbsJonasEnvironmentElement; -import org.ow2.jonas.deployment.common.xml.JLinkedList; -import org.ow2.jonas.deployment.common.xml.JonasMessageDestination; -import org.ow2.jonas.deployment.common.xml.TopLevelElement; - - - -/** - * This class defines the implementation of the element jonas-client - * @author jonas-team - */ - -public class JonasClient extends AbsJonasEnvironmentElement implements TopLevelElement { - - /** - * Header (with right XSD version) for XML - */ - private String header = null; - - /** - * jonas-security - */ - private JonasSecurity jonasSecurity = null; - - /** - * jonas-message-destination - */ - private JLinkedList jonasMessageDestinationList = null; - - /** - * jonas-client element XML header - */ - public static final String JONAS_CLIENT_ELEMENT = CommonsSchemas.getHeaderForElement("jonas-client", - JonasAppClientSchemas.getLastSchema()); - - /** - * Default constructor - */ - public JonasClient() { - super(); - jonasMessageDestinationList = new JLinkedList("jonas-message-destination"); - - header = JONAS_CLIENT_ELEMENT; - } - - /** - * @return the jonas-security - */ - public JonasSecurity getJonasSecurity() { - return jonasSecurity; - } - - /** - * Set the jonas-security - * @param jonasSecurity jonasSecurity - */ - public void setJonasSecurity(JonasSecurity jonasSecurity) { - this.jonasSecurity = jonasSecurity; - } - - /** - * @return the list of all jonas-message-destination elements - */ - public JLinkedList getJonasMessageDestinationList() { - return jonasMessageDestinationList; - } - - /** - * Set the jonas-message-destination - * @param jonasMessageDestinationList jonasMessageDestination - */ - public void setJonasMessageDestinationList(JLinkedList jonasMessageDestinationList) { - this.jonasMessageDestinationList = jonasMessageDestinationList; - } - - /** - * Add a new jonas-message-destination element to this object - * @param jonasMessageDestination the jonas-message-destination object - */ - public void addJonasMessageDestination(JonasMessageDestination jonasMessageDestination) { - jonasMessageDestinationList.add(jonasMessageDestination); - } - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - if (header != null) { - sb.append(header); - } else { - sb.append("\n"); - } - - indent += 2; - - // jonas-ejb-ref - sb.append(getJonasEjbRefList().toXML(indent)); - // jonas-resource - sb.append(getJonasResourceList().toXML(indent)); - // jonas-resource-env - sb.append(getJonasResourceEnvList().toXML(indent)); - // jonas-security - if (jonasSecurity != null) { - sb.append(jonasSecurity.toXML(indent)); - } - // jonas-service-ref - sb.append(getJonasServiceRefList().toXML(indent)); - // jonas-message-destination-ref - sb.append(getJonasMessageDestinationRefList().toXML(indent)); - // jonas-message-destination - sb.append(jonasMessageDestinationList.toXML(indent)); - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } - - /** - * @return the header. - */ - public String getHeader() { - return header; - } - - /** - * @param header The header to set. - */ - public void setHeader(String header) { - this.header = header; - } -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/xml/JonasSecurity.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/xml/JonasSecurity.java deleted file mode 100644 index 57d8bbd97c26b394d8b2ad82b3733e3befebf392..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/client/xml/JonasSecurity.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: jonas-team - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.client.xml; - -import org.ow2.jonas.deployment.common.xml.AbsElement; - -/** - * This class defines the implementation of the element jonas-security - * @author jonas-team - */ - -public class JonasSecurity extends AbsElement { - - /** - * jaasfile - */ - private String jaasfile = null; - - /** - * jaasentry - */ - private String jaasentry = null; - - /** - * username - */ - private String username = null; - - /** - * password - */ - private String password = null; - - /** - * Default constructor - */ - public JonasSecurity() { - super(); - } - - /** - * @return the jaasfile - */ - public String getJaasfile() { - return jaasfile; - } - - /** - * Set the jaasfile - * @param jaasfile jaasfile - */ - public void setJaasfile(String jaasfile) { - this.jaasfile = jaasfile; - } - - /** - * @return the jaasentry - */ - public String getJaasentry() { - return jaasentry; - } - - /** - * Set the jaasentry - * @param jaasentry jaasentry - */ - public void setJaasentry(String jaasentry) { - this.jaasentry = jaasentry; - } - - /** - * @return the username - */ - public String getUsername() { - return username; - } - - /** - * Set the username - * @param username username - */ - public void setUsername(String username) { - this.username = username; - } - - /** - * @return the password - */ - public String getPassword() { - return password; - } - - /** - * Set the password - * @param password password - */ - public void setPassword(String password) { - this.password = password; - } - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // jaasfile - sb.append(xmlElement(jaasfile, "jaasfile", indent)); - // jaasentry - sb.append(xmlElement(jaasentry, "jaasentry", indent)); - // username - sb.append(xmlElement(username, "username", indent)); - // password - sb.append(xmlElement(password, "password", indent)); - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/ClusterDaemonConfiguration.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/ClusterDaemonConfiguration.java deleted file mode 100644 index 5319240966529853d12b350f0f1035e9686d63dd..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/ClusterDaemonConfiguration.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2006 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.clusterd; - -import org.ow2.jonas.deployment.clusterd.xml.ClusterDaemon; -import org.ow2.jonas.deployment.common.AbsDeploymentDesc; - -/** - * This class provides a cluster daemon configuration structure as described by - * the description file. It extends the AbsDeploymentDesc which requires to - * implement toString() and provides getSAXMsg() method (displayName is not used - * by ClusterDaemonConfiguration). - * @author Benoit Pelletier - */ - -public class ClusterDaemonConfiguration extends AbsDeploymentDesc { - - /** - * The cluster daemon configuraton - */ - private ClusterDaemon clusterDaemon = null; - - /** - * Constructor - * @param clusterDaemon Cluster daemon - */ - public ClusterDaemonConfiguration(final ClusterDaemon clusterDaemon) { - - this.clusterDaemon = clusterDaemon; - - } - - /** - * Return a String representation of the ClusterDaemonConfiguration - * @return a String representation of the ClusterDaemonConfiguration - */ - @Override - public String toString() { - - return toXML(); - } - - /** - * @return Return a XML representation of the clusterDaemonConfiguration - */ - public String toXML() { - - StringBuffer sb = new StringBuffer(); - sb.append(clusterDaemon.toXML()); - return sb.toString(); - } - - /** - * @return the cluster daemon bean - */ - public ClusterDaemon getClusterDaemon() { - return clusterDaemon; - } - - /** - * Set the cluster daemon bean - * @param clusterDaemon cluster daemon - */ - public void setClusterDaemon(final ClusterDaemon clusterDaemon) { - this.clusterDaemon = clusterDaemon; - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/ClusterDaemonConfigurationException.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/ClusterDaemonConfigurationException.java deleted file mode 100644 index c725db35cf93c51dfd3aa173275e38e2a37d0add..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/ClusterDaemonConfigurationException.java +++ /dev/null @@ -1,78 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2006 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.deployment.clusterd; - -import org.ow2.jonas.deployment.common.DeploymentDescException; - -/** - * Cluster daemon exception when loading its configuration - * @author Benoit Pelletier - */ -public class ClusterDaemonConfigurationException extends DeploymentDescException { - - /** - * version UID - */ - private static final long serialVersionUID = 2734060670758309859L; - - /** - * Constructs a new ClusterDaemonConfigurationException with no detail - * message. - */ - public ClusterDaemonConfigurationException() { - super(); - } - - /** - * Constructs a new ClusterDaemonConfigurationException with the specified - * message. - * @param message the detail message. - */ - public ClusterDaemonConfigurationException(String message) { - super(message); - } - - /** - * Constructs a new ClusterDaemonConfigurationException with the specified - * error cause. - * @param cause the cause of the error. - */ - public ClusterDaemonConfigurationException(Throwable cause) { - super(cause); - } - - /** - * Constructs a new ClusterDaemonConfigurationException with the specified - * error cause. - * @param message the detail message. - * @param cause the cause of the error. - */ - public ClusterDaemonConfigurationException(String message, Throwable cause) { - super(message, cause); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/ClusterDaemonSchemas.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/ClusterDaemonSchemas.java deleted file mode 100644 index 4ae84db5e283cab783ef144a0cd0409b6df22ff2..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/ClusterDaemonSchemas.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.clusterd; - -import org.ow2.jonas.deployment.common.CommonsSchemas; -import org.ow2.jonas.deployment.common.util.ResourceHelper; - -/** - * This class defines the declarations of Schemas for clusterd.xml file. - * @author Benoit Pelletier - */ -public class ClusterDaemonSchemas extends CommonsSchemas { - - /** - * Package name. - */ - private static final String PACKAGE = ResourceHelper.getResourcePackage(ClusterDaemonSchemas.class); - - /** - * List of schemas used for clusterd.xml file. - */ - private static final String[] CLUSTER_DAEMON_SCHEMAS = new String[] { - PACKAGE + "jonas-clusterd_5_0.xsd" - }; - - - /** - * Build a new object for Schemas handling. - */ - public ClusterDaemonSchemas() { - super(); - addSchemas(CLUSTER_DAEMON_SCHEMAS); - } - - - /** - * @return Returns the last Schema. - */ - public static String getLastSchema() { - return getLastSchema(CLUSTER_DAEMON_SCHEMAS, PACKAGE); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/lib/ClusterDaemonConfigurationManager.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/lib/ClusterDaemonConfigurationManager.java deleted file mode 100644 index 4a98a7b7cb0fcb8fe03b71c566679851eae9db13..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/lib/ClusterDaemonConfigurationManager.java +++ /dev/null @@ -1,199 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2006 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.clusterd.lib; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Reader; - -import org.ow2.jonas.deployment.clusterd.ClusterDaemonConfiguration; -import org.ow2.jonas.deployment.clusterd.ClusterDaemonConfigurationException; -import org.ow2.jonas.deployment.clusterd.ClusterDaemonSchemas; -import org.ow2.jonas.deployment.clusterd.rules.ClusterDaemonRuleSet; -import org.ow2.jonas.deployment.clusterd.xml.ClusterDaemon; -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.common.digester.JDigester; -import org.ow2.jonas.deployment.common.lib.AbsDeploymentDescManager; -import org.ow2.jonas.lib.util.Log; - - -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; - -/** - * Description of the cluster daemon configuration - * @author Benoit Pelletier - */ -public class ClusterDaemonConfigurationManager extends AbsDeploymentDescManager { - - /** - * Path of the clusterd.xml configuration file - */ - public static final String CLUSTERD_FILE_NAME = "clusterd.xml"; - - /** - * Digester used to parse clusterd.xml - */ - private static JDigester clusterDaemonDigester = null; - - /** - * Rules to parse the application.xml - */ - private static ClusterDaemonRuleSet clusterDaemonRuleSet = new ClusterDaemonRuleSet(); - - /** - * logger - */ - private static Logger logger = Log.getLogger(Log.JONAS_CLUSTER_DAEMON); - - /** - * Flag for parser validation - */ - private static boolean parsingWithValidation = true; - /** - * Private Empty constructor for utility class - */ - private ClusterDaemonConfigurationManager() { - } - - /** - * Get an instance of a ClusterDaemonConfiguration by parsing the clusterd.xml configuration file. - * @param clusterDaemonFileName used when specific cluster daemon configuration file name has to be used - * @param classLoaderForCls the classloader for the classes. - * @return a ClusterDaemonConfiguration instance by parsing the clusterd.xml file - * @throws ClusterDaemonConfigurationException if the clusterd.xml file is corrupted. - */ - public static ClusterDaemonConfiguration getClusterDaemonConfiguration(String clusterDaemonFileName, ClassLoader classLoaderForCls) - throws ClusterDaemonConfigurationException { - - //Input Stream - InputStream is = null; - String fileName = null; - if (clusterDaemonFileName == null) { - // clusterd.xml in JONAS_BASE/conf - fileName = System.getProperty("jonas.base") + File.separator - + "conf" + File.separator - + CLUSTERD_FILE_NAME; - } else { - fileName = clusterDaemonFileName; - } - // load clusterd.xml - File clusterDaemonFile = new File(fileName); - if (!clusterDaemonFile.exists()) { - is = classLoaderForCls.getResourceAsStream(CLUSTERD_FILE_NAME); - if (is == null) { - throw new ClusterDaemonConfigurationException("Cannot read the " + fileName + " and " + CLUSTERD_FILE_NAME + " is not accessible in the classpath"); - } - } else { - try { - is = new FileInputStream(clusterDaemonFile); - } catch (Exception e) { - throw new ClusterDaemonConfigurationException("Cannot read the " + CLUSTERD_FILE_NAME, e); - } - } - ClusterDaemon clusterDaemon = loadClusterDaemon(new InputStreamReader(is), CLUSTERD_FILE_NAME); - try { - is.close(); - } catch (IOException e) { - // Can't close the file - logger.log(BasicLevel.WARN, "Cannot close InputStream for " + CLUSTERD_FILE_NAME); - } - - // instantiate the domain map - ClusterDaemonConfiguration clusterDaemonConfiguration = new ClusterDaemonConfiguration(clusterDaemon); - return clusterDaemonConfiguration; - } - /** - * Gets the cluster daemon config file. Default is clusterd.xml - * @param clusterDaemonFileName - * @return cluster daemon configuration file name. - */ - public static String getClusterDaemonFileName(String clusterDaemonFileName) { - String fileName = null; - if (clusterDaemonFileName == null) { - // clusterd.xml in JONAS_BASE/conf - fileName = System.getProperty("jonas.base") + File.separator - + "conf" + File.separator - + CLUSTERD_FILE_NAME; - } else { - fileName = clusterDaemonFileName; - } - return fileName; - - } - - /** - * Load the clusterd.xml file. - * @param reader the Reader of the XML file. - * @param fileName the name of the file (clusterd.xml). - * @throws ClusterDaemonConfigurationException if the file is corrupted. - * @return a ClusterDaemon object. - */ - public static ClusterDaemon loadClusterDaemon(Reader reader, String fileName) throws ClusterDaemonConfigurationException { - - ClusterDaemon clusterDaemon = new ClusterDaemon(); - // Create if domainDigester is null - if (clusterDaemonDigester == null) { - try { - // Create and initialize the digester - - clusterDaemonDigester = new JDigester(clusterDaemonRuleSet, getParsingWithValidation(), true, null, - new ClusterDaemonSchemas()); - } catch (DeploymentDescException e) { - throw new ClusterDaemonConfigurationException(e); - } - } - - try { - clusterDaemonDigester.parse(reader, fileName, clusterDaemon); - } catch (DeploymentDescException e) { - throw new ClusterDaemonConfigurationException(e); - } finally { - clusterDaemonDigester.push(null); - } - - return clusterDaemon; - } - - /** - * Controls whether the parser is reporting all validity errors. - * @return if true, all external entities will be read. - */ - public static boolean getParsingWithValidation() { - return parsingWithValidation; - } - - /** - * Controls whether the parser is reporting all validity errors. - * @param validation if true, all external entities will be read. - */ - public static void setParsingWithValidation(boolean validation) { - ClusterDaemonConfigurationManager.parsingWithValidation = validation; - } -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/rules/ClusterDaemonRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/rules/ClusterDaemonRuleSet.java deleted file mode 100644 index 3f5183899002328b30c4f06a65cc0cd1ac65efbd..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/rules/ClusterDaemonRuleSet.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2006 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.clusterd.rules; - -import org.ow2.jonas.deployment.common.rules.JRuleSetBase; - -import org.apache.commons.digester.Digester; - -/** - * This class defines the rules to analyze the cluster-daemon element. - * - * @author Benoit Pelletier - * @author S. Ali Tokmen - */ - -public class ClusterDaemonRuleSet extends JRuleSetBase { - - /** - * Constructs an object with the prefix "cluster-daemon". - */ - public ClusterDaemonRuleSet() { - super("cluster-daemon/"); - } - - /** Add a set of rules to the digester object. - * @param digester Digester instance. - */ - public void addRuleInstances(final Digester digester) { - digester.addCallMethod(prefix + "name", "setName", 0); - digester.addCallMethod(prefix + "domain-name", "setDomainName", 0); - digester.addCallMethod(prefix + "jonas-interaction-mode", "setJonasInteractionMode", 0); - digester.addCallMethod(prefix + "jmx.secured", "setJmxSecured", 0); - digester.addCallMethod(prefix + "jmx.authentication.method", "setJmxAuthenticationMethod", 0); - digester.addCallMethod(prefix + "jmx.authentication.parameter", "setJmxAuthenticationParameter", 0); - digester.addCallMethod(prefix + "jmx.authorization.method", "setJmxAuthorizationMethod", 0); - digester.addCallMethod(prefix + "jmx.authorization.parameter", "setJmxAuthorizationParameter", 0); - digester.addRuleSet(new DiscoveryRuleSet(prefix)); - digester.addRuleSet(new ServerRuleSet(prefix)); - - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/rules/DiscoveryRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/rules/DiscoveryRuleSet.java deleted file mode 100644 index de804961f770933986e2db68cbba891e3d998b6f..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/rules/DiscoveryRuleSet.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.clusterd.rules; - -import org.apache.commons.digester.Digester; -import org.ow2.jonas.deployment.common.rules.JRuleSetBase; - -public class DiscoveryRuleSet extends JRuleSetBase { - /** - * Construct an object with the prefix. - * @param prefix prefix for the rule set - */ - public DiscoveryRuleSet(String prefix) { - super(prefix); - } - - @Override - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "discovery", - "org.ow2.jonas.deployment.clusterd.xml.Discovery", "discovery"); - digester.addSetNext(prefix + "discovery", - "setDiscovery", - "org.ow2.jonas.deployment.clusterd.xml.Discovery"); - digester.addCallMethod(prefix + "discovery/group-name", "setDiscoveryGroupName", 0); - digester.addCallMethod(prefix + "discovery/stack-file", "setDiscoveryStackFile", 0); - digester.addCallMethod(prefix + "discovery/start-up", "setStartDiscovery", 0); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/rules/ServerRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/rules/ServerRuleSet.java deleted file mode 100644 index 056ced50ec62d98295b118eea3e959c7b7552443..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/rules/ServerRuleSet.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2006 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.clusterd.rules; - -import org.ow2.jonas.deployment.common.rules.JRuleSetBase; - -import org.apache.commons.digester.Digester; - -/** - * This class defines the rules to analyze the server element. - * @author Benoit Pelletier. - */ -public class ServerRuleSet extends JRuleSetBase { - - /** - * Construct an object with the prefix. - * @param prefix prefix for the rule set. - */ - public ServerRuleSet(final String prefix) { - super(prefix); - } - - /** - * Add a set of rules to the digester object. - * @param digester Digester instance. - */ - public void addRuleInstances(final Digester digester) { - digester.addObjectCreate(prefix + "server", - "org.ow2.jonas.deployment.clusterd.xml.Server"); - digester.addSetNext(prefix + "server", - "addServer", - "org.ow2.jonas.deployment.clusterd.xml.Server"); - digester.addCallMethod(prefix + "server/name", "setName", 0); - digester.addCallMethod(prefix + "server/description", "setDescription", 0); - digester.addCallMethod(prefix + "server/java-home", "setJavaHome", 0); - digester.addCallMethod(prefix + "server/jonas-root", "setJonasRoot", 0); - digester.addCallMethod(prefix + "server/jonas-base", "setJonasBase", 0); - digester.addCallMethod(prefix + "server/xprm", "setXprm", 0); - digester.addCallMethod(prefix + "server/auto-boot", "setAutoBoot", 0); - digester.addCallMethod(prefix + "server/jonas-cmd", "setJonasCmd", 0); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/xml/ClusterDaemon.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/xml/ClusterDaemon.java deleted file mode 100644 index 48e51fbdbe74b6679d5b7378313a1210a7dba4af..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/xml/ClusterDaemon.java +++ /dev/null @@ -1,356 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2006 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.clusterd.xml; - -import org.ow2.jonas.deployment.clusterd.ClusterDaemonSchemas; -import org.ow2.jonas.deployment.common.CommonsSchemas; -import org.ow2.jonas.deployment.common.xml.AbsDescriptionElement; -import org.ow2.jonas.deployment.common.xml.JLinkedList; -import org.ow2.jonas.deployment.common.xml.TopLevelElement; - -/** - * This class defines the configuration of the cluster daemon - * - * @author Benoit Pelletier - * @author eyindanga (Added discovery configuration) - * @author S. Ali Tokmen (Added JMX security) - */ -public class ClusterDaemon extends AbsDescriptionElement implements TopLevelElement { - - /** - * Version UID. - */ - private static final long serialVersionUID = 3212755715938568244L; - - /** - * name. - */ - private String name = null; - - /** - * Domain name - */ - private String domainName = null; - - /** - * JOnAS interaction mode : loosely/tighly coupled. - */ - private String jonasInteractionMode = null; - - /** - * servers - */ - private JLinkedList serverList = null; - - /** - * Discovery configuration : stack file and group name. - */ - private Discovery discovery = null; - - /** - * Whether JMX is secured. - */ - private boolean jmxSecured = false; - - /** - * JMX authentication method. - */ - private String jmxAuthenticationMethod = null; - - /** - * JMX authentication method's parameter. - */ - private String jmxAuthenticationParameter = null; - - /** - * JMX authorization method. - */ - private String jmxAuthorizationMethod = null; - - /** - * JMX authorization method's parameter. - */ - private String jmxAuthorizationParameter = null; - - /** - * XML export header. - */ - private static final String header = CommonsSchemas.getHeaderForElement("cluster-daemon", - ClusterDaemonSchemas.getLastSchema()); - - /** - * Constructor - */ - public ClusterDaemon() { - super(); - serverList = new JLinkedList("server"); - } - - /** - * Add a new server element to this object - * @param server the Server object - */ - @SuppressWarnings("unchecked") - public void addServer(final Server server) { - serverList.add(server); - } - - /** - * @return Returns the serverList. - */ - public JLinkedList getServerList() { - return serverList; - } - - /** - * @param serverList The serverList to set. - */ - public void setServerList(final JLinkedList serverList) { - this.serverList = serverList; - } - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prefixing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append(header); - indent += 2; - - // name - if (getName() != null) { - sb.append(xmlElement(getName(), "name", indent)); - } - - // domain-name - if (getDomainName() != null) { - sb.append(xmlElement(getDomainName(), "domain-name", indent)); - } - - // jonas-interaction-mode - if (getJonasInteractionMode() != null) { - sb.append(xmlElement(getJonasInteractionMode(), "jonas-interaction-mode", indent)); - } - - // JMX security - sb.append(xmlElement(getJmxSecured(), "jmx.secured", indent)); - sb.append(xmlElement(getJmxAuthenticationMethod(), "jmx.authentication.method", indent)); - sb.append(xmlElement(getJmxAuthenticationParameter(), "jmx.authentication.parameter", indent)); - sb.append(xmlElement(getJmxAuthorizationMethod(), "jmx.authorization.method", indent)); - sb.append(xmlElement(getJmxAuthorizationParameter(), "jmx.authorization.parameter", indent)); - - //discovery config - if (discovery != null) { - sb.append(discovery.toXML(indent)); - } - // servers - sb.append(getServerList().toXML(indent)); - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } - - /** - * - * @return the domain name - */ - public String getDomainName() { - return domainName; - } - - /** - * Sets the domain name - * @param domainName domain name - */ - public void setDomainName(final String domainName) { - this.domainName = domainName; - } - - /** - * - * @return the name - */ - public String getName() { - return name; - } - - /** - * set the name - * @param name name - */ - public void setName(final String name) { - this.name = name; - } - - /** - * - * @return the interaction mode with JOnAS - */ - public String getJonasInteractionMode() { - return jonasInteractionMode; - } - - - /** - * set the interaction mode with JOnAS. - * @param jonasInteraction interaction mode - */ - public void setJonasInteractionMode(final String jonasInteractionMode) { - this.jonasInteractionMode = jonasInteractionMode; - } - - /** - * @return the discoveryStackFile - */ - public String getDiscoveryStackFile() { - return discovery.getDiscoveryStackFile(); - } - - /** - * @param discoveryStackFile the discoveryStackFile to set - */ - public void setDiscoveryStackFile(final String discoveryStackFile) { - this.discovery.setDiscoveryStackFile(discoveryStackFile); - } - - /** - * @return the discoveryGroupName - */ - public String getDiscoveryGroupName() { - return this.discovery.getDiscoveryGroupName(); - } - - /** - * @param discoveryGroupName the discoveryGroupName to set - */ - public void setDiscoveryGroupName(final String discoveryGroupName) { - this.discovery.setDiscoveryGroupName(discoveryGroupName); - } - - /** - * @return the discovery - */ - public Discovery getDiscovery() { - return discovery; - } - - /** - * @param discovery the discovery to set - */ - public void setDiscovery(Discovery discovery) { - this.discovery = discovery; - } - - /** - * @return Whether JMX is secured. - */ - public boolean isJmxSecured() { - return jmxSecured; - } - - /** - * @return Whether JMX is secured. - */ - public String getJmxSecured() { - return Boolean.toString(jmxSecured); - } - - /** - * @param jmxSecured Whether JMX is secured. - */ - public void setJmxSecured(boolean jmxSecured) { - this.jmxSecured = jmxSecured; - } - - /** - * @param jmxSecured Whether JMX is secured. - */ - public void setJmxSecured(String jmxSecured) { - this.jmxSecured = "true".equalsIgnoreCase(jmxSecured); - } - - /** - * @return JMX authentication method. - */ - public String getJmxAuthenticationMethod() { - return jmxAuthenticationMethod; - } - - /** - * @param jmxAuthenticationMethod JMX authentication method. - */ - public void setJmxAuthenticationMethod(String jmxAuthenticationMethod) { - this.jmxAuthenticationMethod = jmxAuthenticationMethod; - } - - /** - * @return JMX authentication method's parameter. - */ - public String getJmxAuthenticationParameter() { - return jmxAuthenticationParameter; - } - - /** - * @param jmxAuthenticationParameter JMX authentication method's parameter. - */ - public void setJmxAuthenticationParameter(String jmxAuthenticationParameter) { - this.jmxAuthenticationParameter = jmxAuthenticationParameter; - } - - /** - * @return JMX authorization method. - */ - public String getJmxAuthorizationMethod() { - return jmxAuthorizationMethod; - } - - /** - * @param jmxAuthorizationMethod JMX authorization method. - */ - public void setJmxAuthorizationMethod(String jmxAuthorizationMethod) { - this.jmxAuthorizationMethod = jmxAuthorizationMethod; - } - - /** - * @return JMX authentication method's parameter. - */ - public String getJmxAuthorizationParameter() { - return jmxAuthorizationParameter; - } - - /** - * @param jmxAuthorizationParameter JMX authentication method's parameter. - */ - public void setJmxAuthorizationParameter(String jmxAuthorizationParameter) { - this.jmxAuthorizationParameter = jmxAuthorizationParameter; - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/xml/Discovery.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/xml/Discovery.java deleted file mode 100644 index 60511192830a3a6b29cf6bf3e6154e9759f40f7b..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/xml/Discovery.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.clusterd.xml; - -import org.ow2.jonas.deployment.common.xml.AbsElement; - -public class Discovery extends AbsElement { - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** - * File name for JGroups discovery stack - */ - - private String discoveryStackFile = null; - - /** - * JGroups discovery will be connected to this group. - */ - private String discoveryGroupName = null; - - /** - * Set to true to start JGroups discovery. - */ - private boolean startDiscovery = false; - - /** - * @return the discoveryStackFile - */ - public String getDiscoveryStackFile() { - return discoveryStackFile; - } - - /** - * @param discoveryStackFile the discoveryStackFile to set - */ - public void setDiscoveryStackFile(final String discoveryStackFile) { - this.discoveryStackFile = discoveryStackFile; - } - - /** - * @return the discoveryGroupName - */ - public String getDiscoveryGroupName() { - return discoveryGroupName; - } - - /** - * @param discoveryGroupName the discoveryGroupName to set - */ - public void setDiscoveryGroupName(final String discoveryGroupName) { - this.discoveryGroupName = discoveryGroupName; - } - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - @Override - public String toXML(final int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - sb.append(xmlElement(this.getDiscoveryGroupName(), "group-name", indent + 2)); - sb.append(xmlElement(this.getDiscoveryStackFile(), "stack-file", indent + 2)); - sb.append(xmlElement(String.valueOf(this.getStartDiscovery()), "start-up", indent + 2)); - sb.append(indent(indent)); - sb.append("\n"); - return sb.toString(); - } - - /** - * @return the startDiscovery - */ - public boolean getStartDiscovery() { - return startDiscovery; - } - - /** - * @param startDiscovery the startDiscovery to set - */ - public void setStartDiscovery(final String startDiscovery) { - this.startDiscovery = new Boolean(startDiscovery); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/xml/Server.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/xml/Server.java deleted file mode 100644 index d1d5feca78ca88b498fdac7293b99f5440f5852f..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/clusterd/xml/Server.java +++ /dev/null @@ -1,264 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.clusterd.xml; - -import org.ow2.jonas.deployment.common.xml.AbsElement; - -/** - * - * Server element - * @author pelletib - */ -public class Server extends AbsElement { - - /** - * Version UID - */ - private static final long serialVersionUID = -7044912860997997046L; - - /** - * JOnAS instance name - */ - private String name = null; - - /** - * description - */ - private String description = null; - - /** - * JAVA_HOME directory - */ - private String javaHome = null; - - /** - * JONAS_ROOT directory - */ - private String jonasRoot = null; - - /** - * JONAS_BASE directory - */ - private String jonasBase = null; - - /** - * Extra parameters for starting the JVM - */ - private String xprm = null; - - /** - * Automatic boot - */ - private String autoBoot = null; - - /** - * User command for controlling JOnAS (optional) - * If not set, use the JOnAS one - */ - private String jonasCmd = null; - - - /** - * Constructor - */ - public Server() { - super(); - } - - /** - * @return Returns the name. - */ - public String getName() { - return name; - } - - /** - * @param name The name to set. - */ - public void setName(String name) { - this.name = name; - } - - /** - * @return Returns the JAVA_HOME dir. - */ - public String getJavaHome() { - return javaHome; - } - - /** - * @param javaHome The JAVA_HOME to set. - */ - public void setJavaHome(String javaHome) { - this.javaHome = javaHome; - } - - /** - * @return Returns the JONAS_ROOT. - */ - public String getJonasRoot() { - return jonasRoot; - } - - /** - * @param jonasRoot The JONAS_ROOT to set. - */ - public void setJonasRoot(String jonasRoot) { - this.jonasRoot = jonasRoot; - } - - /** - * @return Returns the JONAS_BASE. - */ - public String getJonasBase() { - return jonasBase; - } - - /** - * @param jonasBase The JONAS_BASE to set. - */ - public void setJonasBase(String jonasBase) { - this.jonasBase = jonasBase; - } - - /** - * @return Returns the description. - */ - public String getDescription() { - return description; - } - - /** - * @param description The description to set. - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // name - if (name != null) { - sb.append(xmlElement(name, "name", indent)); - } - // description - if (getDescription() != null) { - sb.append(xmlElement(getDescription(), "description", indent)); - } - // javaHome - if (getJavaHome() != null) { - sb.append(xmlElement(getJavaHome(), "java-home", indent)); - } - // jonasRoot - if (getJonasRoot() != null) { - sb.append(xmlElement(getJonasRoot(), "jonas-root", indent)); - } - // jonasBase - if (getJonasBase() != null) { - sb.append(xmlElement(getJonasBase(), "jonas-base", indent)); - } - - // xprm - if (getXprm() != null) { - sb.append(xmlElement(getXprm(), "xprm", indent)); - } - - // autoBoot - sb.append(xmlElement(new Boolean(isAutoBoot()).toString(), "auto-boot", indent)); - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } - - /** - * Set the auto boot for the server - * @param autoBoot true if automatic boot is set - */ - public void setAutoBoot(String autoBoot) { - this.autoBoot = autoBoot; - } - - /** - * @return true/false - */ - public String getAutoBoot() { - return this.autoBoot; - } - - /** - * - * @return true if the auto boot is set - */ - public boolean isAutoBoot() { - return new Boolean(getAutoBoot()).booleanValue(); - } - - - /** - * - * @return the extra parameters - */ - public String getXprm() { - return xprm; - } - - /** - * Set the extra parameters - * @param xprm extra parameters - */ - public void setXprm(String xprm) { - this.xprm = xprm; - } - - /** - * - * @return JOnAS command - */ - public String getJonasCmd() { - return jonasCmd; - } - - /** - * Set the JOnAS command - * @param jonasCmd user command - */ - public void setJonasCmd(String jonasCmd) { - this.jonasCmd = jonasCmd; - } -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/AbsDeploymentDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/AbsDeploymentDesc.java deleted file mode 100644 index 6e2dba98e802ae07827b33a84d61bd3b4e144115..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/AbsDeploymentDesc.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Ludovic BERT & Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.deployment.common; - -// SAX imports -import org.ow2.jonas.deployment.api.IDeploymentDesc; -import org.xml.sax.SAXParseException; - - -/** - * This class provides an abstract implementation of the - * DeploymentDescriptor interface of JOnAS - * @author Ludovic Bert - * @author Florent Benoit - */ - -public abstract class AbsDeploymentDesc implements IDeploymentDesc { - - - /** - * The displayName field - */ - protected String displayName = null; - - - /** - * Get the display name of the deployment descriptor. - * @return the display name of the deployment descriptor. - */ - public String getDisplayName() { - return displayName; - } - - /** - * Return a String representation of the DeploymentDesc. - * @return a String representation of the DeploymentDesc. - */ - public abstract String toString(); - - /** - * build a message from SAX Exception in a consistent style, consistent - * with emacs compile mode (same as grep, cc, javac, etc). - * @param fileName name of the file - * @param exception the SAX exception - * @param msg the string message - * @return a message which is in a consistent style - */ - protected static String getSAXMsg(String fileName, - SAXParseException exception, String msg) { - String ret = fileName + ":" + exception.getLineNumber() + ":" - + exception.getColumnNumber() + ": "; - ret += msg; - return ret; - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/CommonsDTDs.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/CommonsDTDs.java deleted file mode 100644 index d67ee6071e7f013a33ca3f58cf73475ba446f53c..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/CommonsDTDs.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common; - -import java.net.URL; -import java.util.HashMap; -import java.util.Map; - -import org.ow2.jonas.deployment.api.DTDs; - - -/** - * This class defines the declarations of defaults DTDs used for J2EE 1.4 and less - * @author Florent Benoit - */ -public abstract class CommonsDTDs implements DTDs { - - /** - * Commons DTDs location. - */ - private static final String PACKAGE = "org/ow2/jonas/deployment/"; - - /** - * List of default dtds. - */ - private static final String[] DEFAULT_DTDS = new String[] { - PACKAGE + "XMLSchema.dtd", - PACKAGE + "datatypes.dtd" - }; - - /** - * List of default publicId. - */ - private static final String[] DEFAULT_DTDS_PUBLIC_ID = new String[] { - "-//W3C//DTD XMLSCHEMA 200102//EN", - "datatypes" - }; - - - /** - * Map where mapping publicId/dtds are stored. - */ - private static HashMap dtdsMapping = null; - - /** - * Build a new object for DTDs handling. - */ - public CommonsDTDs() { - dtdsMapping = new HashMap(); - addMapping(DEFAULT_DTDS, DEFAULT_DTDS_PUBLIC_ID); - } - - /** - * Gets the mapping between publicIds and DTDs. - * @return the mapping between publicIds and DTDs. - */ - public Map getMapping() { - return dtdsMapping; - } - - - - /** - * Add to the list of DTDS the given dtds/publicId. - * @param dtds array of dtds - * @param publicIds array of publicIds - */ - protected void addMapping(String[] dtds, String[] publicIds) { - if (dtds.length != publicIds.length) { - throw new IllegalStateException("SEVERE ERROR !!! Number of dtds is different of the number of PublicId !!! check the source code"); - } - - URL url = null; - for (int i = 0; i < dtds.length; i++) { - url = CommonsDTDs.class.getResource("/" + dtds[i]); - if (url == null) { - throw new IllegalStateException("'" + dtds[i] + "' was not found in the current classloader !"); - } - dtdsMapping.put(publicIds[i], url.toString()); - } - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/CommonsSchemas.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/CommonsSchemas.java deleted file mode 100644 index 79099e062142780d57cce90dd6719d62cbf18fb8..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/CommonsSchemas.java +++ /dev/null @@ -1,157 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common; - - -import java.net.URL; -import java.util.ArrayList; -import java.util.List; - -import org.ow2.jonas.deployment.api.Schemas; - - -/** - * This class defines the declarations of the default Java EE 5 Schemas. - * @author Florent Benoit - */ -public abstract class CommonsSchemas implements Schemas { - - /** - * Commons XML Schemas location. - */ - private static final String PACKAGE = "org/ow2/jonas/deployment/"; - - /** - * List of schemas used by components. - */ - private static final String[] DEFAULT_SCHEMAS = new String[] { - PACKAGE + "javaee_6.xsd", - PACKAGE + "javaee_web_services_client_1_3.xsd", - PACKAGE + "javaee_5.xsd", - PACKAGE + "javaee_web_services_client_1_2.xsd", - PACKAGE + "j2ee_1_4.xsd", - PACKAGE + "j2ee_web_services_client_1_1.xsd", - PACKAGE + "xml.xsd", - PACKAGE + "jonas_j2ee_4_0.xsd", - PACKAGE + "jonas_j2ee_4_1.xsd", - PACKAGE + "jonas_j2ee_4_1_2.xsd", - PACKAGE + "jonas_j2ee_4_1_4.xsd", - PACKAGE + "jonas_j2ee_4_2.xsd" - }; - - - /** - * List where the local schemas URLs are stored. - */ - private static List localSchemas = null; - - - /** - * Build a new object for Schemas handling. - */ - public CommonsSchemas() { - localSchemas = new ArrayList(); - addSchemas(DEFAULT_SCHEMAS); - } - - /** - * Gets the URLs of the local schemas. - * @return the URLs of the local schemas - */ - public List getlocalSchemas() { - return localSchemas; - } - - - /** - * Add to our repository the given local schemas. - * @param schemas schemas to add to the repository - * @throws IllegalStateException if the dtds is not found as resource - */ - protected static void addSchemas(final String[] schemas) throws IllegalStateException { - URL url = null; - for (int i = 0; i < schemas.length; i++) { - url = CommonsSchemas.class.getResource("/" + schemas[i]); - if (url == null) { - throw new IllegalStateException("'" + schemas[i] + "' was not found in the current classloader !"); - } - localSchemas.add(url.toString()); - } - } - - /** - * @param element name of the root element (jonas-ejb-jar, ...) - * @param schema XML Schema - * @return a header for the right element with last element - */ - public static String getHeaderForElement(final String element, final String schema) { - StringBuffer header = new StringBuffer(); - header.append("\n"); - header.append("<"); - header.append(element); - header.append(" xmlns=\"http://www.objectweb.org/jonas/ns\"\n"); - header.append(" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"); - header.append(" xsi:schemaLocation=\"http://www.objectweb.org/jonas/ns\n"); - header.append(" http://jonas.ow2.org/ns/"); - // add the schema - header.append(schema); - header.append("\" >\n"); - - return header.toString(); - } - - /** - * @param element name of the root element (jonas-ejb-jar, ...) - * @param schema XML Schema - * @return a header for the right element with last element - */ - public static String getHeaderForStandardElement(final String element, final String schema) { - StringBuffer header = new StringBuffer(); - header.append("\n"); - header.append("<"); - header.append(element); - header.append(" xmlns=\"http://java.sun.com/xml/ns/javaee\"\n"); - header.append(" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"); - header.append(" version=\"5\"\n"); - header.append(" xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee\n"); - header.append(" http://java.sun.com/xml/ns/javaee/"); - // add the schema - header.append(schema); - header.append("\" >\n"); - - return header.toString(); - } - - /** - * @param schemas array of schema locations - * @param packageName package name to remove from schema location. - * @return Returns the last Schema for a given set of schemas. - */ - protected static String getLastSchema(final String[] schemas, final String packageName) { - String schema = schemas[schemas.length - 1]; - return schema.substring(packageName.length()); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/DeploymentDescException.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/DeploymentDescException.java deleted file mode 100644 index 05a66a70136ea4c765aac22203e7e081ee744d5e..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/DeploymentDescException.java +++ /dev/null @@ -1,154 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): ____________________________________. - * Contributor(s): Lutris Technologies Inc http://www.lutris.com - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- -*/ - - -package org.ow2.jonas.deployment.common; - -import java.io.PrintStream; -import java.io.PrintWriter; - -/** - * The DeploymentDesc exception uses the pattern defined by the Enhydra - * com.lutris.util.ChainedException - * The source has been temporary duplicated to prevent Jonas using - * from external dependencies. - * @author Christophe Ney - */ -public class DeploymentDescException extends Exception { - - /** - * Cause of the exception - */ - private Throwable cause; - - /** - * Construct an exception without anything - */ - public DeploymentDescException() { - super(); - cause = null; - } - - - /** - * Construct an exception without a specified cause. - * - * @param msg The message associated with the exception. - */ - public DeploymentDescException(String msg) { - super(msg); - cause = null; - } - - /** - * Construct an exception with an associated causing exception. - * - * @param msg The message associated with the exception. - * @param cause The error or exception that cause this - * exception. - */ - public DeploymentDescException(String msg, - Throwable cause) { - super(msg); - this.cause = cause; - } - - /** - * Construct an exception from a causing exception. - * - * @param cause The error or exception that cause this - * exception. The message will be take be this object's - * messasge. - */ - public DeploymentDescException(Throwable cause) { - super(cause.getMessage()); - this.cause = cause; - } - - /** - * @return the message associated with this exception. If causes - * are included, they will be appended to the message. - */ - public String getMessage() { - String msg = super.getMessage(); - if (cause == null) { - return msg; - } else { - return msg + ": " + cause.getMessage(); - } - } - - /** - * Gets the causing exception associated with this exception. - * @return The causing exception or null if no cause is specified. - */ - public Throwable getCause() { - return cause; - } - - /** - * Prints this DeploymentDescException and its backtrace, and the causes - * and their stack traces to the standard error stream. - */ - public void printStackTrace() { - super.printStackTrace(); - if (cause != null) { - System.err.println(); - System.err.println("*** Caused by:"); - cause.printStackTrace(); - } - } - - /** - * Prints this DeploymentDescException and its backtrace, and the causes - * and their stack traces to the e specified print stream. - * @param s print the trace on a specific print stream - */ - public void printStackTrace(PrintStream s) { - super.printStackTrace(s); - if (cause != null) { - s.println(); - s.println ("*** Caused by:"); - cause.printStackTrace(s); - } - } - - /** - * Prints this DeploymentDescException and its backtrace, and the causes - * and their stack traces to the e specified print writer. - * @param s print the trace on a specific print stream - */ - public void printStackTrace(PrintWriter s) { - super.printStackTrace(s); - if (cause != null) { - s.println(); - s.println("*** Caused by:"); - cause.printStackTrace(s); - } - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/DescriptionGroupDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/DescriptionGroupDesc.java deleted file mode 100644 index caede2cab8728b1b7b21415ce6a19366d0c0ef64..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/DescriptionGroupDesc.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Philippe Coq - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.deployment.common; - -// SAX imports -import org.ow2.jonas.deployment.api.IDescriptionGroupDesc; -import org.xml.sax.SAXParseException; - - -/** - * This class is used to keep the usage of the contained description related - * elements consistent acoross J2EE deployment descriptors. - * Elements are "description", "display-name", "icon" - * used by application, connector, ejb-jar, webservices. - * - * @author Philippe Coq - * - */ - -public abstract class DescriptionGroupDesc implements IDescriptionGroupDesc { - - /** - * The description field - */ - protected String description = null; - - /** - * The displayName field - */ - protected String displayName = null; - - /** - * The small-icon field - */ - protected String smallIcon = null; - - /** - * The large-icon field - */ - protected String largeIcon = null; - - /** - * Get the display name of the deployment descriptor. - * @return the display name of the deployment descriptor. - */ - public String getDisplayName() { - return displayName; - } - - /** - * Get the description of the deployment descriptor. - * @return the description of the deployment descriptor. - */ - public String getDescription() { - return description; - } - - /** - * Get the small-icon of the deployment descriptor. - * @return the small-icon of the deployment descriptor. - */ - public String getSmallIcon() { - return smallIcon; - } - - /** - * Get the large-icon of the deployment descriptor. - * @return the large-icon of the deployment descriptor. - */ - public String getLargeIcon() { - return largeIcon; - } - - /** - * Return a String representation of the DeploymentDesc. - * @return a String representation of the DeploymentDesc. - */ - public abstract String toString(); - - /** - * build a message from SAX Exception in a consistent style, consistent - * with emacs compile mode (same as grep, cc, javac, etc). - * @param fileName name of the file - * @param exception the SAX exception - * @param msg the string message - * @return a message which is in a consistent style - */ - protected static String getSAXMsg(String fileName, - SAXParseException exception, String msg) { - String ret = fileName + ":" + exception.getLineNumber() + ":" - + exception.getColumnNumber() + ": "; - ret += msg; - return ret; - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/EjbLocalRefDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/EjbLocalRefDesc.java deleted file mode 100644 index 2582347932916d9b52907f9287d94ac721c47937..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/EjbLocalRefDesc.java +++ /dev/null @@ -1,160 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Christophe Ney - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common; - -import org.ow2.jonas.deployment.api.IEJBLocalRefDesc; -import org.ow2.jonas.deployment.common.xml.EjbLocalRef; - - -/** - * This class represents the description of an EjblocalRef object - * @author Christophe Ney - * @author Florent Benoit - */ -public class EjbLocalRefDesc implements IEJBLocalRefDesc { - - /** - * The ejb local ref name. - */ - private String ejbRefName = null; - - /** - * The type of the ejb ref - */ - private String ejbRefType = null; - - /** - * The local home of the ejb local ref. - */ - private String localHome = null; - - /** - * The local interface name of the ejb local ref. - */ - private String local = null; - - /** - * The ejb link of the ejb local ref. - */ - private String ejbLink = null; - - /** - * The jndi name of the ejb local ref. - */ - private String jndiName = null; - - - /** - * Construct a descriptor for an ejb-local-ref tag. - * @param ejbLocalRef the ejb local ref resulting of the xml parsing. - * @throws DeploymentDescException when missing information for - * creating the EjbLocalRefDesc. - */ - public EjbLocalRefDesc(EjbLocalRef ejbLocalRef) throws DeploymentDescException { - ejbRefName = ejbLocalRef.getEjbRefName(); - ejbRefType = ejbLocalRef.getEjbRefType(); - localHome = ejbLocalRef.getLocalHome(); - local = ejbLocalRef.getLocal(); - if (ejbLocalRef.getEjbLink() == null) { - String err = "ejb-link missing for ejb-local-ref '" + ejbRefName + "'."; - throw new DeploymentDescException(err); - } - ejbLink = ejbLocalRef.getEjbLink(); - } - - /** - * Get the name of the ejb-ref - * @return String representation of the ejb-ref-name. - */ - public String getEjbRefName() { - return ejbRefName; - } - - /** - * Get the ejb-ref-type. - * @return String representation of the ejb-ref-type. - */ - public String getEjbRefType() { - return ejbRefType; - } - - /** - * Get the LocalHome class of the target bean - * @return String representation of the class. - */ - public String getLocalHome() { - return localHome; - } - - /** - * Get the Local class of the target bean - * @return String representation of the class. - */ - public String getLocal() { - return local; - } - - /** - * Get the ejb-link - * @return String representation of the ejb-link - */ - public String getEjbLink() { - return ejbLink; - } - - /** - * Get the jndi name of the ejb-local-ref. - * @return the string representation of the JNDI name - */ - public String getJndiLocalName() { - return jndiName; - } - - /** - * Set the jndi name of the ejb-local-ref. - * @param jndiName the string representation of the jndi name. - */ - public void setJndiLocalName(String jndiName) { - this.jndiName = jndiName; - } - - /** - * String representation of the object for test purpose - * @return String representation of this object - */ - public String toString() { - StringBuffer ret = new StringBuffer(); - ret.append("\ngetEjbRefName()=" + getEjbRefName()); - ret.append("\ngetEjbRefType()=" + getEjbRefType()); - ret.append("\ngetLocalHome()=" + getLocalHome()); - ret.append("\ngetLocal()=" + getLocal()); - ret.append("\ngetEjbLink()=" + getEjbLink()); - ret.append("\ngetJndiLocalName()=" + getJndiLocalName()); - return ret.toString(); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/EjbRefDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/EjbRefDesc.java deleted file mode 100644 index 49d143368980ddb5cdd1880a190267cf983ef2a3..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/EjbRefDesc.java +++ /dev/null @@ -1,138 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common; - -import org.ow2.jonas.deployment.api.IEJBRefDesc; -import org.ow2.jonas.deployment.common.xml.EjbRef; -import org.ow2.jonas.deployment.common.xml.JonasEjbRef; - - -/** - * This class represents the description of an EjbRef object - * @author Christophe Ney - * @author Florent Benoit - */ -public class EjbRefDesc implements IEJBRefDesc { - - /** - * The ejb ref name. - */ - private String ejbRefName = null; - - /** - * The type of the ejb ref - */ - private String ejbRefType = null; - - /** - * Fully qualified name of the enterprise bean's home interface - */ - private String home = null; - - /** - * Fully qualified name of the enterprise bean's remote interface - */ - private String remote = null; - - /** - * The ejb link of the ejb local ref. - */ - private String ejbLink = null; - - /** - * The jndi name of the ejb local ref. - */ - private String jndiName = null; - - - /** - * Construct a descriptor for an ejb-ref tag. - * @param ejbRef the ejb ref resulting of the xml parsing. - * @param jonasEjbRef the jonas ejb ref resulting of the xml parsing. - */ - public EjbRefDesc(EjbRef ejbRef, JonasEjbRef jonasEjbRef) { - ejbRefName = ejbRef.getEjbRefName(); - ejbRefType = ejbRef.getEjbRefType(); - ejbLink = null; - if (ejbRef.getEjbLink() != null) { - ejbLink = ejbRef.getEjbLink(); - } - jndiName = null; - if (jonasEjbRef != null) { - jndiName = jonasEjbRef.getJndiName(); - } - this.home = ejbRef.getHome(); - this.remote = ejbRef.getRemote(); - - } - - public String getEjbRefName() { - return ejbRefName; - } - - public String getEjbRefType() { - return ejbRefType; - } - - public String getEjbLink() { - return ejbLink; - } - - - public String getJndiName() { - return jndiName; - } - - /** - * Set the jndi name of the ejb-ref. - * @param jndiName representation of the JNDI name - */ - public void setJndiName(String jndiName) { - this.jndiName = jndiName; - } - - - /** - * String representation of the object for test purpose - * @return String representation of this object - */ - public String toString() { - StringBuffer ret = new StringBuffer(); - ret.append("\ngetEjbRefName()=" + getEjbRefName()); - ret.append("\ngetEjbRefType()=" + getEjbRefType()); - ret.append("\ngetEjbLink()=" + getEjbLink()); - ret.append("\ngetJndiName()=" + getJndiName()); - return ret.toString(); - } - - public String getHome() { - return home; - } - - public String getRemote() { - return remote; - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/EnvEntryDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/EnvEntryDesc.java deleted file mode 100644 index 4b31dab3a845f934b57c5b5a3e809f4be4a0ff08..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/EnvEntryDesc.java +++ /dev/null @@ -1,187 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Christophe Ney - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common; - -import org.ow2.jonas.deployment.api.IEnvEntryDesc; -import org.ow2.jonas.deployment.common.xml.EnvEntry; - - -/** - * This class represents the description of an EnvEntry object - * @author Christophe Ney - * @author Florent Benoit - */ -public class EnvEntryDesc implements IEnvEntryDesc { - - /** - * The env entry name. - */ - private String name; - - /** - * The env entry type. - */ - private Class type; - - /** - * The env entry value. - */ - private Object value; - - /** - * Construct a descriptor for an env-entry tag. - * @param env the env-entry resulting of the xml parsing. - * @throws DeploymentDescException when missing information for - * creating the EnvEntryDesc. - */ - public EnvEntryDesc(EnvEntry env) throws DeploymentDescException { - name = env.getEnvEntryName(); - String t = env.getEnvEntryType(); - String v = null; - if (env.getEnvEntryValue() != null) { - v = env.getEnvEntryValue(); - } - try { - if (t.equals(Boolean.class.getName())) { - type = Boolean.class; - if (v != null) { - if (v.equalsIgnoreCase("true")) { - value = Boolean.TRUE; - } else if (v.equalsIgnoreCase("false")) { - value = Boolean.FALSE; - } else { - throw new DeploymentDescException(v + " is not a valid value for env-entry " + name); - } - } else { - value = Boolean.FALSE; - } - - } else if (t.equals(String.class.getName())) { - type = String.class; - if (v != null) { - value = v; - } else { - value = new String(); - } - } else if (t.equals(Integer.class.getName())) { - type = Integer.class; - if (v != null) { - value = new Integer(v); - } else { - value = new Integer(0); - } - } else if (t.equals(Character.class.getName())) { - type = Character.class; - if (v != null) { - if (v.length() != 1) { - throw new DeploymentDescException("The value '" + v + "' is not a valid value for env-entry of type java.lang.Character."); - } - value = new Character(v.charAt(0)); - } else { - value = new Character("".charAt(0)); - } - } else if (t.equals(Double.class.getName())) { - type = Double.class; - if (v != null) { - value = new Double(v); - } else { - value = new Double(0); - } - } else if (t.equals(Byte.class.getName())) { - type = Byte.class; - if (v != null) { - value = new Byte(v); - } else { - value = new Byte(""); - } - } else if (t.equals(Short.class.getName())) { - type = Short.class; - if (v != null) { - value = new Short(v); - } else { - value = new Short(""); - } - } else if (t.equals(Long.class.getName())) { - type = Long.class; - if (v != null) { - value = new Long(v); - } else { - value = new Long(0); - } - } else if (t.equals(Float.class.getName())) { - type = Float.class; - if (v != null) { - value = new Float(v); - } else { - value = new Float(0); - } - } else { - throw new DeploymentDescException(t + " is not a valid type for env-entry " + name); - } - } catch (NumberFormatException e) { - throw new DeploymentDescException(v + " is not a valid value for env-entry " + name, e); - } - - } - - public String getName() { - return name; - } - - public Class getType() { - return type; - } - - public boolean hasValue() { - return value != null; - } - - public Object getValue() { - // An env-entry value is optional, so no error should be thrown - /* - * if (value == null) { - * throw new Error("Value not set for env-entry " + name); - * } - */ - return value; - } - - /** - * String representation of the object for test purpose - * @return String representation of this object - */ - public String toString() { - StringBuffer ret = new StringBuffer(); - ret.append("\ngetName()=" + getName()); - ret.append("\ngetType()=" + getType()); - if (hasValue()) { - ret.append("\ngetValue()=" + getValue().toString()); - } - return ret.toString(); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/HandlerDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/HandlerDesc.java deleted file mode 100644 index 6e539e96c435fab3f6559ecd08fc29876487e5c3..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/HandlerDesc.java +++ /dev/null @@ -1,271 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial Developer : Delplanque Xavier & Sauthier Guillaume - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- -*/ - -package org.ow2.jonas.deployment.common; - -import java.util.List; -import java.util.Properties; -import java.util.Vector; - -import javax.xml.namespace.QName; - -import org.ow2.jonas.deployment.common.xml.Handler; -import org.ow2.jonas.deployment.common.xml.InitParam; - - - -/** - * The Handler class describe both - * - a Handler reference to use on the client side of a Web Service, - * - and a Handler description. - * The difference is that the port-names attribute is present for a handler reference, - * and the port-names attribute does not exist for a handler description. - * - * @author Guillaume Sauthier - * @author Xavier Delplanque - * @author Helene Joanin - */ -public class HandlerDesc { - - /** The name of the handler (must be unique) */ - private String name; - - /** The classname of the Handler */ - private String className; - - /** The handler class */ - private Class clazz; - - /** Params needed to initialize the handler */ - private Properties params = new Properties(); - - /** The list of SOAP Headers the handler will access */ - private List headers = new Vector(); - - /** The list of SOAP actor the handler will play as a role */ - private List roles = new Vector(); - - /** List of port names the handler is associated with */ - private List portNames = new Vector(); - - /** - * Creates a new HandlerRef object. - * - * @param classLoader ejbjar classLoader - * @param handler contains informations defined in web deployment - * descriptor (service-ref) - * - * @throws DeploymentDescException When Construction fails. - */ - public HandlerDesc(ClassLoader classLoader, Handler handler) - throws DeploymentDescException { - - name = handler.getHandlerName(); - - className = handler.getHandlerClass(); - - try { - clazz = classLoader.loadClass(className); - } catch (ClassNotFoundException e) { - throw new DeploymentDescException("handler class not found", e); - } - - // fill init params table - List iparams = handler.getInitParamList(); - try { - for (int i = 0; i < iparams.size(); i++) { - // add in params table each init parameter name and associated value - InitParam p = (InitParam) iparams.get(i); - - if (p != null) { - params.put(p.getParamName(), p.getParamValue()); - } - } - } catch (NullPointerException e) { - throw new DeploymentDescException("parameter name missing", e); - } - - // fill headers a list containing soap header QNames - List shl = handler.getSoapHeaderList(); - for (int i = 0; i < shl.size(); i++) { - // build qnames and add it in the table - org.ow2.jonas.deployment.common.xml.Qname sh = (org.ow2.jonas.deployment.common.xml.Qname) shl.get(i); - - if (sh != null) { - QName qn = sh.getQName(); - headers.add(qn); - } - } - - // fill roles a list containing soap role names - List srl = handler.getSoapRoleList(); - for (int i = 0; i < srl.size(); i++) { - String role = (String) srl.get(i); - if (role != null) { - roles.add(role); - } - } - - // fill portNames a list containing ports names - List pnl = handler.getPortNameList(); - for (int i = 0; i < pnl.size(); i++) { - String pn = (String) pnl.get(i); - if (pn != null) { - portNames.add(pn); - } - } - } - - /** - * Return the name of the Handler. - * - * @return the name of the Handler. - */ - public String getName() { - return name; - } - - - /** - * Return the name of class of the Handler. - * - * @return the name of class of the Handler. - */ - public String getHandlerClassName() { - return className; - } - - /** - * Return the Handler implementation class. - * - * @return the Handler class - */ - public Class getHandlerClass() { - return clazz; - } - - /** - * Return all the init-params of the Handler. - * - * @return the init-params of the Handler - */ - public Properties getInitParams() { - return params; - } - - /** - * Return the value of an init-param. - * - * @param pname The key of init-param map. - * - * @return the value of an init-param - */ - public String getInitParam(String pname) { - return params.getProperty(pname); - } - - /** - * Return the list of Headers the Handlers will access. - * - * @return the list of Headers the Handlers will access. - */ - public List getSOAPHeaders() { - return headers; - } - - /** - * Return the list of SOAP Actor Definitions the Handler will play as a - * role. - * - * @return the list of Role the Handler will play - */ - public List getSOAPRoles() { - return roles; - } - - /** - * Return the list of port name the Handler is associated with. The names - * match the localPart of the Port QName. - * - * @return the list of port name the Handler is associated with. - */ - public List getPortNames() { - return portNames; - } - - /** - * Test Equality between 2 Objects. - * - * @param other The object to compare. - * - * @return true if the objects are equals in value, else false. - */ - public boolean equals(Object other) { - if (other == null) { - return false; - } - if (!(other instanceof HandlerDesc)) { - return false; - } - HandlerDesc ref = (HandlerDesc) other; - if (!name.equals(ref.getName())) { - return false; - } - if (!clazz.getName().equals(ref.getHandlerClass().getName())) { - return false; - } - if (!params.equals(ref.getInitParams())) { - return false; - } - if (!headers.equals(ref.getSOAPHeaders())) { - return false; - } - if (!roles.equals(ref.getSOAPRoles())) { - return false; - } - if (!portNames.equals(ref.getPortNames())) { - return false; - } - // After all theses tests, the 2 objects are equals in value - return true; - } - - /** - * @return Returns a String representation of a HandlerDesc - */ - public String toString() { - StringBuffer sb = new StringBuffer(); - sb.append("\n" + getClass().getName()); - sb.append("\ngetName()=" + getName()); - sb.append("\ngetClassname()=" + getHandlerClassName()); - sb.append("\ngetSOAPRoles()=" + getSOAPRoles()); - sb.append("\ngetSOAPHeaders()=" + getSOAPHeaders()); - sb.append("\ngetInitParams()=" + getInitParams()); - sb.append("\ngetPortNames()=" + getPortNames()); - return sb.toString(); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/JndiEnvRefsGroupDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/JndiEnvRefsGroupDesc.java deleted file mode 100644 index 695d0b24f47c918e3dc4f985da48a12d5fcf7984..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/JndiEnvRefsGroupDesc.java +++ /dev/null @@ -1,555 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Philippe Coq - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.Vector; - -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; -import org.ow2.jonas.deployment.api.IEnvEntryDesc; -import org.ow2.jonas.deployment.api.IJNDIEnvRefsGroupDesc; -import org.ow2.jonas.deployment.api.IPersistenceUnitRefDesc; -import org.ow2.jonas.deployment.api.IResourceEnvRefDesc; -import org.ow2.jonas.deployment.api.IResourceRefDesc; -import org.ow2.jonas.deployment.api.IServiceRefDesc; -import org.ow2.jonas.deployment.common.xml.EjbLocalRef; -import org.ow2.jonas.deployment.common.xml.EjbRef; -import org.ow2.jonas.deployment.common.xml.EnvEntry; -import org.ow2.jonas.deployment.common.xml.JndiEnvRefsGroupXml; -import org.ow2.jonas.deployment.common.xml.JonasEjbRef; -import org.ow2.jonas.deployment.common.xml.JonasJndiEnvRefsGroupXml; -import org.ow2.jonas.deployment.common.xml.JonasMessageDestinationRef; -import org.ow2.jonas.deployment.common.xml.JonasResource; -import org.ow2.jonas.deployment.common.xml.JonasResourceEnv; -import org.ow2.jonas.deployment.common.xml.JonasServiceRef; -import org.ow2.jonas.deployment.common.xml.MessageDestinationRef; -import org.ow2.jonas.deployment.common.xml.PersistenceUnitRef; -import org.ow2.jonas.deployment.common.xml.ResourceEnvRef; -import org.ow2.jonas.deployment.common.xml.ResourceRef; -import org.ow2.jonas.deployment.common.xml.ServiceRef; -import org.ow2.jonas.deployment.ws.ServiceRefDesc; -import org.ow2.jonas.deployment.ws.WSDeploymentDescException; -import org.ow2.jonas.lib.util.Log; -import org.ow2.util.ee.metadata.common.api.enc.IENCBindingHolder; -/** - * This class is used to keep the usage of containedJNDI environment - * regerence elements consistent across J2EE deployment descriptors - * Elements are "env-entry", "ejb-ref", "ejb-local-ref", "resource-ref", - * "resource-env-ref, "service-ref", "message-destination-ref" - * This class extends DescriptionGroupDesc and give access to elements - * "description", "display-name", "icon" - * used by entity, session, message-driven-bean, web-app, clientApp - * - * @author Philippe Coq - * - */ - -public abstract class JndiEnvRefsGroupDesc extends DescriptionGroupDesc implements IJNDIEnvRefsGroupDesc { - - /** - * List of resource env ref Descriptors. - */ - private Vector resourceEnvRefs = new Vector(); - - /** - * List of resource ref Descriptors.. - */ - private Vector resourceRefs = new Vector(); - - /** - * List of env-entry Descriptors. - */ - private Vector envEntries = new Vector(); - - /** - * List of service-ref Descriptors. - */ - private Vector serviceRefs = new Vector(); - - /** - * List of EJB ref Descriptors.. - */ - private Vector ejbRefs = new Vector(); - - /** - * List of local EJB ref Descriptors.. - */ - private Vector ejbLocalRefs = new Vector(); - - /** - * List of message destination ref Descriptors.. - */ - private Vector messageDestinationRefs = new Vector(); - - /** - * List of persistence-unit-ref elements. - */ - private Vector persistenceUnitRefs = new Vector(); - /** - * Keeps some annotations processing data. - */ - private IENCBindingHolder encBindingHolder = null; - - /** - * logger - */ - protected static Logger logger = Log.getLogger(Log.JONAS_DEPLOY_PREFIX); - - /** - * Construct an instance of a JndiEnvRefsGroupDesc.
    - * - * @param classLoader the classloader for the deployed module. - * @param app the data structure of the J2EE application - * @param jonasApp the data structure of the jonas specific deployment - * descriptor - * @param fileName the file name of the module (useful only for service-ref) - * @throws DeploymentDescException if the deployment descriptors are - * corrupted. - */ - protected JndiEnvRefsGroupDesc(final ClassLoader classLoader, - final JndiEnvRefsGroupXml app, - final JonasJndiEnvRefsGroupXml jonasApp, - final String fileName) - throws DeploymentDescException { - - // test classloader - if (classLoader == null) { - throw new DeploymentDescException("Classloader is null"); - } - // display name - displayName = null; - if (app.getDisplayName() != null) { - displayName = app.getDisplayName(); - } - - // resource-env-ref - processResourceEnvRef(classLoader, app, jonasApp); - - // resource-ref - processResourceRef(classLoader, app, jonasApp); - - // env-entry - processEnvEntry(app); - - // ejb-ref - processEjbRef(app, jonasApp); - - // ejb-local-ref - processEjbLocalRef(app); - - // service-ref - processServiceRef(classLoader, app, jonasApp, fileName); - - // message-destination-ref - processMessageDestinationRef(app, jonasApp); - - // persistence-unit-ref - processPersistenceUnitRef(app); - - } - - /** - * @param app the data structure of the J2EE application - * @throws DeploymentDescException if the deployment descriptors are - * corrupted. - */ - private void processEnvEntry(final JndiEnvRefsGroupXml app) throws DeploymentDescException { - // env-entry - for (Iterator i = app.getEnvEntryList().iterator(); i.hasNext();) { - IEnvEntryDesc envEntryDesc = new EnvEntryDesc((EnvEntry) i.next()); - envEntries.addElement(envEntryDesc); - } - } - - /** - * @param app the data structure containing the value of Xml elements of a JndiEnvRefsGroup - * @throws DeploymentDescException if the deployment descriptors are - * corrupted. - */ - private void processPersistenceUnitRef(final JndiEnvRefsGroupXml app) throws DeploymentDescException { - for (Iterator i = app.getPersistenceUnitRefList().iterator(); i.hasNext();) { - IPersistenceUnitRefDesc persistenceUnitRefDesc = new PersistenceUnitRefDesc((PersistenceUnitRef) i.next()); - persistenceUnitRefs.addElement(persistenceUnitRefDesc); - } - } - - /** - * @param app the data structure of the J2EE application - * @param jonasApp the data structure of the jonas specific deployment - * descriptor - * @throws DeploymentDescException if the deployment descriptors are - * corrupted. - */ - private void processMessageDestinationRef(final JndiEnvRefsGroupXml app, final JonasJndiEnvRefsGroupXml jonasApp) throws DeploymentDescException { - List messageDestinationRefList = app.getMessageDestinationRefList(); - List jonasMessageDestinationRefList = jonasApp.getJonasMessageDestinationRefList(); - - - HashMap messageDestinationRef = new HashMap(); - for (Iterator i = jonasMessageDestinationRefList.iterator(); i.hasNext();) { - JonasMessageDestinationRef jonasMessageDestinationRef = (JonasMessageDestinationRef) i.next(); - String mdrName = jonasMessageDestinationRef.getMessageDestinationRefName(); - boolean findMDRef = false; - for (Iterator j = messageDestinationRefList.iterator(); j.hasNext() && !findMDRef;) { - MessageDestinationRef mdRef = (MessageDestinationRef) j.next(); - if (mdrName.equals(mdRef.getMessageDestinationRefName())) { - findMDRef = true; - } - } - if (!findMDRef) { - throw new DeploymentDescException("message-destination-ref missing for jonas-message-destination-ref " + mdrName); - } - messageDestinationRef.put(mdrName, jonasMessageDestinationRef); - } - for (Iterator i = messageDestinationRefList.iterator(); i.hasNext();) { - MessageDestinationRef mdRef = (MessageDestinationRef) i.next(); - String mdrName = mdRef.getMessageDestinationRefName(); - JonasMessageDestinationRef jonasMessageDestinationRef = (JonasMessageDestinationRef) messageDestinationRef.get(mdrName); - if (jonasMessageDestinationRef == null) { - // The message-destination-link must be specified when there is no jonas-message-destination-ref - if ((mdRef.getMessageDestinationLink() == null)) { - // Ignore the message-destination-link syntax "product.jar#ProductMD" - throw new DeploymentDescException("message-destination-link missing for message-destination-ref-name " + mdrName); - } } - messageDestinationRefs.addElement(new MessageDestinationRefDesc(mdRef, jonasMessageDestinationRef)); - } - } - - /** - * @param classLoader the classloader for the deployed module. - * @param app the data structure of the J2EE application - * @param jonasApp the data structure of the jonas specific deployment - * descriptor - * @param fileName the file name of the module (useful only for service-ref) - * @throws WSDeploymentDescException if the deployment descriptors are - * corrupted. - */ - private void processServiceRef(final ClassLoader classLoader, final JndiEnvRefsGroupXml app, final JonasJndiEnvRefsGroupXml jonasApp, final String fileName) throws WSDeploymentDescException { - Map links = linksSR2JSR(app, jonasApp); - List serviceRefList = app.getServiceRefList(); - for (Iterator i = serviceRefList.iterator(); i.hasNext();) { - ServiceRef serviceRef = ((ServiceRef) i.next()); - JonasServiceRef jsr = (JonasServiceRef) links.get(serviceRef.getServiceRefName()); - serviceRefs.addElement(new ServiceRefDesc(classLoader, serviceRef, jsr, fileName)); - } - } - - /** - * @param app the data structure of the J2EE application - * @throws DeploymentDescException if the deployment descriptors are - * corrupted. - */ - private void processEjbLocalRef(final JndiEnvRefsGroupXml app) throws DeploymentDescException { - List ejbLocalRefList = app.getEjbLocalRefList(); - for (Iterator i = ejbLocalRefList.iterator(); i.hasNext();) { - EjbLocalRef ejbLocalRef = (EjbLocalRef) i.next(); - if ((ejbLocalRef.getEjbLink() == null)) { - throw new DeploymentDescException("ejb-link missing for ejb-ref-name " + ejbLocalRef.getEjbRefName()); - } - ejbLocalRefs.addElement(new EjbLocalRefDesc(ejbLocalRef)); - } - } - - /** - * @param app the data structure of the J2EE application - * @param jonasApp the data structure of the jonas specific deployment - * descriptor - * @throws DeploymentDescException if the deployment descriptors are - * corrupted. - */ - private void processEjbRef(final JndiEnvRefsGroupXml app, final JonasJndiEnvRefsGroupXml jonasApp) throws DeploymentDescException { - List ejbRefList = app.getEjbRefList(); - List jonasEjbRefList = jonasApp.getJonasEjbRefList(); - - HashMap ejbRef = new HashMap(); - for (Iterator i = jonasEjbRefList.iterator(); i.hasNext();) { - JonasEjbRef jonasEjbRef = (JonasEjbRef) i.next(); - String brName = jonasEjbRef.getEjbRefName(); - boolean findBRef = false; - for (Iterator j = ejbRefList.iterator(); j.hasNext() && !findBRef;) { - EjbRef eRef = (EjbRef) j.next(); - if (brName.equals(eRef.getEjbRefName())) { - findBRef = true; - } - } - if (!findBRef) { - throw new DeploymentDescException("ejb-ref missing for jonas-ejb-ref " + brName); - } - ejbRef.put(brName, jonasEjbRef); - } - for (Iterator i = ejbRefList.iterator(); i.hasNext();) { - EjbRef eRef = (EjbRef) i.next(); - String brName = eRef.getEjbRefName(); - JonasEjbRef jonasEjbRef = (JonasEjbRef) ejbRef.get(brName); - if (jonasEjbRef == null) { - // The ejb-link must be specified when there is no jonas-ejb-ref - if ((eRef.getEjbLink() == null)) { - // Ignore the ejb-link syntax "product.jar#ProductEJB" - // throw new DeploymentDescException("ejb-link missing for ejb-ref-name " + brName); - // FIXME gaellalire : get ejb3 compatibility - logger.log(BasicLevel.DEBUG, "Maybe the ejb-link is missing for ejb-ref-name " + brName); - continue; - } - } - ejbRefs.addElement(new EjbRefDesc(eRef, jonasEjbRef)); - } - } - - /** - * @param classLoader the classloader for the deployed module. - * @param app the data structure of the J2EE application - * @param jonasApp the data structure of the jonas specific deployment - * descriptor - * @throws DeploymentDescException if the deployment descriptors are - * corrupted. - */ - private void processResourceRef(final ClassLoader classLoader, final JndiEnvRefsGroupXml app, final JonasJndiEnvRefsGroupXml jonasApp) throws DeploymentDescException { - List resourceRefList = app.getResourceRefList(); - List jonasResourceList = jonasApp.getJonasResourceList(); - HashMap resource = new HashMap(); - for (Iterator i = jonasResourceList.iterator(); i.hasNext();) { - JonasResource jonasResource = ((JonasResource) i.next()); - String rName = jonasResource.getResRefName(); - boolean findResRef = false; - for (Iterator j = resourceRefList.iterator(); j.hasNext() && !findResRef;) { - if (rName.equals(((ResourceRef) j.next()).getResRefName())) { - findResRef = true; - } - } - - if (!findResRef) { - throw new DeploymentDescException("resource-ref missing for jonas-resource " + rName); - } - resource.put(rName, jonasResource); - } - - for (Iterator i = resourceRefList.iterator(); i.hasNext();) { - ResourceRef resourceRef = ((ResourceRef) i.next()); - String rName = resourceRef.getResRefName(); - - // Handle some special cases - String jndiName = null; - if ("org.omg.CORBA.ORB".equals(resourceRef.getResType())) { - jndiName = "java:comp/ORB"; - } else if ("javax.transaction.UserTransaction".equals(resourceRef.getResType())) { - jndiName = "java:comp/UserTransaction"; - } - if (jndiName != null) { - JonasResource jonasResource = new JonasResource(); - jonasResource.setResRefName(rName); - jonasResource.setJndiName(jndiName); - jonasResourceList.add(jonasResource); - resource.put(rName, jonasResource); - resourceRef.setResAuth("Container"); - } - - if (!resource.containsKey(rName)) { - throw new DeploymentDescException("jonas-resource missing for res-ref-name " + rName); - } - resourceRefs.addElement(new ResourceRefDesc(classLoader, resourceRef, (JonasResource) resource.get(rName))); - } - } - - /** - * @param classLoader the classloader for the deployed module. - * @param app the data structure of the J2EE application - * @param jonasApp the data structure of the jonas specific deployment - * descriptor - * @throws DeploymentDescException if the deployment descriptors are - * corrupted. - */ - private void processResourceEnvRef(final ClassLoader classLoader, final JndiEnvRefsGroupXml app, final JonasJndiEnvRefsGroupXml jonasApp) throws DeploymentDescException { - List resourceEnvRefList = app.getResourceEnvRefList(); - List jonasResourceEnvList = jonasApp.getJonasResourceEnvList(); - HashMap resourceEnv = new HashMap(); - for (Iterator i = jonasResourceEnvList.iterator(); i.hasNext();) { - JonasResourceEnv jonasResourceEnv = (JonasResourceEnv) i.next(); - String rName = jonasResourceEnv.getResourceEnvRefName(); - boolean findResRef = false; - for (Iterator j = resourceEnvRefList.iterator(); j.hasNext() && !findResRef;) { - ResourceEnvRef resourceEnvRef = (ResourceEnvRef) j.next(); - if (rName.equals(resourceEnvRef.getResourceEnvRefName())) { - findResRef = true; - } - } - if (!findResRef) { - throw new DeploymentDescException("resource-env-ref missing for jonas-resource-env " + rName); - } - resourceEnv.put(rName, jonasResourceEnv); - } - for (Iterator i = resourceEnvRefList.iterator(); i.hasNext();) { - ResourceEnvRef resourceEnvRef = (ResourceEnvRef) i.next(); - String rName = resourceEnvRef.getResourceEnvRefName(); - if (!resourceEnv.containsKey(rName)) { - throw new DeploymentDescException("jonas-resource-env missing for resource-env-ref-name " + rName); - } - resourceEnvRefs.addElement(new ResourceEnvRefDesc(classLoader, resourceEnvRef, - (JonasResourceEnv) resourceEnv.get(rName))); - } - } - - /** - * @param app JndiEnvRefsGroupXml instance - * @param jonasApp linked JonasJndiEnvRefsGroupXml instance - * @return Returns a map associating the ServiceRef.name with the JonasServiceRef - */ - private Map linksSR2JSR(final JndiEnvRefsGroupXml app, final JonasJndiEnvRefsGroupXml jonasApp) { - Map res = new HashMap(); - // for each sr - for (Iterator i = app.getServiceRefList().iterator(); i.hasNext();) { - ServiceRef sr = (ServiceRef) i.next(); - res.put(sr.getServiceRefName(), null); - } - // jonas-.xml - if (jonasApp != null) { - - // get all ServiceRef.name - Set keys = res.keySet(); - - // for each jonas service ref - for (Iterator i = jonasApp.getJonasServiceRefList().iterator(); i.hasNext();) { - JonasServiceRef jsr = (JonasServiceRef) i.next(); - String srName = jsr.getServiceRefName(); - - if (keys.contains(srName)) { - // jonas-service-ref linked to service-ref - res.put(srName, jsr); - } else { - String err = "jonas-service-ref '" + srName + "' is not linked to any service-ref. It will be ignored."; //getI18n().getMessage("WSDeploymentDesc.wsdlDeclareUnknownPort", wsdlf.getName()); - logger.log(BasicLevel.WARN, err); - } - } - } - return res; - } - - /** - * Get resource environment references. - * - * @return array of resource environment reference descriptors - */ - public IResourceEnvRefDesc[] getResourceEnvRefDesc() { - IResourceEnvRefDesc[] ret = new IResourceEnvRefDesc[resourceEnvRefs.size()]; - resourceEnvRefs.copyInto(ret); - return ret; - } - - /** - * Get resource manager connection factory references. - * - * @return array of resource reference descriptors - */ - public IResourceRefDesc[] getResourceRefDesc() { - IResourceRefDesc[] ret = new ResourceRefDesc[resourceRefs.size()]; - resourceRefs.copyInto(ret); - return ret; - } - - /** - * Get environment entries. - * - * @return array of Env entries descriptors - */ - public IEnvEntryDesc[] getEnvEntryDesc() { - IEnvEntryDesc[] ret = new EnvEntryDesc[envEntries.size()]; - envEntries.copyInto(ret); - return ret; - } - - /** - * Get EJB references. - * - * @return array of EJB reference descriptors - */ - public EjbRefDesc[] getEjbRefDesc() { - EjbRefDesc[] ret = new EjbRefDesc[ejbRefs.size()]; - ejbRefs.copyInto(ret); - return ret; - } - - /** - * Get ejb local references. - * - * @return array of ejb local reference descriptors - */ - public EjbLocalRefDesc[] getEjbLocalRefDesc() { - EjbLocalRefDesc[] ret = new EjbLocalRefDesc[ejbLocalRefs.size()]; - ejbLocalRefs.copyInto(ret); - return ret; - } - - /** - * Get service references. - * - * @return array of service references descriptors - */ - public IServiceRefDesc[] getServiceRefDesc() { - IServiceRefDesc[] ret = new ServiceRefDesc[serviceRefs.size()]; - serviceRefs.copyInto(ret); - return ret; - } - - /** - * Get message-destination references. - * @return array of message-destination references descriptors - */ - public MessageDestinationRefDesc[] getMessageDestinationRefDesc() { - MessageDestinationRefDesc[] ret = new MessageDestinationRefDesc[messageDestinationRefs.size()]; - messageDestinationRefs.copyInto(ret); - return ret; - } - - /** - * @return the ENC Binding holder object. - */ - public IENCBindingHolder getENCBindingHolder() { - return encBindingHolder; - } - - /** - * Sets the given ENC binding holder. - * @param encBindingHolder the given environment holder. - */ - public void setENCBindingHolder(final IENCBindingHolder encBindingHolder) { - this.encBindingHolder = encBindingHolder; - } - - /** - * Get and array of the persistence-unit-refs. - * @return array of persistence unit refs - */ - public PersistenceUnitRefDesc[] getPersistenceUnitRefs() { - PersistenceUnitRefDesc[] ret = new PersistenceUnitRefDesc[persistenceUnitRefs.size()]; - persistenceUnitRefs.copyInto(ret); - return ret; - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/MessageDestinationRefDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/MessageDestinationRefDesc.java deleted file mode 100644 index a5926aac03ac389f8c0145b3096bde31314668b1..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/MessageDestinationRefDesc.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Eric Hardesty - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common; - -import org.ow2.jonas.deployment.api.IMessageDestinationRefDesc; -import org.ow2.jonas.deployment.common.xml.JonasMessageDestinationRef; -import org.ow2.jonas.deployment.common.xml.MessageDestinationRef; - - -/** - * This class represents the description of a MessageDestinationRef object - * @author Eric Hardesty - */ -public class MessageDestinationRefDesc implements IMessageDestinationRefDesc { - - /** - * The name of the message destination ref - */ - private String messageDestinationRefName = null; - - /** - * The type of the message destination ref - */ - private String messageDestinationType = null; - - /** - * The usage of the message destination ref. - */ - private String messageDestinationUsage = null; - - /** - * The link of the message destination ref. - */ - private String messageDestinationLink = null; - - /** - * The jndi name of the message destination ref. - */ - private String jndiName = null; - - - /** - * Construct a descriptor for an message-destination-ref tag. - * @param messageDestinationRef the messageDestination ref result of the xml parsing. - * @param jonasMessageDestinationRef the jonas messageDestinationRef result of the xml parsing. - * @throws DeploymentDescException when missing information for - * creating the MessageDestinationRefDesc. - */ - public MessageDestinationRefDesc(MessageDestinationRef messageDestinationRef, - JonasMessageDestinationRef jonasMessageDestinationRef) - throws DeploymentDescException { - messageDestinationRefName = messageDestinationRef.getMessageDestinationRefName(); - messageDestinationType = messageDestinationRef.getMessageDestinationType(); - messageDestinationUsage = messageDestinationRef.getMessageDestinationUsage(); - messageDestinationLink = messageDestinationRef.getMessageDestinationLink(); - jndiName = null; - if (jonasMessageDestinationRef != null) { - jndiName = jonasMessageDestinationRef.getJndiName(); - } - } - - public String getMessageDestinationRefName() { - return messageDestinationRefName; - } - - public String getMessageDestinationType() { - return messageDestinationType; - } - - public String getMessageDestinationUsage() { - return messageDestinationUsage; - } - - public String getMessageDestinationLink() { - return messageDestinationLink; - } - - - public String getJndiName() { - return jndiName; - } - - /** - * Set the jndi name of the messageDestination-ref. - * @param jndiName representation of the JNDI name - */ - public void setJndiName(String jndiName) { - this.jndiName = jndiName; - } - - - /** - * String representation of the object for test purpose - * @return String representation of this object - */ - public String toString() { - StringBuffer ret = new StringBuffer(); - ret.append("\ngetMessageDestinationRefName()=" + getMessageDestinationRefName()); - ret.append("\ngetMessageDestinationType()=" + getMessageDestinationType()); - ret.append("\ngetMessageDestinationUsage()=" + getMessageDestinationUsage()); - ret.append("\ngetMessageDestinationLink()=" + getMessageDestinationLink()); - ret.append("\ngetJndiName()=" + getJndiName()); - return ret.toString(); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/PersistenceUnitRefDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/PersistenceUnitRefDesc.java deleted file mode 100644 index 070d6a459a93b4aab44c1f977505360adb1de9ad..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/PersistenceUnitRefDesc.java +++ /dev/null @@ -1,89 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2008 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.common; - -import org.ow2.jonas.deployment.api.IPersistenceUnitRefDesc; -import org.ow2.jonas.deployment.common.xml.PersistenceUnitRef; - -/** - * Class used to represent persistence-unit-ref elements in J2EE deployment descriptors. - * @author Adriana Danes - */ -public class PersistenceUnitRefDesc implements IPersistenceUnitRefDesc { - - /** - * optional description. - */ - private String description; - - /** - * persistence unit reference name. - */ - private String persistenceUnitRefName; - - /** - * persistence unit name. - */ - private String persistenceUnitName; - - - /** - * Construct a descriptor for an persistence-unit-ref tag. - * @param persistenceUnitRef the persistence-unit-ref resulting of the xml parsing. - * @throws DeploymentDescException when missing information for - * creating the PersistenceUnitRefDesc - */ - public PersistenceUnitRefDesc(final PersistenceUnitRef persistenceUnitRef) throws DeploymentDescException { - description = persistenceUnitRef.getDescription(); - persistenceUnitRefName = persistenceUnitRef.getPersistenceUnitRefName(); - persistenceUnitName = persistenceUnitRef.getPersistenceUnitName(); - if (persistenceUnitName == null) { - // set default value to "" - persistenceUnitName = ""; - } - } - - /** - * @return persistence unit reference description - */ - public String getDescription() { - return description; - } - - /** - * @return persistence unit name - */ - public String getName() { - return persistenceUnitName; - } - - /** - * @return persistence unit reference name - */ - public String getRefName() { - return persistenceUnitRefName; - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/ResourceEnvRefDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/ResourceEnvRefDesc.java deleted file mode 100644 index 1e92a3efa06de921e7d869a8a47229a35850f51c..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/ResourceEnvRefDesc.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Christophe Ney - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common; - -import org.ow2.jonas.deployment.api.IResourceEnvRefDesc; -import org.ow2.jonas.deployment.common.xml.JonasResourceEnv; -import org.ow2.jonas.deployment.common.xml.ResourceEnvRef; - - -/** - * This class represents the description of a ResourceEnvRef object - * @author Christophe Ney - * @author Florent Benoit - */ -public class ResourceEnvRefDesc implements IResourceEnvRefDesc { - - /** - * The resource env ref name. - */ - private String name; - - /** - * The resource env ref type. - */ - private Class type; - - /** - * The resource env ref jndi name. - */ - private String jndiName; - - /** - * Construct a descriptor for the resource-env-ref and jonas-resource-env - * tags. - * @param classLoader the classloader for the classes. - * @param res the resource-env-ref resulting of the web.xml parsing. - * @param jRes the jonas-resource-env resulting of the jonas-web.xml - * parsing. - * @throws DeploymentDescException when missing information for - * creating the ResourceEnvRefDesc. - */ - public ResourceEnvRefDesc(ClassLoader classLoader, ResourceEnvRef res, - JonasResourceEnv jRes) throws DeploymentDescException { - - name = res.getResourceEnvRefName(); - try { - type = classLoader.loadClass(res.getResourceEnvRefType()); - } catch (ClassNotFoundException e) { - throw new DeploymentDescException("resource-env-ref-type class not found for resource-env-ref " + name, e); - } - jndiName = jRes.getJndiName(); - } - - public String getName() { - return name; - } - - public Class getType() { - return type; - } - - public String getJndiName() { - return jndiName; - } - - /** - * String representation of the object for test purpose. - * @return String representation of this object. - */ - public String toString() { - StringBuffer ret = new StringBuffer(); - ret.append("\ngetName()=" + getName()); - ret.append("\ngetType()=" + getType()); - ret.append("\ngetJndiName()=" + getJndiName()); - return ret.toString(); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/ResourceRefDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/ResourceRefDesc.java deleted file mode 100644 index 7db1c046df5eb413bf6a2257deec9a8af20f692b..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/ResourceRefDesc.java +++ /dev/null @@ -1,140 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Christophe Ney - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common; - -import org.ow2.jonas.deployment.api.IResourceRefDesc; -import org.ow2.jonas.deployment.common.xml.JonasResource; -import org.ow2.jonas.deployment.common.xml.ResourceRef; - - - -/** - * This class represents the description of a ResourceRef object - * @author Christophe Ney - * @author Florent Benoit - */ -public class ResourceRefDesc implements IResourceRefDesc { - - /** - * List of all possible authentication. - */ - private static final String[] AUTH = {"APPLICATION_AUTH", "CONTAINER_AUTH"}; - - /** - * The resource ref name. - */ - private String name; - - /** - * The resource ref type name. - */ - private String typeName; - - /** - * The resource ref authentication. - */ - private int authentication; - - /** - * The resource ref jndi name. - */ - private String jndiName; - - /** - * Construct a descriptor for the resource-ref and jonas-resource tags. - * @param classLoader the classloader for the classes. - * @param res the resource-ref resulting of the web.xml parsing. - * @param jRes the jonas-resource resulting of the jonas-web.xml parsing. - * @throws DeploymentDescException when missing information for - * creating the ResourceRefDesc. - */ - public ResourceRefDesc(ClassLoader classLoader, - ResourceRef res, JonasResource jRes) - throws DeploymentDescException { - name = res.getResRefName(); - typeName = new String(res.getResType()); - String auth = res.getResAuth(); - - if (auth.equals("Application")) { - authentication = APPLICATION_AUTH; - } else if (auth.equals("Container")) { - authentication = CONTAINER_AUTH; - } else { - throw new DeploymentDescException("res-auth not valid for resource-ref " + name); - } - jndiName = jRes.getJndiName(); - } - - /* (non-Javadoc) - * @see org.ow2.jonas.deployment.api.IResourceRefDesc#getName() - */ - public String getName() { - return name; - } - - /* (non-Javadoc) - * @see org.ow2.jonas.deployment.api.IResourceRefDesc#getTypeName() - */ - public String getTypeName() { - return typeName; - } - - /* (non-Javadoc) - * @see org.ow2.jonas.deployment.api.IResourceRefDesc#getAuthentication() - */ - public int getAuthentication() { - return authentication; - } - - /* (non-Javadoc) - * @see org.ow2.jonas.deployment.api.IResourceRefDesc#isJdbc() - */ - public boolean isJdbc() { - return "javax.sql.DataSource".equals(typeName); - } - - /* (non-Javadoc) - * @see org.ow2.jonas.deployment.api.IResourceRefDesc#getJndiName() - */ - public String getJndiName() { - return jndiName; - } - - /** - * String representation of the object for test purpose - * @return String representation of this object - */ - public String toString() { - StringBuffer ret = new StringBuffer(); - ret.append("\ngetName()=" + getName()); - ret.append("\ngetTypeName()=" + getTypeName()); - ret.append("\ngetAuthentication()=" + AUTH[getAuthentication()]); - ret.append("\nisJdbc()=" + new Boolean(isJdbc()).toString()); - ret.append("\ngetJndiName()=" + getJndiName()); - return ret.toString(); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/SecurityRoleRefDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/SecurityRoleRefDesc.java deleted file mode 100644 index b5a34b860b1fe4eced36bc25e21b89426a02994c..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/SecurityRoleRefDesc.java +++ /dev/null @@ -1,116 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common; - -import java.security.Permission; - -import javax.security.jacc.EJBRoleRefPermission; -import javax.security.jacc.WebRoleRefPermission; - -import org.ow2.jonas.deployment.common.xml.SecurityRoleRef; - - -/** - * Defines a SecurityRoleRefDesc class for the management of - * EJBRoleRefPermissions and WebRoleRefPermissions in JACC - * @author Florent Benoit - */ -public class SecurityRoleRefDesc { - - /** - * EJBRoleRefPermission - */ - private EJBRoleRefPermission ejbRoleRefPermission = null; - - - /** - * WebRoleRefPermission - */ - private WebRoleRefPermission webRoleRefPermission = null; - - - /** - * role-link used for addToRole method on PolicyConfiguration - */ - private String roleLink = null; - - - /** - * role-name - */ - private String roleName = null; - - - /** - * Constructor for SecurityRoleRefDesc - * @param componentName name of the EJB or Servlet - * @param securityRoleRef the security role of the assembly descriptor - * @param isEjb indicate if the is a SecurityRoleRef for an EJB or a Web Component - */ - public SecurityRoleRefDesc(String componentName, SecurityRoleRef securityRoleRef, boolean isEjb) { - this.roleLink = securityRoleRef.getRoleLink(); - this.roleName = securityRoleRef.getRoleName(); - if (isEjb) { - this.ejbRoleRefPermission = new EJBRoleRefPermission(componentName, roleName); - } else { - this.webRoleRefPermission = new WebRoleRefPermission(componentName, roleName); - } - } - - - - /** - * Gets the role-name value - * @return role-name - */ - public String getRoleName() { - return roleName; - } - - - /** - * Gets the role-link value - * @return role-link - */ - public String getRoleLink() { - return roleLink; - } - - /** - * @return Returns the EJBRoleRefPermission - */ - public Permission getEJBRoleRefPermission() { - return ejbRoleRefPermission; - } - - /** - * @return Returns the WebRoleRefPermission - */ - public Permission getWebRoleRefPermission() { - return webRoleRefPermission; - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/digester/JDigester.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/digester/JDigester.java deleted file mode 100644 index 26a90acab2d1612d87dd92b760181a93aae8061c..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/digester/JDigester.java +++ /dev/null @@ -1,153 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Philippe Coq - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.digester; - -import java.io.IOException; -import java.io.Reader; - -import org.ow2.jonas.deployment.api.DTDs; -import org.ow2.jonas.deployment.api.Schemas; -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.common.lib.JEntityResolver; -import org.ow2.jonas.deployment.common.rules.JRuleSetBase; -import org.ow2.jonas.deployment.common.xml.TopLevelElement; - -import org.apache.commons.digester.Digester; - - -/** - * This class defines a Digester for the xml parsing of - * deployment descriptors standard and specific - * - * @author Philippe Coq - */ - -public class JDigester extends Digester { - - /** - * Construct an instance of a JDigester which is a Digester - * that is configured for parsing the deployment descriptors standards - * and specifics used in JOnAS application. - * the Digester contains the rules for the xml parsing - * By default the created digester is set with: - * useContextClassLoader = true - * @param ruleSet an object that extends JRuleSetBase - * @param parsingWithValidation flag for xmlvalidation - * @param namespaceAware must be true when schema is used - * @param dtds mapping between publicId and local Urls of DTDs - * @param schemas local urls for the schemas - * @throws DeploymentDescException if the deployment descriptors are corrupted. - */ - - public JDigester(JRuleSetBase ruleSet, - boolean parsingWithValidation, - boolean namespaceAware, - DTDs dtds, - Schemas schemas) - throws DeploymentDescException { - super(); - - - String packageName = ruleSet.getClass().getPackage().getName(); - String rootPackageName = packageName.substring(0, packageName.lastIndexOf('.')); - - - // Set the validation process - setNamespaceAware(namespaceAware); - setValidating(parsingWithValidation); - - // Define an error handler - setErrorHandler(new JErrorHandler()); - - // Register all Sun dtds/Schemas - JEntityResolver jEntityResolver = new JEntityResolverWithDigester(this); - jEntityResolver.addDtds(dtds); - jEntityResolver.addSchemas(schemas); - setEntityResolver(jEntityResolver); - - - // Set the schema that Digester must use - if (parsingWithValidation) { - try { - setFeature("http://apache.org/xml/features/validation/schema", - true); - } catch (Exception ee) { - throw new DeploymentDescException("Error setting feature", ee); - } - } - - org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(rootPackageName + ".digester"); - setLogger(log); - - // Set the encoding feature - try { - setFeature("http://apache.org/xml/features/allow-java-encodings", - true); - } catch (Exception ee) { - throw new DeploymentDescException("Error setting feature", ee); - } - - // Don't use ContextClassLoader - setUseContextClassLoader(false); - - // Add rules - addRuleSet(ruleSet); - } - - - /** - * Parse the deployment descriptor - * @param reader the Reader of the XML file. - * @param fileName the name of the file. - * @param element top level xml element - * which is a structure containing the result of the xml parsing. - * @throws DeploymentDescException if the deployment descriptor - * is corrupted. - */ - public void parse(Reader reader, - String fileName, - TopLevelElement element) - throws DeploymentDescException { - try { - clear(); - push(element); - parse(reader); - } catch (Exception ioe) { - throw new DeploymentDescException("Error when parsing XML document " + fileName, ioe); - } finally { - if (reader != null) { - try { - reader.close(); - } catch (IOException ignored) { - getLogger().warn("Can't close '" + fileName + "'"); - } - } - push(null); - } - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/digester/JEntityResolverWithDigester.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/digester/JEntityResolverWithDigester.java deleted file mode 100644 index d489828775340c9f8fe3cf34e035779d1625106b..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/digester/JEntityResolverWithDigester.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.digester; - - -import java.io.IOException; - -import org.ow2.jonas.deployment.common.lib.JEntityResolver; -import org.xml.sax.EntityResolver; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; - -/** - * This class defines the entity resolver used to resolve DTDs/Schemas during - * the xml parsing. It extends the JEntityResolver - * in order to allow for that parser to be used without having the digester classes. - */ -public class JEntityResolverWithDigester extends JEntityResolver implements EntityResolver { - - /** - * JDigester Object associated - */ - private JDigester jDigester = null; - - - /** - * Constructor - * - * @param jd linked JDigester object - */ - public JEntityResolverWithDigester(JDigester jd) { - super(); - jDigester = jd; - } - - /** - * The Parser will call this method before opening any external entity except - * the top-level document entity. - * @param publicId The public identifier of the external entity being referenced, - * or null if none was supplied. - * @param systemId The system identifier of the external entity being referenced. - * @return An InputSource object describing the new input source, or null to request that - * the parser open a regular URI connection to the system identifier. - * @throws SAXException Any SAX exception, possibly wrapping another exception. - * @throws IOException A Java-specific IO exception, possibly the result of creating - * a new InputStream or Reader for the InputSource. - */ - public InputSource resolveEntity(String publicId, String systemId) - throws IOException, SAXException { - - if (jDigester != null) { - jDigester.setPublicId(publicId); - } - - return super.resolveEntity(publicId, systemId); - } -} - diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/digester/JErrorHandler.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/digester/JErrorHandler.java deleted file mode 100644 index 75e02bf17738e913f10b1ab3b9529018412cddb3..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/digester/JErrorHandler.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.digester; - -import org.xml.sax.ErrorHandler; -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; - -/** - * Define an error handler which throw an exception as Digester not (only print - * stack trace). This handler is use for throwing/catching in a convenient way - * the xml parsing error of xml file. - */ -public class JErrorHandler implements ErrorHandler { - - /** - * Receive notification of a warning. - * - * @param exception exception to throw - * @throws SAXException if an error is thrown - */ - public void warning(SAXParseException exception) throws SAXException { - - } - - /** - * Receive notification of a recoverable error. - * - * @param exception exception to throw - * @throws SAXException if an error is thrown - */ - public void error(SAXParseException exception) throws SAXException { - throw new SAXException("Parse Fatal Error at line " + exception.getLineNumber() + " column " - + exception.getColumnNumber() + ": " + exception.getMessage()); - } - - /** - * Receive notification of a non-recoverable error. - * - * @param exception exception to throw - * @throws SAXException if an error is thrown - */ - public void fatalError(SAXParseException exception) throws SAXException { - throw new SAXException("Parse Fatal Error at line " + exception.getLineNumber() + " column " - + exception.getColumnNumber() + ": " + exception.getMessage()); - } -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/lib/AbsDeploymentDescManager.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/lib/AbsDeploymentDescManager.java deleted file mode 100644 index 8e328dfa503a56713456d89e28badbd919ffbbb7..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/lib/AbsDeploymentDescManager.java +++ /dev/null @@ -1,159 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.lib; - -import org.ow2.jonas.deployment.common.xml.JonasServiceRef; -import org.ow2.jonas.deployment.common.xml.ResourceRef; -import org.ow2.jonas.deployment.common.xml.ResourceEnvRef; -import org.ow2.jonas.deployment.common.xml.AbsEnvironmentElement; -import org.ow2.jonas.deployment.common.xml.JonasPortComponentRef; -import org.ow2.jonas.deployment.common.xml.JonasStubProperty; -import org.ow2.jonas.deployment.client.xml.ApplicationClient; -import org.ow2.util.ee.metadata.common.api.struct.IJaxwsWebServiceRef; -import org.ow2.util.ee.metadata.common.api.xml.struct.IPortComponentRef; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.util.List; -import java.util.Iterator; - -/** - * Abstract class of DeploymentDesc manager. Use for common methods. - * @author Florent Benoit - */ -public abstract class AbsDeploymentDescManager implements DeploymentDescManager { - - /** - * Char separator in a link. - */ - public static final String LINK_SEPARATOR = "#"; - - /** - * Utility class, no public constructor - */ - protected AbsDeploymentDescManager() { - - } - - /** - * Return the content of the inut stream - * @param in the given input stream - * @return the content of the inut stream - * @throws IOException if the file can't be read - */ - protected static String xmlContent(InputStream in) throws IOException { - - StringBuffer sb = new StringBuffer(); - String line; - BufferedReader br = new BufferedReader(new InputStreamReader(in)); - // loop until the end - while ((line = br.readLine()) != null) { - sb.append(line); - sb.append("\n"); - } - return sb.toString(); - } - - /** - * Find a jonas-service-ref element with a given name. - * @param jonasServiceRefList the list of elements to search in - * @param name the name - * @return a jonas-service-ref element matching the given name or null if not found - */ - protected static JonasServiceRef findJonasServiceRef(final List jonasServiceRefList, - final String name) { - JonasServiceRef found = null; - for (Iterator i = jonasServiceRefList.iterator(); i.hasNext() && found == null;) { - JonasServiceRef element = (JonasServiceRef) i.next(); - if (name.equals(element.getServiceRefName())) { - found = element; - } - } - - return found; - } - - /** - * @return true if the resource name is already present as a resource-ref or resource-env-ref - */ - public static boolean containsResource(final String resourceName, final AbsEnvironmentElement env) { - List resourceRefList = env.getResourceRefList(); - for (ResourceRef resourceRef : resourceRefList) { - if (resourceName.equals(resourceRef.getResRefName())) { - return true; - } - } - - List resourceEnvRefList = env.getResourceEnvRefList(); - for (ResourceEnvRef resourceEnvRef : resourceEnvRefList) { - if (resourceName.equals(resourceEnvRef.getResourceEnvRefName())) { - return true; - } - } - - // not found - return false; - } - - /** - * Merge into the Jax WS service ref some data from the jonas-xxx.xml files - * @param jsr the XML struct of the JOnAS service ref - * @param wsr the JAX WS metadata which has been merged - */ - protected static void mergeWebServiceRef(JonasServiceRef jsr, IJaxwsWebServiceRef wsr) { - // Override wsdl-location value if specified - if (jsr.getAltWsdl() != null) { - wsr.setWsdlLocation(jsr.getAltWsdl()); - } - - List portComponentRefList = jsr.getJonasPortComponentRefList(); - for (JonasPortComponentRef jonasPortComponentRef : portComponentRefList) { - // Get SEI - String serviceEndpointInterface = jonasPortComponentRef.getServiceEndpointInterface(); - - // matching port component ? - IPortComponentRef portComponentRef = wsr.getPortComponentRef(serviceEndpointInterface); - if (portComponentRef == null) { - // no, needs to add one - portComponentRef = new org.ow2.util.ee.metadata.common.impl.xml.struct.PortComponentRef(); - portComponentRef.setServiceEndpointInterface(serviceEndpointInterface); - List wsrPortcomponentRefs = wsr.getPortComponentRefs(); - wsrPortcomponentRefs.add(portComponentRef); - wsr.setPortComponentRefs(wsrPortcomponentRefs); - } - // add stub properties - List jonasStubProperties = jonasPortComponentRef.getJonasStubPropertyList(); - for (JonasStubProperty jonasStubProperty : jonasStubProperties) { - portComponentRef.getStubProperties().put(jonasStubProperty.getParamName(), jonasStubProperty.getParamValue()); - } - - } - - } -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/lib/DeploymentDescManager.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/lib/DeploymentDescManager.java deleted file mode 100644 index 0d08304d1a546d52ecf28ca8e03e99e5957a1046..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/lib/DeploymentDescManager.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.lib; - - -/** - * Defines an interface for all Deployment Desc manager - * @author Florent Benoit - */ -public interface DeploymentDescManager { - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/lib/JEntityResolver.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/lib/JEntityResolver.java deleted file mode 100644 index d07a81ecc631c3cbfe811b0271b60ab48d23c14d..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/lib/JEntityResolver.java +++ /dev/null @@ -1,157 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.lib; - - -import java.io.IOException; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import org.ow2.jonas.deployment.api.DTDs; -import org.ow2.jonas.deployment.api.Schemas; -import org.ow2.jonas.deployment.common.digester.JDigester; -import org.xml.sax.EntityResolver; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; - - -/** - * This class defines the entity resolver used to resolve DTDs/Schemas during - * the xml parsing - * @author Florent Benoit - */ -public class JEntityResolver implements EntityResolver { - - /** - * Map which contains DTDs and Schemas available in local - */ - private HashMap entries = new HashMap(); - - /** - * Constructor without JDigester instance (used in WsGen only) - */ - public JEntityResolver() { - super(); - } - - /** - * Add a local schema to the known entries - * @param path path to a local schema - */ - private void addSchema(String path) { - String id = path.substring(path.lastIndexOf('/') + 1); - entries.put(id, path); - } - - - - /** - * The Parser will call this method before opening any external entity except - * the top-level document entity. - * @param publicId The public identifier of the external entity being referenced, - * or null if none was supplied. - * @param systemId The system identifier of the external entity being referenced. - * @return An InputSource object describing the new input source, or null to request that - * the parser open a regular URI connection to the system identifier. - * @throws SAXException Any SAX exception, possibly wrapping another exception. - * @throws IOException A Java-specific IO exception, possibly the result of creating - * a new InputStream or Reader for the InputSource. - */ - public InputSource resolveEntity(String publicId, String systemId) - throws IOException, SAXException { - - // DTD : check if we got this entry - String localPath = null; - if (publicId != null) { - localPath = (String) entries.get(publicId); - } else if (systemId != null) { - // Can be a schema - if (systemId.toLowerCase().endsWith(".xsd")) { - // Retrieve basename - String baseName = systemId.substring(systemId.lastIndexOf('/') + 1); - - // Registred ? - localPath = (String) entries.get(baseName); - } - } - - if (localPath == null) { - // This DTD/Schema was not added to this DTD/Schame local repository - return null; - } - - // Return the local path source - return (new InputSource(localPath)); - } - - - /** - * Add the mapping between a public Id and the local path of the DTD - * @param dtds Object containing the mapping PublicId --> Local URL - */ - public void addDtds(DTDs dtds) { - if (dtds != null) { - Map dtdsMapping = dtds.getMapping(); - if (dtdsMapping != null) { - for (Iterator it = dtdsMapping.entrySet().iterator(); it.hasNext();) { - Map.Entry entry = (Map.Entry) it.next(); - String publicId = (String) entry.getKey(); - String localURL = (String) entry.getValue(); - entries.put(publicId, localURL); - } - } - } - } - - - /** - * Add the given Schemas to the schemas available for this resolver - * @param schemas Definition of the schemas to add to this resolver - */ - public void addSchemas(Schemas schemas) { - // no schemas - if (schemas == null) { - return; - } - - List localSchemas = schemas.getlocalSchemas(); - - // there are schemas - if (localSchemas != null) { - for (Iterator it = localSchemas.iterator(); it.hasNext();) { - String schema = (String) it.next(); - addSchema(schema); - } - } - } - - - -} - diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/lib/JLSInput.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/lib/JLSInput.java deleted file mode 100644 index 9b71abd71e384aa174fe46e716b808c9ad0a2f65..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/lib/JLSInput.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.common.lib; - -import java.io.InputStream; -import java.io.Reader; - -import org.w3c.dom.ls.LSInput; -import org.xml.sax.InputSource; - -/** - * A wrapper around the InputSource class returned by EntityResolver - * to be returned by the ResourceResolver class. - * - * @author Patrick Smith - * @author Greg Lapouchnian - */ -public class JLSInput implements LSInput { - - /** - * The InputSource that this class is wrapping. - */ - private InputSource source; - - /** - * Creates a wrapper around the given InputSource object. - * @param source - */ - public JLSInput(InputSource source) { - this.source = source; - } - - /** - * Return the character stream representation of the resource. - * @return character stream representation of the resource - */ - public Reader getCharacterStream() { - return source.getCharacterStream(); - } - - public void setCharacterStream(Reader arg0) {} - - /** - * Return the byte stream representation of the resource. - * @return byte stream representation of the resource - */ - public InputStream getByteStream() { - return source.getByteStream(); - } - - public void setByteStream(InputStream arg0) {} - - public String getStringData() { - // No corresponding method in InputSource - return null; - } - - public void setStringData(String arg0) {} - - /** - * Returns the System ID of the resource. - * @return the system ID of the resource - */ - public String getSystemId() { - return source.getSystemId(); - } - - public void setSystemId(String id) {} - - /** - * Returns the Public ID of the resource. - * @return the public ID of the resource - */ - public String getPublicId() { - return source.getPublicId(); - } - - public void setPublicId(String id) {} - - public String getBaseURI() { - return null; - } - - public void setBaseURI(String arg0) {} - - /** - * Returns the encoding of the resource. - * @return the encoding of the resource - */ - public String getEncoding() { - return source.getEncoding(); - } - - public void setEncoding(String arg0) {} - - public boolean getCertifiedText() { - return false; - } - - public void setCertifiedText(boolean arg0) {} - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/lib/JLSResourceResolver.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/lib/JLSResourceResolver.java deleted file mode 100644 index 35cc194d7eb7be7c21db0447bac9cb68a7d4f306..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/lib/JLSResourceResolver.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.common.lib; - -import org.w3c.dom.ls.LSInput; -import org.w3c.dom.ls.LSResourceResolver; -import org.xml.sax.EntityResolver; -import org.xml.sax.InputSource; - -/** - * A custom ResourceResolver to use in SchemaFactory. It uses the JEntityResolver - * to resolve system IDs for DTDs and Schemas to local copies of those files. - * - * @author Patrick Smith - * @author Greg Lapouchnian - */ -public class JLSResourceResolver implements LSResourceResolver { - - /** - * The entity resolver to use for lookups. - */ - EntityResolver er; - - /** - * - * @param er the EntityResolver to use for resolving external - * resources - */ - public JLSResourceResolver(EntityResolver er) { - this.er = er; - } - - /** - * Uses the EntityResolver to resolve an external resource. - */ - public LSInput resolveResource(String type, String namespaceURI, - String publicId, String systemId, - String baseURI) { - try { - InputSource source = er.resolveEntity(publicId, systemId); - return new JLSInput(source); - - } catch (Exception e) { - return null; - } - } - } - diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/lib/JavaType.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/lib/JavaType.java deleted file mode 100644 index d54950d0b3a26abf2da2e975a560633ef4d2138b..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/lib/JavaType.java +++ /dev/null @@ -1,442 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.deployment.common.lib; - -import java.util.Hashtable; - -/** - * This class implements methods which permit to get informations about Java Types: - *

      - *
    • - * the JDBC Types associated - *
    • - * the ResultSet.getXXX() methods associated - *
    • - * the PreparedStatement.setXXX() methods associated - *
    - *
    - * (The Java Type may be or not a primitive type) - * - * @author Helene Joanin : Initial developer - * @author ico.Hoogervorst@nl.compuware.com : Support for BigInteger and avoid cast exceptions with rs.getObject() - */ -public class JavaType { - - // Default values for Java primitive type - private static Hashtable tableDefaultValues = new Hashtable(); - static { - tableDefaultValues.put(java.lang.Boolean.TYPE, "false"); - tableDefaultValues.put(java.lang.Character.TYPE, "'\u0000'"); - tableDefaultValues.put(java.lang.Byte.TYPE, "(byte)0"); - tableDefaultValues.put(java.lang.Short.TYPE, "(short)0"); - tableDefaultValues.put(java.lang.Integer.TYPE, "0"); - tableDefaultValues.put(java.lang.Long.TYPE, "0L"); - tableDefaultValues.put(java.lang.Float.TYPE, "0.0f"); - tableDefaultValues.put(java.lang.Double.TYPE, "0.0d"); - } - - private static Hashtable tableWrapperType = new Hashtable(); - static { - tableWrapperType.put(java.lang.Boolean.TYPE, "java.lang.Boolean"); - tableWrapperType.put(java.lang.Character.TYPE, "java.lang.Character"); - tableWrapperType.put(java.lang.Byte.TYPE, "java.lang.Byte"); - tableWrapperType.put(java.lang.Short.TYPE, "java.lang.Short"); - tableWrapperType.put(java.lang.Integer.TYPE, "java.lang.Integer"); - tableWrapperType.put(java.lang.Long.TYPE, "java.lang.Long"); - tableWrapperType.put(java.lang.Float.TYPE, "java.lang.Float"); - tableWrapperType.put(java.lang.Double.TYPE, "java.lang.Double"); - } - - - /** - * Returns true if the given type is the type 'void' - */ - public static boolean isVoid(Class c) { - return (c.equals(java.lang.Void.TYPE)); - } - - /** - * Returns the name of the given type - */ - public static String getName(Class c) { - String name; - if (c.isArray()) { - name = getName(c.getComponentType()) + "[]"; - } else { - // The '$' in the name of a inner class is no more allowed since JDK 1.4.2 - name = c.getName().replace('$', '.'); - } - return (name); - } - - /** - * Returns true if the given class is a Serializable Java Type, - * false otherwise. - */ - public static boolean isSerializable(Class c) { - boolean isSerializable = false; - if (c.isArray()) { - isSerializable = isSerializable(c.getComponentType()); - } else if (c.isPrimitive()) { - isSerializable = true; - } else { - isSerializable = java.io.Serializable.class.isAssignableFrom(c); - } - return (isSerializable); - } - - /** - * Returns true if the given class is a valid type for RMI, - * false otherwise. - * Valid types for RMI are primitive types, remote objects, - * and non-remote objects that implement the java.io.Serializable interface - */ - public static boolean isValidForRmi(Class c) { - return (JavaType.isSerializable(c) || java.rmi.Remote.class.isAssignableFrom(c)); - } - - /** - * Returns true if the given class implements java.uti.Collection or java.util.Enumeration - * false otherwise. - */ - public static boolean isCollecOrEnum(Class c) { - return (java.util.Collection.class.isAssignableFrom(c) || java.util.Enumeration.class.isAssignableFrom(c)); - } - - /** - * Returns the name of the getXXX method associated with the given type in - * java.sql.ResultSet. - * @param c the class object for a Java type. - * @return a string representing the name of the get method, null in error case - */ - public static String getSQLGetMethod(Class c) { - return (JavaTypesForSQL.getSQLGetMethod(c)); - } - - /** - * Returns the name of the setXXX method associated with the given type in - * java.sql.ResultSet. - * @param c the class object for a Java type. - * @return a string representing the name of the set method, null in error case - */ - public static String getSQLSetMethod(Class c) { - return (JavaTypesForSQL.getSQLSetMethod(c)); - } - - /** - * Returns true if the given method name is getObject() or setObject() - */ - public static boolean isXxxObjectMethod(String name) { - return (name.equals("getObject") || name.equals("setObject")); - } - - /** - * Returns the SQL Type mapping the given Java Type. - * @param c the class object for a Java type. - * @return the SQL Type mapping the given Java Type, (Types.OTHER in error case) - */ - public static String getSQLType(Class c) { - return (JavaTypesForSQL.getSQLType(c)); - } - - /** - * Returns the default value of the given Java Type. - * @param c the class object for a Java type. - * @return the default value of the given Java Type - */ - public static String getDefaultValue(Class c) { - String val = null; - if (c.isPrimitive()) { - val = (String) tableDefaultValues.get(c); - } else { - val = new String("null"); - } - if (val == null) { - throw new Error("JavaType ERROR: No default value for the class " + c.getName()); - } - return (val); - } - - /** - * Returns the wrapper type of the given Java Type. - * @param c the class object for a Java type. - * @return the wrapper type of the given Java Type. Empty String for non primitive classes - */ - public static String getWrapperType(Class c) { - String val = null; - if (c.isPrimitive()) { - val = (String) tableWrapperType.get(c); - } else { - val = new String(""); - } - if (val == null) { - throw new Error("JavaType ERROR: No wrapper type for the class " + c.getName()); - } - return (val); - } - - public static Boolean toObject(boolean val) { - return new Boolean(val); - } - public static Byte toObject(byte val) { - return new Byte(val); - } - public static Short toObject(short val) { - return new Short(val); - } - public static Integer toObject(int val) { - return new Integer(val); - } - public static Long toObject(long val) { - return new Long(val); - } - public static Float toObject(float val) { - return new Float(val); - } - public static Double toObject(double val) { - return new Double(val); - } - public static Character toObject(char val) { - return new Character(val); - } - public static Object toObject(Object val) { - return val; - } - - /** - * If it is a primitive type, return a new Object constructor, - * else return the same object. - * There are nine predefined Class objects to represent the eight - * primitive types and void. These are created by the Java Virtual Machine, - * and have the same names as the primitive types that they represent, - * namely boolean, byte, char, short, int, long, float, and double. - * @param name name of the var - * @param val the object value - * @return new object - */ - public static String toStringObject(String name, Class c) { - if (c.isPrimitive()) { - if (c == Boolean.TYPE) { - return "Boolean.valueOf(" + name + ")"; - } else if (c == Byte.TYPE) { - return "new Byte(" + name + ")"; - } else if (c == Character.TYPE) { - return "new Character(" + name + ")"; - } else if (c == Short.TYPE) { - return "new Short(" + name + ")"; - } else if (c == Integer.TYPE) { - return "new Integer(" + name + ")"; - } else if (c == Long.TYPE) { - return "new Long(" + name + ")"; - } else if (c == Float.TYPE) { - return "new Float(" + name + ")"; - } else if (c == Double.TYPE) { - return "new Double(" + name + ")"; - } else { - return name; - } - } else { - return name; - } - } - - -} - - -/** - * This inner class allows to calculate, for a given Java Type: - * - the corresponding SQL type, - * - the corresponding set method of the java.sql.PreparedStatement, - * - the corresponding get method of the java.sql.ResultSet. - */ -class JavaTypesForSQL { - - private static JavaTypesForSQL mTypesForSQL = new JavaTypesForSQL(); - private static Hashtable mGets; - private static Hashtable mSets; - private static Hashtable mSQLTypes; - - private JavaTypesForSQL() { - - mGets = new Hashtable(); - mSets = new Hashtable(); - mSQLTypes = new Hashtable(); - - mGets.put(java.lang.Boolean.TYPE, "getBoolean"); - mSets.put(java.lang.Boolean.TYPE, "setBoolean"); - mSQLTypes.put(java.lang.Boolean.TYPE, "Types.BIT"); - mGets.put(java.lang.Byte.TYPE, "getByte"); - mSets.put(java.lang.Byte.TYPE, "setByte"); - mSQLTypes.put(java.lang.Byte.TYPE, "Types.TINYINT"); - mGets.put(java.lang.Short.TYPE, "getShort"); - mSets.put(java.lang.Short.TYPE, "setShort"); - mSQLTypes.put(java.lang.Short.TYPE, "Types.SMALLINT"); - mGets.put(java.lang.Integer.TYPE, "getInt"); - mSets.put(java.lang.Integer.TYPE, "setInt"); - mSQLTypes.put(java.lang.Integer.TYPE, "Types.INTEGER"); - mGets.put(java.lang.Long.TYPE, "getLong"); - mSets.put(java.lang.Long.TYPE, "setLong"); - mSQLTypes.put(java.lang.Long.TYPE, "Types.BIGINT"); - mGets.put(java.lang.Float.TYPE, "getFloat"); - mSets.put(java.lang.Float.TYPE, "setFloat"); - mSQLTypes.put(java.lang.Float.TYPE, "Types.FLOAT"); - mGets.put(java.lang.Double.TYPE, "getDouble"); - mSets.put(java.lang.Double.TYPE, "setDouble"); - mSQLTypes.put(java.lang.Double.TYPE, "Types.DOUBLE"); - //mGets.put(java.lang.Character.TYPE, "????"); - //mSets.put(java.lang.Character.TYPE, "????"); - //mSQLTypes.put(java.lang.Character.TYPE, "???"); - mGets.put(java.lang.String.class, "getString"); - mSets.put(java.lang.String.class, "setString"); - mSQLTypes.put(java.lang.String.class, "Types.VARCHAR"); - mGets.put(java.sql.Date.class, "getDate"); - mSets.put(java.sql.Date.class, "setDate"); - mSQLTypes.put(java.sql.Date.class, "Types.DATE"); - mGets.put(java.sql.Time.class, "getTime"); - mSets.put(java.sql.Time.class, "setTime"); - mSQLTypes.put(java.sql.Time.class, "Types.TIME"); - mGets.put(java.sql.Timestamp.class, "getTimestamp"); - mSets.put(java.sql.Timestamp.class, "setTimestamp"); - mSQLTypes.put(java.sql.Timestamp.class, "Types.TIMESTAMP"); - mGets.put(java.lang.Boolean.class, "getBoolean"); - mSets.put(java.lang.Boolean.class, "setObject"); - mSQLTypes.put(java.lang.Boolean.class, "Types.BIT"); - mGets.put(java.lang.Integer.class, "getInt"); - mSets.put(java.lang.Integer.class, "setObject"); - mSQLTypes.put(java.lang.Integer.class, "Types.INTEGER"); - mGets.put(java.lang.Long.class, "getLong"); - mSets.put(java.lang.Long.class, "setObject"); - mSQLTypes.put(java.lang.Long.class, "Types.BIGINT"); - mGets.put(java.lang.Float.class, "getFloat"); - mSets.put(java.lang.Float.class, "setObject"); - mSQLTypes.put(java.lang.Float.class, "Types.REAL"); - mGets.put(java.lang.Double.class, "getDouble"); - mSets.put(java.lang.Double.class, "setObject"); - mSQLTypes.put(java.lang.Double.class, "Types.DOUBLE"); - mGets.put(java.lang.Byte.class, "getByte"); - mSets.put(java.lang.Byte.class, "setObject"); - mSQLTypes.put(java.lang.Byte.class, "Types.TINYINT"); - mGets.put(java.lang.Short.class, "getShort"); - mSets.put(java.lang.Short.class, "setObject"); - mSQLTypes.put(java.lang.Short.class, "Types.SMALLINT"); - mGets.put(java.math.BigDecimal.class, "getBigDecimal"); - mSets.put(java.math.BigDecimal.class, "setObject"); - mSQLTypes.put(java.math.BigDecimal.class, "Types.NUMERIC"); - mGets.put(java.math.BigInteger.class, "getBigDecimal"); - mSets.put(java.math.BigInteger.class, "setObject"); - mSQLTypes.put(java.math.BigInteger.class, "Types.NUMERIC"); - } - - /** - * Returns the name of the getXXX method associated with the given type - * in java.sql.ResultSet. - * @param c the class object for a Java type. - * @return a string representing the name of the get method, null in error case - */ - static String getSQLGetMethod(Class c) { - String val = null; - val = (String) mGets.get(c); - if (val == null) { - if (c.isArray()) { - // See if c is byte[] or serializable[] - Class component = c.getComponentType(); - if (component != null) { - if (component.equals(java.lang.Byte.TYPE)) { - val = new String("getBytes"); - } else if (JavaType.isSerializable(component)) { - val = new String("getSerializable"); - } - } - } else if (JavaType.isSerializable(c)) { - // See if c is serializable - val = new String("getSerializable"); - } - } - return (val); - } - - /** - * Returns the name of the setXXX method associated with the given type - * in java.sql.PreparedStatement. - * @param c the class object for a Java type. - * @return a string representing the name of the set method, null in error case - */ - static String getSQLSetMethod(Class c) { - String val = null; - val = (String) mSets.get(c); - if (val == null) { - if (c.isArray()) { - // See if c is byte[] or serializable[] - Class component = c.getComponentType(); - if (component != null) { - if (component.equals(java.lang.Byte.TYPE)) { - val = new String("setBytes"); - } else if (JavaType.isSerializable(component)) { - val = new String("setSerializable"); - } - } - } else if (JavaType.isSerializable(c)) { - // See if c is serializable - val = new String("setSerializable"); - } - } - return (val); - } - - /** - * Returns the SQL Type mapping the given Java Type. - * @param c the class object for a Java type. - * @return the SQL Type mapping the given Java Type, (Types.OTHER in error case) - */ - static String getSQLType(Class c) { - String val = null; - val = (String) mSQLTypes.get(c); - if (val == null) { - val = new String("Types.OTHER"); - if (c.isArray()) { - // See if c is byte[] or serializable[] - Class component = c.getComponentType(); - if (component != null) { - if (component.equals(java.lang.Byte.TYPE)) { - val = new String("Types.VARBINARY"); - } else if (JavaType.isSerializable(component)) { - val = new String("Types.VARBINARY"); - } - } - } else if (JavaType.isSerializable(c)) { - // See if c is serializable - val = new String("Types.VARBINARY"); - } - } - return (val); - } - -} - - - diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/AnonymousQNameRule.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/AnonymousQNameRule.java deleted file mode 100644 index 553e78fc30a7380e84486e8d99c71beb97b70870..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/AnonymousQNameRule.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.common.rules; - -import javax.xml.namespace.QName; - -import org.ow2.jonas.deployment.common.xml.Qname; - - - -/** - * Rule that create a new QName object for anonymous-type-qname in jaxrpc mapping file. - * @author Guillaume Sauthier - */ -public class AnonymousQNameRule extends QNameRule { - - /** - * This method is called when the body of a matching XML element is - * encountered. If the element has no body, this method is not called at - * all. The default implementation delegates to the deprecated method - * body without the namespace and name parameters, to retain backwards - * compatibility. - * @param namespace the namespace URI of the matching element, - * or an empty string if the parser is not namespace - * aware or the element has no namespace - * @param name the local name if the parser is namespace aware, - * or just the element name otherwise - * @param text The text of the body of this element - */ - public void body(String namespace, String name, String text) { - - // Check that there the value of the element is not null - if (text == null) { - throw new IllegalArgumentException("No QName found in the body of the tag " + name); - } - - // Extract namespace and localpart - int colonIndex = text.lastIndexOf(":"); - if (colonIndex == -1) { - throw new IllegalArgumentException("QName must be on the form namespace:localpart for element " + name); - } - String namespaceURI = text.substring(0, colonIndex); - String localPart = text.substring(colonIndex + 1, text.length()); - - // Build QName - QName qName = new QName(namespaceURI, localPart); - - // Add this QName to the element at the top of the stack - Qname qNameObject = (Qname) digester.peek(); - qNameObject.setName(name); - qNameObject.setQName(qName); - - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/EjbLocalRefRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/EjbLocalRefRuleSet.java deleted file mode 100644 index 366dde5535814d8f407c4aceed3301c884e77223..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/EjbLocalRefRuleSet.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.Digester; - -/** - * This class defines a rule to analyze ejb-local-ref - * @author Florent Benoit - */ -public class EjbLocalRefRuleSet extends JRuleSetBase { - - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public EjbLocalRefRuleSet(String prefix) { - super(prefix); - } - - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "ejb-local-ref", - "org.ow2.jonas.deployment.common.xml.EjbLocalRef"); - digester.addSetNext(prefix + "ejb-local-ref", - "addEjbLocalRef", - "org.ow2.jonas.deployment.common.xml.EjbLocalRef"); - - digester.addCallMethod(prefix + "ejb-local-ref/description", - "setDescription", 0); - digester.addCallMethod(prefix + "ejb-local-ref/ejb-ref-name", - "setEjbRefName", 0); - digester.addCallMethod(prefix + "ejb-local-ref/ejb-ref-type", - "setEjbRefType", 0); - digester.addCallMethod(prefix + "ejb-local-ref/local-home", - "setLocalHome", 0); - digester.addCallMethod(prefix + "ejb-local-ref/local", - "setLocal", 0); - digester.addCallMethod(prefix + "ejb-local-ref/ejb-link", - "setEjbLink", 0); - - - } - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/EjbRefRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/EjbRefRuleSet.java deleted file mode 100644 index b17b2ef3499fe57b4a2d4cce673b416d54822269..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/EjbRefRuleSet.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.Digester; - -/** - * This class defines a rule to analyze ejb-ref - * @author Florent Benoit - */ -public class EjbRefRuleSet extends JRuleSetBase { - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public EjbRefRuleSet(String prefix) { - super(prefix); - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "ejb-ref", - "org.ow2.jonas.deployment.common.xml.EjbRef"); - digester.addSetNext(prefix + "ejb-ref", - "addEjbRef", - "org.ow2.jonas.deployment.common.xml.EjbRef"); - - digester.addCallMethod(prefix + "ejb-ref/description", - "setDescription", 0); - digester.addCallMethod(prefix + "ejb-ref/ejb-ref-name", - "setEjbRefName", 0); - digester.addCallMethod(prefix + "ejb-ref/ejb-ref-type", - "setEjbRefType", 0); - digester.addCallMethod(prefix + "ejb-ref/home", - "setHome", 0); - digester.addCallMethod(prefix + "ejb-ref/remote", - "setRemote", 0); - digester.addCallMethod(prefix + "ejb-ref/ejb-link", - "setEjbLink", 0); - - } - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/EnvEntryRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/EnvEntryRuleSet.java deleted file mode 100644 index ffb0a368b54a0507a20d2f2d7ba41cfa6b62bcbf..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/EnvEntryRuleSet.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.Digester; - -/** - * This class defines a rule to analyze environment entries - * @author Florent Benoit - */ -public class EnvEntryRuleSet extends JRuleSetBase { - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public EnvEntryRuleSet(String prefix) { - super(prefix); - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "env-entry", - "org.ow2.jonas.deployment.common.xml.EnvEntry"); - - digester.addSetNext(prefix + "env-entry", - "addEnvEntry", - "org.ow2.jonas.deployment.common.xml.EnvEntry"); - digester.addCallMethod(prefix + "env-entry/description", - "setDescription", 0); - digester.addCallMethod(prefix + "env-entry/env-entry-name", - "setEnvEntryName", 0); - digester.addCallMethod(prefix + "env-entry/env-entry-value", - "setEnvEntryValue", 0); - digester.addCallMethod(prefix + "env-entry/env-entry-type", - "setEnvEntryType", 0); - - } - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/EnvironmentRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/EnvironmentRuleSet.java deleted file mode 100644 index 4478115611906e95e719dd905d3cac84b2266ea7..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/EnvironmentRuleSet.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.Digester; - -/** - * This class defines a rule to analyze environment of bean, web app, client, etc - * @author Florent Benoit - */ -public class EnvironmentRuleSet extends JRuleSetBase { - - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public EnvironmentRuleSet(String prefix) { - super(prefix); - } - - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addRuleSet(new ResourceEnvRefRuleSet(prefix)); - digester.addRuleSet(new ResourceRefRuleSet(prefix)); - digester.addRuleSet(new EnvEntryRuleSet(prefix)); - digester.addRuleSet(new EjbRefRuleSet(prefix)); - digester.addRuleSet(new EjbLocalRefRuleSet(prefix)); - digester.addRuleSet(new ServiceRefRuleSet(prefix)); - digester.addRuleSet(new MessageDestinationRefRuleSet(prefix)); - } - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/HandlerRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/HandlerRuleSet.java deleted file mode 100644 index 0a7a3572d1f4d3e35ef22da606e7a5841cae63f0..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/HandlerRuleSet.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.Digester; - -/** - * This class defines a rule to analyze handler - * @author Florent Benoit - */ -public class HandlerRuleSet extends JRuleSetBase { - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public HandlerRuleSet(String prefix) { - super(prefix); - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "handler", - "org.ow2.jonas.deployment.common.xml.Handler"); - - digester.addSetNext(prefix + "handler", - "addHandler", - "org.ow2.jonas.deployment.common.xml.Handler"); - - digester.addCallMethod(prefix + "handler/handler-name", - "setHandlerName", 0); - digester.addCallMethod(prefix + "handler/handler-class", - "setHandlerClass", 0); - - digester.addRuleSet(new InitParamRuleSet(prefix + "handler/")); - digester.addRuleSet(new SoapHeaderRuleSet(prefix + "handler/")); - - digester.addCallMethod(prefix + "handler/soap-role", - "addSoapRole", 0); - - digester.addCallMethod(prefix + "handler/port-name", - "addPortName", 0); - } - - /** - * @return the namespaceURI that is relevant for this RuleSet. - */ - @Override - public String getNamespaceURI() { - return "http://java.sun.com/xml/ns/j2ee"; - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/IconRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/IconRuleSet.java deleted file mode 100644 index 9546d77e1bff28bdda522bd368745e5bce51dae9..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/IconRuleSet.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: jonas-team - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.Digester; - - -/** - * This class defines the rules to analyze the element icon - * - * @author jonas-team - */ - -public class IconRuleSet extends JRuleSetBase { - - /** - *

    RuleSet for processing the contents of a - *icon definition element. - * - * @author jonas-team - */ - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public IconRuleSet(String prefix) { - super(prefix); - } - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "icon", - "org.ow2.jonas.deployment.common.xml.Icon"); - digester.addSetNext(prefix + "icon", - "setIcon", - "org.ow2.jonas.deployment.common.xml.Icon"); - digester.addCallMethod(prefix + "icon/small-icon", - "setSmallIcon", 0); - digester.addCallMethod(prefix + "icon/large-icon", - "setLargeIcon", 0); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/InitParamRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/InitParamRuleSet.java deleted file mode 100644 index 47d6d335a9ddfefc69673d6770d6d18412531cbb..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/InitParamRuleSet.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.Digester; - -/** - * This class defines a rule to analyze init-param - * @author Florent Benoit - */ -public class InitParamRuleSet extends JRuleSetBase { - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public InitParamRuleSet(String prefix) { - super(prefix); - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "init-param", - "org.ow2.jonas.deployment.common.xml.InitParam"); - - digester.addSetNext(prefix + "init-param", - "addInitParam", - "org.ow2.jonas.deployment.common.xml.InitParam"); - digester.addCallMethod(prefix + "init-param/param-name", - "setParamName", 0); - digester.addCallMethod(prefix + "init-param/param-value", - "setParamValue", 0); - digester.addCallMethod(prefix + "init-param/description", - "setDescription", 0); - - } - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JRuleSetBase.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JRuleSetBase.java deleted file mode 100644 index e473083e268bdadef71a5da4c6bbe4e6a93578e4..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JRuleSetBase.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.RuleSetBase; - - -/** - * This class defines a JOnAS rule which is used by all the rules to parse XML - * @author Florent Benoit - */ -public abstract class JRuleSetBase extends RuleSetBase { - - /** - * Pattern prefix - */ - protected String prefix = null; - - - /** - * Constructor - * use an empty prefix - */ - public JRuleSetBase() { - this(""); - } - - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public JRuleSetBase(String prefix) { - super(); - this.namespaceURI = null; - this.prefix = prefix; - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasCustomParamRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasCustomParamRuleSet.java deleted file mode 100644 index aeed1323409e1484cccc65ce3f8a09b240a0b6df..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasCustomParamRuleSet.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.Digester; - -/** - * This class defines a rule to analyze param-valueType - * @author Guillaume Sauthier - */ -public class JonasCustomParamRuleSet extends JRuleSetBase { - - /** - * paramvalueType element name - */ - private String elementName; - - /** - * xml element classname element name - */ - private String classname; - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - * @param ename element name to use - * @param classname element classname to use - */ - public JonasCustomParamRuleSet(String prefix, String ename, String classname) { - super(prefix); - elementName = ename; - this.classname = classname; - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + elementName, - "org.ow2.jonas.deployment.common.xml." + classname); - digester.addSetNext(prefix + elementName, - "add" + classname, - "org.ow2.jonas.deployment.common.xml." + classname); - digester.addCallMethod(prefix + elementName + "/param-name", - "setParamName", 0); - digester.addCallMethod(prefix + elementName + "/param-value", - "setParamValue", 0); - } - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasEjbRefRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasEjbRefRuleSet.java deleted file mode 100644 index 35c3bcd0720222d4e9e2ed076eadc9500b57dd2a..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasEjbRefRuleSet.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.Digester; - -/** - * This class defines a rule to analyze jonas-ejb-ref - * @author Florent Benoit - */ -public class JonasEjbRefRuleSet extends JRuleSetBase { - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public JonasEjbRefRuleSet(String prefix) { - super(prefix); - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "jonas-ejb-ref", - "org.ow2.jonas.deployment.common.xml.JonasEjbRef"); - digester.addSetNext(prefix + "jonas-ejb-ref", - "addJonasEjbRef", - "org.ow2.jonas.deployment.common.xml.JonasEjbRef"); - - digester.addCallMethod(prefix + "jonas-ejb-ref/ejb-ref-name", - "setEjbRefName", 0); - digester.addCallMethod(prefix + "jonas-ejb-ref/jndi-name", - "setJndiName", 0); - - } - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasEnvironmentRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasEnvironmentRuleSet.java deleted file mode 100644 index a70157b0a148356c1551f2d209f8dfbfe27b289b..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasEnvironmentRuleSet.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.Digester; - -/** - * This class defines a rule to analyze JOnAS environment of bean, web app, - * client, etc - * @author Florent Benoit - */ -public class JonasEnvironmentRuleSet extends JRuleSetBase { - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public JonasEnvironmentRuleSet(String prefix) { - super(prefix); - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addRuleSet(new JonasResourceEnvRuleSet(prefix)); - digester.addRuleSet(new JonasResourceRuleSet(prefix)); - digester.addRuleSet(new JonasEjbRefRuleSet(prefix)); - digester.addRuleSet(new JonasServiceRefRuleSet(prefix)); - digester.addRuleSet(new JonasMessageDestinationRefRuleSet(prefix)); - digester.addCallMethod(prefix + "run-as/principal-name", "setRunAsPrincipalName", 0); - } - -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasInitParamRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasInitParamRuleSet.java deleted file mode 100644 index 336c8b7f493b1ef0dddff62a342f06b05f570c24..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasInitParamRuleSet.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.Digester; - -/** - * This class defines a rule to analyze jonas-init-param - * @author Florent Benoit - */ -public class JonasInitParamRuleSet extends JRuleSetBase { - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public JonasInitParamRuleSet(String prefix) { - super(prefix); - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "jonas-init-param", - "org.ow2.jonas.deployment.common.xml.JonasInitParam"); - - digester.addSetNext(prefix + "jonas-init-param", - "addJonasInitParam", - "org.ow2.jonas.deployment.common.xml.JonasInitParam"); - digester.addCallMethod(prefix + "jonas-init-param/param-name", - "setParamName", 0); - digester.addCallMethod(prefix + "jonas-init-param/param-value", - "setParamValue", 0); - - } - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasMessageDestinationRefRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasMessageDestinationRefRuleSet.java deleted file mode 100644 index 39dc93a75a41a5ad882d086c7bee83a78d5e9aa0..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasMessageDestinationRefRuleSet.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Eric Hardesty - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.Digester; - -/** - * This class defines a rule to analyze jonas-message-destination-ref - * @author Eric Hardesty - */ -public class JonasMessageDestinationRefRuleSet extends JRuleSetBase { - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public JonasMessageDestinationRefRuleSet(String prefix) { - super(prefix); - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "jonas-message-destination-ref", - "org.ow2.jonas.deployment.common.xml.JonasMessageDestinationRef"); - digester.addSetNext(prefix + "jonas-message-destination-ref", - "addJonasMessageDestinationRef", - "org.ow2.jonas.deployment.common.xml.JonasMessageDestinationRef"); - - digester.addCallMethod(prefix + "jonas-message-destination-ref/message-destination-ref-name", - "setMessageDestinationRefName", 0); - digester.addCallMethod(prefix + "jonas-message-destination-ref/jndi-name", - "setJndiName", 0); - - } - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasMessageDestinationRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasMessageDestinationRuleSet.java deleted file mode 100644 index 2b3ba470ecc8db408a3ac1fb9813cd833c607d02..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasMessageDestinationRuleSet.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Eric Hardesty - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.Digester; - -/** - * This class defines a rule to analyze jonas-message-destination - * @author Eric Hardesty - */ -public class JonasMessageDestinationRuleSet extends JRuleSetBase { - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public JonasMessageDestinationRuleSet(String prefix) { - super(prefix); - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "jonas-message-destination", - "org.ow2.jonas.deployment.common.xml.JonasMessageDestination"); - digester.addSetNext(prefix + "jonas-message-destination", - "addJonasMessageDestination", - "org.ow2.jonas.deployment.common.xml.JonasMessageDestination"); - - digester.addCallMethod(prefix + "jonas-message-destination/message-destination-name", - "setMessageDestinationName", 0); - digester.addCallMethod(prefix + "jonas-message-destination/jndi-name", - "setJndiName", 0); - - } - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasPortComponentRefRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasPortComponentRefRuleSet.java deleted file mode 100644 index 5445153db48c609b2dbccce2fc3e9782902aa19e..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasPortComponentRefRuleSet.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.Digester; - -/** - * This class defines a rule to analyze jonas-port-component-ref - * @author Florent Benoit - */ -public class JonasPortComponentRefRuleSet extends JRuleSetBase { - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public JonasPortComponentRefRuleSet(String prefix) { - super(prefix); - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "jonas-port-component-ref", - "org.ow2.jonas.deployment.common.xml.JonasPortComponentRef"); - - digester.addSetNext(prefix + "jonas-port-component-ref", "addJonasPortComponentRef", - "org.ow2.jonas.deployment.common.xml.JonasPortComponentRef"); - digester.addCallMethod(prefix + "jonas-port-component-ref/service-endpoint-interface", - "setServiceEndpointInterface", 0); - - digester.addRuleSet(new WsdlPortRuleSet(prefix + "jonas-port-component-ref/")); - - digester.addRuleSet(new JonasCustomParamRuleSet(prefix + "jonas-port-component-ref/", "jonas-stub-property", - "JonasStubProperty")); - digester.addRuleSet(new JonasCustomParamRuleSet(prefix + "jonas-port-component-ref/", "jonas-call-property", - "JonasCallProperty")); - } - -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasResourceEnvRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasResourceEnvRuleSet.java deleted file mode 100644 index 71a89e0d7b1512e8f54773f6e0ab66fb486c2272..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasResourceEnvRuleSet.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.Digester; - -/** - * This class defines a rule to analyze jonas-resource-env - * @author Florent Benoit - */ -public class JonasResourceEnvRuleSet extends JRuleSetBase { - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public JonasResourceEnvRuleSet(String prefix) { - super(prefix); - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "jonas-resource-env", - "org.ow2.jonas.deployment.common.xml.JonasResourceEnv"); - digester.addSetNext(prefix + "jonas-resource-env", - "addJonasResourceEnv", - "org.ow2.jonas.deployment.common.xml.JonasResourceEnv"); - - digester.addCallMethod(prefix + "jonas-resource-env/resource-env-ref-name", - "setResourceEnvRefName", 0); - digester.addCallMethod(prefix + "jonas-resource-env/jndi-name", - "setJndiName", 0); - - } - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasResourceRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasResourceRuleSet.java deleted file mode 100644 index 12268552ec0dba7b7bf03a4e401b9be22f7c926a..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasResourceRuleSet.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.Digester; - -/** - * This class defines a rule to analyze jonas-resource - * @author Florent Benoit - */ -public class JonasResourceRuleSet extends JRuleSetBase { - - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public JonasResourceRuleSet(String prefix) { - super(prefix); - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "jonas-resource", - "org.ow2.jonas.deployment.common.xml.JonasResource"); - digester.addSetNext(prefix + "jonas-resource", - "addJonasResource", - "org.ow2.jonas.deployment.common.xml.JonasResource"); - - digester.addCallMethod(prefix + "jonas-resource/res-ref-name", - "setResRefName", 0); - digester.addCallMethod(prefix + "jonas-resource/jndi-name", - "setJndiName", 0); - - } - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasServiceRefRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasServiceRefRuleSet.java deleted file mode 100644 index 812918261421ce42fe1a146607c89ac748c13500..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/JonasServiceRefRuleSet.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.Digester; - -/** - * This class defines a rule to analyze element jonas-service-ref - * @author Florent Benoit - */ -public class JonasServiceRefRuleSet extends JRuleSetBase { - - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public JonasServiceRefRuleSet(String prefix) { - super(prefix); - } - - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "jonas-service-ref", - "org.ow2.jonas.deployment.common.xml.JonasServiceRef"); - digester.addSetNext(prefix + "jonas-service-ref", - "addJonasServiceRef", - "org.ow2.jonas.deployment.common.xml.JonasServiceRef"); - - // jonas-service-ref/service-ref-name - digester.addCallMethod(prefix + "jonas-service-ref/service-ref-name", - "setServiceRefName", 0); - - // jonas-service-ref/alt-wsdl - digester.addCallMethod(prefix + "jonas-service-ref/alt-wsdl", "setAltWsdl", 0); - - // jonas-service-ref/jonas-init-param* - digester.addRuleSet(new JonasCustomParamRuleSet(prefix + "jonas-service-ref/", "jonas-init-param", "JonasInitParam")); - // jonas-service-ref/jonas-port-component-ref* - digester.addRuleSet(new JonasPortComponentRefRuleSet(prefix + "jonas-service-ref/")); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/MessageDestinationRefRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/MessageDestinationRefRuleSet.java deleted file mode 100644 index 7f72a783d66020bae0e252247af5b260777a4774..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/MessageDestinationRefRuleSet.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Eric Hardesty - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.Digester; - -/** - * This class defines a rule to analyze message-destination-ref - * @author Eric Hardesty - */ -public class MessageDestinationRefRuleSet extends JRuleSetBase { - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public MessageDestinationRefRuleSet(String prefix) { - super(prefix); - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "message-destination-ref", - "org.ow2.jonas.deployment.common.xml.MessageDestinationRef"); - digester.addSetNext(prefix + "message-destination-ref", - "addMessageDestinationRef", - "org.ow2.jonas.deployment.common.xml.MessageDestinationRef"); - - digester.addCallMethod(prefix + "message-destination-ref/description", - "setDescription", 0); - digester.addCallMethod(prefix + "message-destination-ref/message-destination-ref-name", - "setMessageDestinationRefName", 0); - digester.addCallMethod(prefix + "message-destination-ref/message-destination-type", - "setMessageDestinationType", 0); - digester.addCallMethod(prefix + "message-destination-ref/message-destination-usage", - "setMessageDestinationUsage", 0); - digester.addCallMethod(prefix + "message-destination-ref/message-destination-link", - "setMessageDestinationLink", 0); - - } - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/MessageDestinationRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/MessageDestinationRuleSet.java deleted file mode 100644 index 37e1c3e4621b2ba96507ad1d31ae763bbf52fce0..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/MessageDestinationRuleSet.java +++ /dev/null @@ -1,61 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Eric Hardesty - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.Digester; - -/** - * This class defines a rule to analyze message-destination - * @author Eric Hardesty - */ -public class MessageDestinationRuleSet extends JRuleSetBase { - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public MessageDestinationRuleSet(String prefix) { - super(prefix); - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "message-destination", - "org.ow2.jonas.deployment.common.xml.MessageDestination"); - digester.addSetNext(prefix + "message-destination", - "addMessageDestination", - "org.ow2.jonas.deployment.common.xml.MessageDestination"); - - digester.addCallMethod(prefix + "message-destination/message-destination-name", - "setMessageDestinationName", 0); - } - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/PortComponentRefRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/PortComponentRefRuleSet.java deleted file mode 100644 index 49b346b2719e0f76ba65e73be9165a14eccfec46..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/PortComponentRefRuleSet.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.Digester; - -/** - * This class defines a rule to analyze port-component-ref - * @author Florent Benoit - */ -public class PortComponentRefRuleSet extends JRuleSetBase { - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public PortComponentRefRuleSet(String prefix) { - super(prefix); - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "port-component-ref", - "org.ow2.jonas.deployment.common.xml.PortComponentRef"); - - digester.addSetNext(prefix + "port-component-ref", - "addPortComponentRef", - "org.ow2.jonas.deployment.common.xml.PortComponentRef"); - digester.addCallMethod(prefix + "port-component-ref/service-endpoint-interface", - "setServiceEndpointInterface", 0); - digester.addCallMethod(prefix + "port-component-ref/port-component-link", - "setPortComponentLink", 0); - } - - /** - * @return the namespaceURI that is relevant for this RuleSet. - */ - @Override - public String getNamespaceURI() { - return "http://java.sun.com/xml/ns/j2ee"; - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/QNameRule.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/QNameRule.java deleted file mode 100644 index eeeea6aa2253387ffac84a9936963983f9aebb57..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/QNameRule.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.rules; - -import java.util.StringTokenizer; - -import javax.xml.namespace.QName; - -import org.ow2.jonas.deployment.common.xml.Qname; - -import org.apache.commons.digester.Rule; - - -/** - * Rule that create a new QName object - * @author Florent Benoit - */ -public class QNameRule extends Rule { - - - /** - * This method is called when the body of a matching XML element is - * encountered. If the element has no body, this method is not called at - * all. The default implementation delegates to the deprecated method - * body without the namespace and name parameters, to retain backwards - * compatibility. - * @param namespace the namespace URI of the matching element, - * or an empty string if the parser is not namespace - * aware or the element has no namespace - * @param name the local name if the parser is namespace aware, - * or just the element name otherwise - * @param text The text of the body of this element - */ - public void body(String namespace, String name, String text) { - - // Check that there the value of the element is not null - if (text == null) { - throw new IllegalArgumentException("No QName found in the body of the tag " + name); - } - - // Extract prefix and localpart - StringTokenizer st = new StringTokenizer(text, ":"); - if (st.countTokens() != 2) { - throw new IllegalArgumentException("QName must be on the form prefix:localpart for element " + name); - } - String prefix = st.nextToken(); - String localPart = st.nextToken(); - - // Get namespaceURI from prefix - String namespaceURI = digester.findNamespaceURI(prefix); - if (namespaceURI == null) { - throw new IllegalArgumentException("No namespace found for the prefix '" + prefix + "' in element " + name); - } - - // Build QName - QName qName = new QName(namespaceURI, localPart, prefix); - - // Add this QName to the element at the top of the stack - Qname qNameObject = (Qname) digester.peek(); - qNameObject.setName(name); - qNameObject.setQName(qName); - - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/ResourceEnvRefRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/ResourceEnvRefRuleSet.java deleted file mode 100644 index daef2b664be97a06a5bbd832e5e16f95c47e76a6..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/ResourceEnvRefRuleSet.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.Digester; -/** - * This class defines a rule to analyze resource-env-ref - * @author Florent Benoit - */ -public class ResourceEnvRefRuleSet extends JRuleSetBase { - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public ResourceEnvRefRuleSet(String prefix) { - super(prefix); - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "resource-env-ref", - "org.ow2.jonas.deployment.common.xml.ResourceEnvRef"); - - digester.addSetNext(prefix + "resource-env-ref", - "addResourceEnvRef", - "org.ow2.jonas.deployment.common.xml.ResourceEnvRef"); - digester.addCallMethod(prefix + "resource-env-ref/description", - "setDescription", 0); - digester.addCallMethod(prefix + "resource-env-ref/resource-env-ref-name", - "setResourceEnvRefName", 0); - digester.addCallMethod(prefix + "resource-env-ref/resource-env-ref-type", - "setResourceEnvRefType", 0); - } - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/ResourceRefRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/ResourceRefRuleSet.java deleted file mode 100644 index dc2535ed1062e3e7c1d71515cec52687ea07aee2..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/ResourceRefRuleSet.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.Digester; - -/** - * This class defines a rule to analyze resource-ref - * @author Florent Benoit - */ -public class ResourceRefRuleSet extends JRuleSetBase { - - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public ResourceRefRuleSet(String prefix) { - super(prefix); - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "resource-ref", - "org.ow2.jonas.deployment.common.xml.ResourceRef"); - - digester.addSetNext(prefix + "resource-ref", - "addResourceRef", - "org.ow2.jonas.deployment.common.xml.ResourceRef"); - digester.addCallMethod(prefix + "resource-ref/description", - "setDescription", 0); - digester.addCallMethod(prefix + "resource-ref/res-ref-name", - "setResRefName", 0); - digester.addCallMethod(prefix + "resource-ref/res-type", - "setResType", 0); - digester.addCallMethod(prefix + "resource-ref/res-auth", - "setResAuth", 0); - digester.addCallMethod(prefix + "resource-ref/res-sharing-scope", - "setResSharingScope", 0); - - - } - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/RunAsRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/RunAsRuleSet.java deleted file mode 100644 index 1b34c4d8b891a53e94c692b95c1daac0028d34bf..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/RunAsRuleSet.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: JOnAS team - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.Digester; - -/** - * This class defines the rules to analyze the element run-as - * - * @author JOnAS team - */ - -public class RunAsRuleSet extends JRuleSetBase { - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public RunAsRuleSet(String prefix) { - super(prefix); - } - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "run-as", - "org.ow2.jonas.deployment.common.xml.RunAs"); - digester.addSetNext(prefix + "run-as", - "setRunAs", - "org.ow2.jonas.deployment.common.xml.RunAs"); - digester.addCallMethod(prefix + "run-as/description", - "setDescription", 0); - digester.addCallMethod(prefix + "run-as/role-name", - "setRoleName", 0); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/SecurityRoleRefRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/SecurityRoleRefRuleSet.java deleted file mode 100644 index cba91bcd37892d575416352b8b2fc23fa12c1882..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/SecurityRoleRefRuleSet.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: JOnAS team - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.Digester; - -/** - * This class defines the rules to analyze the element security-role-ref - * - * @author JOnAS team - */ - -public class SecurityRoleRefRuleSet extends JRuleSetBase { - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public SecurityRoleRefRuleSet(String prefix) { - super(prefix); - } - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "security-role-ref", - "org.ow2.jonas.deployment.common.xml.SecurityRoleRef"); - digester.addSetNext(prefix + "security-role-ref", - "addSecurityRoleRef", - "org.ow2.jonas.deployment.common.xml.SecurityRoleRef"); - digester.addCallMethod(prefix + "security-role-ref/description", - "setDescription", 0); - digester.addCallMethod(prefix + "security-role-ref/role-name", - "setRoleName", 0); - digester.addCallMethod(prefix + "security-role-ref/role-link", - "setRoleLink", 0); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/SecurityRoleRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/SecurityRoleRuleSet.java deleted file mode 100644 index 9c1fcdb3b240779e5f0d4f88f742c0aad789f355..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/SecurityRoleRuleSet.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: JOnAS team - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.Digester; - -/** - * This class defines the rules to analyze the element security-role - * - * @author JOnAS team - */ - -public class SecurityRoleRuleSet extends JRuleSetBase { - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public SecurityRoleRuleSet(String prefix) { - super(prefix); - } - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "security-role", - "org.ow2.jonas.deployment.common.xml.SecurityRole"); - digester.addSetNext(prefix + "security-role", - "addSecurityRole", - "org.ow2.jonas.deployment.common.xml.SecurityRole"); - digester.addCallMethod(prefix + "security-role/description", - "setDescription", 0); - digester.addCallMethod(prefix + "security-role/role-name", - "setRoleName", 0); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/ServiceQnameRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/ServiceQnameRuleSet.java deleted file mode 100644 index a227bed0d6fd56042f41790bc70ac151df3a75ad..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/ServiceQnameRuleSet.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.rules; - - -import org.apache.commons.digester.Digester; - - -/** - * This class defines a rule to analyze service-qname - * @author Florent Benoit - */ -public class ServiceQnameRuleSet extends JRuleSetBase { - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public ServiceQnameRuleSet(String prefix) { - super(prefix); - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - - digester.addObjectCreate(prefix + "service-qname", - "org.ow2.jonas.deployment.common.xml.Qname"); - - // Object created at runtime with the right namespace - digester.addRule(prefix + "service-qname", new QNameRule()); - - digester.addSetNext(prefix + "service-qname", - "setServiceQname", - "org.ow2.jonas.deployment.common.xml.Qname"); - - } - - /** - * @return the namespaceURI that is relevant for this RuleSet. - */ - @Override - public String getNamespaceURI() { - return "http://java.sun.com/xml/ns/j2ee"; - } - -} - diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/ServiceRefRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/ServiceRefRuleSet.java deleted file mode 100644 index cbd223dfe3bad2b92817d6fb14b0ccdf840b39c1..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/ServiceRefRuleSet.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.Digester; - -/** - * This class defines a rule to analyze element service-ref - * @author Florent Benoit - */ -public class ServiceRefRuleSet extends JRuleSetBase { - - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public ServiceRefRuleSet(String prefix) { - super(prefix); - } - - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "service-ref", - "org.ow2.jonas.deployment.common.xml.ServiceRef"); - - digester.addSetNext(prefix + "service-ref", - "addServiceRef", - "org.ow2.jonas.deployment.common.xml.ServiceRef"); - - digester.addCallMethod(prefix + "service-ref/service-ref-name", - "setServiceRefName", 0); - - - digester.addCallMethod(prefix + "service-ref/service-interface", - "setServiceInterface", 0); - - digester.addCallMethod(prefix + "service-ref/wsdl-file", - "setWsdlFile", 0); - - digester.addCallMethod(prefix + "service-ref/jaxrpc-mapping-file", - "setJaxrpcMappingFile", 0); - - - digester.addRuleSet(new ServiceQnameRuleSet(prefix + "service-ref/")); - digester.addRuleSet(new PortComponentRefRuleSet(prefix + "service-ref/")); - digester.addRuleSet(new HandlerRuleSet(prefix + "service-ref/")); - } - - /** - * @return the namespaceURI that is relevant for this RuleSet. - */ - @Override - public String getNamespaceURI() { - return "http://java.sun.com/xml/ns/j2ee"; - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/SoapHeaderRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/SoapHeaderRuleSet.java deleted file mode 100644 index 237cc9b0ab636cbb4c4cc390c7b2ae5bb9be622c..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/SoapHeaderRuleSet.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.Digester; - -/** - * This class defines a rule to analyze soap-header - * @author Florent Benoit - */ -public class SoapHeaderRuleSet extends JRuleSetBase { - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public SoapHeaderRuleSet(String prefix) { - super(prefix); - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "soap-header", - "org.ow2.jonas.deployment.common.xml.Qname"); - - // Object created at runtime with the right namespace - digester.addRule(prefix + "soap-header", - new QNameRule()); - - digester.addSetNext(prefix + "soap-header", - "addSoapHeader", - "org.ow2.jonas.deployment.common.xml.Qname"); - - } - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/WsdlPortRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/WsdlPortRuleSet.java deleted file mode 100644 index 22b95b22f688b7af9c50865c94b236e55084131b..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/rules/WsdlPortRuleSet.java +++ /dev/null @@ -1,61 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: JOnAS team - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.rules; - -import org.apache.commons.digester.Digester; - -/** - * This class defines the rules to analyze the element wsdl-port - * - * @author JOnAS team - */ - -public class WsdlPortRuleSet extends JRuleSetBase { - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public WsdlPortRuleSet(String prefix) { - super(prefix); - } - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "wsdl-port", - "org.ow2.jonas.deployment.common.xml.Qname"); - // Object created at runtime with the right namespace - digester.addRule(prefix + "wsdl-port", new QNameRule()); - digester.addSetNext(prefix + "wsdl-port", - "setWsdlPort", - "org.ow2.jonas.deployment.common.xml.Qname"); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/util/ResourceHelper.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/util/ResourceHelper.java deleted file mode 100644 index c176cd09f0d3e0aa7e362aac005e23b56452d8ad..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/util/ResourceHelper.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.util; - -/** - * Resource name helper. - * @author Guillaume Sauthier - */ -public final class ResourceHelper { - - /** - * Default private constructor for utility class. - */ - private ResourceHelper() { } - - /** - * @param clazz Class located in the package. - * @return the class package name that can be used to load resources (. replaced by /). - */ - public static String getResourcePackage(final Class clazz) { - String packageName = clazz.getPackage().getName(); - return convertPackageName(packageName); - } - - /** - * @param packageName a java package name. - * @return the package name that can be used to load resources (. replaced by /). - */ - public static String convertPackageName(final String packageName) { - return packageName.replace('.', '/').concat("/"); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/AbsDescriptionElement.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/AbsDescriptionElement.java deleted file mode 100644 index 2f4b63ce954b42924d0d138a4145bd0436e9a036..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/AbsDescriptionElement.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines an abstract implementation for all statndard environment element - * (entity, session, web-app, application-client, etc.).. - * - * @author Florent Benoit - */ -public abstract class AbsDescriptionElement extends AbsElement implements DescriptionGroupXml { - - /** - * icon - */ - private Icon icon = null; - - /** - * description - */ - private String description = null; - - /** - * Display name - */ - private String displayName = null; - - /** - * Construct an empty AbsDescriptionElement. - */ - public AbsDescriptionElement() { - super(); - icon = new Icon(); - } - - /** - * @return the display-name element - */ - public String getDisplayName() { - return displayName; - } - - - /** - * Set the display-name - * @param displayname displayname - */ - public void setDisplayName(String displayname) { - displayName = displayname; - } - /** - * @return the icon - */ - public Icon getIcon() { - return icon; - } - - - /** - * Set the icon - * @param icon icon - */ - public void setIcon(Icon icon) { - this.icon = icon; - } - - - /** - * Set the small icon - * @param small small icon - */ - public void setSmallIcon(String small) { - icon.setSmallIcon(small); - } - - /** - * get the small icon - * @return String small icon - */ - public String setSmallIcon() { - return icon.getSmallIcon(); - } - /** - * Set the large icon - * @param large large icon - */ - public void setLargeIcon(String large) { - icon.setLargeIcon(large); - } - /** - * get the large icon - * @return String large icon - */ - public String setLargeIcon() { - return icon.getLargeIcon(); - } - - /** - * @return the description - */ - public String getDescription() { - return description; - } - - /** - * Set the description - * @param description description - */ - public void setDescription(String description) { - this.description = description; - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/AbsElement.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/AbsElement.java deleted file mode 100644 index 4004b075dcc67fc7c9a26e78e070f7f45f0226a5..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/AbsElement.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines the implementation of the interface Element. - * These elements are used by Digester during the xml parsing. - * @author Florent Benoit - */ -public abstract class AbsElement implements Element { - - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public abstract String toXML(int indent); - - - /** - * Represents this element by it's XML description. - * Use a default indent set to 0. - * @return the XML description of this object. - */ - public String toXML() { - return toXML(0); - } - - /** - * Return the representation of this element. - * Use the XML representation of the object for the toString() method. - * @return the XML description of this object. - */ - public String toString() { - return toXML(); - } - - - /** - * Return indent spaces. - * @param indent number of indentation. - * @return the indent space string. - */ - protected String indent(int indent) { - String txt = ""; - for (int i = 0; i < indent; i++) { - txt += " "; - } - return txt; - } - - /** - * Return the xml representation of the specified value with the root-element xmlTag - * @param value String value to represent in XML - * @param xmlTag tag of the root-element - * @param indent indent to use - * @return xml representation of the specified value - */ - protected String xmlElement(String value, String xmlTag, int indent) { - if (value == null) { - return ""; - } - - // else - - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("<"); - sb.append(xmlTag); - sb.append(">"); - sb.append(value); - sb.append("\n"); - return sb.toString(); - } - - /** - * Return the xml representation of the specified attribute value - * @param value String value to represent in XML - * @param xmlTag tag of the attribute - * @return xml representation of the specified value - */ - protected String xmlAttribute(String value, String xmlTag) { - if (value == null) { - return ""; - } - - // else - - StringBuffer sb = new StringBuffer(); - sb.append(" "); - sb.append(xmlTag); - sb.append("=\""); - sb.append(value); - sb.append("\""); - return sb.toString(); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/AbsEnvironmentElement.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/AbsEnvironmentElement.java deleted file mode 100644 index 76bd0df10ff1e9a2a56a225407a2464c0e4aba70..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/AbsEnvironmentElement.java +++ /dev/null @@ -1,221 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines an abstract implementation for all environment element - * - * Entity, Session, WebApp, Application-client elements must extend this class - * @author Florent Benoit - */ -public abstract class AbsEnvironmentElement extends AbsDescriptionElement implements JndiEnvRefsGroupXml { - - /** - * List of ejb-local-ref - */ - private JLinkedList ejbLocalRefList = null; - - /** - * List of ejb-ref - */ - private JLinkedList ejbRefList = null; - - /** - * List of env-entry - */ - private JLinkedList envEntryList = null; - - /** - * List of resource-env-ref - */ - private JLinkedList resourceEnvRefList = null; - - /** - * List of resource-ref - */ - private JLinkedList resourceRefList = null; - - - /** - * List of service-ref - */ - private JLinkedList serviceRefList = null; - - /** - * List of message-destination-ref - */ - private JLinkedList messageDestinationRefList = null; - - /** - * List of persistence-unit-ref - */ - private JLinkedList persistenceUnitRefList = null; - - /** - * Constructor : build a new object for environment - */ - public AbsEnvironmentElement() { - super(); - ejbLocalRefList = new JLinkedList("ejb-local-ref"); - ejbRefList = new JLinkedList("ejb-ref"); - envEntryList = new JLinkedList("env-entry"); - resourceEnvRefList = new JLinkedList("resource-env-ref"); - resourceRefList = new JLinkedList("resource-ref"); - serviceRefList = new JLinkedList("service-ref"); - messageDestinationRefList = new JLinkedList("message-destination-ref"); - persistenceUnitRefList = new JLinkedList("persistence-unit-ref"); - } - - - - // Setters - - /** - * Add a new ejb-local-ref element to this object - * @param ejbLocalRef the ejb-local-ref object - */ - public void addEjbLocalRef(final EjbLocalRef ejbLocalRef) { - ejbLocalRefList.add(ejbLocalRef); - } - - - /** - * Add a new ejb-ref element to this object - * @param ejbRef the ejb-ref object - */ - public void addEjbRef(final EjbRef ejbRef) { - ejbRefList.add(ejbRef); - } - - /** - * Add a new env-entry element to this object - * @param envEntry the ejb-ref object - */ - public void addEnvEntry(final EnvEntry envEntry) { - envEntryList.add(envEntry); - } - - /** - * Add a new resource-env-ref element to this object - * @param resourceEnvRef the resource-env-ref object - */ - public void addResourceEnvRef(final ResourceEnvRef resourceEnvRef) { - resourceEnvRefList.add(resourceEnvRef); - } - - /** - * Add a new resource-ref element to this object - * @param resourceRef the resource-ref object - */ - public void addResourceRef(final ResourceRef resourceRef) { - resourceRefList.add(resourceRef); - } - - - /** - * Add a new service-ref element to this object - * @param serviceRef the service-ref object - */ - public void addServiceRef(final ServiceRef serviceRef) { - serviceRefList.add(serviceRef); - } - - /** - * Add a new message-destination-ref element to this object - * @param messageDestinationRef the message-destination-ref object - */ - public void addMessageDestinationRef(final MessageDestinationRef messageDestinationRef) { - messageDestinationRefList.add(messageDestinationRef); - } - - /** - * Add a new persistence-unit-ref element to this object - * @param persistenceUnitRef the persistence-unit-ref object - */ - public void addPersistenceUnitRef(final PersistenceUnitRef persistenceUnitRef) { - persistenceUnitRefList.add(persistenceUnitRef); - } - - // Getters - - /** - * @return the list of all ejb-local-ref elements - */ - public JLinkedList getEjbLocalRefList() { - return ejbLocalRefList; - } - - /** - * @return the list of all ejb-ref elements - */ - public JLinkedList getEjbRefList() { - return ejbRefList; - } - - /** - * @return the list of all env-entry elements - */ - public JLinkedList getEnvEntryList() { - return envEntryList; - } - - /** - * @return the list of all resource-env-ref elements - */ - public JLinkedList getResourceEnvRefList() { - return resourceEnvRefList; - } - - - /** - * @return the list of all resource-ref elements - */ - public JLinkedList getResourceRefList() { - return resourceRefList; - } - - /** - * @return the list of all service-ref elements - */ - public JLinkedList getServiceRefList() { - return serviceRefList; - } - - /** - * @return the list of all messageDestination-ref elements - */ - public JLinkedList getMessageDestinationRefList() { - return messageDestinationRefList; - } - - /** - * @return the list of all persistence-unit-ref elements - */ - public JLinkedList getPersistenceUnitRefList() { - return persistenceUnitRefList; - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/AbsJonasEnvironmentElement.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/AbsJonasEnvironmentElement.java deleted file mode 100644 index 6cb0dcc600c604848c2cd959e6711cdf07f48cec..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/AbsJonasEnvironmentElement.java +++ /dev/null @@ -1,159 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines an abstract implementation for all jonas environment element - * (jonas-entity, jonas-session, jonas-web-app, jonas-client, etc.). - * - * @author Florent Benoit - */ -public abstract class AbsJonasEnvironmentElement extends AbsElement implements JonasJndiEnvRefsGroupXml { - - /** - * List of jonas-ejb-ref - */ - private JLinkedList jonasEjbRefList = null; - - /** - * List of jonas-resource-env - */ - private JLinkedList jonasResourceEnvRefList = null; - - /** - * List of jonas-resource - */ - private JLinkedList jonasResourceRefList = null; - - - /** - * List of jonas-service-ref - */ - private JLinkedList jonasServiceRefList = null; - - /** - * List of jonas-message-destination-ref - */ - private JLinkedList jonasMessageDestinationRefList = null; - - /** - * Constructor : build a new object which is common to environment elements - */ - public AbsJonasEnvironmentElement() { - super(); - jonasEjbRefList = new JLinkedList("jonas-ejb-ref"); - jonasResourceEnvRefList = new JLinkedList("jonas-resource-env"); - jonasResourceRefList = new JLinkedList("jonas-resource"); - jonasServiceRefList = new JLinkedList("jonas-service-ref"); - jonasMessageDestinationRefList = new JLinkedList("jonas-message-destination-ref"); - } - - - - // Setters - - /** - * Add a new jonas-ejb-ref element to this object - * @param jonasEjbRef the jonas-ejb-ref object - */ - public void addJonasEjbRef(JonasEjbRef jonasEjbRef) { - jonasEjbRefList.add(jonasEjbRef); - } - - - /** - * Add a new jonas-resource-env element to this object - * @param jonasResourceEnv the jonas-resource-env object - */ - public void addJonasResourceEnv(JonasResourceEnv jonasResourceEnv) { - jonasResourceEnvRefList.add(jonasResourceEnv); - } - - /** - * Add a new jonas-resource element to this object - * @param jonasResource the jonas-resource object - */ - public void addJonasResource(JonasResource jonasResource) { - jonasResourceRefList.add(jonasResource); - } - - /** - * Add a new jonas-service-ref element to this object - * @param jonasServiceRef the jonas-service-ref object - */ - public void addJonasServiceRef(JonasServiceRef jonasServiceRef) { - jonasServiceRefList.add(jonasServiceRef); - } - - - /** - * Add a new jonas-message-destination-ref element to this object - * @param jonasMessageDestinationRef the jonas-message-destination-ref object - */ - public void addJonasMessageDestinationRef(JonasMessageDestinationRef jonasMessageDestinationRef) { - jonasMessageDestinationRefList.add(jonasMessageDestinationRef); - } - - // Getters - - /** - * @return the list of all jonas-ejb-ref elements - */ - public JLinkedList getJonasEjbRefList() { - return jonasEjbRefList; - } - - /** - * @return the list of all jonas-resource-env elements - */ - public JLinkedList getJonasResourceEnvList() { - return jonasResourceEnvRefList; - } - - /** - * @return the list of all jonas-resource elements - */ - public JLinkedList getJonasResourceList() { - return jonasResourceRefList; - } - - - /** - * @return the list of all jonas-service-ref elements - */ - public JLinkedList getJonasServiceRefList() { - return jonasServiceRefList; - } - - /** - * @return the list of all jonas-message-destination-ref elements - */ - public JLinkedList getJonasMessageDestinationRefList() { - return jonasMessageDestinationRefList; - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/AbsJonasParam.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/AbsJonasParam.java deleted file mode 100644 index 35579b833b48459a59c453ef2fbdc2be3d4d5b8d..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/AbsJonasParam.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines the implementation of the element jonas-param - * @author Guillaume Sauthier - */ -public abstract class AbsJonasParam extends AbsElement { - - /** - * Name of this parameter - */ - private String paramName = null; - - /** - * Value of this parameter - */ - private String paramValue = null; - - /** - * Element name - */ - private String elementName = null; - - /** - * Construct a JOnASParam with given Element name. - * @param ename Element name - */ - protected AbsJonasParam(String ename) { - elementName = ename; - } - - // Setters - - /** - * Sets the name - * @param paramName the name to use - */ - public void setParamName(String paramName) { - this.paramName = paramName; - } - - - /** - * Sets the value - * @param paramValue the value - */ - public void setParamValue(String paramValue) { - this.paramValue = paramValue; - } - - // Getters - - - /** - * @return the name of the parameter - */ - public String getParamName() { - return paramName; - } - - - /** - * @return the value of the parameter - */ - public String getParamValue() { - return paramValue; - } - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("<" + elementName + ">\n"); - - indent += 2; - - // name - sb.append(xmlElement(paramName, "param-name", indent)); - - // value - sb.append(xmlElement(paramValue, "param-value", indent)); - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } - - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/DescriptionGroupXml.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/DescriptionGroupXml.java deleted file mode 100644 index 652af9d1837f3b367ad3fccf44a8227e5f9aef45..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/DescriptionGroupXml.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Philippe Coq - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.deployment.common.xml; - -/** - * This interface provides to the value of Xml element of a DescritionGroup - * @author Philippe Coq - */ - -public interface DescriptionGroupXml { - - /** - * Get the display name of the deployment descriptor. - * @return the display name of the deployment descriptor. - */ - String getDisplayName(); - - /** - * Get the description of the deployment descriptor. - * @return the description of the deployment descriptor. - */ - String getDescription(); - - /** - * Get the icon of the deployment descriptor. - * @return the small-icon of the deployment descriptor. - */ - Icon getIcon(); - - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/EjbLocalRef.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/EjbLocalRef.java deleted file mode 100644 index e34969af33b376636782cd7c3d6855e1d22547ae..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/EjbLocalRef.java +++ /dev/null @@ -1,208 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines the implementation of the element ejb-local-ref. - * @author Florent Benoit - */ -public class EjbLocalRef extends AbsElement { - - /** - * Description of the ejb-local-ref - */ - private String description = null; - - /** - * Name of this ejb-local-ref - */ - private String ejbRefName = null; - - /** - * Type of this ejb-local-ref - */ - private String ejbRefType = null; - - /** - * Local Home of this ejb-local-ref - */ - private String localHome = null; - - /** - * Local interface of this ejb-local-ref - */ - private String local = null; - - /** - * ejb-link of this ejb-local-ref - */ - private String ejbLink = null; - - - // Setters - - /** - * Sets the description - * @param description the description to use - */ - public void setDescription(String description) { - this.description = description; - } - - - /** - * Sets the name - * @param ejbRefName the name to use - */ - public void setEjbRefName(String ejbRefName) { - this.ejbRefName = ejbRefName; - } - - - /** - * Sets the type - * @param ejbRefType the type to use - */ - public void setEjbRefType(String ejbRefType) { - this.ejbRefType = ejbRefType; - } - - - /** - * Sets the local home interface - * @param localHome the local home interface to use - */ - public void setLocalHome(String localHome) { - this.localHome = localHome; - } - /** - * Sets the local interface - * @param local the local interface to use - */ - public void setLocal(String local) { - this.local = local; - } - - - /** - * Sets the ejb-link - * @param ejbLink the ejb-link to use - */ - public void setEjbLink(String ejbLink) { - this.ejbLink = ejbLink; - } - - - // Getters - - /** - * @return the description of the ejb-local-ref - */ - public String getDescription() { - return description; - } - - - /** - * @return the name of the ejb-local-ref - */ - public String getEjbRefName() { - return ejbRefName; - } - - - /** - * @return the type of the ejb-local-ref - */ - public String getEjbRefType() { - return ejbRefType; - } - - /** - * @return the local home interface of the ejb-local-ref - */ - public String getLocalHome() { - return localHome; - } - - /** - * @return the local interface of the ejb-local-ref - */ - public String getLocal() { - return local; - } - - /** - * @return the ejb-link of the ejb-local-ref - */ - public String getEjbLink() { - return ejbLink; - } - - - - - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // Description - sb.append(xmlElement(description, "description", indent)); - - // name - sb.append(xmlElement(ejbRefName, "ejb-ref-name", indent)); - - // type - sb.append(xmlElement(ejbRefType, "ejb-ref-type", indent)); - - // local home interface - sb.append(xmlElement(localHome, "local-home", indent)); - - // local interface - sb.append(xmlElement(local, "local", indent)); - - // ejb-link - sb.append(xmlElement(ejbLink, "ejb-link", indent)); - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/EjbRef.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/EjbRef.java deleted file mode 100644 index d17e9c06cc22e54a87cca25794f6ee744cae211c..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/EjbRef.java +++ /dev/null @@ -1,208 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines the implementation of the element ejb-ref. - * @author Florent Benoit - */ -public class EjbRef extends AbsElement { - - /** - * Description of the ejb-ref - */ - private String description = null; - - /** - * Name of this ejb-ref - */ - private String ejbRefName = null; - - /** - * Type of this ejb-ref - */ - private String ejbRefType = null; - - /** - * Home of this ejb-ref - */ - private String home = null; - - /** - * Remote of this ejb-ref - */ - private String remote = null; - - /** - * ejb-link of this ejb-ref - */ - private String ejbLink = null; - - - // Setters - - /** - * Sets the description - * @param description the description to use - */ - public void setDescription(String description) { - this.description = description; - } - - - /** - * Sets the name - * @param ejbRefName the name to use - */ - public void setEjbRefName(String ejbRefName) { - this.ejbRefName = ejbRefName; - } - - - /** - * Sets the type - * @param ejbRefType the type to use - */ - public void setEjbRefType(String ejbRefType) { - this.ejbRefType = ejbRefType; - } - - - /** - * Sets the home interface - * @param home the home interface to use - */ - public void setHome(String home) { - this.home = home; - } - /** - * Sets the remote interface - * @param remote the remote interface to use - */ - public void setRemote(String remote) { - this.remote = remote; - } - - - /** - * Sets the ejb-link - * @param ejbLink the ejb-link to use - */ - public void setEjbLink(String ejbLink) { - this.ejbLink = ejbLink; - } - - - // Getters - - /** - * @return the description of the ejb-ref - */ - public String getDescription() { - return description; - } - - - /** - * @return the name of the ejb-ref - */ - public String getEjbRefName() { - return ejbRefName; - } - - - /** - * @return the type of the ejb-ref - */ - public String getEjbRefType() { - return ejbRefType; - } - - /** - * @return the home interface of the ejb-ref - */ - public String getHome() { - return home; - } - - /** - * @return the remote interface of the ejb-ref - */ - public String getRemote() { - return remote; - } - - /** - * @return the ejb-link of the ejb-ref - */ - public String getEjbLink() { - return ejbLink; - } - - - - - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // Description - sb.append(xmlElement(description, "description", indent)); - - // name - sb.append(xmlElement(ejbRefName, "ejb-ref-name", indent)); - - // type - sb.append(xmlElement(ejbRefType, "ejb-ref-type", indent)); - - // home interface - sb.append(xmlElement(home, "home", indent)); - - // remote interface - sb.append(xmlElement(remote, "remote", indent)); - - // ejb-link - sb.append(xmlElement(ejbLink, "ejb-link", indent)); - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/Element.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/Element.java deleted file mode 100644 index d6c5420e6876f24a954c99e492f549f4cb8d66d5..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/Element.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -import java.io.Serializable; - -/** - * This class defines the interface that all Element objects must use. - * These elements are used by Digester during the xml parsing - * @author Florent Benoit - */ -public interface Element extends Serializable { - - - /** - * Represents this element by it's XML description - * @param indent use this indent for prexifing XML representation - * @return the XML description of this object - */ - String toXML(int indent); - - - /** - * Represents this element by it's XML description - * Use a default indent set to 0 - * @return the XML description of this object - */ - String toXML(); - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/EnvEntry.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/EnvEntry.java deleted file mode 100644 index 256ba1d42b1c26a42e50dd57382d2ad7d071c8cd..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/EnvEntry.java +++ /dev/null @@ -1,159 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines the implementation of the element env-entry. - * @author Florent Benoit - */ -public class EnvEntry extends AbsElement { - - /** - * Description of the env-entry - */ - private String description = null; - - /** - * Name of the env-entry - */ - private String envEntryName = null; - - /** - * Value of the env-entry - */ - private String envEntryValue = null; - - /** - * Type of the env-entry - */ - private String envEntryType = null; - - - - // Setters - - /** - * Sets the description - * @param description the description to use - */ - public void setDescription(final String description) { - this.description = description; - } - - /** - * Sets the name - * @param envEntryName the name to use - */ - public void setEnvEntryName(final String envEntryName) { - this.envEntryName = envEntryName; - } - - /** - * Sets the value - * @param envEntryValue the value to use - */ - public void setEnvEntryValue(final String envEntryValue) { - this.envEntryValue = envEntryValue; - } - - /** - * Sets the type - * @param envEntryType the type to use - */ - public void setEnvEntryType(final String envEntryType) { - this.envEntryType = envEntryType; - } - - - - // Getters - - /** - * @return the description of the env-entry - */ - public String getDescription() { - return description; - } - - - /** - * @return the name of the env-entry - */ - public String getEnvEntryName() { - return envEntryName; - } - - - /** - * @return the value of the env-entry - */ - public String getEnvEntryValue() { - return envEntryValue; - } - - - /** - * @return the type of the env-entry - */ - public String getEnvEntryType() { - return envEntryType; - } - - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - @Override - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // Description - sb.append(xmlElement(description, "description", indent)); - - // name - sb.append(xmlElement(envEntryName, "env-entry-name", indent)); - - // type - sb.append(xmlElement(envEntryType, "env-entry-type", indent)); - - // value - sb.append(xmlElement(envEntryValue, "env-entry-value", indent)); - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/Handler.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/Handler.java deleted file mode 100644 index 92c588d20694bced9802a3e50ca323abec8ef020..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/Handler.java +++ /dev/null @@ -1,211 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines the implementation of the element handler. - * @author Florent Benoit - */ -public class Handler extends AbsElement { - - /** - * Name of the handler - */ - private String handlerName = null; - - /** - * List of elements init-param - */ - private JLinkedList initParamList = null; - - /** - * List of elements soap-header - */ - private JLinkedList soapHeaderList = null; - - /** - * List of elements soap-role - */ - private JLinkedList soapRoleList = null; - - /** - * List of elements port-name - */ - private JLinkedList portNameList = null; - - - /** - * Class of the handler - */ - private String handlerClass = null; - - /** - * Constructor : build a new Handler object - */ - public Handler() { - super(); - initParamList = new JLinkedList("init-param"); - soapHeaderList = new JLinkedList("soap-header"); - soapRoleList = new JLinkedList("soap-role"); - portNameList = new JLinkedList("port-name"); - } - - - // Setters - - /** - * Sets the name - * @param handlerName the name to use - */ - public void setHandlerName(String handlerName) { - this.handlerName = handlerName; - } - - /** - * Add a new port-name element to this object - * @param portName the port-name object - */ - public void addPortName(String portName) { - portNameList.add(portName); - } - - - /** - * Add a new soap-role element to this object - * @param soapRole the soap-role object - */ - public void addSoapRole(String soapRole) { - soapRoleList.add(soapRole); - } - - /** - * Add a new soap-header element to this object - * @param soapHeader the soap-header object - */ - public void addSoapHeader(Qname soapHeader) { - soapHeaderList.add(soapHeader); - } - - /** - * Add a new init-param element to this object - * @param initParam the init-param object - */ - public void addInitParam(InitParam initParam) { - initParamList.add(initParam); - } - - /** - * Sets the class - * @param handlerClass the class to use - */ - public void setHandlerClass(String handlerClass) { - this.handlerClass = handlerClass; - } - - // Getters - - /** - * @return the name of the handler - */ - public String getHandlerName() { - return handlerName; - } - - /** - * @return the class of the handler - */ - public String getHandlerClass() { - return handlerClass; - } - - /** - * @return the list of all init-param elements - */ - public JLinkedList getInitParamList() { - return initParamList; - } - - /** - * @return the list of all soap-header elements - */ - public JLinkedList getSoapHeaderList() { - return soapHeaderList; - } - - /** - * @return the list of all soap-role elements - */ - public JLinkedList getSoapRoleList() { - return soapRoleList; - } - - /** - * @return the list of all port-name elements - */ - public JLinkedList getPortNameList() { - return portNameList; - } - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // handler-name - sb.append(xmlElement(handlerName, "handler-name", indent)); - - // handler-class - sb.append(xmlElement(handlerClass, "handler-class", indent)); - - // init-param - sb.append(initParamList.toXML(indent)); - - // soap-header - sb.append(soapHeaderList.toXML(indent)); - - // soap-role - sb.append(soapRoleList.toXML(indent)); - - // port-name - sb.append(portNameList.toXML(indent)); - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/Icon.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/Icon.java deleted file mode 100644 index 8f8833d2f3f91fa642d1512a5d3adbb872cf10d3..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/Icon.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines the implementation of the element icon. - * @author Florent Benoit - */ -public class Icon extends AbsElement { - - /** - * Name of the small icon - */ - private String smallIcon = null; - - /** - * Name of the large icon - */ - private String largeIcon = null; - - - // Setters - - /** - * Sets the small icon name - * @param smallIcon the name of the file for small GIF or JPEG icon image - */ - public void setSmallIcon(String smallIcon) { - this.smallIcon = smallIcon; - } - - - /** - * Sets the large icon name - * @param largeIcon the name of the file for large GIF or JPEG icon image - */ - public void setLargeIcon(String largeIcon) { - this.largeIcon = largeIcon; - } - - - - - // Getters - - /** - * @return the small icon name - */ - public String getSmallIcon() { - return smallIcon; - } - - - /** - * @return the large icon name - */ - public String getLargeIcon() { - return largeIcon; - } - - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // small-icon - sb.append(xmlElement(smallIcon, "small-icon", indent)); - - // large-icon - sb.append(xmlElement(largeIcon, "large-icon", indent)); - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/InitParam.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/InitParam.java deleted file mode 100644 index d0ffdfafad470a0c8fdac505680a836a18d5b602..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/InitParam.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines the implementation of the element init-param - * @author Florent Benoit - */ -public class InitParam extends AbsElement { - - /** - * Name of this parameter - */ - private String paramName = null; - - /** - * Value of this parameter - */ - private String paramValue = null; - - /** - * Description of the ejb-ref - */ - private String description = null; - - // Setters - - /** - * Sets the description - * @param description the description to use - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * Sets the name - * @param paramName the name to use - */ - public void setParamName(String paramName) { - this.paramName = paramName; - } - - - /** - * Sets the value - * @param paramValue the value - */ - public void setParamValue(String paramValue) { - this.paramValue = paramValue; - } - - - - // Getters - - - /** - * @return the name of the parameter - */ - public String getParamName() { - return paramName; - } - - - /** - * @return the value of the parameter - */ - public String getParamValue() { - return paramValue; - } - - /** - * @return the description of the parameter - */ - public String getDescription() { - return description; - } - - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // name - sb.append(xmlElement(paramName, "param-name", indent)); - - // value - sb.append(xmlElement(paramValue, "param-value", indent)); - - // value - sb.append(xmlElement(description, "description", indent)); - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } - - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JLinkedList.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JLinkedList.java deleted file mode 100644 index d2ecabd3e5d53e8a4cfc87d5e3ee3d08bdddf117..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JLinkedList.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -import java.util.Iterator; -import java.util.LinkedList; - -/** - * This class defines a linked list with the ability to display its content in XML. - * @author Florent Benoit - */ -public class JLinkedList extends LinkedList { - - - /** - * serial ID. - */ - private static final long serialVersionUID = 1L; - /** - * Tag of the root element. - */ - private String tag = null; - - - /** - * Constructor with a specified tag - * @param tag of the root element (use for xml representation) - */ - public JLinkedList(final String tag) { - super(); - this.tag = tag; - } - - - /** - * Represents this element by it's XML description. - * Use a default indent set to 0. - * @return the XML description of this object. - */ - public String toXML() { - return toXML(0); - } - - /** - * Return the representation of this element. - * Use the XML representation of the object for the toString() method. - * @return the XML description of this object. - */ - public String toString() { - return toXML(); - } - - - /** - * Return indent spaces. - * @param indent number of indentation. - * @return the indent space string. - */ - private String indent(final int indent) { - String txt = ""; - for (int i = 0; i < indent; i++) { - txt += " "; - } - return txt; - } - - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - @SuppressWarnings("unchecked") - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - // Only if there are elements - if (this.size() > 0) { - for (Iterator i = this.iterator(); i.hasNext();) { - Object o = i.next(); - // Element or String ? - if (o instanceof Element) { - sb.append(((Element) o).toXML(indent)); - } else { - sb.append(indent(indent)); - sb.append("<"); - sb.append(tag); - sb.append(">"); - sb.append(o); - sb.append("\n"); - } - } - } - return sb.toString(); - } - - - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JndiEnvRefsGroupXml.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JndiEnvRefsGroupXml.java deleted file mode 100644 index 3299d0baf63ca630e5bf705488e672c932e95a5a..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JndiEnvRefsGroupXml.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Philippe Coq - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - - -/** - * This interface provides to the value of Xml elements of a JndiEnvRefsGroup - * @author Philippe Coq - */ - -public interface JndiEnvRefsGroupXml extends DescriptionGroupXml { - /** - * @return the list of all ejb-local-ref elements - */ - JLinkedList getEjbLocalRefList(); - - /** - * @return the list of all ejb-ref elements - */ - JLinkedList getEjbRefList(); - - /** - * @return the list of all env-entry elements - */ - JLinkedList getEnvEntryList(); - - /** - * @return the list of all resource-env-ref elements - */ - JLinkedList getResourceEnvRefList(); - - /** - * @return the list of all resource-ref elements - */ - JLinkedList getResourceRefList(); - - /** - * @return the list of all service-ref elements - */ - JLinkedList getServiceRefList(); - - /** - * @return the list of all message-destination-ref elements - */ - JLinkedList getMessageDestinationRefList(); - - /** - * @return the list of all persistence-unit-ref elements - */ - JLinkedList getPersistenceUnitRefList(); -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasCallProperty.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasCallProperty.java deleted file mode 100644 index a2300f58828f3a1e78385aa622b36994fd4b3221..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasCallProperty.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines the implementation of the element jonas-init-param - * @author Florent Benoit - */ -public class JonasCallProperty extends AbsJonasParam { - - /** - * Default constructor - */ - public JonasCallProperty() { - super("jonas-call-property"); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasEjbRef.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasEjbRef.java deleted file mode 100644 index 2b17fe3d49b34de62a8cf2f52f14f0ccf664d4a5..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasEjbRef.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines the implementation of the element jonas-ejb-ref. - * @author Florent Benoit - */ -public class JonasEjbRef extends AbsElement { - - /** - * Name of this jonas-ejb-ref - */ - private String ejbRefName = null; - - /** - * jndi name of this jonas-ejb-ref - */ - private String jndiName = null; - - - // Setters - - /** - * Sets the name - * @param ejbRefName the name to use - */ - public void setEjbRefName(String ejbRefName) { - this.ejbRefName = ejbRefName; - } - - - /** - * Sets the jndi name - * @param jndiName the jndi-name to use - */ - public void setJndiName(String jndiName) { - this.jndiName = jndiName; - } - - - - // Getters - - - /** - * @return the name of the jonas-ejb-ref - */ - public String getEjbRefName() { - return ejbRefName; - } - - - /** - * @return the jndi-name of the jonas-ejb-ref - */ - public String getJndiName() { - return jndiName; - } - - - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // name - sb.append(xmlElement(ejbRefName, "ejb-ref-name", indent)); - - // jndi-name - sb.append(xmlElement(jndiName, "jndi-name", indent)); - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } - - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasInitParam.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasInitParam.java deleted file mode 100644 index e76192e9bc3b472b3562206136accc81880bf1d2..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasInitParam.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines the implementation of the element jonas-init-param - * @author Florent Benoit - */ -public class JonasInitParam extends AbsJonasParam { - - /** - * Default constructor - */ - public JonasInitParam() { - super("jonas-init-param"); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasJndiEnvRefsGroupXml.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasJndiEnvRefsGroupXml.java deleted file mode 100644 index 80a10d32d9f559d30d5f2b57cae2c48b41da4675..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasJndiEnvRefsGroupXml.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Philippe Coq - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.deployment.common.xml; - - -/** - * This interface provides to the value of Xml elements of a JonasJndiEnvRefsGroup - * @author Philippe Coq - */ - -public interface JonasJndiEnvRefsGroupXml { - - /** - * @return the list of all jonas-ejb-ref elements - */ - JLinkedList getJonasEjbRefList(); - - - /** - * @return the list of all jonas-resource-env elements - */ - JLinkedList getJonasResourceEnvList(); - - - /** - * @return the list of all jonas-resource elements - */ - JLinkedList getJonasResourceList(); - - - /** - * @return the list of all jonas-service elements - */ - JLinkedList getJonasServiceRefList(); - - /** - * @return the list of all jonas-message-destination-ref elements - */ - JLinkedList getJonasMessageDestinationRefList(); - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasMessageDestination.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasMessageDestination.java deleted file mode 100644 index 1f4208033a684977419a642a63a3988e6d0dffc8..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasMessageDestination.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Eric Hardesty - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines the implementation of the element jonas-message-destination. - * @author Eric Hardesty - */ -public class JonasMessageDestination extends AbsElement { - - /** - * Name of this jonas-message-destination - */ - private String messageDestinationName = null; - - /** - * jndi name of this jonas-message-destination - */ - private String jndiName = null; - - - // Setters - - /** - * Sets the name - * @param name the name to use - */ - public void setMessageDestinationName(String name) { - this.messageDestinationName = name; - } - - - /** - * Sets the jndi name - * @param jndiName the jndi-name to use - */ - public void setJndiName(String jndiName) { - this.jndiName = jndiName; - } - - - - // Getters - - - /** - * @return the name of the jonas-message-destination - */ - public String getMessageDestinationName() { - return messageDestinationName; - } - - - /** - * @return the jndi-name of the jonas-message-destination - */ - public String getJndiName() { - return jndiName; - } - - - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // name - sb.append(xmlElement(messageDestinationName, "message-destination-name", indent)); - - // jndi-name - sb.append(xmlElement(jndiName, "jndi-name", indent)); - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } - - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasMessageDestinationRef.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasMessageDestinationRef.java deleted file mode 100644 index 75e0f45c918fadcf838e2f5742b0474cf1bac4f5..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasMessageDestinationRef.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Eric Hardesty - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines the implementation of the element jonas-message-destination-ref. - * @author Eric Hardesty - */ -public class JonasMessageDestinationRef extends AbsElement { - - /** - * Name of this jonas-message-destination-ref - */ - private String messageDestinationRefName = null; - - /** - * jndi name of this jonas-message-destination-ref - */ - private String jndiName = null; - - - // Setters - - /** - * Sets the name - * @param name the name to use - */ - public void setMessageDestinationRefName(String name) { - this.messageDestinationRefName = name; - } - - - /** - * Sets the jndi name - * @param jndiName the jndi-name to use - */ - public void setJndiName(String jndiName) { - this.jndiName = jndiName; - } - - - - // Getters - - - /** - * @return the name of the jonas-message-destination-ref - */ - public String getMessageDestinationRefName() { - return messageDestinationRefName; - } - - - /** - * @return the jndi-name of the jonas-message-destination-ref - */ - public String getJndiName() { - return jndiName; - } - - - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // name - sb.append(xmlElement(messageDestinationRefName, "message-destination-ref-name", indent)); - - // jndi-name - sb.append(xmlElement(jndiName, "jndi-name", indent)); - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } - - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasParam.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasParam.java deleted file mode 100644 index db2d23f78c93a451b359fbdaed5e3a6952faabf0..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasParam.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines the implementation of the element jonas-init-param - * @author Florent Benoit - */ -public class JonasParam extends AbsJonasParam { - - /** - * Default constructor - */ - public JonasParam() { - super("jonas-param"); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasPortComponentRef.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasPortComponentRef.java deleted file mode 100644 index 34b4caf133dc1c0c2a80f86f6b4033d4094ca97b..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasPortComponentRef.java +++ /dev/null @@ -1,167 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - - - -/** - * This class defines the implementation of the element jonas-port-component-ref. - * @author Florent Benoit - */ -public class JonasPortComponentRef extends AbsElement { - - /** - * service endpoint interface - */ - private String serviceEndpointInterface = null; - - /** - * wsdl port - */ - private Qname wsdlPort = null; - - /** - * jonas-stub-property list - */ - private JLinkedList jonasStubPropList = null; - - /** - * jonas-call-property list - */ - private JLinkedList jonasCallPropList = null; - - /** - * Constructor : build a new JonasServiceRef object - */ - public JonasPortComponentRef() { - jonasStubPropList = new JLinkedList("jonas-stub-property"); - jonasCallPropList = new JLinkedList("jonas-call-property"); - } - - - // Setters - - - /** - * Sets the wsdl port QName of the jonas-port-component-ref - * @param wsdlPort wsdl port QName of the jonas-port-component-ref - */ - public void setWsdlPort(Qname wsdlPort) { - this.wsdlPort = wsdlPort; - } - - /** - * Sets the service endpoint interface of the port-component-ref - * @param serviceEndpointInterface service endpoint interface of the port-component-ref - */ - public void setServiceEndpointInterface(String serviceEndpointInterface) { - this.serviceEndpointInterface = serviceEndpointInterface; - } - - /** - * Add a parameter - * @param jonasCallProperty the JonasCallProperty object to add to our list - */ - public void addJonasCallProperty(JonasCallProperty jonasCallProperty) { - jonasCallPropList.add(jonasCallProperty); - } - - /** - * Add a parameter - * @param jonasStubProperty the JonasStubProperty object to add to our list - */ - public void addJonasStubProperty(JonasStubProperty jonasStubProperty) { - jonasStubPropList.add(jonasStubProperty); - } - - - // Getters - - /** - * @return the service endpoint interface of the port-component-ref - */ - public String getServiceEndpointInterface() { - return serviceEndpointInterface; - } - - /** - * @return the wsdl port QName of the jonas-port-component-ref - */ - public Qname getWsdlPort() { - return wsdlPort; - } - - /** - * @return the list of jonas-call-property - */ - public JLinkedList getJonasCallPropertyList() { - return jonasCallPropList; - } - - /** - * @return the list of jonas-stub-property - */ - public JLinkedList getJonasStubPropertyList() { - return jonasStubPropList; - } - - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // service-endpoint-interface - if (serviceEndpointInterface != null) { - sb.append(xmlElement(serviceEndpointInterface, "service-endpoint-interface", indent)); - } - - // wsdl-port - if (wsdlPort != null) { - sb.append(wsdlPort.toXML(indent)); - } - - // jonas-stub-property - sb.append(jonasStubPropList.toXML(indent)); - - // jonas-call-property - sb.append(jonasCallPropList.toXML(indent)); - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasResource.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasResource.java deleted file mode 100644 index 15619a7c3e8b860289705d9390a5c6e81fdbd21d..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasResource.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines the implementation of the element jonas-resource. - * @author Florent Benoit - */ -public class JonasResource extends AbsElement { - - /** - * Name of this jonas-resource - */ - private String resRefName = null; - - /** - * jndi name of this jonas-resource - */ - private String jndiName = null; - - - // Setters - - /** - * Sets the name - * @param resRefName the name to use - */ - public void setResRefName(String resRefName) { - this.resRefName = resRefName; - } - - - /** - * Sets the jndi name - * @param jndiName the jndi-name to use - */ - public void setJndiName(String jndiName) { - this.jndiName = jndiName; - } - - - - // Getters - - - /** - * @return the name of the jonas-resource - */ - public String getResRefName() { - return resRefName; - } - - - /** - * @return the jndi-name of the jonas-resource - */ - public String getJndiName() { - return jndiName; - } - - - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // name - sb.append(xmlElement(resRefName, "res-ref-name", indent)); - - // jndi-name - sb.append(xmlElement(jndiName, "jndi-name", indent)); - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } - - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasResourceEnv.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasResourceEnv.java deleted file mode 100644 index bdbcb5d2851a2addeb0d4830b3f537a805426c2e..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasResourceEnv.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines the implementation of the element jonas-resource-env. - * @author Florent Benoit - */ -public class JonasResourceEnv extends AbsElement { - - /** - * Name of this jonas-resource-env - */ - private String resourceEnvRefName = null; - - /** - * jndi name of this jonas-resource-env - */ - private String jndiName = null; - - - // Setters - - /** - * Sets the name - * @param resourceEnvRefName the name to use - */ - public void setResourceEnvRefName(String resourceEnvRefName) { - this.resourceEnvRefName = resourceEnvRefName; - } - - - /** - * Sets the jndi name - * @param jndiName the jndi-name to use - */ - public void setJndiName(String jndiName) { - this.jndiName = jndiName; - } - - - - // Getters - - - /** - * @return the name of the jonas-resource-env - */ - public String getResourceEnvRefName() { - return resourceEnvRefName; - } - - - /** - * @return the jndi-name of the jonas-resource-env - */ - public String getJndiName() { - return jndiName; - } - - - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // name - sb.append(xmlElement(resourceEnvRefName, "resource-env-ref-name", indent)); - - // jndi-name - sb.append(xmlElement(jndiName, "jndi-name", indent)); - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } - - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasServiceRef.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasServiceRef.java deleted file mode 100644 index 13ff3279b3b194607e96154b6ebb7fe13e4c73e8..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasServiceRef.java +++ /dev/null @@ -1,160 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines the implementation of the element jonas-service-ref. - * @author Florent Benoit - */ -public class JonasServiceRef extends AbsElement { - - /** - * Name of this jonas-service-ref - */ - private String serviceRefName = null; - - /** - * URL pointing to an alternate WSDL Definition - */ - private String altWsdl = null; - - /** - * List of init parameters - */ - private JLinkedList jonasInitParamList = null; - - /** - * List of jonas-port-component-ref - */ - private JLinkedList jonasPortComponentRefList = null; - - /** - * Constructor : build a new JonasServiceRef object - */ - public JonasServiceRef() { - jonasInitParamList = new JLinkedList("jonas-init-param"); - jonasPortComponentRefList = new JLinkedList("jonas-port-component-ref"); - } - - - - // Setters - - /** - * Sets the name - * @param serviceRefName the name to use - */ - public void setServiceRefName(String serviceRefName) { - this.serviceRefName = serviceRefName; - } - - - /** - * Add a parameter - * @param jonasInitParam the JonasInitParam object to add to our list - */ - public void addJonasInitParam(JonasInitParam jonasInitParam) { - jonasInitParamList.add(jonasInitParam); - } - - /** - * Add a parameter - * @param jonasPortComponentRef the JonasPortComponentRef object to add to our list - */ - public void addJonasPortComponentRef(JonasPortComponentRef jonasPortComponentRef) { - jonasPortComponentRefList.add(jonasPortComponentRef); - } - - /** - * @param altWsdl The altWsdl to set. - */ - public void setAltWsdl(String altWsdl) { - this.altWsdl = altWsdl; - } - - // Getters - - /** - * @return the name of the service-ref - */ - public String getServiceRefName() { - return serviceRefName; - } - - - /** - * @return the list of init parameters - */ - public JLinkedList getJonasInitParamList() { - return jonasInitParamList; - } - - /** - * @return the list of jonas port component ref - */ - public JLinkedList getJonasPortComponentRefList() { - return jonasPortComponentRefList; - } - - /** - * @return Returns the altWsdl. - */ - public String getAltWsdl() { - return altWsdl; - } - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // name - sb.append(xmlElement(serviceRefName, "service-ref-name", indent)); - - // jonas port component ref - sb.append(jonasPortComponentRefList.toXML(indent)); - - // alt-wsdl - sb.append(xmlElement(altWsdl, "alt-wsdl", indent)); - - // init parameters - sb.append(jonasInitParamList.toXML(indent)); - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - return sb.toString(); - } - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasStubProperty.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasStubProperty.java deleted file mode 100644 index 744c64e3c588b5902ba73a19cbcf905facaa554b..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/JonasStubProperty.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines the implementation of the element jonas-init-param - * @author Florent Benoit - */ -public class JonasStubProperty extends AbsJonasParam { - - /** - * Default constructor - */ - public JonasStubProperty() { - super("jonas-stub-property"); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/MessageDestination.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/MessageDestination.java deleted file mode 100644 index ed4707e54d9c4983800c063114c6344e72508c9b..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/MessageDestination.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Eric Hardesty - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines the implementation of the element message-destination. - * @author Eric Hardesty - */ -public class MessageDestination extends AbsElement { - - /** - * Name of this message-destination - */ - private String messageDestinationName = null; - - - // Setters - - /** - * Sets the name - * @param name the name to use - */ - public void setMessageDestinationName(String name) { - this.messageDestinationName = name; - } - - - // Getters - - /** - * @return the name of the jonas-message-destination - */ - public String getMessageDestinationName() { - return messageDestinationName; - } - - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // name - sb.append(xmlElement(messageDestinationName, "message-destination-name", indent)); - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } - - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/MessageDestinationRef.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/MessageDestinationRef.java deleted file mode 100644 index f72f0c522b7b1c8ff76781585a274c20b5e5711e..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/MessageDestinationRef.java +++ /dev/null @@ -1,184 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Eric Hardesty - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines the implementation of the element message-destination-ref. - * @author Eric Hardesty - */ -public class MessageDestinationRef extends AbsElement { - - /** - * Description of the message-destination-ref - */ - private String description = null; - - /** - * Name of this message-destination-ref - */ - private String messageDestinationRefName = null; - - /** - * Type of this message-destination-ref - */ - private String messageDestinationType = null; - - /** - * Usage of this message-destination-ref - */ - private String messageDestinationUsage = null; - - /** - * Link of this message-destination-ref - */ - private String messageDestinationLink = null; - - - // Setters - - /** - * Sets the description - * @param description the description to use - */ - public void setDescription(String description) { - this.description = description; - } - - - /** - * Sets the name - * @param refName the name to use - */ - public void setMessageDestinationRefName(String refName) { - this.messageDestinationRefName = refName; - } - - - /** - * Sets the type - * @param type the type to use - */ - public void setMessageDestinationType(String type) { - this.messageDestinationType = type; - } - - - /** - * Sets the usage - * @param usage the usage to use - */ - public void setMessageDestinationUsage(String usage) { - this.messageDestinationUsage = usage; - } - - - /** - * Sets the link - * @param link the link to use - */ - public void setMessageDestinationLink(String link) { - this.messageDestinationLink = link; - } - - - // Getters - - /** - * @return the description of the messageDestination-ref - */ - public String getDescription() { - return description; - } - - - /** - * @return the name of the messageDestination-ref - */ - public String getMessageDestinationRefName() { - return messageDestinationRefName; - } - - - /** - * @return the type of the messageDestination-ref - */ - public String getMessageDestinationType() { - return messageDestinationType; - } - - /** - * @return the usage of the messageDestination-ref - */ - public String getMessageDestinationUsage() { - return messageDestinationUsage; - } - - /** - * @return the link of the messageDestination-ref - */ - public String getMessageDestinationLink() { - return messageDestinationLink; - } - - - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // Description - sb.append(xmlElement(description, "description", indent)); - - // name - sb.append(xmlElement(messageDestinationRefName, "message-destination-ref-name", indent)); - - // type - sb.append(xmlElement(messageDestinationType, "message-destination-type", indent)); - - // usage - sb.append(xmlElement(messageDestinationUsage, "message-destination-usage", indent)); - - // link - sb.append(xmlElement(messageDestinationLink, "message-destination-link", indent)); - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/PersistenceUnitRef.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/PersistenceUnitRef.java deleted file mode 100644 index 115f7943d2f50e50a6e036a597eacdb6c483fd59..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/PersistenceUnitRef.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2008 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines the implementation of the persistence-unit-ref XML element. - * @author Adriana Danes - */ -public class PersistenceUnitRef extends AbsElement { - /** - * Description of the persistence-unit-ref element. - */ - private String description = null; - - /** - * Name of the persistence-unit-ref element. - */ - private String persistenceUnitRefName = null; - - /** - * Optional persistence unit name. - */ - private String persistenceUnitName = null; - - public String getDescription() { - return description; - } - - public void setDescription(final String description) { - this.description = description; - } - - public String getPersistenceUnitRefName() { - return persistenceUnitRefName; - } - - public void setPersistenceUnitRefName(final String persistenceUnitRefName) { - this.persistenceUnitRefName = persistenceUnitRefName; - } - - public String getPersistenceUnitName() { - return persistenceUnitName; - } - - public void setPersistenceUnitName(final String persistenceUnitName) { - this.persistenceUnitName = persistenceUnitName; - } - /** - * Represents this element by it's XML description. - * @param indent use this indent for prefixing XML representation. - * @return the XML description of this object. - */ - @Override - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // Description - sb.append(xmlElement(description, "description", indent)); - - // peristence unit ref name - sb.append(xmlElement(persistenceUnitRefName, "persistence-unit-ref-name", indent)); - - // peristence unit name - sb.append(xmlElement(persistenceUnitName, "persistence-unit-name", indent)); - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/PortComponentRef.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/PortComponentRef.java deleted file mode 100644 index 1a0927e92cdd86ad926188a9308bfec426132cf3..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/PortComponentRef.java +++ /dev/null @@ -1,110 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - - -/** - * This class defines the implementation of the element port-component-ref. - * @author Florent Benoit - */ -public class PortComponentRef extends AbsElement { - - /** - * service endpoint interface - */ - private String serviceEndpointInterface = null; - - /** - * port component link - */ - private String portComponentLink = null; - - - // Setters - - - /** - * Sets the service endpoint interface of the port-component-ref - * @param serviceEndpointInterface service endpoint interface of the port-component-ref - */ - public void setServiceEndpointInterface(String serviceEndpointInterface) { - this.serviceEndpointInterface = serviceEndpointInterface; - } - - - /** - * Sets the port component link of the port-component-ref - * @param portComponentLink port component link of the port-component-ref - */ - public void setPortComponentLink(String portComponentLink) { - this.portComponentLink = portComponentLink; - } - - - // Getters - - /** - * @return the service endpoint interface of the port-component-ref - */ - public String getServiceEndpointInterface() { - return serviceEndpointInterface; - } - - /** - * @return the port component link of the port-component-ref - */ - public String getPortComponentLink() { - return portComponentLink; - } - - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // service-endpoint-interface - sb.append(xmlElement(serviceEndpointInterface, "service-endpoint-interface", indent)); - - // port-component-link - sb.append(xmlElement(portComponentLink, "port-component-link", indent)); - - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/Qname.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/Qname.java deleted file mode 100644 index 03749703180833860a752ef0edeafa806504de19..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/Qname.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -import javax.xml.namespace.QName; - -/** - * This class defines an implementation for a QName - * It is use by Soap-Header or Service-qname - * @author Florent Benoit - */ -public class Qname extends AbsElement { - - /** - * Name of the element - */ - private String name = null; - - /** - * Internal QName - */ - private QName qName = null; - - - /** - * Constructor : build a new object - */ - public Qname() { - super(); - } - - - // Setters - - /** - * Sets the QName of this object - * @param qName QName of this object - */ - public void setQName(QName qName) { - this.qName = qName; - } - - /** - * Sets the Name of this object - * @param name name of this object - */ - public void setName(String name) { - this.name = name; - } - - // Getters - - /** - * @return the QName of this object - */ - public QName getQName() { - return qName; - } - - - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - //String prefix = qName.getPrefix(); - String prefix = "pr"; - - if (qName == null) { - return ""; - } - - String namespaceURI = qName.getNamespaceURI(); - String localPart = qName.getLocalPart(); - - - sb.append("<"); - sb.append(name); - sb.append(" xmlns:"); - sb.append(prefix); - sb.append("=\""); - sb.append(namespaceURI); - sb.append("\">"); - sb.append(prefix); - sb.append(":"); - sb.append(localPart); - sb.append("\n"); - - return sb.toString(); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/ResourceEnvRef.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/ResourceEnvRef.java deleted file mode 100644 index 084df7411f3184ba11d4ab7373c7f1e344dc6534..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/ResourceEnvRef.java +++ /dev/null @@ -1,138 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines the implementation of the element resource-env-ref. - * @author Florent Benoit - */ -public class ResourceEnvRef extends AbsElement { - - /** - * Description of the resource-env-ref - */ - private String description = null; - - /** - * Name of this resource-env-ref - */ - private String resourceEnvRefName = null; - - /** - * Type of this resource-env-ref - */ - private String resourceEnvRefType = null; - - - // Setters - - /** - * Sets the description - * @param description the description to use - */ - public void setDescription(String description) { - this.description = description; - } - - - /** - * Sets the name - * @param resourceEnvRefName the name to use - */ - public void setResourceEnvRefName(String resourceEnvRefName) { - this.resourceEnvRefName = resourceEnvRefName; - } - - - /** - * Sets the type - * @param resourceEnvRefType the type to use - */ - public void setResourceEnvRefType(String resourceEnvRefType) { - this.resourceEnvRefType = resourceEnvRefType; - } - - - - // Getters - - /** - * @return the description of the resource-env-ref - */ - public String getDescription() { - return description; - } - - - /** - * @return the name of the resource-env-ref - */ - public String getResourceEnvRefName() { - return resourceEnvRefName; - } - - - /** - * @return the type of the resource-env-ref - */ - public String getResourceEnvRefType() { - return resourceEnvRefType; - } - - - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // Description - sb.append(xmlElement(description, "description", indent)); - - // name - sb.append(xmlElement(resourceEnvRefName, "resource-env-ref-name", indent)); - - // type - sb.append(xmlElement(resourceEnvRefType, "resource-env-ref-type", indent)); - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } - - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/ResourceRef.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/ResourceRef.java deleted file mode 100644 index 2ebb3dde23e693ff129fe90a61a888d51b65e34f..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/ResourceRef.java +++ /dev/null @@ -1,188 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines the implementation of the element resource-ref. - * @author Florent Benoit - */ -public class ResourceRef extends AbsElement { - - /** - * Description of the resource-ref - */ - private String description = null; - - /** - * Name of this resource-ref - */ - private String resRefName = null; - - /** - * Type of this resource-ref - */ - private String resType = null; - - /** - * Auth of this resource-ref - */ - private String resAuth = null; - - /** - * Sharing-scope of this resource-ref - */ - private String resSharingScope = null; - - - - // Setters - - /** - * Sets the description - * @param description the description to use - */ - public void setDescription(String description) { - this.description = description; - } - - - /** - * Sets the name - * @param resRefName the name to use - */ - public void setResRefName(String resRefName) { - this.resRefName = resRefName; - } - - - /** - * Sets the type - * @param resType the type to use - */ - public void setResType(String resType) { - this.resType = resType; - } - - - /** - * Sets the auth - * @param resAuth the auth to use - */ - public void setResAuth(String resAuth) { - this.resAuth = resAuth; - } - - - /** - * Sets the sharing-scope - * @param resSharingScope the sharing-scope to use - */ - public void setResSharingScope(String resSharingScope) { - this.resSharingScope = resSharingScope; - } - - - - // Getters - - /** - * @return the description of the resource-ref - */ - public String getDescription() { - return description; - } - - - /** - * @return the name of the resource-ref - */ - public String getResRefName() { - return resRefName; - } - - - /** - * @return the type of the resource-ref - */ - public String getResType() { - return resType; - } - - - /** - * @return the auth of the resource-ref - */ - public String getResAuth() { - return resAuth; - } - - - /** - * @return the sharing-scope of the resource-ref - */ - public String getResSharingScope() { - return resSharingScope; - } - - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // Description - sb.append(xmlElement(description, "description", indent)); - - // name - sb.append(xmlElement(resRefName, "res-ref-name", indent)); - - // type - sb.append(xmlElement(resType, "res-type", indent)); - - // auth - sb.append(xmlElement(resAuth, "res-auth", indent)); - - // sharing-scope - sb.append(xmlElement(resSharingScope, "res-sharing-scope", indent)); - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } - - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/RunAs.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/RunAs.java deleted file mode 100644 index 0e02be511ea3ee44e830b3602194285842d797de..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/RunAs.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: JOnAS team - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines the implementation of the element run-as - * - * @author JOnAS team - */ - -public class RunAs extends AbsElement { - - /** - * description - */ - private String description = null; - - /** - * role-name - */ - private String roleName = null; - - - /** - * Constructor - */ - public RunAs() { - super(); - } - - /** - * Gets the description - * @return the description - */ - public String getDescription() { - return description; - } - - /** - * Set the description - * @param description description - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * Gets the role-name - * @return the role-name - */ - public String getRoleName() { - return roleName; - } - - /** - * Set the role-name - * @param roleName roleName - */ - public void setRoleName(String roleName) { - this.roleName = roleName; - } - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // description - sb.append(xmlElement(description, "description", indent)); - // role-name - sb.append(xmlElement(roleName, "role-name", indent)); - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/SecurityRole.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/SecurityRole.java deleted file mode 100644 index 75e849af975a817c53cc28f0849ee0f6dec9e95c..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/SecurityRole.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: JOnAS team - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines the implementation of the element security-role - * - * @author JOnAS team - */ - -public class SecurityRole extends AbsElement { - - /** - * description - */ - private String description = null; - - /** - * role-name - */ - private String roleName = null; - - - /** - * Constructor - */ - public SecurityRole() { - super(); - } - - /** - * Gets the description - * @return the description - */ - public String getDescription() { - return description; - } - - /** - * Set the description - * @param description description - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * Gets the role-name - * @return the role-name - */ - public String getRoleName() { - return roleName; - } - - /** - * Set the role-name - * @param roleName roleName - */ - public void setRoleName(String roleName) { - this.roleName = roleName; - } - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // description - sb.append(xmlElement(description, "description", indent)); - // role-name - sb.append(xmlElement(roleName, "role-name", indent)); - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/SecurityRoleRef.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/SecurityRoleRef.java deleted file mode 100644 index a6e0d9f9355af49fa7496422f58d313b857b0ea6..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/SecurityRoleRef.java +++ /dev/null @@ -1,132 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: JOnAS team - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines the implementation of the element security-role-ref - * - * @author JOnAS team - */ - -public class SecurityRoleRef extends AbsElement { - - /** - * description - */ - private String description = null; - - /** - * role-name - */ - private String roleName = null; - - /** - * role-link - */ - private String roleLink = null; - - - /** - * Constructor - */ - public SecurityRoleRef() { - super(); - } - - /** - * Gets the description - * @return the description - */ - public String getDescription() { - return description; - } - - /** - * Set the description - * @param description description - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * Gets the role-name - * @return the role-name - */ - public String getRoleName() { - return roleName; - } - - /** - * Set the role-name - * @param roleName roleName - */ - public void setRoleName(String roleName) { - this.roleName = roleName; - } - - /** - * Gets the role-link - * @return the role-link - */ - public String getRoleLink() { - return roleLink; - } - - /** - * Set the role-link - * @param roleLink roleLink - */ - public void setRoleLink(String roleLink) { - this.roleLink = roleLink; - } - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // description - sb.append(xmlElement(description, "description", indent)); - // role-name - sb.append(xmlElement(roleName, "role-name", indent)); - // role-link - sb.append(xmlElement(roleLink, "role-link", indent)); - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/ServiceRef.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/ServiceRef.java deleted file mode 100644 index 7976582ce1b1999593831c9dcba88e64eab8dbdb..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/ServiceRef.java +++ /dev/null @@ -1,241 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - -/** - * This class defines the implementation of the element service-ref. - * @author Florent Benoit - */ -public class ServiceRef extends AbsElement { - - /** - * Service name - */ - private String serviceRefName = null; - - - /** - * Service Interface - */ - private String serviceInterface = null; - - /** - * Mapping jaxrpc - */ - private String jaxrpcMappingFile = null; - - /** - * WSDL file - */ - private String wsdlFile = null; - - - /** - * Service-qname element - */ - private Qname serviceQname = null; - - /** - * List of elements port-component-ref - */ - private JLinkedList portComponentRefList = null; - - - /** - * List of elements handler - */ - private JLinkedList handlerList = null; - - - /** - * Constructor : build a new ServiceRef object - */ - public ServiceRef() { - super(); - portComponentRefList = new JLinkedList("port-component-ref"); - handlerList = new JLinkedList("handler"); - } - - - // Setters - - /** - * Add a new port-component-ref element to this object - * @param portComponentRef the port-component-ref object - */ - public void addPortComponentRef(PortComponentRef portComponentRef) { - portComponentRefList.add(portComponentRef); - } - - /** - * Add a new handler element to this object - * @param handler the handler object - */ - public void addHandler(Handler handler) { - handlerList.add(handler); - } - - /** - * Sets the service-ref-name of the service-ref - * @param serviceRefName of the service-ref - */ - public void setServiceRefName(String serviceRefName) { - this.serviceRefName = serviceRefName; - } - - - /** - * Sets the service-interface of the service-ref - * @param serviceInterface name of the service-ref - */ - public void setServiceInterface(String serviceInterface) { - this.serviceInterface = serviceInterface; - } - - - /** - * Sets the jaxrpc-mapping-file element of the service-ref - * @param jaxrpcMappingFile jaxrpc-mapping-file of the service-ref - */ - public void setJaxrpcMappingFile(String jaxrpcMappingFile) { - this.jaxrpcMappingFile = jaxrpcMappingFile; - } - - - /** - * Sets the wsdl-file element of the service-ref - * @param wsdlFile name of the service-ref - */ - public void setWsdlFile(String wsdlFile) { - this.wsdlFile = wsdlFile; - } - - - /** - * Sets the service-qname of the service-ref - * @param serviceQname of the service-ref - */ - public void setServiceQname(Qname serviceQname) { - this.serviceQname = serviceQname; - } - - // Getters - - /** - * @return the service-ref-name of the service-ref - */ - public String getServiceRefName() { - return serviceRefName; - } - - /** - * @return the service-interface of the service-ref - */ - public String getServiceInterface() { - return serviceInterface; - } - - /** - * @return the Jaxrpc-mapping-file of the service-ref - */ - public String getJaxrpcMappingFile() { - return jaxrpcMappingFile; - } - - /** - * @return the wsdl-file of the service-ref - */ - public String getWsdlFile() { - return wsdlFile; - } - - - /** - * @return the service-qname element - */ - public Qname getServiceQname() { - return serviceQname; - } - - /** - * @return the list of all handler elements - */ - public JLinkedList getHandlerList() { - return handlerList; - } - - /** - * @return the list of all port-component-ref elements - */ - public JLinkedList getPortComponentRefList() { - return portComponentRefList; - } - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // service-ref-name - sb.append(xmlElement(serviceRefName, "service-ref-name", indent)); - - // service-interface - sb.append(xmlElement(serviceInterface, "service-interface", indent)); - - // wsdl-file - sb.append(xmlElement(wsdlFile, "wsdl-file", indent)); - - // jaxrpc-mapping-file - sb.append(xmlElement(jaxrpcMappingFile, "jaxrpc-mapping-file", indent)); - - //service-qname - if (serviceQname != null) { - sb.append(serviceQname.toXML(indent)); - } - - // port-component-ref - sb.append(portComponentRefList.toXML(indent)); - - // handler - sb.append(handlerList.toXML(indent)); - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/TopLevelElement.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/TopLevelElement.java deleted file mode 100644 index 7c13c9d538746d9f1ff86138a03f3c6ebaecbdf0..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/common/xml/TopLevelElement.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Philippe Coq - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.common.xml; - - -/** - * This class defines the interface that all root Element objects must use. - * @author Philippe Coq - */ -public interface TopLevelElement { - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/DomainMap.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/DomainMap.java deleted file mode 100644 index 012a9e6494222c0ac360b208cbffab08d7498a04..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/DomainMap.java +++ /dev/null @@ -1,220 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.domain; - -import java.util.Enumeration; -import java.util.Iterator; -import java.util.Vector; - -import org.ow2.jonas.deployment.common.AbsDeploymentDesc; -import org.ow2.jonas.deployment.domain.xml.Cluster; -import org.ow2.jonas.deployment.domain.xml.ClusterDaemon; -import org.ow2.jonas.deployment.domain.xml.Domain; -import org.ow2.jonas.deployment.domain.xml.Server; - - -/** - * This class provides the map of the domain as described by the - * domain description file. - * It extends the AbsDeploymentDesc which requires to implement toString() - * and provides getSAXMsg() method (displayName is not used by DomainMap). - * @author Adriana Danes - * @author S. Ali Tokmen - */ -public class DomainMap extends AbsDeploymentDesc { - - /** - * the domain description - */ - private String description = null; - - /** - * Default user name of the domain - */ - private String username = null; - - /** - * Default password of the domain, may be encoded - */ - private String password = null; - - /** - * the clusterDaemons in the domain - */ - private Vector clusterDaemons = null; - - /** - * the clusters in the domain - */ - private Vector clusters = null; - - /** - * the servers in the domain - */ - private Vector servers = null; - - /** - * @return Returns the clusterDaemons. - */ - public Vector getClusterDaemons() { - return clusterDaemons; - } - - /** - * @param clusters The clusterDaemons to set. - */ - public void setClusterDaemons(final Vector clusterDaemons) { - this.clusterDaemons = clusterDaemons; - } - - /** - * @return Returns the clusters. - */ - public Vector getClusters() { - return clusters; - } - - /** - * @param clusters The clusters to set. - */ - public void setClusters(final Vector clusters) { - this.clusters = clusters; - } - - /** - * @return Returns the description. - */ - public String getDescription() { - return description; - } - - /** - * @param description The description to set. - */ - public void setDescription(final String description) { - this.description = description; - } - - /** - * @return Returns the default username of the domain. - */ - public final String getUsername() { - return username; - } - - /** - * @param username The default username of the domain to set. - */ - public final void setUsername(final String username) { - this.username = username; - } - - /** - * @return Returns the default password of the domain - * as encoded in the XML file. - */ - public final String getPassword() { - return password; - } - - /** - * @param password The default password of the domain to set - * as encoded in the XML file. - */ - public final void setPassword(final String password) { - this.password = password; - } - - /** - * @return Returns the servers. - */ - public Vector getServers() { - return servers; - } - - /** - * @param servers The servers to set. - */ - public void setServers(final Vector servers) { - this.servers = servers; - } - - /** - * Constructor - * @param domain domain - */ - public DomainMap(final Domain domain) { - description = domain.getDescription(); - username = domain.getUsername(); - password = domain.getPassword(); - clusterDaemons = new Vector(); - clusters = new Vector(); - servers = new Vector(); - - for (Iterator i = domain.getClusterDaemonList().iterator(); i.hasNext();) { - ClusterDaemon clusterDaemon = (ClusterDaemon) i.next(); - clusterDaemons.add(clusterDaemon); - } - - for (Iterator i = domain.getClusterList().iterator(); i.hasNext();) { - Cluster cluster = (Cluster) i.next(); - clusters.add(cluster); - } - - for (Iterator i = domain.getServerList().iterator(); i.hasNext();) { - Server server = (Server) i.next(); - servers.add(server); - } - - } - - /** - * Return a String representation of the DomainMap - * @return a String representation of the DomainMap - */ - @Override - public String toString() { - - StringBuffer ret = new StringBuffer(); - ret.append("\ndescription=" + description); - - ret.append("\nclusterDaemons="); - for (Enumeration e = clusterDaemons.elements(); e.hasMoreElements();) { - ret.append(e.nextElement() + ","); - } - - ret.append("\nservers="); - for (Enumeration e = servers.elements(); e.hasMoreElements();) { - ret.append(e.nextElement() + ","); - } - ret.append("\nclusters="); - for (Enumeration e = clusters.elements(); e.hasMoreElements();) { - ret.append(e.nextElement() + ","); - } - - return ret.toString(); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/DomainMapException.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/DomainMapException.java deleted file mode 100644 index ab85c82c82d6ba1df9e8e749dd87e89817a8227c..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/DomainMapException.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Florent BENOIT & Ludovic BERT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.deployment.domain; - -import org.ow2.jonas.deployment.common.DeploymentDescException; - -/** - * The class EarDeploymentDescException indicates conditions - * that a reasonable application might want to catch. - * @author Florent Benoit - * @author Ludovic Bert - */ -public class DomainMapException extends DeploymentDescException { - - /** - * Constructs a new DomainMapException with no detail - * message. - */ - public DomainMapException() { - super(); - } - - /** - * Constructs a new DomainMapException with the specified - * message. - * @param message the detail message. - */ - public DomainMapException(String message) { - super(message); - } - - /** - * Constructs a new DomainMapException with the specified - * error cause. - * @param cause the cause of the error. - */ - public DomainMapException(Throwable cause) { - super(cause); - } - - /** - * Constructs a new DomainMapException with the specified - * error cause. - * @param message the detail message. - * @param cause the cause of the error. - */ - public DomainMapException(String message, Throwable cause) { - super(message, cause); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/DomainSchemas.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/DomainSchemas.java deleted file mode 100644 index eb8f7075a2664d1e22a45bc9945b13e1e3112ac2..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/DomainSchemas.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2006 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.domain; - -import org.ow2.jonas.deployment.common.CommonsSchemas; -import org.ow2.jonas.deployment.common.util.ResourceHelper; - -/** - * This class defines the declarations of Schemas for domain.xml file. - * @author Florent Benoit - * @author S. Ali Tokmen - */ -public class DomainSchemas extends CommonsSchemas { - - /** - * Package name. - */ - private static final String PACKAGE = ResourceHelper.getResourcePackage(DomainSchemas.class); - - /** - * List of schemas used for domain.xml file. - */ - private static final String[] DOMAIN_SCHEMAS = new String[] { - PACKAGE + "jonas-domain_4_7.xsd", - PACKAGE + "jonas-domain_4_9.xsd", - PACKAGE + "jonas-domain_5_0.xsd", - PACKAGE + "jonas-domain_5_1.xsd" - }; - - - /** - * Build a new object for Schemas handling. - */ - public DomainSchemas() { - super(); - addSchemas(DOMAIN_SCHEMAS); - } - - - /** - * @return Returns the last Schema - */ - public static String getLastSchema() { - return getLastSchema(DOMAIN_SCHEMAS, PACKAGE); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/lib/DomainMapManager.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/lib/DomainMapManager.java deleted file mode 100644 index 2a7c6af09ece5119db31b7786aa8f66fe4d0160d..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/lib/DomainMapManager.java +++ /dev/null @@ -1,227 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.domain.lib; - -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileWriter; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Reader; - -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.common.digester.JDigester; -import org.ow2.jonas.deployment.common.lib.AbsDeploymentDescManager; -import org.ow2.jonas.deployment.domain.DomainMap; -import org.ow2.jonas.deployment.domain.DomainMapException; -import org.ow2.jonas.deployment.domain.DomainSchemas; -import org.ow2.jonas.deployment.domain.rules.DomainRuleSet; -import org.ow2.jonas.deployment.domain.xml.Domain; -import org.ow2.jonas.lib.execution.ExecutionResult; -import org.ow2.jonas.lib.execution.IExecution; -import org.ow2.jonas.lib.execution.RunnableHelper; -import org.ow2.jonas.lib.util.Log; - -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; - -/** - * This class extends the AbsDeploymentDescriptor class of JOnAS It provides a - * description of the domain map - * @author Adriana Danes - * @author S. Ali Tokmen - */ -public class DomainMapManager extends AbsDeploymentDescManager { - - /** - * Path of the domain.xml configuration file - */ - public static final String DOMAIN_FILE_NAME = "domain.xml"; - - /** - * Digester used to parse domain.xml - */ - private static JDigester domainDigester = null; - - /** - * Rules to parse the application.xml - */ - private static DomainRuleSet domainRuleSet = new DomainRuleSet(); - - /** - * logger - */ - private static Logger logger = Log.getLogger("org.ow2.jonas.deployment.domain"); - - /** - * Flag for parser validation - */ - private static boolean parsingWithValidation = true; - /** - * Private Empty constructor for utility class - */ - private DomainMapManager() { - } - - /** - * Get an instance of a DomainMap by parsing the domain.xml configuration file. - * @param domainFileName used when specific domain description file name has to be used - * @param classLoaderForCls the classloader for the classes. - * @return a DomainMap instance by parsing the domain.xml file - * @throws DomainMapException if the domain.xml file is - * corrupted. - */ - public static DomainMap getDomainMap(String domainFileName, ClassLoader classLoaderForCls) - throws DomainMapException { - - //Input Stream - InputStream domainInputStream = null; - String fileName = null; - if (domainFileName == null) { - // domain.xml in JONAS_BASE/conf - fileName = System.getProperty("jonas.base") + File.separator - + "conf" + File.separator - + DOMAIN_FILE_NAME; - } else { - fileName = domainFileName; - } - // load domain.xml - File domainFile = new File(fileName); - if (!domainFile.exists()) { - domainInputStream = classLoaderForCls.getResourceAsStream(DOMAIN_FILE_NAME); - } else { - try { - domainInputStream = new FileInputStream(domainFile); - } catch (Exception e) { - throw new DomainMapException("Cannot read the " + DOMAIN_FILE_NAME, e); - } - } - - Domain domain = loadDomain(new InputStreamReader(domainInputStream), DOMAIN_FILE_NAME); - try { - domainInputStream.close(); - } catch (IOException e) { - // Can't close the file - logger.log(BasicLevel.WARN, "Cannot close InputStream for " + DOMAIN_FILE_NAME); - } - - // instantiate the domain map - DomainMap domainMap = new DomainMap(domain); - return domainMap; - } - - /** - * Load the domain.xml file. - * @param reader the Reader of the XML file. - * @param fileName the name of the file (domain.xml). - * @throws DomainMapException if the file is - * corrupted. - * @return a Domain object. - */ - public static Domain loadDomain(Reader reader, String fileName) throws DomainMapException { - - Domain domain = new Domain(); - // Create if domainDigester is null - if (domainDigester == null) { - try { - // Create and initialize the digester - - domainDigester = new JDigester(domainRuleSet, getParsingWithValidation(), true, null, - new DomainSchemas()); - } catch (DeploymentDescException e) { - throw new DomainMapException(e); - } - } - - // Specify the TC ClassLoader to use - final Reader myReader = reader; - final String myFilename = fileName; - final Domain myDomain = domain; - IExecution exec = new IExecution() { - public Void execute() throws Exception { - try { - domainDigester.parse(myReader, myFilename, myDomain); - } catch (DeploymentDescException e) { - throw new DomainMapException(e); - } finally { - domainDigester.push(null); - } - return null; - } - }; - - // Execute - ExecutionResult result = RunnableHelper.execute(Domain.class.getClassLoader(), exec); - - // Throw an Exception if needed - if (result.hasException()) { - throw (DomainMapException) result.getException(); - } - - return domain; - } - - /** - * Save the domain.xml file. - * @param domain domain representation. - * @param fileName the name of the file (domain.xml). - * @throws DomainMapException Problem writing into file - */ - public static void saveDomain(Domain domain, String fileName) throws DomainMapException { - if (fileName == null) { - // domain.xml in JONAS_BASE/conf - fileName = System.getProperty("jonas.base") + File.separator - + "conf" + File.separator - + DOMAIN_FILE_NAME; - } - - try { - BufferedWriter out = new BufferedWriter(new FileWriter(fileName)); - out.write(domain.toXML()); - out.close(); - } catch(Exception e) { - throw new DomainMapException("Failed writing into domain.xml", e); - } - } - - /** - * Controls whether the parser is reporting all validity errors. - * @return if true, all external entities will be read. - */ - public static boolean getParsingWithValidation() { - return parsingWithValidation; - } - - /** - * Controls whether the parser is reporting all validity errors. - * @param validation if true, all external entities will be read. - */ - public static void setParsingWithValidation(boolean validation) { - DomainMapManager.parsingWithValidation = validation; - } -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/rules/ClusterDaemonRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/rules/ClusterDaemonRuleSet.java deleted file mode 100644 index 91db2d9818768f0d48cd8b5ecc9dacfb4db3d1d6..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/rules/ClusterDaemonRuleSet.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.domain.rules; - -import org.ow2.jonas.deployment.common.rules.JRuleSetBase; - -import org.apache.commons.digester.Digester; - -/** - * This class defines the rules to analyze the server element - * - * @author Adriana Danes - * @author S. Ali Tokmen - */ - -public class ClusterDaemonRuleSet extends JRuleSetBase { - - /** - * Construct an object with the prefix "application" - */ - public ClusterDaemonRuleSet(String prefix) { - super(prefix); - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "cluster-daemon", - "org.ow2.jonas.deployment.domain.xml.ClusterDaemon"); - digester.addSetNext(prefix + "cluster-daemon", - "addClusterDaemon", - "org.ow2.jonas.deployment.domain.xml.ClusterDaemon"); - digester.addCallMethod(prefix + "cluster-daemon/name", "setName", 0); - digester.addCallMethod(prefix + "cluster-daemon/description", "setDescription", 0); - digester.addCallMethod(prefix + "cluster-daemon/password", "setPassword", 0); - digester.addCallMethod(prefix + "cluster-daemon/username", "setUsername", 0); - digester.addRuleSet(new LocationRuleSet(prefix + "cluster-daemon/")); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/rules/ClusterRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/rules/ClusterRuleSet.java deleted file mode 100644 index 271c198ea291a42c45ec021f40bf6d62b6057eb4..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/rules/ClusterRuleSet.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.domain.rules; - -import org.ow2.jonas.deployment.common.rules.JRuleSetBase; - -import org.apache.commons.digester.Digester; - -/** - * This class defines the rules to analyze the cluster element. - * A Cluster element may contain another cluster element. - * - * @author Adriana Danes - */ - -public class ClusterRuleSet extends JRuleSetBase { - - private String CLUSTER = "cluster"; - - /** - * If greater than 0 it gives the level of an inner cluster element - */ - int indentLevel = 0; - - /** - * Maximum sub-elements - */ - int maxLevel = 3; - - /** - * Construct an object with the given prefix - * @param prefix prefix to use during the parsing - */ - public ClusterRuleSet(String prefix) { - super(prefix); - int previousIndex = 0; - int index; - while(true) { - index = prefix.indexOf(CLUSTER, previousIndex); - if (index < 0) { - break; - } else { - indentLevel++; - previousIndex = index + CLUSTER.length(); - } - } - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "cluster", - "org.ow2.jonas.deployment.domain.xml.Cluster"); - digester.addSetNext(prefix + "cluster", - "addCluster", - "org.ow2.jonas.deployment.domain.xml.Cluster"); - digester.addCallMethod(prefix + "cluster/name", "setName", 0); - digester.addCallMethod(prefix + "cluster/description", "setDescription", 0); - digester.addRuleSet(new ServerRuleSet(prefix + "cluster/")); - if (indentLevel < maxLevel) { - digester.addRuleSet(new ClusterRuleSet(prefix + "cluster/")); - } - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/rules/DomainRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/rules/DomainRuleSet.java deleted file mode 100644 index 252c3795ace7d65962ad3e1e609369110938afc8..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/rules/DomainRuleSet.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.domain.rules; - -import org.ow2.jonas.deployment.common.rules.JRuleSetBase; - -import org.apache.commons.digester.Digester; - -/** - * This class defines the rules to analyze the domain element - * - * @author Adriana Danes - * @author S. Ali Tokmen - */ - -public class DomainRuleSet extends JRuleSetBase { - - /** - * Construct an object with the prefix "domain" - */ - public DomainRuleSet() { - super("domain/"); - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addCallMethod(prefix + "name", "setName", 0); - digester.addCallMethod(prefix + "description", "setDescription", 0); - digester.addCallMethod(prefix + "username", "setUsername", 0); - digester.addCallMethod(prefix + "password", "setPassword", 0); - digester.addRuleSet(new ClusterDaemonRuleSet(prefix)); - digester.addRuleSet(new ServerRuleSet(prefix)); - digester.addRuleSet(new ClusterRuleSet(prefix)); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/rules/LocationRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/rules/LocationRuleSet.java deleted file mode 100644 index 386f95778085b46b16db548b5f08c56aaf4b0669..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/rules/LocationRuleSet.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.domain.rules; - -import org.ow2.jonas.deployment.common.rules.JRuleSetBase; - -import org.apache.commons.digester.Digester; - -/** - * This class defines the rules to analyze the location element - * - * @author Adriana Danes - */ - -public class LocationRuleSet extends JRuleSetBase { - - /** - * Construct an object with the prefix "application" - */ - public LocationRuleSet(String prefix) { - super(prefix); - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "location", - "org.ow2.jonas.deployment.domain.xml.Location"); - digester.addSetNext(prefix + "location", - "addLocation", - "org.ow2.jonas.deployment.domain.xml.Location"); - digester.addCallMethod(prefix + "location/url", "addUrl", 0); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/rules/ServerRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/rules/ServerRuleSet.java deleted file mode 100644 index 7c303fd6e21bf2a389a06412efd955dea6b33211..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/rules/ServerRuleSet.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.domain.rules; - -import org.ow2.jonas.deployment.common.rules.JRuleSetBase; - -import org.apache.commons.digester.Digester; - -/** - * This class defines the rules to analyze the server element - * - * @author Adriana Danes - * @author S. Ali Tokmen - */ - -public class ServerRuleSet extends JRuleSetBase { - - /** - * Construct an object with the prefix "application" - */ - public ServerRuleSet(String prefix) { - super(prefix); - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "server", - "org.ow2.jonas.deployment.domain.xml.Server"); - digester.addSetNext(prefix + "server", - "addServer", - "org.ow2.jonas.deployment.domain.xml.Server"); - digester.addCallMethod(prefix + "server/name", "setName", 0); - digester.addCallMethod(prefix + "server/password", "setPassword", 0); - digester.addCallMethod(prefix + "server/username", "setUsername", 0); - digester.addCallMethod(prefix + "server/description", "setDescription", 0); - digester.addCallMethod(prefix + "server/cluster-daemon", "setClusterDaemon", 0); - digester.addRuleSet(new LocationRuleSet(prefix + "server/")); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/wrapper/DomainManagerWrapper.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/wrapper/DomainManagerWrapper.java deleted file mode 100644 index a407e0c2d8a5f017b253c04787d21d4fed93aeaa..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/wrapper/DomainManagerWrapper.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.domain.wrapper; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import org.ow2.jonas.deployment.domain.DomainMap; -import org.ow2.jonas.deployment.domain.DomainMapException; -import org.ow2.jonas.lib.bootstrap.LoaderManager; - - -/** - * - * - * @author Adriana Danes - */ -public class DomainManagerWrapper { - - /** - * DomainMapManager fully qualified classname - */ - private static final String DOMAIN_MANAGER_CLASSNAME = "org.ow2.jonas.deployment.domain.lib.DomainMapManager"; - - /** - * Empty private constructor for utility classes - */ - private DomainManagerWrapper() { } - - /** - * Wrap DomainMapManager.getDeploymentDesc(domainFileName, cl) - * - * @param domainFileName name of the file containing the domain map - * @param cl Domain ClassLoader - * - * @return the DomainMap containing the map description - * - * @throws DomainMapException When DomainMap can't be created - */ - public static DomainMap getDomainMap(final String domainFileName, final ClassLoader cl) - throws DomainMapException { - LoaderManager lm = LoaderManager.getInstance(); - DomainMap map = null; - try { - ClassLoader ext = lm.getExternalLoader(); - Class manager = ext.loadClass(DOMAIN_MANAGER_CLASSNAME); - Method m = manager.getDeclaredMethod("getDomainMap", new Class[] {String.class, ClassLoader.class}); - map = (DomainMap) m.invoke(null, new Object[] {domainFileName, cl}); - } catch (InvocationTargetException ite) { - Throwable t = ite.getTargetException(); - if (DomainMapException.class.isInstance(t)) { - throw (DomainMapException) ite.getTargetException(); - } else { - throw new DomainMapException("DomainMapManager.getDomainMap fails", t); - } - } catch (Exception e) { - // TODO add i18n here - throw new DomainMapException("Problems when using reflection on DomainMapManager", e); - } - - return map; - } - - /** - * Wrap DomainMapManager.setParsingWithValidation(b) - * - * @param b true/false - */ - public static void setParsingWithValidation(final boolean b) { - LoaderManager lm = LoaderManager.getInstance(); - - try { - ClassLoader ext = lm.getExternalLoader(); - Class manager = ext.loadClass(DOMAIN_MANAGER_CLASSNAME); - Method m = manager.getDeclaredMethod("setParsingWithValidation", new Class[] {boolean.class}); - m.invoke(null, new Object[] {new Boolean(b)}); - } catch (Exception e) { - // Should never occurs - //logger.log(BasicLevel.ERROR, e); - } - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/xml/Cluster.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/xml/Cluster.java deleted file mode 100644 index 62172192fba1a70da6efe1a8df8d8d1706f497ac..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/xml/Cluster.java +++ /dev/null @@ -1,158 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.domain.xml; - -import org.ow2.jonas.deployment.common.xml.AbsElement; -import org.ow2.jonas.deployment.common.xml.JLinkedList; - -public class Cluster extends AbsElement { - - private String name = null; - - /** - * description - */ - private String description = null; - /** - * servers in the cluster - */ - private JLinkedList serverList = null; - - /** - * sub-clusters - */ - private JLinkedList clusterList = null; - /** - * Constructor - */ - public Cluster() { - super(); - serverList = new JLinkedList("server"); - clusterList = new JLinkedList("cluster"); - } - - - /** - * @return Returns the name. - */ - public String getName() { - return name; - } - - /** - * @param name The name to set. - */ - public void setName(String name) { - this.name = name; - } - - /** - * @return Returns the description. - */ - public String getDescription() { - return description; - } - - - /** - * @param description The description to set. - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * Add a new sub-cluster (cluster element) to this object - * @param cluster the Cluster object representing a sub-cluster - */ - public void addCluster(Cluster cluster) { - clusterList.add(cluster); - } - /** - * Add a new server element to this object - * @param server the Server object - */ - public void addServer(Server server) { - serverList.add(server); - } - - /** - * @return Returns the clusterList. - */ - public JLinkedList getClusterList() { - return clusterList; - } - /** - * @param clusterList The clusterList to set. - */ - public void setClusterList(JLinkedList clusterList) { - this.clusterList = clusterList; - } - /** - * @return Returns the serverList. - */ - public JLinkedList getServerList() { - return serverList; - } - - /** - * @param serverList The serverList to set. - */ - public void setServerList(JLinkedList serverList) { - this.serverList = serverList; - } - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // cluster name - if (name != null) { - sb.append(xmlElement(name, "name", indent)); - } - // description - if (getDescription() != null) { - sb.append(xmlElement(getDescription(), "description", indent)); - } - // servers - sb.append(getServerList().toXML(indent)); - // clusters - sb.append(getClusterList().toXML(indent)); - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/xml/ClusterDaemon.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/xml/ClusterDaemon.java deleted file mode 100644 index 723b572dced31f34dea592e85784dd86f67129fd..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/xml/ClusterDaemon.java +++ /dev/null @@ -1,186 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2006 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.domain.xml; - -import org.ow2.jonas.deployment.common.xml.AbsElement; - -/** - * Cluster Daemon configuration element - * - * @author Benoit Pelletier - * @author S. Ali Tokmen - */ -public class ClusterDaemon extends AbsElement { - - /** - * Version UID - */ - private static final long serialVersionUID = 1322641391857423458L; - - /** - * Instance name - */ - private String name = null; - - /** - * description - */ - private String description = null; - - /** - * URL - */ - private Location location = null; - - /** - * User name - */ - private String username = null; - - /** - * Password, may be encoded - */ - private String password = null; - - // TO DO - // Add state element - - /** - * Constructor - */ - public ClusterDaemon() { - super(); - } - - /** - * @return Returns the location. - */ - public Location getLocation() { - return location; - } - - /** - * @param location The location to set. - */ - public void setLocation(Location location) { - this.location = location; - } - - /** - * @param location The location to set. - */ - public void addLocation(Location location) { - this.location = location; - } - - /** - * @return Returns the name. - */ - public String getName() { - return name; - } - - /** - * @param name The name to set. - */ - public void setName(String name) { - this.name = name; - } - - /** - * @return Returns the description. - */ - public String getDescription() { - return description; - } - - /** - * @param description The description to set. - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * @return Returns the username. - */ - public final String getUsername() { - return username; - } - - /** - * @param username The username to set. - */ - public final void setUsername(String username) { - this.username = username; - } - - /** - * @return Returns the password as encoded in the XML file. - */ - public final String getPassword() { - return password; - } - - /** - * @param password The password to set as encoded in the XML file. - */ - public final void setPassword(String password) { - this.password = password; - } - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // name - if (name != null) { - sb.append(xmlElement(name, "name", indent)); - } - // description - if (getDescription() != null) { - sb.append(xmlElement(getDescription(), "description", indent)); - } - // location - if (location != null) { - sb.append(location.toXML(indent)); - } - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/xml/Domain.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/xml/Domain.java deleted file mode 100644 index 6ef3807f51fb0b5304870eba8964b196feef16ac..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/xml/Domain.java +++ /dev/null @@ -1,250 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.domain.xml; - -import org.ow2.jonas.deployment.clusterd.ClusterDaemonSchemas; -import org.ow2.jonas.deployment.common.CommonsSchemas; -import org.ow2.jonas.deployment.common.xml.AbsDescriptionElement; -import org.ow2.jonas.deployment.common.xml.JLinkedList; -import org.ow2.jonas.deployment.common.xml.TopLevelElement; -import org.ow2.jonas.deployment.domain.DomainSchemas; - -/** - * This class defines the implementation of the domain - * - * @author Adriana Danes - * @author S. Ali Tokmen - */ - -public class Domain - extends AbsDescriptionElement - implements TopLevelElement { - - /** - * Version UID - */ - private static final long serialVersionUID = 3866056043763651049L; - - /** - * servers - */ - private JLinkedList serverList = null; - - /** - * cluster daemons - */ - private JLinkedList clusterDaemonList = null; - - /** - * cluster - */ - private JLinkedList clusterList = null; - - /** - * Domain name - */ - private String name = null; - - /** - * Default user name of the domain - */ - private String username = null; - - /** - * Default password of the domain, may be encoded - */ - private String password = null; - - /** - * Latest XML Header. - */ - private static final String header = CommonsSchemas.getHeaderForElement("domain", - DomainSchemas.getLastSchema()); - - /** - * Constructor - */ - public Domain() { - super(); - serverList = new JLinkedList("server"); - clusterList = new JLinkedList("cluster"); - clusterDaemonList = new JLinkedList("clusterDaemon"); - } - - /** - * @return Returns the name. - */ - public String getName() { - return name; - } - - /** - * @param name The name to set. - */ - public void setName(String name) { - this.name = name; - } - - /** - * @return Returns the default username of the domain. - */ - public final String getUsername() { - return username; - } - - /** - * @param username The default username of the domain to set. - */ - public final void setUsername(String username) { - this.username = username; - } - - /** - * @return Returns the default password of the domain - * as encoded in the XML file. - */ - public final String getPassword() { - return password; - } - - /** - * @param password The default password of the domain to set - * as encoded in the XML file. - */ - public final void setPassword(String password) { - this.password = password; - } - - /** - * Add a new cluster element to this object - * @param cluster the Cluster object - */ - public void addCluster(Cluster cluster) { - clusterList.add(cluster); - } - - /** - * Add a new cluster daemon element to this object - * @param clusterDaemon the ClusterDaemon object - */ - public void addClusterDaemon(ClusterDaemon clusterDaemon) { - clusterDaemonList.add(clusterDaemon); - } - - /** - * Add a new server element to this object - * @param server the Server object - */ - public void addServer(Server server) { - serverList.add(server); - } - - /** - * @return Returns the clusterList. - */ - public JLinkedList getClusterList() { - return clusterList; - } - - /** - * @param clusterList The clusterList to set. - */ - public void setClusterList(JLinkedList clusterList) { - this.clusterList = clusterList; - } - - /** - * @param clusterDaemonList The clusterDaemonList to set. - */ - public void setClusterDaemonList(JLinkedList clusterDaemonList) { - this.clusterDaemonList = clusterDaemonList; - } - - /** - * @return Returns the clusterDaemonList. - */ - public JLinkedList getClusterDaemonList() { - return clusterDaemonList; - } - - /** - * @return Returns the serverList. - */ - public JLinkedList getServerList() { - return serverList; - } - - /** - * @param serverList The serverList to set. - */ - public void setServerList(JLinkedList serverList) { - this.serverList = serverList; - } - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prefixing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append(header); - indent += 2; - - // name - if (name != null) { - sb.append(xmlElement(getName(), "name", indent)); - } - - // description - if (getDescription() != null) { - sb.append(xmlElement(getDescription(), "description", indent)); - } - - // username and password - if (username != null && password != null) { - sb.append(xmlElement(username, "username", indent)); - sb.append(xmlElement(password, "password", indent)); - } - - // cluster daemons - sb.append(getClusterDaemonList().toXML(indent)); - - // servers - sb.append(getServerList().toXML(indent)); - - // clusters - sb.append(getClusterList().toXML(indent)); - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/xml/Location.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/xml/Location.java deleted file mode 100644 index 39e0ad87f10f75d352f8fb6f4c82eb9c178be5ae..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/xml/Location.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.domain.xml; - -import org.ow2.jonas.deployment.common.xml.AbsElement; -import org.ow2.jonas.deployment.common.xml.JLinkedList; - -/** - * - * @author Adriana Danes - * - * A location element is composed of a list of urls, where a url is - * the-string-representation-of-the-url - */ -public class Location extends AbsElement { - - private JLinkedList urlList = null; - /** - * Constructor - */ - public Location() { - super(); - urlList = new JLinkedList("url"); - } - - /** - * @return Returns the urlList. - */ - public JLinkedList getUrlList() { - return urlList; - } -/** - * Add a url to the urlList. - * @param url - */ - public void addUrl(String url) { - urlList.add(url); - } - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // principal-name - sb.append(urlList.toXML(indent)); - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/xml/Server.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/xml/Server.java deleted file mode 100644 index de2eba46187b500d672fdea9cc53a1e5cfcefb6f..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/domain/xml/Server.java +++ /dev/null @@ -1,219 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.domain.xml; - -import org.ow2.jonas.deployment.common.xml.AbsElement; -/** - * JOnAS instance - * - * @author Adriana Danes - * @author S. Ali Tokmen - */ -public class Server extends AbsElement { - - /** - * Version UID - */ - private static final long serialVersionUID = 3775047449169303947L; - - /** - * Instance name - */ - private String name = null; - - /** - * description - */ - private String description = null; - - /** - * URL - */ - private Location location = null; - - /** - * User name - */ - private String username = null; - - /** - * Password, may be encoded - */ - private String password = null; - - /** - * Cluster Daemon - */ - private String clusterDaemon = null; - - // TO DO - // Add state element - - /** - * Constructor - */ - public Server() { - super(); - } - - /** - * @return Returns the location. - */ - public Location getLocation() { - return location; - } - - /** - * @param location The location to set. - */ - public void setLocation(Location location) { - this.location = location; - } - - /** - * @param location The location to set. - */ - public void addLocation(Location location) { - this.location = location; - } - - /** - * @return Returns the username. - */ - public final String getUsername() { - return username; - } - - /** - * @param username The username to set. - */ - public final void setUsername(String username) { - this.username = username; - } - - /** - * @return Returns the password as encoded in the XML file. - */ - public final String getPassword() { - return password; - } - - /** - * @param password The password to set as encoded in the XML file. - */ - public final void setPassword(String password) { - this.password = password; - } - - /** - * @return Returns the name. - */ - public String getName() { - return name; - } - - /** - * @param name The name to set. - */ - public void setName(String name) { - this.name = name; - } - - /** - * @return Returns the description. - */ - public String getDescription() { - return description; - } - - /** - * @param description The description to set. - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // name - if (name != null) { - sb.append(xmlElement(name, "name", indent)); - } - - // description - if (getDescription() != null) { - sb.append(xmlElement(getDescription(), "description", indent)); - } - - // location - if (location != null) { - sb.append(location.toXML(indent)); - } - - // username and password - if (username != null && password != null) { - sb.append(xmlElement(username, "username", indent)); - sb.append(xmlElement(password, "password", indent)); - } - - // cluster-daemon - if (clusterDaemon != null) { - sb.append(xmlElement(clusterDaemon, "cluster-daemon", indent)); - } - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } - - /** - * - * @return the cluster daemon name - */ - public String getClusterDaemon() { - return clusterDaemon; - } - - /** - * Set the cluster daemon name - * @param clusterDaemon name - */ - public void setClusterDaemon(String clusterDaemon) { - this.clusterDaemon = clusterDaemon; - } -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/EarDTDs.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/EarDTDs.java deleted file mode 100644 index 67018abd345f1c629344e747560c5797151d67fd..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/EarDTDs.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Helene Joanin - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.ear; - - -import org.ow2.jonas.deployment.common.CommonsDTDs; -import org.ow2.jonas.deployment.common.util.ResourceHelper; - -/** - * This class defines the declarations of DTDs for application.xml. - * @author Helene Joanin - */ -public class EarDTDs extends CommonsDTDs { - - /** - * Package name. - */ - private static final String PACKAGE = ResourceHelper.getResourcePackage(EarDTDs.class); - - /** - * List of application dtds. - */ - private static final String[] EAR_DTDS = new String[] { - PACKAGE + "application_1_2.dtd", - PACKAGE + "application_1_3.dtd" - }; - - /** - * List of application publicId. - */ - private static final String[] EAR_DTDS_PUBLIC_ID = new String[] { - "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN", - "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" - }; - - /** - * Build a new object for appliaction.xml DTDs handling. - */ - public EarDTDs() { - super(); - addMapping(EAR_DTDS, EAR_DTDS_PUBLIC_ID); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/EarDeploymentDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/EarDeploymentDesc.java deleted file mode 100644 index 3fc03d48c46d6eec18b8eb781755f408729f6a59..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/EarDeploymentDesc.java +++ /dev/null @@ -1,371 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Florent BENOIT & Ludovic BERT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.ear; - -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Vector; - -import org.ow2.jonas.deployment.common.AbsDeploymentDesc; -import org.ow2.jonas.deployment.ear.xml.Application; -import org.ow2.jonas.deployment.ear.xml.JonasApplication; -import org.ow2.jonas.deployment.ear.xml.JonasSecurity; -import org.ow2.jonas.deployment.ear.xml.Module; -import org.ow2.jonas.deployment.ear.xml.SecurityRole; -import org.ow2.jonas.deployment.ear.xml.SecurityRoleMapping; -import org.ow2.jonas.deployment.ear.xml.Web; - - - -/** - * This class extends the AbsDeploymentDescriptor class of JOnAS It provides a - * description of the specific EAR desployment descriptor - * @author Florent Benoit - * @author Ludovic Bert - * @author Helene Joanin - */ - -public class EarDeploymentDesc extends AbsDeploymentDesc { - - /** - * Vector of connectorTags (Connector objects). - */ - private Vector connectorTags = null; - - /** - * Vector of altDD for connectors - */ - private Vector altDDConnectors = null; - - /** - * Vector of ejbTags (Ejb objects). - */ - private Vector ejbTags = null; - - /** - * Vector of altDD for EJBs - */ - private Vector altDDEjbs = null; - - /** - * Vector of webTags (Web objects). - */ - private Vector webTags = null; - - /** - * Vector of clientTags (Java objects). - */ - private Vector clientTags = null; - - /** - * Vector of altDD for wars - */ - private Vector altDDWebs = null; - - /** - * Vector of altDD for clients - */ - private Vector altDDClients = null; - - /** - * Vector of security roles - */ - private Vector securityRolesNames = null; - - /** - * Xml content of application.xml file - */ - private String xmlContent = null; - - /** - * Xml content of jonas-application.xml file - */ - private String jonasXmlContent = null; - - /** - * User to role mapping - */ - private Map userToRoleMapping = null; - - /** - * Construct an instance of a EarDeploymentDesc. Called by the getInstance() - * method. - * @param classLoaderForCls ClassLoader of the classes . - * @param application application.xml parsed file. - * @param jonasApplication jonas-application.xml parsed file. - * @throws EarDeploymentDescException if we can't build an instance. - */ - public EarDeploymentDesc(ClassLoader classLoaderForCls, Application application, JonasApplication jonasApplication) - throws EarDeploymentDescException { - - // test classloader - if (classLoaderForCls == null) { - throw new EarDeploymentDescException("DeploymentDesc: Classloader is null"); - } - - ejbTags = new Vector(); - connectorTags = new Vector(); - webTags = new Vector(); - clientTags = new Vector(); - altDDEjbs = new Vector(); - altDDClients = new Vector(); - altDDConnectors = new Vector(); - altDDWebs = new Vector(); - securityRolesNames = new Vector(); - - // display name - displayName = application.getDisplayName(); - - // Tags - for (Iterator i = application.getModuleList().iterator(); i.hasNext();) { - Module module = (Module) i.next(); - String ejb = module.getEjb(); - String connector = module.getConnector(); - String java = module.getJava(); - Web web = module.getWeb(); - String altDD = module.getAltDd(); - if (ejb != null) { - ejbTags.add(ejb); - altDDEjbs.add(altDD); - } else if (connector != null) { - connectorTags.add(connector); - altDDConnectors.add(altDD); - } else if (java != null) { - clientTags.add(java); - altDDClients.add(altDD); - } else if (web != null) { - webTags.add(web); - altDDWebs.add(altDD); - } - } - - // application security role - for (Iterator i = application.getSecurityRoleList().iterator(); i.hasNext();) { - SecurityRole securityRole = (SecurityRole) i.next(); - if (securityRole != null) { - if (securityRole.getRoleName() != null) { - securityRolesNames.add(securityRole.getRoleName()); - } - } - } - - // user to role mapping - JonasSecurity jonasSecurity = jonasApplication.getJonasSecurity(); - if (jonasSecurity != null) { - userToRoleMapping = new HashMap(); - for (Iterator it = jonasSecurity.getSecurityRoleMappingList().iterator(); it.hasNext();) { - SecurityRoleMapping securityRoleMapping = (SecurityRoleMapping) it.next(); - if (securityRoleMapping != null) { - // get role name - String roleName = securityRoleMapping.getRoleName(); - // get principals - List principals = securityRoleMapping.getPrincipalNamesList(); - - // Iterator on principals - for (Iterator itPrincipals = principals.iterator(); itPrincipals.hasNext();) { - // get principal name - String principalName = (String) itPrincipals.next(); - // Existing mapping ? - List currentMapping = (List) userToRoleMapping.get(principalName); - if (currentMapping == null) { - currentMapping = new ArrayList(); - userToRoleMapping.put(principalName, currentMapping); - } - // add mapping - currentMapping.add(roleName); - } - } - } - } - - } - - /** - * Get the ejb tags of the application.xml file. - * @return the ejb tags of the application.xml file. - */ - public String[] getEjbTags() { - String[] tmp = new String[ejbTags.size()]; - ejbTags.copyInto(tmp); - return tmp; - } - - /** - * Get the alt-dd of the ejbs of the application.xml file. - * @return the alt-dd of the ejbs of the application.xml file. - */ - public String[] getAltDDEjbs() { - String[] tmp = new String[altDDEjbs.size()]; - altDDEjbs.copyInto(tmp); - return tmp; - } - - /** - * Get the client tags of the application.xml file. - * @return the client tags of the application.xml file. - */ - public String[] getClientTags() { - String[] tmp = new String[clientTags.size()]; - clientTags.copyInto(tmp); - return tmp; - } - - /** - * Get the alt-dd of the clients of the application.xml file. - * @return the alt-dd of the clients of the application.xml file. - */ - public String[] getAltDDClients() { - String[] tmp = new String[altDDClients.size()]; - altDDClients.copyInto(tmp); - return tmp; - } - - /** - * Get the web tags of the application.xml file. - * @return the web tags of the application.xml file. - */ - public Web[] getWebTags() { - Web[] tmp = new Web[webTags.size()]; - webTags.copyInto(tmp); - return tmp; - } - - /** - * Get the alt-dd of the wars of the application.xml file. - * @return the alt-dd of the wars of the application.xml file. - */ - public String[] getAltDDWebs() { - String[] tmp = new String[altDDWebs.size()]; - altDDWebs.copyInto(tmp); - return tmp; - } - - /** - * Get the connector tags of the application.xml file. - * @return the connector tags of the application.xml file. - */ - public String[] getConnectorTags() { - String[] tmp = new String[connectorTags.size()]; - connectorTags.copyInto(tmp); - return tmp; - } - - /** - * Get the alt-dd of the connectors of the application.xml file. - * @return the alt-dd of the connectors of the application.xml file. - */ - public String[] getAltDDConnectors() { - String[] tmp = new String[altDDConnectors.size()]; - altDDConnectors.copyInto(tmp); - return tmp; - } - - /** - * Get the security-role names tags - * @return the security roles names. - */ - public String[] getSecurityRolesNames() { - String[] tmp = new String[securityRolesNames.size()]; - securityRolesNames.copyInto(tmp); - return tmp; - } - - /** - * Get the content of the xml file - * @return the content of the application xml file - */ - public String getXmlContent() { - return xmlContent; - } - - /** - * Get the content of the jonas-application xml file - * @return the content of the jonas-application xml file - */ - public String getJonasXmlContent() { - return jonasXmlContent; - } - - /** - * Set the content of the xml file - * @param xml the content of the application xml file - */ - public void setXmlContent(String xml) { - xmlContent = xml; - } - - /** - * Set the content of the xml file - * @param xml the content of the jonas-application xml file - */ - public void setJonasXmlContent(String xml) { - jonasXmlContent = xml; - } - - /** - * Return a String representation of the EarDeploymentDesc. - * @return a String representation of the EarDeploymentDesc. - */ - public String toString() { - - StringBuffer ret = new StringBuffer(); - ret.append("\ndisplay-name=" + displayName); - ret.append("\nconnectors="); - for (Enumeration e = connectorTags.elements(); e.hasMoreElements();) { - ret.append(e.nextElement() + ","); - } - ret.append("\nejbs="); - for (Enumeration e = ejbTags.elements(); e.hasMoreElements();) { - ret.append(e.nextElement() + ","); - } - ret.append("\nwebs="); - for (Enumeration e = webTags.elements(); e.hasMoreElements();) { - ret.append(((Web) e.nextElement()).getWebUri() + ","); - } - ret.append("\njavas="); - for (Enumeration e = clientTags.elements(); e.hasMoreElements();) { - ret.append(e.nextElement() + ","); - } - ret.append("\nsecurity-roles-names="); - for (Enumeration e = securityRolesNames.elements(); e.hasMoreElements();) { - ret.append(e.nextElement() + ","); - } - - return ret.toString(); - } - - /** - * @return the userToRoleMapping. - */ - public Map getUserToRoleMapping() { - return userToRoleMapping; - } -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/EarDeploymentDescException.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/EarDeploymentDescException.java deleted file mode 100644 index 506114c8f79f186d6e6ee6770c723ca64f213ea1..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/EarDeploymentDescException.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Florent BENOIT & Ludovic BERT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.deployment.ear; - -import org.ow2.jonas.deployment.common.DeploymentDescException; - -/** - * The class EarDeploymentDescException indicates conditions - * that a reasonable application might want to catch. - * @author Florent Benoit - * @author Ludovic Bert - */ -public class EarDeploymentDescException extends DeploymentDescException { - - /** - * Constructs a new EarDeploymentDescException with no detail - * message. - */ - public EarDeploymentDescException() { - super(); - } - - /** - * Constructs a new EarDeploymentDescException with the specified - * message. - * @param message the detail message. - */ - public EarDeploymentDescException(String message) { - super(message); - } - - /** - * Constructs a new EarDeploymentDescException with the specified - * error cause. - * @param cause the cause of the error. - */ - public EarDeploymentDescException(Throwable cause) { - super(cause); - } - - /** - * Constructs a new EarDeploymentDescException with the specified - * error cause. - * @param message the detail message. - * @param cause the cause of the error. - */ - public EarDeploymentDescException(String message, Throwable cause) { - super(message, cause); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/EarSchemas.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/EarSchemas.java deleted file mode 100644 index 5a4216913ee33ed7648145ae4ed85a2823b21357..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/EarSchemas.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2007 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.ear; - -import org.ow2.jonas.deployment.common.CommonsSchemas; -import org.ow2.jonas.deployment.common.util.ResourceHelper; - -/** - * This class defines the declarations of Schemas for application.xml. - * @author Helene Joanin - */ -public class EarSchemas extends CommonsSchemas { - - /** - * Package name. - */ - private static final String PACKAGE = ResourceHelper.getResourcePackage(EarSchemas.class); - - /** - * List of schemas used for application.xml. - */ - private static final String[] APP_SCHEMAS = new String[] { - PACKAGE + "application_1_4.xsd", - PACKAGE + "application_5.xsd" - }; - - - /** - * Build a new object for Schemas handling. - */ - public EarSchemas() { - super(); - addSchemas(APP_SCHEMAS); - } - - /** - * @return Returns the last Schema. - */ - public static String getLastSchema() { - return getLastSchema(APP_SCHEMAS, PACKAGE); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/JonasEarSchemas.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/JonasEarSchemas.java deleted file mode 100644 index 1b9f0174193bb125d50e79fa2ee6e432de151b3d..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/JonasEarSchemas.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent Benoit - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.ear; - -import org.ow2.jonas.deployment.common.CommonsSchemas; -import org.ow2.jonas.deployment.common.util.ResourceHelper; - -/** - * This class defines the declarations of Schemas for jonas-application.xml file. - * @author Florent Benoit - */ -public class JonasEarSchemas extends CommonsSchemas { - - /** - * Package name. - */ - private static final String PACKAGE = ResourceHelper.getResourcePackage(JonasEarSchemas.class); - - /** - * List of schemas used for jonas-application.xml file. - */ - private static final String[] JONAS_EAR_SCHEMAS = new String[] { - PACKAGE + "jonas-application_4_1_4.xsd", - PACKAGE + "jonas-application_5_0.xsd" - }; - - - /** - * Build a new object for Schemas handling. - */ - public JonasEarSchemas() { - super(); - addSchemas(JONAS_EAR_SCHEMAS); - } - - - /** - * @return Returns the last Schema. - */ - public static String getLastSchema() { - return getLastSchema(JONAS_EAR_SCHEMAS, PACKAGE); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/lib/EarDeploymentDescManager.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/lib/EarDeploymentDescManager.java deleted file mode 100644 index 94af7465dc029bb9febad70b053d96b5d218e554..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/lib/EarDeploymentDescManager.java +++ /dev/null @@ -1,378 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Florent BENOIT & Ludovic BERT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.ear.lib; - -import java.io.IOException; -import java.io.Reader; -import java.io.StringReader; -import java.net.URL; -import java.net.URLConnection; - -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.common.digester.JDigester; -import org.ow2.jonas.deployment.common.lib.AbsDeploymentDescManager; -import org.ow2.jonas.deployment.ear.EarDTDs; -import org.ow2.jonas.deployment.ear.EarDeploymentDesc; -import org.ow2.jonas.deployment.ear.EarDeploymentDescException; -import org.ow2.jonas.deployment.ear.EarSchemas; -import org.ow2.jonas.deployment.ear.JonasEarSchemas; -import org.ow2.jonas.deployment.ear.rules.ApplicationRuleSet; -import org.ow2.jonas.deployment.ear.rules.JonasApplicationRuleSet; -import org.ow2.jonas.deployment.ear.xml.Application; -import org.ow2.jonas.deployment.ear.xml.JonasApplication; -import org.ow2.jonas.deployment.ear.xml.Module; -import org.ow2.jonas.deployment.ear.xml.Web; -import org.ow2.jonas.lib.util.Log; -import org.ow2.util.archive.api.ArchiveException; -import org.ow2.util.archive.api.IArchive; -import org.ow2.util.ee.deploy.api.deployable.CARDeployable; -import org.ow2.util.ee.deploy.api.deployable.EARDeployable; -import org.ow2.util.ee.deploy.api.deployable.EJBDeployable; -import org.ow2.util.ee.deploy.api.deployable.RARDeployable; -import org.ow2.util.ee.deploy.api.deployable.WARDeployable; - -/** - * This class extends the AbsDeploymentDescriptor class of JOnAS It provides a - * description of the specific EAR desployment descriptor. - * @author Florent Benoit - * @author Ludovic Bert - * @author Helene Joanin - */ -public final class EarDeploymentDescManager extends AbsDeploymentDescManager { - - /** - * Path of the application.xml deploymnet descriptor file. - */ - public static final String APPLICATION_FILE_NAME = "META-INF/application.xml"; - - /** - * Path of the jonas-application.xml deploymnet descriptor file. - */ - public static final String JONAS_APPLICATION_FILE_NAME = "META-INF/jonas-application.xml"; - - /** - * Digester used to parse application.xml. - */ - private static JDigester earDigester = null; - - /** - * Digester used to parse jonas-application.xml. - */ - private static JDigester jonasEarDigester = null; - - /** - * Rules to parse the application.xml. - */ - private static ApplicationRuleSet appRuleSet = new ApplicationRuleSet(); - - /** - * Rules to parse the jonas-application.xml. - */ - private static JonasApplicationRuleSet jonasApplicationRuleSet = new JonasApplicationRuleSet(); - - /** - * logger. - */ - private static Logger logger = Log.getLogger(Log.JONAS_EAR_PREFIX); - - /** - * Flag for parser validation. - */ - private static boolean parsingWithValidation = true; - - /** - * Private Empty constructor for utility class. - */ - private EarDeploymentDescManager() { - } - - /** - * Get an instance of an EAR deployment descriptor by parsing the - * application.xml deployment descriptor. - * @param earDeployable the deployable to analyze. - * @param classLoaderForCls the classloader for the classes. - * @return an EAR deployment descriptor by parsing the application.xml - * deployment descriptor. - * @throws EarDeploymentDescException if the deployment descriptor is - * corrupted. - */ - public static EarDeploymentDesc getDeploymentDesc(final EARDeployable earDeployable, final ClassLoader classLoaderForCls) - throws EarDeploymentDescException { - - // Input Stream - Reader appReader = null; - Reader jonasApplicationReader = null; - - Application application = null; - JonasApplication jonasApplication = null; - - String xmlContent = ""; - String jonasXmlContent = ""; - - // Get Archive - IArchive archive = earDeployable.getArchive(); - - // Get the stream - URL applicationXMLURL; - try { - applicationXMLURL = archive.getResource(APPLICATION_FILE_NAME); - } catch (ArchiveException e) { - throw new EarDeploymentDescException("Cannot get entry '" + APPLICATION_FILE_NAME + "' from the archive '" - + archive + "'.", e); - } - if (applicationXMLURL != null) { - URLConnection urlConnection = null; - try { - urlConnection = applicationXMLURL.openConnection(); - } catch (IOException e) { - throw new EarDeploymentDescException("Unable to open connection on URL '" + applicationXMLURL + "'.", e); - } - urlConnection.setDefaultUseCaches(false); - try { - xmlContent = xmlContent(urlConnection.getInputStream()); - // Read again the input stream - appReader = new StringReader(xmlContent); - } catch (IOException e) { - throw new EarDeploymentDescException("Unable to get Stream on URL '" + applicationXMLURL + "'.", e); - } - - } - - URL jonasApplicationXMLURL; - try { - jonasApplicationXMLURL = archive.getResource(JONAS_APPLICATION_FILE_NAME); - } catch (ArchiveException e) { - throw new EarDeploymentDescException("Cannot get entry '" + JONAS_APPLICATION_FILE_NAME - + "' from the archive '" + archive + "'.", e); - } - if (jonasApplicationXMLURL != null) { - URLConnection urlConnection = null; - try { - urlConnection = jonasApplicationXMLURL.openConnection(); - } catch (IOException e) { - throw new EarDeploymentDescException("Unable to open connection on URL '" + applicationXMLURL + "'.", e); - } - urlConnection.setDefaultUseCaches(false); - try { - jonasXmlContent = xmlContent(urlConnection.getInputStream()); - // Read again the input stream - jonasApplicationReader = new StringReader(jonasXmlContent); - } catch (IOException e) { - throw new EarDeploymentDescException("Unable to get Stream on URL '" + applicationXMLURL + "'.", e); - } - } - - if (appReader != null) { - application = loadApplication(appReader, APPLICATION_FILE_NAME); - try { - appReader.close(); - } catch (IOException e) { - // Can't close the file - logger.log(BasicLevel.WARN, "Cannot close InputStream for META-INF/application.xml in '" + earDeployable - + "'"); - } - } else { - application = new Application(); - - // Get URL of the deployable - URL earDeployableURL = null; - try { - earDeployableURL = earDeployable.getArchive().getURL(); - } catch (ArchiveException e) { - throw new EarDeploymentDescException("Cannot get URL for the deployable for the archive '" + archive - + "'", e); - } - - // Perform update - if (earDeployable != null) { - - // For clients - for (CARDeployable carDeployable : earDeployable.getCARDeployables()) { - Module m = new Module(); - try { - m.setJava(carDeployable.getArchive().getURL().toExternalForm().substring( - earDeployableURL.toExternalForm().length())); - } catch (ArchiveException e) { - throw new EarDeploymentDescException("Cannot get URL for the deployable for the deployable '" - + carDeployable + "'", e); - } - application.addModule(m); - } - - // For Web - for (WARDeployable warDeployable : earDeployable.getWARDeployables()) { - Web web = new Web(); - web.setContextRoot(warDeployable.getContextRoot()); - try { - web.setWebUri(warDeployable.getArchive().getURL().toExternalForm().substring( - earDeployableURL.toExternalForm().length())); - } catch (ArchiveException e) { - throw new EarDeploymentDescException("Cannot get URL for the deployable for the deployable '" - + warDeployable + "'", e); - } - Module m = new Module(); - m.setWeb(web); - application.addModule(m); - } - - // For EJBs - for (EJBDeployable ejbDeployable : earDeployable.getEJBDeployables()) { - Module m = new Module(); - try { - m.setEjb(ejbDeployable.getArchive().getURL().toExternalForm().substring( - earDeployableURL.toExternalForm().length())); - } catch (ArchiveException e) { - throw new EarDeploymentDescException("Cannot get URL for the deployable for the deployable '" - + ejbDeployable + "'", e); - } - application.addModule(m); - } - - // For Connectors - for (RARDeployable rarDeployable : earDeployable.getRARDeployables()) { - Module m = new Module(); - try { - m.setEjb(rarDeployable.getArchive().getURL().toExternalForm().substring( - earDeployableURL.toExternalForm().length())); - } catch (ArchiveException e) { - throw new EarDeploymentDescException("Cannot get URL for the deployable for the deployable '" - + rarDeployable + "'", e); - } - application.addModule(m); - } - } - - } - - // load jonas-application deployment descriptor data - // (META-INF/jonas-application.xml) - if (jonasApplicationReader != null) { - jonasApplication = loadJonasApplication(jonasApplicationReader, - JONAS_APPLICATION_FILE_NAME); - try { - jonasApplicationReader.close(); - } catch (IOException e) { - // We can't close the file - logger.log(BasicLevel.WARN, "Cannot close InputStream for '" + earDeployable + "'"); - } - } else { - jonasApplication = new JonasApplication(); - } - - // instantiate deployment descriptor - EarDeploymentDesc earDD = new EarDeploymentDesc(classLoaderForCls, application, jonasApplication); - earDD.setXmlContent(xmlContent); - earDD.setJonasXmlContent(jonasXmlContent); - return earDD; - } - - /** - * Load the application.xml file. - * @param reader the Reader of the XML file. - * @param fileName the name of the file (application.xml). - * @throws EarDeploymentDescException if the deployment descriptor is - * corrupted. - * @return an application object. - */ - public static Application loadApplication(final Reader reader, final String fileName) throws EarDeploymentDescException { - - Application app = new Application(); - // Create if earDigester is null - if (earDigester == null) { - try { - // Create and initialize the digester - earDigester = new JDigester(appRuleSet, getParsingWithValidation(), true, new EarDTDs(), - new EarSchemas()); - } catch (DeploymentDescException e) { - throw new EarDeploymentDescException(e); - } - } - - try { - earDigester.parse(reader, fileName, app); - } catch (DeploymentDescException e) { - throw new EarDeploymentDescException(e); - } finally { - earDigester.push(null); - } - - return app; - } - - /** - * Load the jonas-application.xml file. - * @param reader the stream of the XML file. - * @param fileName the name of the file (jonas-application.xml). - * @return a structure containing the result of the jonas-application.xml - * parsing. - * @throws EarDeploymentDescException if the deployment descriptor is - * corrupted. - */ - public static JonasApplication loadJonasApplication(final Reader reader, final String fileName) - throws EarDeploymentDescException { - - JonasApplication ja = new JonasApplication(); - - // Create if null - if (jonasEarDigester == null) { - try { - jonasEarDigester = new JDigester(jonasApplicationRuleSet, getParsingWithValidation(), true, null, - new JonasEarSchemas()); - } catch (DeploymentDescException e) { - throw new EarDeploymentDescException(e); - } - } - - try { - jonasEarDigester.parse(reader, fileName, ja); - - } catch (DeploymentDescException e) { - throw new EarDeploymentDescException(e); - } finally { - jonasEarDigester.push(null); - } - return ja; - } - - /** - * Controls whether the parser is reporting all validity errors. - * @return if true, all external entities will be read. - */ - public static boolean getParsingWithValidation() { - return parsingWithValidation; - } - - /** - * Controls whether the parser is reporting all validity errors. - * @param validation if true, all external entities will be read. - */ - public static void setParsingWithValidation(final boolean validation) { - EarDeploymentDescManager.parsingWithValidation = validation; - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/rules/ApplicationRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/rules/ApplicationRuleSet.java deleted file mode 100644 index 1a8126a0a4198b177e3317e631edef48a106414c..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/rules/ApplicationRuleSet.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: JOnAS team - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.ear.rules; - -import org.ow2.jonas.deployment.common.rules.JRuleSetBase; - -import org.apache.commons.digester.Digester; - -/** - * This class defines the rules to analyze the element application - * - * @author JOnAS team - */ - -public class ApplicationRuleSet extends JRuleSetBase { - - /** - * Construct an object with the prefix "application" - */ - public ApplicationRuleSet() { - super("application/"); - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - //digester.addRuleSet(new IconRuleSet(prefix)); - digester.addCallMethod(prefix + "display-name", "setDisplayName", 0); - //digester.addCallMethod(prefix + "description", "setDescription", 0); - digester.addRuleSet(new ModuleRuleSet(prefix)); - digester.addRuleSet(new SecurityRoleRuleSet(prefix)); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/rules/JonasApplicationRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/rules/JonasApplicationRuleSet.java deleted file mode 100644 index 5cee0ebdee0a5215124ad367811a789a295dcd85..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/rules/JonasApplicationRuleSet.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: JOnAS team - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.ear.rules; - -import org.ow2.jonas.deployment.common.rules.JRuleSetBase; - -import org.apache.commons.digester.Digester; - - -/** - * This class defines the rules to analyze the element jonas-application - * @author Florent Benoit - */ - -public class JonasApplicationRuleSet extends JRuleSetBase { - - /** - * Construct an object with the prefix "jonas-application" - */ - public JonasApplicationRuleSet() { - super("jonas-application/"); - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - public void addRuleInstances(Digester digester) { - digester.addRuleSet(new JonasSecurityRuleSet(prefix)); - } - -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/rules/JonasSecurityRoleMappingRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/rules/JonasSecurityRoleMappingRuleSet.java deleted file mode 100644 index 1303b3f3f9c47dae75107e5500aec263aa04d54a..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/rules/JonasSecurityRoleMappingRuleSet.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent Benoit - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.ear.rules; - -import org.ow2.jonas.deployment.common.rules.JRuleSetBase; - -import org.apache.commons.digester.Digester; - -/** - * This class defines the rules to analyze the element security-role - * @author Florent benoit - */ - -public class JonasSecurityRoleMappingRuleSet extends JRuleSetBase { - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public JonasSecurityRoleMappingRuleSet(String prefix) { - super(prefix); - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "security-role-mapping", - "org.ow2.jonas.deployment.ear.xml.SecurityRoleMapping"); - digester.addSetNext(prefix + "security-role-mapping", "addSecurityRoleMapping", - "org.ow2.jonas.deployment.ear.xml.SecurityRoleMapping"); - digester.addCallMethod(prefix + "security-role-mapping/role-name", "setRoleName", 0); - digester.addCallMethod(prefix + "security-role-mapping/principal-name", "addPrincipalName", 0); - - } -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/rules/JonasSecurityRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/rules/JonasSecurityRuleSet.java deleted file mode 100644 index 329f112ea17162c39c09e325b11d932ff2048a18..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/rules/JonasSecurityRuleSet.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent Benoit - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.ear.rules; - -import org.ow2.jonas.deployment.common.rules.JRuleSetBase; - -import org.apache.commons.digester.Digester; - -/** - * This class defines the rules to analyze the element jonas-security-mapping - * @author Florent Benoit - */ - -public class JonasSecurityRuleSet extends JRuleSetBase { - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public JonasSecurityRuleSet(String prefix) { - super(prefix); - } - - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "jonas-security", "org.ow2.jonas.deployment.ear.xml.JonasSecurity"); - digester.addSetNext(prefix + "jonas-security", "setJonasSecurity", - "org.ow2.jonas.deployment.ear.xml.JonasSecurity"); - digester.addRuleSet(new JonasSecurityRoleMappingRuleSet(prefix + "jonas-security/")); - } -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/rules/ModuleRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/rules/ModuleRuleSet.java deleted file mode 100644 index 5d2192267400476b0213d2cd56d022f1b9da4bac..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/rules/ModuleRuleSet.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: JOnAS team - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.ear.rules; - -import org.ow2.jonas.deployment.common.rules.JRuleSetBase; - -import org.apache.commons.digester.Digester; - -/** - * This class defines the rules to analyze the element module - * - * @author JOnAS team - */ - -public class ModuleRuleSet extends JRuleSetBase { - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public ModuleRuleSet(String prefix) { - super(prefix); - } - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "module", - "org.ow2.jonas.deployment.ear.xml.Module"); - digester.addSetNext(prefix + "module", - "addModule", - "org.ow2.jonas.deployment.ear.xml.Module"); - digester.addCallMethod(prefix + "module/connector", - "setConnector", 0); - digester.addCallMethod(prefix + "module/ejb", - "setEjb", 0); - digester.addCallMethod(prefix + "module/java", - "setJava", 0); - digester.addRuleSet(new WebRuleSet(prefix + "module/")); - digester.addCallMethod(prefix + "module/alt-dd", - "setAltDd", 0); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/rules/SecurityRoleRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/rules/SecurityRoleRuleSet.java deleted file mode 100644 index 6f832fcc66a078abf87f0be5b149b028f486f258..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/rules/SecurityRoleRuleSet.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: JOnAS team - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.ear.rules; - -import org.ow2.jonas.deployment.common.rules.JRuleSetBase; - -import org.apache.commons.digester.Digester; - -/** - * This class defines the rules to analyze the element security-role - * - * @author JOnAS team - */ - -public class SecurityRoleRuleSet extends JRuleSetBase { - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public SecurityRoleRuleSet(String prefix) { - super(prefix); - } - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "security-role", - "org.ow2.jonas.deployment.ear.xml.SecurityRole"); - digester.addSetNext(prefix + "security-role", - "addSecurityRole", - "org.ow2.jonas.deployment.ear.xml.SecurityRole"); - digester.addCallMethod(prefix + "security-role/description", - "setDescription", 0); - digester.addCallMethod(prefix + "security-role/role-name", - "setRoleName", 0); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/rules/WebRuleSet.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/rules/WebRuleSet.java deleted file mode 100644 index b056e328ea256a9cf38fbf7e02cd9b5ff27fa4a5..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/rules/WebRuleSet.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: JOnAS team - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.ear.rules; - -import org.ow2.jonas.deployment.common.rules.JRuleSetBase; - -import org.apache.commons.digester.Digester; - -/** - * This class defines the rules to analyze the element web - * - * @author JOnAS team - */ - -public class WebRuleSet extends JRuleSetBase { - - /** - * Construct an object with a specific prefix - * @param prefix prefix to use during the parsing - */ - public WebRuleSet(String prefix) { - super(prefix); - } - /** - * Add a set of rules to the digester object - * @param digester Digester instance - */ - - public void addRuleInstances(Digester digester) { - digester.addObjectCreate(prefix + "web", - "org.ow2.jonas.deployment.ear.xml.Web"); - digester.addSetNext(prefix + "web", - "setWeb", - "org.ow2.jonas.deployment.ear.xml.Web"); - digester.addCallMethod(prefix + "web/web-uri", - "setWebUri", 0); - digester.addCallMethod(prefix + "web/context-root", - "setContextRoot", 0); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/wrapper/EarManagerWrapper.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/wrapper/EarManagerWrapper.java deleted file mode 100644 index c81726fed30cc43ad2030ee455743fc75326786c..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/wrapper/EarManagerWrapper.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.ear.wrapper; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; -import org.ow2.jonas.deployment.ear.EarDeploymentDesc; -import org.ow2.jonas.deployment.ear.EarDeploymentDescException; -import org.ow2.jonas.lib.bootstrap.LoaderManager; -import org.ow2.jonas.lib.util.Log; -import org.ow2.util.ee.deploy.api.deployable.EARDeployable; - - -/** - * Wrapper that allow us to use Commons Digester. - * @author Guillaume Sauthier - */ -public final class EarManagerWrapper { - - /** - * EarDeploymentDescManager fully qualified classname. - */ - private static final String EAR_MANAGER_CLASSNAME = "org.ow2.jonas.deployment.ear.lib.EarDeploymentDescManager"; - - /** - * logger. - */ - private static Logger logger = Log.getLogger(Log.JONAS_EAR_PREFIX); - - /** - * Empty private constructor for utility classes. - */ - private EarManagerWrapper() { } - - /** - * Wrap EarDeploymentDescManager.getDeploymentDesc(ear, cl). - * - * @param earDeployable the given EAR deployable - * @param cl Application ClassLoader - * - * @return the EarDeploymentDesc of the ear filename - * - * @throws EarDeploymentDescException When Descriptor cannot be instanciated - */ - public static EarDeploymentDesc getDeploymentDesc(final EARDeployable earDeployable, final ClassLoader cl) - throws EarDeploymentDescException { - LoaderManager lm = LoaderManager.getInstance(); - EarDeploymentDesc earDD = null; - try { - ClassLoader ext = lm.getExternalLoader(); - Class manager = ext.loadClass(EAR_MANAGER_CLASSNAME); - Method m = manager.getDeclaredMethod("getDeploymentDesc", new Class[] {EARDeployable.class, ClassLoader.class}); - earDD = (EarDeploymentDesc) m.invoke(null, new Object[] {earDeployable, cl}); - } catch (InvocationTargetException ite) { - Throwable t = ite.getTargetException(); - if (EarDeploymentDescException.class.isInstance(t)) { - throw (EarDeploymentDescException) ite.getTargetException(); - } else { - throw new EarDeploymentDescException("EarDeploymentDescManager.getDeploymentDesc fails", t); - } - } catch (Exception e) { - // TODO add i18n here - throw new EarDeploymentDescException("Problems when using reflection on EarDeploymentDescManager", e); - } - - return earDD; - } - - /** - * Wrap EarDeploymentDescManager.setParsingWithValidation(b). - * - * @param b true/false - */ - public static void setParsingWithValidation(final boolean b) { - LoaderManager lm = LoaderManager.getInstance(); - - try { - ClassLoader ext = lm.getExternalLoader(); - Class manager = ext.loadClass(EAR_MANAGER_CLASSNAME); - Method m = manager.getDeclaredMethod("setParsingWithValidation", new Class[] {boolean.class}); - m.invoke(null, new Object[] {new Boolean(b)}); - } catch (Exception e) { - // Should never occurs - logger.log(BasicLevel.ERROR, e); - } - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/xml/Application.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/xml/Application.java deleted file mode 100644 index 2e06a48df4227f237505d592c738ee11493deef5..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/xml/Application.java +++ /dev/null @@ -1,164 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: JOnAS team - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.ear.xml; - -import org.ow2.jonas.deployment.common.xml.AbsDescriptionElement; -import org.ow2.jonas.deployment.common.CommonsSchemas; -import org.ow2.jonas.deployment.common.xml.DescriptionGroupXml; -import org.ow2.jonas.deployment.common.xml.JLinkedList; -import org.ow2.jonas.deployment.common.xml.TopLevelElement; -import org.ow2.jonas.deployment.ear.EarSchemas; - -/** - * This class defines the implementation of the element application - * - * @author JOnAS team - */ - -public class Application - extends AbsDescriptionElement - implements TopLevelElement, DescriptionGroupXml { - - /** - * Header (with right XSD version) for XML - */ - private String header = null; - - /** - * module - */ - private JLinkedList moduleList = null; - - /** - * security-role - */ - private JLinkedList securityRoleList = null; - - /** - * application element XML header - */ - public static final String APPLICATION_ELEMENT = CommonsSchemas.getHeaderForStandardElement("application", EarSchemas.getLastSchema()); - - /** - * Constructor - */ - public Application() { - super(); - moduleList = new JLinkedList("module"); - securityRoleList = new JLinkedList("security-role"); - - header = APPLICATION_ELEMENT; - } - - /** - * Gets the module - * @return the module - */ - public JLinkedList getModuleList() { - return moduleList; - } - - /** - * Set the module - * @param moduleList module - */ - public void setModuleList(JLinkedList moduleList) { - this.moduleList = moduleList; - } - - /** - * Add a new module element to this object - * @param module the moduleobject - */ - public void addModule(Module module) { - moduleList.add(module); - } - - /** - * Gets the security-role - * @return the security-role - */ - public JLinkedList getSecurityRoleList() { - return securityRoleList; - } - - /** - * Set the security-role - * @param securityRoleList securityRole - */ - public void setSecurityRoleList(JLinkedList securityRoleList) { - this.securityRoleList = securityRoleList; - } - - /** - * Add a new security-role element to this object - * @param securityRole the securityRoleobject - */ - public void addSecurityRole(SecurityRole securityRole) { - securityRoleList.add(securityRole); - } - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - if (header != null) { - sb.append(header); - } else { - sb.append("\n"); - } - - indent += 2; - - // icon - if (getIcon() != null) { - sb.append(getIcon().toXML(indent)); - } - // display-name - if (getDisplayName() != null) { - sb.append(xmlElement(getDisplayName(), "display-name", indent)); - } - // description - if (getDescription() != null) { - sb.append(xmlElement(getDescription(), "description", indent)); - } - // module - sb.append(getModuleList().toXML(indent)); - // security-role - sb.append(getSecurityRoleList().toXML(indent)); - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/xml/JonasApplication.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/xml/JonasApplication.java deleted file mode 100644 index 82ea5291fa50648e0ef2a6a8f4b8afee8b8795bb..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/xml/JonasApplication.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.ear.xml; - -import org.ow2.jonas.deployment.common.CommonsSchemas; -import org.ow2.jonas.deployment.common.xml.AbsDescriptionElement; -import org.ow2.jonas.deployment.common.xml.DescriptionGroupXml; -import org.ow2.jonas.deployment.common.xml.TopLevelElement; -import org.ow2.jonas.deployment.ear.JonasEarSchemas; - - - -/** - * This class defines the implementation of the element jonas-application - * @author Florent Benoit - */ -public class JonasApplication extends AbsDescriptionElement implements TopLevelElement, DescriptionGroupXml { - - /** - * Header (with right XSD version) for XML - */ - private String header = null; - - /** - * Element jonas-security - */ - private JonasSecurity jonasSecurity = null; - - /** - * jonas-ejb-jar element XML header - */ - public static final String JONAS_APPLICATION_ELEMENT = CommonsSchemas.getHeaderForElement("jonas-application", - JonasEarSchemas.getLastSchema()); - - /** - * Constructor - */ - public JonasApplication() { - super(); - - header = JONAS_APPLICATION_ELEMENT; - } - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - if (header != null) { - sb.append(header); - } else { - sb.append("\n"); - } - indent += 2; - - // jonas-security - if (jonasSecurity != null) { - sb.append(jonasSecurity.toXML(indent)); - } - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } - - /** - * @return the jonasSecurity. - */ - public JonasSecurity getJonasSecurity() { - return jonasSecurity; - } - - /** - * @param jonasSecurity The jonasSecurity to set. - */ - public void setJonasSecurity(JonasSecurity jonasSecurity) { - this.jonasSecurity = jonasSecurity; - } - - /** - * @return the header. - */ - public String getHeader() { - return header; - } - - /** - * @param header The header to set. - */ - public void setHeader(String header) { - this.header = header; - } -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/xml/JonasSecurity.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/xml/JonasSecurity.java deleted file mode 100644 index 585cb3621a1d7b06a4b5b4226f7bb0ba6fd1a325..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/xml/JonasSecurity.java +++ /dev/null @@ -1,88 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.ear.xml; - -import org.ow2.jonas.deployment.common.xml.AbsElement; -import org.ow2.jonas.deployment.common.xml.JLinkedList; - -/** - * This class defines the implementation of the element jonas-security - * @author Florent Benoit - */ -public class JonasSecurity extends AbsElement { - - /** - * security-role-mapping - */ - private JLinkedList securityRoleMappingList = null; - - /** - * Constructor - */ - public JonasSecurity() { - super(); - securityRoleMappingList = new JLinkedList("security-role-mapping"); - } - - - /** - * Gets the security-role-mapping - * @return the security-role-mapping - */ - public JLinkedList getSecurityRoleMappingList() { - return securityRoleMappingList; - } - - /** - * Add a new security-role-mapping element to this object - * @param securityRoleMapping the securityRoleMapping object - */ - public void addSecurityRoleMapping(SecurityRoleMapping securityRoleMapping) { - securityRoleMappingList.add(securityRoleMapping); - } - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - indent += 2; - - // security-role-mapping - sb.append(securityRoleMappingList.toXML(indent)); - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } - -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/xml/Module.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/xml/Module.java deleted file mode 100644 index 8ee4528cad624208004d5bc8c324e19cccd9b35f..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/xml/Module.java +++ /dev/null @@ -1,189 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: JOnAS team - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.ear.xml; - -import org.ow2.jonas.deployment.common.xml.AbsElement; -/** - * This class defines the implementation of the element module - * - * @author JOnAS team - */ - -public class Module extends AbsElement { - - /** - * connector - */ - private String connector = null; - - /** - * ejb - */ - private String ejb = null; - - /** - * java - */ - private String java = null; - - /** - * web - */ - private Web web = null; - - /** - * alt-dd - */ - private String altDd = null; - - - /** - * Constructor - */ - public Module() { - super(); - } - - /** - * Gets the connector - * @return the connector - */ - public String getConnector() { - return connector; - } - - /** - * Set the connector - * @param connector connector - */ - public void setConnector(String connector) { - this.connector = connector; - } - - /** - * Gets the ejb - * @return the ejb - */ - public String getEjb() { - return ejb; - } - - /** - * Set the ejb - * @param ejb ejb - */ - public void setEjb(String ejb) { - this.ejb = ejb; - } - - /** - * Gets the java - * @return the java - */ - public String getJava() { - return java; - } - - /** - * Set the java - * @param java java - */ - public void setJava(String java) { - this.java = java; - } - - /** - * Gets the web - * @return the web - */ - public Web getWeb() { - return web; - } - - /** - * Set the web - * @param web web - */ - public void setWeb(Web web) { - this.web = web; - } - - /** - * Gets the alt-dd - * @return the alt-dd - */ - public String getAltDd() { - return altDd; - } - - /** - * Set the alt-dd - * @param altDd altDd - */ - public void setAltDd(String altDd) { - this.altDd = altDd; - } - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // connector - if (connector != null) { - sb.append(xmlElement(connector, "connector", indent)); - } - // ejb - if (ejb != null) { - sb.append(xmlElement(ejb, "ejb", indent)); - } - // java - if (java != null) { - sb.append(xmlElement(java, "java", indent)); - } - // web - if (web != null) { - sb.append(web.toXML(indent)); - } - // alt-dd - if (altDd != null) { - sb.append(xmlElement(altDd, "alt-dd", indent)); - } - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/xml/SecurityRole.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/xml/SecurityRole.java deleted file mode 100644 index 52d1c4c76d3e5c84b1c260e616df202e22757d8d..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/xml/SecurityRole.java +++ /dev/null @@ -1,110 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: JOnAS team - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.ear.xml; - -import org.ow2.jonas.deployment.common.xml.AbsElement; -/** - * This class defines the implementation of the element security-role - * - * @author JOnAS team - */ - -public class SecurityRole extends AbsElement { - - /** - * description - */ - private String description = null; - - /** - * role-name - */ - private String roleName = null; - - - /** - * Constructor - */ - public SecurityRole() { - super(); - } - - /** - * Gets the description - * @return the description - */ - public String getDescription() { - return description; - } - - /** - * Set the description - * @param description description - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * Gets the role-name - * @return the role-name - */ - public String getRoleName() { - return roleName; - } - - /** - * Set the role-name - * @param roleName roleName - */ - public void setRoleName(String roleName) { - this.roleName = roleName; - } - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // description - sb.append(xmlElement(description, "description", indent)); - // role-name - sb.append(xmlElement(roleName, "role-name", indent)); - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/xml/SecurityRoleMapping.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/xml/SecurityRoleMapping.java deleted file mode 100644 index 2ea25116369a565509c10fd17eb48216c1fbcd40..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/xml/SecurityRoleMapping.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.ear.xml; - -import org.ow2.jonas.deployment.common.xml.AbsElement; -import org.ow2.jonas.deployment.common.xml.JLinkedList; - -/** - * This class defines the implementation of the element security-role-mapping. - * It allow to define mapping between roles and principal which use these roles. - * @author Florent Benoit - */ - -public class SecurityRoleMapping extends AbsElement { - - /** - * role name - */ - private String roleName = null; - - /** - * principal names - */ - private JLinkedList principalNamesList = null; - - /** - * Constructor - */ - public SecurityRoleMapping() { - super(); - principalNamesList = new JLinkedList("principal-name"); - } - - /** - * Gets the principal-name list - * @return the principal-name list - */ - public JLinkedList getPrincipalNamesList() { - return principalNamesList; - } - - /** - * Set the role-name element of this object - * @param roleName the name of the role - */ - public void setRoleName(String roleName) { - this.roleName = roleName; - } - - /** - * @return the role Name. - */ - public String getRoleName() { - return roleName; - } - - /** - * Add the given principal to the list of principals - * @param principalName name of the principal to add. - */ - public void addPrincipalName(String principalName) { - principalNamesList.add(principalName); - } - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // role-name - sb.append(xmlElement(roleName, "role-name", indent)); - - // principal-name - sb.append(principalNamesList.toXML(indent)); - - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/xml/Web.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/xml/Web.java deleted file mode 100644 index 7f48e4bb00ad015fd719969075c3dd85ff2be091..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ear/xml/Web.java +++ /dev/null @@ -1,110 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: JOnAS team - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.ear.xml; - -import org.ow2.jonas.deployment.common.xml.AbsElement; -/** - * This class defines the implementation of the element web - * - * @author JOnAS team - */ - -public class Web extends AbsElement { - - /** - * web-uri - */ - private String webUri = null; - - /** - * context-root - */ - private String contextRoot = null; - - - /** - * Constructor - */ - public Web() { - super(); - } - - /** - * Gets the web-uri - * @return the web-uri - */ - public String getWebUri() { - return webUri; - } - - /** - * Set the web-uri - * @param webUri webUri - */ - public void setWebUri(String webUri) { - this.webUri = webUri; - } - - /** - * Gets the context-root - * @return the context-root - */ - public String getContextRoot() { - return contextRoot; - } - - /** - * Set the context-root - * @param contextRoot contextRoot - */ - public void setContextRoot(String contextRoot) { - this.contextRoot = contextRoot; - } - - /** - * Represents this element by it's XML description. - * @param indent use this indent for prexifing XML representation. - * @return the XML description of this object. - */ - public String toXML(int indent) { - StringBuffer sb = new StringBuffer(); - sb.append(indent(indent)); - sb.append("\n"); - - indent += 2; - - // web-uri - sb.append(xmlElement(webUri, "web-uri", indent)); - // context-root - sb.append(xmlElement(contextRoot, "context-root", indent)); - indent -= 2; - sb.append(indent(indent)); - sb.append("\n"); - - return sb.toString(); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ActivationConfigDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ActivationConfigDesc.java deleted file mode 100644 index 42cfeaf080071b7dd0db5ea385c8cf9767f7bf1b..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ActivationConfigDesc.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: JOnAS team - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.ejb; - -import java.util.LinkedList; -import java.util.List; - -import org.ow2.jonas.deployment.common.xml.JLinkedList; -import org.ow2.jonas.deployment.ejb.xml.ActivationConfig; -import org.ow2.jonas.deployment.ejb.xml.ActivationConfigProperty; - - - - -/** - * This class defines the implementation of the element activation-config - * - * @author JOnAS team - */ - -public class ActivationConfigDesc { - - /** - * description - */ - private String description = null; - - - /** - * activation-config-property - */ - private List activationConfigPropertyList = null; - - /** - * Constructor - */ - public ActivationConfigDesc(ActivationConfig ac) { - if (ac != null) { - description = ac.getDescription(); - activationConfigPropertyList = convert(ac.getActivationConfigPropertyList()); - } else { - activationConfigPropertyList = new LinkedList(); - } - } - - /** - * Gets the description - * @return the description - */ - public String getDescription() { - return description; - } - - /** - * Gets the list of activation-config-property - * @return the list of activation-config-property - */ - public List getActivationConfigPropertyList() { - return activationConfigPropertyList; - } - - private List convert(JLinkedList acpl) { - ActivationConfigProperty acp = null; - LinkedList ll = new LinkedList(); - for (int i = 0; i < acpl.size(); i++) { - acp = (ActivationConfigProperty) acpl.get(i); - ll.add(new ActivationConfigPropertyDesc(acp)); - } - return ll; - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ActivationConfigPropertyDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ActivationConfigPropertyDesc.java deleted file mode 100644 index 3ee6107dc06d43e375cd20c64b30c77f99ca51b3..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ActivationConfigPropertyDesc.java +++ /dev/null @@ -1,97 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: JOnAS team - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.ejb; - -import org.ow2.jonas.deployment.ejb.xml.ActivationConfigProperty; - -/** - * This class defines the implementation of the element activation-config-property - * - * @author JOnAS team - */ - -public class ActivationConfigPropertyDesc { - - /** - * activation-config-property-name - */ - private String activationConfigPropertyName = null; - - /** - * activation-config-property-value - */ - private String activationConfigPropertyValue = null; - - /** - * Constructor - */ - public ActivationConfigPropertyDesc() { - - } - - public ActivationConfigPropertyDesc(ActivationConfigProperty acp) { - if (acp != null) { - activationConfigPropertyName = acp.getActivationConfigPropertyName(); - activationConfigPropertyValue = acp.getActivationConfigPropertyValue(); - } - } - - /** - * Gets the activation-config-property-name - * @return the activation-config-property-name - */ - public String getActivationConfigPropertyName() { - return activationConfigPropertyName; - } - - /** - * Set the activation-config-property-name - * @param activationConfigPropertyName activation-config-property-name - */ - public void setActivationConfigPropertyName(String activationConfigPropertyName) { - this.activationConfigPropertyName = activationConfigPropertyName; - } - - - /** - * Gets the activation-config-property-value - * @return the activation-config-property-value - */ - public String getActivationConfigPropertyValue() { - return activationConfigPropertyValue; - } - - /** - * Set the activation-config-property-value - * @param activationConfigPropertyValue activation-config-property-value - */ - public void setActivationConfigPropertyValue(String activationConfigPropertyValue) { - this.activationConfigPropertyValue = activationConfigPropertyValue; - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/BeanDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/BeanDesc.java deleted file mode 100644 index 2e943f35091453e1878b291f1ea0032a70b89275..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/BeanDesc.java +++ /dev/null @@ -1,1583 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2006 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.ejb; - -import java.lang.reflect.Modifier; -import java.rmi.RemoteException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Comparator; -import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.Properties; - -import org.objectweb.util.monolog.api.BasicLevel; -import org.omg.CSI.ITTAbsent; -import org.omg.CSI.ITTAnonymous; -import org.omg.CSI.ITTDistinguishedName; -import org.omg.CSI.ITTPrincipalName; -import org.omg.CSI.ITTX509CertChain; -import org.omg.CSIIOP.Confidentiality; -import org.omg.CSIIOP.EstablishTrustInClient; -import org.omg.CSIIOP.EstablishTrustInTarget; -import org.omg.CSIIOP.IdentityAssertion; -import org.omg.CSIIOP.Integrity; -import org.ow2.carol.util.csiv2.SasComponent; -import org.ow2.carol.util.csiv2.struct.AsStruct; -import org.ow2.carol.util.csiv2.struct.SasStruct; -import org.ow2.carol.util.csiv2.struct.TransportStruct; -import org.ow2.jonas.deployment.api.IEJBLocalRefDesc; -import org.ow2.jonas.deployment.api.IEJBRefDesc; -import org.ow2.jonas.deployment.api.IEnvEntryDesc; -import org.ow2.jonas.deployment.api.IMessageDestinationRefDesc; -import org.ow2.jonas.deployment.api.IResourceEnvRefDesc; -import org.ow2.jonas.deployment.api.IResourceRefDesc; -import org.ow2.jonas.deployment.api.IServiceRefDesc; -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.common.JndiEnvRefsGroupDesc; -import org.ow2.jonas.deployment.common.SecurityRoleRefDesc; -import org.ow2.jonas.deployment.common.lib.JavaType; -import org.ow2.jonas.deployment.common.xml.JLinkedList; -import org.ow2.jonas.deployment.common.xml.RunAs; -import org.ow2.jonas.deployment.common.xml.SecurityRole; -import org.ow2.jonas.deployment.common.xml.SecurityRoleRef; -import org.ow2.jonas.deployment.ejb.xml.AsContextMapping; -import org.ow2.jonas.deployment.ejb.xml.AssemblyDescriptor; -import org.ow2.jonas.deployment.ejb.xml.CommonEjb; -import org.ow2.jonas.deployment.ejb.xml.ContainerTransaction; -import org.ow2.jonas.deployment.ejb.xml.IorSecurityConfigMapping; -import org.ow2.jonas.deployment.ejb.xml.JonasCommonEjb; -import org.ow2.jonas.deployment.ejb.xml.Method; -import org.ow2.jonas.deployment.ejb.xml.MethodPermission; -import org.ow2.jonas.deployment.ejb.xml.SasContextMapping; -import org.ow2.jonas.deployment.ejb.xml.TransportConfigMapping; -import org.ow2.jonas.lib.util.BeanNaming; - -/** - * Class to hold meta-information related to any enterprise-beans - * - * @author Christophe Ney [cney@batisseurs.com] : Initial developer - * @author Helene Joanin - * @author Jeff Mesnil - * @author Philippe Coq - * @author Florent Benoit & Ludovic Bert : ejb_link - */ -public abstract class BeanDesc extends JndiEnvRefsGroupDesc { - - /** - * Bean transaction type - */ - protected static final int BEAN_TRANSACTION_TYPE = 1; - - /** - * Container transaction type - */ - protected static final int CONTAINER_TRANSACTION_TYPE = 2; - - protected static final String[] TRANS = {null, "BEAN_TRANSACTION_TYPE", "CONTAINER_TRANSACTION_TYPE"}; - - private static final String ejb10PropertiesPrefix = "ejb10-properties/"; - - /** - * When no jndi-name specified, jndi name is set to Ejb-Name + "Home" - */ - private static final String REMOTEDEFAULTSUFFIX = "Home"; - - /** - * When no local-jndi-name specified, local jndi name is set to jndi-name + - * "_L" - */ - private static final String LOCALDEFAULTSUFFIX = "_L"; - - /** - * Package prefix for generated files - */ - public static final String GENERATED_PREFIX = "org.ow2.jonas_gen."; - - /** - * name of the Bean - */ - protected String ejbName = null; - - /** - * JNDI name of the Bean - */ - protected String jndiName = null; - - /** - * JNDI local name of the Bean - */ - protected String jndiLocalName = null; - - /** - * Home Class - */ - protected Class home = null; - - /** - * Remote Class - */ - protected Class remote = null; - - /** - * LocalHome Class - */ - protected Class localhome = null; - - /** - * Local Class - */ - protected Class local = null; - - /** - * Bean Class - */ - protected Class ejbClass = null; - - /** - * bean identification string - */ - protected String beanIdentification = null; - - /** - * EJB 1.0 Environment as Properties - */ - protected Properties ejb10EnvProps = new Properties(); - - /** - * array of methods meta-info - */ - private ArrayList methodDesc = new ArrayList(); - - /** - * hash map of the methods - */ - private HashMap methodDescMap = new HashMap(); - - /** - * List of SecurityRoleRefDesc for JACC - */ - protected List securityRoleRefDescList = null; - - /** - * DeploymentDesc parent of this BeanDesc - */ - protected DeploymentDesc deploymentDesc = null; - - /** - * JOnAS Remote Wrapper fully qualified classname - */ - private String fullWrpRemoteName = null; - - /** - * JOnAS Remote Wrapper Classname - */ - private String wrpRemoteName = null; - - /** - * JOnAS Home Wrapper fully qualified classname - */ - private String fullWrpHomeName = null; - - /** - * JOnAS Home Wrapper Classname - */ - private String wrpHomeName = null; - - /** - * JOnAS Local Wrapper fully qualified classname - */ - private String fullWrpLocalName = null; - - /** - * JOnAS Local Wrapper Classname - */ - private String wrpLocalName = null; - - /** - * JOnAS LocalHome Wrapper fully qualified classname - */ - private String fullWrpLocalHomeName = null; - - /** - * JOnAS LocalHome Wrapper Classname - */ - private String wrpLocalHomeName = null; - - /** - * JOnAS Handle Wrapper fully qualified classname - */ - private String fullWrpHandleName = null; - - /** - * JOnAS Handle Wrapper Classname - */ - private String wrpHandleName = null; - - /** - * Bean fully qualified classname - */ - protected String fullDerivedBeanName = null; - - /** - * Bean classname - */ - protected String derivedBeanName = null; - - /** - * Run-as role - */ - private String runAsRole = null; - - /** - * Run-as principal name - */ - private String runAsPrincipalName = null; - - /** - * Minimum Bean Pool size - */ - protected int poolMin = 0; - - /** - * Maximum Bean Cache size - */ - protected int cacheMax = 0; - - /** - * SasComponent (for CSIv2 over IIOP) - */ - private SasComponent sasComponent = null; - - protected int timerTxAttribute = MethodDesc.TX_REQUIRES_NEW; // default - - protected String ejbTimeoutSignature; - - /** - * Cluster - true if the bean has to be replicated - */ - protected boolean clusterReplicated = false; - /** - * The cluster configuration - */ - - private Object cluster; - - /** - * Constructor to be used by parent node - * - * @param classLoader ClassLoader used to load Bean's classes - * @param ejb XML Element from standard Deployment Descriptor - * @param jonasEjb XML Element from jonas specific Deployment Descriptor - * @param asd XML Element for the AssemblyDescriptor - * @param fileName jar filename - * - * @throws DeploymentDescException when BeanDesc cannot be instanciated - * (class loading problem, ...) - */ - public BeanDesc(final ClassLoader classLoader, final CommonEjb ejb, final JonasCommonEjb jonasEjb, final AssemblyDescriptor asd, - final JLinkedList jMDRList, final String fileName) throws DeploymentDescException { - - super(classLoader, ejb, jonasEjb, fileName); - securityRoleRefDescList = new LinkedList(); - if (ejb.getEjbName() != null) { - ejbName = ejb.getEjbName(); - } else { - ejbName = null; - } - - // If no value given specifically, we use the optionnal mapped-name in standardDD or ejbName+Home as JNDI name. - if (jonasEjb.getJndiName() != null) { - jndiName = jonasEjb.getJndiName(); - } else if (ejb.getMappedName() != null) { - jndiName = ejb.getMappedName(); - } else { - jndiName = ejbName + REMOTEDEFAULTSUFFIX; - } - // If no value given specifically, we use the optionnal mapped-name in standardDD jndiName+_L as JNDI local - // name. - if (jonasEjb.getJndiLocalName() != null) { - jndiLocalName = jonasEjb.getJndiLocalName(); - } else { - jndiLocalName = jndiName + LOCALDEFAULTSUFFIX; - } - - // classes - // -------------------------------------------------- - if (ejb.getHome() != null) { - try { - this.home = classLoader.loadClass(ejb.getHome()); - // check home extends javax.ejb.EJBHome - if (!javax.ejb.EJBHome.class.isAssignableFrom(this.home)) { - throw new DeploymentDescException("Home class '" + ejb.getHome() - + "' does not extend javax.ejb.EJBHome"); - } - } catch (ClassNotFoundException e) { - throw new DeploymentDescException("Home class not found for bean " + ejbName, e); - } - } - - if (ejb.getRemote() != null) { - try { - this.remote = classLoader.loadClass(ejb.getRemote()); - // check remote extends javax.ejb.EJBObject - if (!javax.ejb.EJBObject.class.isAssignableFrom(this.remote)) { - throw new DeploymentDescException("Remote class '" + ejb.getRemote() - + "' does not extend javax.ejb.EJBObject"); - } - } catch (ClassNotFoundException e) { - throw new DeploymentDescException("Remote class not found for bean " + ejbName, e); - } - } - - String localhomename = ejb.getLocalHome(); - // Note: Should do this only if bean is implied in a relation. - if (localhomename == null && this instanceof EntityCmp2Desc) { - localhomename = "javax.ejb.EJBLocalHome"; - } - if (localhomename != null) { - try { - this.localhome = classLoader.loadClass(localhomename); - // check localhome extends javax.ejb.EJBLocalHome - if (!javax.ejb.EJBLocalHome.class.isAssignableFrom(this.localhome)) { - throw new DeploymentDescException("LocalHome class '" + localhomename - + "' does not extend javax.ejb.EJBLocalHome"); - } - } catch (ClassNotFoundException e) { - throw new DeploymentDescException("LocalHome class not found for bean " + ejbName, e); - } - } - - String localname = ejb.getLocal(); - // Note: Should do this only if bean is implied in a relation. - if (localname == null && this instanceof EntityCmp2Desc) { - localname = "javax.ejb.EJBLocalObject"; - } - if (localname != null) { - try { - this.local = classLoader.loadClass(localname); - // check local extends javax.ejb.EJBLocalObject - if (!javax.ejb.EJBLocalObject.class.isAssignableFrom(this.local)) { - throw new DeploymentDescException("Local class '" + localname - + "' does not extend javax.ejb.EJBLocalObject"); - } - } catch (ClassNotFoundException e) { - throw new DeploymentDescException("Local class not found for bean " + ejbName, e); - } - } - - // permit to load service-endpoint class - loadExtraClasses(ejb, classLoader); - - try { - this.ejbClass = classLoader.loadClass(ejb.getEjbClass()); - // check ejb-class extends javax.ejb.EnterpriseBean - if (!javax.ejb.EnterpriseBean.class.isAssignableFrom(this.ejbClass)) { - throw new DeploymentDescException("Ejb class '" + ejb.getEjbClass() - + "' does not extend javax.ejb.EnterpriseBean"); - } - } catch (ClassNotFoundException e) { - throw new DeploymentDescException("Ejb class not found for bean " + ejbName, e); - } - - // Set EJB 1.0 Environment properties from env entries - IEnvEntryDesc[] envt = getEnvEntryDesc(); - for (int i = 0; i < envt.length; i++) { - if (envt[i].getName().startsWith(ejb10PropertiesPrefix)) { - String newName = envt[i].getName().substring(ejb10PropertiesPrefix.length()); - String value = new String(); - if (envt[i].hasValue()) { - value = envt[i].getValue().toString(); - } - ejb10EnvProps.put(newName, value); - } - } - - // run-as - if (ejb.getSecurityIdentity() != null) { - RunAs runAsElem = ejb.getSecurityIdentity().getRunAs(); - if (runAsElem != null) { - String roleName = runAsElem.getRoleName(); - if (roleName != null) { - runAsRole = roleName; - boolean runAsRoleFound = false; - if (asd != null && asd.getSecurityRoleList() != null) { - for (Iterator j = asd.getSecurityRoleList().iterator(); j.hasNext();) { - SecurityRole securityRole = (SecurityRole) j.next(); - // role name of a security-role element defined in the - // assembly descriptor - String r = securityRole.getRoleName(); - if (r.equals(runAsRole)) { - runAsRoleFound = true; - } - } - } - //if there are no matching run-as and security-role - if (!runAsRoleFound) { - throw new DeploymentDescException("There is no security-role defined for the run-as role: " - + runAsRole); - } - } - // Run-as principal name - runAsPrincipalName = jonasEjb.getRunAsPrincipalName(); - // if no principal name set in JOnAS DD, set it to run-as role - if (runAsPrincipalName == null) { - runAsPrincipalName = runAsRole; - } - } - } - - // populate array with all methods - try { - java.lang.reflect.Method[] m; - int beginIdx = methodDesc.size(); - int len = 0; - if ((this.home != null) && (this.remote != null)) { - // session bean or entity bean with remote interface - m = this.home.getMethods(); - for (int i = 0; i < m.length; i++) { - if (!m[i].getDeclaringClass().equals(javax.ejb.EJBHome.class) - || m[i].getName().equals("remove")) { - addMethodDesc(m[i], this.home); - len++; - // check RemoteException is thrown - checkRemoteException(m[i], true); - /* - * // arguments and return types must be valid types for - * RMI if - * (!m[i].getDeclaringClass().equals(javax.ejb.EJBHome.class) && - * !m[i].getName().equals("findByPrimaryKey")) { - * checkValidTypesForRmi(m[i]); } - */ - } - } - - m = this.remote.getMethods(); - for (int i = 0; i < m.length; i++) { - if (!m[i].getDeclaringClass().equals(javax.ejb.EJBObject.class) - || m[i].getName().equals("remove")) { - addMethodDesc(m[i], this.remote); - len++; - // check RemoteException is thrown - checkRemoteException(m[i], true); - /* - * // arguments and return types must be valid for RMI - * if - * (!m[i].getDeclaringClass().equals(javax.ejb.EJBObject.class)) { - * checkValidTypesForRmi(m[i]); } - */ - } - } - } - if ((this.localhome != null) && (this.local != null)) { - // session bean or entity bean with local interface - m = this.localhome.getMethods(); - for (int i = 0; i < m.length; i++) { - if (!m[i].getDeclaringClass().equals(javax.ejb.EJBLocalHome.class) - || m[i].getName().equals("remove")) { - addMethodDesc(m[i], this.localhome); - len++; - // check RemoteException is NOT thrown - checkRemoteException(m[i], false); - } - } - m = this.local.getMethods(); - for (int i = 0; i < m.length; i++) { - if (!m[i].getDeclaringClass().equals(javax.ejb.EJBLocalObject.class) - || m[i].getName().equals("remove")) { - addMethodDesc(m[i], this.local); - len++; - // check RemoteException is NOT thrown - checkRemoteException(m[i], false); - } - } - } - if (this.home == null && this.localhome == null) { - - if (ejb.getMessagingType() != null) { - // message driven bean & endpoints - String msgType = ejb.getMessagingType(); - try { - m = classLoader.loadClass(msgType).getMethods(); - for (int i = 0; i < m.length; i++) { - addMethodDesc(m[i], m[i].getDeclaringClass()); - len++; - } - } catch (Exception ex) { - throw new DeploymentDescException("Cannot load messaging type class (" + msgType + ") for " - + ejbName, ex); - } - } - // (web)service-endpoints may have no home or local-home too !! - } - - if (javax.ejb.EntityBean.class.isAssignableFrom(this.ejbClass)) { - // ejbSelect methods - m = this.ejbClass.getMethods(); - for (int i = 0; i < m.length; i++) { - if (m[i].getName().startsWith("ejbSelect") && Modifier.isAbstract(m[i].getModifiers())) { - addMethodDesc(m[i], this.ejbClass); - len++; - } - } - } - - if (javax.ejb.TimedObject.class.isAssignableFrom(this.ejbClass)) { - try { - java.lang.reflect.Method timeout = this.ejbClass.getMethod("ejbTimeout", - new Class[]{javax.ejb.Timer.class}); - addMethodDesc(timeout, this.ejbClass); - len++; - } catch (NoSuchMethodException e) { - throw new DeploymentDescException("ejbTimeout not implemented in " + ejbName); - } - } - - len = addEJBMethodDesc(len); - orderMethodDesc(methodDesc, beginIdx, len); - } catch (SecurityException e) { - throw new DeploymentDescException("Cannot use java reflection on " + ejbName, e); - } - - // populate HashMap with all security role references - // for each security-role-ref of the bean - if (ejb.getSecurityRoleRefList() != null) { - for (Iterator i = ejb.getSecurityRoleRefList().iterator(); i.hasNext();) { - SecurityRoleRef sRoleRef = (SecurityRoleRef) i.next(); - // test if the assembly-descriptor element exists - if (asd == null) { - throw new DeploymentDescException( - "No assembly-descriptor element (and security-role elements) whereas security-role-ref element(s) are defined"); - } else { - // test if the assembly-descriptor element contains - // security-role elements - if (asd.getSecurityRoleList().isEmpty()) { - throw new DeploymentDescException( - "No security-role elements defined in the assembly-descriptor element whereas security-role-ref element(s) are defined"); - } - } - // test if the role-link element of the security-role-ref - // element exists - if (sRoleRef.getRoleLink() == null) { - throw new DeploymentDescException( - "No role-link element in a security-role-ref element with role-name element : " - + sRoleRef.getRoleName()); - } - String roleLink = sRoleRef.getRoleLink(); - // correspond to role-name element in security-role-ref element - String roleRefName = sRoleRef.getRoleName(); - // to know if there are corresponding roleLink and roleRefName - boolean correspondingRoles = false; - for (Iterator j = asd.getSecurityRoleList().iterator(); j.hasNext();) { - SecurityRole securityRole = (SecurityRole) j.next(); - // role name of a security-role element defined in the - // assembly descriptor - String roleName = securityRole.getRoleName(); - if (roleName.equals(roleLink)) { - securityRoleRefDescList.add(new SecurityRoleRefDesc(ejbName, sRoleRef, true)); - correspondingRoles = true; - } - } - //if there are no matching roleLink and roleName - if (!correspondingRoles) { - throw new DeploymentDescException( - "No corresponding role-name in a security-role element for role-link : " + roleLink); - } - } - } - - // check if there are corresponding role-name element in security-role - // and method-permission element of the Assembly Descriptor - if (asd != null) { - verifyRoleName(asd); - // set method descriptor values for method permissions - for (Iterator i = asd.getMethodPermissionList().iterator(); i.hasNext();) { - MethodPermission methodPermission = (MethodPermission) i.next(); - for (Iterator j = methodPermission.getMethodList().iterator(); j.hasNext();) { - Method m = ((Method) j.next()); - // check method applies to current bean - if (!m.getEjbName().equals(ejbName)) { - continue; - } - // selection of interface home/remote - Class pClass = null; - if (m.getMethodIntf() != null) { - pClass = getParentClass(m.getMethodIntf()); - } - for (int k = 0; k < methodDesc.size(); k++) { - MethodDesc md = (MethodDesc) methodDesc.get(k); - int matchStatus = md.matchPattern(pClass, m.getMethodName(), m.getMethodParams()); - for (Iterator l = methodPermission.getRoleNameList().iterator(); l.hasNext();) { - String roleName = (String) l.next(); - // Add only if it greater than APPLY_TO_NOTHING - if (matchStatus > MethodDesc.APPLY_TO_NOTHING) { - md.addRoleName(roleName); - } - } - } - } - } - } - - // Set excluded method - if (asd != null && asd.getExcludeList() != null) { - // For each excluded method, find a methodDesc corresponding to this excluded method - for (Iterator i = asd.getExcludeList().getMethodList().iterator(); i.hasNext();) { - Method m = (Method) i.next(); - // check method applies to current bean - if (!m.getEjbName().equals(ejbName)) { - continue; - } - // selection of interface home/remote - Class pClass = null; - if (m.getMethodIntf() != null) { - pClass = getParentClass(m.getMethodIntf()); - } - // Find methodDesc with matching pattern of excluded method - for (int k = 0; k < methodDesc.size(); k++) { - MethodDesc md = (MethodDesc) methodDesc.get(k); - int matchStatus = md.matchPattern(pClass, m.getMethodName(), m.getMethodParams()); - // Add only if it greater than APPLY_TO_NOTHING - if (matchStatus > MethodDesc.APPLY_TO_NOTHING) { - md.setExcluded(true); - } - } - } - } - - // set method descriptor values for container transactions - if (asd != null) { - // Loop on ContainerTransaction list - Iterator i = asd.getContainerTransactionList().iterator(); - while (i.hasNext()) { - ContainerTransaction cotr = (ContainerTransaction) i.next(); - // Loop on Method list - Iterator j = cotr.getMethodList().iterator(); - while (j.hasNext()) { - Method m = (Method) j.next(); - // check method applies to current bean - if (!m.getEjbName().equals(ejbName)) { - continue; - } - - // selection of interface home/remote - Class pClass = null; - if (m.getMethodIntf() != null) { - pClass = getParentClass(m.getMethodIntf()); - } - - // loop on methods in the array - boolean found = false; - for (int k = 0; k < methodDesc.size(); k++) { - MethodDesc md = (MethodDesc) methodDesc.get(k); - int matchStatus = md.matchPattern(pClass, m.getMethodName(), m.getMethodParams()); - if (matchStatus != MethodDesc.APPLY_TO_NOTHING) { - found = true; - } - // set if proper level of assignation - String transAttribute = null; - if (cotr.getTransAttribute() != null) { - transAttribute = cotr.getTransAttribute(); - } - md.overwriteTxAttribute(transAttribute, matchStatus); - } - if (!found) { - // The method defined via the element is not a - // declared method - logger.log(BasicLevel.WARN, "Invalid container-transaction: method '" - + MethodDesc.methodElementToString(m) + "' not declared in bean " + ejbName); - } - } - } - } - - String packageName = ""; - String ejbIdentifier = getIdentifier(); - - if (getRemoteClass() != null) { - packageName = GENERATED_PREFIX + BeanNaming.getPackageName(getRemoteClass().getName()); - wrpRemoteName = new String("JOnAS" + ejbIdentifier + "Remote"); - wrpHandleName = new String("JOnAS" + ejbIdentifier + "Handle"); - fullWrpRemoteName = BeanNaming.getClassName(packageName, wrpRemoteName); - fullWrpHandleName = BeanNaming.getClassName(packageName, wrpHandleName); - } - - if (getLocalClass() != null) { - packageName = GENERATED_PREFIX + BeanNaming.getPackageName(getLocalClass().getName()); - wrpLocalName = new String("JOnAS" + ejbIdentifier + "Local"); - fullWrpLocalName = BeanNaming.getClassName(packageName, wrpLocalName); - } - - if (getHomeClass() != null) { - packageName = GENERATED_PREFIX + BeanNaming.getPackageName(getHomeClass().getName()); - wrpHomeName = new String("JOnAS" + ejbIdentifier + "Home"); - fullWrpHomeName = BeanNaming.getClassName(packageName, wrpHomeName); - } - - if (getLocalHomeClass() != null) { - packageName = GENERATED_PREFIX + BeanNaming.getPackageName(getLocalHomeClass().getName()); - wrpLocalHomeName = new String("JOnAS" + ejbIdentifier + "LocalHome"); - fullWrpLocalHomeName = BeanNaming.getClassName(packageName, wrpLocalHomeName); - } - - fullDerivedBeanName = getEjbClass().getName(); - derivedBeanName = BeanNaming.getBaseName(getEjbClass().getName()); - - IorSecurityConfigMapping iorSecurityConfigMapping = jonasEjb.getIorSecurityConfig(); - if (iorSecurityConfigMapping != null) { - processIorSecurityConfig(iorSecurityConfigMapping); - } - - if (jonasEjb.getClusterReplicated() != null) { - if (jonasEjb.getClusterReplicated().equalsIgnoreCase("True")) { - clusterReplicated = true; - } else if (jonasEjb.getClusterReplicated().equalsIgnoreCase("False")) { - clusterReplicated = false; - } else { - throw new DeploymentDescException("Invalid cluster-replicated value for bean " + this.ejbName); - } - } - cluster = jonasEjb.getCluster(); - } - - /** - * Permit classes loading from subtypes. (needed for Stateless Session Beans - * with service-endpoints). Needs to be overridden in subtypes. - * - * @param ce XML Element representing EJB Descriptor - * @param loader ClassLoader used to load classes - * - * @throws DeploymentDescException when a class cannot be loaded - */ - protected void loadExtraClasses(final CommonEjb ce, final ClassLoader loader) throws DeploymentDescException { - // do nothing by default - } - - /** - * Permit Methods addition from subtypes Protected method that need to be - * overridden in subclasses - * - * @param len method array length - * @return new len value - * - * @throws DeploymentDescException when java reflection cannot be used on - * classes - */ - protected int addEJBMethodDesc(final int len) throws DeploymentDescException { - return len; - } - - /** - * Returns the parent Class for a method given an interface type. - * - * @param intfType type of the interface (Home/Remote/LocalHome/Local or - * ServiceEndpoint) - * - * @return the parent class for a method given an interface type - * - * @throws DeploymentDescException when intfType is unknown - */ - protected Class getParentClass(final String intfType) throws DeploymentDescException { - Class pClass = null; - if (intfType.equals("Home")) { - pClass = javax.ejb.EJBHome.class; - } else if (intfType.equals("Remote")) { - pClass = javax.ejb.EJBObject.class; - } else if (intfType.equals("LocalHome")) { - pClass = javax.ejb.EJBLocalHome.class; - } else if (intfType.equals("Local")) { - pClass = javax.ejb.EJBLocalObject.class; - } else { - throw new DeploymentDescException(intfType + " is invalid value for method-intf on bean " + ejbName); - } - return pClass; - } - - /** - * Gets an hashcode for this bean - * Return hashcode for jndiname + jndi localname - * @return a string for hashcode for jndiname + jndi localname - */ - protected String getHashCodeForIdentifier() { - String hash = ""; - if (getJndiName() != null) { - hash += getJndiName(); - } - if (getJndiLocalName() != null) { - hash += getJndiLocalName(); - } - return Integer.toString(hash.hashCode()); - } - - /** - * Build a valid java identifier for the bean. - * @return Returns a valid java identifier from the bean. - */ - public String getIdentifier() { - - if (beanIdentification == null) { - String identifier = getEjbName(); - identifier += getHashCodeForIdentifier(); - - char[] tabChar = new char[identifier.length()]; - for (int i = 0; i < identifier.length(); i++) { - if (!Character.isJavaIdentifierPart(identifier.charAt(i))) { - tabChar[i] = '_'; - } else { - tabChar[i] = identifier.charAt(i); - } - } - beanIdentification = new String(tabChar); - } - return beanIdentification; - } - - /** - * Check if method throws RemoteException (or not). - * - * @param m the method to examine - * @param shouldThrow boolean value indicating if the method should or - * shouldn't throw RemoteException - * - * @throws DeploymentDescException thrown for non-valid method - */ - public void checkRemoteException(final java.lang.reflect.Method m, final boolean shouldThrow) throws DeploymentDescException { - Class[] excepts = m.getExceptionTypes(); - for (int j = 0; j < excepts.length; j++) { - if (RemoteException.class.isAssignableFrom(excepts[j])) { - if (shouldThrow) { - return; - } else { - throw new DeploymentDescException("Method " + m.getName() + " of " + m.getDeclaringClass() - + " should NOT throw RemoteException"); - } - } - } - if (shouldThrow) { - throw new DeploymentDescException("Method " + m.getName() + " of " + m.getDeclaringClass() - + " must throw RemoteException"); - } else { - return; - } - - } - - /** - * Check if argument and return types are valid types for RMI-IIOP. - * (Primitive types, remote objects, or non-remote objects that implement - * the java.io.Serializable interface) Only a warning is logging if it's not - * the case. - * - * @param m the methode to examine - */ - public void checkValidTypesForRmi(final java.lang.reflect.Method m) { - boolean isValid = true; - Class[] paramTypes = m.getParameterTypes(); - for (int i = 0; i < paramTypes.length; i++) { - if (!JavaType.isValidForRmi(paramTypes[i])) { - isValid = false; - } - } - if (!JavaType.isValidForRmi(m.getReturnType()) && !JavaType.isVoid(m.getReturnType()) - && !JavaType.isCollecOrEnum(m.getReturnType())) { - // Allow Collection or Enumeration type (finder methods) - isValid = false; - } - if (!isValid) { - logger.log(BasicLevel.WARN, "Method " + m.getName() + " of " + m.getDeclaringClass() - + " may be have an invalid argument or return type for RMI"); - } - } - - /** - * Check that the bean descriptor is valid - * - * @throws DeploymentDescException thrown for non-valid bean - */ - public void check() throws DeploymentDescException { - // check business methods transaction attribute - for (int i = 0; i < methodDesc.size(); i++) { - checkTxAttribute(((MethodDesc) methodDesc.get(i))); - } - checkRunAsMapping(); - } - - /** - * Check that the runAs role mapping is correct - * @throws DeploymentDescException if role mapping is incorrect - */ - public void checkRunAsMapping() throws DeploymentDescException { - if (runAsPrincipalName != null) { - // verify roles of run-as principal name - String[] runAsPrincipalRoles = deploymentDesc.getRolesForRunAsPrincipal(runAsPrincipalName); - // Check that the run-as role is included in principal roles - if (runAsPrincipalRoles != null) { - boolean isIncluded = false; - for (int r = 0; r < runAsPrincipalRoles.length; r++) { - if (runAsPrincipalRoles[r].equals(runAsRole)) { - isIncluded = true; - } - } - if (!isIncluded) { - throw new DeploymentDescException("The run-as roles defined for the runas principal name '" - + runAsPrincipalName + "' does not contains the run-as role '" - + runAsRole + "' in bean '" + getEjbName() + "."); - } - } - } - } - - /** - * Check that trans-attribute is valid for a bean's method. - * - * @param md MethodDesc to check - * - * @throws DeploymentDescException When MethodDesc is not valid - */ - protected abstract void checkTxAttribute(MethodDesc md) throws DeploymentDescException; - - /** - * Check that there are always corresponding role-name element in - * security-role and method-permission elements. - * - * @param asd the AssemblyDescriptor used to check bean's role names - * - * @throws DeploymentDescException When verification fails - */ - protected void verifyRoleName(final AssemblyDescriptor asd) throws DeploymentDescException { - boolean verify; - List methodPermission = asd.getMethodPermissionList(); - if (methodPermission != null) { - for (Iterator i = methodPermission.iterator(); i.hasNext();) { - MethodPermission mPermission = (MethodPermission) i.next(); - for (Iterator j = mPermission.getRoleNameList().iterator(); j.hasNext();) { - verify = false; - String mpRoleName = (String) j.next(); - for (Iterator k = asd.getSecurityRoleList().iterator(); k.hasNext();) { - String srRoleName = ((SecurityRole) k.next()).getRoleName(); - if (mpRoleName.equals(srRoleName)) { - verify = true; - } - } - if (!verify) { - throw new DeploymentDescException( - "a method-permission element defined a role-name element \"" - + mpRoleName - + "\" which doesn't correspond to any security-role element of the Deployment Descriptor"); - } - } - } - } - } - - /** - * Get the enterprise bean's name. - * - * @return Name of the bean - */ - public String getEjbName() { - return ejbName; - } - - /** - * Get the name to associate with the enterprise Bean in the JNDI name - * space. Invoking this method is disallowed for message driven bean. (This - * information is JOnAS specific). Used by Server - * - * @return Jndi name of the bean - */ - public String getJndiName() { - return jndiName; - } - - /** - * Set the name to associate with the enterprise Bean in the JNDI name - * space. Invoking this method is disallowed for message driven bean. (This - * information is JOnAS specific). Used by Server - * - * @param jndiName Jndi name of the bean - */ - public void setJndiName(final String jndiName) { - this.jndiName = jndiName; - } - - /** - * Get the name to associate with the enterprise Bean in the JNDI name space - * for local access (inside the same JOnAS Server) - * - * @return Jndi local name of the bean - */ - public String getJndiLocalName() { - return jndiLocalName; - } - - /** - * Set the name to associate with the enterprise Bean in the JNDI name space - * for local access (inside the same JOnAS Server) - * - * @param jndiLocalName Jndi local name of the bean - */ - public void setJndiLocalName(final String jndiLocalName) { - this.jndiLocalName = jndiLocalName; - } - - /** - * Get bean's home interface. Invoking this method is disallowed for message - * driven bean. Used by GenIC and Server - * - * @return Class for the home interface or null - */ - public Class getHomeClass() { - return home; - } - - /** - * Get bean's remote interface. Invoking this method is disallowed for - * message driven bean. Used by GenIC and Server - * - * @return Class for the remote interface or null - */ - public Class getRemoteClass() { - return remote; - } - - /** - * Get bean's local home interface. Invoking this method is disallowed for - * message driven bean. Used by GenIC and Server - * - * @return Class for the home interface or null - */ - public Class getLocalHomeClass() { - return localhome; - } - - /** - * Get bean's local interface. Invoking this method is disallowed for - * message driven bean. Used by GenIC and Server - * - * @return Class for the Local interface or null - */ - public Class getLocalClass() { - return local; - } - - /** - * Get bean's class. Used by GenIC and Server - * - * @return Class for the bean - */ - public Class getEjbClass() { - return ejbClass; - } - - /** - * Get bean's EJB 1.0 environment properties. - * - * @return Returns the bean's EJB 1.0 environment properties - */ - public Properties getEjb10Environment() { - Properties ret = new Properties(ejb10EnvProps); - return ret; - } - - /** - * Get descriptor attached to a given method. Used by GenIC and JMdbEndpointFactory - * - * @param method Method from the Home/Remote/MessageListener interface - * @return The method descriptor (never returns null) - */ - public MethodDesc getMethodDesc(final java.lang.reflect.Method method) { - - if (!methodDescMap.containsKey(method)) { - throw new Error(method.getName() + " is not a method of home/remote interfaces for bean " + getEjbName()); - } - return (MethodDesc) methodDescMap.get(method); - } - - /** - * get an iterator for all MethodDesc of the bean. - * - * @return Returns an iterator for all MethodDesc of the bean - */ - public Iterator getMethodDescIterator() { - return methodDesc.iterator(); - } - - /** - * get a MethodDesc from its index. - * - * @param index MethodDesc index - * - * @return Returns a MethodDesc from its index - */ - public MethodDesc getMethodDesc(final int index) { - return (MethodDesc) methodDesc.get(index); - } - - /** - * Gets the security-role-ref of the beans can access to the - * EJBRoleRefPermission and role-link. - * - * @return the security-role-ref of the beans - */ - public List getSecurityRoleRefDescList() { - return securityRoleRefDescList; - } - - /** - * @return min size of the pool - */ - public int getPoolMin() { - return poolMin; - } - - /** - * @return max size of the cache - */ - public int getCacheMax() { - return cacheMax; - } - - /** - * @return the run-as role name - */ - public String getRunAsRole() { - return runAsRole; - } - - /** - * @return the transaction attribute for the ejbTimeout method - */ - public int getTimerTxAttribute() { - return timerTxAttribute; - } - - /** - * @return the security signature for the ejbTimeout method - */ - public String getEjbTimeoutSignature() { - return ejbTimeoutSignature; - } - - /** - * String representation of the object for test purpose - * - * @return String representation of this object - */ - @Override - public String toString() { - StringBuffer ret = new StringBuffer(); - ret.append("\ngetDisplayName()=" + getDisplayName()); - ret.append("\ngetEjbName()=" + getEjbName()); - if (jndiName != null) { - ret.append("\ngetJndiName()=" + getJndiName()); - } - if (home != null) { - ret.append("\ngetHomeClass()=" + getHomeClass().toString()); - } - if (remote != null) { - ret.append("\ngetRemoteClass()=" + getRemoteClass().toString()); - } - if (localhome != null) { - ret.append("\ngetLocalHomeClass()=" + getLocalHomeClass().toString()); - } - if (local != null) { - ret.append("\ngetLocalClass()=" + getLocalClass().toString()); - } - ret.append("\ngetEjbClass()=" + getEjbClass().toString()); - IEnvEntryDesc[] envE = getEnvEntryDesc(); - for (int i = 0; i < envE.length; i++) { - ret.append("\ngetEnvEntryDesc(" + i + ")=" + envE[i].toString()); - } - IServiceRefDesc[] sr = getServiceRefDesc(); - for (int i = 0; i < sr.length; i++) { - ret.append("\ngetServiceRefDesc(" + i + ")=" + sr[i].toString()); - } - IResourceEnvRefDesc[] resEnvR = getResourceEnvRefDesc(); - for (int i = 0; i < resEnvR.length; i++) { - ret.append("\ngetResourceEnvRefDesc(" + i + ")=" + resEnvR[i].toString()); - } - IResourceRefDesc[] resR = getResourceRefDesc(); - for (int i = 0; i < resR.length; i++) { - ret.append("\ngetResourceRefDesc(" + i + ")=" + resR[i].toString()); - } - IEJBRefDesc[] ejbR = getEjbRefDesc(); - for (int i = 0; i < ejbR.length; i++) { - ret.append("\ngetEjbRefDesc(" + i + ")=" + ejbR[i].toString()); - } - IEJBLocalRefDesc[] ejbLR = getEjbLocalRefDesc(); - for (int i = 0; i < ejbLR.length; i++) { - ret.append("\ngetEjbLocalRefDesc(" + i + ")=" + ejbLR[i].toString()); - } - IMessageDestinationRefDesc[] mdR = getMessageDestinationRefDesc(); - for (int i = 0; i < mdR.length; i++) { - ret.append("\ngetMessageDestinationRefDesc(" + i + ")=" + mdR[i].toString()); - } - for (int i = 0; i < methodDesc.size(); i++) { - MethodDesc md = (MethodDesc) methodDesc.get(i); - ret.append("\ngetMethodDesc(" + i + ")=" + md.getClass().getName()); - ret.append(md.toString()); - } - - if (securityRoleRefDescList != null) { - for (Iterator i = securityRoleRefDescList.iterator(); i.hasNext();) { - SecurityRoleRefDesc sRoleRefDesc = (SecurityRoleRefDesc) i.next(); - ret.append("\nsecurity-role-ref, role-name = '" + sRoleRefDesc.getRoleName() + "', role-link = '" - + sRoleRefDesc.getRoleLink() + "'"); - } - } - ret.append("\ngetFullWrpRemoteName() = " + getFullWrpRemoteName()); - ret.append("\ngetFullWrpHomeName() = " + getFullWrpHomeName()); - ret.append("\ngetFullWrpLocalName() = " + getFullWrpLocalName()); - ret.append("\ngetFullWrpLocalHomeName() = " + getFullWrpLocalHomeName()); - ret.append("\ngetFullWrpHandleName() = " + getFullWrpHandleName()); - ret.append("\ngetFullDerivedBeanName() = " + getFullDerivedBeanName()); - ret.append("\ngetRunAsRole() = " + getRunAsRole()); - return ret.toString(); - } - - /** - * MethodDesc constructor factory method to ovewrite - * - * @param meth the method to be wrapped into a MethodDesc instance - * @param index index of the method inside the MethodDesc List - * - * @return Returns a new MethodDesc (or subclass) - */ - protected MethodDesc newMethodDescInstance(final java.lang.reflect.Method meth, final Class classDef, final int index) { - return new MethodDesc(this, meth, classDef, index); - } - - /** - * Add a new method descriptor to the bean - * - * @param meth method to add inside MethodDescs list - * - * @return the constructed MethodDesc - */ - protected MethodDesc addMethodDesc(final java.lang.reflect.Method meth, final Class classDef) { - MethodDesc md = newMethodDescInstance(meth, classDef, methodDesc.size()); - methodDesc.add(md); - methodDescMap.put(meth, md); - return md; - } - - /** - * @return Returns the full name of the wrapper class for the bean - */ - public String getFullWrpRemoteName() { - return fullWrpRemoteName; - } - - /** - * @return Returns the full name of the wrapper class for the bean - */ - public String getFullWrpLocalName() { - return fullWrpLocalName; - } - - /** - * @return Returns the name of the wrapper class for the bean - */ - public String getWrpRemoteName() { - return wrpRemoteName; - } - - /** - * @return Returns the name of the wrapper class for the bean - */ - public String getWrpLocalName() { - return wrpLocalName; - } - - /** - * @return Returns the full name of the Handle class for the bean - */ - public String getFullWrpHandleName() { - return fullWrpHandleName; - } - - /** - * @return Returns the name of the Handle class for the bean - */ - public String getWrpHandleName() { - return wrpHandleName; - } - - /** - * @return Returns the full name of the wrapper home class for the bean - */ - public String getFullWrpHomeName() { - return fullWrpHomeName; - } - - /** - * @return Returns the full name of the wrapper local home class for the bean - */ - public String getFullWrpLocalHomeName() { - return fullWrpLocalHomeName; - } - - /** - * @return Returns the name of the wrapper home class for the bean - */ - public String getWrpHomeName() { - return wrpHomeName; - } - - /** - * @return Returns the name of the wrapper local home class for the bean - */ - public String getWrpLocalHomeName() { - return wrpLocalHomeName; - } - - /** - * @return Returns the full name of the derived class of the bean - */ - public String getFullDerivedBeanName() { - return fullDerivedBeanName; - } - - /** - * @return Returns the name of the derived class of the bean - */ - public String getDerivedBeanName() { - return derivedBeanName; - } - - /** - * @return Returns the parent deployment descriptor - */ - public DeploymentDesc getDeploymentDesc() { - return deploymentDesc; - } - - /** - * Set the parent deployment descriptor - * - * @param deploymentDesc parent DeploymentDesc - */ - public void setDeploymentDesc(final DeploymentDesc deploymentDesc) { - this.deploymentDesc = deploymentDesc; - logger = deploymentDesc.getLogger(); - } - - /** - * Sort the MethodDesc list. - * - * @param al ArrayList to be sorted - * @param begin begin index - * @param length size of the list - */ - private void orderMethodDesc(final ArrayList al, final int begin, final int length) { - MethodDesc[] mds = new MethodDesc[length]; - for (int i = 0; i < length; i++) { - mds[i] = (MethodDesc) al.get(begin + i); - } - Arrays.sort(mds, 0, length, new MethodDescComparator()); - for (int i = 0; i < length; i++) { - al.set(begin + i, mds[i]); - mds[i].setIndex(begin + i); - } - } - - /** - * Compare 2 MethodDesc. - */ - private class MethodDescComparator implements Comparator { - - /** - * Compare 2 Object. - * - * @param o1 instance 1 - * @param o2 instance 2 to be compared to instance 1 - * - * @return integer difference between the 2 instance - */ - public int compare(final Object o1, final Object o2) { - MethodDesc md1 = (MethodDesc) o1; - MethodDesc md2 = (MethodDesc) o2; - int res = md1.getMethod().getDeclaringClass().getName().compareTo( - md2.getMethod().getDeclaringClass().getName()); - if (res == 0) { - res = md1.getMethod().getName().compareTo(md2.getMethod().getName()); - if (res == 0) { - // Same method name => compare the parameter types - Class[] p1 = md1.getMethod().getParameterTypes(); - Class[] p2 = md2.getMethod().getParameterTypes(); - res = p1.length - p2.length; - if (res == 0) { - //Same parameter size - for (int i = 0; i < p1.length && (res = p1[i].getName().compareTo(p2[i].getName())) == 0; i++) { - // compare each method - } - } - } - } - return res; - } - } - - /** - * @return the runAs principal name. - */ - public String getRunAsPrincipalName() { - return runAsPrincipalName; - } - - /** - * @return true if local interface has been defined in the DD - */ - public boolean hasDefinedLocalInterface() { - if (localhome == null) { - return false; - } else { - return (!"javax.ejb.EJBLocalHome".equals(localhome.getName())); - } - } - - /** - * Build sas component used for CSIv2 interop - * @param iorSecurityConfigMapping CsiV2 ior configuration - */ - private void processIorSecurityConfig(final IorSecurityConfigMapping iorSecurityConfigMapping) { - - // Transport - TransportStruct transportStruct = new TransportStruct(); - // As - AsStruct asStruct = new AsStruct(); - // Sas - SasStruct sasStruct = new SasStruct(); - - // Now fill SasComponent with given ior values - TransportConfigMapping transportConfigMapping = iorSecurityConfigMapping.getTransportConfig(); - AsContextMapping asContextMapping = iorSecurityConfigMapping.getAsContext(); - SasContextMapping sasContextMapping = iorSecurityConfigMapping.getSasContext(); - - // target requires (if required) - int targetRequires = 0; - if (transportConfigMapping.getIntegrity().equals("required")) { - targetRequires |= Integrity.value; - } - if (transportConfigMapping.getConfidentiality().equals("required")) { - targetRequires |= Confidentiality.value; - } - if (transportConfigMapping.getEstablishTrustInClient().equals("required")) { - targetRequires |= EstablishTrustInClient.value; - } - if (transportConfigMapping.getEstablishTrustInTarget().equals("required")) { - targetRequires |= EstablishTrustInTarget.value; - } - transportStruct.setTargetRequires(targetRequires); - - - // target supports (supported or required) - int targetSupports = 0; - if (transportConfigMapping.getIntegrity().equals("supported") || transportConfigMapping.getIntegrity().equals("required")) { - targetSupports |= Integrity.value; - } - if (transportConfigMapping.getConfidentiality().equals("supported") || transportConfigMapping.getConfidentiality().equals("required")) { - targetSupports |= Confidentiality.value; - } - if (transportConfigMapping.getEstablishTrustInClient().equals("supported") || transportConfigMapping.getEstablishTrustInClient().equals("required")) { - targetSupports |= EstablishTrustInClient.value; - } - if (transportConfigMapping.getEstablishTrustInTarget().equals("supported") || transportConfigMapping.getEstablishTrustInTarget().equals("required")) { - targetSupports |= EstablishTrustInTarget.value; - } - transportStruct.setTargetSupports(targetSupports); - - - // As struct (if it is needed) - if (!asContextMapping.getAuthMethod().equals("none")) { - asStruct.setTargetName(asContextMapping.getRealm()); - asStruct.setTargetSupports(EstablishTrustInClient.value); - if (asContextMapping.getRequired().equals("true")) { - asStruct.setTargetRequires(EstablishTrustInClient.value); - - } - } - - // Sas struct (if supported) - if (sasContextMapping.getCallerPropagation().equals("supported")) { - sasStruct.enableGSSUPSupportedNamingMechanisms(); - sasStruct.setSupportedIdentityTypes(ITTAbsent.value | ITTAnonymous.value | ITTPrincipalName.value | ITTX509CertChain.value | ITTDistinguishedName.value); - sasStruct.setTargetSupports(IdentityAssertion.value); - } - - // and then, set our SAS component - sasComponent = new SasComponent(transportStruct, asStruct, sasStruct); - - - } - - /** - * @return the sasComponent. - */ - public SasComponent getSasComponent() { - return sasComponent; - } - /** - * @param sasComponent The sasComponent to set. - */ - public void setSasComponent(final SasComponent sasComponent) { - this.sasComponent = sasComponent; - } - - /** - * @return true if the bean has to be replicated over the cluster - */ - public boolean isClusterReplicated() { - return clusterReplicated; - } - - - /** - * Set the cluster replicated attribute - * @param replicated true if the replicated mode is enabled - */ - public void setClusterReplicated(final boolean replicated) { - this.clusterReplicated = replicated; - } - - /** - * @return the cluster - */ - public Object getCluster() { - return cluster; - } - - /** - * @param cluster the cluster to set - */ - public void setCluster(final Object cluster) { - this.cluster = cluster; - } -} - diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/CommonMethodDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/CommonMethodDesc.java deleted file mode 100644 index f5827872ee11eef4659cc22ec6e02285736ddcee..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/CommonMethodDesc.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.ejb; - -import java.security.PermissionCollection; -import java.security.Permissions; -import java.util.List; -import java.util.Iterator; -import javax.security.jacc.EJBMethodPermission; - -import org.ow2.jonas.deployment.ejb.xml.Method; -import org.ow2.jonas.deployment.ejb.xml.MethodParams; - - -/** - * Defines a ExcludeListDesc class for the management of - * EJBMEthodPermissions in JACC - * @author Florent Benoit : Initial developer - */ -public class CommonMethodDesc { - - /** - * List of EJBMethodPermission - */ - private PermissionCollection ejbMethodPermissions = null; - - - /** - * Constructor for CommonMethodDesc - * @param list given methods - */ - public CommonMethodDesc(List list) { - this.ejbMethodPermissions = new Permissions(); - generateEJBMethodPermissions(list); - } - - - /** - * Build all ejbMethodPermissions for the given methods - * @param methodList given methods - */ - protected void generateEJBMethodPermissions(List methodList) { - Iterator it = methodList.iterator(); - - // Manage permissions - while (it.hasNext()) { - Method method = (Method) it.next(); - MethodParams methodParams = method.getMethodParams(); - String[] methodParamsArray = null; - if (methodParams != null) { - - List methodParamsList = method.getMethodParams().getMethodParamList(); - String[] methodParamSize = new String[methodParamsList.size()]; - methodParamsArray = (String[]) methodParamsList.toArray(methodParamSize); - } - - // * or null value means that permission pertains to all methods - String methodName = method.getMethodName(); - if (methodName.equals("*")) { - methodName = null; - } - - - EJBMethodPermission ejbMethodPermission = - new EJBMethodPermission(method.getEjbName(), - methodName, - method.getMethodIntf(), - methodParamsArray); - // Add the permission - ejbMethodPermissions.add(ejbMethodPermission); - } - } - - /** - * Gets EJBMethod permissions - * @return the EJBMethodPermissions - */ - public PermissionCollection getEJBMethodPermissions() { - return ejbMethodPermissions; - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/DeploymentDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/DeploymentDesc.java deleted file mode 100644 index f73f83782361aad8bd1b29cc744f2481e8aed600..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/DeploymentDesc.java +++ /dev/null @@ -1,529 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 021ejbJarDD11-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.deployment.ejb; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -import org.objectweb.util.monolog.api.Logger; -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.common.DescriptionGroupDesc; -import org.ow2.jonas.deployment.common.xml.JLinkedList; -import org.ow2.jonas.deployment.common.xml.JonasMessageDestination; -import org.ow2.jonas.deployment.common.xml.MessageDestination; -import org.ow2.jonas.deployment.ejb.xml.AssemblyDescriptor; -import org.ow2.jonas.deployment.ejb.xml.EjbJar; -import org.ow2.jonas.deployment.ejb.xml.Entity; -import org.ow2.jonas.deployment.ejb.xml.JonasEjbJar; -import org.ow2.jonas.deployment.ejb.xml.JonasEntity; -import org.ow2.jonas.deployment.ejb.xml.JonasRunAsMapping; -import org.ow2.jonas.deployment.ejb.xml.JonasSession; -import org.ow2.jonas.deployment.ejb.xml.MethodPermission; -import org.ow2.jonas.deployment.ejb.xml.Session; - -/** - * Class to hold meta-information related to the deployment of an ejb-jar - * @author Christophe Ney [cney@batisseurs.com] : Initial developer - * @author Helene Joanin - * @author Philippe Durieux - * @author Markus Karg (Novell port) - * @author Philippe Coq - */ -public abstract class DeploymentDesc extends DescriptionGroupDesc { - - /** - * Logger - */ - protected Logger logger; - - - /** - * Ejb spec version - */ - protected String specVersion = null; - - /** - * Set of enterprise beans deployment descriptors - */ - protected HashMap beanDesc = new HashMap(); - - /** - * Assembly descriptor - */ - protected AssemblyDescriptor asd = null; - - /** - * Deployment desc's file name (jar or directory) - */ - protected String fileName = null; - - /** - * Deployment desc's file name (jar or directory) - */ - protected String ejbClientJar = null; - - /** - * List of MethodPermissions - */ - private List methodPermissionsDescList = null; - - /** - * ExcludeList in Assembly descriptor - */ - private ExcludeListDesc excludeListDesc = null; - - /** - * List of JonasMessageDestinations - */ - protected JLinkedList jonasMDList = null; - - /** - * Xml content of the standard deployement descriptor file - */ - private String xmlContent = ""; - - /** - * Xml content of the JOnAS deployement descriptor file - */ - private String jonasXmlContent = ""; - - /** - * Mapping for runAs principals - * Principal name --> list of roles (array) - */ - private Map runAsMapping = null; - - /** - * true if EJB monitoring is active for this EJB-JAR, null if nothing set. - */ - private Boolean monitoringEnabled; - - /** - * Number of milliseconds after which methods will start warning for this - * EJB-JAR, null if nothing set. - */ - - private Integer warningThreshold; - - /** - * Build the Meta-Information from the XML data binding trees - * containing the EJB and JOnAS deployment descriptors. - * @param classLoader The Class Loader to be used - * @param ejbJar The EjbJar information, from standard deployment descriptor. - * @param jonasEjbJar The JonasEjbJar information, from JOnAS specific deployment descriptor. - * @param l The logger to be used for tracing - * @param fileName deployment desc's jar or directory name - * @throws DeploymentDescException Cannot deploy bean - */ - public DeploymentDesc(final ClassLoader classLoader, - final EjbJar ejbJar, - final JonasEjbJar jonasEjbJar, - final Logger l, - final String fileName) - throws DeploymentDescException { - - - logger = l; - - // set jarFileName - this.fileName = fileName; - - // test classloader - if (classLoader == null) { - throw new DeploymentDescException("DeploymentDesc: Classloader is null"); - } - - // spec-version - specVersion = ejbJar.getVersion(); - - // ejb-client-jar - ejbClientJar = ejbJar.getEjbClientJar(); - - // assembly descriptor - asd = ejbJar.getAssemblyDescriptor(); - - // Run-as mapping - runAsMapping = new HashMap(); - for (Iterator i = jonasEjbJar.getJonasRunAsMappingList().iterator(); i.hasNext();) { - // Get Mapping - JonasRunAsMapping jonasRunAsMapping = (JonasRunAsMapping) i.next(); - String principalName = jonasRunAsMapping.getPrincipalName(); - // Get existing roles if any - String[] existingRunAsRoleMapping = (String[]) runAsMapping.get(principalName); - String[] newMappingRoles = null; - int r = 0; - if (existingRunAsRoleMapping == null) { - newMappingRoles = new String[jonasRunAsMapping.getRoleNamesList().size()]; - } else { - newMappingRoles = new String[jonasRunAsMapping.getRoleNamesList().size() + existingRunAsRoleMapping.length]; - // Now add existing roles - System.arraycopy(existingRunAsRoleMapping, 0, newMappingRoles, 0, existingRunAsRoleMapping.length); - r = existingRunAsRoleMapping.length; - } - Iterator itR = jonasRunAsMapping.getRoleNamesList().iterator(); - while (itR.hasNext()) { - newMappingRoles[r] = (String) itR.next(); - r++; - } - runAsMapping.put(principalName, newMappingRoles); - - } - - // Use by PermissionManager for translating xml into EJBMethodPermission - methodPermissionsDescList = new LinkedList(); - // Create EJBMEthodPermissions for each method-permission - if (asd != null) { - for (Iterator i = asd.getMethodPermissionList().iterator(); i.hasNext();) { - MethodPermission methodPermission = (MethodPermission) i.next(); - methodPermissionsDescList.add(new MethodPermissionDesc(methodPermission)); - } - } - - // Use by PermissionManager for translating xml into EJBMethodPermission - if (asd != null && asd.getExcludeList() != null) { - excludeListDesc = new ExcludeListDesc(asd.getExcludeList()); - } - - // jonas-message-destination - jonasMDList = jonasEjbJar.getJonasMessageDestinationList(); - - // HashMap of jonas-session - HashMap jonasSession = new HashMap(); - for (Iterator i = jonasEjbJar.getJonasSessionList().iterator(); i.hasNext();) { - JonasSession jSes = (JonasSession) i.next(); - jonasSession.put(jSes.getEjbName(), jSes); - } - - // session beans - if (ejbJar.getEnterpriseBeans() != null) { - for (Iterator i = ejbJar.getEnterpriseBeans().getSessionList().iterator(); i.hasNext();) { - BeanDesc bd = null; - Session ses = (Session) i.next(); - // find corresponding jonas session - JonasSession jSes = (JonasSession) jonasSession.get(ses.getEjbName()); - if (jSes == null) { - // Build a default jonas-session if not exist - jSes = new JonasSession(); - jSes.setEjbName(ses.getEjbName()); - } - // Can be an EJB3, continue - if (ses.getSessionType() == null) { - continue; - } - if (ses.getSessionType().equals("Stateful")) { - // stateful - bd = new SessionStatefulDesc(classLoader, ses, asd, jSes, jonasMDList, fileName); - } else if (ses.getSessionType().equals("Stateless")) { - // stateless - bd = new SessionStatelessDesc(classLoader, ses, asd, jSes, jonasMDList, fileName); - } else { - throw new DeploymentDescException("invalid session-type content for bean " + ses.getEjbName()); - } - bd.setDeploymentDesc(this); - bd.check(); - beanDesc.put(bd.getEjbName(), bd); - } - } - - // HashMap of jonas-entity - HashMap jonasEntity = new HashMap(); - for (Iterator i = jonasEjbJar.getJonasEntityList().iterator(); i.hasNext();) { - JonasEntity jEnt = (JonasEntity) i.next(); - jonasEntity.put(jEnt.getEjbName(), jEnt); - } - // entity beans - if (ejbJar.getEnterpriseBeans() != null) { - for (Iterator i = ejbJar.getEnterpriseBeans().getEntityList().iterator(); i.hasNext();) { - BeanDesc bd = null; - Entity ent = (Entity) i.next(); - // find corresponding jonas entity - JonasEntity jEnt = (JonasEntity) jonasEntity.get(ent.getEjbName()); - if (jEnt == null) { - throw new DeploymentDescException("jonas-entity missing for bean " + ent.getEjbName()); - } - if (ent.getPersistenceType().equals("Bean")) { - // bean managed - bd = new EntityBmpDesc(classLoader, ent, asd, jEnt, jonasMDList, fileName); - } else if (ent.getPersistenceType().equals("Container")) { - // container managed (always jdbc) - bd = newEntityBeanDesc(classLoader, ent, asd, jEnt, jonasMDList); - } else { - throw new DeploymentDescException("Invalid persistence-type content for bean " + ent.getEjbName()); - } - bd.setDeploymentDesc(this); - bd.check(); - beanDesc.put(bd.getEjbName(), bd); - } - } - } - - /** - * Get an Iterator on the Bean Desc list - * @return Iterator on BeanDesc - */ - public Iterator getBeanDescIterator() { - return beanDesc.values().iterator(); - } - - /** - * Get descriptors for all beans contained in jar file - * @return Array of bean's descriptors - */ - public BeanDesc[] getBeanDesc() { - BeanDesc[] ret = new BeanDesc[beanDesc.size()]; - int j = 0; - for (Iterator i = beanDesc.values().iterator(); i.hasNext(); j++) { - ret[j] = (BeanDesc) i.next(); - } - return ret; - } - - /** - * Gets the Mapping for run-as principal - * @param principalName name of the run-as principal - * @return array of roles - */ - public String[] getRolesForRunAsPrincipal(final String principalName) { - return (String[]) runAsMapping.get(principalName); - } - - /** - * Get bean descriptor given its name - * @param ejbName the name of the bean in the Deployment Descriptor - * @return bean descriptor given its name - */ - public BeanDesc getBeanDesc(final String ejbName) { - return (BeanDesc) beanDesc.get(ejbName); - } - - /** - * Get bean descriptor given its abstract schema name - * @param asn Abstract Schema Name - * @return null if it doesn't exist. - */ - public EntityCmp2Desc asn2BeanDesc(final String asn) { - for (Iterator i = beanDesc.values().iterator(); i.hasNext();) { - BeanDesc bd = (BeanDesc) i.next(); - if (bd instanceof EntityCmp2Desc) { - if (asn.equals(((EntityCmp2Desc) bd).getAbstractSchemaName())) { - return ((EntityCmp2Desc) bd); - } - } - } - return null; - } - - - /** - * Get the list of the methodPermissionDesc objects which represent - * method-permission elements in assembly-descriptor - * @return the list of methodPermissionDesc objects - */ - public List getMethodPermissionsDescList() { - return methodPermissionsDescList; - } - - /** - * Get the exclude list of the assembly descriptor - * @return the exclude list of the assembly descriptor - */ - public ExcludeListDesc getExcludeListDesc() { - return excludeListDesc; - } - - - /** - * Get bean descriptor given its interface local name - * @param itfLocalName local interface name - * @return null if it doesn't exist. - */ - public BeanDesc getBeanDescWithLocalInterface(final String itfLocalName) { - for (Iterator i = beanDesc.values().iterator(); i.hasNext();) { - BeanDesc bd = (BeanDesc) i.next(); - if (bd.getLocalClass() != null) { - if (itfLocalName.equals(bd.getLocalClass().getName())) { - return bd; - } - } - } - return null; - } - - /** - * Find the JOnAS message destination for the given name - * @param mdLink the name of the message destination link in the Deployment Descriptor - * @return boolean if link was found - */ - public boolean getMessageDestination(final String mdLink) { - MessageDestination md = null; - if (asd != null && asd.getMessageDestinationList() != null) { - for (Iterator i = asd.getMessageDestinationList().iterator(); i.hasNext();) { - md = (MessageDestination) i.next(); - if (md.getMessageDestinationName().equals(mdLink)) { - return true; - } - } - } - return false; - } - - /** - * Get the JOnAS message destination for the given name - * @param mdLink the name of the message destination link in the Deployment Descriptor - * @return the jonas message destination given the name - */ - public JonasMessageDestination getJonasMessageDestination(final String mdLink) { - JonasMessageDestination jmd = null; - if (jonasMDList != null) { - for (Iterator i = jonasMDList.iterator(); i.hasNext();) { - jmd = (JonasMessageDestination) i.next(); - if (jmd.getMessageDestinationName().equals(mdLink)) { - return jmd; - } - } - } - return null; - } - - /** - * In case of beans with old CMP1 persistance, we need to instanciate the old class, - * as if we were in an old Deployment Descriptor. - * Default is CMP2.x for entity beans with a EJB2.0 DD. - * - * @param cl The ClassLoader to be used - * @param ent Entity MetaInformation from XML files - * @param asd AssemblyDescriptor MetaInformation from XML files - * @param j JonasEntity MetaInformation from XML files - * @param jMDRList MessageDrivenRef list - * - * @return The Entity Bean Descriptor, for the good CMP version. - * - * @throws DeploymentDescException Cannot build Entity Descriptor - */ - protected abstract BeanDesc newEntityBeanDesc(ClassLoader cl, Entity ent, - AssemblyDescriptor asd, JonasEntity j, JLinkedList jMDRList) - throws DeploymentDescException; - - /** - * Get the display name - * @return the Display name string, from the deployment descriptor. - */ - @Override - public String getDisplayName() { - return displayName; - } - - /** - * Get the ejb-client-jar name - * @return the ejb-client-jar string, from the deployment descriptor (may be null). - */ - public String getEjbClientJar() { - return ejbClientJar; - } - - - /** - * get the current logger - * @return the Logger - */ - public Logger getLogger() { - return logger; - } - - /** - * set the current logger - * @param logger the Logger - */ - public void setLogger(final Logger logger) { - this.logger = logger; - } - - /** - * Return the content of the web.xml file - * @return the content of the web.xml file - */ - public String getXmlContent() { - return xmlContent; - } - - /** - * Return the content of the jonas-web.xml file - * @return the content of the jonas-web.xml file - */ - public String getJOnASXmlContent() { - return jonasXmlContent; - } - - /** - * String representation of the object for test purpose - * @return String representation of this object - */ - @Override - public String toString() { - StringBuffer ret = new StringBuffer(); - ret.append("\ngetDisplayName()=" + getDisplayName()); - ret.append("\ngetEjbClientJar()=" + getEjbClientJar()); - BeanDesc[] b = getBeanDesc(); - for (int i = 0; i < b.length; i++) { - ret.append("\ngetBeanDesc(" + i + ")=" + b[i].getClass().getName()); - ret.append(b[i].toString()); - } - return ret.toString(); - } - - /** - * @param xmlContent XML Content - */ - public void setXmlContent(final String xmlContent) { - this.xmlContent = xmlContent; - } - - /** - * @param jonasXmlContent XML Content - */ - public void setJOnASXmlContent(final String jonasXmlContent) { - this.jonasXmlContent = jonasXmlContent; - } - /** - * @return true if EJB monitoring is active for this EJB-JAR, null if - * nothing set. - */ - public Boolean getMonitoringEnabled() { - return this.monitoringEnabled; - } - - /** - * @return Number of milliseconds after which methods will start warning - * for this EJB-JAR, null if nothing set. - */ - public Integer getWarningThreshold() { - return this.warningThreshold; - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/DeploymentDescEjb1_1.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/DeploymentDescEjb1_1.java deleted file mode 100644 index f569ee8fb861dfb872c4cb23142f13982426e1ba..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/DeploymentDescEjb1_1.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.deployment.ejb; - -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.common.xml.JLinkedList; -import org.ow2.jonas.deployment.ejb.xml.AssemblyDescriptor; -import org.ow2.jonas.deployment.ejb.xml.EjbJar; -import org.ow2.jonas.deployment.ejb.xml.Entity; -import org.ow2.jonas.deployment.ejb.xml.JonasEjbJar; -import org.ow2.jonas.deployment.ejb.xml.JonasEntity; - -import org.objectweb.util.monolog.api.Logger; -import org.objectweb.util.monolog.api.BasicLevel; - -/** - * Class to hold meta-information related to the deployment of an ejb-jar 1.1 - * @author Philippe Durieux (Bull) - */ -public class DeploymentDescEjb1_1 extends DeploymentDesc { - - /** - * constructor - */ - public DeploymentDescEjb1_1(ClassLoader cl, EjbJar ej, - JonasEjbJar jej, Logger l, - String fileName) - throws DeploymentDescException { - super(cl, ej, jej, l, fileName); - // Trace - if (logger.getCurrentIntLevel() == BasicLevel.DEBUG) { - logger.log(BasicLevel.DEBUG, "DEPLOYMENT DESCRIPTOR = \n(" + this.toString() + "\n)"); - } - } - - protected BeanDesc newEntityBeanDesc(ClassLoader classLoader, - Entity ent, - AssemblyDescriptor asd, - JonasEntity jEnt, - JLinkedList jMDRList) throws DeploymentDescException { - return new EntityJdbcCmp1Desc(classLoader, ent, asd, jEnt, jMDRList, fileName); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/DeploymentDescEjb2.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/DeploymentDescEjb2.java deleted file mode 100644 index c6a17508cb8aa8dc31d53bdb4d1a5a0e33d0bb8b..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/DeploymentDescEjb2.java +++ /dev/null @@ -1,252 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.ejb; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; - -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.common.xml.JLinkedList; -import org.ow2.jonas.deployment.ejb.xml.AssemblyDescriptor; -import org.ow2.jonas.deployment.ejb.xml.EjbJar; -import org.ow2.jonas.deployment.ejb.xml.EjbRelation; -import org.ow2.jonas.deployment.ejb.xml.Entity; -import org.ow2.jonas.deployment.ejb.xml.JonasEjbJar; -import org.ow2.jonas.deployment.ejb.xml.JonasEjbRelation; -import org.ow2.jonas.deployment.ejb.xml.JonasEntity; -import org.ow2.jonas.deployment.ejb.xml.JonasMessageDriven; -import org.ow2.jonas.deployment.ejb.xml.MessageDriven; - -import org.objectweb.util.monolog.api.Logger; -import org.objectweb.util.monolog.api.BasicLevel; - -/** - * Class to hold meta-information related to the deployment of an ejb-jar - * This subclass is for specification EJB 2.x, i.e. CMP2 persistance and MDB. - * It is also responsible for loading the Jorm Meta Information. - * @author S.Chassande-Barrioz : Initial developer - * @author Christophe Ney [cney@batisseurs.com] - * @author Philippe Durieux (new Jorm mapping) - */ -public class DeploymentDescEjb2 extends DeploymentDesc { - - /** - * List of relations (EjbRelationDesc) defined in this Descriptor - */ - private ArrayList ejbRelations = new ArrayList(); - - /** - * Build the Meta-Information from the XML data binding trees - * containing the EJB and JOnAS deployment descriptors. - * @param classLoader The Class Loader to be used - * @param ejbJar The EjbJar information, from standard deployment descriptor. - * @param jonasEjbJar The JonasEjbJar information, from JOnAS specific deployment descriptor. - * @param l The logger to be used for tracing - * @param FileName deployment desc's jar or directory name - * @throws DeploymentDescException Error when building the Deployment Descriptor - */ - public DeploymentDescEjb2(ClassLoader classLoader, EjbJar ejbJar, - JonasEjbJar jonasEjbJar, Logger l, - String fileName) - throws DeploymentDescException { - - // Session and Entity bean descriptors are built here. - // This part is common with EJB1.1 spec (no CMP2, no MDB) - super(classLoader, ejbJar, jonasEjbJar, l, fileName); - - // HashMap of jonas-message-driven - HashMap jonasMessageDriven = new HashMap(); - for (Iterator i = jonasEjbJar.getJonasMessageDrivenList().iterator(); i.hasNext(); ) { - JonasMessageDriven jMd = (JonasMessageDriven) i.next(); - jonasMessageDriven.put(jMd.getEjbName(), jMd); - } - - // message-driven beans - if (ejbJar.getEnterpriseBeans() != null) { - for (Iterator i = ejbJar.getEnterpriseBeans().getMessageDrivenList().iterator(); i.hasNext(); ) { - BeanDesc bd = null; - MessageDriven md = (MessageDriven) i.next(); - /* - * The Standard DTD allows a message-driven-bean without ejb-name - * Problem to associate infos to this bean (trans-attribute, jonas-specific infos) - * So the ejb-name must be specify and we check this - */ - if (md.getEjbName() == null) { - throw new DeploymentDescException("ejb-name missing for a message driven bean"); - } - // find corresponding jonas message-driven - JonasMessageDriven jMd = (JonasMessageDriven) jonasMessageDriven.get(md.getEjbName()); - if (jMd == null) { - throw new DeploymentDescException("jonas-message-driven-bean missing for bean " + md.getEjbName()); - } - - bd = new MessageDrivenDesc(classLoader, md, asd, jMd, - jonasEjbJar.getJonasMessageDestinationList(), fileName); - - bd.setDeploymentDesc(this); - bd.check(); - beanDesc.put(bd.getEjbName(), bd); - } - } - - // Relations on Entity beans CMP2 - if (ejbJar.getRelationships() != null) { - - // ArrayList of standard-relation names (Strings) - ArrayList stdRelations = new ArrayList(); - - // HashMap of jonas-relation - HashMap jonasRelations = new HashMap(); - for (Iterator i = jonasEjbJar.getJonasEjbRelationList().iterator(); i.hasNext(); ) { - JonasEjbRelation jer = (JonasEjbRelation) i.next(); - String jerName = jer.getEjbRelationName(); - //if (!stdRelations.contains(jerName)) { - // throw new DeploymentDescException("ejb-relation missing in ejb-jar.xml for the relation " + jerName); - //} - jonasRelations.put(jerName, jer); - } - - // ejb-relation - for (Iterator i = ejbJar.getRelationships().getEjbRelationList().iterator(); i.hasNext();) { - EjbRelation er = (EjbRelation) i.next(); - - // build the descriptors for the relation. - EjbRelationDesc erd = new EjbRelationDesc(er, logger); - ejbRelations.add(erd); - - // Keep a list of relation names. - stdRelations.add(erd.getName()); - - // find corresponding jonas relation (may not exist) - JonasEjbRelation jer = (JonasEjbRelation) jonasRelations.get(erd.getName()); - erd.setJonasInfo(jer); - - // makes the links between entity beans and relationship roles - EjbRelationshipRoleDesc rsd1 = erd.getRelationshipRole1(); - EjbRelationshipRoleDesc rsd2 = erd.getRelationshipRole2(); - EntityCmp2Desc ed1 = (EntityCmp2Desc) beanDesc.get(rsd1.getSourceBeanName()); - EntityCmp2Desc ed2 = (EntityCmp2Desc) beanDesc.get(rsd2.getSourceBeanName()); - // Check the sources beans names are correct - if ((ed1 == null) || (ed2 == null)) { - throw new DeploymentDescException("Invalid ejb-name for a relation-ship-role-source for the relation '" - + erd.getName() - + "' ('" - + rsd1.getSourceBeanName() - + "' or '" - + rsd2.getSourceBeanName() - + "' invalid)"); - } - // Check if the source beans have local interfaces - if ((ed1.getLocalHomeClass() == null) || (ed1.getLocalClass() == null)) { - throw new DeploymentDescException("The entity bean '" + ed1.getEjbName() - + "' involved in the relationship '" - + erd.getName() - + "' must have local interfaces"); - } - if ((ed2.getLocalHomeClass() == null) || (ed2.getLocalClass() == null)) { - throw new DeploymentDescException("The entity bean '" + ed2.getEjbName() - + "' involved in the relationship '" - + erd.getName() - + "' must have local interfaces"); - } - ed1.addEjbRelationshipRoleDesc(rsd1); - ed2.addEjbRelationshipRoleDesc(rsd2); - rsd1.setTargetBean(ed2); - rsd1.setSourceBean(ed1); - rsd2.setTargetBean(ed1); - rsd2.setSourceBean(ed2); - - // Fill the mapping information with the values defined in jonas DD - erd.fillMappingInfo(); - - // Fill the mapping information for the relation with default values - // if some mapping information is missing - erd.fillMappingInfoWithDefault(); - } - - for (Iterator i = jonasEjbJar.getJonasEjbRelationList().iterator(); i.hasNext(); ) { - JonasEjbRelation jer = (JonasEjbRelation) i.next(); - String jerName = jer.getEjbRelationName(); - if (!stdRelations.contains(jerName)) { - throw new DeploymentDescException("ejb-relation missing in ejb-jar.xml for the relation " + jerName); - } - } - } - - // Trace - if (logger.getCurrentIntLevel() == BasicLevel.DEBUG) { - logger.log(BasicLevel.DEBUG, "DEPLOYMENT DESCRIPTOR = \n(" + this.toString() + "\n)"); - } - } - - /** - * In case of beans with old CMP1 persistance, we need to instanciate the old class, - * as if we were in an old Deployment Descriptor. - * Default is CMP2.x for entity beans with a EJB2.0 DD. - * @param classLoader The ClassLoader to be used - * @param ent Entity MetaInformation from XML files - * @param asd AssemblyDescriptor MetaInformation from XML files - * @param jEnt JonasEntity MetaInformation from XML files - * @return The Entity Bean Descriptor, for the good CMP version. - * @throws DeploymentDescException Cannot build Entity Descriptor - */ - protected BeanDesc newEntityBeanDesc(ClassLoader classLoader, - Entity ent, - AssemblyDescriptor asd, - JonasEntity jEnt, - JLinkedList jMDRList) - throws DeploymentDescException { - - if (ent.getCmpVersion() == null || ent.getCmpVersion().equals("2.x")) { - return new EntityJdbcCmp2Desc(classLoader, ent, asd, jEnt, this, jMDRList, fileName); - } else { - return new EntityJdbcCmp1Desc(classLoader, ent, asd, jEnt, jMDRList, fileName); - } - } - - /** - * Get iterator of meta-info for all defined relations - * @return an iterator of EjbRelationDesc - */ - public Iterator getEjbRelationDescIterator() { - return ejbRelations.iterator(); - } - - /** - * String representation of the object for test purpose - * @return String representation of this object - */ - public String toString() { - StringBuffer ret = new StringBuffer(); - ret.append(super.toString()); - for (Iterator i = getEjbRelationDescIterator(); i.hasNext();) { - ret.append("\nejbRelationDesc[]=" + i.next()); - } - return ret.toString(); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EjbRelationDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EjbRelationDesc.java deleted file mode 100644 index 714271cd2887f1818f2b85cb09c65843dee89050..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EjbRelationDesc.java +++ /dev/null @@ -1,311 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.ejb; - -import java.util.HashMap; -import java.util.Iterator; - -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.ejb.xml.EjbRelation; -import org.ow2.jonas.deployment.ejb.xml.EjbRelationshipRole; -import org.ow2.jonas.deployment.ejb.xml.JonasEjbRelation; -import org.ow2.jonas.deployment.ejb.xml.JonasEjbRelationshipRole; - -import org.objectweb.util.monolog.api.Logger; - -/** - * Class to hold meta-information related to an ejb-relation. - * @author Christophe Ney [cney@batisseurs.com] : Initial developer - * @author Helene Joanin on May 2003: code cleanup - * @author Helene Joanin on May 2003: complement for legacy first version - * @author Ph Durieux (may 2004): default names for relations and roles. - */ - -public class EjbRelationDesc { - - private Logger logger = null; - private String name; // name of the relation - private String name1; // name of the relation role 1 - private String name2; // name of the relation role 2 - private EjbRelationshipRoleDesc relationshipRoleDesc1; - private EjbRelationshipRoleDesc relationshipRoleDesc2; - private String jdbcTableName = null; - - - // Zeus objects for the associated mapping information (needed in fillMappingInfo); - private EjbRelationshipRole role1; - private EjbRelationshipRole role2; - JonasEjbRelation jRel = null; - JonasEjbRelationshipRole jRsRole1 = null; - JonasEjbRelationshipRole jRsRole2 = null; - - - /** - * constructor to be used by parent node. - * @param er The described object EjbRelation - * @param logger The logger - * @throws DeploymentDescException thrown in error case. - */ - public EjbRelationDesc(EjbRelation er, Logger logger) throws DeploymentDescException { - - this.logger = logger; - - role1 = er.getEjbRelationshipRole(); - role2 = er.getEjbRelationshipRole2(); - - String cmr1 = ""; - if (role1.getCmrField() != null) { - cmr1 = role1.getCmrField().getCmrFieldName(); - } - String cmr2 = ""; - if (role2.getCmrField() != null) { - cmr2 = role2.getCmrField().getCmrFieldName(); - } - - // first role. A name is mandatory. - // If not set: choose the cmr name of the opposite role, if it exists. - name1 = role1.getEjbRelationshipRoleName(); - if (name1 == null || name1.length() == 0) { - if (role2.getCmrField() != null) { - name1 = cmr2; - } else { - name1 = "role1"; // a default value - } - // We have changed the name, keep the new one. - role1.setEjbRelationshipRoleName(name1); - } - - // second role. A name is mandatory. - // If not set: choose the cmr name of the opposite role, if it exists. - name2 = role2.getEjbRelationshipRoleName(); - if (name2 == null || name2.length() == 0) { - if (role1.getCmrField() != null) { - name2 = cmr1; - } else { - name2 = "role2"; // a default value - } - // We have changed the name, keep the new one. - role2.setEjbRelationshipRoleName(name2); - } - - // the two roles must have different names - if (name1.equals(name2)) { - throw new DeploymentDescException("Relation " + name + " have 2 roles with same name: " + name1); - } - - // name of the relation. If not set, choose a combination of the 2 cmr names. - String ern = er.getEjbRelationName(); - if (ern == null || ern.length() == 0) { - name = cmr2 + "-" + cmr1; - } else { - name = ern; - } - } - - /** - * Finish initialisation - * @param jer The described object JonasEjbRelation. This param may be null. - * @throws DeploymentDescException in error case - */ - public void setJonasInfo(JonasEjbRelation jer) throws DeploymentDescException { - // search the associated JonasEjbRelationshipRole of EjbRelationshipRole. - // They may not exist. - jRel = jer; - HashMap table = new HashMap(); - if (jRel != null) { - for (Iterator i = jRel.getJonasEjbRelationshipRoleList().iterator(); i.hasNext();) { - JonasEjbRelationshipRole jersr = (JonasEjbRelationshipRole) i.next(); - String rname = jersr.getEjbRelationshipRoleName(); - if (!rname.equals(name1) && !rname.equals(name2)) { - throw new DeploymentDescException("Invalid relationship-role-name \"" + rname + "\" for relation \"" + name + "\" in jonas-ejb-jar.xml"); - } - table.put(rname, jersr); - } - } - jRsRole1 = (JonasEjbRelationshipRole) table.get(name1); - jRsRole2 = (JonasEjbRelationshipRole) table.get(name2); - - relationshipRoleDesc1 = new EjbRelationshipRoleDesc(this, name1, role1, jRsRole1, role2, true, logger); - relationshipRoleDesc2 = new EjbRelationshipRoleDesc(this, name2, role2, jRsRole2, role1, false, logger); - - // Add the opposite CMR field for the relation XXu - // in order to implement the coherence. - boolean r1hf = relationshipRoleDesc1.hasCmrField(); - boolean r2hf = relationshipRoleDesc2.hasCmrField(); - EjbRelationshipRoleDesc nocmr = null; - EjbRelationshipRoleDesc cmr = null; - if (r1hf && !r2hf) { - nocmr = relationshipRoleDesc2; - cmr = relationshipRoleDesc1; - } else if (!r1hf && r2hf) { - nocmr = relationshipRoleDesc1; - cmr = relationshipRoleDesc2; - } - if (nocmr != null) { - // The relation is OXu, the role 'role' does not have cmr field - String cmrName = name; - // calculate a cmr field name with the relation name. The bad - // character are replaced by the character '_'. - for (int i = 0; i < cmrName.length(); i++) { - char c = cmrName.charAt(i); - if (!Character.isJavaIdentifierPart(c)) { - cmrName = cmrName.replace(c, '_'); - } - } - cmrName = "jonasCMR" + cmrName; - // Add the cmr, no type is specified because the added cmr field - // is mono valued. - nocmr.setCmrFieldName(cmrName); - nocmr.setIsJOnASCmrField(); - if (nocmr.isTargetMultiple()) { - if (cmr.isTargetMultiple()) { - nocmr.setCmrFieldType(cmr.cmrFieldType.getName()); - } else { - nocmr.setCmrFieldType("java.util.Collection"); - } - } - } - } - - /** - * Fills the mapping information of this relation with the values defined in jonas DD. - * @throws DeploymentDescException thrown in error case. - */ - protected void fillMappingInfo() throws DeploymentDescException { - if (jRel != null) { - if (jRel.getJdbcTableName() != null) { - if (jRel.getJdbcTableName().length() != 0) { - jdbcTableName = jRel.getJdbcTableName(); - } - } - relationshipRoleDesc1.fillMappingInfo(); - relationshipRoleDesc2.fillMappingInfo(); - } - } - - /** - * Fills the mapping information of this relation with default values, - * if the mapping information is not already initialized. - */ - protected void fillMappingInfoWithDefault() { - if (!hasJdbcTable()) { - if (getRelationshipRole1().isTargetMultiple() - && getRelationshipRole2().isTargetMultiple()) { - // Many-Many: join table needed for the relation - jdbcTableName = getRelationshipRole1().getSourceBean().getAbstractSchemaName().toUpperCase() - + "_" + getRelationshipRole2().getSourceBean().getAbstractSchemaName().toUpperCase(); - } - } - if (!getRelationshipRole1().isSourceMultiple() - && !getRelationshipRole2().isSourceMultiple()) { - // One-One - if (!getRelationshipRole1().hasJdbcMapping() - && !getRelationshipRole2().hasJdbcMapping()) { - if (!getRelationshipRole1().isJOnASCmrField() - && !getRelationshipRole2().isJOnASCmrField()) { - // One <-> One: foreign keys in the source bean of the first RsRole defined - getRelationshipRole1().fillMappingInfoWithDefault(); - } else { - if (!getRelationshipRole1().isJOnASCmrField()) { - // One -> One: foreign keys in the source bean of RsRole1 - getRelationshipRole1().fillMappingInfoWithDefault(); - } else { - // One <- One: foreign keys in the target bean of RsRole1 - getRelationshipRole2().fillMappingInfoWithDefault(); - } - } - } - } else if (getRelationshipRole1().isSourceMultiple() - && getRelationshipRole2().isSourceMultiple()) { - // Many-Many - getRelationshipRole1().fillMappingInfoWithDefault(); - getRelationshipRole2().fillMappingInfoWithDefault(); - } else { - // One-Many or Many-One - if (getRelationshipRole1().isSourceMultiple()) { - // Many-One - getRelationshipRole1().fillMappingInfoWithDefault(); - } else { - // One-Many - getRelationshipRole2().fillMappingInfoWithDefault(); - } - } - } - - /** - * get the name of the relationship. - * @return the String name of the relationship. - */ - public String getName() { - return name; - } - - /** - * get the meta-information for the first relation-ship-role - * @return the EjbRelationshipRoleDesc for the first relation-ship-role - */ - public EjbRelationshipRoleDesc getRelationshipRole1() { - return relationshipRoleDesc1; - } - - /** - * get the meta-information for the second relation-ship-role - * @return the EjbRelationshipRoleDesc for the second relation-ship-role - */ - public EjbRelationshipRoleDesc getRelationshipRole2() { - return relationshipRoleDesc2; - } - - /** - * Is a table in the database is defined for this relation ? - * @return true if table name in the database is defined for this relation. - */ - public boolean hasJdbcTable() { - return (jdbcTableName != null); - } - - /** - * Return the table name in the database associated to this relation. - * @return the String name of the table associated to this relation. - */ - public String getJdbcTableName() { - return jdbcTableName; - } - - /** - * String representation of the object for test purpose - * @return String representation of this object - */ - public String toString() { - StringBuffer ret = new StringBuffer(); - ret.append("\ngetName()=" + getName()); - if (hasJdbcTable()) { - ret.append("\ngetJdbcTableName() = " + getJdbcTableName()); - } - ret.append("\ngetRelationshipRole1() = " + getRelationshipRole1()); - ret.append("\ngetRelationshipRole2() = " + getRelationshipRole2()); - return ret.toString(); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EjbRelationshipRoleDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EjbRelationshipRoleDesc.java deleted file mode 100644 index 9a970c903ba85464d6970c9ac7214ab3d28067c1..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EjbRelationshipRoleDesc.java +++ /dev/null @@ -1,496 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.deployment.ejb; - -import java.util.HashMap; -import java.util.Iterator; - -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.ejb.xml.EjbRelationshipRole; -import org.ow2.jonas.deployment.ejb.xml.ForeignKeyJdbcMapping; -import org.ow2.jonas.deployment.ejb.xml.JonasEjbRelationshipRole; - -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; - -/** - * Class to hold meta-information related to an ejb-relation-role - * Created on July 7, 2002 - * @author Christophe Ney [cney@batisseurs.com] : Initial developer - * @author Helene Joanin on May 2003: code cleanup - * @author Helene Joanin on May 2003: complement for legacy first version - */ -public class EjbRelationshipRoleDesc { - - private Logger logger = null; - - /** - * This constant can be used to represent an index of a gen class. - */ - public static final byte INDEX = 1; - - /** - * This constant can be used to represent the source of the relation, ie the - * element which references the other. - */ - public static final byte SOURCE = 2; - - /** - * This constant can be used to represent the target of the relation, ie the - * element which is referenced by the other. - */ - public static final byte TARGET = 4; - - /** - * Don't change these values without looking at getRelationType() ! - */ - public static final byte OOU = 0; - - public static final byte OOB = 1; - - public static final byte OMU = 2; - - public static final byte OMB = OMU + OOB; - - public static final byte MOU = 4; - - public static final byte MOB = MOU + OOB; - - public static final byte MMU = OMU + MOU; - - public static final byte MMB = MMU + OOB; - - private String rsrName; - - private String ejbSourceName; - - private EjbRelationDesc ejbRelationDesc; - - private EntityCmp2Desc sourceEntityCmp2Desc; - - private boolean isSourceMultiple; - - private EntityCmp2Desc targetEntityCmp2Desc; - - private boolean isTargetMultiple; - - private boolean isSlave; - - protected String cmrFieldName = null; - - protected Class cmrFieldType = null; - - protected boolean isJOnASCMR = false; - - private byte relationType = -1; - - private boolean mustCascade; - - // Zeus objects for the associated mapping information (needed in - // fillMappingInfo); - // They may be null. - private JonasEjbRelationshipRole jSourceRsRole = null; - - // mapping information build by fillMappingInfo and - // fillMappingInfoWithDefault - private HashMap foreignKeyMap = new HashMap(); - - private boolean hasJdbcMapping = false; - - /** - * constructor to be used by parent node - * @param rd parent node = EjbRelationDesc - * @param role this role (standard EjbRelationshipRole) - * @param jrole this Jonas role (JonasEjbRelationshipRole). This param may - * be null. - * @param opposite opposite role in the relation (standard - * EjbRelationshipRole) - * @throws DeploymentDescException in error case. - */ - public EjbRelationshipRoleDesc(EjbRelationDesc rd, String name, EjbRelationshipRole role, - JonasEjbRelationshipRole jrole, EjbRelationshipRole opposite, boolean isSlave, Logger logger) - throws DeploymentDescException { - - this.logger = logger; - ejbRelationDesc = rd; - this.isSlave = isSlave; - rsrName = name; - mustCascade = opposite.isCascadeDelete(); - ejbSourceName = role.getRelationshipRoleSource().getEjbName(); - - // mutiplicity is One or Many - if (opposite.getMultiplicity().equalsIgnoreCase("Many")) { - isTargetMultiple = true; - if (role.isCascadeDelete()) { - throw new DeploymentDescException("Cascade delete not allowed for relationshipRole for relationship '" - + rd.getName() + "(because opposite role has a multiplicity of Many)"); - } - } else if (opposite.getMultiplicity().equalsIgnoreCase("One")) { - isTargetMultiple = false; - } else { - throw new DeploymentDescException("Invalid multiplicity value for relationshipRole for relationship '" - + rd.getName() + "'(must be One or Many)"); - } - if (role.getMultiplicity().equalsIgnoreCase("Many")) { - isSourceMultiple = true; - } else if (role.getMultiplicity().equalsIgnoreCase("One")) { - isSourceMultiple = false; - } else { - throw new DeploymentDescException("Invalid multiplicity value for relationshipRole for relationship '" - + rd.getName() + "'(must be One or Many)"); - } - - // store cmr field if any - if (role.getCmrField() != null) { - setCmrFieldName(role.getCmrField().getCmrFieldName()); - if (isTargetMultiple) { - String type = role.getCmrField().getCmrFieldType(); - if (type == null) { - throw new DeploymentDescException( - "You must specify a cmr-field-type in case where the relation is 'Many' in the cmr-field '" - + cmrFieldName + "' of bean " + ejbSourceName); - } - setCmrFieldType(type); - } - } - - // store the JonasEjbRelationshipRole - jSourceRsRole = jrole; - } - - /** - * Fills the mapping information of this relation-ship role with the values - * defined in jonas DD. - * @throws DeploymentDescException in error case. - */ - protected void fillMappingInfo() throws DeploymentDescException { - if (logger.isLoggable(BasicLevel.DEBUG)) { - logger.log(BasicLevel.DEBUG, "" + (jSourceRsRole != null) + " for " + rsrName); - } - if (jSourceRsRole != null) { - for (Iterator i = jSourceRsRole.getForeignKeyJdbcMappingList().iterator(); i.hasNext();) { - ForeignKeyJdbcMapping fkMapping = (ForeignKeyJdbcMapping) i.next(); - String fkc = fkMapping.getForeignKeyJdbcName(); - String kc = null; - if (fkMapping.getKeyJdbcName() != null) { - kc = fkMapping.getKeyJdbcName(); - } - if (kc == null) { - // if the target bean has a primary-key-field, this value - // may not be defined - // in this case, this is the column name of the - // primary-key-field - if (targetEntityCmp2Desc.hasSimplePkField()) { - kc = ((FieldJdbcDesc) targetEntityCmp2Desc.getSimplePkField()).getJdbcFieldName(); - } else { - // error - throw new DeploymentDescException( - "key-jdbc-name must be provided for foreign-key-jdbc-mapping " + fkc - + " of relation-ship role " + rsrName + "of relation " - + ejbRelationDesc.getName()); - } - } - if (logger.isLoggable(BasicLevel.DEBUG)) { - logger.log(BasicLevel.DEBUG, "explicit fk mapping = " + fkc + " for " + kc); - } - foreignKeyMap.put(kc, fkc); - } - hasJdbcMapping = true; - } - } - - /** - * Fills the mapping information of this relation-ship role with default - * values if the mapping information is not already initialized. - */ - protected void fillMappingInfoWithDefault() { - if (logger.isLoggable(BasicLevel.DEBUG)) { - logger.log(BasicLevel.DEBUG, "" + hasJdbcMapping); - } - if (!hasJdbcMapping) { - if (targetEntityCmp2Desc.hasSimplePkField()) { - // target entity has a simple pk (primary-key-field) - String fn = targetEntityCmp2Desc.getSimplePkFieldName(); - FieldJdbcDesc fd = (FieldJdbcDesc) targetEntityCmp2Desc.getCmpFieldDesc(fn); - String kc = fd.getJdbcFieldName(); - String fkc = targetEntityCmp2Desc.getAbstractSchemaName() + "_" + kc; - if (logger.isLoggable(BasicLevel.DEBUG)) { - logger.log(BasicLevel.DEBUG, "default fk mapping = " + fkc + " for " + kc); - } - foreignKeyMap.put(kc, fkc); - } else { - // target entity has a composite pk - for (Iterator i = targetEntityCmp2Desc.getCmpFieldDescIterator(); i.hasNext();) { - FieldJdbcDesc fd = (FieldJdbcDesc) i.next(); - String kc = fd.getJdbcFieldName(); - String fkc = targetEntityCmp2Desc.getAbstractSchemaName() + "_" + kc; - if (logger.isLoggable(BasicLevel.DEBUG)) { - logger.log(BasicLevel.DEBUG, "default fk mapping = " + fkc + " for " + kc); - } - foreignKeyMap.put(kc, fkc); - } - } - hasJdbcMapping = true; - } - } - - /** - * return the name of this relationship role. - * @return the String name of this relationship role. - */ - public String getName() { - return rsrName; - } - - protected void setCmrFieldName(String name) throws DeploymentDescException { - cmrFieldName = name; - } - - protected void setCmrFieldType(String type) throws DeploymentDescException { - try { - cmrFieldType = Class.forName(type); - } catch (ClassNotFoundException e) { - throw new DeploymentDescException("class name not found for cmr-field " + cmrFieldName + " of bean " - + ejbSourceName, e); - } - if (!(cmrFieldType.getName().equals("java.util.Collection") || cmrFieldType.getName().equals("java.util.Set"))) { - throw new DeploymentDescException("value of cmr-field-type " + cmrFieldName + " of bean " + ejbSourceName - + " should be java.util.Set or java.util.Collection if set"); - } - } - - /** - * mark the cmr as added by JOnAS - */ - protected void setIsJOnASCmrField() { - isJOnASCMR = true; - } - - /** - * set the source bean of this relation-ship role. - * @param led EntityCmp2Desc for the source bean of this relation-ship role. - */ - protected void setSourceBean(EntityCmp2Desc led) { - sourceEntityCmp2Desc = led; - } - - /** - * set the target bean of this relation-ship role. - * @param led EntityCmp2Desc for the target bean of this relation-ship role. - */ - protected void setTargetBean(EntityCmp2Desc led) { - targetEntityCmp2Desc = led; - if (cmrFieldType == null) { - cmrFieldType = led.getLocalClass(); - } - } - - /** - * get the parent ejb relation of this relation-ship-role. - * @return the EjbRelationDesc of this relation-ship-role. - */ - public EjbRelationDesc getRelation() { - return ejbRelationDesc; - } - - /** - * get the opposite relation-ship-role of this relation-ship-role. - * @return the opposite EjbRelationshipRoleDesc of this relation-ship-role. - */ - public EjbRelationshipRoleDesc getOppositeRelationshipRole() { - EjbRelationshipRoleDesc res = ejbRelationDesc.getRelationshipRole1(); - if (res == this) { - return ejbRelationDesc.getRelationshipRole2(); - } else { - return res; - } - } - - /** - * Get the name of the ejb involved in this relation-ship-role. This is the - * source bean name of this relation. - * @return the String ejb-name of the source bean. - */ - public String getSourceBeanName() { - return ejbSourceName; - } - - /** - * Get the ejb involved in this relation-ship-role. this is the source bean - * of this relation. - * @return the EntityCmp2Desc of the source bean. - */ - public EntityCmp2Desc getSourceBean() { - return sourceEntityCmp2Desc; - } - - /** - * It retrieves the EntityCmp2Desc which is linked to the EntityCmp2Desc - * associated to this EjbRelationshipRoleDesc. This is the target bean of - * this relationship role - * @return the EntityCmp2Desc of the target bean. - */ - public EntityCmp2Desc getTargetBean() { - return targetEntityCmp2Desc; - } - - /** - * Get state of opposite relationship-role is relation multiple. - * @return true if the opposite relationship-role is relation multiple. - */ - public boolean isSourceMultiple() { - return isSourceMultiple; - } - - /** - * Get state of this relationship-role is relation multiple. (get state of - * field is relation multiple). - * @return true if the relationship-role is relation multiple. - */ - public boolean isTargetMultiple() { - return isTargetMultiple; - } - - /** - * @return true if this bean must cascade delete the other bean in this - * relation. - */ - public boolean mustCascade() { - return mustCascade; - } - - /** - * It returns a boolean value which indicates if the cmr has been added by - * JOnAS (true) or if the user has specified a cmr field in the descriptor. - * A CMR field is be added to manage the coherence of the relation OXu - * @return true if the CMR field is not a bean's programmer CMR field. - */ - public boolean isJOnASCmrField() { - return isJOnASCMR; - } - - /** - * It retrieves true if the EntityCmp2Desc associated to this - * EjbRelationshipRoleDesc has a cmr field to the linked EntityCmp2Desc - * @return true if the relation-ship-role has a CMR field. - */ - // TODO: is this method really needed (return always true??) - public boolean hasCmrField() { - return cmrFieldName != null; - } - - /** - * get the name of the cmr-field. - * @return the String name of the cmr-field. - */ - public String getCmrFieldName() { - return cmrFieldName; - } - - /** - * get the type of the cmr-field when set in the deployment descriptor. - * @return Collection or Set for multiple rel. and null for non multiple - * rel. - */ - public Class getCmrFieldType() { - return cmrFieldType; - } - - /** - * This method depends on static values OOB,OOU,... defined upper ! - * @return the type of the relation: OO-u, OO-b, OM-u, .... - */ - public byte getRelationType() { - if (relationType == -1) { - relationType = OOU; - EjbRelationshipRoleDesc rsr2 = getOppositeRelationshipRole(); - if (rsr2.hasCmrField() && hasCmrField()) { - relationType += OOB; - } - if (isTargetMultiple()) { - relationType += OMU; - } - if (rsr2.isTargetMultiple()) { - relationType += MOU; - } - } - return relationType; - } - - /** - * Is a jdbc mapping is defined for this relationship role ? - * @return true if a jdbc mapping is defined for this relationship role. - */ - public boolean hasJdbcMapping() { - return hasJdbcMapping; - } - - /** - * In M-N relationships, only 1 role will write data on DB. - * @return true if role will not write MN relations on database - */ - public boolean isSlave() { - return isSlave; - } - - /** - * @param jdbcFieldName a primary key column name of the table associated to - * the target bean. - * @return the foreign key column name associated to the given primary key - * column name. - */ - public String getForeignKeyJdbcName(String jdbcFieldName) { - return (String) foreignKeyMap.get(jdbcFieldName); - } - - /** - * String representation of the object for test purpose - * @return String representation of this object - */ - public String toString() { - StringBuffer ret = new StringBuffer(); - ret.append("\ngetName() = " + getName()); - ret.append("\ngetRelation().getName() = " + getRelation().getName()); - ret.append("\ngetOppositeRelationshipRole().getName() = " + getOppositeRelationshipRole().getName()); - ret.append("\ngetSourceBeanName() = " + getSourceBeanName()); - ret.append("\ngetTargetBean().getName() = " + getTargetBean().getEjbName()); - ret.append("\nisSourceMultiple() = " + isSourceMultiple()); - ret.append("\nisTargetMultiple() = " + isTargetMultiple()); - ret.append("\nmustCascade() = " + mustCascade()); - ret.append("\nisJOnASCmrField() = " + isJOnASCmrField()); - ret.append("\ngetCmrFieldName() = " + getCmrFieldName()); - ret.append("\ngetCmrFieldType() = " + getCmrFieldType()); - ret.append("\ngetRelationType() = " + getRelationType()); - if (hasJdbcMapping()) { - for (Iterator i = foreignKeyMap.keySet().iterator(); i.hasNext();) { - String key = (String) i.next(); - String fkey = (String) foreignKeyMap.get(key); - ret.append("\ngetForeignKeyJdbcName(" + key + ")=" + fkey); - } - } - return ret.toString(); - } - -} \ No newline at end of file diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EjbjarDTDs.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EjbjarDTDs.java deleted file mode 100644 index 1136615d5829d848a9efb852a67824d15b898a2e..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EjbjarDTDs.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Philippe Coq - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.ejb; - - -import org.ow2.jonas.deployment.common.CommonsDTDs; -import org.ow2.jonas.deployment.common.util.ResourceHelper; - -/** - * This class defines the declarations of DTDs for ejbjar.xml. - * @author Philippe Coq - */ -public class EjbjarDTDs extends CommonsDTDs { - - /** - * Package name. - */ - private static final String PACKAGE = ResourceHelper.getResourcePackage(EjbjarDTDs.class); - - /** - * List of ejb-jar dtds. - */ - private static final String[] EJBJAR_DTDS = new String[] { - PACKAGE + "ejb-jar_1_1.dtd", - PACKAGE + "ejb-jar_2_0.dtd" - }; - - /** - * List of jonas-ejb-jar publicId. - */ - private static final String[] EJBJAR_DTDS_PUBLIC_ID = new String[] { - "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN", - "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN", - }; - - - - - /** - * Build a new object for web.xml DTDs handling. - */ - public EjbjarDTDs() { - super(); - addMapping(EJBJAR_DTDS, EJBJAR_DTDS_PUBLIC_ID); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EjbjarSchemas.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EjbjarSchemas.java deleted file mode 100644 index 9b72a9b0d1ce6c6af32a2b751c8c23428ef0e383..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EjbjarSchemas.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2011 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.ejb; - -import org.ow2.jonas.deployment.common.CommonsSchemas; -import org.ow2.jonas.deployment.common.util.ResourceHelper; - -/** - * This class defines the declarations of Schemas for ejb-jar.xml. - * @author Philippe Coq - */ -public class EjbjarSchemas extends CommonsSchemas { - - /** - * Package name. - */ - private static final String PACKAGE = ResourceHelper.getResourcePackage(EjbjarSchemas.class); - - /** - * List of schemas used for ejb-jar.xml. - */ - protected static final String[] EJBJAR_SCHEMAS = new String[] { - PACKAGE + "ejb-jar_2_1.xsd", - PACKAGE + "ejb-jar_3_0.xsd", - PACKAGE + "ejb-jar_3_1.xsd" - }; - - - /** - * Build a new object for Schemas handling. - */ - public EjbjarSchemas() { - super(); - addSchemas(EJBJAR_SCHEMAS); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EntityBmpDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EntityBmpDesc.java deleted file mode 100644 index d9a8ba5913f5a4e2b8d22c0061920ce8984fbf75..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EntityBmpDesc.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.ejb; - -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.common.xml.JLinkedList; -import org.ow2.jonas.deployment.ejb.xml.AssemblyDescriptor; -import org.ow2.jonas.deployment.ejb.xml.Entity; -import org.ow2.jonas.deployment.ejb.xml.JonasEntity; - - -/** - * Class to hold meta-information related to an entity of type BMP. - * @author Christophe Ney [cney@batisseurs.com] : Initial developer - */ -public class EntityBmpDesc extends EntityDesc { - - /** - * constructor to be used by parent node - */ - public EntityBmpDesc(ClassLoader classLoader, Entity ent, - AssemblyDescriptor asd, JonasEntity jEnt, - JLinkedList jMDRList, String fileName) - throws DeploymentDescException { - super(classLoader, ent, asd, jEnt, jMDRList, fileName); - } - -} - diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EntityCmp1Desc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EntityCmp1Desc.java deleted file mode 100644 index 647b20ba7e104d129f6054478ac6afe49fd83f1d..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EntityCmp1Desc.java +++ /dev/null @@ -1,148 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.ejb; - -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.util.Iterator; - -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.common.xml.JLinkedList; -import org.ow2.jonas.deployment.ejb.xml.AssemblyDescriptor; -import org.ow2.jonas.deployment.ejb.xml.Entity; -import org.ow2.jonas.deployment.ejb.xml.JonasEntity; - - -/** - * Class to hold meta-information related to an entity of type CMP version 1.x. - * Created on Jun 24, 2002 - * @author Christophe Ney [cney@batisseurs.com] : Initial developer - * @author Helene Joanin - */ -public class EntityCmp1Desc extends EntityCmpDesc { - - protected Method isModifiedMethod = null; - - /** - * constructor to be used by parent node - */ - public EntityCmp1Desc(ClassLoader classLoader, Entity ent, - AssemblyDescriptor asd, JonasEntity jEnt, - JLinkedList jMDRList, String fileName) - throws DeploymentDescException { - - super(classLoader, ent, asd, jEnt, jMDRList, fileName); - - // check if persistent fields map to fields - for (Iterator i = fieldDesc.keySet().iterator();i.hasNext();) { - String fn = (String)i.next(); - // check for valid field name - try { - Field f = ejbClass.getField(fn); - ((FieldDesc)(fieldDesc.get(fn))).setFieldType(f.getType()); - } catch (NoSuchFieldException e) { - throw new DeploymentDescException("Invalid field name "+fn+" in field-name in bean "+this.ejbName,e); - } catch (SecurityException e) { - throw new DeploymentDescException("Cannot use java reflexion on "+this.ejbClass.getName()); - } - } - - // isModifiedMethod - if (jEnt.getIsModifiedMethodName() != null) { - String mName = jEnt.getIsModifiedMethodName(); - try { - isModifiedMethod = this.ejbClass.getMethod(mName, new Class[0]); - } catch (NoSuchMethodException e) { - isModifiedMethod = null; - throw new DeploymentDescException(mName + " is not a method of " + this.ejbClass.getName()); - } catch (SecurityException e) { - throw new DeploymentDescException("Cannot use java reflexion on " + this.ejbClass.getName()); - } - } - if (isUndefinedPK()) { - FieldDesc fd = this.newFieldDescInstance(); - fd.setName("JONASAUTOPKFIELD"); - fd.setPrimaryKey(true); - fieldDesc.put("JONASAUTOPKFIELD", fd); - ((FieldDesc) (fieldDesc.get("JONASAUTOPKFIELD"))).setFieldType(java.lang.Integer.class); - ((FieldJdbcDesc) (fieldDesc.get("JONASAUTOPKFIELD"))).setJdbcFieldName(this.getJdbcAutomaticPkFieldName()); - } - } - - /** - * Get descriptor for a given field - * @param field of the bean class - * @return Descriptor for the given field - */ - public FieldDesc getCmpFieldDesc(Field field) { - FieldDesc ret = (FieldDesc) fieldDesc.get(field.getName()); - if (ret == null) - throw new Error("Field " + field.getName() + " is not a cmp field of class " + this.ejbClass.getName()); - return ret; - } - - - /** - * Get the 'isModified' method name implemented in the bean class. - * (This information is JOnAS specific). - * @return Name of the isModified method - */ - public Method getIsModifiedMethod(){ - if (isModifiedMethod == null) - throw new Error("No isModified method defined for bean " + this.ejbName); - return isModifiedMethod; - } - - /** - * Assessor for existence of a isModified method - * @return true of isModified method exist for the bean - */ - public boolean hasIsModifiedMethod() { - return isModifiedMethod != null; - } - - /** - * Assessor for a CMP field - * @param field for which a descriptor is to be returned - * @return Descriptor for the given field - */ - public boolean hasCmpFieldDesc(Field field) { - return fieldDesc.containsKey(field.getName()); - } - - /** - * String representation of the object for test purpose - * @return String representation of this object - */ - public String toString() { - StringBuffer ret = new StringBuffer(); - ret.append(super.toString()); - if (hasIsModifiedMethod()) - ret.append("getIsModifiedMethod()=" + getIsModifiedMethod().toString()); - return ret.toString(); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EntityCmp2Desc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EntityCmp2Desc.java deleted file mode 100644 index 10f8e10addee8634f6010e74d0e5737a702e000c..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EntityCmp2Desc.java +++ /dev/null @@ -1,380 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.deployment.ejb; - -import java.util.ArrayList; -import java.util.Iterator; -import java.lang.reflect.Field; -import java.lang.reflect.Method; - -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.common.xml.JLinkedList; -import org.ow2.jonas.deployment.ejb.ejbql.ParseException; -import org.ow2.jonas.deployment.ejb.xml.AssemblyDescriptor; -import org.ow2.jonas.deployment.ejb.xml.Entity; -import org.ow2.jonas.deployment.ejb.xml.JonasEntity; -import org.ow2.jonas.deployment.ejb.xml.Query; -import org.ow2.jonas.lib.util.BeanNaming; - - - - - -/** - * Class to hold meta-information related to an entity of type CMP version 2. - * Created on Jun 24, 2002 - * @author Christophe Ney [cney@batisseurs.com] : Initial developper - * @author Helene Joanin : code cleanup on May 2003 - * @author Helene Joanin : complement for legacy first version on May 2003 - */ -public abstract class EntityCmp2Desc extends EntityCmpDesc { - - private ArrayList ejbRelationshipRoleDesc = new ArrayList(); - protected String abstractSchemaName; - - private static final String JORM_PACKAGE = "jorm"; - - private String jormClassName = null; - private String jormFQClassName = null; - private String jormAccessorClassName = null; - private String jormPKClassName = null; - private String jormPNameGetterClassName = null; - private String jormBinderClassName = null; - - - protected String factoryClassName = null; - protected DeploymentDescEjb2 dc2d = null; - - /** - * constructor: called when the DeploymentDescriptor is read. - * Currently, called by both GenIC and createContainer. - */ - public EntityCmp2Desc(ClassLoader classLoader, - Entity ent, - AssemblyDescriptor asd, - JonasEntity jEnt, - DeploymentDescEjb2 dc2d, - JLinkedList jMDRList, - String fileName) - throws DeploymentDescException { - - super(classLoader, ent, asd, jEnt, jMDRList, fileName); - this.dc2d = dc2d; - - // An abstract schema name is required - if ((ent.getAbstractSchemaName() == null) - || (ent.getAbstractSchemaName().length() == 0)) { - throw new DeploymentDescException("abstract-schema-name must be provided for bean " + this.ejbName); - } - abstractSchemaName = ent.getAbstractSchemaName(); - - // check if persistent fields exist - if (fieldDesc.isEmpty()) { - throw new DeploymentDescException("No cmp-field defined in bean " + this.ejbName); - } - // check if persistent fields map to getter and setter - for (Iterator i = fieldDesc.keySet().iterator(); i.hasNext();) { - String fn = (String) i.next(); - - // field should not be defined - try { - Field f = ejbClass.getField(fn); - throw new DeploymentDescException("In cmp-version 2.x, field-name " + fn + " should not be defined in bean " + this.ejbName); - } catch (NoSuchFieldException e) { - // this is what we expect: nothing to do - } catch (SecurityException e) { - throw new DeploymentDescException("Cannot use java reflexion on " + this.ejbClass.getName()); - } - - try { - Method getter = null; - try { - getter = ejbClass.getMethod(FieldDesc.getGetterName(fn), (Class[]) null); - ((FieldDesc) (fieldDesc.get(fn))).setFieldType(getter.getReturnType()); - } catch (NoSuchMethodException e) { - throw new DeploymentDescException("Getter method not found for field-name " + fn + " in bean " + this.ejbName, e); - } - try { - ejbClass.getMethod(FieldDesc.getSetterName(fn), new Class[]{getter.getReturnType()}); - } catch (NoSuchMethodException e) { - throw new DeploymentDescException("Setter method not found for field-name " + fn + " in bean " + this.ejbName, e); - } - } catch (SecurityException e) { - throw new DeploymentDescException("Cannot use java reflexion on " + this.ejbClass.getName()); - } - } - - // isModifiedMethod deprecated for CMP 2.x - if (jEnt.getIsModifiedMethodName() != null) { - throw new DeploymentDescException("use of is-modified-method-name deprecated for CMP 2.x"); - } - - // EJB-QL query - if (ent.getQueryList() != null) { - for (Iterator i = ent.getQueryList().iterator(); i.hasNext();) { - Query q = (Query) i.next(); - boolean foundMatch = false; - for (Iterator j = getMethodDescIterator(); j.hasNext();) { - MethodDesc methd = (MethodDesc) j.next(); - String methName = q.getQueryMethod().getMethodName(); - if (methd.matchPattern(null, methName, q.getQueryMethod().getMethodParams()) - != MethodDesc.APPLY_TO_NOTHING) { - foundMatch = true; - String query = q.getEjbQl(); - if (!(methd instanceof MethodCmp2Desc)) { - throw new DeploymentDescException("ejbql query " + query + " can't apply to method " - + methName + " in bean " + ejbName); - } - try { - ((MethodCmp2Desc) methd).setQuery(query); - } catch (ParseException e) { - throw new DeploymentDescException("Invalid ejbql syntax for bean " + ejbName + ":\n" - + e.getMessage(query)); - } - if (q.getResultTypeMapping() != null) { - ((MethodCmp2Desc) methd).setResultTypeMapping(q.getResultTypeMapping()); - } - } - } - if (!foundMatch) { - throw new DeploymentDescException("invalid query-method definition for bean " + ejbName + "\nno such method as " - + MethodCmp2Desc.queryMethodElementToString(q.getQueryMethod()) + "\ncheck method name and method parameters"); - } - } - } - // check that all finder/selecter methods but findByPrimaryKey have a non null query - for (Iterator j = getMethodDescIterator(); j.hasNext();) { - MethodDesc md = (MethodDesc) j.next(); - if ((md.isFinder() || md.isEjbSelect()) && !md.isFindByPrimaryKey()) { - if (((MethodCmp2Desc) md).getQuery() == null) { - throw new DeploymentDescException("query not defined for method " + MethodDesc.toString(md.getMethod()) - + " of bean" + ejbName); - - } - } - } - if (isUndefinedPK()) { - FieldDesc fd = this.newFieldDescInstance(); - fd.setName("JONASAUTOPKFIELD"); - fd.setPrimaryKey(true); - fieldDesc.put("JONASAUTOPKFIELD", fd); - ((FieldDesc) (fieldDesc.get("JONASAUTOPKFIELD"))).setFieldType(java.lang.Integer.class); - ((FieldJdbcDesc) (fieldDesc.get("JONASAUTOPKFIELD"))).setJdbcFieldName(this.getJdbcAutomaticPkFieldName()); - } - } - - public DeploymentDescEjb2 getDeploymentDescEjb2() { - return dc2d; - } - - /** - * getter for field abstractSchemaName - */ - public String getAbstractSchemaName() { - return abstractSchemaName; - } - - /** - * Get the Jorm Class name in JOrm Meta Info - * It is built from the Abstract Shema Name. - * @return the Jorm Class Name - */ - private String getJormCName() { - if (jormClassName == null) { - jormClassName = BeanNaming.firstToUpperCase(abstractSchemaName); - } - return jormClassName; - } - - /** - * Get the Jorm Fully Qualified Class name in JOrm Meta Info - * It is built from the Abstract Shema Name. - * @return the Jorm Class Name - */ - public String getJormClassName() { - if (jormFQClassName == null) { - jormFQClassName = BeanNaming.getClassName(JORM_PACKAGE, getJormCName()); - } - return jormFQClassName; - } - - /** - * Add meta-info of a relationship in which the bean is involved - */ - public void addEjbRelationshipRoleDesc(EjbRelationshipRoleDesc ersrd) { - ejbRelationshipRoleDesc.add(ersrd); - } - - /** - * Get Iterator on meta-info for all relationships for which the bean - * is involved in. - */ - public Iterator getEjbRelationshipRoleDescIterator() { - return ejbRelationshipRoleDesc.iterator(); - } - - /** - * Get the EjbRelationshipRoleDesc corresponding to the given cmr field name. - * Return null if it doesn't exist. - */ - public EjbRelationshipRoleDesc getEjbRelationshipRoleDesc(String cmr) { - for (Iterator i = ejbRelationshipRoleDesc.iterator(); i.hasNext();) { - EjbRelationshipRoleDesc rsr = (EjbRelationshipRoleDesc) i.next(); - if (rsr.hasCmrField() && cmr.equals(rsr.getCmrFieldName())) { - return rsr; - } - } - return null; - } - - /** - * Factory method for MethodDesc. - * Only method with EJBQL queries are of type MethodCmp2Desc - */ - protected MethodDesc newMethodDescInstance(Method meth, Class classDef, int index) { - return new MethodCmp2Desc(this, meth, classDef, index); - } - - /** - * It retrieves the class name of the generated Jorm accessor interface. - * Used in the templates - * @return the fully qualified class name - */ - public String getJormAccessorClassName() { - if (jormAccessorClassName == null) { - jormAccessorClassName = BeanNaming.getClassName(JORM_PACKAGE, getJormCName() + "Accessor"); - } - return jormAccessorClassName; - } - - /** - * It retrieves the class name of the generated Jorm binding. - * Used by the JormFactory - * @return the fully qualified class name - */ - public String getJormBindingClassName() { - return BeanNaming.getClassName(JORM_PACKAGE, getJormCName() + "Binding"); - } - - /** - * Return the class name of the generated Jorm state class. - * @return the fully qualified class name - */ - public String getJormStateClassName() { - return BeanNaming.getClassName(JORM_PACKAGE, getJormCName() + "State"); - } - - /** - * It retrieves the class name of the generated Jorm mapping. - * Used in the JContainer to instanciate the JEntityFactory - * @return the fully qualified class name - */ - public String getFactoryClassName() { - return BeanNaming.getClassName(JORM_PACKAGE, "rdb." + getJormCName() + "Mapping"); - } - - /** - * Retrieves the Jorm PK Class, in case of composite PK - * Used by Jorm to generate PNameGetter and Binder classes - * @return the fully qualified class name - */ - public String getJormPKClassName() { - if (! hasPrimaryKeyField() && jormPKClassName == null) { - jormPKClassName = BeanNaming.getClassName(JORM_PACKAGE, - BeanNaming.getBaseName(getPrimaryKeyClass().getName())); - } - return jormPKClassName; - } - - /** - * It retrieves the class name of the generated Jorm PNameGetter interface. - * Used in the templates to generate CMP2 classes. - * @return the fully qualified class name - */ - public String getJormPNameGetterClassName() { - if (! hasPrimaryKeyField() && jormPNameGetterClassName == null) { - jormPNameGetterClassName = getJormPKClassName() + "PNG"; - } - return jormPNameGetterClassName; - } - - /** - * It retrieves the class name of the generated Jorm Binder. - * Used in the Jorm Factory - * @return the fully qualified class name - */ - public String getJormBinderClassName() { - if (jormBinderClassName == null) { - if (hasPrimaryKeyField()) { - jormBinderClassName = "org.objectweb.jorm.facility.naming.basidir.BasidBinder"; - } else { - jormBinderClassName = getJormPKClassName() + "Binder"; - } - } - return jormBinderClassName; - } - - /** - * @return true if at least one relation - */ - public boolean needJormCoherenceHelper() { - return ejbRelationshipRoleDesc.iterator().hasNext(); - } - - public String getJormCoherenceHelperItfName() { - return "JOnAS" + ejbName + "CoherenceHelper"; - } - - public String getJormCoherenceHelperPackageName() { - return BeanNaming.getPackageName(getFullDerivedBeanName()); - } - - public String getJormCoherenceHelperFQItfName() { - String pn = getJormCoherenceHelperPackageName(); - return (pn != null && pn.length() > 0 - ? pn + "." + getJormCoherenceHelperItfName() - : getJormCoherenceHelperItfName()); - } - - /** - * String representation of the object for test and debug purpose - * @return String representation of this object - */ - public String toString() { - StringBuffer ret = new StringBuffer(); - ret.append(super.toString()); - for (Iterator i = ejbRelationshipRoleDesc.iterator(); i.hasNext(); ) { - ret.append("\nejbRelationshipRoleDesc[]=" + i.next()); - } - ret.append("\ngetAbstractSchemaName()=" + getAbstractSchemaName()); - ret.append("\ngetJormAccessorClassName() = " + getJormAccessorClassName()); - ret.append("\nneedJormCoherenceHelper() = " + needJormCoherenceHelper()); - return ret.toString(); - } - -} - diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EntityCmpDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EntityCmpDesc.java deleted file mode 100644 index 35f19b4b3e79a9b95955bb5d452d6b3a754ec16d..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EntityCmpDesc.java +++ /dev/null @@ -1,237 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.ejb; - -import java.lang.reflect.Field; -import java.lang.reflect.Modifier; -import java.util.HashMap; -import java.util.Iterator; - -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.common.xml.JLinkedList; -import org.ow2.jonas.deployment.ejb.xml.AssemblyDescriptor; -import org.ow2.jonas.deployment.ejb.xml.CmpField; -import org.ow2.jonas.deployment.ejb.xml.Entity; -import org.ow2.jonas.deployment.ejb.xml.JdbcMapping; -import org.ow2.jonas.deployment.ejb.xml.JonasEntity; -import org.ow2.jonas.lib.util.BeanNaming; - - - -/** - * Base class to hold meta-information related to an entity of type CMP. - * @author Christophe Ney [cney@batisseurs.com] : Initial developer - * @author Helene Joanin - * @author Jerome Camilleri : automatic PK - */ -public abstract class EntityCmpDesc extends EntityDesc { - - protected HashMap fieldDesc = new HashMap(); - protected String primaryKeyField = null; - protected String jdbcAutomaticPkFieldName = null; - - /** - * constructor to be used by parent node. - * @param classLoader class loader to use to laod bean's classes - * @param ent entity in the standard deployment descriptor - * @param asd assembly-descriptor in the standard deployment descriptor - * @param jEnt jonas-entity in the JOnAS deployment descriptor - * @param fileName jar or directory containing ejb - * @throws DeploymentDescException in error case. - */ - public EntityCmpDesc(ClassLoader classLoader, Entity ent, - AssemblyDescriptor asd, JonasEntity jEnt, - JLinkedList jMDRList, String fileName) - throws DeploymentDescException { - - super(classLoader, ent, asd, jEnt, jMDRList, fileName); - - // field descriptors for persistent fields - for (Iterator i = ent.getCmpFieldList().iterator(); i.hasNext();) { - String fn = ((CmpField) i.next()).getFieldName(); - FieldDesc fd = this.newFieldDescInstance(); - fd.setName(fn); - fd.setPrimaryKey(false); - fieldDesc.put(fn, fd); - - } - - // jdbc pk auto field name - JdbcMapping jm = jEnt.getJdbcMapping(); - if ((jm != null) && (jm.getJdbcAutomaticPkFieldName() != null)) { - if (jm.getJdbcAutomaticPkFieldName().length() != 0) { - jdbcAutomaticPkFieldName = jm.getJdbcAutomaticPkFieldName(); - } - } - if (jdbcAutomaticPkFieldName == null) { - // Default value - jdbcAutomaticPkFieldName = "JPK_"; - } - - if (isUndefinedPK()) { // Automatic PK - // If Primary Field is not declared (auto generated key field) - primaryKeyField = "JONASAUTOPKFIELD"; - } else if (ent.getPrimkeyField() != null) { - // primary key field - primaryKeyField = ent.getPrimkeyField(); - FieldDesc fd = (FieldDesc) fieldDesc.get(primaryKeyField); - if (fd == null) { - throw new DeploymentDescException("primkey-field " + primaryKeyField + " is not listed as cmp-field in bean " + this.ejbName); - } - fd.setPrimaryKey(true); - } else { - // public fields of primary key class - Field[] pcf = primaryKeyClass.getFields(); - for (int i = 0; i < pcf.length; i++) { - if (Modifier.isPublic(pcf[i].getModifiers())) { - String pn = pcf[i].getName(); - // exclude serialVersionUID field for jdk1.2.1 on solaris and - // exclude JProbe$ for JProbe using - if (!pn.equals("serialVersionUID") && !pn.startsWith("JProbe$")) { - FieldDesc fd = (FieldDesc) fieldDesc.get(pn); - if (fd == null) { - throw new DeploymentDescException("public field " + pn + " of primkey-class is not listed as cmp-field in bean " + this.ejbName); - } - fd.setPrimaryKey(true); - } - } - } - } - String packageName = BeanDesc.GENERATED_PREFIX + BeanNaming.getPackageName(getEjbClass().getName()); - derivedBeanName = new String("JOnAS" + getIdentifier() + "Bean"); - fullDerivedBeanName = BeanNaming.getClassName(packageName, derivedBeanName); - - // automatic-pk - // used of specific tag automatic-pk is deprecated so nothing in this code was about jdbc-mapping - String primkeytype = ent.getPrimKeyClass(); - if ((jm != null) && (jm.getAutomaticPk() != null)) { - // optional parameter automatic-pk - jdbcAutomaticPk = jm.getAutomaticPk().equalsIgnoreCase("true"); - if (jdbcAutomaticPk && pkObjectType) { - // You can't use specific tag 'automatic-pk' with prim-key-type=java.lang.Object - throw new DeploymentDescException("Don't use specific tag 'automatic-pk' with prim-key-type=java.lang.Object in bean " + ent.getEjbName()); - } - } - if (pkObjectType && ent.getPrimkeyField() != null) { - throw new DeploymentDescException("'prim-key-field' must not be set if your prim-key-type was java.lang.Object in bean " + ent.getEjbName()); - } - if (this.isAutomaticPk()) { // Check if prim-key-class type is Integer or java.lang.Object - if (!(primkeytype.equalsIgnoreCase("java.lang.Integer") - || primkeytype.equalsIgnoreCase("Integer"))) { - throw new DeploymentDescException("You must used java.lang.Integer type for your auto-generate primary key field in bean " + ent.getEjbName()); - } - } - } - - /** - * Get descriptor for a given field name - * Used by GenIC - * @param fieldName Name of the field - * @return Descriptor for the given field or null - */ - public FieldDesc getCmpFieldDesc(String fieldName) { - return (FieldDesc) fieldDesc.get(fieldName); - } - - /** - * Indicate if the primary key field is only one field with a primary-key-field - * defined in the DD. - * @return true if the primary key field is only one field - * with a primary-key-field defined in the DD. - */ - public boolean hasSimplePkField() { - return primaryKeyField != null; - } - - // TODO remove this method and keep only the hasSimplePkField method - public boolean hasPrimaryKeyField() { - return hasSimplePkField(); - } - - /** - * Get the primary key field for the entity. - * @return Field for the primary key - */ - public FieldDesc getSimplePkField() { - FieldDesc fd = (FieldDesc) fieldDesc.get(getSimplePkFieldName()); - return fd; - } - - /** - * Get the primary key field name for the entity. - * @return Field for the primary key - */ - public String getSimplePkFieldName() { - if (primaryKeyField == null) { - throw new Error("No primary key field defined for bean " + this.ejbName); - } - return primaryKeyField; - } - - // TODO remove this method and keep only the getSimplePkFieldName() method - public String getPrimaryKeyFieldName() { - return getSimplePkFieldName(); - } - - /** - * Get the associated field for auto genarated pk field specify by user - * @return Name of the field where automatic pk bean is stored - */ - public String getJdbcAutomaticPkFieldName() { - return jdbcAutomaticPkFieldName; - } - - public Iterator getCmpFieldDescIterator() { - return fieldDesc.values().iterator(); - } - /** - * String representation of the object for test purpose - * @return String representation of this object - */ - public String toString() { - StringBuffer ret = new StringBuffer(); - ret.append(super.toString()); - for (Iterator i = fieldDesc.keySet().iterator(); i.hasNext();) { - String f = (String) i.next(); - FieldDesc fd = (FieldDesc) fieldDesc.get(f); - ret.append("\ngetCmpFieldDesc(" + f + ")=" + fd.getClass().getName()); - ret.append(fd.toString()); - } - if (hasPrimaryKeyField()) { - ret.append("\ngetPrimaryKeyField()=" + getPrimaryKeyFieldName()); - } - return ret.toString(); - } - - /** - * factory method for field descriptors - * @return a FieldDesc. - */ - protected FieldDesc newFieldDescInstance() { - return new FieldJdbcDesc(); - } -} - diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EntityDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EntityDesc.java deleted file mode 100644 index 423d699f37a905dc4601eac870385cc6ebf62a9c..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EntityDesc.java +++ /dev/null @@ -1,434 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.deployment.ejb; - -import java.util.Iterator; - -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.common.xml.JLinkedList; -import org.ow2.jonas.deployment.ejb.xml.AssemblyDescriptor; -import org.ow2.jonas.deployment.ejb.xml.Entity; -import org.ow2.jonas.deployment.ejb.xml.JonasEntity; -import org.ow2.jonas.lib.util.BeanNaming; - - - -import org.objectweb.util.monolog.api.BasicLevel; - - -/** - * Base class to hold meta-information related to an entity bean. - * @author Christophe Ney [cney@batisseurs.com] : Initial developer - * @author Helene Joanin - * @author Helene Joanin: take into account ejbSelect() methods. - * @author Helene Joanin: unsetting transaction attribute set to a default value. - */ -public abstract class EntityDesc extends BeanDesc { - - - /** - * remote methods for which no transaction attribute is to be set - */ - protected static final String METHODS_REMOTE_NO_TX = ",getEJBHome,getHandle,getPrimaryKey,isIdentical,"; - - /** - * home methods for which no transaction attribute is to be set - */ - protected static final String METHODS_HOME_NO_TX = ",getEJBMetaData,getHomeHandle,"; - - /** - * This field contains the class name of the factory instanciate by the - * container. - */ - protected Class primaryKeyClass; - protected boolean reentrant; - protected int passivationTimeout = 0; - protected int inactivityTimeout = 0; - protected int deadlockTimeout = 20; // default = 20 sec. - protected int readTimeout = 15 * 60; // default = 15mn. - protected int maxWaitTime = 0; // default = 0s - protected boolean shared = false; - protected boolean prefetch = false; - protected boolean hardLimit = false; - - // Field used for pk auto-generate - protected boolean jdbcAutomaticPk = false; // first implementation with specific tag into JOnAS Descriptor file - protected boolean pkObjectType = false; // second implementation with prim-key-type=java.lang.Object (cf spec ?14.1.9.3) - - // mapping cleanup policy - public static final int CLEANUP_NONE = 0; - public static final int CLEANUP_CREATE = 1; - public static final int CLEANUP_REMOVEDATA = 2; - public static final int CLEANUP_REMOVEALL = 3; - protected int cleanup = CLEANUP_CREATE; - - // lock policy - public static final int LOCK_CONTAINER_READ_UNCOMMITTED = 0; - public static final int LOCK_CONTAINER_SERIALIZED = 1; - public static final int LOCK_CONTAINER_READ_COMMITTED = 2; - public static final int LOCK_DATABASE = 3; - public static final int LOCK_READ_ONLY = 4; - public static final int LOCK_CONTAINER_READ_WRITE = 5; - public static final int LOCK_CONTAINER_SERIALIZED_TRANSACTED = 6; - protected int lockPolicy = LOCK_CONTAINER_SERIALIZED; - - /** - * constructor to be used by parent node - */ - public EntityDesc(ClassLoader classLoader, - Entity ent, - AssemblyDescriptor asd, - JonasEntity jEnt, - JLinkedList jMDRList, - String fileName) - throws DeploymentDescException { - - super(classLoader, ent, jEnt, asd, jMDRList, fileName); - - // primary Key class - try { - // Test for automatic PK - if (ent.getPrimKeyClass().equalsIgnoreCase("Object") || ent.getPrimKeyClass().equalsIgnoreCase("java.lang.Object")) { - primaryKeyClass = classLoader.loadClass("java.lang.Integer"); - pkObjectType = true; - } - else - primaryKeyClass = classLoader.loadClass(ent.getPrimKeyClass()); - } catch (ClassNotFoundException e) { - throw new DeploymentDescException("Primary Key class not found for bean " + this.ejbName, e); - } - - // passivation timeout - if (jEnt.getPassivationTimeout() != null) { - String tstr = jEnt.getPassivationTimeout(); - Integer tval = new Integer(tstr); - passivationTimeout = tval.intValue(); - } - - // inactivity timeout - if (jEnt.getInactivityTimeout() != null) { - String tstr = jEnt.getInactivityTimeout(); - Integer tval = new Integer(tstr); - inactivityTimeout = tval.intValue(); - } - - // deadlock timeout - if (jEnt.getDeadlockTimeout() != null) { - String tstr = jEnt.getDeadlockTimeout(); - Integer tval = new Integer(tstr); - deadlockTimeout = tval.intValue(); - } - - // read timeout - if (jEnt.getReadTimeout() != null) { - String tstr = jEnt.getReadTimeout(); - Integer tval = new Integer(tstr); - readTimeout = tval.intValue(); - } - - // max wait time - if (jEnt.getMaxWaitTime() != null) { - String tstr = jEnt.getMaxWaitTime(); - Integer tval = new Integer(tstr); - maxWaitTime = tval.intValue(); - } - - // reentrant - if (ent.getReentrant().equalsIgnoreCase("True")) { - reentrant = true; - } else if (ent.getReentrant().equalsIgnoreCase("False")) { - reentrant = false; - } else { - throw new DeploymentDescException("Invalid reentrant value for bean " + this.ejbName); - } - - // prefetch - if (jEnt.getPrefetch() != null) { - if (jEnt.getPrefetch().equalsIgnoreCase("True")) { - prefetch = true; - } else if (jEnt.getPrefetch().equalsIgnoreCase("False")) { - prefetch = false; - } else { - throw new DeploymentDescException("Invalid prefetch value for bean " + this.ejbName); - } - } - - // hard limit - if (jEnt.getHardLimit() != null) { - if (jEnt.getHardLimit().equalsIgnoreCase("True")) { - hardLimit = true; - } else if (jEnt.getPrefetch().equalsIgnoreCase("False")) { - hardLimit = false; - } else { - throw new DeploymentDescException("Invalid hard-limit value for bean " + this.ejbName); - } - } - - // min-pool-size - if (jEnt.getMinPoolSize() != null) { - String tstr = jEnt.getMinPoolSize(); - Integer tval = new Integer(tstr); - poolMin = tval.intValue(); - } - - // max-cache-size - if (jEnt.getMaxCacheSize() != null) { - String tstr = jEnt.getMaxCacheSize(); - Integer tval = new Integer(tstr); - cacheMax = tval.intValue(); - } - - // lock policy. - // Set default value for shared, depending on policy. - if (jEnt.getLockPolicy() != null) { - String tstr = jEnt.getLockPolicy(); - if (tstr.equals("container-serialized")) { - lockPolicy = LOCK_CONTAINER_SERIALIZED; - shared = false; - } else if (tstr.equals("container-serialized-transacted")) { - lockPolicy = LOCK_CONTAINER_SERIALIZED_TRANSACTED; - shared = false; - } else if (tstr.equals("container-read-committed")) { - lockPolicy = LOCK_CONTAINER_READ_COMMITTED; - shared = true; - } else if (tstr.equals("container-read-uncommitted")) { - lockPolicy = LOCK_CONTAINER_READ_UNCOMMITTED; - shared = false; - } else if (tstr.equals("database")) { - lockPolicy = LOCK_DATABASE; - shared = true; - } else if (tstr.equals("read-only")) { - lockPolicy = LOCK_READ_ONLY; - shared = true; - } else if (tstr.equals("container-read-write")) { - lockPolicy = LOCK_CONTAINER_READ_WRITE; - shared = false; - } else { - throw new DeploymentDescException("Invalid lock-policy value for bean " + jEnt.getEjbName()); - } - } - - // shared - if (jEnt.getShared() != null) { - if (jEnt.getShared().equalsIgnoreCase("True")) { - shared = true; - } else if (jEnt.getShared().equalsIgnoreCase("False")) { - shared = false; - } else { - throw new DeploymentDescException("Invalid shared value for bean " + this.ejbName); - } - } - - // cleanup policy. Possible values are : - // create = create table only if does not exist yet. (default) - // none = nothing is done (not implemented) - // removeall = drop table and recreate it. - // removedata = remove all data if exist, create table if does not exist. - if (jEnt.getCleanup() != null) { - String tstr = jEnt.getCleanup(); - if (tstr.equals("create")) { - cleanup = CLEANUP_CREATE; - } else if (tstr.equals("none")) { - cleanup = CLEANUP_NONE; - } else if (tstr.equals("removeall")) { - cleanup = CLEANUP_REMOVEALL; - } else if (tstr.equals("removedata")) { - cleanup = CLEANUP_REMOVEDATA; - } else { - throw new DeploymentDescException("Invalid cleanup value for bean " + jEnt.getEjbName()); - } - } - - // cache TxAttribute for ejbTimeout - for (Iterator i = getMethodDescIterator(); i.hasNext();) { - MethodDesc methd = (MethodDesc) i.next(); - if (methd.getMethod().getName().equals("ejbTimeout")) { - timerTxAttribute = methd.getTxAttribute(); - ejbTimeoutSignature = BeanNaming.getSignature(getEjbName(), methd.getMethod()); - } - } - } - - /** - * @return the cleanup policy for this bean - */ - public int getCleanupPolicy() { - return cleanup; - } - - /** - * @return the lock policy for this bean - */ - public int getLockPolicy() { - return lockPolicy; - } - - /** - * check that trans-attribute is valid for bean - */ - protected void checkTxAttribute(MethodDesc md) throws DeploymentDescException { - java.lang.reflect.Method m = md.getMethod(); - if (md.getTxAttribute() == MethodDesc.TX_NOT_SET) { - // exclude method list for home interface - if (javax.ejb.EJBHome.class.isAssignableFrom(m.getDeclaringClass()) - && (METHODS_HOME_NO_TX.indexOf("," + m.getName() + ",") != -1)) { - return; - } - // exclude method list for remote interface - if (javax.ejb.EJBObject.class.isAssignableFrom(m.getDeclaringClass()) - && (METHODS_REMOTE_NO_TX.indexOf("," + m.getName() + ",") != -1)) { - return; - } - // exclude ejbSelect methods - if (md.isEjbSelect()) { - return; - } - // trans-attribute not set ! - // trace a warning and set the tx-attribute with the default value - logger.log(BasicLevel.WARN, - "trans-attribute missing for method " - + m.toString() + " in entity bean " - + getEjbName() - + " (set to the default value " - + MethodDesc.TX_STR_DEFAULT_VALUE - + ")"); - md.setTxAttribute(MethodDesc.TX_STR_DEFAULT_VALUE); - } - } - - /** - * Get the passivation timeout value - */ - public int getPassivationTimeout() { - return passivationTimeout; - } - - /** - * Get the inactivity timeout value - */ - public int getInactivityTimeout() { - return inactivityTimeout; - } - - /** - * Get the deadlock timeout value - */ - public int getDeadlockTimeout() { - return deadlockTimeout; - } - - /** - * Get the read timeout value - */ - public int getReadTimeout() { - return readTimeout; - } - - /** - * Get the max wait time - */ - public int getMaxWaitTime() { - return maxWaitTime; - } - - /** - * Get the entity's primary key class. - * @return Class for the primary key - */ - public Class getPrimaryKeyClass() { - return primaryKeyClass; - } - - /** - * Assessor for reentrant entity bean - * @return true for reentrant entity bean - */ - public boolean isReentrant() { - return reentrant; - } - - /** - * @return true for shared entity bean - */ - public boolean isShared() { - return shared; - } - - /** - * @return true for prefetch entity bean - */ - public boolean isPrefetch() { - return prefetch; - } - - /** - * @return true for hard-limit entity bean - */ - public boolean isHardLimit() { - return hardLimit; - } - - /** - * Assessor for existence of automatic-pk element to True value - * @param field public field of the bean class - * @return true if automatic-pk element value is true else otherwise false - */ - public boolean isAutomaticPk() { - return jdbcAutomaticPk; - } - - /** - * Assessor for primary key undefined (declare like java.lang.Object type) - * @param field public field of the bean class - * @return true if primary key is undefined (java.lang.Object type) - */ - public boolean isUndefinedPK() { - return pkObjectType; - } - - /** - * String representation of the object for test purpose - * @return String representation of this object - */ - public String toString() { - StringBuffer ret = new StringBuffer(); - ret.append(super.toString()); - ret.append("\nPrimaryKeyClass() =" + getPrimaryKeyClass().toString()); - ret.append("\nReentrant() =" + isReentrant()); - ret.append("\nPassivationTimeout() =" + getPassivationTimeout()); - ret.append("\nInactivityTimeout() =" + getInactivityTimeout()); - ret.append("\nDeadlockTimeout() =" + getDeadlockTimeout()); - ret.append("\nReadTimeout() =" + getReadTimeout()); - ret.append("\nMaxWaitTime() =" + getMaxWaitTime()); - ret.append("\nShared() =" + isShared()); - ret.append("\nPoolMin() =" + getPoolMin()); - ret.append("\nCacheMax() =" + getCacheMax()); - return ret.toString(); - } - -} - diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EntityJdbcCmp1Desc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EntityJdbcCmp1Desc.java deleted file mode 100644 index 3eb012527a7126d08eb838ad97c35ec9cc68c7ec..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EntityJdbcCmp1Desc.java +++ /dev/null @@ -1,167 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.ejb; - -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.util.Iterator; - -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.common.xml.JLinkedList; -import org.ow2.jonas.deployment.ejb.xml.AssemblyDescriptor; -import org.ow2.jonas.deployment.ejb.xml.CmpFieldJdbcMapping; -import org.ow2.jonas.deployment.ejb.xml.Entity; -import org.ow2.jonas.deployment.ejb.xml.FinderMethodJdbcMapping; -import org.ow2.jonas.deployment.ejb.xml.JdbcMapping; -import org.ow2.jonas.deployment.ejb.xml.JonasEntity; -import org.ow2.jonas.deployment.ejb.xml.JonasMethod; - - -/** - * Class to hold meta-information related to an CMP v1 entity bean with jdbc data store. - * @author Christophe Ney [cney@batisseurs.com] : Initial developer - * @author Helene Joanin -*/ -// TODO : fill mapping information with defaults values (same as CMP 2) -// to accept to have optional mapping information in the jonas-ejb-jar.xml. -// TODO : Review this class, many methods are common with EntityJdbcCmp2yDesc - -public class EntityJdbcCmp1Desc extends EntityCmp1Desc { - - - String jdbcTableName; - String datasourceJndiName; - /** - * constructor: called when the DeploymentDescriptor is read. - * Currently, called by both GenIC and createContainer. - */ - public EntityJdbcCmp1Desc(ClassLoader classLoader, Entity ent, - AssemblyDescriptor asd, JonasEntity jEnt, - JLinkedList jMDRList, String fileName) - throws DeploymentDescException { - - super(classLoader, ent, asd, jEnt, jMDRList, fileName); - - // check for jdbcMapping - JdbcMapping jm = jEnt.getJdbcMapping(); - if (jm == null) { - throw new DeploymentDescException("jdbc-mapping missing for bean " + ent.getEjbName()); - } - - // populate field descriptor map with jdbc information - for (Iterator i = jm.getCmpFieldJdbcMappingList().iterator(); i.hasNext(); ) { - CmpFieldJdbcMapping cmpFieldJdbcMapping = (CmpFieldJdbcMapping) i.next(); - String fn = cmpFieldJdbcMapping.getFieldName(); - FieldDesc f = (FieldDesc) fieldDesc.get(fn); - if (f == null) { - throw new DeploymentDescException("field-name " + fn - + " listed in cmp-field-jdbc-mapping is not of cmp-field of bean " + ent.getEjbName()); - } - ((FieldJdbcDesc) f).setJdbcFieldName(cmpFieldJdbcMapping.getJdbcFieldName()); - } - // check that all cmp fields are jdbc - for (Iterator j = fieldDesc.values().iterator(); j.hasNext();) { - FieldJdbcDesc fd = (FieldJdbcDesc) j.next(); - if (fd.getJdbcFieldName() == null) { - throw new DeploymentDescException("field-name " + fd.getName() - + " is missing in cmp-field-jdbc-mapping for bean " + ent.getEjbName()); - } - } - - // populate method descriptor map with jdbc information - for (Iterator i = jm.getFinderMethodJdbcMappingList().iterator(); i.hasNext(); ) { - FinderMethodJdbcMapping fmj = ((FinderMethodJdbcMapping) i.next()); - JonasMethod m = fmj.getJonasMethod(); - for (Iterator j = getMethodDescIterator(); j.hasNext();) { - MethodJdbcCmp1Desc md = (MethodJdbcCmp1Desc) j.next(); - int matchStatus = md.matchPattern(null, m.getMethodName(), m.getMethodParams()); - md.overwriteJdbcWhereClause(fmj.getJdbcWhereClause(), matchStatus); - } - } - - // jndi name of the datasource - datasourceJndiName = jm.getJndiName(); - - // table name - jdbcTableName = jm.getJdbcTableName(); - - // optionnal parameter automatic-pk - if (jm.getAutomaticPk() != null) { - jdbcAutomaticPk = jm.getAutomaticPk().equalsIgnoreCase("true"); - } - } - - - /** - * Get the datasource jndi name - * @return String representation of the jndi name - */ - public String getDatasourceJndiName() { - return datasourceJndiName; - } - - /** - * Get jdbc specific descriptor for a given field. - * Used by GenIC - * @param field of the bean class - * @return Descriptor for the given field - */ - public FieldJdbcDesc getFieldJdbcDesc(Field field) { - return (FieldJdbcDesc) super.getCmpFieldDesc(field); - } - - - /** - * Get the associated DataBase table name in case of container persistence type. - * Used by GenIC (This information is JOnAS specific). - * @return Name of the database table where entity bean is stored - */ - public String getJdbcTableName() { - return jdbcTableName; - } - - /** - * factory method for method descriptors - */ - protected MethodDesc newMethodDescInstance(Method meth, Class classDef, int index) { - return new MethodJdbcCmp1Desc(this, meth, classDef, index); - } - - /** - * String representation of the object for test purpose - * @return String representation of this object - */ - public String toString() { - StringBuffer ret = new StringBuffer(); - ret.append(super.toString()); - ret.append("\ngetDatasourceJndiName()=" + getDatasourceJndiName()); - ret.append("\ngetJdbcTableName()=" + getJdbcTableName()); - return ret.toString(); - } - - -} - diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EntityJdbcCmp2Desc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EntityJdbcCmp2Desc.java deleted file mode 100644 index 132d6cec8198c2fd829935b23c0db1e03fe04807..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/EntityJdbcCmp2Desc.java +++ /dev/null @@ -1,157 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.deployment.ejb; - -import java.util.Iterator; - -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.common.xml.JLinkedList; -import org.ow2.jonas.deployment.ejb.xml.AssemblyDescriptor; -import org.ow2.jonas.deployment.ejb.xml.CmpFieldJdbcMapping; -import org.ow2.jonas.deployment.ejb.xml.Entity; -import org.ow2.jonas.deployment.ejb.xml.JdbcMapping; -import org.ow2.jonas.deployment.ejb.xml.JonasEntity; - -import org.ow2.jonas.deployment.ejb.xml.*; - -/** - * Class to hold meta-information related to an CMP v2 entity bean with jdbc data store. - * @author Christophe Ney [cney@batisseurs.com] : Initial developer - * @author Helene Joanin on May 2003: code cleanup - * @author Helene Joanin on May 2003: complement for legacy first version - */ - -// TODO : Review this class, many methods are common with EntityJdbcCmp1Desc - -public class EntityJdbcCmp2Desc extends EntityCmp2Desc { - - protected String dsname; - protected String jdbcTableName = null; - - /** - * constructor: called when the DeploymentDescriptor is read. - * Currently, called by both GenIC and createContainer. - */ - public EntityJdbcCmp2Desc(ClassLoader classLoader, - Entity ent, - AssemblyDescriptor asd, - JonasEntity jEnt, - DeploymentDescEjb2 dc2d, - JLinkedList jMDRList, - String fileName) - throws DeploymentDescException { - - super(classLoader, ent, asd, jEnt, dc2d, jMDRList, fileName); - - // check for jdbcMapping - JdbcMapping jm = jEnt.getJdbcMapping(); - if (jm == null) { - throw new DeploymentDescException("jdbc-mapping missing for bean " + ent.getEjbName()); - } - - // jndi name of the datasource - dsname = jm.getJndiName(); - - // jdbc table name - if (jm.getJdbcTableName() != null) { - if (jm.getJdbcTableName().length() != 0) { - jdbcTableName = jm.getJdbcTableName(); - } - } - if (jdbcTableName == null) { - // Default value - jdbcTableName = getAbstractSchemaName().toUpperCase() + "_"; - } - - // Default mapping information for cmp fields - for (Iterator i = fieldDesc.keySet().iterator();i.hasNext();) { - String fn = (String) i.next(); - ((FieldJdbcDesc)(fieldDesc.get(fn))).setJdbcFieldName(fn + "_"); - } - - // mapping information for cmp fields from jonas DD - for (Iterator i = jm.getCmpFieldJdbcMappingList().iterator();i.hasNext();) { - CmpFieldJdbcMapping fm = (CmpFieldJdbcMapping) i.next(); - String fn = fm.getFieldName(); - String cn = fm.getJdbcFieldName(); - String ct = null; - if (fm.getSqlType() != null) { - ct = fm.getSqlType(); - } - FieldJdbcDesc fdesc = (FieldJdbcDesc) fieldDesc.get(fn); - if (fdesc == null) { - throw new DeploymentDescException("field-name " + fn - + " listed in cmp-field-jdbc-mapping is not of cmp-field of bean " + ent.getEjbName()); - } - fdesc.setJdbcFieldName(cn); - if (ct != null) { - fdesc.setSqlType(ct); - } - } - // Specific mapping for primary key auto generated (type = java.lang.Object) if tag is specified - if (isUndefinedPK() && this.getJdbcAutomaticPkFieldName()!= null) { - ((FieldJdbcDesc)(fieldDesc.get("JONASAUTOPKFIELD"))).setJdbcFieldName(this.getJdbcAutomaticPkFieldName()); - } - } - - /** - * field descriptor factory method - */ - protected FieldDesc newFieldDescInstance() { - return new FieldJdbcDesc(); - } - - /** - * Get the datasource jndi name - * @return String representation of the jndi name - */ - public String getDatasourceJndiName() { - return dsname; - } - - /** - * Get the associated DataBase table name. - * @return Name of the database table where entity bean is stored - */ - public String getJdbcTableName() { - return jdbcTableName; - } - - /** - * String representation of the object for test purpose - * @return String representation of this object - */ - public String toString() { - StringBuffer ret = new StringBuffer(); - ret.append(super.toString()); - ret.append("\ngetDatasourceJndiName()=" + getDatasourceJndiName()); - ret.append("\ngetJdbcTableName()=" + getJdbcTableName()); - return ret.toString(); - } - - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ExcludeListDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ExcludeListDesc.java deleted file mode 100644 index 0922e5ad81cd25b4c2e2fbc0c6b2c13da39622a0..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ExcludeListDesc.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.ejb; - -import org.ow2.jonas.deployment.ejb.xml.ExcludeList; - -/** - * Defines a ExcludeListDesc class for the management of - * EJBMEthodPermissions in JACC - * @author Florent Benoit : Initial developer - */ -public class ExcludeListDesc extends CommonMethodDesc { - - /** - * Constructor for ExcludeListDesc - * @param excludeList excludelist which contains xml content - */ - public ExcludeListDesc(ExcludeList excludeList) { - super(excludeList.getMethodList()); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/FieldDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/FieldDesc.java deleted file mode 100644 index cc996cf90551d15ab6d361cc421241498a0efe85..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/FieldDesc.java +++ /dev/null @@ -1,111 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.deployment.ejb; - -/** - * Class to hold meta-information related to a cmp-field - * @author Christophe Ney [cney@batisseurs.com] : Initial developer - * @author Helene Joanin on May 2003: code cleanup - */ -public class FieldDesc { - - protected String fieldName = null; - protected boolean pkField = false; - protected Class fieldType = null; - - - /** - * Assessor method for primary key field - * @return true if field is a primary key - */ - public boolean isPrimaryKey() { - return pkField; - } - - /** - * Field name getter - * @return field name - */ - public String getName() { - return fieldName; - } - - /** - * field name setter - */ - protected void setName(String fieldName) { - this.fieldName = fieldName; - } - - /** - * primary key flag setter - */ - protected void setPrimaryKey(boolean pkField) { - this.pkField = pkField; - } - - /** - * field type getter - */ - public Class getFieldType() { - return fieldType; - } - - /** - * field type setter - */ - protected void setFieldType(Class fieldType) { - this.fieldType = fieldType; - } - - /** - * get the setter method name for a given field - */ - public static String getSetterName(String fieldName) { - return "set" + Character.toUpperCase(fieldName.charAt(0)) + fieldName.substring(1); - } - - /** - * get the getter method name for a given field - */ - public static String getGetterName(String fieldName) { - return "get" + Character.toUpperCase(fieldName.charAt(0)) + fieldName.substring(1); - } - - /** - * String representation of the object for test purpose - * @return String representation of this object - */ - public String toString() { - StringBuffer ret = new StringBuffer(); - ret.append("\ngetName() = " + getName()); - ret.append("\ngetFieldType() = " + getFieldType()); - ret.append("\nisPrimaryKey() = " + isPrimaryKey()); - return ret.toString(); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/FieldJdbcDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/FieldJdbcDesc.java deleted file mode 100644 index dc8536eb68ffa8d4679921ea70b42168e413e5d9..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/FieldJdbcDesc.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.deployment.ejb; - -/** - * Class to hold meta-information related to a cmp-field of a bean with jdbc based store - * @author Christophe Ney [cney@batisseurs.com] : Initial developer - * @author Helene Joanin on May 2003: code cleanup - * @author Helene Joanin on May 2003: add sqlType. - */ -// TODO : Remove this class and merge it with the FieldDesc class. - -public class FieldJdbcDesc extends FieldDesc { - - - protected String jdbcFieldName = null; - protected String sqlType = null; - - /** - * Get database field name in the table where bean is stored - * @return Name of the field in the database - */ - public String getJdbcFieldName() { - return jdbcFieldName; - } - - /** - * Jdbc field name setter. - */ - protected void setJdbcFieldName(String jdbcFieldName) { - this.jdbcFieldName = jdbcFieldName; - } - - /** - * Is the field sql-type is defined. - * @return true if the sql-type of the field is defined. - */ - public boolean hasSqlType() { - return (sqlType != null); - } - - /** - * Get field sql-type - * @return sql-type of the field in the database - */ - public String getSqlType() { - return sqlType; - } - - /** - * Field sql-type setter. - */ - protected void setSqlType(String st) { - sqlType = st; - } - - /** - * String representation of the object for test purpose - * @return String representation of this object - */ - public String toString() { - StringBuffer ret = new StringBuffer(); - ret.append(super.toString()); - ret.append("\ngetJdbcFieldName()=" + getJdbcFieldName()); - if (hasSqlType()) { - ret.append("\ngetSqlType()=" + getSqlType()); - } - return ret.toString(); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/JonasEjbjarDTDs.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/JonasEjbjarDTDs.java deleted file mode 100644 index 5b1986d97bb6609236f4de37aae34d5324a7c801..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/JonasEjbjarDTDs.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Philippe Coq - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.ejb; - - -import org.ow2.jonas.deployment.common.CommonsDTDs; -import org.ow2.jonas.deployment.common.util.ResourceHelper; - -/** - * This class defines the declarations of DTDs for jonas-ejb-jar.xml. - * @author Philippe Coq - */ -public class JonasEjbjarDTDs extends CommonsDTDs { - - /** - * Package name. - */ - private static final String PACKAGE = ResourceHelper.getResourcePackage(JonasEjbjarDTDs.class); - - /** - * List of jonas-ejb-jar dtds. - */ - private static final String[] JONAS_EJBJAR_DTDS = new String[] { - PACKAGE + "jonas-ejb-jar_2_4.dtd", - PACKAGE + "jonas-ejb-jar_2_5.dtd", - PACKAGE + "jonas-ejb-jar_3_0.dtd", - PACKAGE + "jonas-ejb-jar_3_2.dtd", - PACKAGE + "jonas-ejb-jar_3_3.dtd", - PACKAGE + "jonas-ejb-jar_3_3_1.dtd", - PACKAGE + "jonas-ejb-jar_3_3_2.dtd", - }; - - /** - * List of jonas-ejb-jar publicId. - */ - private static final String[] JONAS_EJBJAR_DTDS_PUBLIC_ID = new String[] { - "-//ObjectWeb//DTD JOnAS 2.4//EN", - "-//ObjectWeb//DTD JOnAS 2.5//EN", - "-//ObjectWeb//DTD JOnAS 3.0//EN", - "-//ObjectWeb//DTD JOnAS 3.2//EN", - "-//ObjectWeb//DTD JOnAS 3.3//EN", - "-//ObjectWeb//DTD JOnAS 3.3.1//EN", - "-//ObjectWeb//DTD JOnAS 3.3.2//EN", - }; - - - - - /** - * Build a new object for web.xml DTDs handling. - */ - public JonasEjbjarDTDs() { - super(); - addMapping(JONAS_EJBJAR_DTDS, JONAS_EJBJAR_DTDS_PUBLIC_ID); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/JonasEjbjarSchemas.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/JonasEjbjarSchemas.java deleted file mode 100644 index 7f8cef1f8bd64575d68e213038bfcd7329e99e6a..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/JonasEjbjarSchemas.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2008 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Philippe Coq - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.ejb; - -import org.ow2.jonas.deployment.common.CommonsSchemas; -import org.ow2.jonas.deployment.common.util.ResourceHelper; - -/** - * This class defines the declarations of Schemas for jonas-ejb-jar.xml. - * @author Philippe Coq - */ -public class JonasEjbjarSchemas extends CommonsSchemas { - - /** - * Package name. - */ - private static final String PACKAGE = ResourceHelper.getResourcePackage(JonasEjbjarSchemas.class); - - /** - * List of schemas used for jonas-ejb-jar.xml. - */ - private static final String[] JONAS_EJBJAR_SCHEMAS = new String[] { - PACKAGE + "jonas-ejb-jar_4_0.xsd", - PACKAGE + "jonas-ejb-jar_4_1.xsd", - PACKAGE + "jonas-ejb-jar_4_1_2.xsd", - PACKAGE + "jonas-ejb-jar_4_1_4.xsd", - PACKAGE + "jonas-ejb-jar_4_2.xsd", - PACKAGE + "jonas-ejb-jar_4_3.xsd", - PACKAGE + "jonas-ejb-jar_4_6.xsd", - PACKAGE + "jonas-ejb-jar_4_7.xsd", - PACKAGE + "jonas-ejb-jar_4_8.xsd", - PACKAGE + "jonas-ejb-jar_4_10.xsd", - PACKAGE + "jonas-ejb-jar_5_0.xsd", - PACKAGE + "jonas-ejb-jar_5_1.xsd", - PACKAGE + "jonas-ejb-jar_5_2.xsd" - }; - - - /** - * Build a new object for Schemas handling. - */ - public JonasEjbjarSchemas() { - super(); - // Required ejb schemas - addSchemas(EjbjarSchemas.EJBJAR_SCHEMAS); - addSchemas(JONAS_EJBJAR_SCHEMAS); - } - - - /** - * @return Returns the last Schema - */ - public static String getLastSchema() { - return getLastSchema(JONAS_EJBJAR_SCHEMAS, PACKAGE); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/MessageDrivenDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/MessageDrivenDesc.java deleted file mode 100644 index 9e195bd122b5b4f8a6ff0edbe122b1bfa649184a..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/MessageDrivenDesc.java +++ /dev/null @@ -1,467 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.ejb; - -import java.util.Iterator; -import java.util.List; -import java.util.ListIterator; - -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.common.xml.JLinkedList; -import org.ow2.jonas.deployment.ejb.xml.ActivationConfig; -import org.ow2.jonas.deployment.ejb.xml.ActivationConfigProperty; -import org.ow2.jonas.deployment.ejb.xml.AssemblyDescriptor; -import org.ow2.jonas.deployment.ejb.xml.JonasMessageDriven; -import org.ow2.jonas.deployment.ejb.xml.MessageDriven; -import org.ow2.jonas.deployment.ejb.xml.MessageDrivenDestination; -import org.ow2.jonas.lib.util.BeanNaming; - - - - - -import org.objectweb.util.monolog.api.BasicLevel; - -/** - * Class to hold meta-information related to a message driven bean - * - * @author Christophe Ney [cney@batisseurs.com] : Initial developer - * @author Helene Joanin - */ -public class MessageDrivenDesc extends BeanDesc { - - public final static int AUTO_ACKNOWLEDGE = 1; - public final static int DUPS_OK_ACKNOWLEDGE = 2; - protected static final String[] ACKMODE = {null, "AUTO_ACKNOWLEDGE", - "DUPS_OK_ACKNOWLEDGE"}; - - public final static int SUBS_DURABLE = 1; - public final static int SUBS_NON_DURABLE = 2; - protected static final String[] SUBS_DURABILITY = {null, - "SUBSCRIPTION_DURABLE", "SUBSCRIPTION_NON_DURABLE"}; - - public final static int DEFAULT_MAX_MESSAGES = 1; - - protected String selector = null; - protected int acknowledgeMode; - protected int subscriptionDurability = SUBS_NON_DURABLE; - protected Class destinationType = null; - protected int txAttribute = MethodDesc.TX_NOT_SET; // for onMessage method - protected boolean isTopicDestination = false; - protected int transactionType; - protected String destinationJndiName = null; - protected String destinationLink = null; - - // Used with JMS Rars - protected String destination = null; - - protected ActivationConfigDesc mdActivationConfigDesc = null; - - protected ActivationConfigDesc mdJonasActivationConfigDesc = null; - - /** - * package protected constructor used by API - */ - MessageDrivenDesc(ClassLoader classLoader, MessageDriven md, - AssemblyDescriptor asd, JonasMessageDriven jMd, - JLinkedList jMDRList, String fileName) - throws DeploymentDescException { - - super(classLoader, md, jMd, asd, jMDRList, fileName); - mdActivationConfigDesc = new ActivationConfigDesc(md.getActivationConfig()); - mdJonasActivationConfigDesc = new ActivationConfigDesc(jMd.getActivationConfig()); - - // min-pool-size - if (jMd.getMinPoolSize() != null) { - String tstr = jMd.getMinPoolSize(); - Integer tval = new Integer(tstr); - poolMin = tval.intValue(); - } - - // max-cache-size - if (jMd.getMaxCacheSize() != null) { - String tstr = jMd.getMaxCacheSize(); - Integer tval = new Integer(tstr); - cacheMax = tval.intValue(); - } - - // necessary check - if (md.getEjbName() == null) { - throw new Error("No ejb-name specified for a message-driven bean"); - } - - // transaction-type - if (md.getTransactionType().equals("Bean")) { - transactionType = BEAN_TRANSACTION_TYPE; - } else if (md.getTransactionType().equals("Container")) { - transactionType = CONTAINER_TRANSACTION_TYPE; - } else { - throw new DeploymentDescException( - "Invalid transaction-type content for ejb-name " + ejbName); - } - - // message driven destination - if (jMd.getJonasMessageDrivenDestination() != null) { - destinationJndiName = jMd.getJonasMessageDrivenDestination() - .getJndiName(); - } - - // Set values can be from old 2.0 way, ActivationConfig in std xml, - // or ActivationConfig in jonas xml - - // message selector - selector = md.getMessageSelector(); - // acknowledge mode - if (md.getAcknowledgeMode() == null) { - acknowledgeMode = AUTO_ACKNOWLEDGE; - } else { - if (md.getAcknowledgeMode().equals("Auto-acknowledge")) { - acknowledgeMode = AUTO_ACKNOWLEDGE; - } else if (md.getAcknowledgeMode().equals("Dups-ok-acknowledge")) { - acknowledgeMode = DUPS_OK_ACKNOWLEDGE; - } else { - throw new DeploymentDescException("Invalid acknowledge-mode content for ejb-name " + ejbName); - } - } - MessageDrivenDestination d = md.getMessageDrivenDestination(); - if (d != null && d.getDestinationType() != null) { - if (d.getDestinationType().equals("javax.jms.Queue")) { - destinationType = javax.jms.Queue.class; - } else if (d.getDestinationType().equals("javax.jms.Topic")) { - destinationType = javax.jms.Topic.class; - isTopicDestination = true; - } else { - try { - destinationType = classLoader.loadClass(d.getDestinationType()); - } catch (Exception ex) { - throw new DeploymentDescException("Invalid destination-type for ejb-name " + ejbName); - } - } - if (d.getSubscriptionDurability() != null) { - if (destinationType.equals(javax.jms.Queue.class)) { - throw new DeploymentDescException("subscription-durability of message-driven-destination for ejb-name " - + ejbName + " defined"); - } - if (d.getSubscriptionDurability().equals("Durable")) { - subscriptionDurability = SUBS_DURABLE; - } else if (d.getSubscriptionDurability().equals("NonDurable")) { - subscriptionDurability = SUBS_NON_DURABLE; - } else { - throw new DeploymentDescException("Invalid subscription-durability content for ejb-name " + ejbName); - } - } else { - // non-durable subscription default value for topic - if (destinationType.equals(javax.jms.Topic.class)) { - subscriptionDurability = SUBS_NON_DURABLE; - } - } - - } - - destinationLink = md.getMessageDestinationLink(); - - if( mdActivationConfigDesc != null) { - configureAC(mdActivationConfigDesc, classLoader); - } - - if( mdJonasActivationConfigDesc != null) { - configureAC(mdJonasActivationConfigDesc, classLoader); - } - - if (destinationJndiName == null) { - throw new Error("No destination specified for message-driven bean " + ejbName); - } - - // cache TxAttribute for onMessage and ejbTimeout - for (Iterator i = getMethodDescIterator(); i.hasNext();) { - MethodDesc methd = (MethodDesc) i.next(); - if (methd.getMethod().getName().equals("onMessage")) { - txAttribute = methd.getTxAttribute(); - } - if (methd.getMethod().getName().equals("ejbTimeout")) { - timerTxAttribute = methd.getTxAttribute(); - ejbTimeoutSignature = BeanNaming.getSignature(getEjbName(), methd.getMethod()); - } - } - } - - /** - * Get transaction management type of the message driven. - * - * @return transaction type value within - * BEAN_TRANSACTION_TYPE,CONTAINER_TRANSACTION_TYPE - */ - public int getTransactionType() { - return transactionType; - } - - /** - * Return the transaction attribute for the onMessage method of Message - * driven bean - * - */ - public int getTxAttribute() { - return txAttribute; - } - - /** - * @return true if BEAN_TRANSACTION_TYPE - */ - public boolean isBeanManagedTransaction() { - return (transactionType == BeanDesc.BEAN_TRANSACTION_TYPE); - } - - /** - * Get the the destination name of the message driven bean. - * @return name of the destination of the message driven bean. - */ - public String getDestination() { - return(destination); - } - - /** - * Get the the destination JNDI name of the message driven bean. - * - * @return JNDI name of the destination of the message driven bean. - */ - public String getDestinationJndiName() { - return (destinationJndiName); - } - - /** - * Get the the destination link name of the message driven bean. - * - * @return link name of the destination of the message driven bean. - */ - public String getDestinationLink() { - return (destinationLink); - } - - /** - * Get the the destination type of the message driven bean. - * - * @return type of the destination of the message driven bean. - */ - public Class getDestinationType() { - return (destinationType); - } - - /** - * Return true if it is a Topic destination - */ - public boolean isTopicDestination() { - return (isTopicDestination); - } - - /** - * Assessor for existence of a message-selector for the message driven bean - * - * @return true if message-selector is defined for the bean - */ - public boolean hasSelector() { - return (selector != null); - } - - /** - * Get the message-selector value of the message driven bean. - * - * @return value of the message selector return null if no selector - */ - public String getSelector() { - return (selector); - } - - /** - * Get the acknowledge-mode of the message driven bean. - * - * @return acknowledge-mode value within AUTO_ACKNOWLEDGE, - * DUPS_OK_ACKNOWLEDGE - */ - public int getAcknowledgeMode() { - return (acknowledgeMode); - } - - /** - * Get the the durability of the subscription of the message driven bean. - * - * @return durability of the subscription value within SUBS_DURABLE, - * SUBS_NON_DURABLE - */ - public int getSubscriptionDurability() { - return (subscriptionDurability); - } - - public boolean isSubscriptionDurable() { - return (subscriptionDurability == SUBS_DURABLE); - } - - /** - * Return true if tx attribute for onMessage is Required - */ - public boolean isRequired() { - return (txAttribute == MethodDesc.TX_REQUIRED); - } - - /** - * @return the maximum number of messages that can be assigned to a server - * session at one time. will be configurable in the future - */ - public int getMaxMessages() { - return DEFAULT_MAX_MESSAGES; - } - - /** - * check that trans-attribute is valid for bean - */ - protected void checkTxAttribute(MethodDesc md) - throws DeploymentDescException { - java.lang.reflect.Method m = md.getMethod(); - if (getTransactionType() == CONTAINER_TRANSACTION_TYPE) { - if (md.getTxAttribute() == MethodDesc.TX_NOT_SET) { - // trans-attribute not set ! - // trace a warning and set the tx-attribute with the default value - logger.log(BasicLevel.WARN, - "trans-attribute missing for method " - + m.toString() + " in message driven bean " - + getEjbName() - + " (set to the default value " - + MethodDesc.TX_STR_DEFAULT_VALUE_4_MDB - + ")"); - md.setTxAttribute(MethodDesc.TX_STR_DEFAULT_VALUE_4_MDB); - } - if ((md.getTxAttribute() != MethodDesc.TX_REQUIRED) - && (md.getTxAttribute() != MethodDesc.TX_NOT_SUPPORTED)) { - if (!"ejbTimeout".equals(md.getMethod().getName())) { - throw new DeploymentDescException(md.getTxAttributeName() - + " is not a valid trans-attribute for method " - + m.toString() + " in message driven bean " - + getEjbName()); - } - } - } else { - if (md.getTxAttribute() != MethodDesc.TX_NOT_SET) { - throw new DeploymentDescException( - "trans-attribute for message driven bean " - + getEjbName() - + " must not be defined (transaction bean managed)"); - } - } - } - - /** - * Check that the message diven bean descriptor is valid - * - * @exception DeploymentDescException - * thrown for non-valid bean - */ - public void check() throws DeploymentDescException { - super.check(); - } - - /** - * String representation of the object for test purpose - * - * @return String representation of this object - */ - public String toString() { - StringBuffer ret = new StringBuffer(); - ret.append(super.toString()); - ret.append("\ngetTransactionType()=" + TRANS[getTransactionType()]); - if (hasSelector()) { - ret.append("\ngetSelector()=\"" + getSelector() + "\""); - } - ret.append("\ngetAcknowledgeMode()=" + ACKMODE[getAcknowledgeMode()]); - if (getDestinationType() != null) { - ret.append("\ngetDestinationType()=" - + getDestinationType().getName()); - } - ret.append("\ngetSubscriptionDurability()=" - + SUBS_DURABILITY[getSubscriptionDurability()]); - ret.append("\ngetDestinationJndiName()=" + getDestinationJndiName()); - return ret.toString(); - } - - - /** - * @return the MessageDriven ActivationConfigDesc object - */ - public ActivationConfigDesc getMdActivationConfigDesc() { - return mdActivationConfigDesc; - } - - /** - * @return the JOnAS MessageDriven ActivationConfigDesc object - */ - public ActivationConfigDesc getJonasMdActivationConfigDesc() { - return mdJonasActivationConfigDesc; - } - - private void configureAC(ActivationConfigDesc ac, ClassLoader curLoader) throws DeploymentDescException{ - try { - List acpl = ac.getActivationConfigPropertyList(); - for (ListIterator lit = acpl.listIterator();lit.hasNext();) { - ActivationConfigPropertyDesc el = (ActivationConfigPropertyDesc)lit.next(); - if (el.getActivationConfigPropertyName().equals("destinationType")) { - if (el.getActivationConfigPropertyValue().equals("javax.jms.Queue")) { - destinationType = javax.jms.Queue.class; - } else if (el.getActivationConfigPropertyValue().equals("javax.jms.Topic")) { - destinationType = javax.jms.Topic.class; - isTopicDestination = true; - } else { - try { - destinationType = curLoader.loadClass(el.getActivationConfigPropertyValue()); - } catch (Exception ex) { - throw new DeploymentDescException("Invalid destination-type of " - + el.getActivationConfigPropertyValue() - + "for ejb-name" + ejbName); - } - } - } else if (el.getActivationConfigPropertyName().equals("messageSelector")) { - selector = el.getActivationConfigPropertyValue(); - } else if (el.getActivationConfigPropertyName().equals("acknowledgeMode")) { - if (el.getActivationConfigPropertyValue().equals("Auto-acknowledge")) { - acknowledgeMode = AUTO_ACKNOWLEDGE; - } else if (el.getActivationConfigPropertyValue().equals("Dups-ok-acknowledge")) { - acknowledgeMode = DUPS_OK_ACKNOWLEDGE; - } - } else if (el.getActivationConfigPropertyName().equals("subscriptionDurability")) { - if (el.getActivationConfigPropertyValue().equals("Durable")) { - subscriptionDurability = SUBS_DURABLE; - } else { - subscriptionDurability = SUBS_NON_DURABLE; - } - } else if (el.getActivationConfigPropertyName().equals("destination")) { - destination = el.getActivationConfigPropertyValue(); - } - } - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - -} - diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/MethodCmp2Desc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/MethodCmp2Desc.java deleted file mode 100644 index 9945594490c51ad4497982540ea3fba2563e260d..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/MethodCmp2Desc.java +++ /dev/null @@ -1,141 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.deployment.ejb; - -import java.io.CharArrayReader; -import java.lang.reflect.Method; - -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.ejb.ejbql.ASTEJBQL; -import org.ow2.jonas.deployment.ejb.ejbql.EJBQL; -import org.ow2.jonas.deployment.ejb.ejbql.ParseException; - - - -/** - * Class to hold meta-information related to CMP2 find/select methods - * @author Christophe Ney [cney@batisseurs.com] : Initial developer - * @author Helene Joanin - */ -public class MethodCmp2Desc extends MethodDesc { - - protected String query = null; - protected ASTEJBQL queryNode = null; - protected boolean resultTypeMappingRemote = false; - protected EntityDesc entityDesc; - - - /** - * construtor form XML data binding structures - */ - MethodCmp2Desc(BeanDesc beanDesc, Method meth, Class classDef, int index) { - super(beanDesc, meth, classDef, index); - entityDesc = (EntityDesc) beanDesc; - } - - /** - * get EJB-QL query when defined - * @return possibly null String containing the EJB-QL query for the method - */ - public String getQuery() { - return query; - } - - /** - * set EJB-QL query. Because of the deployment descriptor structure, the query is - * set after the object is created. - */ - public void setQuery(String query) throws ParseException { - // we want a one line query for error reporting - this.query = query.replace('\r',' ').replace('\n',' ').replace('\t',' '); - EJBQL parser = new EJBQL(new CharArrayReader(query.toCharArray())); - queryNode = (ASTEJBQL)parser.EJBQL(); - } - - - public ASTEJBQL getQueryNode() { - return queryNode; - } - - /** - * get result type mapping state (remote/local) - * @return true when remote - */ - public boolean isResultTypeMappingRemote() { - return resultTypeMappingRemote; - } - - /** - * set the state of resultTypeMappingRemote - */ - public void setResultTypeMapping(String resultTypeMapping) - throws DeploymentDescException { - if (resultTypeMapping.equals("Remote")) { - resultTypeMappingRemote=true; - } else if (resultTypeMapping.equals("Local")) { - resultTypeMappingRemote=false; - } else { - throw new DeploymentDescException(resultTypeMapping+" is not a valid result-type-mapping value"); - } - } - - /** - * Get the prefetch tag value for this method. - * May be true only for finder methods (not for ejbSelect methods) - */ - public boolean getPrefetch() { - if (this.isFinder()) { - return entityDesc.isPrefetch(); - } else { - return false; - } - } - - - /** - * String representation of the given element - * @param m an element - * @return String representation of the given element method - */ - public static String queryMethodElementToString(org.ow2.jonas.deployment.ejb.xml.QueryMethod m) { - return methodElementToString(null, m.getMethodName(),m.getMethodParams()); - } - - /** - * String representation of the object for test purpose - * @return String representation of this object - */ - public String toString() { - StringBuffer ret = new StringBuffer(); - ret.append(super.toString()); - ret.append("\nquery = " + query); - ret.append("\nqueryNode = " + queryNode); - ret.append("\nresultTypeMappingRemote = " + resultTypeMappingRemote); - return ret.toString(); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/MethodDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/MethodDesc.java deleted file mode 100644 index a69351f783a6447acce73cccfb864ffa5e5aaa92..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/MethodDesc.java +++ /dev/null @@ -1,477 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - - -package org.ow2.jonas.deployment.ejb; - -import java.lang.reflect.Method; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; - -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.ejb.xml.MethodParams; - - -/** - * Class to hold meta-information related to bean and home methods. - * @author Christophe Ney [cney@batisseurs.com] : Initial developer - * @author Helene Joanin: fix a bug about select method select method is a bean's method which name begins with ejbSelect, - * (and not home interface method as finder method). - */ -public class MethodDesc { - - /** - * Set of constants for method transaction attribute - */ - public static final int TX_NULL = -1; - public static final int TX_NOT_SET = 0; - public static final int TX_NOT_SUPPORTED = 1; - public static final int TX_REQUIRED = 2; - public static final int TX_SUPPORTS = 3; - public static final int TX_REQUIRES_NEW = 4; - public static final int TX_MANDATORY = 5; - public static final int TX_NEVER = 6; - - - private static final String[] ATTR = { - "TX_NOT_SET", - "TX_NOT_SUPPORTED", - "TX_REQUIRED", - "TX_SUPPORTS", - "TX_REQUIRES_NEW", - "TX_MANDATORY", - "TX_NEVER" - }; - - /** - * default value for undefined transaction attribute for sessions and entities - */ - protected static final String TX_STR_DEFAULT_VALUE = "Supports"; - - /** - * default value for undefined transaction attribute for message driven beans - */ - protected static final String TX_STR_DEFAULT_VALUE_4_MDB = "NotSupported"; - - /** - * value for undefined transaction attribute - */ - private int txAttribute = TX_NOT_SET; - private int txAttributeStatus = APPLY_TO_BEAN; - - // Array of String representing the roles which can execute the method of this MethodDesc - private HashSet roleName = new HashSet(); - - public static final int APPLY_TO_NOTHING = 0; - public static final int APPLY_TO_BEAN = 1; - public static final int APPLY_TO_CLASS = 2; - public static final int APPLY_TO_BEAN_METHOD_NAME = 3; - public static final int APPLY_TO_CLASS_METHOD_NAME = 4; - public static final int APPLY_TO_BEAN_METHOD = 5; - public static final int APPLY_TO_CLASS_METHOD = 6; - - protected static final String[] APPLY_TO = { - "APPLY_TO_NOTHING", - "APPLY_TO_BEAN", - "APPLY_TO_CLASS", - "APPLY_TO_BEAN_METHOD_NAME", - "APPLY_TO_CLASS_METHOD_NAME", - "APPLY_TO_BEAN_METHOD", - "APPLY_TO_CLASS_METHOD" - }; - - private Method meth; - private Class classDef; - private int index; - - protected BeanDesc beanDesc; - - private boolean isFinder = false; - private boolean isEjbSelect = false; - private boolean isFindByPrimaryKey = false; - - /** - * This method was marked as excluded in ejb-jar.xml ? - */ - private boolean excluded = false; - - /** - * constructor to be used by parent node - */ - public MethodDesc(BeanDesc beanDesc, Method meth, Class clDef, int index) { - this.meth = meth; - this.classDef = clDef; - this.index = index; - this.beanDesc = beanDesc; - isFindByPrimaryKey = MethodDesc.isFindByPrimaryKey(meth); - isFinder = isFinder(meth); - isEjbSelect = isEjbSelect(meth); - } - - /** - * get a unique index of the method for the bean - */ - public int getIndex() { - return index; - } - - public void setIndex(int idx) { - index = idx; - } - - /** - * access if the method is a finder - * @return true for finder methods - */ - public boolean isFinder() { - return isFinder; - } - - /** - * access if the method is findByPrimaryKey - * @return true for the findByPrimaryKey method - */ - public boolean isFindByPrimaryKey() { - return isFindByPrimaryKey; - } - - - /** - * access if the method is a select - * @return true for select methods - */ - public boolean isEjbSelect() { - return isEjbSelect; - } - - - /** - * Overwrite TxAttribute - * @param transAttribute new value for txAttribute - * @param status applicability of given transAttribute parameter - */ - void overwriteTxAttribute(String transAttribute, int status) throws DeploymentDescException { - // overwrite only if numerical value greater than existing one - if (status < this.txAttributeStatus) { - return; - } - setTxAttribute(transAttribute); - txAttributeStatus = status; - } - - /** - * Set TxAttribute with given value - */ - void setTxAttribute(String transAttribute) throws DeploymentDescException { - if (transAttribute.equals("NotSupported")) { - txAttribute = TX_NOT_SUPPORTED; - } else if (transAttribute.equals("Required")) { - txAttribute = TX_REQUIRED; - } else if (transAttribute.equals("Supports")) { - txAttribute = TX_SUPPORTS; - } else if (transAttribute.equals("RequiresNew")) { - txAttribute = TX_REQUIRES_NEW; - } else if (transAttribute.equals("Mandatory")) { - txAttribute = TX_MANDATORY; - } else if (transAttribute.equals("Never")) { - txAttribute = TX_NEVER; - } else { - throw new DeploymentDescException(transAttribute - + " is not a valid trans-attribute value"); - } - } - - /** - * Add a role name to the role names which can execute the method - * @param rn role name to add - */ - void addRoleName (String rn) { - roleName.add(rn); - } - - /** - * Evaluate method pattern maching as defined in the EJB specifications - * @return one of the APPLY_TO_* values. - */ - public int matchPattern(Class pclass, String mName, MethodParams patternMethodParams) { - return matchPattern(getMethod(), classDef, pclass, mName, patternMethodParams); - } - - /** - * Get the status of applicability for a given pattern to a method - * @return status of applicability APPLY_TO_NOTHING,APPLY_TO_BEAN,APPLY_TO_CLASS,APPLY_TO_METHOD_NAME,APPLY_TO_METHOD - */ - public static int matchPattern(java.lang.reflect.Method meth, - Class classMeth, - Class pclass, - String mName, - MethodParams patternMethodParams) { - - // If pclass don't match -> APPLY_TO_NOTHING - if (pclass != null && !pclass.isAssignableFrom(classMeth)) { - return APPLY_TO_NOTHING; - } - - // class is enough - if (mName.equals("*")) { - return (pclass == null) ? APPLY_TO_BEAN : APPLY_TO_CLASS; - } - - // method name does not match - if (!mName.equals(meth.getName())) { - return APPLY_TO_NOTHING; - } - - // no params specified (name test is enough) - if (patternMethodParams == null) { - return (pclass == null) ? APPLY_TO_BEAN_METHOD_NAME : APPLY_TO_CLASS_METHOD_NAME; - } - - Class pars[] = meth.getParameterTypes(); - List pattPars = patternMethodParams.getMethodParamList(); - // number of parameters does not match - if (pars.length != pattPars.size()) { - return APPLY_TO_NOTHING; - } - Iterator i = pattPars.iterator(); - for (int ii = 0; ii < pars.length; ii++) { - String cName = (String) i.next(); - if (!getClassName(pars[ii]).equals(cName)) { - return APPLY_TO_NOTHING; - } - } - return (pclass == null) ? APPLY_TO_BEAN_METHOD : APPLY_TO_CLASS_METHOD; - } - - /** - * Returns common name of a given type
    - * For example it returns int[] for an array of int - * @return String with the name of the given type - */ - private static String getClassName(Class c) { - String name; - if (c.isArray()) { - name = getClassName(c.getComponentType()) + "[]"; - } else { - name = c.getName(); - } - return (name); - } - - - - /** - * Get the container transaction attribute that match the method - * @return Constant value within list : - * TX_NOT_SUPPORTED,TX_REQUIRED,TX_SUPPORTS,TX_REQUIRES_NEW,TX_MANDATORY,TX_NEVER,TX_NOT_SET - */ - public int getTxAttribute() { - return txAttribute; - } - - /** - * Get the container transaction attribute that match the method - * @return Constant value within list : - * APPLY_TO_NOTHING, APPLY_TO_BEAN, APPLY_TO_CLASS, APPLY_TO_BEAN_METHOD_NAME, - * APPLY_TO_CLASS_METHOD_NAME, APPLY_TO_BEAN_METHOD, APPLY_TO_CLASS_METHOD - */ - public int getTxAttributeStatus() { - return txAttributeStatus; - } - - /** - * String representation of the transactionnal attribute - * @return String representation of this transactionnal attribute - */ - public static String getTxAttributeName(int value) { - if ((value < 0) || (value > ATTR.length)) { - throw new Error(value + " is not a valid TxAttribute"); - } - return ATTR[value]; - } - - /** - * String representation of the transactionnal attribute - * @return String representation of this transactionnal attribute - */ - public String getTxAttributeName() { - return ATTR[txAttribute]; - } - - /** - * String representation of the roles which can execute the method - * @return Array of String representing the roles which can execute the method - */ - public String[] getRoleName () { - if (roleName.isEmpty()) { - return new String[0]; - } - Object[] o = roleName.toArray(); - String[] rn = new String[o.length]; - for (int i = 0; i < rn.length; i++) { - rn[i] = (String) o[i]; - } - return rn; - } - - /** - * String representation of the given element - * @param m an element - * @return String representation of the given element method - */ - public static String methodElementToString(org.ow2.jonas.deployment.ejb.xml.Method m) { - return methodElementToString(m.getMethodIntf(), m.getMethodName(), m.getMethodParams()); - } - - /** - * get a String representation of a method from it's XML representation - */ - protected static String methodElementToString(String intf, String name, MethodParams params) { - String s = new String(); - if (intf != null) { - s = s.concat(intf + "."); - } - s = s.concat(name); - if (params != null) { - s = s.concat("("); - for (Iterator i = params.getMethodParamList().iterator(); i.hasNext();) { - s = s.concat((String) i.next()); - if (i.hasNext()) { - s = s.concat(","); - } - } - s = s.concat(")"); - } - return (s); - } - - /** - * get a String representation of a method from the reflection object - */ - public static String toString(Method m) { - StringBuffer ret = new StringBuffer(); - ret.append(m.getDeclaringClass().getName()); - ret.append('.'); - ret.append(m.getName()); - ret.append('('); - Class[] params = m.getParameterTypes(); - for (int i = 0; i < params.length; i++) { - ret.append(getClassName(params[i])); - if (i == params.length - 1) { - break; - } - ret.append(','); - } - ret.append(')'); - return ret.toString(); - } - - /** - * return the method to which the meta-information applies - */ - public Method getMethod() { - return meth; - } - - /** - * get the parent node - */ - public BeanDesc getBeanDesc() { - return beanDesc; - } - - /** - * access if a method is a finder - */ - public static boolean isFinder(Method meth) { - return (meth.getName().startsWith("find") - && (javax.ejb.EJBHome.class.isAssignableFrom(meth.getDeclaringClass()) - || javax.ejb.EJBLocalHome.class.isAssignableFrom(meth.getDeclaringClass()))); - } - - /** - * access if a method is findByPrimaryKey - */ - public static boolean isFindByPrimaryKey(Method meth) { - return (meth.getName().equals("findByPrimaryKey") - && (javax.ejb.EJBHome.class.isAssignableFrom(meth.getDeclaringClass()) - || javax.ejb.EJBLocalHome.class.isAssignableFrom(meth.getDeclaringClass()))); - } - - /** - * access if a method is a select - */ - public static boolean isEjbSelect(Method meth) { - return (meth.getName().startsWith("ejbSelect") - && javax.ejb.EntityBean.class.isAssignableFrom(meth.getDeclaringClass())); - } - - /** - * String representation of the object for test purpose - * @return String representation of this object - */ - public String toString() { - StringBuffer ret = new StringBuffer(); - ret.append("\ngetTxAttribute() = " + ATTR[getTxAttribute()]); - ret.append("\ngetTxAttributeStatus() = " + APPLY_TO[getTxAttributeStatus()]); - ret.append("\nMethodIndex = " + index); - ret.append("\nmeth = " + toString(meth)); - ret.append("\nisFinder = " + isFinder); - ret.append("\nisEjbSelect = " + isEjbSelect); - ret.append("\nisFindByPrimaryKey = " + isFindByPrimaryKey); - if (!roleName.isEmpty()) { - ret.append("\ngetRoleName() = ["); - String [] rn = getRoleName(); - for (int i = 0; i < rn.length - 1; i++) { - ret.append (rn[i] + ", "); - } - ret.append(rn[rn.length - 1] + "]"); - ret.append("\n"); - } - return ret.toString(); - } - - /** - * @return true if this method is excluded (in DD), else false - */ - public boolean isExcluded() { - return excluded; - } - /** - * Sets the excluded attribute. - * @param excluded true of false - */ - public void setExcluded(boolean excluded) { - this.excluded = excluded; - } -} - - - - - - diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/MethodJdbcCmp1Desc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/MethodJdbcCmp1Desc.java deleted file mode 100644 index 4d2304066baf6bd58a41c944d1186e1fafb874ae..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/MethodJdbcCmp1Desc.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.deployment.ejb; - -import java.lang.reflect.Method; - -import org.ow2.jonas.deployment.common.DeploymentDescException; - -/** - * Class to hold meta-information related to CMP v1 attributes of a method when a jdbc - * data store is used. - * @author Christophe Ney [cney@batisseurs.com] : Initial developer - * @author Helene Joanin - */ -public class MethodJdbcCmp1Desc extends MethodDesc { - - protected String whereClause = null; - protected int whereClauseStatus = APPLY_TO_BEAN; - - /** - * constructor to be used by parent node - */ - public MethodJdbcCmp1Desc(BeanDesc beanDesc,Method meth, Class classDef, int index) { - super(beanDesc,meth, classDef,index); - } - - /** - * Overwrite JdbcWhereClause - * @param jdbcWhereClause new value for jdbcWhereClause - * @param status applicability of given transAttribute parameter - */ - void overwriteJdbcWhereClause(String jdbcWhereClause,int status) - throws DeploymentDescException { - if (status - * - * @return transaction type value within - * BEAN_TRANSACTION_TYPE,CONTAINER_TRANSACTION_TYPE - */ - public int getTransactionType() { - return transactionType; - } - - /** - * Returns true if bean managed transaction. (used by JOnAS Server) - */ - public boolean isBeanManagedTransaction() { - return (transactionType == BEAN_TRANSACTION_TYPE); - } - - /** - * Get the session timeout value - */ - public int getSessionTimeout() { - return sessionTimeout; - } - - /** - * Check that the bean descriptor is valid - * - * @exception DeploymentDescException - * thrown for non-valid bean - */ - @Override - public void check() throws DeploymentDescException { - super.check(); - // for BEAN_TRANSACTION_TYPE transactions ejbClass should not implement - // javax.ejb.SessionSynchronization - if ((getTransactionType() == BEAN_TRANSACTION_TYPE) - && (javax.ejb.SessionSynchronization.class - .isAssignableFrom(ejbClass))) { - throw new DeploymentDescException( - ejbClass.getName() - + " should NOT manage transactions and implement javax.ejb.SessionSynchronization"); - } - } - - /** - * String representation of the object for test purpose - * - * @return String representation of this object - */ - @Override - public String toString() { - StringBuffer ret = new StringBuffer(); - ret.append(super.toString()); - ret.append("\ngetTransactionType()" + TRANS[getTransactionType()]); - ret.append("\nsessionTimeout = " + sessionTimeout); - return ret.toString(); - } - - public boolean isMonitoringSettingsDefinedInDD() { - return monitoringSettingsDefinedInDD; - } - - public void setWarningThreshold(final int warningThreshold) { - this.warningThreshold = warningThreshold; - } - - public boolean isMonitoringEnabled() { - return monitoringEnabled; - } - - public int getWarningThreshold() { - return warningThreshold; - } - -} - diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/SessionStatefulDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/SessionStatefulDesc.java deleted file mode 100644 index d2b63823b0ef3bc5b06c2695c6b7a1e138c04f11..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/SessionStatefulDesc.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.deployment.ejb; - -import java.lang.reflect.Method; - -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.common.xml.JLinkedList; -import org.ow2.jonas.deployment.ejb.xml.AssemblyDescriptor; -import org.ow2.jonas.deployment.ejb.xml.JonasSession; -import org.ow2.jonas.deployment.ejb.xml.Session; - - -/** - * class to hold meta-information related to a stateful session bean. - * At this stage, this is only a tagger class. - * @author Christophe Ney [cney@batisseurs.com] : Initial developer - * @author Helene Joanin - */ -public class SessionStatefulDesc extends SessionDesc { - - protected Method isModifiedMethod = null; - - /** - * constructor: called when the DeploymentDescriptor is read. - * Currently, called by both GenIC and createContainer. - */ - public SessionStatefulDesc(ClassLoader classLoader, Session ses, - AssemblyDescriptor asd, JonasSession jSes, - JLinkedList jMDRList, String filename) - throws DeploymentDescException { - super(classLoader, ses, asd, jSes, jMDRList, filename); - - // isModifiedMethod - if (jSes.getIsModifiedMethodName() != null) { - String mName = jSes.getIsModifiedMethodName(); - try { - isModifiedMethod = this.ejbClass.getMethod(mName, new Class[0]); - } catch (NoSuchMethodException e) { - isModifiedMethod = null; - throw new DeploymentDescException(mName + " is not a method of " + this.ejbClass.getName()); - } catch (SecurityException e) { - throw new DeploymentDescException("Cannot use java reflexion on " + this.ejbClass.getName()); - } - } - } - - /** - * Get the 'isModified' method name implemented in the bean class. - * (This information is JOnAS specific). - * @return Name of the isModified method - */ - public Method getIsModifiedMethod(){ - if (isModifiedMethod == null) - throw new Error("No isModified method defined for bean " + this.ejbName); - return isModifiedMethod; - } - - /** - * Assessor for existence of a isModified methoe - * @return true of isModified method exist for the bean - */ - public boolean hasIsModifiedMethod(){ - return isModifiedMethod != null; - } - - /** - * String representation of the object for test purpose - * @return String representation of this object - */ - public String toString() { - StringBuffer ret = new StringBuffer(); - ret.append(super.toString()); - if (hasIsModifiedMethod()) - ret.append("getIsModifiedMethod()=" + getIsModifiedMethod().toString()); - return ret.toString(); - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/SessionStatelessDesc.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/SessionStatelessDesc.java deleted file mode 100644 index 098a5557703e6b85f6f0cfa801673bf1f92d77b3..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/SessionStatelessDesc.java +++ /dev/null @@ -1,295 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2006 Bull S.A. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.deployment.ejb; - -import org.ow2.jonas.deployment.common.DeploymentDescException; -import org.ow2.jonas.deployment.common.xml.JLinkedList; -import org.ow2.jonas.deployment.ejb.xml.AssemblyDescriptor; -import org.ow2.jonas.deployment.ejb.xml.CommonEjb; -import org.ow2.jonas.deployment.ejb.xml.JonasSession; -import org.ow2.jonas.deployment.ejb.xml.Session; -import org.ow2.jonas.lib.util.BeanNaming; - -import java.lang.reflect.Method; -import java.util.Iterator; - - - - -/** - * class to hold meta-information related to a stateless session bean. - * - * @author Christophe Ney [cney@batisseurs.com] : Initial developer - * @author Helene Joanin - */ -public class SessionStatelessDesc extends SessionDesc { - - /** - * Default service endpoint jndi suffix - */ - private static final String SERVICE_ENDPOINT_JNDI_SUFFIX = "_SE"; - - /** - * class name of the JOnAS wrapper (without package prefix) - */ - private String wrpServiceEndpointName; - private String wrpSEHomeName; - - /** - * Singleton=True if only 1 SessionSwitch (and 1 Remote) when possible. - */ - protected boolean singleton = true; - - /** - * fully qualified class name of the JOnAS wrapper - */ - private String fullWrpServiceEndpointName; - private String fullWrpSEHomeName; - - /** - * ServiceEndpoint Class - */ - private Class serviceEndpointClass; - - /** - * jndi name - */ - private String serviceEndpointJndiName; - - /** - * constructor: called when the DeploymentDescriptor is read. Currently, - * called by both GenIC and createContainer. - * - * @param classLoader ClassLoader to load Bean's classes - * @param ses XML Element for session standard deployment descriptor - * @param asd Assembly Descriptor of the EjbJar - * @param jSes XML Element for session jonas deployment descriptor - * @param filename bean's jar filename - * - * @throws DeploymentDescException When SessionDesc cannot be instanciated - */ - public SessionStatelessDesc(ClassLoader classLoader, Session ses, AssemblyDescriptor asd, JonasSession jSes, - JLinkedList jMDRList, String filename) throws DeploymentDescException { - super(classLoader, ses, asd, jSes, jMDRList, filename); - - // create wrapper names - String ejbIdentifier = getIdentifier(); - if (getServiceEndpointClass() != null) { - String packageName = BeanDesc.GENERATED_PREFIX + - BeanNaming.getPackageName(getServiceEndpointClass().getName()); - wrpServiceEndpointName = new String("JOnAS" + ejbIdentifier + "ServiceEndpoint"); - fullWrpServiceEndpointName = BeanNaming.getClassName(packageName, wrpServiceEndpointName); - wrpSEHomeName = new String("JOnAS" + ejbIdentifier + "SEHome"); - fullWrpSEHomeName = BeanNaming.getClassName(packageName, wrpSEHomeName); - } - - // get jndi-endpoint-name - if (jSes.getJndiEndpointName() != null) { - serviceEndpointJndiName = jSes.getJndiEndpointName(); - } else { - serviceEndpointJndiName = getJndiName() + SERVICE_ENDPOINT_JNDI_SUFFIX; - } - - // singleton - if (jSes.getSingleton() != null) { - if (jSes.getSingleton().equalsIgnoreCase("True")) { - singleton = true; - } else if (jSes.getSingleton().equalsIgnoreCase("False")) { - singleton = false; - } else { - throw new DeploymentDescException("Invalid singleton value for bean " + this.ejbName); - } - } - - // cache TxAttribute for ejbTimeout - for (Iterator i = getMethodDescIterator(); i.hasNext();) { - MethodDesc methd = (MethodDesc) i.next(); - if (methd.getMethod().getName().equals("ejbTimeout")) { - timerTxAttribute = methd.getTxAttribute(); - ejbTimeoutSignature = BeanNaming.getSignature(getEjbName(), methd.getMethod()); - } - } - } - - /** - * Check that the bean descriptor is valid - * - * @exception DeploymentDescException thrown for non-valid bean - */ - public void check() throws DeploymentDescException { - super.check(); - // ejbClass should not implement javax.ejb.SessionSynchronization - if (javax.ejb.SessionSynchronization.class.isAssignableFrom(ejbClass)) { - throw new DeploymentDescException(ejbClass.getName() - + " should NOT implement javax.ejb.SessionSynchronization"); - } - } - - /** - * Permit Methods addition from subtypes Protected method that need to be - * overridden in subclasses - * - * @param len method array length - * @return new len value - * - * @throws DeploymentDescException when java reflection cannot be used on - * classes - */ - protected int addEJBMethodDesc(int len) throws DeploymentDescException { - - if (this.serviceEndpointClass != null) { - // session bean or entity bean with local interface - Method[] m = this.serviceEndpointClass.getMethods(); - for (int i = 0; i < m.length; i++) { - addMethodDesc(m[i], this.serviceEndpointClass); - len++; - // check RemoteException is thrown - checkRemoteException(m[i], true); - } - } - return len; - } - - /** - * load class for service-endpoint - * - * @param bd XML Element representing EJB Descriptor - * @param classLoader ClassLoader used to load classes - * - * @throws DeploymentDescException when a class cannot be loaded - */ - protected void loadExtraClasses(CommonEjb bd, ClassLoader classLoader) throws DeploymentDescException { - - Session ses = (Session) bd; - - // load service-endpoint interface - if (ses.getServiceEndpoint() != null) { - try { - serviceEndpointClass = classLoader.loadClass(ses.getServiceEndpoint()); - // check service-endpoint extends java.rmi.Remote - if (!java.rmi.Remote.class.isAssignableFrom(serviceEndpointClass)) { - throw new DeploymentDescException("ServiceEndpoint class '" + ses.getServiceEndpoint() - + "' does not extend java.rmi.Remote"); - } - } catch (ClassNotFoundException e) { - throw new DeploymentDescException("ServiceEndpoint class not found for bean " + ejbName, e); - } - } - - } - - /** - * Returns the parent Class for a method given an interface type. - * - * @param intfType type of the interface (Home/Remote/LocalHome/Local or - * ServiceEndpoint) - * - * @return the parent class for a method given an interface type - * - * @throws DeploymentDescException when intfType is unknown - */ - protected Class getParentClass(String intfType) throws DeploymentDescException { - Class pClass = null; - if (intfType.equals("Home")) { - pClass = javax.ejb.EJBHome.class; - } else if (intfType.equals("Remote")) { - pClass = javax.ejb.EJBObject.class; - } else if (intfType.equals("LocalHome")) { - pClass = javax.ejb.EJBLocalHome.class; - } else if (intfType.equals("Local")) { - pClass = javax.ejb.EJBLocalObject.class; - } else if (intfType.equals("ServiceEndpoint")) { - pClass = java.rmi.Remote.class; - } else { - throw new DeploymentDescException(intfType + " is invalid value for method-intf on bean " + ejbName); - } - return pClass; - } - - /** - * @return Returns the serviceEndpointClass. - */ - public Class getServiceEndpointClass() { - return serviceEndpointClass; - } - - private void checkValidServiceEndpointInterface() { - // extends java.rmi.Remote - // arguments and returns types are valid types for JAX-RPC (may be - // Holders) - // throws must includes java.rmi.RemoteException - // each endpoint method must have a matching session bean method : - // - same name - // - same number and types of arguments and same return type - // - session exceptions must eb included in endpoint - // no EJBObject or EJBLocalObject - // service endpoint interface must not include constants (public final - // static) - } - - /** - * @return jndi name where ServiceEndpoint interface will be bound - */ - public String getJndiServiceEndpointName() { - return serviceEndpointJndiName; - } - - /** - * @return Returns the fullWrpServiceEndpointName. - */ - public String getFullWrpServiceEndpointName() { - return fullWrpServiceEndpointName; - } - - /** - * @return Returns the wrpServiceEndpointName. - */ - public String getWrpServiceEndpointName() { - return wrpServiceEndpointName; - } - - /** - * @return Returns the fullWrpSEHomeName. - */ - public String getFullWrpSEHomeName() { - return fullWrpSEHomeName; - } - - /** - * @return Returns the wrpSEHomeName. - */ - public String getWrpSEHomeName() { - return wrpSEHomeName; - } - - /** - * @return true for singleton session bean - */ - public boolean isSingleton() { - return singleton; - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTAbstractSchemaName.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTAbstractSchemaName.java deleted file mode 100644 index 693c822651985fc98e41afd3569969c955a9ce2c..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTAbstractSchemaName.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTAbstractSchemaName.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTAbstractSchemaName extends SimpleNode { - public ASTAbstractSchemaName(int id) { - super(id); - } - - public ASTAbstractSchemaName(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTAggregateSelectExpression.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTAggregateSelectExpression.java deleted file mode 100644 index f112f922bee5b7344247852b00d1930aaefb9373..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTAggregateSelectExpression.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTAggregateSelectExpression.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTAggregateSelectExpression extends SimpleNode { - public ASTAggregateSelectExpression(int id) { - super(id); - } - - public ASTAggregateSelectExpression(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTArithmeticExpression.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTArithmeticExpression.java deleted file mode 100644 index cb3748a83a85413de5f1ac8fc21afd3ce00f2091..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTArithmeticExpression.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTArithmeticExpression.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTArithmeticExpression extends SimpleNode { - public ASTArithmeticExpression(int id) { - super(id); - } - - public ASTArithmeticExpression(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTArithmeticFactor.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTArithmeticFactor.java deleted file mode 100644 index 51a0a34c44dcb0219b18f9b616ea5a7e44e63cd2..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTArithmeticFactor.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTArithmeticFactor.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTArithmeticFactor extends SimpleNode { - public ASTArithmeticFactor(int id) { - super(id); - } - - public ASTArithmeticFactor(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTArithmeticLiteral.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTArithmeticLiteral.java deleted file mode 100644 index db952360884d229e2e6cb5c2991f3c3c2ba42f42..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTArithmeticLiteral.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTArithmeticLiteral.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTArithmeticLiteral extends SimpleNode { - public ASTArithmeticLiteral(int id) { - super(id); - } - - public ASTArithmeticLiteral(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTArithmeticTerm.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTArithmeticTerm.java deleted file mode 100644 index 034eb2ef2d18b7c830d926eb5f870c8925242e14..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTArithmeticTerm.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTArithmeticTerm.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTArithmeticTerm extends SimpleNode { - public ASTArithmeticTerm(int id) { - super(id); - } - - public ASTArithmeticTerm(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTBetweenExpression.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTBetweenExpression.java deleted file mode 100644 index 1bbe2e34c55ca4a317cd24221fa9276fbfa3e766..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTBetweenExpression.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTBetweenExpression.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTBetweenExpression extends SimpleNode { - public ASTBetweenExpression(int id) { - super(id); - } - - public ASTBetweenExpression(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTBooleanExpression.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTBooleanExpression.java deleted file mode 100644 index 65976caf83eb27edaff27ed4dfe15ab8a02b8ee7..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTBooleanExpression.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTBooleanExpression.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTBooleanExpression extends SimpleNode { - public ASTBooleanExpression(int id) { - super(id); - } - - public ASTBooleanExpression(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTBooleanLiteral.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTBooleanLiteral.java deleted file mode 100644 index b23a84230513d77f099cb176ef09b2e70692009f..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTBooleanLiteral.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTBooleanLiteral.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTBooleanLiteral extends SimpleNode { - public ASTBooleanLiteral(int id) { - super(id); - } - - public ASTBooleanLiteral(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTCmpPathExpression.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTCmpPathExpression.java deleted file mode 100644 index 936993c55ce352434d09985b83207947c0eab70b..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTCmpPathExpression.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTCmpPathExpression.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTCmpPathExpression extends SimpleNode { - public ASTCmpPathExpression(int id) { - super(id); - } - - public ASTCmpPathExpression(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTCollectionMemberDeclaration.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTCollectionMemberDeclaration.java deleted file mode 100644 index c276c0c53acc3c3718228e09f16867e7e95f917e..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTCollectionMemberDeclaration.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTCollectionMemberDeclaration.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTCollectionMemberDeclaration extends SimpleNode { - public ASTCollectionMemberDeclaration(int id) { - super(id); - } - - public ASTCollectionMemberDeclaration(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTCollectionMemberExpression.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTCollectionMemberExpression.java deleted file mode 100644 index 2b1814a08b474dcbc59c0ae7883f126175881dc2..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTCollectionMemberExpression.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTCollectionMemberExpression.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTCollectionMemberExpression extends SimpleNode { - public ASTCollectionMemberExpression(int id) { - super(id); - } - - public ASTCollectionMemberExpression(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTCollectionValuedPathExpression.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTCollectionValuedPathExpression.java deleted file mode 100644 index 6187758ee4a9fdb7a93a241bc3fe66ce3ee65080..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTCollectionValuedPathExpression.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTCollectionValuedPathExpression.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTCollectionValuedPathExpression extends SimpleNode { - public ASTCollectionValuedPathExpression(int id) { - super(id); - } - - public ASTCollectionValuedPathExpression(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTComparisonExpression.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTComparisonExpression.java deleted file mode 100644 index 056de6745b7df1fe4c9c350e8d72e708bc4f3cfe..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTComparisonExpression.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTComparisonExpression.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTComparisonExpression extends SimpleNode { - public ASTComparisonExpression(int id) { - super(id); - } - - public ASTComparisonExpression(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTConditionalExpression.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTConditionalExpression.java deleted file mode 100644 index 2a3e8704ac0d11c9623daacb98fbd19992b06d76..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTConditionalExpression.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTConditionalExpression.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTConditionalExpression extends SimpleNode { - public ASTConditionalExpression(int id) { - super(id); - } - - public ASTConditionalExpression(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTConditionalFactor.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTConditionalFactor.java deleted file mode 100644 index 6297ff6a2a65bb873bbdece5b3345e86ae0e149e..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTConditionalFactor.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTConditionalFactor.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTConditionalFactor extends SimpleNode { - public ASTConditionalFactor(int id) { - super(id); - } - - public ASTConditionalFactor(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTConditionalTerm.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTConditionalTerm.java deleted file mode 100644 index 164b72617a407321b797d48a00f54c013422fc86..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTConditionalTerm.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTConditionalTerm.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTConditionalTerm extends SimpleNode { - public ASTConditionalTerm(int id) { - super(id); - } - - public ASTConditionalTerm(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTDatetimeExpression.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTDatetimeExpression.java deleted file mode 100644 index 5b4166399f42ec87e04f8f21120645b82f9a98f6..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTDatetimeExpression.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTDatetimeExpression.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTDatetimeExpression extends SimpleNode { - public ASTDatetimeExpression(int id) { - super(id); - } - - public ASTDatetimeExpression(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTEJBQL.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTEJBQL.java deleted file mode 100644 index cbdb79515b55bc644476dafc90927dc9ef189d58..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTEJBQL.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTEJBQL.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTEJBQL extends SimpleNode { - public ASTEJBQL(int id) { - super(id); - } - - public ASTEJBQL(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTEmptyCollectionComparisonExpression.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTEmptyCollectionComparisonExpression.java deleted file mode 100644 index aadd3d78232cf1b2e0bab5a8ba22584e251baf48..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTEmptyCollectionComparisonExpression.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTEmptyCollectionComparisonExpression.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTEmptyCollectionComparisonExpression extends SimpleNode { - public ASTEmptyCollectionComparisonExpression(int id) { - super(id); - } - - public ASTEmptyCollectionComparisonExpression(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTEntityBeanExpression.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTEntityBeanExpression.java deleted file mode 100644 index 5410984dc83c9079166b0e32995528f4084a0686..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTEntityBeanExpression.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTEntityBeanExpression.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTEntityBeanExpression extends SimpleNode { - public ASTEntityBeanExpression(int id) { - super(id); - } - - public ASTEntityBeanExpression(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTFloatingPointLiteral.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTFloatingPointLiteral.java deleted file mode 100644 index 39d525c5a0a2611a780e9952258a18b11fe763f5..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTFloatingPointLiteral.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTFloatingPointLiteral.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTFloatingPointLiteral extends SimpleNode { - public ASTFloatingPointLiteral(int id) { - super(id); - } - - public ASTFloatingPointLiteral(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTFromClause.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTFromClause.java deleted file mode 100644 index c5d7f4d64a6af851266c1c9a731e128096227bad..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTFromClause.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTFromClause.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTFromClause extends SimpleNode { - public ASTFromClause(int id) { - super(id); - } - - public ASTFromClause(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTFunctionsReturningNumerics.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTFunctionsReturningNumerics.java deleted file mode 100644 index 73cbdd9b0576ecd1dc2c4ce123920ded9b9d33a9..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTFunctionsReturningNumerics.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTFunctionsReturningNumerics.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTFunctionsReturningNumerics extends SimpleNode { - public ASTFunctionsReturningNumerics(int id) { - super(id); - } - - public ASTFunctionsReturningNumerics(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTFunctionsReturningStrings.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTFunctionsReturningStrings.java deleted file mode 100644 index dcde5da9cfae1aecedf556f26adf5a45af1206c6..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTFunctionsReturningStrings.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTFunctionsReturningStrings.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTFunctionsReturningStrings extends SimpleNode { - public ASTFunctionsReturningStrings(int id) { - super(id); - } - - public ASTFunctionsReturningStrings(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTIdentificationVariable.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTIdentificationVariable.java deleted file mode 100644 index ce05f6fcab92a39daa983146b52fe30e7ae51354..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTIdentificationVariable.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTIdentificationVariable.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTIdentificationVariable extends SimpleNode { - public ASTIdentificationVariable(int id) { - super(id); - } - - public ASTIdentificationVariable(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTIdentifier.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTIdentifier.java deleted file mode 100644 index 7920c5892c44ef473e92831ba3be24378816dc02..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTIdentifier.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTIdentifier.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTIdentifier extends SimpleNode { - public ASTIdentifier(int id) { - super(id); - } - - public ASTIdentifier(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTInExpression.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTInExpression.java deleted file mode 100644 index 029710cdd7f6d71018ae71c1e1480d50c2b6a41d..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTInExpression.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTInExpression.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTInExpression extends SimpleNode { - public ASTInExpression(int id) { - super(id); - } - - public ASTInExpression(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTInputParameter.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTInputParameter.java deleted file mode 100644 index 2aeb9a0eb8bfa6f2e8bfa1632b963aabdee3979c..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTInputParameter.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTInputParameter.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTInputParameter extends SimpleNode { - public ASTInputParameter(int id) { - super(id); - } - - public ASTInputParameter(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTIntegerLiteral.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTIntegerLiteral.java deleted file mode 100644 index 698fdeff5b69a589d4ee76a7d589034e99360af9..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTIntegerLiteral.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTIntegerLiteral.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTIntegerLiteral extends SimpleNode { - public ASTIntegerLiteral(int id) { - super(id); - } - - public ASTIntegerLiteral(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTLikeExpression.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTLikeExpression.java deleted file mode 100644 index 544ff0eccb1bbceec4f85c32e6e8bfa599cff8f6..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTLikeExpression.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTLikeExpression.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTLikeExpression extends SimpleNode { - public ASTLikeExpression(int id) { - super(id); - } - - public ASTLikeExpression(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTLimitClause.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTLimitClause.java deleted file mode 100644 index 467203ddd4a5b4f0c1235d9cc9a1547d401864ad..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTLimitClause.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTLimitClause.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTLimitClause extends SimpleNode { - public ASTLimitClause(int id) { - super(id); - } - - public ASTLimitClause(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTLimitExpression.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTLimitExpression.java deleted file mode 100644 index 06019c560b88b5c7f5a889d465608b271e61e4ee..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTLimitExpression.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTLimitExpression.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTLimitExpression extends SimpleNode { - public ASTLimitExpression(int id) { - super(id); - } - - public ASTLimitExpression(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTLiteral.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTLiteral.java deleted file mode 100644 index 528da577a2839c2e9620e862b20888123695cdd2..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTLiteral.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTLiteral.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTLiteral extends SimpleNode { - public ASTLiteral(int id) { - super(id); - } - - public ASTLiteral(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTNullComparisonExpression.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTNullComparisonExpression.java deleted file mode 100644 index 652bd2d92296ae548a974a2e4f80bd0b943339a9..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTNullComparisonExpression.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTNullComparisonExpression.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTNullComparisonExpression extends SimpleNode { - public ASTNullComparisonExpression(int id) { - super(id); - } - - public ASTNullComparisonExpression(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTOrderByClause.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTOrderByClause.java deleted file mode 100644 index e44af6613dbf905406d88aec9e06d0623a29144c..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTOrderByClause.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTOrderByClause.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTOrderByClause extends SimpleNode { - public ASTOrderByClause(int id) { - super(id); - } - - public ASTOrderByClause(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTOrderByItem.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTOrderByItem.java deleted file mode 100644 index 9011495c76a13948dcdb4d6940dce3f99c8cc942..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTOrderByItem.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTOrderByItem.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTOrderByItem extends SimpleNode { - public ASTOrderByItem(int id) { - super(id); - } - - public ASTOrderByItem(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTPath.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTPath.java deleted file mode 100644 index 10dfde999b32afbaf2776c3787179534e1306681..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTPath.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTPath.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTPath extends SimpleNode { - public ASTPath(int id) { - super(id); - } - - public ASTPath(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTRangeVariableDeclaration.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTRangeVariableDeclaration.java deleted file mode 100644 index 650b5808f6b9eb277179a8e7f360f3c13974cc90..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTRangeVariableDeclaration.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTRangeVariableDeclaration.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTRangeVariableDeclaration extends SimpleNode { - public ASTRangeVariableDeclaration(int id) { - super(id); - } - - public ASTRangeVariableDeclaration(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTSelectClause.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTSelectClause.java deleted file mode 100644 index cc723efd78da64e34982de67fedba400abf88e0f..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTSelectClause.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTSelectClause.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTSelectClause extends SimpleNode { - public ASTSelectClause(int id) { - super(id); - } - - public ASTSelectClause(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTSelectExpression.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTSelectExpression.java deleted file mode 100644 index 3f36563be7350a4b1192f2ba8fe1767e84c20af0..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTSelectExpression.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTSelectExpression.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTSelectExpression extends SimpleNode { - public ASTSelectExpression(int id) { - super(id); - } - - public ASTSelectExpression(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTSingleValuedCmrPathExpression.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTSingleValuedCmrPathExpression.java deleted file mode 100644 index a0303706685f9047fd960d0727501031e0b77ca0..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTSingleValuedCmrPathExpression.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTSingleValuedCmrPathExpression.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTSingleValuedCmrPathExpression extends SimpleNode { - public ASTSingleValuedCmrPathExpression(int id) { - super(id); - } - - public ASTSingleValuedCmrPathExpression(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTSingleValuedPathExpression.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTSingleValuedPathExpression.java deleted file mode 100644 index d6933666491191ddccb922f8c826fb99212d621b..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTSingleValuedPathExpression.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTSingleValuedPathExpression.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTSingleValuedPathExpression extends SimpleNode { - public ASTSingleValuedPathExpression(int id) { - super(id); - } - - public ASTSingleValuedPathExpression(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTStringExpression.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTStringExpression.java deleted file mode 100644 index 78ded92c4a91d0e82fa07a46b37ef2ebed14533e..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTStringExpression.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTStringExpression.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTStringExpression extends SimpleNode { - public ASTStringExpression(int id) { - super(id); - } - - public ASTStringExpression(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTStringLiteral.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTStringLiteral.java deleted file mode 100644 index c37287d95b25f3802fab04fa906ef448d722ed58..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTStringLiteral.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTStringLiteral.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTStringLiteral extends SimpleNode { - public ASTStringLiteral(int id) { - super(id); - } - - public ASTStringLiteral(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTWhereClause.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTWhereClause.java deleted file mode 100644 index 04cad04423b4090d8853f8c7a5e22be84ff58b65..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/ASTWhereClause.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated By:JJTree: Do not edit this line. ASTWhereClause.java */ - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class ASTWhereClause extends SimpleNode { - public ASTWhereClause(int id) { - super(id); - } - - public ASTWhereClause(EJBQL p, int id) { - super(p, id); - } - - - /** Accept the visitor. **/ - public Object jjtAccept(EJBQLVisitor visitor, Object data) { - return visitor.visit(this, data); - } -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/EJBQL.java b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/EJBQL.java deleted file mode 100644 index 1efe65fcebbef18e48e0817cd5024d768ab13239..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/EJBQL.java +++ /dev/null @@ -1,3746 +0,0 @@ -/* Generated By:JJTree&JavaCC: Do not edit this line. EJBQL.java */ -package org.ow2.jonas.deployment.ejb.ejbql; - -public class EJBQL/*@bgen(jjtree)*/implements EJBQLTreeConstants, EJBQLConstants {/*@bgen(jjtree)*/ - protected JJTEJBQLState jjtree = new JJTEJBQLState(); - - final public SimpleNode EJBQL() throws ParseException { - /*@bgen(jjtree) EJBQL */ - ASTEJBQL jjtn000 = new ASTEJBQL(JJTEJBQL); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - SelectClause(); - FromClause(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case WHERE: - WhereClause(); - break; - default: - jj_la1[0] = jj_gen; - ; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case ORDERBY: - OrderByClause(); - break; - default: - jj_la1[1] = jj_gen; - ; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case LIMIT: - LimitClause(); - break; - default: - jj_la1[2] = jj_gen; - ; - } - jj_consume_token(0); - jjtree.closeNodeScope(jjtn000, true); - jjtc000 = false; - {if (true) return jjtn000;} - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - throw new Error("Missing return statement in function"); - } - - final public void FromClause() throws ParseException { - /*@bgen(jjtree) FromClause */ - ASTFromClause jjtn000 = new ASTFromClause(JJTFROMCLAUSE); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - jj_consume_token(FROM); - IdentificationVariableDeclaration(); - label_1: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case COMMA: - ; - break; - default: - jj_la1[3] = jj_gen; - break label_1; - } - jj_consume_token(COMMA); - IdentificationVariableDeclaration(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void IdentificationVariableDeclaration() throws ParseException { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IN: - CollectionMemberDeclaration(); - break; - case IDENTIFIER: - RangeVariableDeclaration(); - break; - default: - jj_la1[4] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - - final public void CollectionMemberDeclaration() throws ParseException { - /*@bgen(jjtree) CollectionMemberDeclaration */ - ASTCollectionMemberDeclaration jjtn000 = new ASTCollectionMemberDeclaration(JJTCOLLECTIONMEMBERDECLARATION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - jj_consume_token(IN); - jj_consume_token(LPAREN); - CollectionValuedPathExpression(); - jj_consume_token(RPAREN); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case AS: - jj_consume_token(AS); - break; - default: - jj_la1[5] = jj_gen; - ; - } - Identifier(); - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void RangeVariableDeclaration() throws ParseException { - /*@bgen(jjtree) RangeVariableDeclaration */ - ASTRangeVariableDeclaration jjtn000 = new ASTRangeVariableDeclaration(JJTRANGEVARIABLEDECLARATION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - AbstractSchemaName(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case AS: - jj_consume_token(AS); - break; - default: - jj_la1[6] = jj_gen; - ; - } - Identifier(); - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void SingleValuedPathExpression() throws ParseException { - /*@bgen(jjtree) SingleValuedPathExpression */ - ASTSingleValuedPathExpression jjtn000 = new ASTSingleValuedPathExpression(JJTSINGLEVALUEDPATHEXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - Path(); - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void CmpPathExpression() throws ParseException { - /*@bgen(jjtree) CmpPathExpression */ - ASTCmpPathExpression jjtn000 = new ASTCmpPathExpression(JJTCMPPATHEXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - Path(); - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void SingleValuedCmrPathExpression() throws ParseException { - /*@bgen(jjtree) SingleValuedCmrPathExpression */ - ASTSingleValuedCmrPathExpression jjtn000 = new ASTSingleValuedCmrPathExpression(JJTSINGLEVALUEDCMRPATHEXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - Path(); - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void CollectionValuedPathExpression() throws ParseException { - /*@bgen(jjtree) CollectionValuedPathExpression */ - ASTCollectionValuedPathExpression jjtn000 = new ASTCollectionValuedPathExpression(JJTCOLLECTIONVALUEDPATHEXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - Path(); - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void SelectClause() throws ParseException { - /*@bgen(jjtree) SelectClause */ - ASTSelectClause jjtn000 = new ASTSelectClause(JJTSELECTCLAUSE); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - jj_consume_token(SELECT); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case DISTINCT: - jj_consume_token(DISTINCT); - jjtn000.distinct=true; - break; - default: - jj_la1[7] = jj_gen; - ; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case AVG: - case COUNT: - case MAX: - case MIN: - case SUM: - case IDENTIFIER: - SelectExpression(); - break; - case OBJECT: - jj_consume_token(OBJECT); - jj_consume_token(LPAREN); - IdentificationVariable(); - jj_consume_token(RPAREN); - break; - default: - jj_la1[8] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void SelectExpression() throws ParseException { - /*@bgen(jjtree) SelectExpression */ - ASTSelectExpression jjtn000 = new ASTSelectExpression(JJTSELECTEXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENTIFIER: - SingleValuedPathExpression(); - break; - case AVG: - case COUNT: - case MAX: - case MIN: - case SUM: - AggregateSelectExpression(); - break; - default: - jj_la1[9] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void AggregateSelectExpression() throws ParseException { - /*@bgen(jjtree) AggregateSelectExpression */ - ASTAggregateSelectExpression jjtn000 = new ASTAggregateSelectExpression(JJTAGGREGATESELECTEXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000);Token t; - try { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case AVG: - case MAX: - case MIN: - case SUM: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case AVG: - t = jj_consume_token(AVG); - break; - case MAX: - t = jj_consume_token(MAX); - break; - case MIN: - t = jj_consume_token(MIN); - break; - case SUM: - t = jj_consume_token(SUM); - break; - default: - jj_la1[10] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jjtn000.ops.add(new Integer(t.kind)); - jj_consume_token(LPAREN); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case DISTINCT: - jj_consume_token(DISTINCT); - jjtn000.distinct=true; - break; - default: - jj_la1[11] = jj_gen; - ; - } - CmpPathExpression(); - jj_consume_token(RPAREN); - break; - case COUNT: - t = jj_consume_token(COUNT); - jjtn000.ops.add(new Integer(t.kind)); - jj_consume_token(LPAREN); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case DISTINCT: - jj_consume_token(DISTINCT); - jjtn000.distinct=true; - break; - default: - jj_la1[12] = jj_gen; - ; - } - if (jj_2_1(2147483647)) { - SingleValuedPathExpression(); - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENTIFIER: - IdentificationVariable(); - break; - default: - jj_la1[13] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - jj_consume_token(RPAREN); - break; - default: - jj_la1[14] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void OrderByClause() throws ParseException { - /*@bgen(jjtree) OrderByClause */ - ASTOrderByClause jjtn000 = new ASTOrderByClause(JJTORDERBYCLAUSE); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - jj_consume_token(ORDERBY); - OrderByItem(); - label_2: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case COMMA: - ; - break; - default: - jj_la1[15] = jj_gen; - break label_2; - } - jj_consume_token(COMMA); - OrderByItem(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void OrderByItem() throws ParseException { - /*@bgen(jjtree) OrderByItem */ - ASTOrderByItem jjtn000 = new ASTOrderByItem(JJTORDERBYITEM); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - CmpPathExpression(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case ASC: - case DESC: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case ASC: - jj_consume_token(ASC); - jjtn000.asc=true; - break; - case DESC: - jj_consume_token(DESC); - jjtn000.asc=false; - break; - default: - jj_la1[16] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - break; - default: - jj_la1[17] = jj_gen; - ; - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void LimitClause() throws ParseException { - /*@bgen(jjtree) LimitClause */ - ASTLimitClause jjtn000 = new ASTLimitClause(JJTLIMITCLAUSE); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - jj_consume_token(LIMIT); - LimitExpression(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case COMMA: - jj_consume_token(COMMA); - LimitExpression(); - break; - default: - jj_la1[18] = jj_gen; - ; - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void LimitExpression() throws ParseException { - /*@bgen(jjtree) LimitExpression */ - ASTLimitExpression jjtn000 = new ASTLimitExpression(JJTLIMITEXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case INTEGER_LITERAL: - IntegerLiteral(); - break; - case input_parameter: - InputParameter(); - break; - default: - jj_la1[19] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void WhereClause() throws ParseException { - /*@bgen(jjtree) WhereClause */ - ASTWhereClause jjtn000 = new ASTWhereClause(JJTWHERECLAUSE); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - jj_consume_token(WHERE); - ConditionalExpression(); - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void ConditionalExpression() throws ParseException { - /*@bgen(jjtree) ConditionalExpression */ - ASTConditionalExpression jjtn000 = new ASTConditionalExpression(JJTCONDITIONALEXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - ConditionalTerm(); - label_3: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case OR: - ; - break; - default: - jj_la1[20] = jj_gen; - break label_3; - } - jj_consume_token(OR); - ConditionalTerm(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void ConditionalTerm() throws ParseException { - /*@bgen(jjtree) ConditionalTerm */ - ASTConditionalTerm jjtn000 = new ASTConditionalTerm(JJTCONDITIONALTERM); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - ConditionalFactor(); - label_4: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case AND: - ; - break; - default: - jj_la1[21] = jj_gen; - break label_4; - } - jj_consume_token(AND); - ConditionalFactor(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void ConditionalFactor() throws ParseException { - /*@bgen(jjtree) ConditionalFactor */ - ASTConditionalFactor jjtn000 = new ASTConditionalFactor(JJTCONDITIONALFACTOR); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case NOT: - jj_consume_token(NOT); - jjtn000.not=true; - break; - default: - jj_la1[22] = jj_gen; - ; - } - ConditionalPrimary(); - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void ConditionalPrimary() throws ParseException { - if (jj_2_2(2147483647)) { - SimpleCondExpression(); - } else if (jj_2_3(2147483647)) { - jj_consume_token(LPAREN); - ConditionalExpression(); - jj_consume_token(RPAREN); - } else { - jj_consume_token(-1); - throw new ParseException(); - } - } - - final public void SimpleCondExpression() throws ParseException { - if (jj_2_4(2147483647)) { - ComparisonExpression(); - } else if (jj_2_5(2147483647)) { - BetweenExpression(); - } else if (jj_2_6(2147483647)) { - LikeExpression(); - } else if (jj_2_7(2147483647)) { - InExpression(); - } else if (jj_2_8(2147483647)) { - NullComparisonExpression(); - } else if (jj_2_9(2147483647)) { - EmptyCollectionComparisonExpression(); - } else if (jj_2_10(2147483647)) { - CollectionMemberExpression(); - } else { - jj_consume_token(-1); - throw new ParseException(); - } - } - - final public void BetweenExpression() throws ParseException { - /*@bgen(jjtree) BetweenExpression */ - ASTBetweenExpression jjtn000 = new ASTBetweenExpression(JJTBETWEENEXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - ArithmeticExpression(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case NOT: - jj_consume_token(NOT); - jjtn000.not=true; - break; - default: - jj_la1[23] = jj_gen; - ; - } - jj_consume_token(BETWEEN); - ArithmeticExpression(); - jj_consume_token(AND); - ArithmeticExpression(); - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void InExpression() throws ParseException { - /*@bgen(jjtree) InExpression */ - ASTInExpression jjtn000 = new ASTInExpression(JJTINEXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - CmpPathExpression(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case NOT: - jj_consume_token(NOT); - jjtn000.not=true; - break; - default: - jj_la1[24] = jj_gen; - ; - } - jj_consume_token(IN); - jj_consume_token(LPAREN); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case string_literal: - case FALSE: - case TRUE: - case INTEGER_LITERAL: - case FLOATING_POINT_LITERAL: - Literal(); - break; - case input_parameter: - InputParameter(); - break; - default: - jj_la1[25] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jjtn000.eltnum=1; - label_5: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case COMMA: - ; - break; - default: - jj_la1[26] = jj_gen; - break label_5; - } - jj_consume_token(COMMA); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case string_literal: - case FALSE: - case TRUE: - case INTEGER_LITERAL: - case FLOATING_POINT_LITERAL: - Literal(); - break; - case input_parameter: - InputParameter(); - break; - default: - jj_la1[27] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jjtn000.eltnum++; - } - jj_consume_token(RPAREN); - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void LikeExpression() throws ParseException { - /*@bgen(jjtree) LikeExpression */ - ASTLikeExpression jjtn000 = new ASTLikeExpression(JJTLIKEEXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - CmpPathExpression(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case NOT: - jj_consume_token(NOT); - jjtn000.not=true; - break; - default: - jj_la1[28] = jj_gen; - ; - } - jj_consume_token(LIKE); - PatternValue(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case ESCAPE: - jj_consume_token(ESCAPE); - jjtn000.third=true; - EscapeCharacter(); - break; - default: - jj_la1[29] = jj_gen; - ; - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void NullComparisonExpression() throws ParseException { - /*@bgen(jjtree) NullComparisonExpression */ - ASTNullComparisonExpression jjtn000 = new ASTNullComparisonExpression(JJTNULLCOMPARISONEXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENTIFIER: - SingleValuedPathExpression(); - break; - case input_parameter: - InputParameter(); - break; - default: - jj_la1[30] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jj_consume_token(IS); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case NOT: - jj_consume_token(NOT); - jjtn000.not=true; - break; - default: - jj_la1[31] = jj_gen; - ; - } - jj_consume_token(NULL); - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void EmptyCollectionComparisonExpression() throws ParseException { - /*@bgen(jjtree) EmptyCollectionComparisonExpression */ - ASTEmptyCollectionComparisonExpression jjtn000 = new ASTEmptyCollectionComparisonExpression(JJTEMPTYCOLLECTIONCOMPARISONEXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - CollectionValuedPathExpression(); - jj_consume_token(IS); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case NOT: - jj_consume_token(NOT); - jjtn000.not=true; - break; - default: - jj_la1[32] = jj_gen; - ; - } - jj_consume_token(EMPTY); - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void CollectionMemberExpression() throws ParseException { - /*@bgen(jjtree) CollectionMemberExpression */ - ASTCollectionMemberExpression jjtn000 = new ASTCollectionMemberExpression(JJTCOLLECTIONMEMBEREXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - if (jj_2_11(2)) { - SingleValuedCmrPathExpression(); - } else if (jj_2_12(2)) { - IdentificationVariable(); - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case input_parameter: - InputParameter(); - break; - default: - jj_la1[33] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case NOT: - jj_consume_token(NOT); - jjtn000.not=true; - break; - default: - jj_la1[34] = jj_gen; - ; - } - jj_consume_token(MEMBER); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case OF: - jj_consume_token(OF); - break; - default: - jj_la1[35] = jj_gen; - ; - } - CollectionValuedPathExpression(); - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void ComparisonExpression() throws ParseException { - /*@bgen(jjtree) ComparisonExpression */ - ASTComparisonExpression jjtn000 = new ASTComparisonExpression(JJTCOMPARISONEXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000);Token t; - try { - if (jj_2_13(2147483647)) { - StringValue(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case EQ: - t = jj_consume_token(EQ); - break; - case GT: - t = jj_consume_token(GT); - break; - case GE: - t = jj_consume_token(GE); - break; - case LT: - t = jj_consume_token(LT); - break; - case LE: - t = jj_consume_token(LE); - break; - case NE: - t = jj_consume_token(NE); - break; - default: - jj_la1[36] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jjtn000.ops.add(new Integer(t.kind)); - StringExpression(); - } else if (jj_2_14(2147483647)) { - BooleanValue(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case EQ: - t = jj_consume_token(EQ); - break; - case NE: - t = jj_consume_token(NE); - break; - default: - jj_la1[37] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jjtn000.ops.add(new Integer(t.kind)); - BooleanExpression(); - } else if (jj_2_15(2147483647)) { - DatetimeValue(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case EQ: - t = jj_consume_token(EQ); - break; - case GT: - t = jj_consume_token(GT); - break; - case GE: - t = jj_consume_token(GE); - break; - case LT: - t = jj_consume_token(LT); - break; - case LE: - t = jj_consume_token(LE); - break; - case NE: - t = jj_consume_token(NE); - break; - default: - jj_la1[38] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jjtn000.ops.add(new Integer(t.kind)); - DatetimeExpression(); - } else if (jj_2_16(2147483647)) { - EntityBeanValue(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case EQ: - t = jj_consume_token(EQ); - break; - case NE: - t = jj_consume_token(NE); - break; - default: - jj_la1[39] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jjtn000.ops.add(new Integer(t.kind)); - EntityBeanExpression(); - } else if (jj_2_17(2147483647)) { - ArithmeticValue(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case EQ: - t = jj_consume_token(EQ); - break; - case GT: - t = jj_consume_token(GT); - break; - case GE: - t = jj_consume_token(GE); - break; - case LT: - t = jj_consume_token(LT); - break; - case LE: - t = jj_consume_token(LE); - break; - case NE: - t = jj_consume_token(NE); - break; - default: - jj_la1[40] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jjtn000.ops.add(new Integer(t.kind)); - ArithmeticExpression(); - } else { - jj_consume_token(-1); - throw new ParseException(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void ArithmeticValue() throws ParseException { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENTIFIER: - CmpPathExpression(); - break; - case ABS: - case LENGTH: - case LOCATE: - case MOD: - case SQRT: - FunctionsReturningNumerics(); - break; - default: - jj_la1[41] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - - final public void ArithmeticExpression() throws ParseException { - /*@bgen(jjtree) ArithmeticExpression */ - ASTArithmeticExpression jjtn000 = new ASTArithmeticExpression(JJTARITHMETICEXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000);Token t; - try { - ArithmeticTerm(); - label_6: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case MINUS: - case PLUS: - ; - break; - default: - jj_la1[42] = jj_gen; - break label_6; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case PLUS: - t = jj_consume_token(PLUS); - break; - case MINUS: - t = jj_consume_token(MINUS); - break; - default: - jj_la1[43] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jjtn000.ops.add(new Integer(t.kind)); - ArithmeticTerm(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void ArithmeticTerm() throws ParseException { - /*@bgen(jjtree) ArithmeticTerm */ - ASTArithmeticTerm jjtn000 = new ASTArithmeticTerm(JJTARITHMETICTERM); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000);Token t; - try { - ArithmeticFactor(); - label_7: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case MULT: - case DIV: - ; - break; - default: - jj_la1[44] = jj_gen; - break label_7; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case MULT: - t = jj_consume_token(MULT); - break; - case DIV: - t = jj_consume_token(DIV); - break; - default: - jj_la1[45] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jjtn000.ops.add(new Integer(t.kind)); - ArithmeticFactor(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void ArithmeticFactor() throws ParseException { - /*@bgen(jjtree) ArithmeticFactor */ - ASTArithmeticFactor jjtn000 = new ASTArithmeticFactor(JJTARITHMETICFACTOR); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000);Token t=null; - try { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case MINUS: - case PLUS: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case PLUS: - t = jj_consume_token(PLUS); - break; - case MINUS: - t = jj_consume_token(MINUS); - break; - default: - jj_la1[46] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - break; - default: - jj_la1[47] = jj_gen; - ; - } - ArithmeticPrimary(); - jjtree.closeNodeScope(jjtn000, true); - jjtc000 = false; - jjtn000.ops.add(new Integer((t!=null)?t.kind:EJBQLConstants.PLUS)); - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void ArithmeticPrimary() throws ParseException { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENTIFIER: - CmpPathExpression(); - break; - case INTEGER_LITERAL: - case FLOATING_POINT_LITERAL: - ArithmeticLiteral(); - break; - case LPAREN: - jj_consume_token(LPAREN); - ArithmeticExpression(); - jj_consume_token(RPAREN); - break; - case input_parameter: - InputParameter(); - break; - case ABS: - case LENGTH: - case LOCATE: - case MOD: - case SQRT: - FunctionsReturningNumerics(); - break; - default: - jj_la1[48] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - - final public void StringValue() throws ParseException { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENTIFIER: - CmpPathExpression(); - break; - case CONCAT: - case SUBSTRING: - FunctionsReturningStrings(); - break; - default: - jj_la1[49] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - - final public void StringExpression() throws ParseException { - /*@bgen(jjtree) StringExpression */ - ASTStringExpression jjtn000 = new ASTStringExpression(JJTSTRINGEXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case LPAREN: - case CONCAT: - case SUBSTRING: - case string_literal: - case IDENTIFIER: - StringPrimary(); - break; - case input_parameter: - InputParameter(); - break; - default: - jj_la1[50] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void StringPrimary() throws ParseException { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENTIFIER: - CmpPathExpression(); - break; - case string_literal: - StringLiteral(); - break; - case LPAREN: - jj_consume_token(LPAREN); - StringExpression(); - jj_consume_token(RPAREN); - break; - case CONCAT: - case SUBSTRING: - FunctionsReturningStrings(); - break; - default: - jj_la1[51] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - - final public void DatetimeValue() throws ParseException { - CmpPathExpression(); - } - - final public void DatetimeExpression() throws ParseException { - /*@bgen(jjtree) DatetimeExpression */ - ASTDatetimeExpression jjtn000 = new ASTDatetimeExpression(JJTDATETIMEEXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENTIFIER: - DatetimeValue(); - break; - case input_parameter: - InputParameter(); - break; - default: - jj_la1[52] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void BooleanValue() throws ParseException { - CmpPathExpression(); - } - - final public void BooleanExpression() throws ParseException { - /*@bgen(jjtree) BooleanExpression */ - ASTBooleanExpression jjtn000 = new ASTBooleanExpression(JJTBOOLEANEXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000);Token t=null; - try { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENTIFIER: - CmpPathExpression(); - break; - case FALSE: - case TRUE: - BooleanLiteral(); - break; - case input_parameter: - InputParameter(); - jjtree.closeNodeScope(jjtn000, true); - jjtc000 = false; - if (t!=null) jjtn000.ops.add(new Integer(t.kind)); - break; - default: - jj_la1[53] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void EntityBeanValue() throws ParseException { - if (jj_2_18(2)) { - SingleValuedCmrPathExpression(); - } else if (jj_2_19(2)) { - IdentificationVariable(); - } else { - jj_consume_token(-1); - throw new ParseException(); - } - } - - final public void EntityBeanExpression() throws ParseException { - /*@bgen(jjtree) EntityBeanExpression */ - ASTEntityBeanExpression jjtn000 = new ASTEntityBeanExpression(JJTENTITYBEANEXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENTIFIER: - EntityBeanValue(); - break; - case input_parameter: - InputParameter(); - break; - default: - jj_la1[54] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void FunctionsReturningStrings() throws ParseException { - /*@bgen(jjtree) FunctionsReturningStrings */ - ASTFunctionsReturningStrings jjtn000 = new ASTFunctionsReturningStrings(JJTFUNCTIONSRETURNINGSTRINGS); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000);Token t; - try { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case CONCAT: - t = jj_consume_token(CONCAT); - jjtn000.ops.add(new Integer(t.kind)); - jj_consume_token(LPAREN); - StringExpression(); - jj_consume_token(COMMA); - StringExpression(); - jj_consume_token(RPAREN); - break; - case SUBSTRING: - t = jj_consume_token(SUBSTRING); - jjtn000.ops.add(new Integer(t.kind)); - jj_consume_token(LPAREN); - StringExpression(); - jj_consume_token(COMMA); - ArithmeticExpression(); - jj_consume_token(COMMA); - ArithmeticExpression(); - jj_consume_token(RPAREN); - break; - default: - jj_la1[55] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void FunctionsReturningNumerics() throws ParseException { - /*@bgen(jjtree) FunctionsReturningNumerics */ - ASTFunctionsReturningNumerics jjtn000 = new ASTFunctionsReturningNumerics(JJTFUNCTIONSRETURNINGNUMERICS); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000);Token t; - try { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case LENGTH: - t = jj_consume_token(LENGTH); - jjtn000.ops.add(new Integer(t.kind)); - jj_consume_token(LPAREN); - StringExpression(); - jj_consume_token(RPAREN); - break; - case LOCATE: - t = jj_consume_token(LOCATE); - jjtn000.ops.add(new Integer(t.kind)); - jj_consume_token(LPAREN); - StringExpression(); - jj_consume_token(COMMA); - StringExpression(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case COMMA: - jj_consume_token(COMMA); - jjtn000.third=true; - ArithmeticExpression(); - break; - default: - jj_la1[56] = jj_gen; - ; - } - jj_consume_token(RPAREN); - break; - case ABS: - t = jj_consume_token(ABS); - jjtn000.ops.add(new Integer(t.kind)); - jj_consume_token(LPAREN); - ArithmeticExpression(); - jj_consume_token(RPAREN); - break; - case SQRT: - t = jj_consume_token(SQRT); - jjtn000.ops.add(new Integer(t.kind)); - jj_consume_token(LPAREN); - ArithmeticExpression(); - jj_consume_token(RPAREN); - break; - case MOD: - t = jj_consume_token(MOD); - jjtn000.ops.add(new Integer(t.kind)); - jj_consume_token(LPAREN); - ArithmeticExpression(); - jj_consume_token(COMMA); - ArithmeticExpression(); - jj_consume_token(RPAREN); - break; - default: - jj_la1[57] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void PatternValue() throws ParseException { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case string_literal: - StringLiteral(); - break; - case input_parameter: - InputParameter(); - break; - default: - jj_la1[58] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - - final public void EscapeCharacter() throws ParseException { - StringLiteral(); - } - - final public void AbstractSchemaName() throws ParseException { - /*@bgen(jjtree) AbstractSchemaName */ - ASTAbstractSchemaName jjtn000 = new ASTAbstractSchemaName(JJTABSTRACTSCHEMANAME); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000);Token t; - try { - t = jj_consume_token(IDENTIFIER); - jjtree.closeNodeScope(jjtn000, true); - jjtc000 = false; - jjtn000.value= t.image; - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void IdentificationVariable() throws ParseException { - /*@bgen(jjtree) IdentificationVariable */ - ASTIdentificationVariable jjtn000 = new ASTIdentificationVariable(JJTIDENTIFICATIONVARIABLE); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000);Token t; - try { - t = jj_consume_token(IDENTIFIER); - jjtree.closeNodeScope(jjtn000, true); - jjtc000 = false; - jjtn000.value= t.image; - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void Identifier() throws ParseException { - /*@bgen(jjtree) Identifier */ - ASTIdentifier jjtn000 = new ASTIdentifier(JJTIDENTIFIER); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000);Token t; - try { - t = jj_consume_token(IDENTIFIER); - jjtree.closeNodeScope(jjtn000, true); - jjtc000 = false; - jjtn000.value= t.image; - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void Path() throws ParseException { - /*@bgen(jjtree) Path */ - ASTPath jjtn000 = new ASTPath(JJTPATH); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000);Token t; - try { - t = jj_consume_token(IDENTIFIER); - jjtn000.value= t.image; - jj_consume_token(DOT); - t = jj_consume_token(IDENTIFIER); - jjtn000.value = jjtn000.value + "."+t.image; - label_8: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case DOT: - ; - break; - default: - jj_la1[59] = jj_gen; - break label_8; - } - jj_consume_token(DOT); - t = jj_consume_token(IDENTIFIER); - jjtn000.value = jjtn000.value + "."+t.image; - } - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void Literal() throws ParseException { - /*@bgen(jjtree) Literal */ - ASTLiteral jjtn000 = new ASTLiteral(JJTLITERAL); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case string_literal: - StringLiteral(); - break; - case INTEGER_LITERAL: - case FLOATING_POINT_LITERAL: - ArithmeticLiteral(); - break; - case FALSE: - case TRUE: - BooleanLiteral(); - break; - default: - jj_la1[60] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void StringLiteral() throws ParseException { - /*@bgen(jjtree) StringLiteral */ - ASTStringLiteral jjtn000 = new ASTStringLiteral(JJTSTRINGLITERAL); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000);Token t; - try { - t = jj_consume_token(string_literal); - jjtree.closeNodeScope(jjtn000, true); - jjtc000 = false; - jjtn000.value= t.image.substring(1,t.image.length()-1); - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void ArithmeticLiteral() throws ParseException { - /*@bgen(jjtree) ArithmeticLiteral */ - ASTArithmeticLiteral jjtn000 = new ASTArithmeticLiteral(JJTARITHMETICLITERAL); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); - try { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case INTEGER_LITERAL: - IntegerLiteral(); - break; - case FLOATING_POINT_LITERAL: - FloatingPointLiteral(); - break; - default: - jj_la1[61] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } catch (Throwable jjte000) { - if (jjtc000) { - jjtree.clearNodeScope(jjtn000); - jjtc000 = false; - } else { - jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { - {if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { - {if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void IntegerLiteral() throws ParseException { - /*@bgen(jjtree) IntegerLiteral */ - ASTIntegerLiteral jjtn000 = new ASTIntegerLiteral(JJTINTEGERLITERAL); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000);Token t; - try { - t = jj_consume_token(INTEGER_LITERAL); - jjtree.closeNodeScope(jjtn000, true); - jjtc000 = false; - jjtn000.value= new Long(t.image); - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void FloatingPointLiteral() throws ParseException { - /*@bgen(jjtree) FloatingPointLiteral */ - ASTFloatingPointLiteral jjtn000 = new ASTFloatingPointLiteral(JJTFLOATINGPOINTLITERAL); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000);Token t; - try { - t = jj_consume_token(FLOATING_POINT_LITERAL); - jjtree.closeNodeScope(jjtn000, true); - jjtc000 = false; - jjtn000.value= new Double(t.image); - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void BooleanLiteral() throws ParseException { - /*@bgen(jjtree) BooleanLiteral */ - ASTBooleanLiteral jjtn000 = new ASTBooleanLiteral(JJTBOOLEANLITERAL); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000);Token t; - try { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case TRUE: - t = jj_consume_token(TRUE); - jjtree.closeNodeScope(jjtn000, true); - jjtc000 = false; - jjtn000.value= Boolean.TRUE; - break; - case FALSE: - t = jj_consume_token(FALSE); - jjtree.closeNodeScope(jjtn000, true); - jjtc000 = false; - jjtn000.value= Boolean.FALSE; - break; - default: - jj_la1[62] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final public void InputParameter() throws ParseException { - /*@bgen(jjtree) InputParameter */ - ASTInputParameter jjtn000 = new ASTInputParameter(JJTINPUTPARAMETER); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000);Token t; - try { - t = jj_consume_token(input_parameter); - jjtree.closeNodeScope(jjtn000, true); - jjtc000 = false; - jjtn000.value= new Integer(t.image.substring(1)); - } finally { - if (jjtc000) { - jjtree.closeNodeScope(jjtn000, true); - } - } - } - - final private boolean jj_2_1(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_1(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(0, xla); } - } - - final private boolean jj_2_2(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_2(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(1, xla); } - } - - final private boolean jj_2_3(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_3(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(2, xla); } - } - - final private boolean jj_2_4(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_4(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(3, xla); } - } - - final private boolean jj_2_5(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_5(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(4, xla); } - } - - final private boolean jj_2_6(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_6(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(5, xla); } - } - - final private boolean jj_2_7(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_7(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(6, xla); } - } - - final private boolean jj_2_8(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_8(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(7, xla); } - } - - final private boolean jj_2_9(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_9(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(8, xla); } - } - - final private boolean jj_2_10(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_10(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(9, xla); } - } - - final private boolean jj_2_11(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_11(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(10, xla); } - } - - final private boolean jj_2_12(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_12(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(11, xla); } - } - - final private boolean jj_2_13(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_13(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(12, xla); } - } - - final private boolean jj_2_14(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_14(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(13, xla); } - } - - final private boolean jj_2_15(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_15(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(14, xla); } - } - - final private boolean jj_2_16(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_16(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(15, xla); } - } - - final private boolean jj_2_17(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_17(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(16, xla); } - } - - final private boolean jj_2_18(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_18(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(17, xla); } - } - - final private boolean jj_2_19(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_19(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(18, xla); } - } - - final private boolean jj_3R_120() { - if (jj_scan_token(LPAREN)) return true; - if (jj_3R_30()) return true; - if (jj_scan_token(RPAREN)) return true; - return false; - } - - final private boolean jj_3R_102() { - if (jj_3R_95()) return true; - return false; - } - - final private boolean jj_3R_23() { - if (jj_3R_47()) return true; - return false; - } - - final private boolean jj_3_1() { - if (jj_3R_9()) return true; - return false; - } - - final private boolean jj_3R_69() { - if (jj_3R_25()) return true; - return false; - } - - final private boolean jj_3R_26() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_69()) { - jj_scanpos = xsp; - if (jj_3R_70()) return true; - } - return false; - } - - final private boolean jj_3R_65() { - if (jj_3R_84()) return true; - return false; - } - - final private boolean jj_3R_63() { - if (jj_3R_87()) return true; - return false; - } - - final private boolean jj_3R_25() { - if (jj_3R_47()) return true; - return false; - } - - final private boolean jj_3R_122() { - if (jj_3R_90()) return true; - return false; - } - - final private boolean jj_3R_119() { - if (jj_3R_116()) return true; - return false; - } - - final private boolean jj_3R_101() { - if (jj_3R_47()) return true; - return false; - } - - final private boolean jj_3R_88() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_101()) { - jj_scanpos = xsp; - if (jj_3R_102()) { - jj_scanpos = xsp; - if (jj_3R_103()) { - jj_scanpos = xsp; - if (jj_3R_104()) return true; - } - } - } - return false; - } - - final private boolean jj_3R_64() { - if (jj_3R_88()) return true; - return false; - } - - final private boolean jj_3R_22() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_64()) { - jj_scanpos = xsp; - if (jj_3R_65()) return true; - } - return false; - } - - final private boolean jj_3R_62() { - if (jj_3R_47()) return true; - return false; - } - - final private boolean jj_3R_21() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_62()) { - jj_scanpos = xsp; - if (jj_3R_63()) return true; - } - return false; - } - - final private boolean jj_3R_92() { - Token xsp; - xsp = jj_scanpos; - if (jj_scan_token(6)) { - jj_scanpos = xsp; - if (jj_scan_token(11)) return true; - } - if (jj_3R_91()) return true; - return false; - } - - final private boolean jj_3R_121() { - if (jj_3R_84()) return true; - return false; - } - - final private boolean jj_3R_118() { - if (jj_3R_47()) return true; - return false; - } - - final private boolean jj_3R_113() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_118()) { - jj_scanpos = xsp; - if (jj_3R_119()) { - jj_scanpos = xsp; - if (jj_3R_120()) { - jj_scanpos = xsp; - if (jj_3R_121()) { - jj_scanpos = xsp; - if (jj_3R_122()) return true; - } - } - } - } - return false; - } - - final private boolean jj_3R_76() { - Token xsp; - xsp = jj_scanpos; - if (jj_scan_token(8)) { - jj_scanpos = xsp; - if (jj_scan_token(5)) return true; - } - if (jj_3R_75()) return true; - return false; - } - - final private boolean jj_3R_74() { - if (jj_3R_90()) return true; - return false; - } - - final private boolean jj_3R_117() { - if (jj_scan_token(COMMA)) return true; - if (jj_3R_30()) return true; - return false; - } - - final private boolean jj_3R_112() { - Token xsp; - xsp = jj_scanpos; - if (jj_scan_token(8)) { - jj_scanpos = xsp; - if (jj_scan_token(5)) return true; - } - return false; - } - - final private boolean jj_3R_91() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_112()) jj_scanpos = xsp; - if (jj_3R_113()) return true; - return false; - } - - final private boolean jj_3R_58() { - if (jj_3R_31()) return true; - return false; - } - - final private boolean jj_3R_84() { - if (jj_scan_token(input_parameter)) return true; - return false; - } - - final private boolean jj_3R_98() { - if (jj_3R_89()) return true; - return false; - } - - final private boolean jj_3R_75() { - if (jj_3R_91()) return true; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_92()) { jj_scanpos = xsp; break; } - } - return false; - } - - final private boolean jj_3R_19() { - if (jj_3R_31()) return true; - return false; - } - - final private boolean jj_3R_106() { - if (jj_scan_token(FALSE)) return true; - return false; - } - - final private boolean jj_3R_124() { - if (jj_3R_126()) return true; - return false; - } - - final private boolean jj_3R_105() { - if (jj_scan_token(TRUE)) return true; - return false; - } - - final private boolean jj_3R_89() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_105()) { - jj_scanpos = xsp; - if (jj_3R_106()) return true; - } - return false; - } - - final private boolean jj_3R_30() { - if (jj_3R_75()) return true; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_76()) { jj_scanpos = xsp; break; } - } - return false; - } - - final private boolean jj_3R_47() { - if (jj_3R_31()) return true; - return false; - } - - final private boolean jj_3_17() { - if (jj_3R_29()) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_scan_token(9)) { - jj_scanpos = xsp; - if (jj_scan_token(13)) { - jj_scanpos = xsp; - if (jj_scan_token(7)) { - jj_scanpos = xsp; - if (jj_scan_token(18)) { - jj_scanpos = xsp; - if (jj_scan_token(10)) { - jj_scanpos = xsp; - if (jj_scan_token(16)) return true; - } - } - } - } - } - if (jj_3R_30()) return true; - return false; - } - - final private boolean jj_3_16() { - if (jj_3R_27()) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_scan_token(9)) { - jj_scanpos = xsp; - if (jj_scan_token(16)) return true; - } - if (jj_3R_28()) return true; - return false; - } - - final private boolean jj_3R_126() { - if (jj_scan_token(FLOATING_POINT_LITERAL)) return true; - return false; - } - - final private boolean jj_3R_73() { - if (jj_3R_47()) return true; - return false; - } - - final private boolean jj_3R_29() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_73()) { - jj_scanpos = xsp; - if (jj_3R_74()) return true; - } - return false; - } - - final private boolean jj_3R_9() { - if (jj_3R_31()) return true; - return false; - } - - final private boolean jj_3_15() { - if (jj_3R_25()) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_scan_token(9)) { - jj_scanpos = xsp; - if (jj_scan_token(13)) { - jj_scanpos = xsp; - if (jj_scan_token(7)) { - jj_scanpos = xsp; - if (jj_scan_token(18)) { - jj_scanpos = xsp; - if (jj_scan_token(10)) { - jj_scanpos = xsp; - if (jj_scan_token(16)) return true; - } - } - } - } - } - if (jj_3R_26()) return true; - return false; - } - - final private boolean jj_3_14() { - if (jj_3R_23()) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_scan_token(9)) { - jj_scanpos = xsp; - if (jj_scan_token(16)) return true; - } - if (jj_3R_24()) return true; - return false; - } - - final private boolean jj_3R_125() { - if (jj_scan_token(INTEGER_LITERAL)) return true; - return false; - } - - final private boolean jj_3_13() { - if (jj_3R_21()) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_scan_token(9)) { - jj_scanpos = xsp; - if (jj_scan_token(13)) { - jj_scanpos = xsp; - if (jj_scan_token(7)) { - jj_scanpos = xsp; - if (jj_scan_token(18)) { - jj_scanpos = xsp; - if (jj_scan_token(10)) { - jj_scanpos = xsp; - if (jj_scan_token(16)) return true; - } - } - } - } - } - if (jj_3R_22()) return true; - return false; - } - - final private boolean jj_3R_45() { - if (jj_3R_29()) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_scan_token(9)) { - jj_scanpos = xsp; - if (jj_scan_token(13)) { - jj_scanpos = xsp; - if (jj_scan_token(7)) { - jj_scanpos = xsp; - if (jj_scan_token(18)) { - jj_scanpos = xsp; - if (jj_scan_token(10)) { - jj_scanpos = xsp; - if (jj_scan_token(16)) return true; - } - } - } - } - } - if (jj_3R_30()) return true; - return false; - } - - final private boolean jj_3R_56() { - if (jj_3R_84()) return true; - return false; - } - - final private boolean jj_3R_97() { - if (jj_3R_116()) return true; - return false; - } - - final private boolean jj_3R_44() { - if (jj_3R_27()) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_scan_token(9)) { - jj_scanpos = xsp; - if (jj_scan_token(16)) return true; - } - if (jj_3R_28()) return true; - return false; - } - - final private boolean jj_3R_43() { - if (jj_3R_25()) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_scan_token(9)) { - jj_scanpos = xsp; - if (jj_scan_token(13)) { - jj_scanpos = xsp; - if (jj_scan_token(7)) { - jj_scanpos = xsp; - if (jj_scan_token(18)) { - jj_scanpos = xsp; - if (jj_scan_token(10)) { - jj_scanpos = xsp; - if (jj_scan_token(16)) return true; - } - } - } - } - } - if (jj_3R_26()) return true; - return false; - } - - final private boolean jj_3R_123() { - if (jj_3R_125()) return true; - return false; - } - - final private boolean jj_3R_116() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_123()) { - jj_scanpos = xsp; - if (jj_3R_124()) return true; - } - return false; - } - - final private boolean jj_3R_42() { - if (jj_3R_23()) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_scan_token(9)) { - jj_scanpos = xsp; - if (jj_scan_token(16)) return true; - } - if (jj_3R_24()) return true; - return false; - } - - final private boolean jj_3R_12() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_41()) { - jj_scanpos = xsp; - if (jj_3R_42()) { - jj_scanpos = xsp; - if (jj_3R_43()) { - jj_scanpos = xsp; - if (jj_3R_44()) { - jj_scanpos = xsp; - if (jj_3R_45()) return true; - } - } - } - } - return false; - } - - final private boolean jj_3R_41() { - if (jj_3R_21()) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_scan_token(9)) { - jj_scanpos = xsp; - if (jj_scan_token(13)) { - jj_scanpos = xsp; - if (jj_scan_token(7)) { - jj_scanpos = xsp; - if (jj_scan_token(18)) { - jj_scanpos = xsp; - if (jj_scan_token(10)) { - jj_scanpos = xsp; - if (jj_scan_token(16)) return true; - } - } - } - } - } - if (jj_3R_22()) return true; - return false; - } - - final private boolean jj_3R_61() { - if (jj_scan_token(NOT)) return true; - return false; - } - - final private boolean jj_3R_50() { - if (jj_scan_token(ESCAPE)) return true; - if (jj_3R_82()) return true; - return false; - } - - final private boolean jj_3R_95() { - if (jj_scan_token(string_literal)) return true; - return false; - } - - final private boolean jj_3R_86() { - if (jj_3R_84()) return true; - return false; - } - - final private boolean jj_3R_60() { - if (jj_3R_84()) return true; - return false; - } - - final private boolean jj_3_12() { - if (jj_3R_20()) return true; - return false; - } - - final private boolean jj_3R_53() { - if (jj_3R_84()) return true; - return false; - } - - final private boolean jj_3_11() { - if (jj_3R_19()) return true; - return false; - } - - final private boolean jj_3R_48() { - if (jj_scan_token(NOT)) return true; - return false; - } - - final private boolean jj_3R_18() { - Token xsp; - xsp = jj_scanpos; - if (jj_3_11()) { - jj_scanpos = xsp; - if (jj_3_12()) { - jj_scanpos = xsp; - if (jj_3R_60()) return true; - } - } - xsp = jj_scanpos; - if (jj_3R_61()) jj_scanpos = xsp; - if (jj_scan_token(MEMBER)) return true; - xsp = jj_scanpos; - if (jj_scan_token(45)) jj_scanpos = xsp; - if (jj_3R_58()) return true; - return false; - } - - final private boolean jj_3R_96() { - if (jj_3R_95()) return true; - return false; - } - - final private boolean jj_3R_83() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_96()) { - jj_scanpos = xsp; - if (jj_3R_97()) { - jj_scanpos = xsp; - if (jj_3R_98()) return true; - } - } - return false; - } - - final private boolean jj_3R_59() { - if (jj_scan_token(NOT)) return true; - return false; - } - - final private boolean jj_3R_77() { - if (jj_scan_token(DOT)) return true; - if (jj_scan_token(IDENTIFIER)) return true; - return false; - } - - final private boolean jj_3R_17() { - if (jj_3R_58()) return true; - if (jj_scan_token(IS)) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_59()) jj_scanpos = xsp; - if (jj_scan_token(EMPTY)) return true; - return false; - } - - final private boolean jj_3R_51() { - if (jj_scan_token(NOT)) return true; - return false; - } - - final private boolean jj_3R_85() { - if (jj_3R_83()) return true; - return false; - } - - final private boolean jj_3R_57() { - if (jj_scan_token(NOT)) return true; - return false; - } - - final private boolean jj_3R_31() { - if (jj_scan_token(IDENTIFIER)) return true; - if (jj_scan_token(DOT)) return true; - if (jj_scan_token(IDENTIFIER)) return true; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_77()) { jj_scanpos = xsp; break; } - } - return false; - } - - final private boolean jj_3R_52() { - if (jj_3R_83()) return true; - return false; - } - - final private boolean jj_3R_46() { - if (jj_scan_token(NOT)) return true; - return false; - } - - final private boolean jj_3R_55() { - if (jj_3R_9()) return true; - return false; - } - - final private boolean jj_3R_16() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_55()) { - jj_scanpos = xsp; - if (jj_3R_56()) return true; - } - if (jj_scan_token(IS)) return true; - xsp = jj_scanpos; - if (jj_3R_57()) jj_scanpos = xsp; - if (jj_scan_token(NULL)) return true; - return false; - } - - final private boolean jj_3R_54() { - if (jj_scan_token(COMMA)) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_85()) { - jj_scanpos = xsp; - if (jj_3R_86()) return true; - } - return false; - } - - final private boolean jj_3R_14() { - if (jj_3R_47()) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_48()) jj_scanpos = xsp; - if (jj_scan_token(LIKE)) return true; - if (jj_3R_49()) return true; - xsp = jj_scanpos; - if (jj_3R_50()) jj_scanpos = xsp; - return false; - } - - final private boolean jj_3R_20() { - if (jj_scan_token(IDENTIFIER)) return true; - return false; - } - - final private boolean jj_3R_15() { - if (jj_3R_47()) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_51()) jj_scanpos = xsp; - if (jj_scan_token(IN)) return true; - if (jj_scan_token(LPAREN)) return true; - xsp = jj_scanpos; - if (jj_3R_52()) { - jj_scanpos = xsp; - if (jj_3R_53()) return true; - } - while (true) { - xsp = jj_scanpos; - if (jj_3R_54()) { jj_scanpos = xsp; break; } - } - if (jj_scan_token(RPAREN)) return true; - return false; - } - - final private boolean jj_3_10() { - if (jj_3R_18()) return true; - return false; - } - - final private boolean jj_3R_81() { - if (jj_3R_84()) return true; - return false; - } - - final private boolean jj_3_9() { - if (jj_3R_17()) return true; - return false; - } - - final private boolean jj_3_8() { - if (jj_3R_16()) return true; - return false; - } - - final private boolean jj_3_7() { - if (jj_3R_15()) return true; - return false; - } - - final private boolean jj_3_6() { - if (jj_3R_14()) return true; - return false; - } - - final private boolean jj_3_19() { - if (jj_3R_20()) return true; - return false; - } - - final private boolean jj_3R_13() { - if (jj_3R_30()) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_46()) jj_scanpos = xsp; - if (jj_scan_token(BETWEEN)) return true; - if (jj_3R_30()) return true; - if (jj_scan_token(AND)) return true; - if (jj_3R_30()) return true; - return false; - } - - final private boolean jj_3_5() { - if (jj_3R_13()) return true; - return false; - } - - final private boolean jj_3R_104() { - if (jj_3R_87()) return true; - return false; - } - - final private boolean jj_3_4() { - if (jj_3R_12()) return true; - return false; - } - - final private boolean jj_3R_38() { - if (jj_3R_18()) return true; - return false; - } - - final private boolean jj_3R_37() { - if (jj_3R_17()) return true; - return false; - } - - final private boolean jj_3R_36() { - if (jj_3R_16()) return true; - return false; - } - - final private boolean jj_3R_82() { - if (jj_3R_95()) return true; - return false; - } - - final private boolean jj_3_3() { - if (jj_scan_token(LPAREN)) return true; - if (jj_3R_11()) return true; - if (jj_scan_token(RPAREN)) return true; - return false; - } - - final private boolean jj_3R_35() { - if (jj_3R_15()) return true; - return false; - } - - final private boolean jj_3R_34() { - if (jj_3R_14()) return true; - return false; - } - - final private boolean jj_3R_33() { - if (jj_3R_13()) return true; - return false; - } - - final private boolean jj_3_2() { - if (jj_3R_10()) return true; - return false; - } - - final private boolean jj_3R_79() { - if (jj_scan_token(AND)) return true; - if (jj_3R_78()) return true; - return false; - } - - final private boolean jj_3R_10() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_32()) { - jj_scanpos = xsp; - if (jj_3R_33()) { - jj_scanpos = xsp; - if (jj_3R_34()) { - jj_scanpos = xsp; - if (jj_3R_35()) { - jj_scanpos = xsp; - if (jj_3R_36()) { - jj_scanpos = xsp; - if (jj_3R_37()) { - jj_scanpos = xsp; - if (jj_3R_38()) return true; - } - } - } - } - } - } - return false; - } - - final private boolean jj_3R_32() { - if (jj_3R_12()) return true; - return false; - } - - final private boolean jj_3R_80() { - if (jj_3R_95()) return true; - return false; - } - - final private boolean jj_3R_68() { - if (jj_3R_84()) return true; - return false; - } - - final private boolean jj_3R_49() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_80()) { - jj_scanpos = xsp; - if (jj_3R_81()) return true; - } - return false; - } - - final private boolean jj_3R_115() { - if (jj_scan_token(LPAREN)) return true; - if (jj_3R_11()) return true; - if (jj_scan_token(RPAREN)) return true; - return false; - } - - final private boolean jj_3R_111() { - if (jj_scan_token(MOD)) return true; - if (jj_scan_token(LPAREN)) return true; - if (jj_3R_30()) return true; - if (jj_scan_token(COMMA)) return true; - if (jj_3R_30()) return true; - if (jj_scan_token(RPAREN)) return true; - return false; - } - - final private boolean jj_3R_110() { - if (jj_scan_token(SQRT)) return true; - if (jj_scan_token(LPAREN)) return true; - if (jj_3R_30()) return true; - if (jj_scan_token(RPAREN)) return true; - return false; - } - - final private boolean jj_3R_72() { - if (jj_3R_84()) return true; - return false; - } - - final private boolean jj_3R_109() { - if (jj_scan_token(ABS)) return true; - if (jj_scan_token(LPAREN)) return true; - if (jj_3R_30()) return true; - if (jj_scan_token(RPAREN)) return true; - return false; - } - - final private boolean jj_3R_108() { - if (jj_scan_token(LOCATE)) return true; - if (jj_scan_token(LPAREN)) return true; - if (jj_3R_22()) return true; - if (jj_scan_token(COMMA)) return true; - if (jj_3R_22()) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_117()) jj_scanpos = xsp; - if (jj_scan_token(RPAREN)) return true; - return false; - } - - final private boolean jj_3R_40() { - if (jj_scan_token(OR)) return true; - if (jj_3R_39()) return true; - return false; - } - - final private boolean jj_3R_114() { - if (jj_3R_10()) return true; - return false; - } - - final private boolean jj_3R_94() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_114()) { - jj_scanpos = xsp; - if (jj_3R_115()) return true; - } - return false; - } - - final private boolean jj_3R_107() { - if (jj_scan_token(LENGTH)) return true; - if (jj_scan_token(LPAREN)) return true; - if (jj_3R_22()) return true; - if (jj_scan_token(RPAREN)) return true; - return false; - } - - final private boolean jj_3R_90() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_107()) { - jj_scanpos = xsp; - if (jj_3R_108()) { - jj_scanpos = xsp; - if (jj_3R_109()) { - jj_scanpos = xsp; - if (jj_3R_110()) { - jj_scanpos = xsp; - if (jj_3R_111()) return true; - } - } - } - } - return false; - } - - final private boolean jj_3R_93() { - if (jj_scan_token(NOT)) return true; - return false; - } - - final private boolean jj_3R_78() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_93()) jj_scanpos = xsp; - if (jj_3R_94()) return true; - return false; - } - - final private boolean jj_3R_100() { - if (jj_scan_token(SUBSTRING)) return true; - if (jj_scan_token(LPAREN)) return true; - if (jj_3R_22()) return true; - if (jj_scan_token(COMMA)) return true; - if (jj_3R_30()) return true; - if (jj_scan_token(COMMA)) return true; - if (jj_3R_30()) return true; - if (jj_scan_token(RPAREN)) return true; - return false; - } - - final private boolean jj_3R_99() { - if (jj_scan_token(CONCAT)) return true; - if (jj_scan_token(LPAREN)) return true; - if (jj_3R_22()) return true; - if (jj_scan_token(COMMA)) return true; - if (jj_3R_22()) return true; - if (jj_scan_token(RPAREN)) return true; - return false; - } - - final private boolean jj_3R_87() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_99()) { - jj_scanpos = xsp; - if (jj_3R_100()) return true; - } - return false; - } - - final private boolean jj_3R_67() { - if (jj_3R_89()) return true; - return false; - } - - final private boolean jj_3R_39() { - if (jj_3R_78()) return true; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_79()) { jj_scanpos = xsp; break; } - } - return false; - } - - final private boolean jj_3R_103() { - if (jj_scan_token(LPAREN)) return true; - if (jj_3R_22()) return true; - if (jj_scan_token(RPAREN)) return true; - return false; - } - - final private boolean jj_3R_71() { - if (jj_3R_27()) return true; - return false; - } - - final private boolean jj_3R_28() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_71()) { - jj_scanpos = xsp; - if (jj_3R_72()) return true; - } - return false; - } - - final private boolean jj_3R_11() { - if (jj_3R_39()) return true; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_40()) { jj_scanpos = xsp; break; } - } - return false; - } - - final private boolean jj_3_18() { - if (jj_3R_19()) return true; - return false; - } - - final private boolean jj_3R_27() { - Token xsp; - xsp = jj_scanpos; - if (jj_3_18()) { - jj_scanpos = xsp; - if (jj_3_19()) return true; - } - return false; - } - - final private boolean jj_3R_70() { - if (jj_3R_84()) return true; - return false; - } - - final private boolean jj_3R_66() { - if (jj_3R_47()) return true; - return false; - } - - final private boolean jj_3R_24() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_66()) { - jj_scanpos = xsp; - if (jj_3R_67()) { - jj_scanpos = xsp; - if (jj_3R_68()) return true; - } - } - return false; - } - - public EJBQLTokenManager token_source; - SimpleCharStream jj_input_stream; - public Token token, jj_nt; - private int jj_ntk; - private Token jj_scanpos, jj_lastpos; - private int jj_la; - public boolean lookingAhead = false; - private boolean jj_semLA; - private int jj_gen; - final private int[] jj_la1 = new int[63]; - static private int[] jj_la1_0; - static private int[] jj_la1_1; - static private int[] jj_la1_2; - static { - jj_la1_0(); - jj_la1_1(); - jj_la1_2(); - } - private static void jj_la1_0() { - jj_la1_0 = new int[] {0x0,0x0,0x0,0x4000,0x0,0x200000,0x200000,0x10000000,0x4800000,0x4800000,0x800000,0x10000000,0x10000000,0x0,0x4800000,0x4000,0x8400000,0x8400000,0x4000,0x0,0x0,0x100000,0x0,0x0,0x0,0x0,0x4000,0x0,0x0,0x40000000,0x0,0x0,0x0,0x0,0x0,0x0,0x52680,0x10200,0x52680,0x10200,0x52680,0x80000,0x120,0x120,0x840,0x840,0x120,0x120,0xa0000,0x2000000,0x2020000,0x2020000,0x0,0x0,0x0,0x2000000,0x4000,0x80000,0x0,0x1000,0x0,0x0,0x0,}; - } - private static void jj_la1_1() { - jj_la1_1 = new int[] {0x100000,0x8000,0x10,0x0,0x80000001,0x0,0x0,0x0,0x80081140,0x80080140,0x80140,0x0,0x0,0x80000000,0x80140,0x0,0x0,0x0,0x0,0x2400000,0x4000,0x0,0x400,0x400,0x400,0x23e00000,0x0,0x23e00000,0x400,0x0,0x80400000,0x400,0x400,0x400000,0x400,0x2000,0x0,0x0,0x0,0x0,0x0,0x80020224,0x0,0x0,0x0,0x0,0x0,0x0,0xa2420224,0x80040000,0x80640000,0x80240000,0x80400000,0x81c00000,0x80400000,0x40000,0x0,0x20224,0x600000,0x0,0x23a00000,0x22000000,0x1800000,}; - } - private static void jj_la1_2() { - jj_la1_2 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; - } - final private JJCalls[] jj_2_rtns = new JJCalls[19]; - private boolean jj_rescan = false; - private int jj_gc = 0; - - public EJBQL(java.io.InputStream stream) { - jj_input_stream = new SimpleCharStream(stream, 1, 1); - token_source = new EJBQLTokenManager(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 63; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - public void ReInit(java.io.InputStream stream) { - jj_input_stream.ReInit(stream, 1, 1); - token_source.ReInit(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jjtree.reset(); - jj_gen = 0; - for (int i = 0; i < 63; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - public EJBQL(java.io.Reader stream) { - jj_input_stream = new SimpleCharStream(stream, 1, 1); - token_source = new EJBQLTokenManager(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 63; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - public void ReInit(java.io.Reader stream) { - jj_input_stream.ReInit(stream, 1, 1); - token_source.ReInit(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jjtree.reset(); - jj_gen = 0; - for (int i = 0; i < 63; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - public EJBQL(EJBQLTokenManager tm) { - token_source = tm; - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 63; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - public void ReInit(EJBQLTokenManager tm) { - token_source = tm; - token = new Token(); - jj_ntk = -1; - jjtree.reset(); - jj_gen = 0; - for (int i = 0; i < 63; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - final private Token jj_consume_token(int kind) throws ParseException { - Token oldToken; - if ((oldToken = token).next != null) token = token.next; - else token = token.next = token_source.getNextToken(); - jj_ntk = -1; - if (token.kind == kind) { - jj_gen++; - if (++jj_gc > 100) { - jj_gc = 0; - for (int i = 0; i < jj_2_rtns.length; i++) { - JJCalls c = jj_2_rtns[i]; - while (c != null) { - if (c.gen < jj_gen) c.first = null; - c = c.next; - } - } - } - return token; - } - token = oldToken; - jj_kind = kind; - throw generateParseException(); - } - - static private final class LookaheadSuccess extends java.lang.Error { } - final private LookaheadSuccess jj_ls = new LookaheadSuccess(); - final private boolean jj_scan_token(int kind) { - if (jj_scanpos == jj_lastpos) { - jj_la--; - if (jj_scanpos.next == null) { - jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken(); - } else { - jj_lastpos = jj_scanpos = jj_scanpos.next; - } - } else { - jj_scanpos = jj_scanpos.next; - } - if (jj_rescan) { - int i = 0; Token tok = token; - while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; } - if (tok != null) jj_add_error_token(kind, i); - } - if (jj_scanpos.kind != kind) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls; - return false; - } - - final public Token getNextToken() { - if (token.next != null) token = token.next; - else token = token.next = token_source.getNextToken(); - jj_ntk = -1; - jj_gen++; - return token; - } - - final public Token getToken(int index) { - Token t = lookingAhead ? jj_scanpos : token; - for (int i = 0; i < index; i++) { - if (t.next != null) t = t.next; - else t = t.next = token_source.getNextToken(); - } - return t; - } - - final private int jj_ntk() { - if ((jj_nt=token.next) == null) - return (jj_ntk = (token.next=token_source.getNextToken()).kind); - else - return (jj_ntk = jj_nt.kind); - } - - private java.util.Vector jj_expentries = new java.util.Vector(); - private int[] jj_expentry; - private int jj_kind = -1; - private int[] jj_lasttokens = new int[100]; - private int jj_endpos; - - private void jj_add_error_token(int kind, int pos) { - if (pos >= 100) return; - if (pos == jj_endpos + 1) { - jj_lasttokens[jj_endpos++] = kind; - } else if (jj_endpos != 0) { - jj_expentry = new int[jj_endpos]; - for (int i = 0; i < jj_endpos; i++) { - jj_expentry[i] = jj_lasttokens[i]; - } - boolean exists = false; - for (java.util.Enumeration e = jj_expentries.elements(); e.hasMoreElements();) { - int[] oldentry = (int[])(e.nextElement()); - if (oldentry.length == jj_expentry.length) { - exists = true; - for (int i = 0; i < jj_expentry.length; i++) { - if (oldentry[i] != jj_expentry[i]) { - exists = false; - break; - } - } - if (exists) break; - } - } - if (!exists) jj_expentries.addElement(jj_expentry); - if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind; - } - } - - public ParseException generateParseException() { - jj_expentries.removeAllElements(); - boolean[] la1tokens = new boolean[66]; - for (int i = 0; i < 66; i++) { - la1tokens[i] = false; - } - if (jj_kind >= 0) { - la1tokens[jj_kind] = true; - jj_kind = -1; - } - for (int i = 0; i < 63; i++) { - if (jj_la1[i] == jj_gen) { - for (int j = 0; j < 32; j++) { - if ((jj_la1_0[i] & (1< jj_gen) { - jj_la = p.arg; jj_lastpos = jj_scanpos = p.first; - switch (i) { - case 0: jj_3_1(); break; - case 1: jj_3_2(); break; - case 2: jj_3_3(); break; - case 3: jj_3_4(); break; - case 4: jj_3_5(); break; - case 5: jj_3_6(); break; - case 6: jj_3_7(); break; - case 7: jj_3_8(); break; - case 8: jj_3_9(); break; - case 9: jj_3_10(); break; - case 10: jj_3_11(); break; - case 11: jj_3_12(); break; - case 12: jj_3_13(); break; - case 13: jj_3_14(); break; - case 14: jj_3_15(); break; - case 15: jj_3_16(); break; - case 16: jj_3_17(); break; - case 17: jj_3_18(); break; - case 18: jj_3_19(); break; - } - } - p = p.next; - } while (p != null); - } - jj_rescan = false; - } - - final private void jj_save(int index, int xla) { - JJCalls p = jj_2_rtns[index]; - while (p.gen > jj_gen) { - if (p.next == null) { p = p.next = new JJCalls(); break; } - p = p.next; - } - p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla; - } - - static final class JJCalls { - int gen; - Token first; - int arg; - JJCalls next; - } - -} diff --git a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/EJBQL.jjt b/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/EJBQL.jjt deleted file mode 100644 index 9c885e8c164962b97b567059e3668da20d451c7b..0000000000000000000000000000000000000000 --- a/jonas/modules/libraries/jonas-deployment/src/main/java/org/ow2/jonas/deployment/ejb/ejbql/EJBQL.jjt +++ /dev/null @@ -1,668 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * - * Initial developer(s): Christophe Ney for France Telecom. - * Contributor(s): - * - * -------------------------------------------------------------------------- - * $Id:EJBQL.jjt 11129 2007-08-03 07:15:41Z durieuxp $ - * -------------------------------------------------------------------------- - */ - - -/** -* This is the JJTree grammar file that was used to generate -* All files of this package -* @author Christophe Ney [cney@batisseurs.com] -* contributor(s): -* - Helene Joanin: Fix the bug about the unary minus operator. -* - Helene Joanin: Add the flag 'third' for operator with optional third operand. -* - Helene Joanin: Add the counter 'opNbEnum' for the IN operator -* to count the number of string_literal. -* - Helene Joanin: Add the ORDER BY clause -* - Helene Joanin: Take into account the EJBQL version 2.1 syntax -* - Cyrille Blot: Add the LIMIT clause -* -**/ - -options { - // javacc options - LOOKAHEAD = 1; - CHOICE_AMBIGUITY_CHECK = 2; - OTHER_AMBIGUITY_CHECK = 1; - STATIC = false; - DEBUG_PARSER = false; - DEBUG_LOOKAHEAD = false; - DEBUG_TOKEN_MANAGER = false; - ERROR_REPORTING = true; - JAVA_UNICODE_ESCAPE = false; - UNICODE_INPUT = false; - IGNORE_CASE = false; - USER_TOKEN_MANAGER = false; - USER_CHAR_STREAM = false; - BUILD_PARSER = true; - BUILD_TOKEN_MANAGER = true; - SANITY_CHECK = true; - FORCE_LA_CHECK = false; - - // jjtree options - BUILD_NODE_FILES=true; // this creates all AST* classes - MULTI=true; - VISITOR=true; // create a visitor method - NODE_FACTORY= false; // build nodes using a factory - NODE_PACKAGE=""; // package of node classes - NODE_PREFIX="AST"; //prefix for generated classes -} - - -PARSER_BEGIN(EJBQL) - -package org.ow2.jonas.deployment.ejb.ejbql; - -public class EJBQL { -} - -PARSER_END(EJBQL) - -SimpleNode EJBQL() : -{} -{ - SelectClause() FromClause() ( WhereClause() )? ( OrderByClause() )? ( LimitClause() )? - { return jjtThis; } -} - -void FromClause() : -{} -{ - IdentificationVariableDeclaration() ( IdentificationVariableDeclaration() )* - -} - -void IdentificationVariableDeclaration() #void : -{} -{ - CollectionMemberDeclaration() | RangeVariableDeclaration() - -} - -void CollectionMemberDeclaration() : -{} -{ - CollectionValuedPathExpression() ( )? Identifier() -} - -void RangeVariableDeclaration() : -{} -{ - AbstractSchemaName() ( )? Identifier() - -} - -void SingleValuedPathExpression() : -{} -{ - Path() -} - -void CmpPathExpression() : -{} -{ - Path() -} - -void SingleValuedCmrPathExpression() : -{} -{ - Path() -} - -void CollectionValuedPathExpression() : -{} -{ - Path() -} - -void SelectClause() : -{} -{ - -

    -device where the alarm comes from: -

    -severity level of the Alarm Message: -

    - Severe Alarm
    - Warning
    - Informative Message
    -
    -

    -number of messages that will be sent: -

    -timeout in seconds: -

    - - - - diff --git a/jonas_tests/examples/base/examples/alarm/web/images/alarmArchi.gif b/jonas_tests/examples/base/examples/alarm/web/images/alarmArchi.gif deleted file mode 100644 index 18e45cc9bd6e73fc5dab1c7735856c5017cf19b1..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/alarm/web/images/alarmArchi.gif and /dev/null differ diff --git a/jonas_tests/examples/base/examples/alarm/web/images/jetty.png b/jonas_tests/examples/base/examples/alarm/web/images/jetty.png deleted file mode 100644 index 21b5e63874b322808625b6ead0ef20cf56fa1c6f..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/alarm/web/images/jetty.png and /dev/null differ diff --git a/jonas_tests/examples/base/examples/alarm/web/images/logo_jonas.jpg b/jonas_tests/examples/base/examples/alarm/web/images/logo_jonas.jpg deleted file mode 100644 index 3fe9b43072176d2275d8725eb977b781a9730306..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/alarm/web/images/logo_jonas.jpg and /dev/null differ diff --git a/jonas_tests/examples/base/examples/alarm/web/images/return.gif b/jonas_tests/examples/base/examples/alarm/web/images/return.gif deleted file mode 100644 index af4f68f4a3a13e0ef1dc0045b04c2c93354cdf40..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/alarm/web/images/return.gif and /dev/null differ diff --git a/jonas_tests/examples/base/examples/alarm/web/images/tomcat.gif b/jonas_tests/examples/base/examples/alarm/web/images/tomcat.gif deleted file mode 100644 index 32f7d809fbf745e814598cae44329394515c4879..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/alarm/web/images/tomcat.gif and /dev/null differ diff --git a/jonas_tests/examples/base/examples/alarm/web/index.html b/jonas_tests/examples/base/examples/alarm/web/index.html deleted file mode 100644 index 1e833ab6d97a6d0ed146a89e3e689666601cff1e..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/alarm/web/index.html +++ /dev/null @@ -1,68 +0,0 @@ - - - The JOnAS Alarm Demo - - - - - - - - - - -
    JOnAS LogoThe JOnAS Alarm DemoTomcat LogoJetty Logo
    - -

    Goal of this demo

    - This little demo intends to show how you can use JOnAS, Tomcat or Jetty, and Joram - together to get a complete application using EJBs, servlets, html, JSPs, and - message driven beans. - -

    Running this demo

    -When you click to access this demo, your web browser should open a dialog box -asking you a user ID and a password. -Enter as login/password jonas/jonas. -

    -Click Here to Start the Demo -

    -Notice that the first time, Tomcat or Jetty has to compile each JSP and this may take several seconds. - -

    Description of the different parts

    - - - - - - - - - - - - - - - - - - -
    AlarmGeneratorAlarmGenerator is a servlet that generates alarms by -publishing messages on a topic. Once the JOnAS Server is running, this -servlet may be used to feed the Message Driven Bean listening -on the topic. -Click Here to Generate new Alarms -
    Session bean ViewA Session bean is used to provide a remote access to the Alarm Service. Each user -will create its own session that will be reached from JSP pages or servlets.
    Entity Bean AlarmRecordWhen a new alarm type is received, an entity bean is created. If the Alarm is already -known, its count is incremented only.
    Message Driven BeanJMS is used to access asynchronously to the service. A Message Driven Bean is used -to collect Alarm sent by AlarmGenerator. It will then inform the AlarmManager -that will process it.
    -

    Architecture

    -Alarm Demo Architecture - - diff --git a/jonas_tests/examples/base/examples/alarm/web/secured/createfilter.jsp b/jonas_tests/examples/base/examples/alarm/web/secured/createfilter.jsp deleted file mode 100644 index 52750066d9af6f684c1dcd42705395451b2874ce..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/alarm/web/secured/createfilter.jsp +++ /dev/null @@ -1,12 +0,0 @@ - -create filter - - -<% - String device = request.getParameter("device"); - String level = request.getParameter("level"); - String profil = myview.newProfil(device, level); -%> - - - diff --git a/jonas_tests/examples/base/examples/alarm/web/secured/current.jsp b/jonas_tests/examples/base/examples/alarm/web/secured/current.jsp deleted file mode 100644 index 70a68e686c0b1c26ef4ff0904eeca97985eeef33..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/alarm/web/secured/current.jsp +++ /dev/null @@ -1,115 +0,0 @@ - -current page -<%@ include file="top.html" %> -<%@ page import="org.objectweb.alarm.beans.AlarmData" %> - -<% - String error = myview.getErrorMessage(); - if (error != null) { -%> -

    -An error occured in the JOnAS Server: -<%=error%> -<% - } -%> -<% - AlarmData[] adlist = null; - boolean history = request.getParameter("listType").equals("History"); -%> - -<% - if (history) { - adlist = myview.getAllAlarms(); -%> - Log of all -<% - } else { - adlist = myview.getNewAlarms(); -%> - Current list of -<% - } -%> - alarms received on <%=myview.getProfil()%> - - - - - - - - - - - -<% - for (int i = 0; i < adlist.length; i++) { - AlarmData ad = adlist[i]; - int sev = ad.getSev(); - int state = ad.getState(); -%> - -<% switch (sev) { - case 1: -%> - - - - - - - -<% - } -%> -
    identdatefrommessagecountstate
    -<% - break; - case 2: -%> - -<% - break; - case 3: -%> - -<% - break; - default: -%> - -<% - break; - } -%> -<%=ad.getNum()%><%=ad.getDate()%><%=ad.getDevice()%><%=ad.getMessage()%><%=ad.getCount()%> -<% switch (state) { - case 1: -%> -received -<% - break; - case 2: -%> -processed -<% - break; - default: -%> -removed -<% - break; - } -%>
    -
    -

    -<% if (history) { %> -View only the current list of Alarms for this filter. -<% } else { %> -View the full log of Alarms received for this filter. -<% } %> -

    -Return to the list of filters - - diff --git a/jonas_tests/examples/base/examples/alarm/web/secured/list.jsp b/jonas_tests/examples/base/examples/alarm/web/secured/list.jsp deleted file mode 100644 index 37879e8ec5fac22f4b9aca18514ee2e85252db80..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/alarm/web/secured/list.jsp +++ /dev/null @@ -1,107 +0,0 @@ - -list page -<%@ include file="top.html" %> - -<% - String error = myview.getErrorMessage(); - if (error != null) { -%> -

    -An error occured in the JOnAS Server: -

    -<%=error%> -

    -<% - } -%> -<% - String[] plist = myview.getProfils(); -%> -You have been authenticated by web container and you can access now the list of -alarms received for each filter. -The color used shows the current level of alarm: - - - - - - - - - - - - - - -
    SEVERE ERROR
    WARNING
    INFO
    NO ALARM
    -
    -

    - - - - - -
    -You can see the list of alarm received for a special filter by -choosing in the list here after. -

    - - <% - for (int i = 0; i < plist.length; i++) { - String profil = plist[i]; - %> -<% - switch (myview.alarmLevel(profil)) { - case 1: -%> - -<% - break; - case 2: -%> - -<% - break; - case 3: -%> - -<% - break; - default: -%> - -<% - } -%> - - - - - <% - } - %> -
    -<%=profil%> - ->See details - ->Remove filter -
    -

    -You can create a new filter by using -the following form. -
    -

    -device name: -

    - Only Severe Alarms
    - Warnings and Severe Alarms
    - All Alarm Messages
    -

    - -

    -
    -Return to index page - - diff --git a/jonas_tests/examples/base/examples/alarm/web/secured/remove.jsp b/jonas_tests/examples/base/examples/alarm/web/secured/remove.jsp deleted file mode 100644 index ef063c475159b88d59bcf7230a1959b827ea0615..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/alarm/web/secured/remove.jsp +++ /dev/null @@ -1,13 +0,0 @@ - -remove page - - -<% - String alarmPK = request.getParameter("alarm"); - myview.forgetAlarm(alarmPK); -%> - - - - - diff --git a/jonas_tests/examples/base/examples/alarm/web/secured/removefilter.jsp b/jonas_tests/examples/base/examples/alarm/web/secured/removefilter.jsp deleted file mode 100644 index a66d56d0e3c435914d7318535f2113edb16a1e24..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/alarm/web/secured/removefilter.jsp +++ /dev/null @@ -1,11 +0,0 @@ - -remove filter - - -<% - String profil = request.getParameter("profil"); - myview.removeProfil(profil); -%> - - - diff --git a/jonas_tests/examples/base/examples/alarm/web/secured/setfilter.jsp b/jonas_tests/examples/base/examples/alarm/web/secured/setfilter.jsp deleted file mode 100644 index e22ebc4d45181ed57efe2a6d2d49a623a0579fda..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/alarm/web/secured/setfilter.jsp +++ /dev/null @@ -1,13 +0,0 @@ - -set filter - - -<% - String profil = request.getParameter("profil"); - myview.setProfil(profil); -%> - - - - - diff --git a/jonas_tests/examples/base/examples/alarm/web/secured/top.html b/jonas_tests/examples/base/examples/alarm/web/secured/top.html deleted file mode 100644 index ece8a76459e1fa1491cd47fbfe35fd614352422a..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/alarm/web/secured/top.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - -
    JOnAS LogoThe JOnAS Alarm DemoTomcat LogoJetty Logo
    diff --git a/jonas_tests/examples/base/examples/alarm/web/secured/unsetfilter.jsp b/jonas_tests/examples/base/examples/alarm/web/secured/unsetfilter.jsp deleted file mode 100644 index 4b53e8f3556c44d72b2189c5689a4349e1720cfd..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/alarm/web/secured/unsetfilter.jsp +++ /dev/null @@ -1,10 +0,0 @@ - -unset filter - - -<% - myview.setProfil(null); -%> - - - diff --git a/jonas_tests/examples/base/examples/build.properties b/jonas_tests/examples/base/examples/build.properties deleted file mode 100644 index 80ebd7c47f913cf39431578e6f4b4368523217f8..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/build.properties +++ /dev/null @@ -1,42 +0,0 @@ -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 1999 Bull S.A. -# Contact: jonas-team@objectweb.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# Initial developer(s): ____________________________________. -# Contributor(s): ______________________________________. -# -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -# Properties defined in this file could be customized - -# options for java compiler -opt.javac.debug on -opt.javac.optimize off - -# To use the jike compiler -#build.compiler jikes - -# genic args -#verbose=true - -# protocols for Carol (jrmp,iiop) -protocols.names=jrmp,iiop -genicargs=-verbose diff --git a/jonas_tests/examples/base/examples/build.xml b/jonas_tests/examples/base/examples/build.xml deleted file mode 100644 index 4240b897ce242840d7d172faf3c78491741a3b28..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/build.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/cmp2/README b/jonas_tests/examples/base/examples/cmp2/README deleted file mode 100644 index aaf9dfe63baef97d8ce6ca02667b152b764a6a7d..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/README +++ /dev/null @@ -1,109 +0,0 @@ - - -Example Overview -================ - -This example shows how to use new features of container managed persistence -in EJB 2.0, like Entity Relationships and EJB-QL. - -The code of the EJBs used in this example comes from the book: - "Enterprise JavaBeans(TM)" Third Edition - by Richard Monson-Haefel - [O'REILLY edition ISBN 0-596-00226-2] - -We have packaged this example as an ear since the client is implemented -as three servlets. - - -Directories structure -===================== - -The "src" directory contains: - -- eight Entity beans: - CustomerEJB, - AddressEJB, - PhoneEJB, - CreditCardEJB, - CruiseEJB, - ShipEJB, - ReservationEJB, - CabinEJB, - Sequence. - The seven first beans shows the seven relationship types, - the last is used for an automatic generation of primary keys. - -- three Session beans: - TravelAgentEJB, - RTravelAgentEJB, - SequenceSession. - -- three servlets: - ServletTest - shows one to one relationship unidirectional or bidirectional, - ServletTest2 - shows one to many, many to one, many to many - uni and bidirectional relationships - ServletTest3 - shows example of finder methods using many EJB-QL examples - -The "etc" directory contains: - -- the "xml" directory which contains all the deployment descriptors - used for this example : - application.xml (ear file), - ejb-jar.xml and jonas-ejb-jar.xml (jar file), - web.xml and jonas-web.xml (war file). - -- the "resources" directory which contains all the resources for this - application - "web" directory contains all resources used by the servlets - - -Compiling this example creates an .ear file that represents the application -including : -- all the beans used by the web application, -- a web application that will be used by Tomcat or Jetty to run the servlets. - - -Prerequisites -============= -First, you must have installed a web container (ie : Catalina or Jetty) -as the web container service - -You have to set the environment variables - CATALINA_HOME and CATALINA_BASE as indicated in the Tomcat 4.1.x documentation. -or JETTY_HOME for Jetty 4.2.x - -(See the howto on ObjectWeb : http://www.objectweb.org/jonas/doc/index.html) - -As for the other JOnAS examples, you have to configure a datasource. -It's JNDI name must be 'jdbc_1'. -The 'datasource.mappername' property value must be up-to-date. - - -Building this example -===================== -Under $JONAS_ROOT/examples/cmp2, do - $ ant install - - -Running this example -==================== -Commands are given for an Unix system, similar commands can be done on -Windows. - -1) Run a JOnAS server: - $ jonas start - -2) Load cmp2.ear (if you have not added it in the ear service descriptors list) using jonasAdmin -management application (http://:/jonasAdmin) or the 'jonas admin' command. - -3) Lookup at http://:/cmp2 to start this example - - is the name of your machine (localhost by default), and - - the port number (9000 by default). - -4) Stop the jonas server - $jonas stop - - diff --git a/jonas_tests/examples/base/examples/cmp2/build.xml b/jonas_tests/examples/base/examples/cmp2/build.xml deleted file mode 100644 index c1a80645a1f7da110f880ca8136a1ff4ba94e2c2..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/build.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/cmp2/etc/resources/web/index.html b/jonas_tests/examples/base/examples/cmp2/etc/resources/web/index.html deleted file mode 100644 index 28695422eb009cd8e48506c96fc58256182fc110..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/etc/resources/web/index.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - JOnAS example cmp2 - - - - -

    cmp2 : EJB 2.0 Container Managed Persistence

    - -

    This example shows how to use new features of container managed persistence - in EJB 2.0, like Entity Relationships and EJB-QL.

    - -

    The code of the EJBs used in this example comes from the book - "Enterprise JavaBeans(TM)" Third Edition by Richard Monson-Haefel -
    [O'REILLY edition ISBN 0-596-00226-2] -

    - -

    Examples Showing One to One Relationships:

    -
      -
    • One to One Unidirectional Relationship: -
      Customer --> Address

    • -
    • One to One Bidirectional Relationship: -
      Customer <--> CreditCard

    • -
    • One to Many Unidirectional Relationship: -
      Customer --> Phone

    • -
    - - - - - - -
    - Run the tests? - -
    - -
    -
    - - -

    Examples Showing Many to One, One to Many, and Many to Many Relationships:

    -
      -
    • Many to One Unidirectional Relationship: -
      Cruise --> Ship

    • -
    • One to Many Bidirectional Relationship: -
      Cruise <--> Reservation

    • -
    • Many to Many Bidirectional Relationship: -
      Customer <--> Reservation

    • -
    • Many to Many Unidirectional Relationship: -
      Reservation --> Cabin

    • -
    - - - - - - -
    - Run the tests? - -
    - -
    -
    - -

    Examples Showing EJB-QL:

    -
      -
    • SELECT OBJECT(s) FROM JE2_Ship AS s WHERE s.tonnage = ?1
    • -
    • SELECT OBJECT(s) FROM JE2_Ship AS s WHERE s.tonnage BETWEEN ?1 AND ?2
    • -
    • SELECT OBJECT(c) FROM JE2_Customer AS c
    • -
    • SELECT OBJECT(c) FROM JE2_Cruise AS c WHERE c.name = ?1
    • -
    • SELECT OBJECT(c) FROM JE2_Customer AS c -
      WHERE c.lastName = ?1 AND c.firstName = ?2
    • -
    • SELECT OBJECT(c) FROM JE2_Customer AS c WHERE c.lastName = 'Smith90'
    • -
    • SELECT OBJECT(c) FROM JE2_Customer AS c -
      WHERE c.lastName LIKE ?1 AND c.firstName LIKE ?2
    • -
    • SELECT OBJECT(c) FROM JE2_Customer AS c WHERE c.hasGoodCredit = TRUE
    • -
    • SELECT OBJECT(c) FROM JE2_Customer AS c -
      WHERE c.homeAddress.city = ?1 AND c.homeAddress.state = ?2
    • -
    • SELECT OBJECT(c) FROM JE2_Customer AS c -
      WHERE c.lastName LIKE ?1 AND c.firstName LIKE ?2 AND c.homeAddress.state = ?3
    • -
    • SELECT OBJECT(c) FROM JE2_Cabin AS c WHERE c.deckLevel = ?1
    • -
    • SELECT OBJECT(c) FROM JE2_Customer AS c -
      WHERE c.homeAddress.state IN ('FL','TX','AZ','CA')
    • -
    • SELECT OBJECT(c) FROM JE2_Customer AS c WHERE c.reservations IS EMPTY
    • -
    • SELECT OBJECT(c) FROM JE2_Customer AS cust, Cruise AS cr, IN (cr.reservations) AS res -
      WHERE cr = ?1 AND cust MEMBER OF res.customers
    • -
    • SELECT a.zip FROM JE2_Address AS a WHERE a.state = ?1
    • -
    • SELECT OBJECT(c) FROM JE2_Customer AS c WHERE c.homeAddress = ?1
    • -
    • .....
    • -
    - - - - - - -
    - Run the tests? - -
    - -
    -
    - - - - diff --git a/jonas_tests/examples/base/examples/cmp2/etc/resources/web/style.css b/jonas_tests/examples/base/examples/cmp2/etc/resources/web/style.css deleted file mode 100644 index 4f852c2a87c8be61ad1e242e706f92197a35396c..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/etc/resources/web/style.css +++ /dev/null @@ -1,13 +0,0 @@ -body { - background : white; - color : black; -} -h1, h2, h3 {font-family : sans-serif; } -h1 {font-size : 175%; color : DarkCyan; text-align : center;} -h2 {font-size : 150%; color : DarkCyan; - border-bottom : solid; - border-bottom-width : 1; -} -h3 {font-size : 125%; } -strong { font-weight : bold; } -hr { size : 1; width : 100%; } diff --git a/jonas_tests/examples/base/examples/cmp2/etc/xml/application.xml b/jonas_tests/examples/base/examples/cmp2/etc/xml/application.xml deleted file mode 100644 index 945d7cc97dd4fb377c4e5b8897ba848c73748683..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/etc/xml/application.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - cmp2 example EJB2.0 container managed persistence - cmp2 servlet - - - - cmp2.jar - - - - - cmp2.war - cmp2 - - - diff --git a/jonas_tests/examples/base/examples/cmp2/etc/xml/cmp2.xml b/jonas_tests/examples/base/examples/cmp2/etc/xml/cmp2.xml deleted file mode 100644 index c24df0a211c5fe1801034be17ea8ecb160d1827c..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/etc/xml/cmp2.xml +++ /dev/null @@ -1,715 +0,0 @@ - - - - - Deployment descriptor for the cmp2 JOnAS example - cmp2 example - - - - CustomerEJB - com.titan.customer.CustomerHomeRemote - com.titan.customer.CustomerRemote - com.titan.customer.CustomerHomeLocal - com.titan.customer.CustomerLocal - com.titan.customer.CustomerBean - Container - java.lang.Integer - false - 2.x - JE2_Customer - id - lastName - firstName - hasGoodCredit - id - - ejb/AddressHomeLocal - Entity - com.titan.address.AddressHomeLocal - com.titan.address.AddressLocal - AddressEJB - - - ejb/CreditCardHome - Entity - com.titan.customer.CreditCardHomeLocal - com.titan.customer.CreditCardLocal - CreditCardEJB - - - ejb/PhoneHomeLocal - Entity - com.titan.phone.PhoneHomeLocal - com.titan.phone.PhoneLocal - PhoneEJB - - - - - findAllCustomers - - - SELECT OBJECT(c) FROM JE2_Customer AS c - - - - findByName - - java.lang.String - java.lang.String - - - - SELECT OBJECT(c) FROM JE2_Customer c - WHERE c.lastName LIKE ?1 AND c.firstName LIKE ?2 - - - - - findSmith90 - - - - SELECT OBJECT(c) FROM JE2_Customer c - WHERE c.lastName = 'Smith90' - - - - - findByExactName - - java.lang.String - java.lang.String - - - - SELECT OBJECT(c) FROM JE2_Customer c - WHERE c.lastName = ?1 AND c.firstName = ?2 - - - - - findByNameAndState - - java.lang.String - java.lang.String - java.lang.String - - - - SELECT OBJECT(c) FROM JE2_Customer c - WHERE c.lastName LIKE ?1 AND c.firstName LIKE ?2 AND c.homeAddress.state = ?3 - - - - - findByGoodCredit - - - - SELECT OBJECT(c) FROM JE2_Customer c - WHERE c.hasGoodCredit = TRUE - - - - - findByCity - - java.lang.String - java.lang.String - - - - SELECT OBJECT(c) FROM JE2_Customer c - WHERE c.homeAddress.city = ?1 AND c.homeAddress.state = ?2 - - - - - findInHotStates - - - - SELECT OBJECT(c) FROM JE2_Customer c - WHERE c.homeAddress.state IN ('FL','TX','AZ','CA') - - - - - findWithNoReservations - - - - SELECT OBJECT(c) FROM JE2_Customer c - WHERE c.reservations IS EMPTY - - - - - findOnCruise - - com.titan.cruise.CruiseLocal - - - - SELECT OBJECT(cust) FROM JE2_Customer cust, JE2_Cruise cr, IN (cr.reservations) AS res - WHERE cr = ?1 AND cust MEMBER OF res.customers - - - - - findByState - - java.lang.String - - - - SELECT OBJECT(c) FROM JE2_Customer c - WHERE c.homeAddress.state = ?1 - ORDER BY c.lastName,c.firstName - - - - - - AddressEJB - com.titan.address.AddressHomeLocal - com.titan.address.AddressLocal - com.titan.address.AddressBean - Container - java.lang.Object - false - 2.x - JE2_Address - street - city - state - zip - - - - findAllAddress - - - SELECT OBJECT(c) FROM JE2_Address c - - - - ejbSelectZipCodes - - java.lang.String - - - SELECT a.zip FROM JE2_Address AS a WHERE a.state = ?1 - - - - ejbSelectAll - - - SELECT OBJECT(a) FROM JE2_Address AS a - - - - ejbSelectCustomer - - com.titan.address.AddressLocal - - - SELECT OBJECT(c) FROM JE2_Customer AS c WHERE c.homeAddress = ?1 - - - - - PhoneEJB - com.titan.phone.PhoneHomeLocal - com.titan.phone.PhoneLocal - com.titan.phone.PhoneBean - Container - java.lang.Object - false - 2.x - JE2_Phone - number - type - - - - findAllPhones - - - SELECT OBJECT(c) FROM JE2_Phone c - - - - - CreditCardEJB - com.titan.customer.CreditCardHomeLocal - com.titan.customer.CreditCardLocal - com.titan.customer.CreditCardBean - Container - java.lang.Object - false - 2.x - JE2_CreditCard - expirationDate - number - nameOnCard - creditOrganization - - - - findAllCreditCards - - - SELECT OBJECT(cc) FROM JE2_CreditCard cc - - - - - CruiseEJB - com.titan.cruise.CruiseHomeLocal - com.titan.cruise.CruiseLocal - com.titan.cruise.CruiseBean - Container - java.lang.Object - false - 2.x - JE2_Cruise - name - - - - findAllCruises - - - SELECT OBJECT(cc) FROM JE2_Cruise cc - - - - findByName - - java.lang.String - - - SELECT OBJECT(c) FROM JE2_Cruise c WHERE c.name = ?1 - - - - - ShipEJB - com.titan.ship.ShipHomeLocal - com.titan.ship.ShipLocal - com.titan.ship.ShipBean - Container - java.lang.Integer - false - 2.x - JE2_Ship - id - name - tonnage - id - - - - findAllShips - - - SELECT OBJECT(cc) FROM JE2_Ship cc - - - - findByTonnage - - java.lang.Double - - - - SELECT OBJECT(s) FROM JE2_Ship s - WHERE s.tonnage = ?1 - - - - - findByTonnage - - java.lang.Double - java.lang.Double - - - - SELECT OBJECT(s) FROM JE2_Ship s - WHERE s.tonnage BETWEEN ?1 AND ?2 - - - - - - ReservationEJB - com.titan.reservation.ReservationHomeLocal - com.titan.reservation.ReservationLocal - com.titan.reservation.ReservationBean - Container - java.lang.Object - false - 2.x - JE2_Reservation - amountPaid - date - - - - findAllReservations - - - SELECT OBJECT(cc) FROM JE2_Reservation cc - - - - - CabinEJB - com.titan.cabin.CabinHomeRemote - com.titan.cabin.CabinRemote - com.titan.cabin.CabinHomeLocal - com.titan.cabin.CabinLocal - com.titan.cabin.CabinBean - Container - java.lang.Integer - false - 2.x - JE2_Cabin - id - name - deckLevel - bedCount - id - - - - findAllOnDeckLevel - - java.lang.Integer - - - - SELECT OBJECT(c) FROM JE2_Cabin as c WHERE c.deckLevel = ?1 - - - - - findAllCabins - - - SELECT OBJECT(cc) FROM JE2_Cabin cc - - - - ejbSelectAllForCustomer - - com.titan.customer.CustomerLocal - - - SELECT OBJECT(cab) FROM JE2_Customer AS cust, - IN (cust.reservations) AS res, IN (res.cabins) AS cab - WHERE cust = ?1 - - - - - - TravelAgentEJB - com.titan.travelagent.TravelAgentHomeRemote - com.titan.travelagent.TravelAgentRemote - com.titan.travelagent.TravelAgentBean - Stateless - Container - - ejb/CabinHomeLocal - Entity - com.titan.cabin.CabinHomeLocal - com.titan.cabin.CabinLocal - CabinEJB - - - - - - RTravelAgentEJB - com.titan.travelagent.RTravelAgentHomeRemote - com.titan.travelagent.RTravelAgentRemote - com.titan.travelagent.RTravelAgentBean - Stateless - Container - - ejb/CabinHomeRemote - Entity - com.titan.cabin.CabinHomeRemote - com.titan.cabin.CabinRemote - - - - - - - - - Customer-Address - - Customer-has-a-Address - One - - CustomerEJB - - - homeAddress - - - - Address-belongs-to-Customer - One - - - AddressEJB - - - - - - Customer-CreditCard - - Customer-has-a-CreditCard - One - - CustomerEJB - - creditCard - - - CreditCard-belongs-to-Customer - One - - - CreditCardEJB - - customer - - - - - Customer-Phones - - Customer-has-many-Phone-numbers - One - - CustomerEJB - - - phoneNumbers - java.util.Collection - - - - Phone-belongs-to-Customer - Many - - - PhoneEJB - - - - - - Customer-Reservation - - Customer-has-many-Reservations - Many - - CustomerEJB - - - reservations - java.util.Collection - - - - Reservation-has-many-Customers - Many - ReservationEJB - - - customers - java.util.Set - - - - - - Cruise-Ship - - Cruise-has-a-Ship - Many - - CruiseEJB - - ship - - - Ship-has-many-Cruises - One - - ShipEJB - - - - - - Cruise-Reservation - - Cruise-has-many-Reservations - One - - CruiseEJB - - - reservations - java.util.Collection - - - - Reservation-has-a-Cruise - Many - - ReservationEJB - - cruise - - - - - Cabin-Ship - - Cabin-has-a-Ship - Many - - CabinEJB - - ship - - - Ship-has-many-Cabins - One - - ShipEJB - - - - - - Cabin-Reservation - - Cabin-has-many-Reservations - Many - - CabinEJB - - - - Reservation-has-many-Cabins - Many - - ReservationEJB - - - cabins - java.util.Set - - - - - - - - - - - - CabinEJB - * - - - RTravelAgentEJB - * - - - TravelAgentEJB - * - - - CustomerEJB - * - - - AddressEJB - * - - - CreditCardEJB - * - - - PhoneEJB - * - - - CruiseEJB - * - - - ShipEJB - * - - - ReservationEJB - * - - Required - - - - - SequenceSession - * - - - Sequence - * - - Required - - - - - - diff --git a/jonas_tests/examples/base/examples/cmp2/etc/xml/jonas-cmp2.xml b/jonas_tests/examples/base/examples/cmp2/etc/xml/jonas-cmp2.xml deleted file mode 100644 index 147cfb33b75db6b558f526905abcd87c3c0b3a6e..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/etc/xml/jonas-cmp2.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - CustomerEJB - CustomerHomeRemote - jdbc_1 - - - - AddressEJB - - jdbc_1 - - - - - CabinEJB - jdbc_1 - - - - PhoneEJB - - jdbc_1 - - - - - CreditCardEJB - - jdbc_1 - - - - - CruiseEJB - - jdbc_1 - - - - - ShipEJB - jdbc_1 - - - - ReservationEJB - - jdbc_1 - - - - - - RTravelAgentEJB - RTravelAgentHomeRemote - - ejb/CabinHomeRemote - CabinHomeRemote - - - - diff --git a/jonas_tests/examples/base/examples/cmp2/etc/xml/web.xml b/jonas_tests/examples/base/examples/cmp2/etc/xml/web.xml deleted file mode 100644 index 7d1526774735b7640f814704193520b80ae841eb..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/etc/xml/web.xml +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - ServletTest - servlets.ServletTest - - - - ServletTest2 - servlets.ServletTest2 - - - - ServletTest3 - servlets.ServletTest3 - - - - ServletTest - /test1 - - - - ServletTest2 - /test2 - - - - ServletTest3 - /test3 - - - - ejb/CreditCardHomeLocal - Entity - com.titan.customer.CreditCardHomeLocal - com.titan.customer.CreditCardLocal - cmp2.jar#CreditCardEJB - - - - ejb/CustomerHomeLocal - Entity - com.titan.customer.CustomerHomeLocal - com.titan.customer.CustomerLocal - cmp2.jar#CustomerEJB - - - - ejb/AddressHomeLocal - Entity - com.titan.address.AddressHomeLocal - com.titan.address.AddressLocal - cmp2.jar#AddressEJB - - - - ejb/ShipHomeLocal - Entity - com.titan.address.ShipHomeLocal - com.titan.address.ShipLocal - cmp2.jar#ShipEJB - - - - ejb/CruiseHomeLocal - Entity - com.titan.address.CruiseHomeLocal - com.titan.address.CruiseLocal - cmp2.jar#CruiseEJB - - - - ejb/ReservationHomeLocal - Entity - com.titan.address.ReservationHomeLocal - com.titan.address.ReservationLocal - cmp2.jar#ReservationEJB - - - - ejb/CabinHomeLocal - Entity - com.titan.address.CabinHomeLocal - com.titan.address.CabinLocal - cmp2.jar#CabinEJB - - - - ejb/PhoneHomeLocal - Entity - com.titan.adress.PhoneHomeLocal - com.titan.address.PhoneLocal - cmp2.jar#PhoneEJB - - - diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/address/AddressBean.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/address/AddressBean.java deleted file mode 100644 index 1c59356ade661cb03523dac05a3a494d81ba1437..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/address/AddressBean.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.titan.address; - -import java.util.Collection; -import java.util.Set; - -import javax.ejb.EntityContext; -import javax.ejb.FinderException; - -import com.titan.customer.CustomerLocal; - -public abstract class AddressBean implements javax.ejb.EntityBean { - - public Integer ejbCreateAddress(String street, String city, String state, String zip) - throws javax.ejb.CreateException { - setStreet(street); - setCity(city); - setState(state); - setZip(zip); - return null; - } - - public void ejbPostCreateAddress(String street, String city, String state, String zip) { - - } - - // select methods - public abstract Set ejbSelectZipCodes(String state) throws FinderException; - - public abstract Collection ejbSelectAll() throws FinderException; - - public abstract CustomerLocal ejbSelectCustomer(AddressLocal addr) throws FinderException; - - // Public Home method required to test the private ejbSelectZipCodes method - public Collection ejbHomeSelectZipCodes(String state) throws FinderException { - return this.ejbSelectZipCodes(state); - } - - // Public Home method required to test the private ejbSelectCustomer method - public CustomerLocal ejbHomeSelectCustomer(AddressLocal addr) throws FinderException { - return (CustomerLocal) (this.ejbSelectCustomer(addr)); - } - - // persistent fields - public abstract String getStreet(); - - public abstract void setStreet(String street); - - public abstract String getCity(); - - public abstract void setCity(String city); - - public abstract String getState(); - - public abstract void setState(String state); - - public abstract String getZip(); - - public abstract void setZip(String zip); - - // standard call back methods - - public void setEntityContext(EntityContext ec) { - } - - public void unsetEntityContext() { - } - - public void ejbLoad() { - } - - public void ejbStore() { - } - - public void ejbActivate() { - } - - public void ejbPassivate() { - } - - public void ejbRemove() throws javax.ejb.RemoveException { - } - -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/address/AddressHomeLocal.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/address/AddressHomeLocal.java deleted file mode 100644 index 7bac2363c4cf50f65f53f3f34657b5c1ca462ed7..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/address/AddressHomeLocal.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.titan.address; - -import java.util.Collection; - -import com.titan.customer.CustomerLocal; - -// Address EJB's local home interface -public interface AddressHomeLocal extends javax.ejb.EJBLocalHome { - - public AddressLocal createAddress(String street, String city, String state, String zip ) - throws javax.ejb.CreateException; - - public AddressLocal findByPrimaryKey(Integer primaryKey) - throws javax.ejb.FinderException; - - public Collection findAllAddress() - throws javax.ejb.FinderException; - - // Home method, requires ejbHomeSelectZipCodes method in bean class - public Collection selectZipCodes(String state) - throws javax.ejb.FinderException; - - // Home method, requires ejbHomeSelectCustomer method in bean class - public CustomerLocal selectCustomer(AddressLocal addr) - throws javax.ejb.FinderException; -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/address/AddressLocal.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/address/AddressLocal.java deleted file mode 100644 index 360a00bbe96a93f690804ad3abcb3d45f4ea16e0..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/address/AddressLocal.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.titan.address; - -// Address EJB's local interface -public interface AddressLocal extends javax.ejb.EJBLocalObject { - - public String getStreet(); - - public void setStreet(String street); - - public String getCity(); - - public void setCity(String city); - - public String getState(); - - public void setState(String state); - - public String getZip(); - - public void setZip(String zip); -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/cabin/CabinBean.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/cabin/CabinBean.java deleted file mode 100644 index 5919fe467eb13c6397826a4b8f195709f586ce62..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/cabin/CabinBean.java +++ /dev/null @@ -1,87 +0,0 @@ -package com.titan.cabin; - -import java.util.Set; - -import javax.ejb.EntityContext; -import javax.ejb.FinderException; - -import com.titan.customer.CustomerLocal; -import com.titan.ship.ShipLocal; - -public abstract class CabinBean implements javax.ejb.EntityBean { - - public Integer ejbCreate(Integer id) throws javax.ejb.CreateException { - this.setId(id); - return null; - } - - public void ejbPostCreate(Integer id) { - - } - - public abstract Set ejbSelectAllForCustomer(CustomerLocal cust) throws FinderException; - - // Public Home method required to test the private ejbSelectAllForCustomer - // method - public Set ejbHomeSelectAllForCustomer(CustomerLocal cust) throws FinderException { - return this.ejbSelectAllForCustomer(cust); - } - - public abstract void setId(Integer id); - - public abstract Integer getId(); - - public abstract void setShip(ShipLocal ship); - - public abstract ShipLocal getShip(); - - public abstract void setName(String name); - - public abstract String getName(); - - public abstract void setBedCount(int count); - - public abstract int getBedCount(); - - public abstract void setDeckLevel(int level); - - public abstract int getDeckLevel(); - - public int getShipId() { - return getShip().getId().intValue(); - } - - public void setShipId(int sp) { - ShipLocal sl = getShip(); - sl.setId(new Integer(sp)); - setShip(sl); - } - - public void setEntityContext(EntityContext ctx) { - // Not implemented. - } - - public void unsetEntityContext() { - // Not implemented. - } - - public void ejbActivate() { - // Not implemented. - } - - public void ejbPassivate() { - // Not implemented. - } - - public void ejbLoad() { - // Not implemented. - } - - public void ejbStore() { - // Not implemented. - } - - public void ejbRemove() throws javax.ejb.RemoveException { - // Not implemented. - } -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/cabin/CabinHomeLocal.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/cabin/CabinHomeLocal.java deleted file mode 100644 index 32a6bc30fbf1347361e66ab2c78d5edc16247872..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/cabin/CabinHomeLocal.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.titan.cabin; - -import com.titan.customer.CustomerLocal; - -import java.util.Collection; -import java.util.Set; -import javax.ejb.EJBException; -import javax.ejb.CreateException; -import javax.ejb.FinderException; - -public interface CabinHomeLocal extends javax.ejb.EJBLocalHome { - - public CabinLocal create(Integer id) - throws CreateException, EJBException; - - public CabinLocal findByPrimaryKey(Integer pk) - throws FinderException, EJBException; - - public Collection findAllOnDeckLevel(Integer level) - throws FinderException; - - public Collection findAllCabins() - throws FinderException; - - // Home method, requires ejbHomeSelectAllForCustomer method in bean class - public Set selectAllForCustomer(CustomerLocal cust) - throws FinderException; -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/cabin/CabinHomeRemote.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/cabin/CabinHomeRemote.java deleted file mode 100644 index d5c2dea860b271d2fbc49e800a21918d18763402..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/cabin/CabinHomeRemote.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.titan.cabin; - -import java.rmi.RemoteException; -import javax.ejb.CreateException; -import javax.ejb.FinderException; - -public interface CabinHomeRemote extends javax.ejb.EJBHome { - - public CabinRemote create(Integer id) - throws CreateException, RemoteException; - - public CabinRemote findByPrimaryKey(Integer pk) - throws FinderException, RemoteException; -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/cabin/CabinLocal.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/cabin/CabinLocal.java deleted file mode 100644 index 40a187219223173e9076fdf258178d959b078097..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/cabin/CabinLocal.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.titan.cabin; - -import javax.ejb.EJBException; -import com.titan.ship.ShipLocal; - -public interface CabinLocal extends javax.ejb.EJBLocalObject { - - public String getName() throws EJBException; - public void setName(String str) throws EJBException; - public int getDeckLevel() throws EJBException; - public void setDeckLevel(int level) throws EJBException; - public ShipLocal getShip(); - public void setShip(ShipLocal ship); - public int getBedCount() throws EJBException; - public void setBedCount(int bc) throws EJBException; - -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/cabin/CabinRemote.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/cabin/CabinRemote.java deleted file mode 100644 index 29faff6fdcb3391bc2123e513506c1b416775a92..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/cabin/CabinRemote.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.titan.cabin; - -import java.rmi.RemoteException; - -public interface CabinRemote extends javax.ejb.EJBObject { - public String getName() throws RemoteException; - public void setName(String str) throws RemoteException; - public int getDeckLevel() throws RemoteException; - public void setDeckLevel(int level) throws RemoteException; - public int getShipId() throws RemoteException; - public void setShipId(int sp) throws RemoteException; - public int getBedCount() throws RemoteException; - public void setBedCount(int bc) throws RemoteException; -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/cruise/CruiseBean.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/cruise/CruiseBean.java deleted file mode 100644 index 3373f90cec2db317dac946d4db813f9b5eb63a6b..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/cruise/CruiseBean.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.titan.cruise; - -import javax.ejb.CreateException; -import javax.ejb.RemoveException; -import javax.ejb.EntityContext; -import com.titan.ship.*; -import java.util.Collection; -import javax.naming.InitialContext; -import javax.naming.NamingException; - -public abstract class CruiseBean implements javax.ejb.EntityBean { - - public Integer ejbCreate(String name, ShipLocal ship) throws CreateException { - setName(name); - return null; - } - - public void ejbPostCreate(String name, ShipLocal ship) { - setShip(ship); - } - - // persistent fields - public abstract void setName(String name); - public abstract String getName( ); - - public abstract void setShip(ShipLocal ship); - public abstract ShipLocal getShip( ); - - // relationship fields - - public abstract void setReservations(Collection res); - public abstract Collection getReservations( ); - - // standard call back methods - - public void setEntityContext(EntityContext ec){} - - public void unsetEntityContext(){} - public void ejbLoad(){} - public void ejbStore(){} - public void ejbActivate(){} - public void ejbPassivate(){} - public void ejbRemove() throws RemoveException {} - -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/cruise/CruiseHomeLocal.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/cruise/CruiseHomeLocal.java deleted file mode 100644 index 6b6e30d8a5663d5b3763ed499987bbb069f51900..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/cruise/CruiseHomeLocal.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.titan.cruise; - -import com.titan.ship.*; -import javax.ejb.CreateException; -import javax.ejb.FinderException; -import java.util.Collection; - - -// Cruise EJB's local home interface -public interface CruiseHomeLocal extends javax.ejb.EJBLocalHome { - - public CruiseLocal create(String name, ShipLocal ship) - throws javax.ejb.CreateException; - - public CruiseLocal findByPrimaryKey(Object primaryKey) - throws javax.ejb.FinderException; - - public Collection findAllCruises() - throws FinderException; - - public CruiseLocal findByName(String name) - throws FinderException; -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/cruise/CruiseLocal.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/cruise/CruiseLocal.java deleted file mode 100644 index e632bedf373356f28f5ce3a8612e51b5e72d179c..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/cruise/CruiseLocal.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.titan.cruise; - -import com.titan.ship.*; -import java.util.Collection; - -// Cruise EJB's local interface -public interface CruiseLocal extends javax.ejb.EJBLocalObject { - - public String getName(); - public void setName(String name); - - public ShipLocal getShip(); - public void setShip(ShipLocal ship); - - public void setReservations(Collection res); - public Collection getReservations( ); - -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/AddressDO.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/AddressDO.java deleted file mode 100644 index cae7e22182b85eac5d1d746b972114459dd61f99..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/AddressDO.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.titan.customer; - -public class AddressDO implements java.io.Serializable { - - private String street; - private String city; - private String state; - private String zip; - - public AddressDO(String street, String city, String state, String zip ) { - this.street = street; - this.city = city; - this.state = state; - this.zip = zip; - } - public String getStreet(){ - return street; - } - public String getCity(){ - return city; - } - public String getState(){ - return state; - } - public String getZip(){ - return zip; - } -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/CreditCardBean.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/CreditCardBean.java deleted file mode 100644 index 5855282576d19f83eeec5a15d19f3f68c01cf1a0..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/CreditCardBean.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.titan.customer; - -import javax.ejb.EntityContext; -import java.util.Date; -import javax.naming.InitialContext; -import javax.naming.NamingException; - -public abstract class CreditCardBean implements javax.ejb.EntityBean { - - public Object ejbCreate(Date exp, String numb, String name, String org) - throws javax.ejb.CreateException { - - setExpirationDate(exp); - setNumber(numb); - setNameOnCard(name); - setCreditOrganization(org); - return null; - } - - public void ejbPostCreate(Date exp, String numb, String name, String org) { - } - - // relationship fields - - public abstract CustomerLocal getCustomer( ); - public abstract void setCustomer(CustomerLocal cust); - - // persistent fields - public abstract Date getExpirationDate(); - public abstract void setExpirationDate(Date date); - public abstract String getNumber(); - public abstract void setNumber(String number); - public abstract String getNameOnCard(); - public abstract void setNameOnCard(String name); - public abstract String getCreditOrganization(); - public abstract void setCreditOrganization(String org); - - // standard call back methods - - public void setEntityContext(EntityContext ec){} - public void unsetEntityContext(){} - public void ejbLoad(){} - public void ejbStore(){} - public void ejbActivate(){} - public void ejbPassivate(){} - public void ejbRemove() throws javax.ejb.RemoveException{} - -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/CreditCardHomeLocal.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/CreditCardHomeLocal.java deleted file mode 100644 index 1e20caf8185a5e45ca878f033e172d0357258c61..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/CreditCardHomeLocal.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.titan.customer; - -import javax.ejb.CreateException; -import javax.ejb.FinderException; -import java.util.Collection; -import java.util.Date; - -// CreditCard EJB's local home interface -public interface CreditCardHomeLocal extends javax.ejb.EJBLocalHome { - - public CreditCardLocal create(Date exp, String numb, String name, String org) - throws javax.ejb.CreateException; - - public CreditCardLocal findByPrimaryKey(Object primaryKey) - throws javax.ejb.FinderException; - - public Collection findAllCreditCards() throws FinderException; -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/CreditCardLocal.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/CreditCardLocal.java deleted file mode 100644 index 0311d0b6a6d95c7c02f78e265d5733ed3b24793c..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/CreditCardLocal.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.titan.customer; - -import java.util.Date; - -// Credit Card EJB's local interface -public interface CreditCardLocal extends javax.ejb.EJBLocalObject { - - public Date getExpirationDate(); - public void setExpirationDate(Date date); - public String getNumber(); - public void setNumber(String number); - public String getNameOnCard(); - public void setNameOnCard(String name); - public String getCreditOrganization(); - public void setCreditOrganization(String org); - - public CustomerLocal getCustomer(); - public void setCustomer(CustomerLocal cust); - -} - diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/CustomerBean.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/CustomerBean.java deleted file mode 100644 index df280a52077f0409e535bab8aad538aabf084c98..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/CustomerBean.java +++ /dev/null @@ -1,182 +0,0 @@ -package com.titan.customer; - -import com.titan.phone.*; -import com.titan.address.AddressLocal; -import com.titan.address.AddressHomeLocal; - -import javax.naming.InitialContext; -import javax.ejb.EJBException; -import javax.ejb.EntityContext; -import javax.ejb.CreateException; -import javax.naming.NamingException; -import java.util.Date; -import java.util.Collection; -import java.util.Iterator; -import java.util.Vector; - -public abstract class CustomerBean implements javax.ejb.EntityBean { - - public Integer ejbCreate(Integer id) throws javax.ejb.CreateException{ - this.setId(id); - return null; - } - - public void ejbPostCreate(Integer id){ - } - - - // business methods - - public Name getName() { - Name name = new Name(getLastName(),getFirstName()); - return name; - } - public void setName(Name name) { - setLastName(name.getLastName()); - setFirstName(name.getFirstName()); - } - - public void setAddress(String street, String city, String state, String zip) - throws EJBException { - - AddressLocal addr = this.getHomeAddress( ); - - try { - - if (addr == null) { - // Customer doesn't have an address yet. Create a new one. - InitialContext cntx = new InitialContext( ); - AddressHomeLocal addrHome = - (AddressHomeLocal)cntx.lookup("java:comp/env/ejb/AddressHomeLocal"); - addr = addrHome.createAddress(street, city, state, zip); - this.setHomeAddress(addr); - } else { - // Customer already has an address. Change its fields - addr.setStreet(street); - addr.setCity(city); - addr.setState(state); - addr.setZip(zip); - } - } catch (NamingException ne) { - throw new EJBException(ne); - } catch (CreateException ce) { - throw new EJBException(ce); - } - } - - public void setAddress(AddressDO addrValue) throws CreateException, NamingException { - String street = addrValue.getStreet(); - String city = addrValue.getCity(); - String state = addrValue.getState(); - String zip = addrValue.getZip(); - - setAddress(street,city,state,zip); - } - - - public AddressDO getAddress() { - - AddressLocal addrLocal = this.getHomeAddress(); - if (addrLocal == null) return null; - String street = addrLocal.getStreet(); - String city = addrLocal.getCity(); - String state = addrLocal.getState(); - String zip = addrLocal.getZip(); - AddressDO addrValue = new AddressDO(street,city,state,zip); - return addrValue; - } - - public void addPhoneNumber(String number, byte type) - throws NamingException, CreateException { - InitialContext jndiEnc = new InitialContext( ); - PhoneHomeLocal phoneHome = (PhoneHomeLocal)(jndiEnc.lookup("java:comp/env/ejb/PhoneHomeLocal")); - - PhoneLocal phone = phoneHome.create(number,type); - Collection phoneNumbers = this.getPhoneNumbers( ); - phoneNumbers.add(phone); - } - - public void removePhoneNumber(byte typeToRemove) { - - Collection phoneNumbers = this.getPhoneNumbers( ); - Iterator iterator = phoneNumbers.iterator(); - - while(iterator.hasNext()){ - PhoneLocal phone = (PhoneLocal)iterator.next(); - if (phone.getType() == typeToRemove) { - phoneNumbers.remove(phone); - break; - } - - } - } - - public void updatePhoneNumber(String number, byte typeToUpdate) { - - - Collection phoneNumbers = this.getPhoneNumbers( ); - Iterator iterator = phoneNumbers.iterator(); - while(iterator.hasNext()){ - PhoneLocal phone = (PhoneLocal)iterator.next(); - if (phone.getType() == typeToUpdate) { - phone.setNumber(number); - break; - } - } - } - - public Vector getPhoneList() { - - Vector vv = new Vector(); - Collection phoneNumbers = this.getPhoneNumbers(); - - Iterator iterator = phoneNumbers.iterator(); - while(iterator.hasNext()) { - PhoneLocal phone = (PhoneLocal)iterator.next(); - String ss = "type = '" + phone.getType() + "', number = '" + phone.getNumber() + "'"; - vv.add(ss); - } - - return vv; - } - - - // persistent relationships - - public abstract AddressLocal getHomeAddress(); - public abstract void setHomeAddress(AddressLocal address); - - public abstract CreditCardLocal getCreditCard(); - public abstract void setCreditCard(CreditCardLocal card); - - public abstract java.util.Collection getPhoneNumbers( ); - public abstract void setPhoneNumbers(java.util.Collection phones); - - public abstract java.util.Collection getReservations(); - public abstract void setReservations(java.util.Collection reservations); - - - // abstract accessor methods - public abstract Integer getId(); - public abstract void setId(Integer id); - - public abstract String getLastName( ); - public abstract void setLastName(String lname); - - public abstract String getFirstName( ); - public abstract void setFirstName(String fname); - - public abstract boolean getHasGoodCredit(); - public abstract void setHasGoodCredit(boolean flag); - - // standard call back methods - - public void setEntityContext(EntityContext ec){} - public void unsetEntityContext(){} - public void ejbLoad(){} - public void ejbStore(){} - public void ejbActivate(){} - public void ejbPassivate(){} - public void ejbRemove() throws javax.ejb.RemoveException {} - -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/CustomerHomeLocal.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/CustomerHomeLocal.java deleted file mode 100644 index ec021688a65fd0750e71b03f0d5c88ba4a876da6..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/CustomerHomeLocal.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.titan.customer; - -import java.rmi.RemoteException; -import javax.ejb.CreateException; -import javax.ejb.FinderException; -import java.util.Collection; -import com.titan.cruise.CruiseLocal; - -public interface CustomerHomeLocal extends javax.ejb.EJBLocalHome { - - public CustomerLocal create(Integer id) - throws CreateException; - public CustomerLocal findByPrimaryKey(Integer id) - throws FinderException; - - public Collection findAllCustomers() - throws FinderException; - - public Collection findByName(String lastName, String firstName) - throws FinderException; - - public CustomerLocal findByExactName(String lastName, String firstName) - throws FinderException; - - public Collection findByNameAndState(String lastName, String firstName, String state) - throws FinderException; - - public CustomerLocal findSmith90() - throws FinderException; - - public Collection findByGoodCredit() - throws FinderException; - - public Collection findByCity(String city, String state) - throws FinderException; - - public Collection findInHotStates() - throws FinderException; - - public Collection findWithNoReservations() - throws FinderException; - - public Collection findOnCruise(CruiseLocal cruise) - throws FinderException; - - public Collection findByState(String state) - throws FinderException; -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/CustomerHomeRemote.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/CustomerHomeRemote.java deleted file mode 100644 index d240be88ab6484a9cab3b98b5c8ba0a041c972d6..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/CustomerHomeRemote.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.titan.customer; - -import java.rmi.RemoteException; -import javax.ejb.CreateException; -import javax.ejb.FinderException; - -public interface CustomerHomeRemote extends javax.ejb.EJBHome { - - public CustomerRemote create(Integer id) throws CreateException, RemoteException; - public CustomerRemote findByPrimaryKey(Integer id) throws FinderException, RemoteException; - -} - diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/CustomerLocal.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/CustomerLocal.java deleted file mode 100644 index 8238a42dd77a4ea3a0c1275e56d539e73b5db0f8..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/CustomerLocal.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.titan.customer; - -import com.titan.address.*; - -import javax.ejb.CreateException; -import javax.naming.NamingException; -import java.util.Date; -import java.util.Vector; -import java.util.Collection; - -public interface CustomerLocal extends javax.ejb.EJBLocalObject { - - public Name getName(); - public void setName(Name name); - - public boolean getHasGoodCredit(); - public void setHasGoodCredit(boolean flag); - - public void addPhoneNumber(String number, byte type) - throws NamingException, CreateException; - public void removePhoneNumber(byte typeToRemove); - public void updatePhoneNumber(String number, byte typeToUpdate); - - public Vector getPhoneList(); - - public AddressLocal getHomeAddress(); - public void setHomeAddress(AddressLocal address); - - public CreditCardLocal getCreditCard(); - public void setCreditCard(CreditCardLocal card); - - public Collection getPhoneNumbers( ); - public void setPhoneNumbers(Collection phones); - -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/CustomerRemote.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/CustomerRemote.java deleted file mode 100644 index c35c1193a7eb392f48980330432a35e44be7b01c..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/CustomerRemote.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.titan.customer; - -import java.rmi.RemoteException; -import javax.ejb.CreateException; -import javax.naming.NamingException; - -public interface CustomerRemote extends javax.ejb.EJBObject { - - public void setAddress(String street, String city, String state, String zip) - throws RemoteException, CreateException, NamingException; - - public void setAddress(AddressDO address) - throws RemoteException, CreateException, NamingException; - - public AddressDO getAddress() throws RemoteException; - - public Name getName() throws RemoteException; - public void setName(Name name) throws RemoteException; - - public boolean getHasGoodCredit() throws RemoteException; - public void setHasGoodCredit(boolean flag) throws RemoteException; - // public String getHasGoodCredit() throws RemoteException; - // public void setHasGoodCredit(String flag) throws RemoteException; - // public double getHasGoodCredit() throws RemoteException; - //public void setHasGoodCredit(double flag) throws RemoteException; -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/Name.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/Name.java deleted file mode 100644 index 33e856a46106e4e2555e5fab753581d7c4dde0c6..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/customer/Name.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.titan.customer; - -public class Name implements java.io.Serializable { - - private String lastName; - private String firstName; - - public Name(String lname, String fname){ - lastName = lname; - firstName = fname; - } - public String getLastName() { - return lastName; - } - public String getFirstName() { - return firstName; - } -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/phone/PhoneBean.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/phone/PhoneBean.java deleted file mode 100644 index 7b40bead9250900b659c33207904d3661c4ad5ad..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/phone/PhoneBean.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.titan.phone; - -import javax.ejb.EntityContext; -import java.util.Date; -import javax.naming.InitialContext; -import javax.naming.NamingException; - -public abstract class PhoneBean implements javax.ejb.EntityBean { - - public Object ejbCreate(String number, byte type) throws javax.ejb.CreateException { - setNumber(number); - setType(type); - - return null; - } - - public void ejbPostCreate(String number, byte type) { - } - - // persistent fields - public abstract String getNumber(); - public abstract void setNumber(String number); - public abstract byte getType(); - public abstract void setType(byte type); - - // standard call back methods - - public void setEntityContext(EntityContext ec){} - public void unsetEntityContext(){} - public void ejbLoad(){} - public void ejbStore(){} - public void ejbActivate(){} - public void ejbPassivate(){} - public void ejbRemove() throws javax.ejb.RemoveException{} - -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/phone/PhoneHomeLocal.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/phone/PhoneHomeLocal.java deleted file mode 100644 index 1bbae830ef4b6016dcb9619aeba824bc3f6e8049..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/phone/PhoneHomeLocal.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.titan.phone; - -import javax.ejb.CreateException; -import javax.ejb.FinderException; -import java.util.Collection; - -// Phone EJB's local home interface -public interface PhoneHomeLocal extends javax.ejb.EJBLocalHome { - - public PhoneLocal create(String number, byte type) - throws javax.ejb.CreateException; - - public PhoneLocal findByPrimaryKey(Object primaryKey) - throws javax.ejb.FinderException; - - public Collection findAllPhones() - throws javax.ejb.FinderException; - -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/phone/PhoneLocal.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/phone/PhoneLocal.java deleted file mode 100644 index 59f03b92d043bbe6d313d260d3b778dac034fed1..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/phone/PhoneLocal.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.titan.phone; - -// Phone EJB's local interface -public interface PhoneLocal extends javax.ejb.EJBLocalObject { - - public String getNumber(); - public void setNumber(String number); - public byte getType(); - public void setType(byte type); - -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/reservation/ReservationBean.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/reservation/ReservationBean.java deleted file mode 100644 index 46b011bbd09d40af8dbca0362b8b3a0b753ca69e..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/reservation/ReservationBean.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.titan.reservation; - -import com.titan.cruise.*; - -import javax.ejb.CreateException; -import javax.ejb.RemoveException; -import javax.ejb.EntityContext; -import java.util.Date; -import java.util.Set; -import java.util.Collection; -import javax.naming.InitialContext; -import javax.naming.NamingException; - -public abstract class ReservationBean implements javax.ejb.EntityBean { - public Object ejbCreate(CruiseLocal cruise, Collection customers) throws CreateException { - return null; - } - - public void ejbPostCreate(CruiseLocal cruise, Collection customers) { - setCruise(cruise); - Collection myCustomers = this.getCustomers(); - myCustomers.addAll(customers); - } - - // relationship fields - - public abstract CruiseLocal getCruise(); - public abstract void setCruise(CruiseLocal cruise); - - public abstract Set getCabins( ); - public abstract void setCabins(Set cabins); - - public abstract Set getCustomers( ); - public abstract void setCustomers(Set customers); - - // persistent fields - public abstract Date getDate(); - public abstract void setDate(Date date); - public abstract double getAmountPaid(); - public abstract void setAmountPaid(double amount); - - // standard call back methods - - public void setEntityContext(EntityContext ec){} - public void unsetEntityContext(){} - public void ejbLoad(){} - public void ejbStore(){} - public void ejbActivate(){} - public void ejbPassivate(){} - public void ejbRemove() throws RemoveException {} - -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/reservation/ReservationHomeLocal.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/reservation/ReservationHomeLocal.java deleted file mode 100644 index 9c649f0081c9b58108e26715c3bc90574c762ba0..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/reservation/ReservationHomeLocal.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.titan.reservation; - -import com.titan.cruise.*; - -import java.util.Collection; -import javax.ejb.CreateException; -import javax.ejb.FinderException; - -// Reservation EJB's local home interface -public interface ReservationHomeLocal extends javax.ejb.EJBLocalHome { - - public ReservationLocal create(CruiseLocal cruise, Collection customers) - throws javax.ejb.CreateException; - - public ReservationLocal findByPrimaryKey(Object primaryKey) - throws javax.ejb.FinderException; - - public Collection findAllReservations() throws FinderException; - -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/reservation/ReservationLocal.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/reservation/ReservationLocal.java deleted file mode 100644 index 9a4442856c33b7be0f5b72448dd77b33152ed22c..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/reservation/ReservationLocal.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.titan.reservation; - -import com.titan.cruise.*; - -import java.util.Date; -import java.util.Set; - -// Reservation EJB's local interface -public interface ReservationLocal extends javax.ejb.EJBLocalObject { - - public Date getDate(); - public void setDate(Date date); - public double getAmountPaid(); - public void setAmountPaid(double amount); - - public CruiseLocal getCruise(); - public void setCruise(CruiseLocal cruise); - - public Set getCabins( ); - public void setCabins(Set customers); - - public Set getCustomers( ); - public void setCustomers(Set customers); - -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/ship/ShipBean.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/ship/ShipBean.java deleted file mode 100644 index b3923d703ce0c52c0c24c727a3f17e4ceb459757..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/ship/ShipBean.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.titan.ship; - -import javax.ejb.EntityContext; -import javax.ejb.CreateException; -import javax.ejb.RemoveException; - -public abstract class ShipBean implements javax.ejb.EntityBean { - - public Integer ejbCreate(Integer primaryKey, String name, double tonnage) throws CreateException { - setId(primaryKey); - setName(name); - setTonnage(tonnage); - return null; - } - - public void ejbPostCreate(Integer primaryKey, String name, double tonnage) { - } - - // persistent fields - - public abstract void setId(Integer id); - public abstract Integer getId(); - public abstract void setName(String name); - public abstract String getName( ); - public abstract void setTonnage(double tonnage); - public abstract double getTonnage( ); - - // standard call back methods - - public void setEntityContext(EntityContext ec){} - public void unsetEntityContext(){} - public void ejbLoad(){} - public void ejbStore(){} - public void ejbActivate(){} - public void ejbPassivate(){} - public void ejbRemove() throws RemoveException {} - -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/ship/ShipHomeLocal.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/ship/ShipHomeLocal.java deleted file mode 100644 index 80028c831fba8dfd456a2acb076f09515e6100d2..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/ship/ShipHomeLocal.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.titan.ship; - -import javax.ejb.CreateException; -import javax.ejb.FinderException; -import java.util.Collection; - -// Ship EJB's local home interface -public interface ShipHomeLocal extends javax.ejb.EJBLocalHome { - - public ShipLocal create(Integer primaryKey, String name, double tonnage) - throws javax.ejb.CreateException; - - public ShipLocal findByPrimaryKey(Object primaryKey) - throws javax.ejb.FinderException; - - public Collection findAllShips() - throws FinderException; - - public Collection findByTonnage(Double tonnage) - throws javax.ejb.FinderException; - - public Collection findByTonnage(Double tonnage1, Double tonnage2) - throws javax.ejb.FinderException; - -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/ship/ShipLocal.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/ship/ShipLocal.java deleted file mode 100644 index 539b05b1d3feb1081c92825f1485b2922c569630..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/ship/ShipLocal.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.titan.ship; - -// Ship EJB's local interface -public interface ShipLocal extends javax.ejb.EJBLocalObject { - - public Integer getId(); - public void setId(Integer id); - public String getName(); - public void setName(String name); - public double getTonnage(); - public void setTonnage(double tonnage); - -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/travelagent/RTravelAgentBean.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/travelagent/RTravelAgentBean.java deleted file mode 100644 index e33e41900f70073af3914d75612f93022c87407a..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/travelagent/RTravelAgentBean.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.titan.travelagent; - -import com.titan.cabin.CabinRemote; -import com.titan.cabin.CabinHomeRemote; -import java.rmi.RemoteException; -import javax.naming.InitialContext; -import javax.naming.Context; -import javax.ejb.EJBException; -import java.util.Properties; -import java.util.Vector; - -public class RTravelAgentBean implements javax.ejb.SessionBean { - - public void ejbCreate() throws javax.ejb.CreateException { - // Do nothing. - } - - public String [] listCabins(int shipID, int bedCount) { - - try { - - javax.naming.Context jndiContext = new InitialContext(); - Object obj = - jndiContext.lookup("java:comp/env/ejb/CabinHomeRemote"); - - - CabinHomeRemote home = (CabinHomeRemote) - javax.rmi.PortableRemoteObject.narrow(obj,CabinHomeRemote.class); - - Vector vect = new Vector(); - for (int i = 1; ; i++) { - Integer pk = new Integer(i); - CabinRemote cabin = null; - try { - cabin = home.findByPrimaryKey(pk); - } catch(javax.ejb.FinderException fe) { - System.out.println(">>>> Caught exception: "+fe.getMessage()+" for pk="+i); - break; - } - - // Check to see if the bed count and ship ID match - if (cabin != null && - cabin.getShipId() == shipID && - cabin.getBedCount() == bedCount) { - String details = i+","+cabin.getName()+","+cabin.getDeckLevel(); - vect.addElement(details); - } - } - - String [] list = new String[vect.size()]; - vect.copyInto(list); - return list; - - } catch(Exception e) { - throw new EJBException(e); - } - } - - public void ejbRemove() {} - public void ejbActivate(){} - public void ejbPassivate(){} - public void setSessionContext(javax.ejb.SessionContext cntx){} -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/travelagent/RTravelAgentHomeRemote.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/travelagent/RTravelAgentHomeRemote.java deleted file mode 100644 index 398027d8bfbb84c85a73955016297fc5548685e1..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/travelagent/RTravelAgentHomeRemote.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.titan.travelagent; - -import java.rmi.RemoteException; -import javax.ejb.CreateException; - -public interface RTravelAgentHomeRemote extends javax.ejb.EJBHome { - - public RTravelAgentRemote create() - throws RemoteException, CreateException; - -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/travelagent/RTravelAgentRemote.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/travelagent/RTravelAgentRemote.java deleted file mode 100644 index d374852dcecc2b3248c624907fc265aa340365d8..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/travelagent/RTravelAgentRemote.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.titan.travelagent; - -import java.rmi.RemoteException; -import javax.ejb.FinderException; - -public interface RTravelAgentRemote extends javax.ejb.EJBObject { - - // String elements follow the format "id, name, deck level" - public String [] listCabins(int shipID, int bedCount) - throws RemoteException; - -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/travelagent/TravelAgentBean.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/travelagent/TravelAgentBean.java deleted file mode 100644 index 429d50148b500e37a481359db63514c9c7b7db97..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/travelagent/TravelAgentBean.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.titan.travelagent; - -import com.titan.cabin.CabinLocal; -import com.titan.cabin.CabinHomeLocal; -import java.rmi.RemoteException; -import javax.naming.InitialContext; -import javax.naming.Context; -import javax.ejb.EJBException; -import java.util.Properties; -import java.util.Vector; - -public class TravelAgentBean implements javax.ejb.SessionBean { - - public void ejbCreate() throws javax.ejb.CreateException { - // Do nothing. - } - - public String [] listCabins(int shipID, int bedCount) { - - try { - - javax.naming.Context jndiContext = new InitialContext(); - Object obj = - jndiContext.lookup("java:comp/env/ejb/CabinHomeLocal"); - - - CabinHomeLocal home = (CabinHomeLocal) - javax.rmi.PortableRemoteObject.narrow(obj,CabinHomeLocal.class); - - Vector vect = new Vector(); - for (int i = 1; ; i++) { - Integer pk = new Integer(i); - CabinLocal cabin = null; - try { - cabin = home.findByPrimaryKey(pk); - } catch(javax.ejb.FinderException fe) { - System.out.println(">>>> Caught exception: "+fe.getMessage()+" for pk="+i); - break; - } - - // Check to see if the bed count and ship ID match - if (cabin != null && - // cabin.getShipId() == shipID && //getShipId only exist in Remote interface - cabin.getBedCount() == bedCount) { - String details = i+","+cabin.getName()+","+cabin.getDeckLevel(); - vect.addElement(details); - } - } - - String [] list = new String[vect.size()]; - vect.copyInto(list); - return list; - - } catch(Exception e) { - throw new EJBException(e); - } - } - - public void ejbRemove() {} - public void ejbActivate(){} - public void ejbPassivate(){} - public void setSessionContext(javax.ejb.SessionContext cntx){} -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/travelagent/TravelAgentHomeRemote.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/travelagent/TravelAgentHomeRemote.java deleted file mode 100644 index 9ff3a8a764bf17b09e6852935270d46c5ecbbfe4..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/travelagent/TravelAgentHomeRemote.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.titan.travelagent; - -import java.rmi.RemoteException; -import javax.ejb.CreateException; - -public interface TravelAgentHomeRemote extends javax.ejb.EJBHome { - - public TravelAgentRemote create() - throws RemoteException, CreateException; - -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/com/titan/travelagent/TravelAgentRemote.java b/jonas_tests/examples/base/examples/cmp2/src/com/titan/travelagent/TravelAgentRemote.java deleted file mode 100644 index 4b41e145c3d6143188a5e6ad66081a292e844a50..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/com/titan/travelagent/TravelAgentRemote.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.titan.travelagent; - -import java.rmi.RemoteException; -import javax.ejb.FinderException; - -public interface TravelAgentRemote extends javax.ejb.EJBObject { - - // String elements follow the format "id, name, deck level" - public String [] listCabins(int shipID, int bedCount) - throws RemoteException; - -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/servlets/ServletTest.java b/jonas_tests/examples/base/examples/cmp2/src/servlets/ServletTest.java deleted file mode 100644 index 0efa9b1d8cbf76c277e539a4f9cd07053469eace..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/servlets/ServletTest.java +++ /dev/null @@ -1,410 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package servlets; - -import java.io.IOException; -import java.io.PrintWriter; -import java.util.Calendar; -import java.util.Vector; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.titan.address.AddressHomeLocal; -import com.titan.address.AddressLocal; -import com.titan.customer.CreditCardHomeLocal; -import com.titan.customer.CreditCardLocal; -import com.titan.customer.CustomerHomeLocal; -import com.titan.customer.CustomerLocal; -import com.titan.customer.Name; -import com.titan.phone.PhoneLocal; - - - -/** - * This servlet is used to test O'Reilly examples - * @author JOnAS team - */ -public class ServletTest extends HttpServlet { - - /** - * Called by the server (via the service method) to allow a servlet to - * handle a GET request. - * @param request an HttpServletRequest object that contains the request - * the client has made of the servlet - * @param response an HttpServletResponse object that contains the - * response the servlet sends to the client - * @throws IOException if an input or output error is detected when the - * servlet handles the GET request - * @throws ServletException if the request for the GET could not be handled - */ - public void doGet(HttpServletRequest request, HttpServletResponse response) - throws IOException, ServletException { - - boolean ok = true; - response.setContentType("text/html"); - PrintWriter out = response.getWriter(); - - out.println(""); - out.println(""); - out.println(""); - out.println("O'Reilly Examples"); - out.println(""); - out.println(""); - out.println(""); - out.println("

    Examples 1:1 Relationships

    "); - - Context initialContext = null; - try { - initialContext = new InitialContext(); - } catch (Exception e) { - out.println("

    ERROR: Cannot get initial context for JNDI: " + e + "

    "); - return; - } - - out.println("Back to Menu"); - - - out.println("

    Example showing CreditCard/Customer relationship

    "); - - out.println("

    (ie Setting reference in a one-to-one bidirectional relationship)

    "); - - // Connecting to CustomerHomeLocal and CreditCardHomeLocal thru JNDI - CustomerHomeLocal customerhome = null; - CreditCardHomeLocal cardhome = null; - AddressHomeLocal addresshome = null; - - try { - customerhome = (CustomerHomeLocal) - initialContext.lookup("java:comp/env/ejb/CustomerHomeLocal"); - cardhome = (CreditCardHomeLocal) - initialContext.lookup("java:comp/env/ejb/CreditCardHomeLocal"); - addresshome = (AddressHomeLocal) - initialContext.lookup("java:comp/env/ejb/AddressHomeLocal"); - } catch (Exception e) { - out.println("

    ERROR: Cannot lookup java:comp/env/ejb/XXHomeLocal: " - + e + "

    "); - return; - } - - out.println("

    Creating Customer 'Smith'.

    "); - Integer primaryKey = new Integer(71); - CustomerLocal customer = null; - try { - customer = customerhome.create(primaryKey); - } catch (javax.ejb.CreateException ex) { - out.println("

    Cannot create customer: " - + ex + "

    "); - return; - } - customer.setName(new Name("Smith", "John")); - - out.println("

    Creating CreditCard.

    "); - // set Credit Card info - Calendar now = Calendar.getInstance(); - CreditCardLocal card = null; - try { - card = cardhome.create(now.getTime(), "370000000000001", "John Smith", "O'Reilly"); - } catch (javax.ejb.CreateException ex) { - out.println("

    ERROR: Cannot create creditcard : " + ex + "

    "); - return; - } - - out.println("

    Linking CreditCard and Customer.

    "); - customer.setCreditCard(card); - - out.println("

    Testing both directions on relationship:

    "); - String cardname = customer.getCreditCard().getNameOnCard(); - out.println("customer.getCreditCard().getNameOnCard() = '" + cardname + "'
    "); - Name name = card.getCustomer().getName(); - String custfullname = name.getFirstName() + " " + name.getLastName(); - out.println("card.getCustomer().getName() = '" + custfullname + "'
    "); - if (!cardname.equals(custfullname)) { - out.println("

    ERROR: The name must be the same

    "); - ok = false; - } - out.println("

    Content of Tables:

    "); - try { - listCustomers(out, customerhome); - listCreditcards(out, cardhome); - } catch (Exception e) { - out.println("

    ERROR: exception caught = " + e + "

    "); - } - - out.println("

    Unlink the beans using CreditCard, test Customer side:

    "); - card.setCustomer(null); - CreditCardLocal newcardref = customer.getCreditCard(); - if (newcardref == null) { - out.print("

    Card is properly unlinked from customer bean

    "); - } else { - out.print("

    ERROR: Whoops, customer still thinks it has a card !

    "); - ok = false; - } - // relink to avoid side effect on further test - card.setCustomer(customer); - - - out.println("

    Example Showing Customer/Address Relationship

    "); - out.println("

    (ie Setting reference in a one-to-one unidirectional relationship)

    "); - - // Find Customer 71 - primaryKey = new Integer(71); - try { - customer = customerhome.findByPrimaryKey(primaryKey); - } catch (Exception e) { - out.println("

    ERROR: Exception : " + e + "

    "); - return; - } - - AddressLocal addr = customer.getHomeAddress(); - if (addr == null) { - out.println("

    Address reference is NULL, Creating one and setting in Customer:

    "); - try { - addr = addresshome.createAddress("333 North Washington", "Minneapolis", "MN", "55401"); - } catch (Exception e) { - out.println("

    ERROR: Exception : " + e + "

    "); - return; - } - customer.setHomeAddress(addr); - } - out.println("

    Address Info: " - + addr.getStreet() + ", " - + addr.getCity() + ", " - + addr.getState() + ", " - + addr.getZip() + "

    "); - // Modifying Address - - out.println("

    Modifying Address through address reference:

    "); - addr.setStreet("445 East Lake Street"); - addr.setCity("Wayzata"); - addr.setState("MN"); - addr.setZip("55432"); - out.println("

    Address Info: " - + addr.getStreet() + ", " - + addr.getCity() + ", " - + addr.getState() + ", " - + addr.getZip() + "

    "); - - out.print("

    Creating New Address and calling setHomeAddress():

    "); - AddressLocal addrold = addr; - try { - addr = addresshome.createAddress("700 Main Street", "St. Paul", "MN", "55302"); - } catch (Exception e) { - out.println("

    ERROR: Exception : " + e + "

    "); - return; - } - out.println("

    Address Info: " - + addr.getStreet() + ", " - + addr.getCity() + ", " - + addr.getState() + ", " - + addr.getZip() + "

    "); - customer.setHomeAddress(addr); - - // Note: Original Address remains in database, orphaned by setHomeAddress call.. - - - out.print("

    Retrieving Address reference from Customer via getHomeAddress():

    "); - addr = customer.getHomeAddress(); - out.print("

    Address Info: " - + addr.getStreet() + ", " - + addr.getCity() + ", " - + addr.getState() + ", " - + addr.getZip() + "

    "); - - out.print("

    Content of Tables:

    "); - try { - listCustomers(out, customerhome); - listAddress(out, addresshome); - } catch (Exception e) { - out.println("

    ERROR: exception caught = " + e + "

    "); - return; - } - - - out.println("

    Example Showing Customer/Phone Relationship

    "); - - // Display current phone numbers and types - out.println("

    Starting content of phone list:

    "); - - Vector vv = customer.getPhoneList(); - listPhones(out, vv); - - // add a new phone number - out.println("

    Adding a new type '1' phone number to Customer 'John Smith'.

    "); - try { - customer.addPhoneNumber("612-555-1212", (byte) 1); - } catch (Exception e) { - out.println("

    ERROR: Exception : " + e + "

    "); - return; - } - - out.println("

    New content of phone list for customer 'John Smith':

    "); - vv = customer.getPhoneList(); - listPhones(out, vv); - - // add a new phone number - out.println("

    Adding a new type '2' phone number to Customer 'John Smith'.

    "); - try { - customer.addPhoneNumber("800-333-3333", (byte) 2); - } catch (Exception e) { - out.println("

    ERROR: Exception : " + e + "

    "); - return; - } - out.println("

    New content of phone list for customer 'John Smith':

    "); - vv = customer.getPhoneList(); - listPhones(out, vv); - - // update a phone number - out.println("

    Updating type '1' phone numbers.

    "); - try { - customer.updatePhoneNumber("763-555-1212", (byte) 1); - } catch (Exception e) { - out.println("

    ERROR: Exception : " + e + "

    "); - return; - } - - out.println("

    New content of phone list for customer 'John Smith':

    "); - vv = customer.getPhoneList(); - listPhones(out, vv); - - // delete a phone number - out.print("

    Removing type '1' phone numbers from this Customer.

    "); - customer.removePhoneNumber((byte) 1); - - out.println("

    Final content of phone list:

    "); - vv = customer.getPhoneList(); - listPhones(out, vv); - // Note that the phone is still in the database, - // but it is no longer related to this customer bean - - // Remove newly created beans for clean - out.println("

    Remove newly created beans for cleaning.

    "); - try { - customer.remove(); - addrold.remove(); - } catch (Exception e) { - out.println("

    Exception : " + e + "

    "); - return; - } - - if (ok) { - out.println("

    Servlet is OK.

    "); - } - - out.println("Back to Menu"); - out.println(""); - out.println(""); - } - - private void listCustomers (PrintWriter out, CustomerHomeLocal chl) throws Exception { - out.println("

    Customers Table Content:

    "); - out.println("
      "); - java.util.Collection clc = chl.findAllCustomers(); - if (clc == null) { - out.println("
    • Customers table is empty
    • "); - } else { - java.util.Iterator iterator = clc.iterator(); - while (iterator.hasNext()) { - CustomerLocal cl = (CustomerLocal) iterator.next(); - String name = cl.getName().getLastName(); - String number = cl.getCreditCard().getNumber(); - out.print("
    • customerLastName = '" + name + "', creditCardNumber = '" + number); - if (cl.getHomeAddress() != null) { - String city = cl.getHomeAddress().getCity(); - out.print("', city = '" + city); - } - out.println("'
    • "); - java.util.Collection phoneNumbers = cl.getPhoneNumbers(); - java.util.Iterator phiterator = phoneNumbers.iterator(); - out.println("
        "); - while (phiterator.hasNext()) { - PhoneLocal phone = (PhoneLocal) phiterator.next(); - out.println("
      • phoneType = '" + phone.getType() - + "', phoneNumber = '" + phone.getNumber() + "'
      • "); - } - out.println("
      "); - - } - } - out.println("
    "); - } - - private void listCreditcards (PrintWriter out, CreditCardHomeLocal cchl) throws Exception { - out.println("

    Creditcards Table Content:

    "); - out.println("
      "); - java.util.Collection clc = cchl.findAllCreditCards(); - if (clc == null) { - out.println("
    • CreditCards table is empty
    • "); - } else { - java.util.Iterator iterator = clc.iterator(); - while (iterator.hasNext()) { - CreditCardLocal ccl = (CreditCardLocal) iterator.next(); - String number = ccl.getNumber(); - String name = ccl.getNameOnCard(); - out.println("
    • creditCardNumber = '" + number - + "', nameOnCard = '" + name + "'
    • "); - } - } - out.println("
    "); - } - - private void listAddress (PrintWriter out, AddressHomeLocal cchl) throws Exception { - out.println("

    Addresses Table Content:

    "); - out.println("
      "); - java.util.Collection clc = cchl.findAllAddress(); - if (clc == null) { - out.println("
    • Addresses table is empty
    • "); - } else { - java.util.Iterator iterator = clc.iterator(); - while (iterator.hasNext()) { - AddressLocal al = (AddressLocal) iterator.next(); - String city = al.getCity(); - String street = al.getStreet(); - out.println("
    • city = '" + city + "', street = '" + street + "'
    • "); - } - } - out.println("
    "); - } - - private void listPhones(PrintWriter out, Vector vv) { - out.println("
      "); - if (vv.size() == 0) { - out.println("
    • phones list is empty
    • "); - } else { - for (int jj = 0; jj < vv.size(); jj++) { - String ss = (String) (vv.get(jj)); - out.println("
    • " + ss + "
    • "); - } - } - out.println("
    "); - } - -} diff --git a/jonas_tests/examples/base/examples/cmp2/src/servlets/ServletTest2.java b/jonas_tests/examples/base/examples/cmp2/src/servlets/ServletTest2.java deleted file mode 100644 index c6d8f96452f31a4154d4a3bc1f8125120efda243..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/servlets/ServletTest2.java +++ /dev/null @@ -1,857 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package servlets; - -import java.io.IOException; -import java.io.PrintWriter; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Calendar; -import java.util.Collection; -import java.util.Date; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Set; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.transaction.UserTransaction; - -import com.titan.cabin.CabinHomeLocal; -import com.titan.cabin.CabinLocal; -import com.titan.cruise.CruiseHomeLocal; -import com.titan.cruise.CruiseLocal; -import com.titan.customer.CustomerHomeLocal; -import com.titan.customer.CustomerLocal; -import com.titan.customer.Name; -import com.titan.reservation.ReservationHomeLocal; -import com.titan.reservation.ReservationLocal; -import com.titan.ship.ShipHomeLocal; -import com.titan.ship.ShipLocal; - -/** - * This servlet is used to test O'Reilly examples - * @author JOnAS team - */ -public class ServletTest2 extends HttpServlet { - - /** - * Called by the server (via the service method) to allow a servlet to - * handle a GET request. - * @param request an HttpServletRequest object that contains the request the - * client has made of the servlet - * @param response an HttpServletResponse object that contains the response - * the servlet sends to the client - * @throws IOException if an input or output error is detected when the - * servlet handles the GET request - * @throws ServletException if the request for the GET could not be handled - */ - public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - - boolean ok = true; - response.setContentType("text/html"); - PrintWriter out = response.getWriter(); - out.println(""); - out.println(""); - out.println(""); - out.println("O'Reilly Examples (Suite)"); - out.println(""); - out.println(""); - out.println(""); - out.println("

    Example Showing Cruise/Ship and Cruise/Reservation Relationships

    "); - Context initialContext = null; - try { - initialContext = new InitialContext(); - } catch (Exception e) { - out.println("

    ERROR: Cannot get initial context for JNDI: " + e + "

    "); - return; - } - - // Connecting to ShipHomeLocal thru JNDI - ShipHomeLocal shiphome = null; - CruiseHomeLocal cruisehome = null; - ReservationHomeLocal reservationhome = null; - CustomerHomeLocal customerhome = null; - CabinHomeLocal cabinhome = null; - UserTransaction tran = null; - try { - shiphome = (ShipHomeLocal) initialContext.lookup("java:comp/env/ejb/ShipHomeLocal"); - cruisehome = (CruiseHomeLocal) initialContext.lookup("java:comp/env/ejb/CruiseHomeLocal"); - reservationhome = (ReservationHomeLocal) initialContext.lookup("java:comp/env/ejb/ReservationHomeLocal"); - customerhome = (CustomerHomeLocal) initialContext.lookup("java:comp/env/ejb/CustomerHomeLocal"); - cabinhome = (CabinHomeLocal) initialContext.lookup("java:comp/env/ejb/CabinHomeLocal"); - tran = (UserTransaction) initialContext.lookup("java:comp/UserTransaction"); - } catch (Exception e) { - out.println("

    ERROR: Cannot lookup java:comp/env/ejb/XXHomeLocal: " + e + "

    "); - return; - - } - - out.println("Back to Menu"); - - out.println("

    Example Showing Cruise/Ship Relationship (Fig 7-12)

    "); - out.println("

    (ie Sharing a bean reference in a Many-to-One Relationship)

    "); - - out.println("

    Creating Ships

    "); - // Create some Ship beans - manually set key - ShipLocal shipA = null; - ShipLocal shipB = null; - try { - shipA = shiphome.create(new Integer(1001), "Ship A", 30000.0); - shipB = shiphome.create(new Integer(1002), "Ship B", 40000.0); - } catch (Exception e) { - out.println("

    ERROR: Exception caught " + e + "

    "); - return; - } - out.println("
      "); - out.println("
    • id = '" + shipA.getId() + "', name = '" + shipA.getName() + "', tonnage = '" - + shipA.getTonnage() + "'
    • "); - out.println("
    • id = '" + shipB.getId() + "', name=" + shipB.getName() + "', tonnage = '" + shipB.getTonnage() - + "
    • "); - out.println("
    "); - - out.println("

    Creating Cruises

    "); - // Create some Cruise beans - automatic key generation by CMP engine - // Link 1-3 to Ship A, 4-6 to Ship B - CruiseLocal[] cruises = new CruiseLocal[7]; - try { - cruises[1] = cruisehome.create("Cruise 1", shipA); - cruises[2] = cruisehome.create("Cruise 2", shipA); - cruises[3] = cruisehome.create("Cruise 3", shipA); - cruises[4] = cruisehome.create("Cruise 4", shipB); - cruises[5] = cruisehome.create("Cruise 5", shipB); - cruises[6] = cruisehome.create("Cruise 6", shipB); - } catch (Exception e) { - out.println("

    ERROR: Exception caught " + e + "

    "); - return; - } - out.println("
      "); - for (int jj = 1; jj < 7; jj++) { - CruiseLocal cc = cruises[jj]; - out.println("
    • '" + cc.getName() + "' is using '" + cc.getShip().getName() + "'
    • "); - } - out.println("
    "); - - out.print("

    Changing 'Cruise 1' to use same ship as 'Cruise 4'

    "); - ShipLocal newship = cruises[4].getShip(); - cruises[1].setShip(newship); - out.println("
      "); - for (int jj = 1; jj < 7; jj++) { - CruiseLocal cc = cruises[jj]; - out.println("
    • '" + cc.getName() + "' is using '" + cc.getShip().getName() + "'
    • "); - } - out.println("
    "); - - out.println("

    Content of Tables

    "); - try { - listCruises(out, cruisehome); - listShips(out, shiphome); - } catch (Exception e) { - out.println("

    ERROR: exception caught = " + e + "

    "); - } - - out.println("

    Example Showing Cruise/Reservation Relationship Using set() (Fig 7-14)

    "); - out - .println("

    (ie Sharing an entire collection in a One-to-Many bidirectional Relationship Using set() )

    "); - out.println("

    Creating some Cruise beans

    "); - // Create some Cruise beans - leave ship reference empty since we don't - // care - CruiseLocal cruiseA = null; - CruiseLocal cruiseB = null; - try { - cruiseA = cruisehome.create("Cruise A", null); - cruiseB = cruisehome.create("Cruise B", null); - } catch (Exception e) { - out.println("

    ERROR: exception caught = " + e + "

    "); - } - out.println("
      "); - out.print("
    • name = '" + cruiseA.getName() + "'
    • "); - out.print("
    • name = '" + cruiseB.getName() + "'
    • "); - out.println("
    "); - - out.print("

    Creating Reservations

    "); - // Create some Reservation beans - automatic key generation by CMP - // engine - // Link 1-3 to Cruise A, 4-6 to Cruise B - ReservationLocal reservations[] = new ReservationLocal[7]; - Calendar date = Calendar.getInstance(); - date.set(2002, 10, 1); - // Leave the Customers collection null in the create() call, - // we don't care about it right now - try { - reservations[1] = reservationhome.create(cruiseA, null); - reservations[1].setDate(date.getTime()); - reservations[1].setAmountPaid(4000.0); - date.add(Calendar.DAY_OF_MONTH, 7); - - reservations[2] = reservationhome.create(cruiseA, null); - reservations[2].setDate(date.getTime()); - reservations[2].setAmountPaid(5000.0); - date.add(Calendar.DAY_OF_MONTH, 7); - - reservations[3] = reservationhome.create(cruiseA, null); - reservations[3].setDate(date.getTime()); - reservations[3].setAmountPaid(6000.0); - date.add(Calendar.DAY_OF_MONTH, 7); - - reservations[4] = reservationhome.create(cruiseB, null); - reservations[4].setDate(date.getTime()); - reservations[4].setAmountPaid(7000.0); - date.add(Calendar.DAY_OF_MONTH, 7); - - reservations[5] = reservationhome.create(cruiseB, null); - reservations[5].setDate(date.getTime()); - reservations[5].setAmountPaid(8000.0); - date.add(Calendar.DAY_OF_MONTH, 7); - - reservations[6] = reservationhome.create(cruiseB, null); - reservations[6].setDate(date.getTime()); - reservations[6].setAmountPaid(9000.0); - date.add(Calendar.DAY_OF_MONTH, 7); - - } catch (Exception e) { - out.println("

    ERROR: Exception caught " + e + "

    "); - return; - } - out.println("
      "); - DateFormat df = new SimpleDateFormat("MM/dd/yyyy"); - for (int jj = 1; jj < 7; jj++) { - ReservationLocal rr = reservations[jj]; - CruiseLocal thiscruise = rr.getCruise(); - String cruisename = (thiscruise != null ? thiscruise.getName() : "No Cruise!"); - out.println("
    • reservationDate = '" + df.format(rr.getDate()) + "', amountPaid = '" + rr.getAmountPaid() - + "', for '" + cruisename + "'
    • "); - } - out.println("
    "); - - out.println("

    Testing CruiseB.setReservations(CruiseA.getReservations())

    "); - // show the effect of a simple "setReservations" on a cruise - Collection areservations = cruiseA.getReservations(); - cruiseB.setReservations(areservations); - // Report information on the 6 reservations - String[] cruisename = new String[7]; - out.println("
      "); - for (int jj = 1; jj < 7; jj++) { - ReservationLocal rr = reservations[jj]; - CruiseLocal thiscruise = rr.getCruise(); - cruisename[jj] = (thiscruise != null ? thiscruise.getName() : "No Cruise!"); - out.print("
    • reservationDate = '" + df.format(rr.getDate()) + "', amount paid = '" + rr.getAmountPaid() - + "', for '" + cruisename[jj] + "'
    • "); - } - out.println("
    "); - if (!cruisename[4].equals("No Cruise!") || !cruisename[5].equals("No Cruise!") - || !cruisename[6].equals("No Cruise!")) { - ok = false; - } - - out.print("

    Content of Tables

    "); - try { - listCruises(out, cruisehome); - listReservations(out, reservationhome); - } catch (Exception e) { - out.println("

    ERROR: exception caught = " + e + "

    "); - return; - } - - out.println("

    Example Showing Cruise/Reservation Relationship Using addAll(..) (Fig 7-15)

    "); - out.print("

    (ie Using Collection.addAll() in a One-to-Many bidirectional relationship)

    "); - // Show how to combine reservations using Collection methods - // Operations such as this must be done in a transaction, usually done - // within a - // stateless session EJB using declarative transactions rather than - // manually like this - - date.set(2002, 10, 1); - // Remove previous reservation - for (int jj = 1; jj < 7; jj++) { - try { - reservations[jj].remove(); - } catch (Exception ex) { - out.println("

    ERROR: exception caught = " + ex + "

    "); - } - } - // Reinit the reservation as before the previous test - try { - reservations[1] = reservationhome.create(cruiseA, null); - reservations[1].setDate(date.getTime()); - reservations[1].setAmountPaid(4000.0); - date.add(Calendar.DAY_OF_MONTH, 7); - - reservations[2] = reservationhome.create(cruiseA, null); - reservations[2].setDate(date.getTime()); - reservations[2].setAmountPaid(5000.0); - date.add(Calendar.DAY_OF_MONTH, 7); - - reservations[3] = reservationhome.create(cruiseA, null); - reservations[3].setDate(date.getTime()); - reservations[3].setAmountPaid(6000.0); - date.add(Calendar.DAY_OF_MONTH, 7); - - reservations[4] = reservationhome.create(cruiseB, null); - reservations[4].setDate(date.getTime()); - reservations[4].setAmountPaid(7000.0); - date.add(Calendar.DAY_OF_MONTH, 7); - - reservations[5] = reservationhome.create(cruiseB, null); - reservations[5].setDate(date.getTime()); - reservations[5].setAmountPaid(8000.0); - date.add(Calendar.DAY_OF_MONTH, 7); - - reservations[6] = reservationhome.create(cruiseB, null); - reservations[6].setDate(date.getTime()); - reservations[6].setAmountPaid(9000.0); - date.add(Calendar.DAY_OF_MONTH, 7); - - } catch (Exception e) { - out.println("

    ERROR: Exception caught " + e + "

    "); - return; - } - - Collection breservations = null; - try { - tran.begin(); - areservations = cruiseA.getReservations(); - breservations = cruiseB.getReservations(); - breservations.addAll(areservations); - tran.commit(); - } catch (Exception e) { - e.printStackTrace(); - try { - tran.rollback(); - } catch (Exception ex) { - ex.printStackTrace(); - return; - } - return; - } - // Report information on the 6 reservations - out.println("

      "); - for (int jj = 1; jj < 7; jj++) { - ReservationLocal rr = reservations[jj]; - CruiseLocal thiscruise = rr.getCruise(); - cruisename[jj] = (thiscruise != null ? thiscruise.getName() : "No Cruise!"); - out.print("
    • reservationDate = '" + df.format(rr.getDate()) + "', amount paid = '" + rr.getAmountPaid() - + "', for '" + cruisename[jj] + "'
    • "); - } - out.println("
    "); - - out.print("

    Contents of Tables

    "); - try { - listCruises(out, cruisehome); - listReservations(out, reservationhome); - } catch (Exception e) { - out.println("

    ERROR: exception caught = " + e + "

    "); - return; - } - - out.println("

    Example Showing Reservation/Customer Relationships (Fig 7-17)

    "); - out.print("

    (ie Using Collection.addAll() in a Many-to-Many bidirectional relationship)

    "); - - out.println("

    Using 'ShipA' and 'CruiseA'

    "); - cruiseA.setShip(shipA); - out.println("
      "); - out.println("
    • cruise.getName() = '" + cruiseA.getName() + "'
    • "); - out.println("
    • ship.getName() = '" + shipA.getName() + "'
    • "); - out.println("
    • cruise.getShip().getName() = '" + cruiseA.getShip().getName() + "'
    • "); - out.println("
    "); - - out.println("

    Creating two sets of customers, one with 1-3, and one with 4-6

    "); - // create two sets of customers, one with customers 1-3 and one with 4-6 - Set lowcustomers = new HashSet(); - Set highcustomers = new HashSet(); - CustomerLocal cust = null; - out.println("
      "); - for (int kk = 1; kk < 7; kk++) { - try { - cust = customerhome.create(new Integer(kk)); - } catch (Exception e) { - out.println("

      ERROR: exception caught = " + e + "

      "); - } - cust.setName(new Name("Customer " + kk, "mike")); - if (kk <= 3) { - lowcustomers.add(cust); - } else { - highcustomers.add(cust); - } - out.print("
    • customer '" + cust.getName().getLastName() + "' created
    • "); - } - out.println("
    "); - // Remove previous reservation - for (int jj = 1; jj < 7; jj++) { - try { - reservations[jj].remove(); - } catch (Exception ex) { - out.println("

    ERROR: exception caught = " + ex + "

    "); - } - } - - out.print("

    Creating Reservations '1' and '2', each with 3 customers

    "); - try { - reservations[1] = reservationhome.create(cruiseA, lowcustomers); - reservations[1].setDate(date.getTime()); - reservations[1].setAmountPaid(4000.0); - date.add(Calendar.DAY_OF_MONTH, 7); - - reservations[2] = reservationhome.create(cruiseA, highcustomers); - reservations[2].setDate(date.getTime()); - reservations[2].setAmountPaid(5000.0); - date.add(Calendar.DAY_OF_MONTH, 7); - } catch (Exception e) { - out.println("

    ERROR: Exception caught " + e + "

    "); - return; - } - // report information on the reservations - reportReservations(out, reservations, 2, tran); - - out.print("

    Performing customers_a.addAll(customers_b) test

    "); - // Finally we can perform the test shown in Figure 7-17 - // Operations such as this must be done in a transaction, usually done - // within a - // stateless session EJB using declarative transactions rather than - // manually like this - try { - tran.begin(); - Set customers_a = reservations[1].getCustomers(); - Set customers_b = reservations[2].getCustomers(); - customers_a.addAll(customers_b); - tran.commit(); - } catch (Exception e) { - e.printStackTrace(); - try { - tran.rollback(); - } catch (Exception ex) { - out.println("

    ERROR: Exception caught " + ex + "

    "); - return; - } - } - // report information on the reservations - reportReservations(out, reservations, 2, tran); - - out.print("

    Sharing an entire collection in a Many-to-Many bidirectional relationship (Fig 7-18)

    "); - out.println("

    Creating four sets of customers 1-3, 2-4, 3-5, 4-6

    "); - // create four sets of customers, 1-3, 2-4, 3-5, 4-6 - Set customers13 = new HashSet(); - Set customers24 = new HashSet(); - Set customers35 = new HashSet(); - Set customers46 = new HashSet(); - out.println("
      "); - for (int kk = 1; kk < 7; kk++) { - try { - cust = customerhome.create(new Integer(kk + 500)); - cust.setName(new Name("Customer_1 " + kk, "bill")); - } catch (Exception e) { - out.println("

      ERROR: exception caught = " + e + "

    "); - return; - } - if (kk <= 3) { - customers13.add(cust); - } - if (kk >= 2 && kk <= 4) { - customers24.add(cust); - } - if (kk >= 3 && kk <= 5) { - customers35.add(cust); - } - if (kk >= 4) { - customers46.add(cust); - } - out.print("
  • customer '" + cust.getName().getLastName() + "' created
  • "); - } - out.println(""); - - out.print("

    Creating Reservations 1-4 using three customers each

    "); - ReservationLocal reservations1[] = new ReservationLocal[5]; - try { - reservations1[1] = reservationhome.create(cruiseA, customers13); - reservations1[1].setDate(date.getTime()); - reservations1[1].setAmountPaid(4000.0); - date.add(Calendar.DAY_OF_MONTH, 7); - - reservations1[2] = reservationhome.create(cruiseA, customers24); - reservations1[2].setDate(date.getTime()); - reservations1[2].setAmountPaid(5000.0); - date.add(Calendar.DAY_OF_MONTH, 7); - - reservations1[3] = reservationhome.create(cruiseA, customers35); - reservations1[3].setDate(date.getTime()); - reservations1[3].setAmountPaid(6000.0); - date.add(Calendar.DAY_OF_MONTH, 7); - - reservations1[4] = reservationhome.create(cruiseA, customers46); - reservations1[4].setDate(date.getTime()); - reservations1[4].setAmountPaid(7000.0); - date.add(Calendar.DAY_OF_MONTH, 7); - } catch (Exception e) { - out.println("

    ERROR: Exception caught " + e + "

    "); - return; - } - reportReservations(out, reservations1, 4, tran); - - out.print("

    Performing reservationD.setCustomers(customersA) (Fig 7-18)

    "); - try { - tran.begin(); - Set customers_a = reservations1[1].getCustomers(); - reservations1[4].setCustomers(customers_a); - tran.commit(); - } catch (Exception e) { - e.printStackTrace(); - try { - tran.rollback(); - } catch (Exception ex) { - out.println("

    ERROR: Exception caught " + ex + "

    "); - return; - } - } - reportReservations(out, reservations1, 4, tran); - - out.print("

    Example Showing Reservation/Cabin Relationships (Fig 7-20)

    "); - out.print("

    (ie Removing beans in a Many-to-Many unidirectional relationship)

    "); - out.print("

    Creating Cabins four sets of cabins, 1-3, 2-4, 3-5, 4-6

    "); - // create four sets of cabins, 1-3, 2-4, 3-5, 4-6 - Set cabins13 = new HashSet(); - Set cabins24 = new HashSet(); - Set cabins35 = new HashSet(); - Set cabins46 = new HashSet(); - CabinLocal cabin = null; - out.println("
      "); - for (int kk = 1; kk < 7; kk++) { - try { - cabin = cabinhome.create(new Integer(kk)); - } catch (Exception e) { - out.println("

      ERROR: exception caught = " + e + "

    "); - } - cabin.setName("Cabin " + kk); - if (kk <= 3) { - cabins13.add(cabin); - } - if (kk >= 2 && kk <= 4) { - cabins24.add(cabin); - } - if (kk >= 3 && kk <= 5) { - cabins35.add(cabin); - } - if (kk >= 4) { - cabins46.add(cabin); - } - out.print("
  • cabin '" + cabin.getName() + "' created
  • "); - } - out.println(""); - - out.print("

    Creating Reservations 1-4 using three cabins each

    "); - ReservationLocal reservations2[] = new ReservationLocal[5]; - // leave Customers collection null, we dont care about it for this - // example - try { - reservations2[1] = reservationhome.create(cruiseA, null); - reservations2[1].setCabins(cabins13); - reservations2[1].setDate(date.getTime()); - reservations2[1].setAmountPaid(4000.0); - date.add(Calendar.DAY_OF_MONTH, 7); - - reservations2[2] = reservationhome.create(cruiseA, null); - reservations2[2].setCabins(cabins24); - reservations2[2].setDate(date.getTime()); - reservations2[2].setAmountPaid(5000.0); - date.add(Calendar.DAY_OF_MONTH, 7); - - reservations2[3] = reservationhome.create(cruiseA, null); - reservations2[3].setCabins(cabins35); - reservations2[3].setDate(date.getTime()); - reservations2[3].setAmountPaid(6000.0); - date.add(Calendar.DAY_OF_MONTH, 7); - - reservations2[4] = reservationhome.create(cruiseA, null); - reservations2[4].setCabins(cabins46); - reservations2[4].setDate(date.getTime()); - reservations2[4].setAmountPaid(7000.0); - date.add(Calendar.DAY_OF_MONTH, 7); - } catch (Exception e) { - out.println("

    ERROR: Exception caught " + e + "

    "); - return; - } - reportReservations(out, reservations2, 4, tran); - - out.print("

    Performing cabins_a collection iterator.remove() test

    "); - // Finally we can perform the test shown in Figure 7-20 - try { - tran.begin(); - Set cabins_a = reservations2[1].getCabins(); - Iterator iterator = cabins_a.iterator(); - out.print("
      "); - while (iterator.hasNext()) { - CabinLocal cc = (CabinLocal) iterator.next(); - out.print("
    • Removing '" + cc.getName() + "' from 'cabins_a'" + "
    • "); - iterator.remove(); - } - out.print("
    "); - tran.commit(); - } catch (Exception e) { - try { - tran.rollback(); - } catch (Exception ex) { - out.println("

    ERROR: Exception caught " + ex + "

    "); - return; - } - } - reportReservations(out, reservations2, 4, tran); - - out.print("

    Example Showing Reservation/Cabin Relationships

    "); - - out.print("

    Creating Cabins in ShipA

    "); - CabinLocal cabins[] = new CabinLocal[4]; - try { - cabins[1] = cabinhome.create(new Integer(10)); - cabins[1].setShip(shipA); - cabins[1].setDeckLevel(1); - cabins[1].setName("Minnesota Suite"); - cabins[1].setBedCount(2); - - cabins[2] = cabinhome.create(new Integer(11)); - cabins[2].setShip(shipA); - cabins[2].setDeckLevel(2); - cabins[2].setName("California Suite"); - cabins[2].setBedCount(2); - - cabins[3] = cabinhome.create(new Integer(12)); - cabins[3].setShip(shipA); - cabins[3].setDeckLevel(3); - cabins[3].setName("Missouri Suite"); - cabins[3].setBedCount(2); - } catch (Exception e) { - out.println("

    ERROR: Exception caught " + e + "

    "); - return; - } - out.println("
      "); - for (int jj = 1; jj < 4; jj++) { - CabinLocal cc = cabins[jj]; - out.print("
    • cabin '" + cc.getName() + "' is on ship '" + cc.getShip().getName() + "'
    • "); - } - out.println("
    "); - - out.print("

    Creating Reservations

    "); - ReservationLocal reservations3[] = new ReservationLocal[3]; - try { - reservations3[1] = reservationhome.create(cruiseA, null); - reservations3[1].setDate(date.getTime()); - reservations3[1].setAmountPaid(4000.0); - date.add(Calendar.DAY_OF_MONTH, 7); - - reservations3[2] = reservationhome.create(cruiseA, null); - reservations3[2].setDate(date.getTime()); - reservations3[2].setAmountPaid(5000.0); - date.add(Calendar.DAY_OF_MONTH, 7); - } catch (Exception e) { - out.println("

    ERROR: Exception caught " + e + "

    "); - return; - } - reportReservations(out, reservations3, 2, tran); - - out.print("

    Creating Links from Reservations to Cabins

    "); - Set cabins1 = new HashSet(2); - cabins1.add(cabins[1]); - cabins1.add(cabins[2]); - Set cabins2 = new HashSet(2); - cabins2.add(cabins[2]); - cabins2.add(cabins[3]); - reservations3[1].setCabins(cabins1); - reservations3[2].setCabins(cabins2); - reportReservations(out, reservations3, 2, tran); - - out.print("

    Testing reservation_b.setCabins(reservation_a.getCabins())

    "); - try { - tran.begin(); - Set cabins_a = reservations3[1].getCabins(); - reservations3[2].setCabins(cabins_a); - tran.commit(); - } catch (Exception e) { - try { - tran.rollback(); - } catch (Exception ex) { - out.println("

    ERROR: Exception caught " + ex + "

    "); - return; - } - } - reportReservations(out, reservations3, 2, tran); - - out.print("

    Cleaning all tables

    "); - try { - Collection clc = customerhome.findAllCustomers(); - java.util.Iterator iterator = clc.iterator(); - while (iterator.hasNext()) { - CustomerLocal cl = (CustomerLocal) iterator.next(); - cl.remove(); - } - clc = shiphome.findAllShips(); - iterator = clc.iterator(); - while (iterator.hasNext()) { - ShipLocal sl = (ShipLocal) iterator.next(); - sl.remove(); - } - clc = cruisehome.findAllCruises(); - iterator = clc.iterator(); - while (iterator.hasNext()) { - CruiseLocal cl = (CruiseLocal) iterator.next(); - cl.remove(); - } - - clc = reservationhome.findAllReservations(); - iterator = clc.iterator(); - while (iterator.hasNext()) { - ReservationLocal rl = (ReservationLocal) iterator.next(); - rl.remove(); - } - clc = cabinhome.findAllCabins(); - iterator = clc.iterator(); - while (iterator.hasNext()) { - CabinLocal cl = (CabinLocal) iterator.next(); - cl.remove(); - } - - } catch (Exception ex) { - out.println("

    ERROR: during cleaning exception caught = " + ex + "

    "); - } - if (ok) { - out.println("

    Servlet is OK.

    "); - } - out.println("Back to Menu"); - out.println(""); - out.println(""); - } - - private void listCruises(PrintWriter out, CruiseHomeLocal chl) throws Exception { - out.println("

    Cruises Table Content:

    "); - out.println("
      "); - java.util.Collection clc = chl.findAllCruises(); - if (clc == null) { - out.println("
    • Cruises table is empty
    • "); - } else { - java.util.Iterator iterator = clc.iterator(); - while (iterator.hasNext()) { - CruiseLocal cl = (CruiseLocal) iterator.next(); - String cname = cl.getName(); - String sname = (cl.getShip() != null ? cl.getShip().getName() : "No Ship!"); - out.println("
    • cruiseName = '" + cname + "', shipName = '" + sname + "'
    • "); - - } - } - out.println("
    "); - } - - private void listShips(PrintWriter out, ShipHomeLocal cchl) throws Exception { - out.println("

    Ships Table Content:

    "); - out.println("
      "); - java.util.Collection clc = cchl.findAllShips(); - if (clc == null) { - out.println("
    • Ships table is empty
    • "); - } else { - java.util.Iterator iterator = clc.iterator(); - while (iterator.hasNext()) { - ShipLocal ccl = (ShipLocal) iterator.next(); - double tonnage = ccl.getTonnage(); - String name = ccl.getName(); - out.println("
    • shipName = '" + name + "', tonnage = '" + tonnage + "'
    • "); - } - } - out.println("
    "); - } - - private void listReservations(PrintWriter out, ReservationHomeLocal cchl) throws Exception { - out.println("

    Reservations Table Content:

    "); - out.println("
      "); - java.util.Collection clc = cchl.findAllReservations(); - if (clc == null) { - out.println("
    • Reservations table is empty
    • "); - out.println("
    "); - } else { - java.util.Iterator iterator = clc.iterator(); - while (iterator.hasNext()) { - ReservationLocal ccl = (ReservationLocal) iterator.next(); - Date date = ccl.getDate(); - out.println("
  • reservation date = '" + date + "'
  • "); - } - out.println(""); - } - } - - private void reportReservations(PrintWriter out, ReservationLocal reservations[], int nb, UserTransaction tran) { - DateFormat df = new SimpleDateFormat("MM/dd/yyyy"); - // report information on the reservations - out.println("
      "); - for (int jj = 1; jj < nb + 1; jj++) { - ReservationLocal rr = reservations[jj]; - CruiseLocal thiscruise = rr.getCruise(); - String cruisename = (thiscruise != null ? thiscruise.getName() : "No Cruise!"); - // Operations such as this must be done in a transaction, usually - // done within a - // stateless session EJB using declarative transactions rather than - // manually like this - String customerinfo = ""; - CustomerLocal cust = null; - String cabininfo = ""; - try { - tran.begin(); - Set customerset = rr.getCustomers(); - Iterator iterator = customerset.iterator(); - while (iterator.hasNext()) { - cust = (CustomerLocal) iterator.next(); - customerinfo += cust.getName().getLastName() + " "; - } - Set cabinset = rr.getCabins(); - iterator = cabinset.iterator(); - while (iterator.hasNext()) { - CabinLocal cabin = (CabinLocal) iterator.next(); - cabininfo += cabin.getName() + " "; - } - tran.commit(); - } catch (Exception e) { - e.printStackTrace(); - try { - tran.rollback(); - } catch (Exception ex) { - out.println("

      ERROR: Exception caught " + ex + "

      "); - return; - } - } - out.print("
    • reservationDate = '" + df.format(rr.getDate()) + "', amountPaid = '" + rr.getAmountPaid() - + "', for '" + cruisename + "' with :
    • "); - out.print("
        "); - if (!customerinfo.equals("")) { - out.print("
      • customers: " + customerinfo); - } - if (!cabininfo.equals("")) { - out.print("
      • cabins: " + cabininfo + "
      • "); - } - out.print("
      "); - } - out.println("
    "); - } - -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/cmp2/src/servlets/ServletTest3.java b/jonas_tests/examples/base/examples/cmp2/src/servlets/ServletTest3.java deleted file mode 100644 index 661cf4eae430ca2e29004057a17373efec0d2b62..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/cmp2/src/servlets/ServletTest3.java +++ /dev/null @@ -1,777 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package servlets; - -import java.io.IOException; -import java.io.PrintWriter; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.Collection; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Set; -import java.util.Vector; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.titan.address.AddressHomeLocal; -import com.titan.address.AddressLocal; -import com.titan.cabin.CabinHomeLocal; -import com.titan.cabin.CabinLocal; -import com.titan.cruise.CruiseHomeLocal; -import com.titan.cruise.CruiseLocal; -import com.titan.customer.CreditCardHomeLocal; -import com.titan.customer.CreditCardLocal; -import com.titan.customer.CustomerHomeLocal; -import com.titan.customer.CustomerLocal; -import com.titan.customer.Name; -import com.titan.phone.PhoneHomeLocal; -import com.titan.reservation.ReservationHomeLocal; -import com.titan.reservation.ReservationLocal; -import com.titan.ship.ShipHomeLocal; -import com.titan.ship.ShipLocal; - -/** - * This servlet is used to test O'Reilly examples - * @author JOnAS team - */ -public class ServletTest3 extends HttpServlet { - - /** - * Called by the server (via the service method) to allow a servlet to - * handle a GET request. - * @param request an HttpServletRequest object that contains the request the - * client has made of the servlet - * @param response an HttpServletResponse object that contains the response - * the servlet sends to the client - * @throws IOException if an input or output error is detected when the - * servlet handles the GET request - * @throws ServletException if the request for the GET could not be handled - */ - public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { - - boolean ok = true; - response.setContentType("text/html"); - PrintWriter out = response.getWriter(); - - out.println(""); - out.println(""); - out.println(""); - out.println("O'Reilly Examples"); - out.println(""); - out.println(""); - out.println(""); - out.println("

    EJB QL Examples from Chapter 8

    "); - - Context initialContext = null; - try { - initialContext = new InitialContext(); - } catch (Exception e) { - out.print("

    ERROR: Cannot get initial context for JNDI: " + e + "

    "); - return; - } - - out.println("Back to Menu"); - - // Connecting to CustomerHomeLocal and CreditCardHomeLocal thru JNDI - CustomerHomeLocal customerhome = null; - CreditCardHomeLocal cardhome = null; - AddressHomeLocal addresshome = null; - ShipHomeLocal shiphome = null; - CruiseHomeLocal cruisehome = null; - ReservationHomeLocal reservationhome = null; - CabinHomeLocal cabinhome = null; - PhoneHomeLocal phonehome = null; - try { - customerhome = (CustomerHomeLocal) initialContext.lookup("java:comp/env/ejb/CustomerHomeLocal"); - cardhome = (CreditCardHomeLocal) initialContext.lookup("java:comp/env/ejb/CreditCardHomeLocal"); - addresshome = (AddressHomeLocal) initialContext.lookup("java:comp/env/ejb/AddressHomeLocal"); - shiphome = (ShipHomeLocal) initialContext.lookup("java:comp/env/ejb/ShipHomeLocal"); - cruisehome = (CruiseHomeLocal) initialContext.lookup("java:comp/env/ejb/CruiseHomeLocal"); - reservationhome = (ReservationHomeLocal) initialContext.lookup("java:comp/env/ejb/ReservationHomeLocal"); - cabinhome = (CabinHomeLocal) initialContext.lookup("java:comp/env/ejb/CabinHomeLocal"); - phonehome = (PhoneHomeLocal) initialContext.lookup("java:comp/env/ejb/PhoneHomeLocal"); - } catch (Exception e) { - out.println("

    ERROR: Cannot lookup java:comp/env/ejb/XXHomeLocal: " + e + "

    "); - return; - } - - String cities[] = new String[6]; - cities[0] = "Minneapolis"; - cities[1] = "St. Paul"; - cities[2] = "Rochester"; - cities[3] = "Winona"; - cities[4] = "Wayzata"; - cities[5] = "Eagan"; - - out.println("

    Example showing Sample EJB-QL

    "); - - out.print("

    Creating a Ship and Cruise

    "); - ShipLocal shipA = null; - CruiseLocal cruiseA = null; - try { - shipA = shiphome.create(new Integer(10772), "Ship A", 30000.0); - cruiseA = cruisehome.create("Cruise A", shipA); - } catch (Exception ex) { - ok = false; - out.print("

    ERROR: Exception caught : " + ex + "

    "); - } - out.println("
      "); - out.println("
    • cruise.getName() = '" + cruiseA.getName() + "'
    • "); - out.println("
    • ship.getName() = '" + shipA.getName() + "'
    • "); - out.println("
    • cruise.getShip().getName() = '" + cruiseA.getShip().getName() + "'
    • "); - out.println("
    "); - - out.print("

    Creating Ship Beans with Various Tonnage Values

    "); - out.print("
      "); - for (int jj = 1; jj <= 10; jj++) { - try { - ShipLocal ship = shiphome.create(new Integer(jj), "Ship " + jj, 30000.0 + (10000.0 * jj)); - printShip(out, ship); - } catch (Exception ex) { - ok = false; - out.print("

      ERROR: Exception caught : " + ex + "

      "); - } - - } - out.print("
    "); - - out.print("

    Finding Ships with Exactly 100K Tonnage

    "); - out.print("

    SELECT OBJECT(s) FROM JE2_Ship AS s WHERE s.tonnage = ?1

    "); - Collection ships100k = null; - try { - ships100k = shiphome.findByTonnage(new Double(100000.0)); - } catch (Exception ex) { - ok = false; - out.print("

    ERROR: Exception caught : " + ex + "

    "); - } - out.print("

    Number of ships = " + ships100k.size() + "
    Expected = 1 ships

    "); - if (ships100k.size() != 1) { - ok = false; - } - Iterator iterator = ships100k.iterator(); - out.print("
      "); - while (iterator.hasNext()) { - ShipLocal ship = (ShipLocal) (iterator.next()); - printShip(out, ship); - } - out.print("
    "); - - out.print("

    Finding Ships with Tonnage between 50K and 110K

    "); - out.print("

    SELECT OBJECT(s) FROM JE2_Ship AS s WHERE s.tonnage BETWEEN ?1 AND ?2

    "); - Collection ships50110k = null; - try { - ships50110k = shiphome.findByTonnage(new Double(50000.0), new Double(110000.0)); - } catch (Exception ex) { - ok = false; - out.print("

    ERROR: Exception caught : " + ex + "

    "); - } - out.print("

    Number of ships = " + ships50110k.size() + "
    Expected = 7 ships

    "); - if (ships50110k.size() != 7) { - ok = false; - } - iterator = ships50110k.iterator(); - out.print("
      "); - while (iterator.hasNext()) { - ShipLocal ship = (ShipLocal) (iterator.next()); - printShip(out, ship); - } - out.print("
    "); - - // creating cruise for future use - cruiseA = null; - CruiseLocal cruiseB = null; - try { - ShipLocal ship1 = shiphome.findByPrimaryKey(new Integer(1)); - cruiseA = cruisehome.create("Alaska Cruise", ship1); - cruiseB = cruisehome.create("Bohemian Cruise", ship1); - } catch (Exception ex) { - ok = false; - out.print("

    ERROR: Exception caught : " + ex + "

    "); - } - - out.println("

    Creating Customers

    "); - for (int kk = 80; kk <= 99; kk++) { - CustomerLocal customer = null; - AddressLocal addr = null; - try { - customer = customerhome.create(new Integer(kk)); - customer.setName(new Name("Smith" + kk, "John")); - customer.addPhoneNumber("612-555-12" + kk, (byte) 1); - addr = addresshome.createAddress("10" + kk + " Elm Street", cities[(kk - 80) % 6], (kk % 2 == 0 ? "MN" - : "CA"), "5540" + (kk % 5 + 1)); - } catch (Exception e) { - ok = false; - out.println("

    ERROR: exception caught = " + e + "

    "); - } - customer.setHomeAddress(addr); - customer.setHasGoodCredit((kk % 4 == 0)); - //printCustomer(out, customer, addr); - } - - // Creating Customers 1-6, each with 2 reservations for 2 cabins - Calendar date = Calendar.getInstance(); - date.set(2002, 10, 1); - try { - - for (int kk = 201; kk < 207; kk++) { - Collection customers = new ArrayList(); - CustomerLocal cust = customerhome.create(new Integer(kk)); - cust.setName(new Name("Customer " + kk, "Mike")); - cust.setHasGoodCredit((kk % 2 == 0)); // odds are bums - AddressLocal addr = addresshome.createAddress("50" + kk + " Main Street", "Minneapolis", "MN", "5510" - + kk); - cust.setHomeAddress(addr); - //out.print("

  • Customer name= - // "+cust.getName().getLastName()+"
  • "); - customers.add(cust); // put this single customer in the - // collection - - //printCustomer(out, cust,addr); - - Collection reservations = new ArrayList(); - - for (int jj = 0; jj < 2; jj++) { - - ReservationLocal reservation = reservationhome.create(cruiseA, customers); - reservation.setDate(date.getTime()); - reservation.setAmountPaid(1000 * kk + 100 * jj + 2000); - date.add(Calendar.DAY_OF_MONTH, 7); - - Set cabins = new HashSet(); - CabinLocal cabin = cabinhome.create(new Integer(1000 + kk * 100 + jj)); - cabin.setDeckLevel(kk - 200); - cabin.setName("Cabin " + kk + "0" + jj + "1"); - - cabins.add(cabin); - cabin = cabinhome.create(new Integer(1000 + kk * 100 + 10 + jj)); - cabin.setDeckLevel(kk - 200); - cabin.setName("Cabin " + kk + "0" + jj + "2"); - - cabins.add(cabin); - - reservation.setCabins(cabins); // this reservation has 2 - // cabins - //out.print("
      "); - //printReservation(out, reservation); - //out.print("
    "); - } - } - } catch (Exception ex) { - ok = false; - out.print("

    ERROR: Exception caught : " + ex + "

    "); - } - - String fnames[] = new String[5]; - fnames[0] = "John"; - fnames[1] = "Paul"; - fnames[2] = "Ringo"; - fnames[3] = "Joe"; - fnames[4] = "Roger"; - - String[] lnames = new String[3]; - lnames[0] = "Smith"; - lnames[1] = "Johnson"; - lnames[2] = "Star"; - - // Creating Customers 50-69 - try { - for (int kk = 50; kk <= 69; kk++) { - CustomerLocal customer = customerhome.create(new Integer(kk)); - customer.setName(new Name(lnames[(kk - 50) % 3], fnames[(kk - 50) % 5])); - customer.addPhoneNumber("612-555-12" + kk, (byte) 1); - AddressLocal addr = addresshome.createAddress("10" + kk + " Elm Street", cities[(kk - 50) % 6], - (kk % 2 == 0 ? "MN" : "CA"), "5540" + (kk % 5 + 1)); - customer.setHomeAddress(addr); - customer.setHasGoodCredit((kk % 4 == 0)); - - //printCustomer(out, customer, addr); - - // Some customers will have reservations already on one of the - // two cruises.. - if (kk % 3 != 0) { - Collection customers = new ArrayList(); - customers.add(customer); // put this single customer in the - // collection - ReservationLocal reservation = reservationhome.create((kk % 3 == 1 ? cruiseA : cruiseB), customers); - reservation.setDate(date.getTime()); - reservation.setAmountPaid(10 * kk + 2000); - //out.print("
      "); - //printReservation(out, reservation); - //out.print("
    "); - - date.add(Calendar.DAY_OF_MONTH, 7); - } - } - } catch (Exception ex) { - ok = false; - out.print("

    ERROR: Exception caught : " + ex + "

    "); - } - - // Creating Customers 100-109 - try { - for (int kk = 100; kk <= 109; kk++) { - CustomerLocal customer = customerhome.create(new Integer(kk)); - customer.setName(new Name("Lennon" + kk, "Paul")); - customer.addPhoneNumber("666-543-12" + kk, (byte) 1); - AddressLocal addr = addresshome.createAddress("10" + kk + " Abbey Road", cities[(kk - 100) % 6], - (kk % 2 == 0 ? "FL" : "WA"), "5540" + (kk % 5 + 1)); - - customer.setHomeAddress(addr); - customer.setHasGoodCredit((kk % 4 == 0)); - - //printCustomer(out, customer, addr); - } - } catch (Exception ex) { - ok = false; - out.print("

    ERROR: Exception caught : " + ex + "

    "); - } - - try { - listCustomers(out, customerhome); - } catch (Exception e) { - ok = false; - out.println("

    ERROR: exception caught = " + e + "

    "); - } - - out.print("

    Finding Customer having name 'John Smith85'

    "); - out - .print("

    SELECT OBJECT(c) FROM JE2_Customer AS c WHERE c.lastName = ?1 AND c.firstName = ?2

    "); - CustomerLocal customer85 = null; - try { - customer85 = customerhome.findByExactName("Smith85", "John"); - } catch (Exception ex) { - ok = false; - out.print("

    ERROR: Exception caught : " + ex + "

    "); - } - AddressLocal addr85 = customer85.getHomeAddress(); - printCustomer(out, customer85, addr85); - - out.print("

    Finding Customer 'Smith90'

    "); - out.print("

    SELECT OBJECT(c) FROM JE2_Customer AS c WHERE c.lastName = 'Smith90'

    "); - CustomerLocal customer90 = null; - try { - customer90 = customerhome.findSmith90(); - } catch (Exception ex) { - ok = false; - out.print("

    ERROR: Exception caught : " + ex + "

    "); - } - - AddressLocal addr90 = customer90.getHomeAddress(); - printCustomer(out, customer90, addr90); - - out.print("

    Finding Customers having GoodCredit

    "); - out.print("

    SELECT OBJECT(c) FROM JE2_Customer AS c WHERE c.hasGoodCredit = TRUE

    "); - Collection mplscustomers = null; - try { - mplscustomers = customerhome.findByGoodCredit(); - } catch (Exception ex) { - ok = false; - out.print("

    ERROR: Exception caught : " + ex + "

    "); - } - - iterator = mplscustomers.iterator(); - out.print("

    Number of customers = " + mplscustomers.size() + "
    Expected = 16 customers

    "); - if (mplscustomers.size() != 16) { - ok = false; - } - while (iterator.hasNext()) { - CustomerLocal customer = (CustomerLocal) (iterator.next()); - AddressLocal addr = customer.getHomeAddress(); - printCustomer(out, customer, addr); - } - - out.print("

    Finding Customers having City = 'Minneapolis' and State = 'MN'

    "); - out - .print("

    SELECT OBJECT(c) FROM JE2_Customer AS c WHERE c.homeAddress.city = ?1 AND c.homeAddress.state = ?2

    "); - try { - mplscustomers = customerhome.findByCity("Minneapolis", "MN"); - } catch (Exception ex) { - ok = false; - out.print("

    ERROR: Exception caught : " + ex + "

    "); - } - out.print("

    Number of customers = " + mplscustomers.size() + "
    Expected = 14 customers

    "); - if (mplscustomers.size() != 14) { - ok = false; - } - iterator = mplscustomers.iterator(); - while (iterator.hasNext()) { - CustomerLocal customer = (CustomerLocal) (iterator.next()); - AddressLocal addr = customer.getHomeAddress(); - printCustomer(out, customer, addr); - } - - out.print("

    Cabins Table Content

    "); - try { - listCabins(out, cabinhome); - } catch (Exception ex) { - ok = false; - out.print("

    ERROR: Exception caught : " + ex + "

    "); - } - - out.print("

    Retrieve a collection of all cabins on deck '3'

    "); - out.print("

    SELECT OBJECT(c) FROM Cabin AS c WHERE c.deckLevel = ?1

    "); - Collection cabins = null; - try { - cabins = cabinhome.findAllOnDeckLevel(new Integer(3)); - out.print("

    Number of cabins = " + cabins.size() + "
    Expected = 4 cabins

    "); - Iterator iter = cabins.iterator(); - out.print("
      "); - while (iter.hasNext()) { - CabinLocal cabin = (CabinLocal) (iter.next()); - out.print("
    • cabin '" + cabin.getName() + "' on deck '" + cabin.getDeckLevel() + "'
    • "); - } - out.print("
    "); - } catch (Exception ex) { - ok = false; - out.print("

    ERROR: Exception caught : " + ex + "

    "); - } - - try { - out.print("

    Finding Customer having a name exactly matching 'Joe Star'

    "); - out - .print("

    SELECT OBJECT(c) FROM JE2_Customer AS c WHERE c.lastName = ?1 AND c.firstName = ?2

    "); - CustomerLocal customer = customerhome.findByExactName("Star", "Joe"); - AddressLocal addr = customer.getHomeAddress(); - printCustomer(out, customer, addr); - Collection customers = null; - - out.print("

    Finding Customers having a name like 'Jo S' (no wildcards)

    "); - out - .print("

    SELECT OBJECT(c) FROM JE2_Customer AS c WHERE c.lastName LIKE ?1 AND c.firstName LIKE ?2

    "); - - customers = customerhome.findByName("S", "Jo"); - iterator = customers.iterator(); - while (iterator.hasNext()) { - customer = (CustomerLocal) (iterator.next()); - addr = customer.getHomeAddress(); - printCustomer(out, customer, addr); - } - out.print("

    Number of customers = " + customers.size() + "
    Expected = 0 customers

    "); - if (customers.size() != 0) { - ok = false; - } - - out.print("

    Finding Customers having a name like 'Jo% S%' (with wildcards)

    "); - out - .print("

    SELECT OBJECT(c) FROM JE2_Customer AS c WHERE c.lastName LIKE ?1 AND c.firstName LIKE ?2

    "); - customers = customerhome.findByName("S%", "Jo%"); - iterator = customers.iterator(); - out.print("

    Number of customers = " + customers.size() + "
    Expected = 26 customers

    "); - if (customers.size() != 26) { - ok = false; - } - while (iterator.hasNext()) { - customer = (CustomerLocal) (iterator.next()); - addr = customer.getHomeAddress(); - printCustomer(out, customer, addr); - } - - out.print("

    Finding Customers having a name like 'Jo% S%' and living in 'MN'

    "); - out - .print("

    SELECT OBJECT(c) FROM JE2_Customer AS c
    WHERE c.lastName LIKE ?1 AND c.firstName LIKE ?2 AND c.homeAddress.state = ?3

    "); - customers = customerhome.findByNameAndState("S%", "Jo%", "MN"); - iterator = customers.iterator(); - out.print("

    Number of customers = " + customers.size() + "
    Expected = 13 customers

    "); - if (customers.size() != 13) { - ok = false; - } - while (iterator.hasNext()) { - customer = (CustomerLocal) (iterator.next()); - addr = customer.getHomeAddress(); - printCustomer(out, customer, addr); - } - - out.print("

    Finding Customers Living in Warm Climates

    "); - out - .print("

    SELECT OBJECT(c) FROM JE2_Customer AS c WHERE c.homeAddress.state IN ('FL','TX','AZ','CA')

    "); - customers = customerhome.findInHotStates(); - out.print("

    Number of customers = " + customers.size() + "
    Expected = 25 customers

    "); - if (customers.size() != 25) { - ok = false; - } - iterator = customers.iterator(); - while (iterator.hasNext()) { - customer = (CustomerLocal) (iterator.next()); - addr = customer.getHomeAddress(); - printCustomer(out, customer, addr); - } - - out.print("

    Finding Customers With No Reservation

    "); - out.print("

    SELECT OBJECT(c) FROM JE2_Customer AS c WHERE c.reservations IS EMPTY

    "); - customers = customerhome.findWithNoReservations(); - out.print("

    Number of customers = " + customers.size() + "
    Expected = 37 customers

    "); - if (customers.size() != 37) { - ok = false; - } - iterator = customers.iterator(); - while (iterator.hasNext()) { - customer = (CustomerLocal) (iterator.next()); - addr = customer.getHomeAddress(); - printCustomer(out, customer, addr); - } - - out.print("

    Finding Customers On Alaska Cruise

    "); - out - .print("

    SELECT OBJECT(c) FROM JE2_Customer AS cust, Cruise AS cr, IN (cr.reservations) AS res
    WHERE cr = ?1 AND cust MEMBER OF res.customers

    "); - CruiseLocal crA = cruisehome.findByName("Alaska Cruise"); - customers = customerhome.findOnCruise(cruiseA); - out.print("

    Number of customers = " + customers.size() + "
    Expected = 12 customers

    "); - if (customers.size() != 12) { - ok = false; - } - iterator = customers.iterator(); - while (iterator.hasNext()) { - customer = (CustomerLocal) (iterator.next()); - addr = customer.getHomeAddress(); - printCustomer(out, customer, addr); - } - - out.print("

    Select the zip codes of the state 'FL'

    "); - out.print("

    SELECT a.zip FROM JE2_Address AS a WHERE a.state = ?1

    "); - Collection zipCodes = null; - zipCodes = addresshome.selectZipCodes("FL"); - out.print("

    Number of zip codes = " + zipCodes.size() - + "
    Expected = 5 zip codes (from 55401 to 55405)

    "); - if (zipCodes.size() != 5) { - ok = false; - } - Iterator iZipCodes = zipCodes.iterator(); - out.println("
      "); - while (iZipCodes.hasNext()) { - out.print("
    • zip code = '" + iZipCodes.next() + "'
    • "); - } - out.println("
    "); - - out.print("

    Select the customer which have the address 'addr85'

    "); - out.print("

    SELECT OBJECT(c) FROM JE2_Customer AS c WHERE c.homeAddress = ?1

    "); - CustomerLocal cust = null; - cust = addresshome.selectCustomer(addr85); - addr = cust.getHomeAddress(); - printCustomer(out, cust, addr); - - } catch (Exception ex) { - ok = false; - out.print("

    ERROR: Exception caught : " + ex + "

    "); - } - out.print("

    Cleaning all tables

    "); - - try { - Collection clc = customerhome.findAllCustomers(); - iterator = clc.iterator(); - while (iterator.hasNext()) { - CustomerLocal cl = (CustomerLocal) iterator.next(); - cl.remove(); - } - clc = shiphome.findAllShips(); - iterator = clc.iterator(); - while (iterator.hasNext()) { - ShipLocal sl = (ShipLocal) iterator.next(); - sl.remove(); - } - clc = cruisehome.findAllCruises(); - iterator = clc.iterator(); - while (iterator.hasNext()) { - CruiseLocal cl = (CruiseLocal) iterator.next(); - cl.remove(); - } - clc = reservationhome.findAllReservations(); - iterator = clc.iterator(); - while (iterator.hasNext()) { - ReservationLocal rl = (ReservationLocal) iterator.next(); - rl.remove(); - } - clc = cabinhome.findAllCabins(); - iterator = clc.iterator(); - while (iterator.hasNext()) { - CabinLocal cl = (CabinLocal) iterator.next(); - cl.remove(); - } - } catch (Exception ex) { - ok = false; - out.println("

    ERROR: during cleaning exception caught = " + ex + "

    "); - } - - if (ok) { - out.println("

    Servlet is OK.

    "); - } - out.println("Back to Menu"); - out.println(""); - out.println(""); - - } - - private void listCabins(PrintWriter out, CabinHomeLocal chl) throws Exception { - out.println("

    Cabins Table Content:

    "); - out.println("
      "); - Collection clc = chl.findAllCabins(); - if (clc == null) { - out.println("
    • Cabins table is empty
    • "); - } else { - Iterator iterator = clc.iterator(); - while (iterator.hasNext()) { - CabinLocal cl = (CabinLocal) iterator.next(); - String name = cl.getName(); - int deck = cl.getDeckLevel(); - int bd = cl.getBedCount(); - out.println("
    • cabinName = '" + name + "', deckLevel = '" + deck + "', bedCount = '" + bd + "'
    • "); - } - } - out.println("
    "); - } - - private void listCustomers(PrintWriter out, CustomerHomeLocal chl) throws Exception { - out.println("

    Customers Table Content:

    "); - out.println("
      "); - java.util.Collection clc = chl.findAllCustomers(); - if (clc == null) { - out.println("
    • Customers table is empty
    • "); - } else { - java.util.Iterator iterator = clc.iterator(); - while (iterator.hasNext()) { - CustomerLocal cl = (CustomerLocal) iterator.next(); - String name = cl.getName().getLastName(); - String fname = cl.getName().getFirstName(); - String number = " No Card! "; - boolean gc = cl.getHasGoodCredit(); - if (cl.getCreditCard() != null) { - number = cl.getCreditCard().getNumber(); - } - out.print("
    • firstName = '" + fname + "', lastName = '" + name + "'"); - out.println("
        "); - out.print("
      • creditCardNumber = '" + number + "', goodCredit = '" + gc + "'
      • "); - if (cl.getHomeAddress() != null) { - String city = cl.getHomeAddress().getCity(); - String state = cl.getHomeAddress().getState(); - out.print("
      • city> = '" + city + "', state = '" + state + "'
      • "); - } - out.println(""); - out.println("
      "); - } - } - out.println("
    "); - } - - private void listCreditcards(PrintWriter out, CreditCardHomeLocal cchl) throws Exception { - out.println("

    CreditCards Table Content:

    "); - out.println("
      "); - java.util.Collection clc = cchl.findAllCreditCards(); - if (clc == null) { - out.println("
    • CreditCards table is empty
    • "); - } else { - java.util.Iterator iterator = clc.iterator(); - while (iterator.hasNext()) { - CreditCardLocal ccl = (CreditCardLocal) iterator.next(); - String number = ccl.getNumber(); - String name = ccl.getNameOnCard(); - out.println("
    • creditCardNumber = '" + number + "', nameOnCard '= '" + name + "'
    • "); - } - } - out.println("
    "); - } - - private void listAddress(PrintWriter out, AddressHomeLocal cchl) throws Exception { - out.println("

    Addresses Table Content:

    "); - out.println("
      "); - java.util.Collection clc = cchl.findAllAddress(); - if (clc == null) { - out.println("
    • Addresses table is empty
    • "); - } else { - java.util.Iterator iterator = clc.iterator(); - while (iterator.hasNext()) { - AddressLocal al = (AddressLocal) iterator.next(); - String city = al.getCity(); - String street = al.getStreet(); - out.println("
    • adressCity = '" + city + "', street = '" + street + "'
    • "); - } - } - out.println("
    "); - } - - private void listPhones(PrintWriter out, Vector vv) { - out.println("
      "); - for (int jj = 0; jj < vv.size(); jj++) { - String ss = (String) (vv.get(jj)); - out.println("
    • " + ss + "
    • "); - } - out.println("
    "); - } - - private void printShip(PrintWriter out, ShipLocal ship) { - out.print("
  • shipId = '" + ship.getId() + "', name = '" + ship.getName() + "', tonnage = '" - + ship.getTonnage() + "'
  • "); - } - - private void printCustomer(PrintWriter out, CustomerLocal customer, AddressLocal addr) { - out.print("
      "); - out.print("
    • firstName = '" + customer.getName().getFirstName() + "', lastName = '" - + customer.getName().getLastName() + "', goodCredit = '" + customer.getHasGoodCredit() + "'
    • "); - out.print("
    • street = '" + addr.getStreet() + "', city = '" + addr.getCity() + "', state = '" - + addr.getState() + "', zip = '" + addr.getZip() + "'
    • "); - out.print("
    "); - } - - private void printReservation(PrintWriter out, ReservationLocal reservation) { - out.print("
      "); - String cru = "no Cruise!"; - if (reservation.getCruise() != null) { - cru = reservation.getCruise().getName(); - } - out.print("
    • reservationDate: '" + reservation.getDate() + "' on '" + cru + "' amountPaid: '" - + reservation.getAmountPaid() + "'
    • "); - Set cabinset = reservation.getCabins(); - String customerinfo = ""; - CustomerLocal cust = null; - String cabininfo = ""; - Set customerset = reservation.getCustomers(); - Iterator iterator = customerset.iterator(); - while (iterator.hasNext()) { - cust = (CustomerLocal) iterator.next(); - customerinfo += cust.getName().getLastName() + " "; - } - iterator = cabinset.iterator(); - while (iterator.hasNext()) { - CabinLocal cabin = (CabinLocal) iterator.next(); - cabininfo += cabin.getName() + " "; - } - out.print("
        "); - if (!customerinfo.equals("")) { - out.print("
      • customers: " + customerinfo); - } - if (!cabininfo.equals("")) { - out.print("
      • cabins: " + cabininfo + "
      • "); - } - out.print("
      "); - out.print("
    "); - } - -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/earsample/README b/jonas_tests/examples/base/examples/earsample/README deleted file mode 100644 index 022235e6bbf91d29025e8c00e62c40ac9893cf76..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/earsample/README +++ /dev/null @@ -1,94 +0,0 @@ - -Example Overview: ------------------ - -This example shows how to access an EJB deployed in a JOnAS EJB container, from - - a servlet deployed in a Tomcat/Jetty container (thin client) - - a client running inside the client container (heavy client) - -It also shows how to use security in Tomcat or Jetty to authentificate the user and in JOnAS -to authorize the user to access the EJB methods. This aspect is described in details -in the "Use Security in JOnAS with TOMCAT" howto of the JOnAS documentation. - -Besides, this example shows the uniform naming resource access supported in JOnAS. -The servlet gets a javax.transaction.UserTransaction object reference from the JNDI -using the "java:comp/UserTransaction" name. Moreover, it gets a reference on the -bean's home using an environment entry: "java:comp/env/ejb/". - -This sample contains an example of using ejb-link which allows to link the EJB to the -servlet. It is used in the web.xml file for both the ejb-ref and -ejb-local-ref tags. It implies that when the servlet performs a lookup on the bean, -the web classloader has got the visibility of the ejb class. -This is due to the classloader hierarchy between the ear classloader, ejb -classloader and the web classloader. - -Finally, this example shows how to add a resource adapter in an ear. - -The "src" directory contains - - An EJB that mimics $JONAS_ROOT/examples/src/sb with the addition of - security access to the bean methods. - - The servlet source of ServletOp. - - The source of a client which run inside the client container with uniform naming available - - The resource adapter source. - -The "etc" directory contains - - the "xml" directory which contains all the deployment descriptors used for this example : - * application.xml (ear file) - * ejb-jar.xml and jonas-ejb-jar.xml (jar file) - * web.xml, jonas-web.xml (war file) - * ra.xml (rar file) - * application-client.xml, jonas-client1.xml and jonas-client2.xml (two clients jar file) - - the "resources" directory which contains all the resources for this application - * "web" directory contains all resources used by the servlet - - -Compiling this example creates an .ear file that represents an application including : - - a session bean used by the web application - - a web application that will be used by Tomcat or Jetty to run the servlet. - - a resource adapter. - -Prerequisites -------------- -First, you must have installed a web container (ie : Catalina or Jetty) -as the web container service or you will use the heavy client - -You have to set the environment variables - CATALINA_HOME and CATALINA_BASE as indicated in the Tomcat 5.x documentation. -or JETTY_HOME for Jetty 5.x - -Compiling and installing this example: --------------------------------------- - ant install - -Running this example: --------------------- -Commands are given for an Unix system. -(Similar commands can be done on Windows) - -1) Run a jonas server: - jonas start - -2) Load earsample.ear (if you have not added it in the ear service descriptors list) using the jonasAadmin -management application (http://:/jonasAdmin) or the 'jonas admin' command. - -3a) Run your web browser (e.g., netscape): - netscape http://:/earsample - where is the name of your machine (localhost by default) - and the port number (9000 by default) - -3b) You can also lookup the Bean by using one of the client of the ear - - Use the default client (first found) - java -jar $JONAS_ROOT/lib/client.jar $JONAS_BASE/apps/earsample.ear -carolFile $JONAS_BASE/conf/carol.properties - - Use a specific client - java -jar $JONAS_ROOT/lib/client.jar $JONAS_BASE/apps/earsample.ear -jarClient client2.jar -carolFile $JONAS_BASE/conf/carol.properties - - -Notes : - a) that when you use the packages JOnAS-Tomcat and JOnAS-Jetty the earsample.ear is found $JONAS_BASE/apps/autoload directory. - b) the argument -carolFile is useless if you have rebuilt this example because in this - case the carol.properties of your environment is inserted in earsample.ear - -4) Stop the jonas server - jonas stop diff --git a/jonas_tests/examples/base/examples/earsample/build.xml b/jonas_tests/examples/base/examples/earsample/build.xml deleted file mode 100644 index 14a3222c223d6b3c54fbc54014754bc488092f14..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/earsample/build.xml +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/earsample/etc/resources/jaas/jaas.config b/jonas_tests/examples/base/examples/earsample/etc/resources/jaas/jaas.config deleted file mode 100644 index 30ac6faa184071f9cb6aa2ab158260389b0f9edb..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/earsample/etc/resources/jaas/jaas.config +++ /dev/null @@ -1,13 +0,0 @@ -earsample { - // Login Module to use for the example earsample. - - //First, use a LoginModule for the authentication - // Use the resource memrlm_1 - org.ow2.jonas.security.auth.spi.JResourceLoginModule required - resourceName="memrlm_1" - ; - - // Use the login module to propagate security to the JOnAS server - org.ow2.jonas.security.auth.spi.ClientLoginModule required - ; -}; \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/earsample/etc/resources/web/img/jetty.gif b/jonas_tests/examples/base/examples/earsample/etc/resources/web/img/jetty.gif deleted file mode 100644 index 01f44a87f6801b200f142513d0d02b12cea0fb46..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/earsample/etc/resources/web/img/jetty.gif and /dev/null differ diff --git a/jonas_tests/examples/base/examples/earsample/etc/resources/web/img/ow_jonas_logo.gif b/jonas_tests/examples/base/examples/earsample/etc/resources/web/img/ow_jonas_logo.gif deleted file mode 100644 index 1b56943a721f82a8cb81776030567772265433f2..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/earsample/etc/resources/web/img/ow_jonas_logo.gif and /dev/null differ diff --git a/jonas_tests/examples/base/examples/earsample/etc/resources/web/img/ow_logo.png b/jonas_tests/examples/base/examples/earsample/etc/resources/web/img/ow_logo.png deleted file mode 100644 index 60617270bf0c0d21c9f40e4f7c85ef5bfdbda548..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/earsample/etc/resources/web/img/ow_logo.png and /dev/null differ diff --git a/jonas_tests/examples/base/examples/earsample/etc/resources/web/img/tomcat.gif b/jonas_tests/examples/base/examples/earsample/etc/resources/web/img/tomcat.gif deleted file mode 100644 index 61756736b82350f64b5ea1b2bfc31ac57e30a3d3..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/earsample/etc/resources/web/img/tomcat.gif and /dev/null differ diff --git a/jonas_tests/examples/base/examples/earsample/etc/resources/web/img/valid-xhtml11.png b/jonas_tests/examples/base/examples/earsample/etc/resources/web/img/valid-xhtml11.png deleted file mode 100644 index 2c63d93f8868d574b9e69eda2727b7e7bf7fc8ec..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/earsample/etc/resources/web/img/valid-xhtml11.png and /dev/null differ diff --git a/jonas_tests/examples/base/examples/earsample/etc/resources/web/img/vcss.png b/jonas_tests/examples/base/examples/earsample/etc/resources/web/img/vcss.png deleted file mode 100644 index 9b2f596e016533327216d98a0a927738fe17384f..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/earsample/etc/resources/web/img/vcss.png and /dev/null differ diff --git a/jonas_tests/examples/base/examples/earsample/etc/resources/web/index.html b/jonas_tests/examples/base/examples/earsample/etc/resources/web/index.html deleted file mode 100644 index 51fea3aaac4364c60e369361b173f3a9428e6f31..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/earsample/etc/resources/web/index.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - EarSample Example - - - - -
    - Jakarta Tomcat - Mortbay Jetty - JOnAS WebSite -
    - -
    - Earsample : Example of servlet accessing a protected EJB -
    - - - - - - \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/earsample/etc/resources/web/ow_jonas.css b/jonas_tests/examples/base/examples/earsample/etc/resources/web/ow_jonas.css deleted file mode 100644 index 3c5d6ab29f0827060a77172f37688b01704a7fd3..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/earsample/etc/resources/web/ow_jonas.css +++ /dev/null @@ -1,222 +0,0 @@ -/* - Context Root css. based on css from http://jonas.objectweb.org - XHTML by Florent BENOIT -*/ - -.bodywelcome -{ - background-color: #FFFFFF; - color: #000000; - background-image: url(img/ow_logo.png); - background-repeat: no-repeat; - margin: 0; -} - - -img { - margin: 5px; - border:0; -} - -body -{ - background-color: #FFFFFF; - margin: 10px; - color: black; - font-family: Arial,Helvetica, sans-serif; - font-size: 12px; - line-height: 16px; - font-weight: normal; - -} - -div.logos { - top: 5px; - width: 99%; - text-align: right; -} - - -div.links { - font-size: 14px; - margin-top : 40px; - margin-left : 100px; -} - - -div.titlepage { - margin-left: 200px; - color: #E06611; - font-family: Arial, Helvetica, sans-serif; - font-size: 22px; - line-height: 27px; - font-weight: bold; - border-color: #99C; - border-width: 0 0 4px 0; - border-style: none none solid none; -} - - -div.footer { - margin-top : 50px; - color: #FFFFFF; - font-size: 8pt; - text-align: center; -} - - -/*HTML elements */ - - - -ul, ol, dl -{ - color: black; - font-family: Arial,Helvetica, sans-serif; - font-size: 12px; - line-height: 16px; - font-weight: normal; -} - -li -{ - color: black; - font-family: Arial, Helvetica, sans-serif; - font-size: 14px; - font-weight: normal; - margin: 10px 0px 5px 0px; - -} -a -{ - color: #3F3975; - background-color: transparent; - text-decoration: underline; -} - -a:visited -{ - color: #9898CB; - background-color: transparent; - text-decoration: underline; -} - -a:hover -{ - color: #E06611; - background-color: transparent; - text-decoration: underline; -} - - -a:active -{ - color: #FFFFFF; - background-color: #E06611; - text-decoration: underline; -} - - -h1 -{ - color: #E06611; - font-family: Arial, Helvetica, sans-serif; - font-size: 22px; - line-height: 27px; - font-weight: bold; - border-color: #99C; - border-width: 0 0 4px 0; - border-style: none none solid none; - margin: 10px 0px 5px 0px; -} - -h2 -{ - color: #99C; - font-family: Arial, Helvetica, sans-serif; - font-size: 20px; - line-height: 27px; - font-weight: normal; - border-color: #E06611; - border-width: 0 0 4px 0; - border-style: none none solid none; - margin: 10px 0px 5px 0px; - -} - -h3 -{ - color: #E06611; - font-family: Arial, Helvetica, sans-serif; - font-size: 16px; - line-height: 27px; - font-weight: bold; - border-color: #E8EAF0; - border-width: 0 0 2px 0; - border-style: none none solid none; - margin: 10px 0px 5px 0px; - -} -h4 -{ - color: #99C; - font-family: Arial, Helvetica, sans-serif; - font-size: 16px; - line-height: 24px; - font-weight: normal; - border-color: #E8EAF0; - border-width: 0 0 2px 0; - border-style: none none solid none; - margin: 10px 0px 5px 0px; - -} -h5 -{ - color: #E06611; - font-family: Arial, Helvetica, sans-serif; - font-size: 14px; - line-height: 24px; - font-weight: normal; - border-color: #E8EAF0; - border-width: 0 0 2px 0; - border-style: none none solid none; - margin: 10px 0px 5px 0px; - -} -h6 -{ - color: #99C; - font-family: Arial, Helvetica, sans-serif; - font-size: 14px; - line-height: 22px; - font-weight: normal; - border-color: #E8EAF0; - border-width: 0 0 2px 0; - border-style: none none solid none; - margin: 10px 0px 5px 0px; - -} - -td -{ - color: black; - font-family: Arial,Helvetica, sans-serif; - font-size: 12px; - font-weight: normal; -} - -p -{ - color: black; - font-family: Arial,Helvetica, sans-serif; - font-size: 12px; - line-height: 16px; - font-weight: normal; - margin: 10px 10px 5px 0px; -} - -p.error -{ - color: red; -} - diff --git a/jonas_tests/examples/base/examples/earsample/etc/xml/application-client.xml b/jonas_tests/examples/base/examples/earsample/etc/xml/application-client.xml deleted file mode 100644 index 44291ed6283258725e022cc741a62b5a8c6780f3..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/earsample/etc/xml/application-client.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - Client of the earsample - - - envEntryString - java.lang.String - - Test of envEntry of application-client.xml file - - - - - - ejb/Op - Session - org.objectweb.earsample.beans.secusb.OpHome - org.objectweb.earsample.beans.secusb.Op - secusb.jar#EarOp - - - - - ejb/OpLink - Session - org.objectweb.earsample.beans.secusb.OpHome - org.objectweb.earsample.beans.secusb.Op - EarOp - - - - url/jonas - java.net.URL - Container - - - - org.ow2.jonas.security.auth.callback.LoginCallbackHandler - - - diff --git a/jonas_tests/examples/base/examples/earsample/etc/xml/application.xml b/jonas_tests/examples/base/examples/earsample/etc/xml/application.xml deleted file mode 100644 index 7d984a8a16bec8a0aaef0a6c96f4035d56ac1d41..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/earsample/etc/xml/application.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - ear example secusb/servlet - earsample secusb/servlet - - - secusb.jar - - - - - earsample.war - earsample - - - - - client1.jar - - - client2.jar - - - - ra-sample.rar - - - diff --git a/jonas_tests/examples/base/examples/earsample/etc/xml/jonas-client1.xml b/jonas_tests/examples/base/examples/earsample/etc/xml/jonas-client1.xml deleted file mode 100644 index b7b0d3fdd13c014c9c8c4007d5d15a71cc6e97f8..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/earsample/etc/xml/jonas-client1.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - url/jonas - http://jonas.objectweb.org - - - - jaas.config - earsample - jonas - jonas - - - diff --git a/jonas_tests/examples/base/examples/earsample/etc/xml/jonas-client2.xml b/jonas_tests/examples/base/examples/earsample/etc/xml/jonas-client2.xml deleted file mode 100644 index 1cf3ead28217b38d9d294e14fe42339981790f47..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/earsample/etc/xml/jonas-client2.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - url/jonas - http://jonas.objectweb.org - - - - jaas.config - earsample - - - diff --git a/jonas_tests/examples/base/examples/earsample/etc/xml/jonas-secusb.xml b/jonas_tests/examples/base/examples/earsample/etc/xml/jonas-secusb.xml deleted file mode 100644 index ca04b169dbabb1e2aa96fb0c0cab7e7d16639f07..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/earsample/etc/xml/jonas-secusb.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - EarOp - EarOpHome - - diff --git a/jonas_tests/examples/base/examples/earsample/etc/xml/jonas-web.xml b/jonas_tests/examples/base/examples/earsample/etc/xml/jonas-web.xml deleted file mode 100644 index 069066e888db6286da168edf096d60786379f63e..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/earsample/etc/xml/jonas-web.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - url/URL - http://jonas.objectweb.org - - - diff --git a/jonas_tests/examples/base/examples/earsample/etc/xml/ra.xml b/jonas_tests/examples/base/examples/earsample/etc/xml/ra.xml deleted file mode 100755 index 73edde1b462012273682391d0c085db6c9d60bc5..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/earsample/etc/xml/ra.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - rar sample - rar sample - ObjectWeb - - 1.0 - - false - - - - - org.objectweb.earsample.resourceadapters.ResourceAdapterImpl - - - - JNDI name - jndiName - - java.lang.String - - - eisName - - - - URL for EIS instance - EisURL - - java.lang.String - - - EIS_URL - - - - \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/earsample/etc/xml/secusb.xml b/jonas_tests/examples/base/examples/earsample/etc/xml/secusb.xml deleted file mode 100644 index 531d055c2d0855cc4b401414651493bb6859d2f4..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/earsample/etc/xml/secusb.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - secured session bean JOnAS example - - secusb (earsample) - - - - EarOp - org.objectweb.earsample.beans.secusb.OpHome - org.objectweb.earsample.beans.secusb.Op - org.objectweb.earsample.beans.secusb.OpLocalHome - org.objectweb.earsample.beans.secusb.OpLocal - org.objectweb.earsample.beans.secusb.OpBean - Stateful - Container - - - - - - tomcat - - - jetty - - - - tomcat - - EarOp - * - - - - - jetty - - EarOp - * - - - - - - EarOp - * - - Supports - - - - - diff --git a/jonas_tests/examples/base/examples/earsample/etc/xml/web.xml b/jonas_tests/examples/base/examples/earsample/etc/xml/web.xml deleted file mode 100644 index 3366a4d289c9e8f12653ed4f4553af38c2f9a59c..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/earsample/etc/xml/web.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - Op - - org.objectweb.earsample.servlets.ServletOp - - - - - Op - /secured/Op - - - - url/URL - java.net.URL - Application - - - - - Protected Area - - /secured/* - - DELETE - GET - POST - PUT - - - - tomcat - jetty - - - - - - BASIC - JOnAS Realm - - - - - tomcat - - - - jetty - - - - - envEntryString - java.lang.String - - This is a string from the env-entry - - - - - ejb/Op - Session - org.objectweb.earsample.beans.secusb.OpHome - org.objectweb.earsample.beans.secusb.Op - EarOp - - - - ejb/OpLocal - Session - - org.objectweb.earsample.beans.secusb.OpLocalHome - - org.objectweb.earsample.beans.secusb.OpLocal - secusb.jar#EarOp - - - diff --git a/jonas_tests/examples/base/examples/earsample/src/org/objectweb/earsample/beans/secusb/Op.java b/jonas_tests/examples/base/examples/earsample/src/org/objectweb/earsample/beans/secusb/Op.java deleted file mode 100644 index f4c31355da190939db1e8ed0d68a4bcde03aebc2..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/earsample/src/org/objectweb/earsample/beans/secusb/Op.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.earsample.beans.secusb; - -import javax.ejb.EJBObject; -import java.rmi.RemoteException; - -/** - * Remote interface for the bean Op - * @author JOnAS team - */ -public interface Op extends EJBObject { - - /** - * Business method implementation. - * @param shares nb of shares to be bought - * @throws RemoteException if RMI failed. - */ - void buy (int shares) throws RemoteException; - - /** - * Business method implementation. - * @return the nb of shares bought - * @throws RemoteException if RMI failed. - */ - int read () throws RemoteException; - -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/earsample/src/org/objectweb/earsample/beans/secusb/OpBean.java b/jonas_tests/examples/base/examples/earsample/src/org/objectweb/earsample/beans/secusb/OpBean.java deleted file mode 100644 index 65afb2722cda36514c984ac4afc906ad7343e3a3..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/earsample/src/org/objectweb/earsample/beans/secusb/OpBean.java +++ /dev/null @@ -1,247 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.earsample.beans.secusb; - -import javax.ejb.EJBException; -import javax.ejb.SessionBean; -import javax.ejb.SessionContext; -import javax.ejb.SessionSynchronization; - -/** - * This is an example of Session Bean, statefull, and synchronized. - * @author JOnAS team - */ -public class OpBean implements SessionBean, SessionSynchronization { - - /** - * Actual state of the bean - */ - private int total = 0; - - /** - * value inside Tx, not yet committed. - */ - private int newtotal = 0; - - /** - * User client - */ - private String clientUser = null; - - /** - * Session context that the container provides for a session enterprise Bean - * instance. - */ - private SessionContext sessionContext = null; - - /* ========================= ejbCreate methods ============================ */ - - /** - * There must be one ejbCreate() method per create() method on the Home - * interface, and with the same signature. - * @param user the user name - */ - public void ejbCreate(String user) { - total = 0; - // in case we are outside transactions - newtotal = total; - clientUser = user; - } - - /* =============== javax.ejb.SessionBean 2.0 implementation ============== */ - - /** - * The activate method is called when the instance is activated from its - * "passive" state. The instance should acquire any resource that it has - * released earlier in the ejbPassivate() method. This method is called with - * no transaction context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException This exception is defined in the method - * signature to provide backward compatibility for enterprise beans - * written for the EJB 1.0 specification. Enterprise beans written - * for the EJB 1.1 specification should throw the - * javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB2.0 and higher specifications must throw - * the javax.ejb.EJBException instead of this exception. - */ - public void ejbActivate() throws EJBException, java.rmi.RemoteException { - // Nothing to do for this simple example - } - - /** - * The passivate method is called before the instance enters the "passive" - * state. The instance should release any resources that it can re-acquire - * later in the ejbActivate() method. After the passivate method completes, - * the instance must be in a state that allows the container to use the Java - * Serialization protocol to externalize and store away the instance's - * state. This method is called with no transaction context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException This exception is defined in the method - * signature to provide backward compatibility for enterprise beans - * written for the EJB 1.0 specification. Enterprise beans written - * for the EJB 1.1 specification should throw the - * javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB2.0 and higher specifications must throw - * the javax.ejb.EJBException instead of this exception. - */ - public void ejbPassivate() throws EJBException, java.rmi.RemoteException { - // Nothing to do for this simple example - } - - /** - * A container invokes this method before it ends the life of the session - * object. This happens as a result of a client's invoking a remove - * operation, or when a container decides to terminate the session object - * after a timeout. This method is called with no transaction context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException This exception is defined in the method - * signature to provide backward compatibility for enterprise beans - * written for the EJB 1.0 specification. Enterprise beans written - * for the EJB 1.1 specification should throw the - * javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB2.0 and higher specifications must throw - * the javax.ejb.EJBException instead of this exception. - */ - public void ejbRemove() throws EJBException, java.rmi.RemoteException { - // Nothing to do for this simple example - } - - /** - * Set the associated session context. The container calls this method after - * the instance creation. The enterprise Bean instance should store the - * reference to the context object in an instance variable. This method is - * called with no transaction context. - * @param sessionContext A SessionContext interface for the instance. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException This exception is defined in the method - * signature to provide backward compatibility for applications - * written for the EJB 1.0 specification. Enterprise beans written - * for the EJB 1.1 specification should throw the - * javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB2.0 and higher specifications must throw - * the javax.ejb.EJBException instead of this exception. - */ - public void setSessionContext(SessionContext sessionContext) throws EJBException, java.rmi.RemoteException { - this.sessionContext = sessionContext; - } - - /* - * ============== javax.ejb.SessionSynchronization implementation - * ============= - */ - - /** - * The afterBegin method notifies a session Bean instance that a new - * transaction has started, and that the subsequent business methods on the - * instance will be invoked in the context of the transaction. The instance - * can use this method, for example, to read data from a database and cache - * the data in the instance fields. This method executes in the proper - * transaction context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException - This exception is defined in the - * method signature to provide backward compatibility for enterprise - * beans written for the EJB 1.0 specification. Enterprise beans - * written for the EJB 1.1 and higher specifications should throw - * the javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB 2.0 and higher specifications must not - * throw the java.rmi.RemoteException. - */ - public void afterBegin() throws EJBException, java.rmi.RemoteException { - newtotal = total; - } - - /** - * The beforeCompletion method notifies a session Bean instance that a - * transaction is about to be committed. The instance can use this method, - * for example, to write any cached data to a database. This method executes - * in the proper transaction context. Note: The instance may still - * cause the container to rollback the transaction by invoking the - * setRollbackOnly() method on the instance context, or by throwing an - * exception. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException - This exception is defined in the - * method signature to provide backward compatibility for enterprise - * beans written for the EJB 1.0 specification. Enterprise beans - * written for the EJB 1.1 and higher specifications should throw - * the javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB 2.0 and higher specifications must not - * throw the java.rmi.RemoteException. - */ - public void beforeCompletion() throws EJBException, java.rmi.RemoteException { - } - - /** - * The afterCompletion method notifies a session Bean instance that a - * transaction commit protocol has completed, and tells the instance whether - * the transaction has been committed or rolled back. This method executes - * with no transaction context. - * @param committed - True if the transaction has been committed, false if - * is has been rolled back. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException - This exception is defined in the - * method signature to provide backward compatibility for enterprise - * beans written for the EJB 1.0 specification. Enterprise beans - * written for the EJB 1.1 and higher specifications should throw - * the javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB 2.0 and higher specifications must not - * throw the java.rmi.RemoteException. - */ - public void afterCompletion(boolean committed) throws EJBException, java.rmi.RemoteException { - - if (committed) { - total = newtotal; - } else { - newtotal = total; - } - } - - /* ========================= Op implementation ============================ */ - - /** - * Business method implementation. - * @param s nb of shares to be bought - */ - public void buy(int s) { - newtotal = newtotal + s; - return; - } - - /** - * Business method implementation. - * @return the nb of shares bought - */ - public int read() { - return newtotal; - } -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/earsample/src/org/objectweb/earsample/beans/secusb/OpHome.java b/jonas_tests/examples/base/examples/earsample/src/org/objectweb/earsample/beans/secusb/OpHome.java deleted file mode 100644 index c27269138dc8324e83f469aa2c43f14e96c48a67..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/earsample/src/org/objectweb/earsample/beans/secusb/OpHome.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.earsample.beans.secusb; - -import java.rmi.RemoteException; -import javax.ejb.CreateException; -import javax.ejb.EJBHome; - -/** - * Home interface for the bean Op - * @author JOnAS team - */ -public interface OpHome extends EJBHome { - - /** - * Create an instance of the Op bean. - * @param user the user name. - * @return the Remote interface of the bean Op. - * @throws CreateException if the creation failed. - * @throws RemoteException if the RMI call failed. - */ - Op create(String user) throws CreateException, RemoteException; -} diff --git a/jonas_tests/examples/base/examples/earsample/src/org/objectweb/earsample/beans/secusb/OpLocal.java b/jonas_tests/examples/base/examples/earsample/src/org/objectweb/earsample/beans/secusb/OpLocal.java deleted file mode 100644 index f65b4b5543bae448569205b9d69987da2ffbec01..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/earsample/src/org/objectweb/earsample/beans/secusb/OpLocal.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.earsample.beans.secusb; - -import javax.ejb.EJBLocalObject; - -/** - * Local interface for the bean Op - * @author JOnAS team - */ -public interface OpLocal extends EJBLocalObject { - - /** - * Business method implementation. - * @param shares nb of shares to be bought - */ - void buy(int shares); - - /** - * Business method implementation. - * @return the nb of shares bought - */ - int read(); -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/earsample/src/org/objectweb/earsample/beans/secusb/OpLocalHome.java b/jonas_tests/examples/base/examples/earsample/src/org/objectweb/earsample/beans/secusb/OpLocalHome.java deleted file mode 100644 index 730e9966246da30e8a5241a6098d55fef3521cf9..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/earsample/src/org/objectweb/earsample/beans/secusb/OpLocalHome.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.earsample.beans.secusb; - -import javax.ejb.CreateException; -import javax.ejb.EJBLocalHome; - -/** - * Local home interface for the bean Op - * @author JOnAS team - */ -public interface OpLocalHome extends EJBLocalHome { - - /** - * Create an instance of the Op bean. - * @param user the user name. - * @return the Remote interface of the bean Op. - * @throws CreateException if the creation failed. - */ - OpLocal create(String user) throws CreateException; -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/earsample/src/org/objectweb/earsample/clients/Client.java b/jonas_tests/examples/base/examples/earsample/src/org/objectweb/earsample/clients/Client.java deleted file mode 100644 index 87aa7e493a303d3ff2cfd9686f2db3982feb75ff..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/earsample/src/org/objectweb/earsample/clients/Client.java +++ /dev/null @@ -1,189 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent Benoit - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.earsample.clients; - -import java.net.URL; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.transaction.UserTransaction; -import javax.rmi.PortableRemoteObject; - -import org.objectweb.earsample.beans.secusb.Op; -import org.objectweb.earsample.beans.secusb.OpHome; - -/** - * Heavy client doing some operations on a bean - * @author jonas team - */ -public class Client { - - /** - * First amount to buy - */ - private static final int FIRST_BUY_AMOUNT = 10; - - /** - * Second amount to buy - */ - private static final int SECOND_BUY_AMOUNT = 20; - - /** - * Third amount to buy (will be rollback) - */ - private static final int THIRD_BUY_AMOUNT = 50; - - /** - * Constructor. Hide constructor as it is an utility class - */ - private Client() { - - } - - /** - * Main method - * @param args arguments of the client - */ - public static void main(String[] args) { - - Context initialContext = null; - System.out.print("Building a new InitialContext..."); - try { - initialContext = new InitialContext(); - } catch (Exception e) { - System.err.println("Cannot get initial context for JNDI: " + e); - System.exit(2); - } - System.out.println("done !"); - - System.out.print("Looking up java:comp/UserTransaction ..."); - // We want to start transactions from client: get UserTransaction - UserTransaction utx = null; - try { - utx = (UserTransaction) initialContext.lookup("java:comp/UserTransaction"); - } catch (Exception e) { - System.err.println("Cannot lookup UserTransaction: " + e); - System.exit(2); - } - System.out.println("done !"); - - String envEntry = null; - System.out.print("Looking up java:comp/env/envEntryString ..."); - try { - envEntry = (String) initialContext.lookup("java:comp/env/envEntryString"); - } catch (Exception e) { - System.err.println("Cannot get env-entry on JNDI " + e); - System.exit(2); - } - System.out.println("done !"); - System.out.println("Env entry is : " + envEntry); - - URL url = null; - System.out.print("Looking up java:comp/env/url/jonas ..."); - try { - url = (URL) initialContext.lookup("java:comp/env/url/jonas"); - } catch (Exception e) { - System.err.println("Cannot get URL on JNDI " + e); - System.exit(2); - } - System.out.println("done !"); - System.out.println("Web site of jonas is at :" + url); - - System.out.print("Looking up java:comp/env/ejb/Op ..."); - // Connecting to OpHome thru JNDI - OpHome home = null; - try { - home = (OpHome) PortableRemoteObject.narrow(initialContext.lookup("java:comp/env/ejb/Op"), OpHome.class); - System.out.println("done !"); - } catch (Exception e) { - e.printStackTrace(); - System.err.println("Cannot lookup OpHome: " + e); - System.exit(2); - } - - // OpBean creation - Op t1 = null; - try { - System.out.println("Create a bean"); - t1 = home.create("User1"); - } catch (Exception e) { - System.err.println("Cannot create OpBean: " + e); - System.exit(2); - } - - // First transaction (committed) - try { - System.out.println("Start a first transaction"); - utx.begin(); - System.out.println("First request on the new bean"); - t1.buy(FIRST_BUY_AMOUNT); - System.out.println("Second request on the bean"); - t1.buy(SECOND_BUY_AMOUNT); - System.out.println("Commit the transaction"); - utx.commit(); - } catch (Exception e) { - System.err.println("exception during 1st Tx: " + e); - System.exit(2); - } - // Start another transaction (rolled back) - try { - System.out.println("Start a second transaction"); - utx.begin(); - t1.buy(THIRD_BUY_AMOUNT); - System.out.println("Rollback the transaction"); - utx.rollback(); - } catch (Exception e) { - System.err.println("exception during 2nd Tx: " + e); - System.exit(2); - } - - // Get the total bought, outside the transaction - int val = 0; - try { - System.out.println("Request outside any transaction"); - val = t1.read(); - } catch (Exception e) { - System.err.println("Cannot read value on t1 : " + e); - System.exit(2); - } - if (val != FIRST_BUY_AMOUNT + SECOND_BUY_AMOUNT) { - System.err.println("Bad value read: " + val); - System.exit(2); - } - - // Remove Session bean - try { - t1.remove(); - } catch (Exception e) { - System.out.println("Exception on buy: " + e); - System.exit(2); - } - System.out.println("ClientOp OK. Exiting."); - } -} - diff --git a/jonas_tests/examples/base/examples/earsample/src/org/objectweb/earsample/resourceadapters/ResourceAdapterImpl.java b/jonas_tests/examples/base/examples/earsample/src/org/objectweb/earsample/resourceadapters/ResourceAdapterImpl.java deleted file mode 100755 index 001553566814a33cfcc0e3cf1da5d2c26b87ac75..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/earsample/src/org/objectweb/earsample/resourceadapters/ResourceAdapterImpl.java +++ /dev/null @@ -1,191 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.earsample.resourceadapters; - - -import java.net.MalformedURLException; -import java.util.HashMap; - -import javax.naming.InitialContext; -import javax.naming.NamingException; -import javax.resource.NotSupportedException; -import javax.resource.ResourceException; -import javax.resource.spi.ActivationSpec; -import javax.resource.spi.BootstrapContext; -import javax.resource.spi.ResourceAdapterInternalException; -import javax.resource.spi.endpoint.MessageEndpointFactory; -import javax.transaction.xa.XAResource; - -/** - * A Resource adapter - * @author kemlerp - * - */ -public class ResourceAdapterImpl implements javax.resource.spi.ResourceAdapter, java.io.Serializable { - - - /** - * serialVersionUID - */ - private static final long serialVersionUID = 3834312812943456568L; - - /** - * String should be the RA name when set, ie, EIS - */ - private String eisurl; - - /** - * The JNDI name - */ - private String jndiName; - - /** - * Initial context - */ - private InitialContext ictx; - - /** - * BootstrapContext - */ - private BootstrapContext bootstrapCtx = null; // set in start() - - /** - * EndpointFactories - */ - private transient HashMap endpointFactories = new HashMap(); - - - /** - * Start - * @param bootstrapCtx bootstrapCtx - * @throws ResourceAdapterInternalException if an error occurs - */ - public void start(BootstrapContext bootstrapCtx) throws ResourceAdapterInternalException { - this.bootstrapCtx = bootstrapCtx; - - try { - ictx = new InitialContext(); - ictx.bind(jndiName, eisurl); - } catch (NamingException e) { - e.printStackTrace(); - } - - } - - /** - * Stop - */ - public void stop() { - try { - ictx.unbind(jndiName); - } catch (NamingException e) { - e.printStackTrace(); - } - } - - - /** - * Called by the application server when a message-driven bean - * (MessageEndpoint) is deployed. - * @param factory MessageEndpointFactory - * @param spec activation spec - * @throws NotSupportedException if an error occurs - * @throws ResourceAdapterInternalException if an error occurs - */ - public void endpointActivation(MessageEndpointFactory factory, ActivationSpec spec) throws NotSupportedException, - ResourceAdapterInternalException { - endpointFactories.put(spec, factory); - } - - /** - * Endpoint Deactivation - * @param factory MessageEndpointFactory - * @param spec activation spec - */ - public void endpointDeactivation(MessageEndpointFactory factory, ActivationSpec spec) { - endpointFactories.remove(spec); - } - - /** - * Get XAResources - * @param specs A tab of specs - * @throws ResourceException if an error occurs - * @return Tab of XAResources - */ - public XAResource[] getXAResources(ActivationSpec[] specs) throws ResourceException { - return null; - } - - /** - * Get Eis URL - * @return Eis URL - */ - public String getEisURL() { - return eisurl.toString(); - } - - /** - * Set Eis URL - * @param eisURL Eis URL - * @throws MalformedURLException if 'eisURL' is not a URL - */ - public void setEisURL(String eisURL) throws MalformedURLException { - // ra.xml deployment supplies value - this.eisurl = eisURL; - } - - /** - * Get BootstrapContext - * @return bootstrapCtx - */ - public BootstrapContext getBootstrapCtx() { - return bootstrapCtx; - } - - /** - * Set BootstrapContext - * @param bootstrapCtx bootstrapContext - */ - public void setBootstrapCtx(BootstrapContext bootstrapCtx) { - this.bootstrapCtx = bootstrapCtx; - } - - /** - * Get used JNDI name - * @return A string - */ - public String getJndiName() { - return jndiName; - } - - /** - * Set JNDI name - * @param jndiName a string - */ - public void setJndiName(String jndiName) { - this.jndiName = jndiName; - } -} diff --git a/jonas_tests/examples/base/examples/earsample/src/org/objectweb/earsample/servlets/ServletOp.java b/jonas_tests/examples/base/examples/earsample/src/org/objectweb/earsample/servlets/ServletOp.java deleted file mode 100644 index c72f0c9d2b347daad6e334041e59774379c363e8..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/earsample/src/org/objectweb/earsample/servlets/ServletOp.java +++ /dev/null @@ -1,304 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.earsample.servlets; - -import java.io.IOException; -import java.io.PrintWriter; -import java.net.URL; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.rmi.PortableRemoteObject; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.transaction.UserTransaction; - -import org.objectweb.earsample.beans.secusb.Op; -import org.objectweb.earsample.beans.secusb.OpHome; -import org.objectweb.earsample.beans.secusb.OpLocal; -import org.objectweb.earsample.beans.secusb.OpLocalHome; - -/** - * This servlet is an example to show how to access a EJB from a servlet - * @author JOnAS team - */ -public class ServletOp extends HttpServlet { - - /** - * First amount to buy - */ - private static final int FIRST_BUY_AMOUNT = 10; - - /** - * Second amount to buy - */ - private static final int SECOND_BUY_AMOUNT = 20; - - /** - * Third amount to buy (will be rollback) - */ - private static final int THIRD_BUY_AMOUNT = 50; - - - /** - * Called by the server (via the service method) to allow a servlet to - * handle a GET request. - * @param request an HttpServletRequest object that contains the request - * the client has made of the servlet - * @param response an HttpServletResponse object that contains the - * response the servlet sends to the client - * @throws IOException if an input or output error is detected when the - * servlet handles the GET request - * @throws ServletException if the request for the GET could not be handled - */ - public void doGet(HttpServletRequest request, HttpServletResponse response) - throws IOException, ServletException { - - response.setContentType("text/html"); - PrintWriter out = response.getWriter(); - out.println(""); - out.println(""); - out.println(""); - out.println(""); - out.println("Ear Sample of Servlet accessing a protected EJB"); - out.println(""); - out.println(""); - out.println("

    Ear sample of Servlet accessing a protected EJB"); - out.println("

    \"Tomcat"); - out.println("\"Jetty"); - out.println("\"JOnAS"); - out.println("

    Initial context / UserTransaction

    "); - out.println("
      "); - Context initialContext = null; - try { - initialContext = new InitialContext(); - out.println("
    • Initial context OK
    • "); - } catch (Exception e) { - out.print("
    • Cannot get initial context for JNDI: "); - out.println(e + "
    • "); - return; - } - - // We want to start transactions from client: get UserTransaction - UserTransaction utx = null; - try { - utx = (UserTransaction) initialContext.lookup("java:comp/UserTransaction"); - out.println("
    • Get java:comp/UserTransaction OK
    • "); - } catch (Exception e) { - out.println("
    • Cannot lookup java:comp/UserTransaction: " + e + "
    • "); - return; - } - out.println("

    "); - - out.println("

    "); - out.println("Lookup on env-entry with java:comp/env/envEntryString"); - out.println("

    "); - out.println("
      "); - String envEntry = null; - try { - envEntry = (String) initialContext.lookup("java:comp/env/envEntryString"); - out.println("
    • Env entry is : " + envEntry + "
    • "); - } catch (Exception e) { - out.println("
    • Cannot get env-entry on JNDI " + e + "
    • "); - return; - } - out.println("

    "); - - - out.println("
    "); - - out.println("

    "); - out.println("Lookup on URL with java:comp/env/url/URL"); - out.println("

    "); - out.println("
      "); - URL jonasURL = null; - try { - jonasURL = (URL) initialContext.lookup("java:comp/env/url/URL"); - out.println("
    • URL is : " + jonasURL.toString() + "
    • "); - } catch (Exception e) { - out.println("
    • Cannot get url on JNDI " + e + "
    • "); - return; - } - out.println("

    "); - - out.println("

    Actions realized by the servlet and the EJB

    "); - out.println("

    With local interface

    "); - out.println("
      "); - // Connecting to OpLocalHome thru JNDI - OpLocalHome opLocalHome = null; - try { - opLocalHome = (OpLocalHome) - initialContext.lookup("java:comp/env/ejb/OpLocal"); - } catch (Exception e) { - out.println("
    • Cannot lookup java:comp/env/ejb/OpLocal: " + e + "
    • "); - return; - } - // OpBean creation - OpLocal opLocal = null; - try { - opLocal = opLocalHome.create("User1"); - out.println("
    • Create a bean
    • "); - } catch (Exception e) { - out.println("
    • Cannot create OpBean: " + e + "
    • "); - return; - } - // First transaction (committed) - try { - out.println("
    • Start a first transaction
    • "); - utx.begin(); - opLocal.buy(FIRST_BUY_AMOUNT); - out.println("
    • First request on the new bean
    • "); - opLocal.buy(SECOND_BUY_AMOUNT); - out.println("
    • Second request on the bean
    • "); - utx.commit(); - out.println("
    • Commit the transaction
    • "); - } catch (Exception e) { - out.println("
    • exception during 1st Tx: " + e + "
    • "); - return; - } - // Start another transaction (rolled back) - try { - out.println("
    • Start a second transaction
    • "); - utx.begin(); - opLocal.buy(THIRD_BUY_AMOUNT); - utx.rollback(); - out.println("
    • Rollback the transaction
    • "); - } catch (Exception e) { - out.println("
    • exception during 2nd Tx: " + e + "
    • "); - return; - } - // Get the total bought, outside the transaction - int val = 0; - try { - val = opLocal.read(); - out.println("
    • Request outside any transaction
    • "); - } catch (Exception e) { - out.println("
    • Cannot read value on t1 : " + e + "
    • "); - return; - } - if (val != FIRST_BUY_AMOUNT + SECOND_BUY_AMOUNT) { - out.println("
    • Bad value read: " + val + "
    • "); - return; - } - // Remove Session bean - try { - opLocal.remove(); - } catch (Exception e) { - out.println("
    • Exception on buy: " + e + "
    • "); - return; - } - out.println("

    "); - - out.println("

    With remote interface

    "); - out.println("
      "); - // Connecting to OpHome thru JNDI - OpHome opHome = null; - try { - opHome = (OpHome) PortableRemoteObject.narrow(initialContext.lookup("java:comp/env/ejb/Op"), OpHome.class); - } catch (Exception e) { - out.println("
    • Cannot lookup java:comp/env/ejb/Op: " + e + "
    • "); - return; - } - // OpBean creation - Op op = null; - try { - op = opHome.create("User1"); - out.println("
    • Create a bean
    • "); - } catch (Exception e) { - out.println("
    • Cannot create OpBean: " + e + "
    • "); - return; - } - // First transaction (committed) - try { - out.println("
    • Start a first transaction
    • "); - utx.begin(); - op.buy(FIRST_BUY_AMOUNT); - out.println("
    • First request on the new bean
    • "); - op.buy(SECOND_BUY_AMOUNT); - out.println("
    • Second request on the bean
    • "); - utx.commit(); - out.println("
    • Commit the transaction
    • "); - } catch (Exception e) { - out.println("
    • exception during 1st Tx: " + e + "
    • "); - return; - } - // Start another transaction (rolled back) - try { - out.println("
    • Start a second transaction
    • "); - utx.begin(); - op.buy(THIRD_BUY_AMOUNT); - utx.rollback(); - out.println("
    • Rollback the transaction
    • "); - } catch (Exception e) { - out.println("
    • exception during 2nd Tx: " + e + "
    • "); - return; - } - // Get the total bought, outside the transaction - val = 0; - try { - val = op.read(); - out.println("
    • Request outside any transaction
    • "); - } catch (Exception e) { - out.println("
    • Cannot read value on t1 : " + e + "
    • "); - return; - } - if (val != FIRST_BUY_AMOUNT + SECOND_BUY_AMOUNT) { - out.println("
    • Bad value read: " + val + "
    • "); - return; - } - // Remove Session bean - try { - op.remove(); - } catch (Exception e) { - out.println("
    • Exception on buy: " + e + "
    • "); - return; - } - out.println("

    "); - - - - out.println("

    "); - out.println("Resource Adapter Properties"); - out.println("

    "); - out.println("
      "); - String eisName = null; - try { - eisName = (String) initialContext.lookup("eisName"); - out.println("
    • EIS Name is : " + eisName + "
    • "); - } catch (Exception e) { - out.println("
    • Cannot get eis name on JNDI " + e + "
    • "); - return; - } - out.println("

    "); - - - out.println("Sample is OK.
    "); - out.println(""); - out.println(""); - } -} diff --git a/jonas_tests/examples/base/examples/emb-sample/.cvsignore b/jonas_tests/examples/base/examples/emb-sample/.cvsignore deleted file mode 100644 index 378eac25d311703f3f2cd456d8036da525cd0366..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -build diff --git a/jonas_tests/examples/base/examples/emb-sample/README b/jonas_tests/examples/base/examples/emb-sample/README deleted file mode 100644 index e4a673003b5d18261c6625a9c530871f673a5ade..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/README +++ /dev/null @@ -1,70 +0,0 @@ -$Id: README,v 1.3 2005/07/08 14:02:52 pasmith Exp $ - -============================================================================== -ENTERPRISE MEDIA BEANS SAMPE README -============================================================================== - -As a pre-requisite, please deploy the emb-sample application. - -To visit the emb-sample Application visit: - - http://localhost:9000/emb-sample - -First you have to had some media to the database : - - to add default samples select Load - - to add your own samples by uploading it - -All your sample will be remove after session timeout - - -====================================== -DIRECTORY STRUCTURE: -====================================== - -emb-core/ customizes preset core application of EMB -etc/ all deployment descriptor -lib/ upload lib -resources/ JSPs, samples, images, html files. -src/ java files - - -====================================== -KNOWN ISSUES: -====================================== - -Here are some known issues about the emb-sample demo: - -1) By default the application is set to work only on localhost - -2) Cookies have to be accepted in order to use this sample - -3) If the user's session times out or if the user removes their - cookies, all generated media will be removed - -4) This sample needs some memory under quite heavy load, I advice you to start - JOnAS more memory than default (64MB). (if you got OutOfMemoryError) - To do this set JAVA_OPTS environment variable to -Xmx128m, in order to - set the maximum memory of the JVM to 128MB. - - -====================================== -HOW TO CUSTOMIZE EMB-SAMPLE SETTING: -====================================== - -Customize application : - emb sample have some few setting in order to limit the load of the server - in case of an on line demo. - - - in etc/web.xml : set the session timeout (in minutes - - in etc/embSampleSession.xml : - - set the env entry ejb/embSample/isCopyAllowed in order to copy or - to modify the media when using some conversion (limit numbers of ejb - entity). - - set the env entry ejb/embSample/maxMediaPerSession to set the - maximum of media that can be created (upload, convert if copy is - allowed) - - Some features are only avaiable by using some plugins such has streaming - capabilities, video conversion or more image format support. - For using this sample through a network (not localhost) see the - Enterprise Media Beans documentation. diff --git a/jonas_tests/examples/base/examples/emb-sample/build.xml b/jonas_tests/examples/base/examples/emb-sample/build.xml deleted file mode 100644 index 636d26ea7527f2e42cc1695e84eb34518592aa07..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/build.xml +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/emb-sample/emb-core/README b/jonas_tests/examples/base/examples/emb-sample/emb-core/README deleted file mode 100644 index e057cf6e18ba6777e0b7f187969a8a11254a9054..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/emb-core/README +++ /dev/null @@ -1,9 +0,0 @@ -$Id: README,v 1.3 2005/07/08 14:02:52 pasmith Exp $ - -============================================================================== - EMB CORE -============================================================================== - -In this directory put your customized emb-core.ear -(orginal is in $JONAS_ROOT/lib/commons/jonas/emb/emb-core) - diff --git a/jonas_tests/examples/base/examples/emb-sample/etc/application.xml b/jonas_tests/examples/base/examples/emb-sample/etc/application.xml deleted file mode 100644 index 5d6f36240c24dac150a999e1bb02df49bb846864..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/etc/application.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - JOnAS EMB sample - JOnAS EMB sample - - - - - emb-core-ejb.jar - - - - - emb-plugin-publisher-servlet-jonas.rar - - - - emb-plugin-publisher-servlet-jonas.war - - emb-plugin-publisher-servlet-jonas - - - - - - - - - emb-sample-ejb.jar - - - - - - emb-sample.war - emb-sample - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/emb-sample/etc/embSampleSession.xml b/jonas_tests/examples/base/examples/emb-sample/etc/embSampleSession.xml deleted file mode 100644 index ae2c91129c7b35d588c9357d985473e702ba032e..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/etc/embSampleSession.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - EMB Sample Session Bean - - - MediaSampleSession - - emb.sample.session.MediaSampleSessionLocalHome - - emb.sample.session.MediaSampleSessionLocal - - emb.sample.session.MediaSampleSessionBean - - Stateful - Container - - This permit to copy media content instead of mdified it. It create more mediaEntityBean - - ejb/embSample/isCopyAllowed - - java.lang.Boolean - true - - - Maximum media per session, to avoid server over load. The demo has at least 10 media by default. 0 is no limit - - ejb/embSample/maxMediaPerSession - - java.lang.Integer - 0 - - - ejb/emb/MediaEntity - Entity - javax.emb.MediaEntityLocalHome - javax.emb.MediaEntityLocal - emb-core-ejb.jar#MediaEntity - - - - - - - MediaSampleSession - * - - Supports - - - - diff --git a/jonas_tests/examples/base/examples/emb-sample/etc/jonas-embSampleSession.xml b/jonas_tests/examples/base/examples/emb-sample/etc/jonas-embSampleSession.xml deleted file mode 100644 index 23c3e122cce53ebaaecc15e6528ac7f54b4c74d3..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/etc/jonas-embSampleSession.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/jonas_tests/examples/base/examples/emb-sample/etc/web.xml b/jonas_tests/examples/base/examples/emb-sample/etc/web.xml deleted file mode 100644 index ee709397325322a762bea1decfb198fcfe661c32..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/etc/web.xml +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - - 10 - - - - - ActionDispatcher - - emb.sample.servlet.ActionDispatcher - - - - LoadSampleMedia - - emb.sample.servlet.LoadSampleMedia - - - - UploadSampleMedia - - emb.sample.servlet.UploadSampleMedia - - - - HomeSample - emb.sample.servlet.HomeSample - - - ListSampleMedia - - emb.sample.servlet.ListSampleMedia - - - - ExtractHeaderData - - emb.sample.servlet.ExtractHeaderData - - - - RetrieveSampleMedia - - emb.sample.servlet.RetrieveSampleMedia - - - - ConvertSampleImageBW - - emb.sample.servlet.ConvertSampleImageBW - - - - ConvertSampleImageHalfSize - - emb.sample.servlet.ConvertSampleImageHalfSize - - - - JAIConvertSampleImageBW - - emb.sample.servlet.ConvertSampleImageBW - - - - JAIConvertSampleImageHalfSize - - emb.sample.servlet.ConvertSampleImageHalfSize - - - - ConvertSampleImageFormat - - emb.sample.servlet.ConvertSampleImageFormat - - - - ConvertSampleImageChained - - emb.sample.servlet.ConvertSampleImageChained - - - - ConvertSampleImageSvgToPng - - emb.sample.servlet.ConvertSampleImageSvgToPng - - - - ConvertSampleVideoTo3GPP - - emb.sample.servlet.ConvertSampleVideoTo3GPP - - - - - ConvertSampleVideoToMpegTs - - emb.sample.servlet.ConvertSampleVideoToMpegTs - - - - ConvertSampleVideoToMpeg - - emb.sample.servlet.ConvertSampleVideoToMpeg - - - - ConvertSampleImageOverlayed - - emb.sample.servlet.ConvertSampleImageOverlayed - - - - ConvertSampleImageFrame - - emb.sample.servlet.ConvertSampleImageFrame - - - - - - ActionDispatcher - /index.jsp - - - HomeSample - /HomeSample - - - ActionDispatcher - /ActionDispatcher - - - UploadSampleMedia - /UploadSampleMedia - - - LoadSampleMedia - /LoadSampleMedia - - - ListSampleMedia - /ListSampleMedia - - - ExtractHeaderData - /ExtractHeaderData - - - RetrieveSampleMedia - /RetrieveSampleMedia - - - ConvertSampleImageBW - /ConvertSampleImageBW - - - ConvertSampleImageHalfSize - /ConvertSampleImageHalfSize - - - ConvertSampleImageFormat - /ConvertSampleImageFormat - - - ConvertSampleImageChained - /ConvertSampleImageChained - - - ConvertSampleImageSvgToPng - /ConvertSampleImageSvgToPng - - - ConvertSampleVideoTo3GPP - /ConvertSampleVideoTo3GPP - - - ConvertSampleVideoToMpegTs - /ConvertSampleVideoToMpegTs - - - ConvertSampleVideoToMpeg - /ConvertSampleVideoToMpeg - - - ConvertSampleImageOverlayed - /ConvertSampleImageOverlayed - - - ConvertSampleImageFrame - /ConvertSampleImageFrame - - - 404 - /ActionDispatcher - - - ejb/emb/MediaEntity - Entity - javax.emb.MediaEntityLocalHome - javax.emb.MediaEntityLocal - emb-core-ejb.jar#MediaEntity - - - ejb/embSample/MediaSampleSession - Session - - emb.sample.session.MediaSampleSessionLocalHome - - emb.sample.session.MediaSampleSessionLocal - emb-sample-ejb.jar#MediaSampleSession - - - - - - emb.sample.servlet.HttpSessionMgr - - - - diff --git a/jonas_tests/examples/base/examples/emb-sample/lib/README b/jonas_tests/examples/base/examples/emb-sample/lib/README deleted file mode 100644 index 6ab933bf418c4f0445b183d68e3d6ffc34f47326..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/lib/README +++ /dev/null @@ -1,2 +0,0 @@ -Version of jars file is located in versions.properties file. -Sources are located under JONAS_CVS/emb-jonas. \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/emb-sample/lib/commons-fileupload-1.1.1.jar b/jonas_tests/examples/base/examples/emb-sample/lib/commons-fileupload-1.1.1.jar deleted file mode 100644 index fc5763d0d33108308493ac19cbc0e4c2eadfca26..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/emb-sample/lib/commons-fileupload-1.1.1.jar and /dev/null differ diff --git a/jonas_tests/examples/base/examples/emb-sample/lib/emb-core.ear b/jonas_tests/examples/base/examples/emb-sample/lib/emb-core.ear deleted file mode 100644 index 93b8f9c5e2142c1f9acea6b008e2f60813545c1f..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/emb-sample/lib/emb-core.ear and /dev/null differ diff --git a/jonas_tests/examples/base/examples/emb-sample/lib/emb-jsr86-api.jar b/jonas_tests/examples/base/examples/emb-sample/lib/emb-jsr86-api.jar deleted file mode 100644 index f5da3b0d27ed2af9c36aa0c134c66ecd31939aba..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/emb-sample/lib/emb-jsr86-api.jar and /dev/null differ diff --git a/jonas_tests/examples/base/examples/emb-sample/lib/emb-ow-mfb-core.jar b/jonas_tests/examples/base/examples/emb-sample/lib/emb-ow-mfb-core.jar deleted file mode 100644 index 586848d65eea78262a170c6f71554a9991ecd763..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/emb-sample/lib/emb-ow-mfb-core.jar and /dev/null differ diff --git a/jonas_tests/examples/base/examples/emb-sample/lib/emb-ow-plugins-api.jar b/jonas_tests/examples/base/examples/emb-sample/lib/emb-ow-plugins-api.jar deleted file mode 100644 index b7b7bae4725f6d88e739cf3039d69ef203fbbde7..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/emb-sample/lib/emb-ow-plugins-api.jar and /dev/null differ diff --git a/jonas_tests/examples/base/examples/emb-sample/plugins/README b/jonas_tests/examples/base/examples/emb-sample/plugins/README deleted file mode 100644 index 88ee43011fed783c17e246d42d44652703c47dba..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/plugins/README +++ /dev/null @@ -1,8 +0,0 @@ -$Id$ - -============================================================================== - Plugins -============================================================================== - -In this directory put the plugins you want to use (*.rar) - diff --git a/jonas_tests/examples/base/examples/emb-sample/resources/icons/valid-xhtml11.png b/jonas_tests/examples/base/examples/emb-sample/resources/icons/valid-xhtml11.png deleted file mode 100644 index 2c63d93f8868d574b9e69eda2727b7e7bf7fc8ec..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/emb-sample/resources/icons/valid-xhtml11.png and /dev/null differ diff --git a/jonas_tests/examples/base/examples/emb-sample/resources/icons/vcss.png b/jonas_tests/examples/base/examples/emb-sample/resources/icons/vcss.png deleted file mode 100644 index 9b2f596e016533327216d98a0a927738fe17384f..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/emb-sample/resources/icons/vcss.png and /dev/null differ diff --git a/jonas_tests/examples/base/examples/emb-sample/resources/jsps/footer.jsp b/jonas_tests/examples/base/examples/emb-sample/resources/jsps/footer.jsp deleted file mode 100644 index 6abe0bfbf5b7b873b1cb929180d6535190115817..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/resources/jsps/footer.jsp +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/jonas_tests/examples/base/examples/emb-sample/resources/jsps/header.jsp b/jonas_tests/examples/base/examples/emb-sample/resources/jsps/header.jsp deleted file mode 100644 index fa91d53b214aec135b8ecfb8b962fb6f9b0a6a45..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/resources/jsps/header.jsp +++ /dev/null @@ -1,31 +0,0 @@ - - -<%@ page errorPage="templatePage.jsp" %> -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %> - - - -JOnAS Enterprise Media Beans (JSR 86) - Sample - - - -
    - - -

    JOnAS Enterprise Media Beans (JSR 86) - Sample

    - - - - -
    - diff --git a/jonas_tests/examples/base/examples/emb-sample/resources/jsps/mediaList.jsp b/jonas_tests/examples/base/examples/emb-sample/resources/jsps/mediaList.jsp deleted file mode 100644 index 31920bbc7e8321cc1205a457404ddd28010d132b..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/resources/jsps/mediaList.jsp +++ /dev/null @@ -1,109 +0,0 @@ - - -<%@ page import="emb.sample.servlet.BaseSampleServlet"%> -<%@ page errorPage="templatePage.jsp"%> -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> - - - -JOnAS Enterprise Media Beans (JSR 86) - Sample - - - -
    -
    -

    JOnAS Enterprise Media Beans (JSR 86) - Sample

    - - - - -
    - - - - - - - - <% - boolean lineParity = true; - - // get medias - javax.emb.MediaEntityLocal[] medias = (javax.emb.MediaEntityLocal[]) request.getAttribute("samplesMedia"); - String[] proxiesUrl = (String[]) request.getAttribute("proxiesUrl"); - - for (int i = 0; i < medias.length; i++) { - - String lineKind = "even"; - if (lineParity) { - lineKind = "odd"; - } - lineParity = !lineParity; - - %> - - - - - - - - - - - <%}%> - -
    Usable Media List
    - - - - <%= medias[i].getName() %> - - <%=medias[i].getName()%><%=medias[i].getMimeType()%><%= BaseSampleServlet.SIZE_FORMAT.format(medias[i].getSize() / BaseSampleServlet.BYTE_IN_KB) %> kB
    <%=(medias[i].getDescription() == null ? "" : medias[i].getDescription())%>
    -
    - - -
    -
    - - diff --git a/jonas_tests/examples/base/examples/emb-sample/resources/jsps/navigation.jsp b/jonas_tests/examples/base/examples/emb-sample/resources/jsps/navigation.jsp deleted file mode 100644 index d560f25e71284c68696a0334505831f791b369dd..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/resources/jsps/navigation.jsp +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/jonas_tests/examples/base/examples/emb-sample/resources/jsps/templatePage.jsp b/jonas_tests/examples/base/examples/emb-sample/resources/jsps/templatePage.jsp deleted file mode 100644 index 6a397249a5c988df4e6390b6b059446358290993..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/resources/jsps/templatePage.jsp +++ /dev/null @@ -1,67 +0,0 @@ - - -<%@ page isErrorPage="true"%> -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %> - - - -JOnAS Enterprise Media Beans (JSR 86) - Sample - - - -
    - - -

    JOnAS Enterprise Media Beans (JSR 86) - Sample

    - - - - - -
    -<% -if (exception != null) { - out.println("

    There was an Error

    "); - out.println("
    ");
    -    java.io.ByteArrayOutputStream ostr = new java.io.ByteArrayOutputStream();
    -    exception.printStackTrace(new java.io.PrintStream(ostr));
    -    out.print(ostr);
    -    out.println("
    "); -} - -Object workspaceContent = request.getAttribute("workspaceContent"); -if (workspaceContent != null) { - out.println(workspaceContent.toString()); -} - -Object errorMessage = request.getAttribute("errorMessage"); -if (errorMessage != null) { - out.println("

    There was an Error

    "); - out.println("
    ");
    -    out.println(errorMessage.toString());
    -    out.println("
    "); -} -%> -
    - -
    - - - diff --git a/jonas_tests/examples/base/examples/emb-sample/resources/jsps/uploadForm.jsp b/jonas_tests/examples/base/examples/emb-sample/resources/jsps/uploadForm.jsp deleted file mode 100644 index eb98a700d394f6cb6dff688ded4e9502593034f3..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/resources/jsps/uploadForm.jsp +++ /dev/null @@ -1,85 +0,0 @@ - - -<%@ page errorPage="templatePage.jsp" %> -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %> - - - -JOnAS Enterprise Media Beans (JSR 86) - Sample - - - -
    - - -

    JOnAS Enterprise Media Beans (JSR 86) - Sample

    - - - - - -
    - - -

    Upload a new Media

    -

    -Choose a media to import, the media can be either a file or an URL location.
    -You can had a description if want to.
    -The file extension must supported (see below) -

    -
    - - -
    - -
    -
    - ("file://" or "http://" only) -
    -
    - -
    -
    - -
    -
    - -
    -

    Supported formats

    -<% -Object workspaceContent = request.getAttribute("fromatSupported"); -if (workspaceContent != null) { - out.println(workspaceContent.toString()); -} -%> -
    - - -
    - -
    - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/emb-sample/resources/samples/Java_CompatEE.gif b/jonas_tests/examples/base/examples/emb-sample/resources/samples/Java_CompatEE.gif deleted file mode 100644 index 10997dfc3cb998e1d78c13183ea1f7fc26752bd2..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/emb-sample/resources/samples/Java_CompatEE.gif and /dev/null differ diff --git a/jonas_tests/examples/base/examples/emb-sample/resources/samples/apache.svg b/jonas_tests/examples/base/examples/emb-sample/resources/samples/apache.svg deleted file mode 100644 index f12b00a67c596c87908c3a48687264a14e635690..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/resources/samples/apache.svg +++ /dev/null @@ -1,759 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/emb-sample/resources/samples/frame.png b/jonas_tests/examples/base/examples/emb-sample/resources/samples/frame.png deleted file mode 100644 index af8a33d61e3fb90dc8ad7b6366d3cb4563af8844..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/emb-sample/resources/samples/frame.png and /dev/null differ diff --git a/jonas_tests/examples/base/examples/emb-sample/resources/samples/iss-fireworks.mp3 b/jonas_tests/examples/base/examples/emb-sample/resources/samples/iss-fireworks.mp3 deleted file mode 100644 index 8a54177ea5cb6dd71cf20528e0fd4fe33ac25982..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/emb-sample/resources/samples/iss-fireworks.mp3 and /dev/null differ diff --git a/jonas_tests/examples/base/examples/emb-sample/resources/samples/jonas.mp4 b/jonas_tests/examples/base/examples/emb-sample/resources/samples/jonas.mp4 deleted file mode 100644 index b8e0d71d9f9eb23aa959394d20b51ca967e785bc..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/emb-sample/resources/samples/jonas.mp4 and /dev/null differ diff --git a/jonas_tests/examples/base/examples/emb-sample/resources/samples/jonas.png b/jonas_tests/examples/base/examples/emb-sample/resources/samples/jonas.png deleted file mode 100644 index a19da9ca20bbc9a242ae198a0c2f6b4dcd37c11a..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/emb-sample/resources/samples/jonas.png and /dev/null differ diff --git a/jonas_tests/examples/base/examples/emb-sample/resources/samples/mask.png b/jonas_tests/examples/base/examples/emb-sample/resources/samples/mask.png deleted file mode 100644 index 882e474f477a9e56cb22aa5e7af41b65d422d661..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/emb-sample/resources/samples/mask.png and /dev/null differ diff --git a/jonas_tests/examples/base/examples/emb-sample/resources/samples/objectweb.png b/jonas_tests/examples/base/examples/emb-sample/resources/samples/objectweb.png deleted file mode 100644 index f3334f55091a554a7708a65c5aae9369384f4850..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/emb-sample/resources/samples/objectweb.png and /dev/null differ diff --git a/jonas_tests/examples/base/examples/emb-sample/resources/samples/samples.properties b/jonas_tests/examples/base/examples/emb-sample/resources/samples/samples.properties deleted file mode 100644 index 46d62a0d285b3f6a948250c5080d17381355977d..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/resources/samples/samples.properties +++ /dev/null @@ -1,83 +0,0 @@ -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 2005 Bull S.A. -# Contact: jonas-team@objectweb.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# Initial developer: Brice Ruzand -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- -# -# This contains the Initial information for the sample media database -# - -# sample MP3 audio file -sampleAudio1.file iss-fireworks.mp3 -sampleAudio1.desc International Space Station crew responding to fireworks question. -sampleAudio1.show true - -# sample PNG file -sampleLogo1.file jonas.png -sampleLogo1.desc JOnAS logo -sampleLogo1.show true - -# sample PNG file -sampleLogo2.file objectweb.png -sampleLogo2.desc ObjectWeb logo -sampleLogo2.show true - -# sample GIF file -sampleLogo3.file Java_CompatEE.gif -sampleLogo3.desc Java EE Compatible logo -sampleLogo3.show true - -# sample SVG file -sampleDraw1.file apache.svg -sampleDraw1.desc Apache Logo -sampleDraw1.show true - -# sample JPG file -samplePhoto1.file snow.jpg -samplePhoto1.desc Going back home by skiing, in winter 2005 -samplePhoto1.show true - -# sample JPG file -samplePhoto2.file white-valley.jpg -samplePhoto2.desc White Valley (Chamonix, France) -samplePhoto2.show true - -# sample JPG file -samplePhoto3.file starfish.jpg -samplePhoto3.desc A starfish while scuba diving in Mediterranean See -samplePhoto3.show true - -# sample MPEG4 file -sampleVideo1.file jonas.mp4 -sampleVideo1.desc EMB with JOnAS promotion Trailer -sampleVideo1.show true - - -# sample for frame converter (frame) -sampleFrame1.file frame.png -sampleFrame1.desc Image used in frame generation (frame) -sampleFrame1.show false - -# sample for frame converter -sampleMask1.file mask.png -sampleMask1.desc Image used in frame generation (mask) -sampleMask1.show false diff --git a/jonas_tests/examples/base/examples/emb-sample/resources/samples/snow.jpg b/jonas_tests/examples/base/examples/emb-sample/resources/samples/snow.jpg deleted file mode 100644 index 6b39d0c2adf4165cd62b4ca9f796350e9e108b25..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/emb-sample/resources/samples/snow.jpg and /dev/null differ diff --git a/jonas_tests/examples/base/examples/emb-sample/resources/samples/starfish.jpg b/jonas_tests/examples/base/examples/emb-sample/resources/samples/starfish.jpg deleted file mode 100644 index c8786ca88ca3c483ad9c2903cbec2a699d1f1022..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/emb-sample/resources/samples/starfish.jpg and /dev/null differ diff --git a/jonas_tests/examples/base/examples/emb-sample/resources/samples/white-valley.jpg b/jonas_tests/examples/base/examples/emb-sample/resources/samples/white-valley.jpg deleted file mode 100644 index ab51bb49107438d866804d4eaf239da0aabc4734..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/emb-sample/resources/samples/white-valley.jpg and /dev/null differ diff --git a/jonas_tests/examples/base/examples/emb-sample/resources/theme/style.css b/jonas_tests/examples/base/examples/emb-sample/resources/theme/style.css deleted file mode 100644 index 0b73165bd5efa440184fd4847d7901e33e28643a..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/resources/theme/style.css +++ /dev/null @@ -1,132 +0,0 @@ -body { - background: #eef7fd; - font-family: arial, helvetica, sans-serif; - font-size: 11pt; -} - -h1,h2,h3,h4,th { - color: #9f3e19; - font-weight: bold; - margin: 5pt; -} - -h1 { - font-size: 18pt; - padding-bottom: 10pt; -} - -h2 { - font-size: 13pt; -} - -h3,th { - text-align: center; - font-size: 12pt; - color: #42648e; - padding-top: 3pt; - padding-bottom: 3pt; -} - -h4 { - font-size: 12pt; -} - -#workspace { - overflow: auto; - margin-right: 10px; - margin-left: 0.5ex; - padding: 10px; - border-style: dotted; - border-width: 1px; - border-color: #42648e; - background-color: white; -} - -#workspace table { - width: 100%; - border-spacing: 0; -} - -.media-proxy { - height: 60px; - vertical-align: middle; - padding-top: 5px; -} - -img { - border-style: none; -} - -.media { - text-align: center; -} - -#menu { - float: left; - margin-right: 0.5ex; - width: 30ex; - height: 100%; - font-size: 11pt; -} - -#menu p { - text-align: center; -} - -.menu-box { - border-style: dashed; - border-width: 1px; - border-color: #42648e; - background-color: white; - margin-bottom: 1ex; - padding-left: 1ex; - padding-right: 1ex; - padding-bottom: 1ex; -} - -.menu-box .submit { - padding: 10px; - text-align: center; -} - -.media-size { - vertical-align: middle; -} - -.media-mimetype { - vertical-align: bottom; -} - -.media-desc { - font-size: medium; - vertical-align: top; -} - -.url { - font-size: 11pt; - font-stretch: ultra-condensed; -} - -label { - display: block; - float: left; - width: 8em; - padding-right: 1em; - text-align: right; -} - -.even { - background-color: #FFFFFF; -} - -.odd { - background-color: #F6F6F6; -} - -.error { - color: red; -} - -pre.error { - font-size: 10pt; -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/MediaSampleException.java b/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/MediaSampleException.java deleted file mode 100644 index fb5eef0271c63da0c71055ab2265dc167b70e13f..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/MediaSampleException.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Brice Ruzand - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package emb.sample; - -/** - * This exception extends {@link Exception} and is thrown whenever sample app - * got a trouble - */ -public class MediaSampleException extends Exception { - - /** - * serialVersionUID - */ - private static final long serialVersionUID = 493847692100239586L; - - /** - * This is the default constructor taking no arguments. - */ - public MediaSampleException() { - super(); - } - - /** - * This is the default exception constructor taking a String argument. - * - * @param message the message. - */ - public MediaSampleException(String message) { - super(message); - } - - /** - * This is the default exception constructor taking a Throwable argument. - * - * @param cause the throwable. - */ - public MediaSampleException(Throwable cause) { - super(cause); - } - - /** - * This is the default exception constructor taking both a Throwable and a - * String argument. - * - * @param message the message. - * @param cause the throwable. - */ - public MediaSampleException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ActionDispatcher.java b/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ActionDispatcher.java deleted file mode 100644 index e91b6fca6ce878dbb4bd3a1a686ed7d5822f49b1..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ActionDispatcher.java +++ /dev/null @@ -1,116 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Brice Ruzand - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package emb.sample.servlet; - -import java.io.IOException; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * Query dispatcher to implement an MVC model - * - * @author Brice Ruzand - */ -public class ActionDispatcher extends BaseSampleServlet { - - /** - * serialVersionUID - */ - private static final long serialVersionUID = 3257285816379389239L; - - /** - * @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest, - * javax.servlet.http.HttpServletResponse) - * @inheritDoc - */ - public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - try { - // get the task to perform - String action = request.getParameter("action"); - - // Query the media entity EJB instance. - String identity = request.getParameter("identity"); - - if (action == null) { - getServletContext().getRequestDispatcher("/HomeSample").forward(request, response); - } else if (action.equals("home")) { - getServletContext().getRequestDispatcher("/HomeSample").forward(request, response); - } else if (action.equals("load")) { - getServletContext().getRequestDispatcher("/LoadSampleMedia").forward(request, response); - } else if (action.equals("list")) { - getServletContext().getRequestDispatcher("/ListSampleMedia").forward(request, response); - } else if (action.equals("upload")) { - getServletContext().getRequestDispatcher("/UploadSampleMedia").forward(request, response); - } else { - - if (identity == null) { - - StringPrinter workspaceContent = new StringPrinter(); - - // message - workspaceContent.println("

    No media selected

    "); - workspaceContent.println("Please return to the list and select a media to process..."); - - request.setAttribute("workspaceContent", workspaceContent); - getServletConfig().getServletContext().getRequestDispatcher(TEMPLATE_JSP) - .forward(request, response); - - } else if (action.equals("retrieve")) { - getServletContext().getRequestDispatcher("/RetrieveSampleMedia").forward(request, response); - } else if (action.equals("extractHeader")) { - getServletContext().getRequestDispatcher("/ExtractHeaderData").forward(request, response); - } else if (action.equals("convertBW")) { - getServletContext().getRequestDispatcher("/ConvertSampleImageBW").forward(request, response); - } else if (action.equals("convertHalfSize")) { - getServletContext().getRequestDispatcher("/ConvertSampleImageHalfSize").forward(request, response); - } else if (action.equals("convertFormat")) { - getServletContext().getRequestDispatcher("/ConvertSampleImageFormat").forward(request, response); - } else if (action.equals("convertChained")) { - getServletContext().getRequestDispatcher("/ConvertSampleImageChained").forward(request, response); - } else if (action.equals("convertSvgToPng")) { - getServletContext().getRequestDispatcher("/ConvertSampleImageSvgToPng").forward(request, response); - } else if (action.equals("convertVideoTo3GPP")) { - getServletContext().getRequestDispatcher("/ConvertSampleVideoTo3GPP").forward(request, response); - } else if (action.equals("convertVideoToMpegTs")) { - getServletContext().getRequestDispatcher("/ConvertSampleVideoToMpegTs").forward(request, response); - } else if (action.equals("convertVideoToMpeg")) { - getServletContext().getRequestDispatcher("/ConvertSampleVideoToMpeg").forward(request, response); - } else if (action.equals("convertOverlayed")) { - getServletContext().getRequestDispatcher("/ConvertSampleImageOverlayed").forward(request, response); - } else if (action.equals("convertFrame")) { - getServletContext().getRequestDispatcher("/ConvertSampleImageFrame").forward(request, response); - } else { - throw new Exception("Invalid Action dispatecher param."); - } - } - } catch (Throwable e) { - exceptionHandler(e, getClass(), request, response); - } - } -} diff --git a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/BaseSampleServlet.java b/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/BaseSampleServlet.java deleted file mode 100644 index b6f1f4c784f15dd9ed7dde15e26d950283939d13..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/BaseSampleServlet.java +++ /dev/null @@ -1,335 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Brice Ruzand - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package emb.sample.servlet; - -import java.io.Serializable; -import java.text.DecimalFormat; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.Random; - -import javax.emb.MediaEntityLocal; -import javax.emb.MediaEntityLocalHome; -import javax.emb.MediaException; -import javax.naming.InitialContext; -import javax.naming.NamingException; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import emb.sample.MediaSampleException; -import emb.sample.session.MediaSampleSessionLocal; -import emb.sample.session.MediaSampleSessionLocalHome; - -/** - * Base classes for all sample - * - * @author Brice Ruzand - */ -public class BaseSampleServlet extends HttpServlet { - - /** - * serialVersionUID - */ - private static final long serialVersionUID = 428471464384262530L; - - /* - * ======================================================================= - * Sample apps - * ======================================================================= - */ - - /** - * Retrive servlet URI - */ - protected static final String RETRIEVE_SERVLET = "/RetrieveSampleMedia"; - - /** - * Retrive servlet URI - */ - protected static final String ACTION_DISPATCHER_SERVLET = "/ActionDispatcher"; - - /** - * template jsp URI - */ - protected static final String TEMPLATE_JSP = "/jsps/templatePage.jsp"; - - /** - * tranforme Byte in KB - */ - public static final double BYTE_IN_KB = 1024D; - - /** - * Random seed - */ - protected static final Random RANDOM = new Random(); - - /** - * Default format for time stamp - */ - public static final SimpleDateFormat TIME_STAMP_FORMAT = new SimpleDateFormat("yy-MM-dd HH:mm:ss.SSS"); - - /** - * Default format for size - */ - public static final DecimalFormat SIZE_FORMAT = new DecimalFormat("0.0"); - - /** - * Display medi info in XHTML - * - * @param sp StringPrinter - * @param meb The media entity - */ - protected void displayInfo(StringPrinter sp, MediaEntityLocal meb) { - - try { - sp.println("Name : " + meb.getName() + "
    "); - sp.println("MimeType : " + meb.getMimeType() + "
    "); - sp.println("Size : " + SIZE_FORMAT.format(meb.getSize() / BYTE_IN_KB) + " KB
    "); - String desc = meb.getDescription(); - if (desc == null) { - desc = ""; - } - sp.println("Description :
    " + meb.getDescription() + "

    "); - sp.println("LastModified :
    " + TIME_STAMP_FORMAT.format(new Date(meb.getLastModified())) - + "

    "); - } catch (MediaException e) { - sp.println("Error while retriving medi info"); - } - } - - /** - * Get a session bean to manage Media creation - * - * @param request the HttpServlet request - * @return the MediaSampleSessionLocal - * @throws MediaSampleException if session cannot be created - */ - protected static MediaSampleSessionLocal getSession(HttpServletRequest request) throws MediaSampleException { - try { - MediaSampleSessionLocal sessionBean = (MediaSampleSessionLocal) request.getSession().getAttribute( - "sessionBean"); - - if (sessionBean == null) { - sessionBean = getSessionHome().create(); - request.getSession().setAttribute("sessionBean", sessionBean); - throw new MediaSampleException("Your session has exprired, please reload some medias"); - } - return sessionBean; - } catch (MediaSampleException e) { - throw e; - } catch (Exception e) { - // e.printStackTrace(); - throw new MediaSampleException("Unable to create a new session", e); - - } - } - - /* - * ======================================================================= - * Errors - * ======================================================================= - */ - - /** - * Method to handle all exceptions of all Music Application Servlets in a - * uniform way using the specified error JSP (/jps/templatePage.jsp). - *

    - * In case of error a ServletException will be thrown. - * - * @param exception java.lang.Exception - * @param errorClass class where the error locate - * @param request com.sun.server.http.HttpServletRequest - * @param response com.sun.server.http.HttpServletResponse - * @throws ServletException This exception will be thrown if the - * errorhandling fails - */ - protected void exceptionHandler(Throwable exception, Class errorClass, HttpServletRequest request, - HttpServletResponse response) throws ServletException { - - StringPrinter errorMessage = new StringPrinter(); - - try { - - if (exception instanceof MediaSampleException) { - - errorMessage.println("

    There was an error

    "); - errorMessage.println(exception.getLocalizedMessage()); - request.setAttribute("workspaceContent", errorMessage); - getServletConfig().getServletContext().getRequestDispatcher(TEMPLATE_JSP).forward(request, response); - - } else { - - errorMessage.println(errorClass.getName() + ":"); - errorMessage.println(""); - errorMessage.println(exception.toString()); - errorMessage.println(""); - errorLog(errorClass.getName() + ": " + exception); - - StackTraceElement[] ste; - if (exception.getCause() != null) { - ste = exception.getCause().getStackTrace(); - } else { - ste = exception.getStackTrace(); - } - - for (int i = 0; i < ste.length; i++) { - - errorMessage.println(ste[i].toString()); - // when the source cause is found stop stack - if (ste[i].getClassName().startsWith("emb.sample")) { - break; - } - } - - request.setAttribute("errorMessage", errorMessage); - getServletConfig().getServletContext().getRequestDispatcher(TEMPLATE_JSP).forward(request, response); - - } - - } catch (Exception e) { - // if standard error reporter fails throw exception - throw new ServletException(errorMessage.toString(), e); - } - } - - /** - * Method to print error messages to stderr and for syschronisation purpose - * to stdout too. - * - * @param msg java.lang.String - */ - protected static void errorLog(String msg) { - final int defBuffer = 1024; - StringBuffer bfr = new StringBuffer(defBuffer); - - bfr.append("["); - bfr.append(TIME_STAMP_FORMAT.format(new Date(System.currentTimeMillis()))); - bfr.append("] EMB SAMPLE ERROR "); - bfr.append(msg); - - System.err.println(bfr.toString()); - } - - /** - * Class to use printer - * - * @author Brice Ruzand - */ - protected class StringPrinter implements Serializable { - - /** - * serialVersionUID - */ - private static final long serialVersionUID = -2865716341020911272L; - - /** - * The String Buffer - */ - private StringBuffer buffer; - - /** - * Default Constructor - */ - public StringPrinter() { - - final int newbuffsize = 128; - buffer = new StringBuffer(newbuffsize); - } - - /** - * Print a line in the printer - * - * @param str the string to print - */ - public void println(String str) { - buffer.append(str); - buffer.append("\r\n"); - } - - /** - * @see java.lang.Object#toString() - */ - public String toString() { - return buffer.toString(); - } - } - - /* - * ======================================================================= - * EJB TOOLS - * ======================================================================= - */ - - /** - * Media Enotity Bean Home reference - */ - private static final String SESSION_HOME_REF = "java:comp/env/ejb/embSample/MediaSampleSession"; - - /** - * Media Entity Bean Home reference - */ - private static final String MEB_HOME_REF = "java:comp/env/ejb/emb/MediaEntity"; - - /** - * cached Home - */ - private static MediaSampleSessionLocalHome mebSessionHome = null; - - /** - * cached Home - */ - private static MediaEntityLocalHome mebHome = null; - - /** - * Provide a cached Home access - * - * @return MediaEntityLocalHome - * @throws NamingException in case MediaEntityLocalHome is not found - */ - protected static MediaSampleSessionLocalHome getSessionHome() throws NamingException { - if (mebSessionHome == null) { - mebSessionHome = (MediaSampleSessionLocalHome) new InitialContext().lookup(SESSION_HOME_REF); - } - return mebSessionHome; - } - - /** - * Provide a cached Home access - * - * @return MediaEntityLocalHome - * @throws NamingException in case MediaEntityLocalHome is not found - */ - protected static MediaEntityLocalHome getMebHome() throws NamingException { - if (mebHome == null) { - mebHome = (MediaEntityLocalHome) new InitialContext().lookup(MEB_HOME_REF); - } - return mebHome; - } - -} diff --git a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleImageBW.java b/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleImageBW.java deleted file mode 100644 index 7bc2da0b560be36a80be51f6e3e69855a85ede10..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleImageBW.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Brice Ruzand - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package emb.sample.servlet; - -import javax.emb.MediaConverterSpec; -import javax.emb.MediaEntityLocal; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.objectweb.jonas.emb.mfb.converter.image.ImageRGBtoGrayscaleConverterSpec; -import org.objectweb.jonas.emb.mfb.formats.image.ImageMediaFormat; - -import emb.sample.MediaSampleException; -import emb.sample.session.MediaSampleSessionLocal; - -/** - * @author Brice Ruzand - */ -public class ConvertSampleImageBW extends BaseSampleServlet { - - /** - * serialVersionUID - */ - private static final long serialVersionUID = 3687815080511141944L; - - /** - * @see javax.servlet.http.HttpServlet#service(javax.servlet.http.HttpServletRequest, - * javax.servlet.http.HttpServletResponse) - * @inheritDoc - */ - public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException { - try { - MediaSampleSessionLocal session = getSession(request); - - // Query the media entity EJB instance. - String identity = request.getParameter("identity"); - MediaEntityLocal mediaEntity = session.getMediaFromPrimaryKey(identity); - - if (!(mediaEntity.getFormat() instanceof ImageMediaFormat)) { - throw new MediaSampleException("The selected media must be an image."); - } - - MediaEntityLocal media = session.copyMediaEntity(mediaEntity); - media.setDescription("Black and White conversion of: " + mediaEntity.getName()); - - // Convert the MediaEntityToBlack&White - MediaConverterSpec[] specs = new MediaConverterSpec[] {new ImageRGBtoGrayscaleConverterSpec()}; - media.convert(specs); - - // forward onto the retrieve servlet - request.setAttribute("identity", media.getPrimaryKey()); - this.getServletContext().getRequestDispatcher(RETRIEVE_SERVLET).forward(request, response); - - } catch (Throwable e) { - exceptionHandler(e, getClass(), request, response); - } - } - -} diff --git a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleImageChained.java b/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleImageChained.java deleted file mode 100644 index 17c14a2dc33a9aa9267e6da773247d558583e215..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleImageChained.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Brice Ruzand - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package emb.sample.servlet; - -import javax.emb.MediaConverterSpec; -import javax.emb.MediaEntityLocal; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.objectweb.jonas.emb.mfb.converter.image.ImageFormatConverterSpec; -import org.objectweb.jonas.emb.mfb.converter.image.ImageRGBtoGrayscaleConverterSpec; -import org.objectweb.jonas.emb.mfb.converter.image.ImageResizeConverterSpec; -import org.objectweb.jonas.emb.mfb.formats.image.ImageMediaFormat; - -import emb.sample.MediaSampleException; -import emb.sample.session.MediaSampleSessionLocal; - -/** - * @author Brice Ruzand - */ -public class ConvertSampleImageChained extends BaseSampleServlet { - - /** - * serialVersionUID - */ - private static final long serialVersionUID = 3761970445343076657L; - - /** - * @see javax.servlet.http.HttpServlet#service(javax.servlet.http.HttpServletRequest, - * javax.servlet.http.HttpServletResponse) - * @inheritDoc - */ - public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException { - try { - MediaSampleSessionLocal session = getSession(request); - - // Query the media entity EJB instance. - String identity = request.getParameter("identity"); - MediaEntityLocal mediaEntity = session.getMediaFromPrimaryKey(identity); - - if (!(mediaEntity.getFormat() instanceof ImageMediaFormat)) { - throw new MediaSampleException("The selected media must be an image."); - } - - // Create a copy - MediaEntityLocal media = session.copyMediaEntity(mediaEntity); - media.setDescription("Chained convertion of: " + mediaEntity.getName()); - - // Convert the media to PNG then to Grayscale then to Halfsize - final double resizeFactor = 0.5; - MediaConverterSpec[] specs = new MediaConverterSpec[] {new ImageFormatConverterSpec("png"), - new ImageRGBtoGrayscaleConverterSpec(), new ImageResizeConverterSpec(resizeFactor)}; - media.convert(specs); - identity = (String) media.getPrimaryKey(); - - // forward onto the retrieve servlet - request.setAttribute("identity", media.getPrimaryKey()); - this.getServletContext().getRequestDispatcher(RETRIEVE_SERVLET).forward(request, response); - - } catch (Throwable e) { - exceptionHandler(e, getClass(), request, response); - } - } - -} diff --git a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleImageFormat.java b/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleImageFormat.java deleted file mode 100644 index 05e89c3270879911fa8390c1973bfc53a4bbb84b..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleImageFormat.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Brice Ruzand - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package emb.sample.servlet; - -import javax.emb.MediaConverterSpec; -import javax.emb.MediaEntityLocal; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.objectweb.jonas.emb.mfb.converter.image.ImageFormatConverterSpec; -import org.objectweb.jonas.emb.mfb.formats.image.ImageMediaFormat; - -import emb.sample.MediaSampleException; -import emb.sample.session.MediaSampleSessionLocal; - -/** - * @author Brice Ruzand - */ -public class ConvertSampleImageFormat extends BaseSampleServlet { - - /** - * serialVersionUID - */ - private static final long serialVersionUID = 3687815080511141944L; - - /** - * @see javax.servlet.http.HttpServlet#service(javax.servlet.http.HttpServletRequest, - * javax.servlet.http.HttpServletResponse) - * @inheritDoc - */ - public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException { - try { - MediaSampleSessionLocal session = getSession(request); - - // Query the media entity EJB instance. - String identity = request.getParameter("identity"); - MediaEntityLocal mediaEntity = session.getMediaFromPrimaryKey(identity); - - if (!(mediaEntity.getFormat() instanceof ImageMediaFormat)) { - throw new MediaSampleException("The selected media must be an image."); - } - - // Create a copy - MediaEntityLocal media = session.copyMediaEntity(mediaEntity); - String targetFormat = "png"; - media.setDescription(targetFormat + " conversion of: " + mediaEntity.getName()); - - // Convert the media to an other format - MediaConverterSpec[] specs = new MediaConverterSpec[] {new ImageFormatConverterSpec(targetFormat)}; - media.convert(specs); - - identity = (String) media.getPrimaryKey(); - - // forward onto the retrieve servlet - request.setAttribute("identity", media.getPrimaryKey()); - this.getServletContext().getRequestDispatcher(RETRIEVE_SERVLET).forward(request, response); - - } catch (Throwable e) { - exceptionHandler(e, getClass(), request, response); - } - } - -} diff --git a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleImageFrame.java b/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleImageFrame.java deleted file mode 100644 index e2661a3f2f2365104e423a5f427cf3926cb4b3b6..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleImageFrame.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Brice Ruzand - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package emb.sample.servlet; - -import javax.emb.MediaConverterSpec; -import javax.emb.MediaEntityLocal; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.objectweb.jonas.emb.mfb.converter.image.ImageFrameConverterSpec; -import org.objectweb.jonas.emb.mfb.formats.image.ImageMediaFormat; - -import emb.sample.MediaSampleException; -import emb.sample.session.MediaSampleSessionLocal; - -/** - * @author Brice Ruzand - */ -public class ConvertSampleImageFrame extends BaseSampleServlet { - - /** - * serialVersionUID - */ - private static final long serialVersionUID = -3697654416111319491L; - - /** - * The quick acces to the frame, name in the property file - */ - private static final String FRAME_ACCESS = "sampleFrame1"; - - /** - * The quick acces to the mask, name in the property file - */ - private static final String MASK_ACCESS = "sampleMask1"; - - /** - * @see javax.servlet.http.HttpServlet#service(javax.servlet.http.HttpServletRequest, - * javax.servlet.http.HttpServletResponse) - * @inheritDoc - */ - public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException { - try { - MediaSampleSessionLocal session = getSession(request); - - // Query the media entity EJB instance. - String identity = request.getParameter("identity"); - MediaEntityLocal mediaEntity = session.getMediaFromPrimaryKey(identity); - - // name in th property file - MediaEntityLocal frame = null; - MediaEntityLocal mask = null; - - try { - frame = session.getMediaFromRegistredName(FRAME_ACCESS); - mask = session.getMediaFromRegistredName(MASK_ACCESS); - } catch (MediaSampleException e) { - throw new MediaSampleException("(no mask and frame in the dataBase). Please init the database."); - - } - - if (!(mediaEntity.getFormat() instanceof ImageMediaFormat)) { - throw new MediaSampleException("The selected media must be an image."); - } - - // Create a copy - MediaEntityLocal media = session.copyMediaEntity(mediaEntity); - media.setDescription("Added frame to: " + mediaEntity.getName()); - - // Convert the add specifed frame to the other image - - // well know position offset - final int posX = 50; - final int posY = 58; - - MediaConverterSpec[] specs = new MediaConverterSpec[] {new ImageFrameConverterSpec(frame, mask, posX, posY)}; - media.convert(specs); - identity = (String) media.getPrimaryKey(); - - // forward onto the retrieve servlet - request.setAttribute("identity", media.getPrimaryKey()); - this.getServletContext().getRequestDispatcher(RETRIEVE_SERVLET).forward(request, response); - - } catch (Throwable e) { - exceptionHandler(e, getClass(), request, response); - } - } -} diff --git a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleImageHalfSize.java b/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleImageHalfSize.java deleted file mode 100644 index e33d037ff5105c2382c959b3e2e2723517366b49..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleImageHalfSize.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Brice Ruzand - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package emb.sample.servlet; - -import javax.emb.MediaConverterSpec; -import javax.emb.MediaEntityLocal; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.objectweb.jonas.emb.mfb.converter.image.ImageResizeConverterSpec; -import org.objectweb.jonas.emb.mfb.formats.image.ImageMediaFormat; - -import emb.sample.MediaSampleException; -import emb.sample.session.MediaSampleSessionLocal; - -/** - * @author Brice Ruzand - */ -public class ConvertSampleImageHalfSize extends BaseSampleServlet { - - /** - * serialVersionUID - */ - private static final long serialVersionUID = 36899150987141944L; - - /** - * @see javax.servlet.http.HttpServlet#service(javax.servlet.http.HttpServletRequest, - * javax.servlet.http.HttpServletResponse) - * @inheritDoc - */ - public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException { - try { - MediaSampleSessionLocal session = getSession(request); - - // Query the media entity EJB instance. - String identity = request.getParameter("identity"); - MediaEntityLocal mediaEntity = session.getMediaFromPrimaryKey(identity); - - if (!(mediaEntity.getFormat() instanceof ImageMediaFormat)) { - throw new MediaSampleException("The selected media must be an image."); - } - - // Create a copy - MediaEntityLocal media = session.copyMediaEntity(mediaEntity); - media.setDescription("Half-size conversion of: " + mediaEntity.getName()); - - // Convert the MediaEntityToHalfsize - final double resizeFactor = 0.5; - MediaConverterSpec[] specs = new MediaConverterSpec[] {new ImageResizeConverterSpec(resizeFactor)}; - media.convert(specs); - identity = (String) media.getPrimaryKey(); - - // forward onto the retrieve servlet - request.setAttribute("identity", media.getPrimaryKey()); - this.getServletContext().getRequestDispatcher(RETRIEVE_SERVLET).forward(request, response); - - } catch (Throwable e) { - exceptionHandler(e, getClass(), request, response); - } - } - -} diff --git a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleImageOverlayed.java b/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleImageOverlayed.java deleted file mode 100644 index ffe2a67786c0ae14a2f1a26c3873c991ff415b83..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleImageOverlayed.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Brice Ruzand - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package emb.sample.servlet; - -import javax.emb.MediaConverterSpec; -import javax.emb.MediaEntityLocal; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.objectweb.jonas.emb.mfb.converter.image.ImageOverlayConverterSpec; -import org.objectweb.jonas.emb.mfb.formats.image.ImageMediaFormat; - -import emb.sample.MediaSampleException; -import emb.sample.session.MediaSampleSessionLocal; - -/** - * @version 1.0 - * @author - */ -public class ConvertSampleImageOverlayed extends BaseSampleServlet { - - /** - * serialVersionUID - */ - private static final long serialVersionUID = -3697654416111319491L; - - /** - * The quick acces to the logo, name in the property file - */ - private static final String LOGO_ACCESS = "sampleLogo1"; - - /** - * @see javax.servlet.http.HttpServlet#service(javax.servlet.http.HttpServletRequest, - * javax.servlet.http.HttpServletResponse) - * @inheritDoc - */ - public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException { - try { - - MediaSampleSessionLocal session = getSession(request); - - // Query the media entity EJB instance. - String identity = request.getParameter("identity"); - MediaEntityLocal mediaEntity = session.getMediaFromPrimaryKey(identity); - - // name in th property file - MediaEntityLocal logo = null; - - try { - logo = session.getMediaFromRegistredName(LOGO_ACCESS); - } catch (MediaSampleException e) { - throw new MediaSampleException("(no logo in the dataBase). Please init the database."); - - } - - if (!(mediaEntity.getFormat() instanceof ImageMediaFormat)) { - throw new MediaSampleException("The selected media must be an image."); - } - - // Create a copy - MediaEntityLocal media = session.copyMediaEntity(mediaEntity); - media.setDescription("Added Logo to: " + mediaEntity.getName()); - - // Convert the add specifed logo to the other image - MediaConverterSpec[] specs = new MediaConverterSpec[] {new ImageOverlayConverterSpec(logo)}; - media.convert(specs); - identity = (String) media.getPrimaryKey(); - - // forward onto the retrieve servlet - request.setAttribute("identity", media.getPrimaryKey()); - this.getServletContext().getRequestDispatcher(RETRIEVE_SERVLET).forward(request, response); - - } catch (Throwable e) { - exceptionHandler(e, getClass(), request, response); - } - } -} diff --git a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleImageSvgToPng.java b/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleImageSvgToPng.java deleted file mode 100644 index 18e004722d40c85c910854b6f280ca96be835501..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleImageSvgToPng.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Brice Ruzand - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package emb.sample.servlet; - -import javax.emb.MediaConverterSpec; -import javax.emb.MediaEntityLocal; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.objectweb.jonas.emb.mfb.formats.draw.DrawMediaFormat; - -import emb.sample.MediaSampleException; -import emb.sample.session.MediaSampleSessionLocal; - -/** - * @author Brice Ruzand - */ -public class ConvertSampleImageSvgToPng extends BaseSampleServlet { - - /** - * serialVersionUID - */ - private static final long serialVersionUID = 3688503298940548148L; - - /** - * @see javax.servlet.http.HttpServlet#service(javax.servlet.http.HttpServletRequest, - * javax.servlet.http.HttpServletResponse) - * @inheritDoc - */ - public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException { - try { - MediaSampleSessionLocal session = getSession(request); - - // Query the media entity EJB instance. - String identity = request.getParameter("identity"); - MediaEntityLocal mediaEntity = session.getMediaFromPrimaryKey(identity); - - if (!(mediaEntity.getFormat() instanceof DrawMediaFormat)) { - throw new MediaSampleException("The selected media must be a drawing."); - } - - // Create a copy - MediaEntityLocal media = session.copyMediaEntity(mediaEntity); - media.setDescription("PNG conversion using batik of: " + mediaEntity.getName()); - - // Convert the convert SVG to PNG - Class converterSpecClass = getClass().getClassLoader().loadClass( - "org.objectweb.jonas.emb.mfb.plugins.svg.batik.Svg2PngConverterSpec"); - MediaConverterSpec converterSpec = (MediaConverterSpec) converterSpecClass.newInstance(); - MediaConverterSpec[] specs = new MediaConverterSpec[] {converterSpec}; - media.convert(specs); - - identity = (String) media.getPrimaryKey(); - - // forward onto the retrieve servlet - request.setAttribute("identity", media.getPrimaryKey()); - this.getServletContext().getRequestDispatcher(RETRIEVE_SERVLET).forward(request, response); - - } catch (Throwable e) { - exceptionHandler(e, getClass(), request, response); - } - } - -} diff --git a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleVideoTo3GPP.java b/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleVideoTo3GPP.java deleted file mode 100644 index b7393e05acad3df433ecb2ca98b251bb2caf8faa..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleVideoTo3GPP.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Brice Ruzand - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package emb.sample.servlet; - -import javax.emb.MediaConverterSpec; -import javax.emb.MediaEntityLocal; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.objectweb.jonas.emb.mfb.formats.video.VideoMediaFormat; - -import emb.sample.MediaSampleException; -import emb.sample.session.MediaSampleSessionLocal; - -/** - * @author Brice Ruzand - */ -public class ConvertSampleVideoTo3GPP extends BaseSampleServlet { - - /** - * serialVersionUID - */ - private static final long serialVersionUID = 3687815080511141944L; - - /** - * @see javax.servlet.http.HttpServlet#service(javax.servlet.http.HttpServletRequest, - * javax.servlet.http.HttpServletResponse) - * @inheritDoc - */ - public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException { - try { - MediaSampleSessionLocal session = getSession(request); - - // Query the media entity EJB instance. - String identity = request.getParameter("identity"); - MediaEntityLocal mediaEntity = session.getMediaFromPrimaryKey(identity); - - if (!(mediaEntity.getFormat() instanceof VideoMediaFormat)) { - throw new MediaSampleException("The selected media must be an Video format."); - } - - // Create a copy - MediaEntityLocal media = session.copyMediaEntity(mediaEntity); - media.setDescription("Video to 3GPP conversion using ffmpeg of : " + mediaEntity.getName()); - - // Convert the Video to 3GPP with FFMPEG - Class converterSpecClass = getClass().getClassLoader().loadClass( - "org.objectweb.jonas.emb.mfb.plugins.video.ffmpeg.converter.VideoTo3GPPConverterSpec"); - MediaConverterSpec converterSpec = (MediaConverterSpec) converterSpecClass.newInstance(); - MediaConverterSpec[] specs = new MediaConverterSpec[] {converterSpec}; - media.convert(specs); - - identity = (String) media.getPrimaryKey(); - - // forward onto the retrieve servlet - request.setAttribute("identity", media.getPrimaryKey()); - this.getServletContext().getRequestDispatcher(RETRIEVE_SERVLET).forward(request, response); - - } catch (Throwable e) { - exceptionHandler(e, getClass(), request, response); - } - } - -} diff --git a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleVideoToMpeg.java b/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleVideoToMpeg.java deleted file mode 100644 index edf01ecd945486fdd22c76aef72307c46f50a4cb..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleVideoToMpeg.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Brice Ruzand - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package emb.sample.servlet; - -import javax.emb.MediaConverterSpec; -import javax.emb.MediaEntityLocal; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.objectweb.jonas.emb.mfb.formats.video.VideoMediaFormat; - -import emb.sample.MediaSampleException; -import emb.sample.session.MediaSampleSessionLocal; - -/** - * @author Brice Ruzand - */ -public class ConvertSampleVideoToMpeg extends BaseSampleServlet { - - - /** - * serialVersionUID - */ - private static final long serialVersionUID = 1823390929291730344L; - - /** - * @see javax.servlet.http.HttpServlet#service(javax.servlet.http.HttpServletRequest, - * javax.servlet.http.HttpServletResponse) - * @inheritDoc - */ - public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException { - try { - MediaSampleSessionLocal session = getSession(request); - - // Query the media entity EJB instance. - String identity = request.getParameter("identity"); - MediaEntityLocal mediaEntity = session.getMediaFromPrimaryKey(identity); - - if (!(mediaEntity.getFormat() instanceof VideoMediaFormat)) { - throw new MediaSampleException("The selected media must be an Video format."); - } - - // Create a copy - MediaEntityLocal media = session.copyMediaEntity(mediaEntity); - media.setDescription("Mpeg conversion using ffmpeg of : " + mediaEntity.getName()); - - // Convert the Video to MPEG with FFMPEG - Class converterSpecClass = getClass().getClassLoader().loadClass( - "org.objectweb.jonas.emb.mfb.plugins.video.ffmpeg.converter.VideoToMpegConverterSpec"); - MediaConverterSpec converterSpec = (MediaConverterSpec) converterSpecClass.newInstance(); - MediaConverterSpec[] specs = new MediaConverterSpec[] {converterSpec}; - media.convert(specs); - - identity = (String) media.getPrimaryKey(); - - // forward onto the retrieve servlet - request.setAttribute("identity", media.getPrimaryKey()); - this.getServletContext().getRequestDispatcher(RETRIEVE_SERVLET).forward(request, response); - - } catch (Throwable e) { - exceptionHandler(e, getClass(), request, response); - } - } - -} diff --git a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleVideoToMpegTs.java b/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleVideoToMpegTs.java deleted file mode 100644 index 0102c4512e2f68cf8e94e7adc82bf01f8e37d24a..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ConvertSampleVideoToMpegTs.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Brice Ruzand - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package emb.sample.servlet; - -import javax.emb.MediaConverterSpec; -import javax.emb.MediaEntityLocal; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.objectweb.jonas.emb.mfb.formats.video.VideoMediaFormat; - -import emb.sample.MediaSampleException; -import emb.sample.session.MediaSampleSessionLocal; - -/** - * @author Brice Ruzand - */ -public class ConvertSampleVideoToMpegTs extends BaseSampleServlet { - - /** - * serialVersionUID - */ - private static final long serialVersionUID = 3687815080511141944L; - - /** - * @see javax.servlet.http.HttpServlet#service(javax.servlet.http.HttpServletRequest, - * javax.servlet.http.HttpServletResponse) - * @inheritDoc - */ - public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException { - try { - MediaSampleSessionLocal session = getSession(request); - - // Query the media entity EJB instance. - String identity = request.getParameter("identity"); - MediaEntityLocal mediaEntity = session.getMediaFromPrimaryKey(identity); - - if (!(mediaEntity.getFormat() instanceof VideoMediaFormat)) { - throw new MediaSampleException("The selected media must be an Video format."); - } - - // Create a copy - MediaEntityLocal media = session.copyMediaEntity(mediaEntity); - media.setDescription("Mpeg TS conversion using ffmpeg of : " + mediaEntity.getName()); - - // Convert the Video to MPEG TS with FFMPEG - Class converterSpecClass = getClass().getClassLoader().loadClass( - "org.objectweb.jonas.emb.mfb.plugins.video.ffmpeg.converter.VideoToMpegTSConverterSpec"); - MediaConverterSpec converterSpec = (MediaConverterSpec) converterSpecClass.newInstance(); - MediaConverterSpec[] specs = new MediaConverterSpec[] {converterSpec}; - media.convert(specs); - - identity = (String) media.getPrimaryKey(); - - // forward onto the retrieve servlet - request.setAttribute("identity", media.getPrimaryKey()); - this.getServletContext().getRequestDispatcher(RETRIEVE_SERVLET).forward(request, response); - - } catch (Throwable e) { - exceptionHandler(e, getClass(), request, response); - } - } - -} diff --git a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ExtractHeaderData.java b/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ExtractHeaderData.java deleted file mode 100644 index abb1d7b272a112ca9f14b0a6d1ce6dbc37b24040..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ExtractHeaderData.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Brice Ruzand - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package emb.sample.servlet; - -import java.io.IOException; - -import javax.emb.MediaEntityLocal; -import javax.emb.MediaHeader; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import emb.sample.session.MediaSampleSessionLocal; - -/** - * @author Brice Ruzand - */ -public class ExtractHeaderData extends BaseSampleServlet { - - /** - * serialVersionUID - */ - private static final long serialVersionUID = 3544675070548261174L; - - /** - * @see javax.servlet.http.HttpServlet#service(javax.servlet.http.HttpServletRequest, - * javax.servlet.http.HttpServletResponse) - * @inheritDoc - */ - public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - try { - MediaSampleSessionLocal session = getSession(request); - - // Query the media entity EJB instance. - String identity = request.getParameter("identity"); - MediaEntityLocal mediaEntity = session.getMediaFromPrimaryKey(identity); - - MediaHeader header = mediaEntity.getHeader(); - String[] fieldNames = header.getFieldNames(); - - StringPrinter newMenuBox = new StringPrinter(); - StringPrinter workspaceContent = new StringPrinter(); - - newMenuBox.println("
    \r\n" + "

    Media

    \r\n"); - // add info - displayInfo(newMenuBox, mediaEntity); - - workspaceContent.println("

    Header information for Media: " + mediaEntity.getName() + "

    \n"); - workspaceContent.println(""); - workspaceContent.println(""); - workspaceContent.println(""); - - if (fieldNames.length == 0) { - workspaceContent - .println("\n"); - } else { - - for (int index = 0; index < fieldNames.length; index++) { - String fieldName = fieldNames[index]; - String fieldContent = "null"; - if (header.getField(fieldNames[index]) != null) { - header.getField(fieldNames[index]).toString(); - } - workspaceContent.println("\n"); - } - } - workspaceContent.println(""); - workspaceContent.println("
    Header tag nameValue
    There is no specific header for this media
    "); - workspaceContent.println(fieldName); - workspaceContent.println(""); - workspaceContent.println(fieldContent); - workspaceContent.println("
    \n"); - - newMenuBox.println("
    "); - - request.setAttribute("newMenuBox", newMenuBox); - request.setAttribute("workspaceContent", workspaceContent); - getServletConfig().getServletContext().getRequestDispatcher(TEMPLATE_JSP).forward(request, - response); - - } catch (Throwable e) { - exceptionHandler(e, getClass(), request, response); - } - } - -} diff --git a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/HomeSample.java b/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/HomeSample.java deleted file mode 100644 index 872386088751aad07c4270bf08cbbd6231536691..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/HomeSample.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Brice Ruzand - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package emb.sample.servlet; - -import java.io.IOException; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import emb.sample.MediaSampleException; - -/** - * The Home of emb Sample - * - * @author Brice Ruzand - */ -public class HomeSample extends BaseSampleServlet { - - /** - * serialVersionUID - */ - private static final long serialVersionUID = -4450606249375127461L; - - /** - * @see javax.servlet.http.HttpServlet#service(javax.servlet.http.HttpServletRequest, - * javax.servlet.http.HttpServletResponse) - * @inheritDoc - */ - public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - try { - - try { - // init session - getSession(request); - } catch (MediaSampleException e) { - getSession(request); - } - - StringPrinter workspaceContent = new StringPrinter(); - - workspaceContent.println("

    Welcome to JOnAS Enterprise Media Beans Sample application

    "); - workspaceContent - .println("

    This application provide a small sample of Enterprise Media Beans use with JOnAS.

    "); - workspaceContent - .println("

    First you have to load media sample : Load

    "); - workspaceContent - .println("

    Then view the media list and work with it : Media list

    "); - workspaceContent - .println("

    Add your own media : Upload

    "); - - request.setAttribute("workspaceContent", workspaceContent); - getServletConfig().getServletContext().getRequestDispatcher(TEMPLATE_JSP).forward(request, - response); - - } catch (Throwable e) { - exceptionHandler(e, getClass(), request, response); - } - } - -} diff --git a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/HttpSessionMgr.java b/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/HttpSessionMgr.java deleted file mode 100644 index 999ccf454d7a2bed8d08ac51ab2e415afde9eb16..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/HttpSessionMgr.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Brice Ruzand - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package emb.sample.servlet; - -import javax.ejb.RemoveException; -import javax.servlet.http.HttpSessionEvent; -import javax.servlet.http.HttpSessionListener; - -import emb.sample.session.MediaSampleSessionLocal; - -/** - * The session manager to destroy used media - */ -public class HttpSessionMgr implements HttpSessionListener { - - /** - * @see javax.servlet.http.HttpSessionListener#sessionCreated(javax.servlet.http.HttpSessionEvent) - * @inheritDoc - */ - public void sessionCreated(HttpSessionEvent se) { - // do nothing - } - - /** - * Remove all media created during this session - * - * @see javax.servlet.http.HttpSessionListener#sessionDestroyed(javax.servlet.http.HttpSessionEvent) - * @inheritDoc - */ - public void sessionDestroyed(HttpSessionEvent se) { - - // get session bean - MediaSampleSessionLocal sessionBean = (MediaSampleSessionLocal) se.getSession().getAttribute("sessionBean"); - - if (sessionBean != null) { - try { - - // the session bean - sessionBean.remove(); - - } catch (RemoveException e) { - // do nothing - } - se.getSession().setAttribute("sessionBean", null); - } - - } -} diff --git a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ListSampleMedia.java b/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ListSampleMedia.java deleted file mode 100644 index 6109a75160e14c655fa472a40972d6819016c296..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/ListSampleMedia.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Brice Ruzand - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package emb.sample.servlet; - -import java.io.IOException; -import java.net.URL; - -import javax.emb.FormatNotFoundException; -import javax.emb.MediaEntityLocal; -import javax.emb.MediaEntityLocalHome; -import javax.emb.MediaFormatRegistry; -import javax.emb.ProtocolConstraints; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import emb.sample.session.MediaSampleSessionLocal; - -/** - * @version 1.0 - * @author - */ -public class ListSampleMedia extends BaseSampleServlet { - - /** - * serialVersionUID - */ - private static final long serialVersionUID = 3257289140767830576L; - - /** - * @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest, - * javax.servlet.http.HttpServletResponse) - * @inheritDoc - */ - public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - try { - - MediaSampleSessionLocal session = getSession(request); - - MediaEntityLocal[] medias = session.getMediaList(); - - if (medias.length > 0) { - try { - MediaFormatRegistry.SINGLETON.lookup("svg"); - request.setAttribute("drawConversion", Boolean.TRUE); - } catch (FormatNotFoundException e) { - request.setAttribute("drawConversion", Boolean.FALSE); - } - - try { - MediaFormatRegistry.SINGLETON.lookup("ts"); - request.setAttribute("videoConversion", Boolean.TRUE); - } catch (FormatNotFoundException e) { - request.setAttribute("videoConversion", Boolean.FALSE); - } - - String[] proxiesUrl = new String[medias.length]; - for (int i = 0; i < medias.length; i++) { - URL url = null; - try { - url = getMebHome().publishContent(medias[i].getProxy(), - MediaEntityLocalHome.TRANSFER_TYPE_STREAM, new ProtocolConstraints()); - } catch (Throwable e) { - // do nothing - } - - proxiesUrl[i] = ""; - if (url != null) { - proxiesUrl[i] = url.toExternalForm(); - } - } - - request.setAttribute("samplesMedia", medias); - request.setAttribute("proxiesUrl", proxiesUrl); - this.getServletContext().getRequestDispatcher("/jsps/mediaList.jsp").forward(request, response); - - } else { - - StringPrinter workspaceContent = new StringPrinter(); - - // message - workspaceContent.println("

    No Sample Media has been initialized.

    "); - - request.setAttribute("workspaceContent", workspaceContent); - getServletConfig().getServletContext().getRequestDispatcher(TEMPLATE_JSP).forward(request, response); - - } - - } catch (Throwable e) { - exceptionHandler(e, getClass(), request, response); - } - - } -} diff --git a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/LoadSampleMedia.java b/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/LoadSampleMedia.java deleted file mode 100644 index 280840f851091cde4ee0ca5e34b55899d2cab44d..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/LoadSampleMedia.java +++ /dev/null @@ -1,220 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Brice Ruzand - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package emb.sample.servlet; - -import java.io.IOException; -import java.io.InputStream; -import java.io.PrintWriter; -import java.util.Collections; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.Properties; - -import javax.emb.MediaEntityLocal; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import emb.sample.MediaSampleException; -import emb.sample.session.MediaSampleSessionLocal; - -/** - * This servlet is intent to control requests to loading the sample media to the - * database. - */ -public class LoadSampleMedia extends BaseSampleServlet { - - /** - * serialVersionUID - */ - private static final long serialVersionUID = 3256441391566698802L; - - /** - * default dir where sample are stored - */ - private static final String SAMPLES_DIR = "/samples/"; - - /** - * The sample info file - */ - private static final String SAMPLES_PROPERTIES = "samples.properties"; - - /** - * @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest, - * javax.servlet.http.HttpServletResponse) - * @inheritDoc - */ - public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - - response.setContentType("text/html;charset=ISO-8859-1"); - - getServletConfig().getServletContext().getRequestDispatcher("/jsps/header.jsp").include(request, response); - - PrintWriter out = response.getWriter(); - out.println("

    Initializing Sample DataBase

    "); - - // Create Samples in DB - try { - - MediaSampleSessionLocal session = getSession(request); - - // get all MEB stored with the same Partial Desc - if (session.getMediaList().length > 0) { - out.println("

    Samples already loaded... -> removing default Media

    "); - session.removeDefaultMedia(); - out.flush(); - } - - out.println("

    Adding new Samples to the DataBase...

    "); - out.println("
      "); - out.flush(); - - // get the properties stream - InputStream propStream = getServletContext().getResourceAsStream(SAMPLES_DIR + SAMPLES_PROPERTIES); - - if (propStream != null) { - try { - - // new properties - Properties prop = new Properties(); - - // load properties from stream - prop.load(propStream); - - List sortList = new LinkedList(prop.keySet()); - - Collections.sort(sortList); - - for (Iterator i = sortList.iterator(); i.hasNext();) { - - // Get class name and file extension - String sampleNameWSuffix = (String) i.next(); - - if (sampleNameWSuffix.endsWith(".file")) { - String sampleName = getPrefixFileName(sampleNameWSuffix); - - String sampleFile = prop.getProperty(sampleName + ".file"); - String sampleDesc = prop.getProperty(sampleName + ".desc"); - String sampleShowS = prop.getProperty(sampleName + ".show"); - boolean sampleShow = Boolean.valueOf(sampleShowS).booleanValue(); - - byte status = MediaSampleSessionLocal.DONT_SHOW; - if (sampleShow) { - status = MediaSampleSessionLocal.SHOW_IN_LIST; - } - - createNewSample(session, out, sampleFile, sampleDesc, getServletContext() - .getResourceAsStream(SAMPLES_DIR + sampleFile), sampleName, status); - - } - } - - } catch (IOException e) { - // error while loading properties - new MediaSampleException("Unable to load sample properties due to : " + e.getLocalizedMessage(), e); - } - } else { - // error while open properties stream - new MediaSampleException("Unable to load sample properties due to : " + SAMPLES_PROPERTIES - + " has no been found"); - } - - out.println("
    "); - out.println("

    Media loaded.

    "); - - getServletConfig().getServletContext().getRequestDispatcher("/jsps/footer.jsp").include(request, response); - - } catch (Throwable e) { - exceptionHandler(e, getClass(), request, response); - } - - } - - /** - * Create a MEB sample with given param - * - * @param session the session which control medi creation - * @param out out writer - * @param name name of the MEB - * @param description description desc of the MEB - * @param contentStream contentStream content of the EMB - * @param registeredName the name to access to it - * @param status status is ones of {@link MediaSampleSessionLocal#DONT_SHOW}, - * {@link MediaSampleSessionLocal#SHOW_IN_LIST}, - * {@link MediaSampleSessionLocal#USER_ADDED} - * @return the media entity - */ - private MediaEntityLocal createNewSample(MediaSampleSessionLocal session, PrintWriter out, String name, - String description, InputStream contentStream, String registeredName, byte status) { - // Create MEB sample - out.println("
  • "); - MediaEntityLocal meb = null; - try { - - meb = session.createMediaEntity(contentStream, name, description, status, registeredName); - - out.println(name); - - } catch (Throwable e) { - - try { - if (meb != null) { - meb.remove(); - } - } catch (Throwable e1) { - // do nothing - } - - meb = null; - - String err = "Error while creating sample \"" + name + "\" : " + e.getLocalizedMessage(); - out.println("" + err + ""); - // System.err.println("LoadSampleMedia : " + err); - // e.printStackTrace(); - } - out.println("
  • "); - out.flush(); - return meb; - } - - /** - * Get name of a file name without extension - * - * @param name name of the file - * @return file name without extension - */ - public static String getPrefixFileName(String name) { - int lastDotPosition = name.lastIndexOf('.'); - - if (lastDotPosition == -1) { - return name; - } - return name.substring(0, lastDotPosition); - - } -} diff --git a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/RetrieveSampleMedia.java b/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/RetrieveSampleMedia.java deleted file mode 100644 index 8b3b4c6a6d1b88463e72960f270592cd7569e6ba..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/RetrieveSampleMedia.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Brice Ruzand - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package emb.sample.servlet; - -import java.net.URL; - -import javax.emb.MediaEntityLocal; -import javax.emb.MediaEntityLocalHome; -import javax.emb.MediaFormatRegistry; -import javax.emb.ProtocolConstraints; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.objectweb.jonas.emb.mfb.formats.image.ImageMediaFormat; - -import emb.sample.session.MediaSampleSessionLocal; - -/** - * Generate an HTML web page to present the media - * - * @author Brice Ruzand - */ -public class RetrieveSampleMedia extends BaseSampleServlet { - - /** - * serialVersionUID - */ - private static final long serialVersionUID = 3762250859580634161L; - - /** - * @see javax.servlet.http.HttpServlet#service(javax.servlet.http.HttpServletRequest, - * javax.servlet.http.HttpServletResponse) - * @inheritDoc - */ - public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException { - try { - - // Query the media entity EJB instance. - String identity = (String) request.getAttribute("identity"); - if (identity == null) { - identity = request.getParameter("identity"); - } - - MediaSampleSessionLocal session = getSession(request); - - // Query the media entity EJB instance. - MediaEntityLocal mediaEntity = session.getMediaFromPrimaryKey(identity); - - // publish it - URL url = null; - - if (mediaEntity.getFormat().equals(MediaFormatRegistry.SINGLETON.lookup("mp4"))) { - url = getMebHome().publishContent(mediaEntity, MediaEntityLocalHome.TRANSFER_TYPE_STREAM, - new ProtocolConstraints()); - } else { - url = getMebHome().publishContent(mediaEntity, MediaEntityLocalHome.TRANSFER_TYPE_BURST, - new ProtocolConstraints()); - } - - StringPrinter newMenuBox = new StringPrinter(); - StringPrinter workspaceContent = new StringPrinter(); - - newMenuBox.println("
    \r\n" + "

    Media

    \r\n"); - - workspaceContent.println("

    Media content : " + mediaEntity.getName() + "

    "); - - workspaceContent.println(" URL : " + url + "
    "); - - if (mediaEntity.getFormat() instanceof ImageMediaFormat) { - newMenuBox.println("

    Image

    "); - workspaceContent.println("
    \""
    "); - } else { - newMenuBox.println("

    Standard Object

    "); - workspaceContent.println("
    " - + "Unfortunately your browser cannot display this media !!
    "); - } - - // add info in menu - displayInfo(newMenuBox, mediaEntity); - - newMenuBox - .println("If your browser can not display this media, please select the link below for accessing the media.... "); - newMenuBox.println("" + mediaEntity.getName() + ""); - - newMenuBox.println("
    "); - - request.setAttribute("newMenuBox", newMenuBox); - request.setAttribute("workspaceContent", workspaceContent); - getServletConfig().getServletContext().getRequestDispatcher(TEMPLATE_JSP).forward(request, response); - - } catch (Throwable e) { - exceptionHandler(e, getClass(), request, response); - } - } - -} diff --git a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/UploadSampleMedia.java b/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/UploadSampleMedia.java deleted file mode 100644 index 9cdc4ea731230e5667c1f36e2478092c1a8d7e2d..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/servlet/UploadSampleMedia.java +++ /dev/null @@ -1,160 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Brice Ruzand - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package emb.sample.servlet; - -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.util.Iterator; -import java.util.List; - -import javax.emb.GenericMediaFormat; -import javax.emb.MediaEntityLocal; -import javax.emb.MediaFormat; -import javax.emb.MediaFormatRegistry; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.commons.fileupload.DiskFileUpload; -import org.apache.commons.fileupload.FileItem; - -import emb.sample.session.MediaSampleSessionLocal; - -/** - * Generate an HTML web page to present the media - * - * @author Brice Ruzand - */ -public class UploadSampleMedia extends BaseSampleServlet { - - /** - * serialVersionUID - */ - private static final long serialVersionUID = 3762250859580634161L; - - /** - * @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest, - * javax.servlet.http.HttpServletResponse) - * @inheritDoc - */ - public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - try { - - response.setContentType("text/html;charset=ISO-8859-1"); - - StringPrinter fromatSupported = new StringPrinter(); - fromatSupported.println("
      "); - for (Iterator i = MediaFormatRegistry.SINGLETON.getFileExtensions(); i.hasNext();) { - String fileExt = (String) i.next(); - MediaFormat format = MediaFormatRegistry.SINGLETON.lookup(fileExt); - if (!(format == null || format instanceof GenericMediaFormat)) { - fromatSupported.println("
    • " + fileExt + " : " + MediaFormatRegistry.SINGLETON.lookup(fileExt) - + "
    • "); - } - } - fromatSupported.println("
    "); - - request.setAttribute("fromatSupported", fromatSupported); - getServletConfig().getServletContext().getRequestDispatcher("/jsps/uploadForm.jsp").include(request, response); - - } catch (Throwable e) { - exceptionHandler(e, getClass(), request, response); - } - } - - /** - * @see javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest, - * javax.servlet.http.HttpServletResponse) - * @inheritDoc - */ - public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - try { - - String mediaDesc = ""; - String mediaName = ""; - String mediaUrl = ""; - InputStream mediaInputStream = null; - - // Create a new file upload handler - DiskFileUpload upload = new DiskFileUpload(); - - // Parse the request - List /* FileItem */items = upload.parseRequest(request); - - // Process the uploaded items - Iterator iter = items.iterator(); - while (iter.hasNext()) { - FileItem item = (FileItem) iter.next(); - if (item.isFormField()) { - if (item.getFieldName().equals("desc")) { - mediaDesc = item.getString(); - } - if (item.getFieldName().equals("url")) { - mediaUrl = item.getString(); - } - } else { - if (item.getFieldName().equals("file")) { - mediaInputStream = item.getInputStream(); - mediaName = item.getName(); - } - } - } - - MediaSampleSessionLocal session = getSession(request); - - MediaEntityLocal meb = null; - if (mediaUrl != null && mediaUrl.length() > 0) { - // meb = createNewSample(mediaUrl, mediaDesc); - meb = session.createMediaEntity(new URL(mediaUrl), mediaDesc, MediaSampleSessionLocal.USER_ADDED); - } else if (mediaInputStream != null && mediaName != null && mediaName.length() > 0) { - meb = session.createMediaEntity(mediaInputStream, mediaName, mediaDesc, - MediaSampleSessionLocal.USER_ADDED, null); - } - - if (meb != null) { - - // forward onto the retrieve servlet - request.setAttribute("identity", meb.getPrimaryKey()); - this.getServletContext().getRequestDispatcher(RETRIEVE_SERVLET).forward(request, response); - - } else { - - StringPrinter workspaceContent = new StringPrinter(); - workspaceContent.println("

    Missing information to add media

    "); - workspaceContent.println("There were some missing information to add media, please retry."); - request.setAttribute("workspaceContent", workspaceContent); - this.getServletContext().getRequestDispatcher(TEMPLATE_JSP).forward(request, response); - - } - - } catch (Throwable e) { - exceptionHandler(e, getClass(), request, response); - } - } - -} diff --git a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/session/HttpSessionMgr.java b/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/session/HttpSessionMgr.java deleted file mode 100644 index 34e4bb0f90c7068f8b6baf5e574a8abd309df68f..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/session/HttpSessionMgr.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Brice Ruzand - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package emb.sample.session; - -import javax.ejb.RemoveException; -import javax.servlet.http.HttpSessionEvent; -import javax.servlet.http.HttpSessionListener; - -/** - * The session manager to destroy used media - */ -public class HttpSessionMgr implements HttpSessionListener { - - /** - * @see javax.servlet.http.HttpSessionListener#sessionCreated(javax.servlet.http.HttpSessionEvent) - * @inheritDoc - */ - public void sessionCreated(HttpSessionEvent se) { - // do nothing - } - - /** - * Remove all media created during this session - * - * @see javax.servlet.http.HttpSessionListener#sessionDestroyed(javax.servlet.http.HttpSessionEvent) - * @inheritDoc - */ - public void sessionDestroyed(HttpSessionEvent se) { - - // get session bean - MediaSampleSessionLocal sessionBean = (MediaSampleSessionLocal) se.getSession().getAttribute("sessionBean"); - - if (sessionBean != null) { - try { - - // the session bean - sessionBean.remove(); - - } catch (RemoveException e) { - // do nothing - } - se.getSession().setAttribute("sessionBean", null); - } - - } -} diff --git a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/session/MediaSampleSessionBean.java b/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/session/MediaSampleSessionBean.java deleted file mode 100644 index 5e924b6993e87cfb1798a2c6cc873ebd7ca896ad..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/session/MediaSampleSessionBean.java +++ /dev/null @@ -1,586 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Brice Ruzand - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package emb.sample.session; - -import java.io.InputStream; -import java.net.URL; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -import javax.ejb.FinderException; -import javax.ejb.RemoveException; -import javax.ejb.SessionBean; -import javax.ejb.SessionContext; -import javax.emb.Media; -import javax.emb.MediaEntityLocal; -import javax.emb.MediaEntityLocalHome; -import javax.emb.MediaException; -import javax.naming.InitialContext; -import javax.naming.NamingException; - -import emb.sample.MediaSampleException; - -/** - * This is an example of Session Bean, statefull, and synchronized. - * - * @author JOnAS team - */ -public class MediaSampleSessionBean implements SessionBean { - - /** - * serialVersionUID - */ - private static final long serialVersionUID = 2549701184925498878L; - - // ======================================================================= - // Refs - // ======================================================================= - - /** - * Media Enotity Bean Home reference - */ - private static final String MEB_HOME_REF = "java:comp/env/ejb/emb/MediaEntity"; - - /** - * Reference on the env entry isCopyAllowed - */ - public static final String IS_COPY_ALLOWED_REF = "java:comp/env/ejb/embSample/isCopyAllowed"; - - /** - * Reference on the env entry maxMediaPerSession - */ - public static final String MAX_MEDIA_PER_SESSION_REF = "java:comp/env/ejb/embSample/maxMediaPerSession"; - - // ======================================================================= - // Fields - // ======================================================================= - - /** - * cache of the env value - */ - private Boolean isCopyAllowed = null; - - /** - * cache of the env value - */ - private Integer maxMediaPerSession = null; - - /** - * list containing primary key of all generated media, use to remove them - */ - private final List mediaListAllCreated = new LinkedList(); - - /** - * list containing primary key of all media standart media that are beeing - * showed - */ - private final List mediaListStdShow = new LinkedList(); - - /** - * list containing primary key of all that have been upload by user - */ - private final List mediaListUpload = new LinkedList(); - - /** - * Map containing name and primary key of some media - */ - private final Map mediaRegistredName = new HashMap(); - - // ======================================================================= - // Medthods - // ======================================================================= - - /** - * There must be one ejbCreate() method per create() method on the Home - * interface, and with the same signature. - */ - public void ejbCreate() { - - // in case we are outside transactions - } - - /** - * Create a new MediaEntity from a stream - * - * @param contentStream content of the MediaEntity - * @param name name of the MediaEntity - * @param description description of the MediaEntity - * @param status is ones of {@link MediaSampleSessionLocal#DONT_SHOW}, - * {@link MediaSampleSessionLocal#SHOW_IN_LIST}, - * {@link MediaSampleSessionLocal#USER_ADDED} - * @param registeredName name to acces it with - * {@link #getMediaFromRegistredName(String)} - * @return MediaEntity - * @throws MediaSampleException if the mediaEntity cannot be create - */ -public MediaEntityLocal createMediaEntity(InputStream contentStream, String name, String description, byte status, - String registeredName) throws MediaSampleException { - - // check maxmedia - checkMaxMedia(); - - MediaEntityLocal meb = null; - try { - - meb = getMebHome().create(); - meb.setName(name); - - if (!meb.getFormat().isEmbedded()) { - throw new MediaSampleException("A not embedded media have to be imported and not upload in order to import its children too."); - } - - meb.setContent(contentStream); - meb.setDescription(description); - - - - try { - // publish proxy - Media proxy = meb.getProxy(); - getMebHome().publishContent(proxy, MediaEntityLocalHome.TRANSFER_TYPE_BURST, null); - } catch (MediaException e) { - // do nothing - } - - // store the key - addMedia(meb, status); - - if (registeredName != null) { - mediaRegistredName.put(registeredName, meb.getPrimaryKey()); - } - - return meb; - - } catch (Exception e) { - if (meb != null) { - try { - meb.remove(); - } catch (Throwable e1) { - // do nothing - } - } - throw new MediaSampleException("Unable to create Media : " + name + " : " + e, e); - } - } - /** - * Create a new MediaEntity from an URL - * - * @param urlToImport of the media to import - * @param description description of the MediaEntity - * @param status is ones of {@link MediaSampleSessionLocal#DONT_SHOW}, - * {@link MediaSampleSessionLocal#SHOW_IN_LIST}, - * {@link MediaSampleSessionLocal#USER_ADDED} - * @return MediaEntity - * @throws MediaSampleException if the mediaEntity cannot be create - */ - public MediaEntityLocal createMediaEntity(URL urlToImport, String description, byte status) - throws MediaSampleException { - - // check maxmedia - checkMaxMedia(); - - MediaEntityLocal meb = null; - try { - - MediaEntityLocal[] mebs = getMebHome().importMedia(new URL[] {urlToImport}, null); - - if (mebs.length > 0 && mebs[0] != null) { - - meb = mebs[0]; - meb.setDescription(description); - - try { - // publish proxy - Media proxy = meb.getProxy(); - getMebHome().publishContent(proxy, MediaEntityLocalHome.TRANSFER_TYPE_BURST, null); - } catch (MediaException e) { - // do nothing - } - - // store the key - addMedia(meb, status); - - return meb; - } - throw new MediaSampleException("Unable to import the media"); - } catch (Exception e) { - if (meb != null) { - // totdo use super remover - try { - meb.remove(); - } catch (Throwable e1) { - // do nothing - } - } - throw new MediaSampleException("Unable to import Media : " + urlToImport + " : " + e, e); - } - } - - /** - * Create a new MediaEntity from a Media - * - * @param media to copy - * @return MediaEntity - * @throws MediaSampleException if the mediaEntity cannot be create - */ - public MediaEntityLocal copyMediaEntity(Media media) throws MediaSampleException { - - if (!getCopyAllowed() && media instanceof MediaEntityLocal) { - return (MediaEntityLocal) media; - } - - // check maxmedia - checkMaxMedia(); - - try { - - MediaEntityLocal meb = getMebHome().create(); - - // store the key - addMedia(meb, MediaSampleSessionLocal.DONT_SHOW); - - meb.setName(media.getName()); - meb.setContent(media.getContent()); - meb.setMimeType(media.getMimeType()); - meb.setChildren(meb.getChildren()); - - return meb; - - } catch (Exception e) { - throw new MediaSampleException("Unable to copy Media", e); - } - } - - /** - * Get media list (only status {@link MediaSampleSessionLocal#SHOW_IN_LIST}, - * {@link MediaSampleSessionLocal#USER_ADDED} - * - * @return MediaEntity array - * @throws MediaSampleException if media cannot be retrive - */ - - public MediaEntityLocal[] getMediaList() throws MediaSampleException { - - try { - List mebs = new ArrayList(mediaListUpload.size() + mediaListStdShow.size()); - for (Iterator i = mediaListUpload.iterator(); i.hasNext();) { - String primaryKey = (String) i.next(); - try { - MediaEntityLocal meb = getMebHome().findByPrimaryKey(primaryKey); - mebs.add(meb); - } catch (FinderException e) { - // do nothing - } - } - for (Iterator i = mediaListStdShow.iterator(); i.hasNext();) { - String primaryKey = (String) i.next(); - try { - MediaEntityLocal meb = getMebHome().findByPrimaryKey(primaryKey); - mebs.add(meb); - } catch (FinderException e) { - // do nothing - } - } - - return (MediaEntityLocal[]) mebs.toArray(new MediaEntityLocal[mebs.size()]); - - } catch (NamingException e) { - throw new MediaSampleException("Unable to get MediaList due to " + e, e); - } - - } - - /** - * Get media from its premary key - * - * @param primaryKey the primary key of the wanted media - * @return MediaEntity - * @throws MediaSampleException if the mediaEntity cannot be retrive - */ - public MediaEntityLocal getMediaFromPrimaryKey(String primaryKey) throws MediaSampleException { - try { - MediaEntityLocal meb = getMebHome().findByPrimaryKey(primaryKey); - return meb; - } catch (FinderException e) { - throw new MediaSampleException("Media with this primary key does not exist : " + primaryKey, e); - } catch (NamingException e) { - throw new MediaSampleException("Unable to get Media due to " + e, e); - } - } - - /** - * Get media from registered name - * - * @param registeredName the registeredName of the wanted media - * @return MediaEntity - * @throws MediaSampleException if the mediaEntity cannot be retrive - */ - public MediaEntityLocal getMediaFromRegistredName(String registeredName) throws MediaSampleException { - - String primaryKey = (String) mediaRegistredName.get(registeredName); - if (primaryKey != null) { - return getMediaFromPrimaryKey(primaryKey); - } - throw new MediaSampleException("unable to find Media with registered name : " + registeredName); - - } - - /** - * Remove default media to reinit the database, except uploaded media - */ - public void removeDefaultMedia() { - - // copy the primary list - String[] primaryKeyToRemove = (String[]) mediaListAllCreated.toArray(new String[mediaListAllCreated.size()]); - - // remove al creating media during this session - for (int i = 0; i < primaryKeyToRemove.length; i++) { - - if (!mediaListUpload.contains(primaryKeyToRemove[i])) { - - try { - MediaEntityLocal meb = getMediaFromPrimaryKey(primaryKeyToRemove[i]); - removeMedia(meb); - } catch (MediaSampleException e) { - // do nothing - } - } - } - } - - // ======================================================================= - // Internals - // ======================================================================= - - /** - * Add meb to the right list - * - * @param meb the media to add - * @param status where the medi is added, is ones of {@link #DONT_SHOW}, - * {@link #SHOW_IN_LIST}, {@link #USER_ADDED} - */ - private synchronized void addMedia(MediaEntityLocal meb, byte status) { - - mediaListAllCreated.add(meb.getPrimaryKey()); - if (status == MediaSampleSessionLocal.SHOW_IN_LIST) { - mediaListStdShow.add(meb.getPrimaryKey()); - } else if (status == MediaSampleSessionLocal.USER_ADDED) { - mediaListUpload.add(meb.getPrimaryKey()); - } - - } - - /** - * Remove media from all media list - * - * @param meb the media to add - */ - private synchronized void removeMedia(MediaEntityLocal meb) { - - recusiveRemoveMedia(meb); - - mediaListAllCreated.remove(meb.getPrimaryKey()); - mediaListStdShow.remove(meb.getPrimaryKey()); - mediaListUpload.remove(meb.getPrimaryKey()); - - } - - /** - * Remove recurcively all preview version and children - * - * @param meb the media entity bean - */ - private void recusiveRemoveMedia(MediaEntityLocal meb) { - if (meb != null) { - - // recurcive call for children - - MediaEntityLocal[] children = meb.getChildren(); - for (int i = 0; i < children.length; i++) { - recusiveRemoveMedia(children[i]); - } - - // recurcive call for preview version - recusiveRemoveMedia(meb.getPreviousVersion()); - - try { - meb.remove(); - } catch (RemoveException e) { - // do nothing - } - } - } - - /** - * Get the iscopy allow - * - * @return if copy is allow - */ - private boolean getCopyAllowed() { - - Boolean cache = isCopyAllowed; - - if (cache == null) { - try { - cache = (Boolean) (new InitialContext()).lookup(IS_COPY_ALLOWED_REF); - isCopyAllowed = cache; - - } catch (NamingException e) { - return true; - } - } - return cache.booleanValue(); - } - - /** - * Get MaxMediaPerSession - * - * @return maxmedia per session - */ - private int getMaxMediaPerSession() { - - Integer cache = maxMediaPerSession; - - if (cache == null) { - try { - cache = (Integer) (new InitialContext()).lookup(MAX_MEDIA_PER_SESSION_REF); - maxMediaPerSession = cache; - - } catch (NamingException e) { - return 0; - } - } - return cache.intValue(); - } - - /** - * test if MaxMediaPerSession has been reach - * - * @throws MediaSampleException if MaxMediaPerSession has been reach - */ - private void checkMaxMedia() throws MediaSampleException { - - if (!(getMaxMediaPerSession() == 0)) { - if (mediaListAllCreated.size() >= getMaxMediaPerSession() - 1) { - throw new MediaSampleException( - "You have reach the maximum number per session. You cannot create more media."); - } - } - - } - - // ======================================================================= - // TOOLS - // ======================================================================= - - /** - * cached Home - */ - private MediaEntityLocalHome mebHome = null; - - /** - * Provide a cached Home access - * - * @return MediaEntityLocalHome - * @throws NamingException in case MediaEntityLocalHome is not found - */ - private MediaEntityLocalHome getMebHome() throws NamingException { - if (mebHome == null) { - mebHome = (MediaEntityLocalHome) new InitialContext().lookup(MEB_HOME_REF); - } - return mebHome; - } - - // ======================================================================= - // EJB contract - // ======================================================================= - - /** - * Session Context - */ - private SessionContext mySessionCtx; - - /** - * getSessionContext - * - * @return SessionContext - */ - public SessionContext getSessionContext() { - return mySessionCtx; - } - - /** - * @see javax.ejb.SessionBean#setSessionContext(javax.ejb.SessionContext) - * @inheritDoc - */ - public void setSessionContext(SessionContext ctx) { - mySessionCtx = ctx; - } - - /** - * @see javax.ejb.SessionBean#ejbActivate() - * @inheritDoc - */ - public void ejbActivate() { - // do nothing - } - - /** - * @see javax.ejb.SessionBean#ejbPassivate() - * @inheritDoc - */ - public void ejbPassivate() { - // do nothing - } - - /** - * @see javax.ejb.SessionBean#ejbRemove() - * @inheritDoc - */ - public void ejbRemove() { - - // copy the primary list - String[] primaryKeyToRemove = (String[]) mediaListAllCreated.toArray(new String[mediaListAllCreated.size()]); - - // remove al creating media during this session - for (int i = 0; i < primaryKeyToRemove.length; i++) { - try { - MediaEntityLocal meb = getMediaFromPrimaryKey(primaryKeyToRemove[i]); - removeMedia(meb); - } catch (MediaSampleException e) { - // do nothing - } - } - - } - -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/session/MediaSampleSessionLocal.java b/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/session/MediaSampleSessionLocal.java deleted file mode 100644 index 3c6b96ee08f0479b891022fcfea6ed6ee5c0c2a3..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/session/MediaSampleSessionLocal.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): ____________________________________. - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package emb.sample.session; - -import java.io.InputStream; -import java.net.URL; - -import javax.ejb.EJBLocalObject; -import javax.emb.Media; -import javax.emb.MediaEntityLocal; - -import emb.sample.MediaSampleException; - -/** - * Local interface for the bean MediaSampleSessionLocal - */ -public interface MediaSampleSessionLocal extends EJBLocalObject { - - /** - * Set if the media has to be show in media list - */ - byte SHOW_IN_LIST = 0; - - /** - * Set if the media has to be show in media list and if the media has been - * upload - */ - byte USER_ADDED = 1; - - /** - * Set if the media is not showed is media list - */ - byte DONT_SHOW = -1; - - /** - * Create a new MediaEntity from a stream - * - * @param contentStream content of the MediaEntity - * @param name name of the MediaEntity - * @param description description of the MediaEntity - * @param status is ones of {@link MediaSampleSessionLocal#DONT_SHOW}, - * {@link MediaSampleSessionLocal#SHOW_IN_LIST}, - * {@link MediaSampleSessionLocal#USER_ADDED} - * @param registeredName name to acces it with - * {@link #getMediaFromRegistredName(String)} - * @return MediaEntity - * @throws MediaSampleException if the mediaEntity cannot be create - */ - MediaEntityLocal createMediaEntity(InputStream contentStream, String name, String description, byte status, - String registeredName) throws MediaSampleException; - - /** - * Create a new MediaEntity from an URL - * - * @param urlToImport of the media to import - * @param description description of the MediaEntity - * @param status is ones of {@link MediaSampleSessionLocal#DONT_SHOW}, - * {@link MediaSampleSessionLocal#SHOW_IN_LIST}, - * {@link MediaSampleSessionLocal#USER_ADDED} - * @return MediaEntity - * @throws MediaSampleException if the mediaEntity cannot be create - */ - MediaEntityLocal createMediaEntity(URL urlToImport, String description, byte status) throws MediaSampleException; - - /** - * Create a new MediaEntity from a Media - * - * @param media to copy - * @return MediaEntity - * @throws MediaSampleException if the mediaEntity cannot be create - */ - MediaEntityLocal copyMediaEntity(Media media) throws MediaSampleException; - - /** - * Get media list (only status {@link MediaSampleSessionLocal#SHOW_IN_LIST}, - * {@link MediaSampleSessionLocal#USER_ADDED} - * - * @return MediaEntity array - * @throws MediaSampleException if media cannot be retrive - */ - - MediaEntityLocal[] getMediaList() throws MediaSampleException; - - /** - * Get media from its premary key - * - * @param primaryKey the primary key of the wanted media - * @return MediaEntity - * @throws MediaSampleException if the mediaEntity cannot be retrive - */ - MediaEntityLocal getMediaFromPrimaryKey(String primaryKey) throws MediaSampleException; - - /** - * Get media from registered name - * - * @param registeredName the registeredName of the wanted media - * @return MediaEntity - * @throws MediaSampleException if the mediaEntity cannot be retrive - */ - MediaEntityLocal getMediaFromRegistredName(String registeredName) throws MediaSampleException; - - /** - * Remove default media to reinit the database, except uploaded media - */ - void removeDefaultMedia(); -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/session/MediaSampleSessionLocalHome.java b/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/session/MediaSampleSessionLocalHome.java deleted file mode 100644 index 009ccd0369f12864448248b7a8919ff1a2d696af..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/emb-sample/src/emb/sample/session/MediaSampleSessionLocalHome.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Brice Ruzand - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package emb.sample.session; - -import javax.ejb.CreateException; -import javax.ejb.EJBLocalHome; - -/** - * Home interface for the bean MediaSampleSessionLocal - * - * @author Brice Ruzand - */ -public interface MediaSampleSessionLocalHome extends EJBLocalHome { - - /** - * Create an instance of the MediaSampleSessionLocal bean. - * - * @return the Remote interface of the bean MediaSampleSessionLocal. - * @throws CreateException if the creation failed. - */ - MediaSampleSessionLocal create() throws CreateException; - -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/fdf/MyJOnASCluster.fdf b/jonas_tests/examples/base/examples/fdf/MyJOnASCluster.fdf deleted file mode 100644 index 4f53276828256d9bdc2b4e70c5469dc77dd6b38f..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/fdf/MyJOnASCluster.fdf +++ /dev/null @@ -1,103 +0,0 @@ -/* ==================================================================== - * - * ObjectWeb Fractal Deployment Framework - * Copyright (C) 2006-2007 INRIA - ADAM/Jacquard Team - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Contact: fdf-users@lists.gforge.inria.fr - * - * Author: Nicolas Dolet - * - * Contributors: - * - * ==================================================================== - * $Id$ - * ==================================================================== - */ - - - /** - * This is a FDF description with 1 machine (host-1) - * and several JOnAS instances : - * - * - 1 Jonas Root - * - 2 Jonas Base - * - 1 Cluster Daemon - * - * This description is loadable with FDF explorer - * - * If you want to deploy a software (e.g. base-2) in text mode, - * replace - * - * MyJOnASCluster { - * - * by - * - * MyJOnASCluster = FDF.RUNNABLE(jonas-instances/base-2) { - * - */ - -MyJOnASCluster { - - Hosts = INTERNET.NETWORK { - - host-1 = INTERNET.HOST { - hostname = INTERNET.HOSTNAME(localhost); - user = INTERNET.USER(dolet,,/home/dolet/.ssh/id_rsa); - transfer = TRANSFER.SCP; - protocol = PROTOCOL.OpenSSH; - shell = SHELL.SH; - software { - java = JAVA.JRE { - archive = JAVA.ARCHIVE(Archive_File_URI); - home = JAVA.HOME(Java_Home_Directory_URI); - } - } - } - - } - - - jonas-instances { - - # In this example, the JOnAS Root software is already installed - root = JOnAS.JONAS_ROOT, software.AlreadyInstalled(jonasroot,JOnAS_ROOT) { - root = JOnAS.ROOT(Path_to_JONAS_ROOT_directory); - host = Hosts/host-1; - } - - cd = JOnAS.CLUSTER_DAEMON { - archive = JOnAS.ARCHIVE(Archive_File_URI); - jonasroot = /jonas-instances/root; - base = JOnAS.BASE(Path_to_JONAS_BASE_directory); - } - - base-1 = JOnAS.JONAS_BASE { - archive = JOnAS.ARCHIVE(Archive_File_URI); - jonasroot = /jonas-instances/root; - base = JOnAS.BASE(Path_to_JONAS_BASE_directory); - } - - base-2 = JOnAS.JONAS_BASE { - archive = JOnAS.ARCHIVE(Archive_File_URI); - jonasroot = /jonas-instances/root; - base = JOnAS.BASE(Path_to_JONAS_BASE_directory); - } - - } - -} diff --git a/jonas_tests/examples/base/examples/hibernate/README b/jonas_tests/examples/base/examples/hibernate/README deleted file mode 100644 index fcff212dab8b76a1ed17c9cb2c5302cb1e4f7f5d..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/hibernate/README +++ /dev/null @@ -1,93 +0,0 @@ -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 2005 Bull S.A. -# Contact: jonas-team@objectweb.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -Example Overview -================ -This example is the one provided with Hibernate documentation : -http://www.hibernate.org/hib_docs/reference/en/html_single/ - -The JOnAS hibernate war has been made by Stéphane TRAUMAT -for the Sourcebeat book : JOnAS Live -( http://www.sourcebeat.com/TitleAction.do?id=9 ) - -The ant script provided will create the needed table, package -the application in a .war file and deploy it to $JONAS_BASE/webapps. - -Directories structure -===================== -There is three directories : - -- src : Contains the servlet and the Cat class. - -- etc : Contains all non-java resources -- etc/resources : Hibernate configuration files -- etc/sql : HSQL init/reset scripts -- etc/xml : Deployment descriptors - -- lib : Contains all the needed librairies for Hibernate. - They will be added in the war. - -Building and running this example -===================== -Take care to change the hsql.port properties (in build.properties) -if you do not use default one (9001) - -To make the CAT example works, the first thing is to create -a table CAT to store the data in the HSQLDB engine included -with JOnAS. - -note : The SQL to create the needed table will be executed -by the ant script. - -1) To start the database, we need to run JOnAS using the -"jonas start" command. - -2) Init the HSQL Database, type "ant initdb". - -3) Then, under the hibernate sample directory, type: "ant". - That will compile, package the webapp and place it - under $JONAS_BASE/webapps. - -4) And, to deploy the war on JOnAS, just type: -"jonas admin -a hibernate-sample.war" -You should see a message looking like : -2004-11-19 12:29:37,405 : AbsJWebContainerServiceImpl.registerWar : -War /C:/java/plateforme/JONAS/webapps/hibernate-sample.war available -at the context /hibernate-sample on the host . - -5) Connect to http://localhost:9000/hibernate-sample/testHibernate/ - -Connecting to HSQLdb -===================== -1) type "ant dbmanager" -Press enter and you should be able to see the CAT table. - -Notes -===================== -To develop this sample, we used -- JOnAS 4.4.2 -- Hibernate 3.0.5 -Because of some conflicts, we had to replace cglib-2.1.jar -with cglib-nodep-2.1_2.jar which is the same library without -the dependencies on ASM. \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/hibernate/build.properties b/jonas_tests/examples/base/examples/hibernate/build.properties deleted file mode 100644 index 7774106d5c29eccea04159bd50863c4a83a4ee3b..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/hibernate/build.properties +++ /dev/null @@ -1,28 +0,0 @@ -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 2005 Bull S.A. -# Contact: jonas-team@objectweb.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -# default HSQL port is 9001 -hsql.port 9001 -# Default Server name -jonas.server.name jonas \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/hibernate/build.xml b/jonas_tests/examples/base/examples/hibernate/build.xml deleted file mode 100644 index 640d046c99c8b30c796f5109dbf67a18d363fe54..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/hibernate/build.xml +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +---------------------------------------------------------------------+ - | init | - +---------------------------------------------------------------------+ - - - - - - - - - - - - - - - - - +---------------------------------------------------------------------+ - | clean | - +---------------------------------------------------------------------+ - - - - - - - +---------------------------------------------------------------------+ - | resetdb | - +---------------------------------------------------------------------+ - - - - - - +---------------------------------------------------------------------+ - | initdb | - +---------------------------------------------------------------------+ - - - - - - - +---------------------------------------------------------------------+ - | Starting HSQL DataBase Manager | - +---------------------------------------------------------------------+ - - - - - - - - - - - - +---------------------------------------------------------------------+ - | compile - compile the servlet | - +---------------------------------------------------------------------+ - - - - - - - - +---------------------------------------------------------------------+ - | war - package the servlet and the .xml files | - +---------------------------------------------------------------------+ - - - - - - - - - - - - - - - - - - - - +---------------------------------------------------------------------+ - | install - copy the war to JOnAS | - +---------------------------------------------------------------------+ - - - - - - ${hib.webapp.name} has been copied to ${jonas.base}/webapps. - - - - - +---------------------------------------------------------------------+ - | deploy - Deploy the war into a running JOnAS instance | - +---------------------------------------------------------------------+ - - - - - - \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/hibernate/etc/resources/Cat.hbm.xml b/jonas_tests/examples/base/examples/hibernate/etc/resources/Cat.hbm.xml deleted file mode 100644 index 5fad20831ab0d17ccfd19636701266be56f6b985..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/hibernate/etc/resources/Cat.hbm.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/hibernate/etc/resources/hibernate.cfg.xml b/jonas_tests/examples/base/examples/hibernate/etc/resources/hibernate.cfg.xml deleted file mode 100644 index 4fe40a4c1b57296092c2bd2d8d9aeeed98de08ed..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/hibernate/etc/resources/hibernate.cfg.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - java:comp/env/jdbc/jdbc_1 - false - org.hibernate.dialect.HSQLDialect - create - - - - - - - \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/hibernate/etc/sql/initdb.sql b/jonas_tests/examples/base/examples/hibernate/etc/sql/initdb.sql deleted file mode 100644 index e8766fea1f98e0c677e1b46fdb796ccc3592237b..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/hibernate/etc/sql/initdb.sql +++ /dev/null @@ -1,8 +0,0 @@ -create table CAT ( - - cat_id VARCHAR(32) NOT NULL, - name VARCHAR(255), - sex VARCHAR(1), - weight REAL, - PRIMARY KEY(cat_id) -); diff --git a/jonas_tests/examples/base/examples/hibernate/etc/sql/resetdb.sql b/jonas_tests/examples/base/examples/hibernate/etc/sql/resetdb.sql deleted file mode 100644 index 19c86a77f599c90400682c1f123ee40bf3e85c71..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/hibernate/etc/sql/resetdb.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE CAT IF EXISTS; \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/hibernate/etc/xml/jonas-web.xml b/jonas_tests/examples/base/examples/hibernate/etc/xml/jonas-web.xml deleted file mode 100644 index f7274e1cd0122fbbf9f8d0767852ad7a0581b5b9..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/hibernate/etc/xml/jonas-web.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - jdbc/jdbc_1 - jdbc_1 - - \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/hibernate/etc/xml/web.xml b/jonas_tests/examples/base/examples/hibernate/etc/xml/web.xml deleted file mode 100644 index c0483a48163f8f48b338ebeb98898b661ae3fc08..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/hibernate/etc/xml/web.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - HibernateServlet - Hibernate test servlet - - org.hibernate.examples.quickstart.TestServlet - - 1 - - - - HibernateServlet - /testHibernate/* - - - - - jdbc/jdbc_1 - javax.sql.DataSource - Container - - - \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/hibernate/lib/antlr-2.7.6rc1.jar b/jonas_tests/examples/base/examples/hibernate/lib/antlr-2.7.6rc1.jar deleted file mode 100644 index f83e3107fe3e0aec002a088553f7d00e81455939..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/hibernate/lib/antlr-2.7.6rc1.jar and /dev/null differ diff --git a/jonas_tests/examples/base/examples/hibernate/lib/c3p0-0.9.0.jar b/jonas_tests/examples/base/examples/hibernate/lib/c3p0-0.9.0.jar deleted file mode 100644 index a99c36d65f585e21a40e04f73b21db5179c87f68..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/hibernate/lib/c3p0-0.9.0.jar and /dev/null differ diff --git a/jonas_tests/examples/base/examples/hibernate/lib/cglib-2.1.3.jar b/jonas_tests/examples/base/examples/hibernate/lib/cglib-2.1.3.jar deleted file mode 100644 index ddfbdb05a46b9fdaaebe4e691d49891706ab8043..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/hibernate/lib/cglib-2.1.3.jar and /dev/null differ diff --git a/jonas_tests/examples/base/examples/hibernate/lib/cglib-nodep-2.1_3.jar b/jonas_tests/examples/base/examples/hibernate/lib/cglib-nodep-2.1_3.jar deleted file mode 100644 index e9b17ebf129b316be9dd5aba4e5dfeb23e96b2ad..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/hibernate/lib/cglib-nodep-2.1_3.jar and /dev/null differ diff --git a/jonas_tests/examples/base/examples/hibernate/lib/dom4j-1.6.1.jar b/jonas_tests/examples/base/examples/hibernate/lib/dom4j-1.6.1.jar deleted file mode 100644 index c8c4dbb92d6c23a7fbb2813eb721eb4cce91750c..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/hibernate/lib/dom4j-1.6.1.jar and /dev/null differ diff --git a/jonas_tests/examples/base/examples/hibernate/lib/ehcache-1.1.jar b/jonas_tests/examples/base/examples/hibernate/lib/ehcache-1.1.jar deleted file mode 100644 index 2bda9162a36f0f244132dcb878cc4d0b38c42c95..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/hibernate/lib/ehcache-1.1.jar and /dev/null differ diff --git a/jonas_tests/examples/base/examples/hibernate/lib/hibernate-3.1.2.jar b/jonas_tests/examples/base/examples/hibernate/lib/hibernate-3.1.2.jar deleted file mode 100644 index c0d963f9d2060d3b1433df670bfec6fb79055571..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/hibernate/lib/hibernate-3.1.2.jar and /dev/null differ diff --git a/jonas_tests/examples/base/examples/hibernate/lib/jaxen-1.1-beta-7.jar b/jonas_tests/examples/base/examples/hibernate/lib/jaxen-1.1-beta-7.jar deleted file mode 100644 index c773f8566a4d76a39a4ba6c36caefb7a59842d8a..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/hibernate/lib/jaxen-1.1-beta-7.jar and /dev/null differ diff --git a/jonas_tests/examples/base/examples/hibernate/lib/oscache-2.1.jar b/jonas_tests/examples/base/examples/hibernate/lib/oscache-2.1.jar deleted file mode 100644 index 4496a88a66062555d870161035365421d7432e5e..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/hibernate/lib/oscache-2.1.jar and /dev/null differ diff --git a/jonas_tests/examples/base/examples/hibernate/lib/proxool-0.8.3.jar b/jonas_tests/examples/base/examples/hibernate/lib/proxool-0.8.3.jar deleted file mode 100644 index c4f700cf7c5080695dd824fe63226d9e4e854635..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/hibernate/lib/proxool-0.8.3.jar and /dev/null differ diff --git a/jonas_tests/examples/base/examples/hibernate/lib/swarmcache-1.0rc2.jar b/jonas_tests/examples/base/examples/hibernate/lib/swarmcache-1.0rc2.jar deleted file mode 100644 index f0cb0d0569fbd273b2d00c6adb24725b24847921..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/hibernate/lib/swarmcache-1.0rc2.jar and /dev/null differ diff --git a/jonas_tests/examples/base/examples/hibernate/lib/versioncheck.jar b/jonas_tests/examples/base/examples/hibernate/lib/versioncheck.jar deleted file mode 100644 index bf9e33e0eb2239dce189a2b7846642b802e9f4f2..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/hibernate/lib/versioncheck.jar and /dev/null differ diff --git a/jonas_tests/examples/base/examples/hibernate/src/org/hibernate/examples/quickstart/Cat.java b/jonas_tests/examples/base/examples/hibernate/src/org/hibernate/examples/quickstart/Cat.java deleted file mode 100644 index ff82ce98c3d166ce96652bff56bd6371f5b3b745..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/hibernate/src/org/hibernate/examples/quickstart/Cat.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.hibernate.examples.quickstart; - -public class Cat { - private String id; - private String name; - private char sex; - private float weight; - - public Cat() { - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public char getSex() { - return sex; - } - - public void setSex(char sex) { - this.sex = sex; - } - - public float getWeight() { - return weight; - } - - public void setWeight(float weight) { - this.weight = weight; - } -} diff --git a/jonas_tests/examples/base/examples/hibernate/src/org/hibernate/examples/quickstart/TestServlet.java b/jonas_tests/examples/base/examples/hibernate/src/org/hibernate/examples/quickstart/TestServlet.java deleted file mode 100644 index 8e612858c9e62ae9adeb3b59140428f1e439dd36..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/hibernate/src/org/hibernate/examples/quickstart/TestServlet.java +++ /dev/null @@ -1,165 +0,0 @@ -package org.hibernate.examples.quickstart; - -import java.io.IOException; -import java.io.PrintWriter; -import java.util.Iterator; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.hibernate.HibernateException; -import org.hibernate.Query; -import org.hibernate.Session; -import org.hibernate.SessionFactory; -import org.hibernate.Transaction; -import org.hibernate.cfg.Configuration; - -/** - * Simple Servlet used to show how using Hibernate from a Servlet - */ -public class TestServlet extends HttpServlet { - - /** - * Hibernate SessionFactory instance - */ - private SessionFactory sessionFactory; - - /** - * Hibernate Session instance - */ - private Session session; - - /** - * Hibernate Transaction - */ - private Transaction transaction; - - /** - * execute GET action - */ - public void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - try { - // Initialize Hibernate (Configuration and SessionFactory) - initHibernate(); - - // Prepare out - response.setContentType("text/html"); - - PrintWriter out = response.getWriter(); - - // Create some Cats - beginTransaction(); - createCats(out); - endTransaction(true); - - // Select all Cats - beginTransaction(); - selectAllCats(out); - endTransaction(false); - - // Select female Cats - beginTransaction(); - selectFemaleCats(out); - endTransaction(false); - - // print "Servlet OK" at the end (everything went OK) - out.println("Servlet is OK"); - } catch (HibernateException e) { - throw new ServletException(e); - } - } - - /** - * Creates and Persists Cats in DB - * @param out PrintWriter - * @throws HibernateException if - */ - public void createCats(PrintWriter out) throws HibernateException { - out.print("

    Creating Cats:

    "); - out.println("CREATING 'Princess'...
    "); - - Cat princess = new Cat(); - princess.setName("Princess"); - princess.setSex('F'); - princess.setWeight(7.4f); - session.save(princess); - - out.println("CREATING 'Max'...
    "); - - Cat max = new Cat(); - max.setName("Max"); - max.setSex('M'); - max.setWeight(8.1f); - session.save(max); - - out.println("CREATING 'Sophie'...
    "); - - Cat sophie = new Cat(); - sophie.setName("Sophie"); - sophie.setSex('F'); - sophie.setWeight(4.1f); - session.save(sophie); - } - - /** - * Select All the Cats - * @param out PrintWriter - * @throws HibernateException - */ - public void selectAllCats(PrintWriter out) throws HibernateException { - out.print("

    Retrieving all Cats:

    "); - - String queryString = "select cat from Cat as cat"; - Query query = session.createQuery(queryString); - - for (Iterator it = query.iterate(); it.hasNext();) { - Cat cat = (Cat) it.next(); - out.println("CAT: " + cat.getName() + " (" + cat.getSex() + ", " + - cat.getWeight() + ")
    "); - } - } - - /** - * Select all Female Cats - * @param out PrintWriter - * @throws HibernateException - */ - public void selectFemaleCats(PrintWriter out) throws HibernateException { - out.print("

    Retrieving female Cats:

    "); - - String queryString = "select cat from Cat as cat where cat.sex = :sex"; - Query query = session.createQuery(queryString); - query.setCharacter("sex", 'F'); - - for (Iterator it = query.iterate(); it.hasNext();) { - Cat cat = (Cat) it.next(); - out.println("CAT: " + cat.getName() + " (" + cat.getSex() + ", " + - cat.getWeight() + ")
    "); - } - } - - // Helper Methods - private void initHibernate() throws HibernateException { - // Load Configuration and build SessionFactory - sessionFactory = new Configuration().configure().buildSessionFactory(); - } - - private void beginTransaction() throws HibernateException { - session = sessionFactory.openSession(); - transaction = session.beginTransaction(); - } - - private void endTransaction(boolean commit) throws HibernateException { - if (commit) { - transaction.commit(); - } else { - // Don't commit the transaction, can be faster for read-only operations - transaction.rollback(); - } - - session.close(); - } -} diff --git a/jonas_tests/examples/base/examples/j2eemanagement/README b/jonas_tests/examples/base/examples/j2eemanagement/README deleted file mode 100644 index 6bdb7226a2ac0f972771ac54e6c56a62ca33b267..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/j2eemanagement/README +++ /dev/null @@ -1,147 +0,0 @@ - -Example Overview: ------------------ - -This is a sample management application which is using the -Management EJB (MEJB) accordingly to the J2EE Management -Specification (JSR77), to implement some management operations -described below. -The MEJB is an Enterprise Session bean implementing the -javax.management.j2ee.Management interface and provides access -to the platform's manageable objects through the EJB -interoperability protocol. - -The MEJB is automatically deployed in a JOnAS EJB container -at start-up because the ejb-jar file (mejb.jar) -is installed in (JONAS_ROOT | JONAS_BASE)/ejbjars/autoload directory. -(Note you can use "ant update_jonasbase" for updating JONAS_BASE -directory). - -The application's main component is a servlet which creates -a MEJB and calls the management methods defined in its remote interface. - -In order to create the MEJB, the servlet gets a reference on the -bean's home using a JNDI lookup with the "java:comp/env/ejb/mgmt/MEJB" name. - -Management operations ---------------------- -The management operations implemented in this example are: -1/ Find the servers which run in the current management domain. -2/ Register an event listener in order to receive notifications -emitted by a J2EE server. - -Example structure and packaging -------------------------------- - -This example is a J2EE application, so it is packaged in a EAR. -Compiling the example creates the j2eemanagement.ear file -that includes a web application (WAR). - -The servlet source code is contained in -.../jonas_tests/examples/base/examples/j2eemanagement/src/.. directory. - -The "etc" directory contains - - the "xml" directory containing the application's deployment descriptors: - * application.xml (ear file) - * web.xml, jonas-web.xml (war file) - - the "resources" directory which contains the resources for this application - * "web" directory contains all resources used by the servlet - - -Prerequisites -------------- -First, you must have installed a web container (i.e.: Catalina or Jetty) -as the web container service. - - -Compiling and installing this example: --------------------------------------- - ant install - -in JONAS_ROOT/examples/j2eemanagement. - -Running this example: --------------------- -You will run a JOnAS server having at least a default configuration -(the ejb service, to deploy mejb.jar, and the web service, to -deploy jonasAdmin.war and j2eemanagement.ear). - -Commands are given for an Unix system. -(Similar commands can be done on Windows) - -0) Server configuration: -- Currently, if you wish to test the event notifications, you have to -be sure the mail service is in the services list in jonas.properties. -Otherwise, default configuration is sufficient. -- You may add j2eemanagement.ear in the ear descriptors list in jonas.properties; -this avoids executing step 2) - -1) Run a jonas server: - jonas start [-n name] [-Ddomain.name=domainName] - -2) Load j2eemanagement.ear if you haven't added j2eemanagement.ear to the ear -descriptors list: - jonas admin -a j2eemanagement.ear - - or via the jonasAdmin management application - (http://:/jonasAdmin) - -3) Run your web browser (e.g., netscape) with url: - http://:/j2eemanagement - where is the name of your machine (localhost by default) - and the port number (9000 by default) - -4) Run the servlet after providing the domain name. - - The displayed information traces out the executed management operations: - - initial naming context creation - - MEJB creation - - access to J2EEDomain MBean and listing the J2EEServer MBeans - (we have one server in the present case) - - the next operation is creation of a client notification listener and - its registration as listener on notifications emitted by the - J2EEServer MBean via the usage of a ListenerRegistration object - provided by the MEJB. - - As specified at step 0) the mail service has to be started in order -to test the event listener. - Make the following operations: - Run the JOnAS management application to add or remove a mail resource: - - open http://:/jonasAdmin url - - go in the Resources->Mail sub-tree - - deploy, or undeploy, a Mail Factory - - As a side effect of this action, the J2EEServer MBean sends a notification -to the registered notification listeners. The notification's type is - AttributeAddNotification or AttributeRemoveNotification. -It contains information about the added/removed resource. - The implementation of the MEJB's event listener requirement allow -the notification to be delivered to the client notification listener. -This can be verified by a click on one of the links allowing to list the -received notifications. - -5) Test the new domain management features: -5.1) Cluster creation - - Go back to the previous page (to /j2eemanagement) - - Provide the cluster name to create and run the cluster creation (2nd run button) - -5.2) Add additional server to the domain. -You may test one of the following scenarios: - -5.2.1) In the first scenario, you add an additional slave server which -is not running when the "addServer" operation is invoked. The server is added to the 'servers' -list in 'created' state. - - Go back to the previous page (to /j2eemanagement) - - Provide the server name, the connector server URL, and run by clicking on the last run button. -Later on, when starting the server, it passes in 'running' state. - - Start the server having the provided name and connector server URL - - Check the new server passed in the 'running' state by re-executing the servlet (first run button) - -5.2.2) In the second scenario, you add an additional server which doesn't has the discovery service -enabled. The server is added in the 'servers' list in 'running' state. - - Start the server to add - - Go back to the previous page (to /j2eemanagement) - - Provide the server name, the connector server URL, and run by clicking on the last run button. - -6) Stop the jonas server: - jonas stop [-n name] diff --git a/jonas_tests/examples/base/examples/j2eemanagement/build.xml b/jonas_tests/examples/base/examples/j2eemanagement/build.xml deleted file mode 100644 index bdfee83d589457e71a647151dede4f04fef4ea0d..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/j2eemanagement/build.xml +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/j2eemanagement/etc/resources/web/img/logo_jonas.jpg b/jonas_tests/examples/base/examples/j2eemanagement/etc/resources/web/img/logo_jonas.jpg deleted file mode 100644 index 3fe9b43072176d2275d8725eb977b781a9730306..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/j2eemanagement/etc/resources/web/img/logo_jonas.jpg and /dev/null differ diff --git a/jonas_tests/examples/base/examples/j2eemanagement/etc/resources/web/index.html b/jonas_tests/examples/base/examples/j2eemanagement/etc/resources/web/index.html deleted file mode 100644 index 7bdb1e3e425ccb0f7ed3c3033b38022cd9590cc8..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/j2eemanagement/etc/resources/web/index.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - j2eemanagement - - - - -

    j2eemanagement : example of Servlet accessing the MEJB (Management EJB)

    -JOnAS Logo - -

    -This new version of the application allows testing management of several JOnAS servers running in a domain,
    -via JSR 160 MBeanServerConnections.
    -It also tests new domain management features and even Joram management. -

    -

    -To test domain management, you may start before running the servlet, at least a second server in the domain.
    -For example, if the current server's name is jonas, to start a second server named jonas1 in the current server's domain use:
    -jonas start -n jonas1 -Ddomain.name=jonas -

    -

    -Please give the domain name to be managed and then click to run the servlet.
    -(the default name for the domain is the current server's name)

    -

    -

    Check the domain topology

    -

    -

    -

    - Domain name: -

    -

    - -

    -
    -

    -

    -

    Test cluster creation

    -

    -

    -

    - Domain name: -

    -

    - Cluster name: -

    -

    - -

    -
    -

    -

    Add a new server to the domain (a server which is not running or which is running without the discovery service)

    -

    -

    -

    - Domain name: -

    -

    - Cluster name: -

    -

    - Server name: -

    -

    - Connector server url: -

    -

    - -

    -
    -

    -

    -

    Test server start

    -

    -

    -

    - Domain name: -

    -

    - Daemon name: -

    -

    - Server name: -

    -

    - -

    -
    -

    -

    -

    Test joram management features

    -

    Create a topic on a Joram server

    -

    -

    -

    - Topic name: -

    -

    - Joram server id: -

    -

    - -

    -
    -

    - - - diff --git a/jonas_tests/examples/base/examples/j2eemanagement/etc/resources/web/style.css b/jonas_tests/examples/base/examples/j2eemanagement/etc/resources/web/style.css deleted file mode 100644 index 4f852c2a87c8be61ad1e242e706f92197a35396c..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/j2eemanagement/etc/resources/web/style.css +++ /dev/null @@ -1,13 +0,0 @@ -body { - background : white; - color : black; -} -h1, h2, h3 {font-family : sans-serif; } -h1 {font-size : 175%; color : DarkCyan; text-align : center;} -h2 {font-size : 150%; color : DarkCyan; - border-bottom : solid; - border-bottom-width : 1; -} -h3 {font-size : 125%; } -strong { font-weight : bold; } -hr { size : 1; width : 100%; } diff --git a/jonas_tests/examples/base/examples/j2eemanagement/etc/xml/application.xml b/jonas_tests/examples/base/examples/j2eemanagement/etc/xml/application.xml deleted file mode 100644 index ca34ba01b007d0b67284e9531e8943f1bc14401e..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/j2eemanagement/etc/xml/application.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - ear example for MEJB usage - j2eemanagement servlet - - - - j2eemanagement.war - j2eemanagement - - - - \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/j2eemanagement/etc/xml/jonas-web.xml b/jonas_tests/examples/base/examples/j2eemanagement/etc/xml/jonas-web.xml deleted file mode 100644 index da508379cc1b7f2f5e68129f4cb855f20e51a523..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/j2eemanagement/etc/xml/jonas-web.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - ejb/mgmt/MEJB - ejb/mgmt/MEJB - - diff --git a/jonas_tests/examples/base/examples/j2eemanagement/etc/xml/web.xml b/jonas_tests/examples/base/examples/j2eemanagement/etc/xml/web.xml deleted file mode 100644 index 717c8bd1fdaac06f7c1870e1c43d7504de428fea..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/j2eemanagement/etc/xml/web.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - mgmt - org.objectweb.j2eemanagement.servlets.MgmtServlet - - - - mgmt - /mgmt - - - - cmgmt - org.objectweb.j2eemanagement.servlets.ClustMgmtServlet - - - - cmgmt - /cmgmt - - - - dmgmt - org.objectweb.j2eemanagement.servlets.ClusterDaemonServlet - - - - dmgmt - /dmgmt - - - - smgmt - org.objectweb.j2eemanagement.servlets.NewServerMgmtServlet - - - - smgmt - /smgmt - - - - jmsmgmt - org.objectweb.j2eemanagement.servlets.JmsAdminServlet - - mbeanName - joramClient:type=JoramAdmin - - - - - jmsmgmt - /jmsmgmt - - - - ejb/mgmt/MEJB - Session - javax.management.j2ee.ManagementHome - javax.management.j2ee.Management - - - - - Protected Area - - /* - - DELETE - GET - POST - PUT - - - - mejb-admin - - - - - - BASIC - JOnAS Realm - - - - - mejb-admin - - - diff --git a/jonas_tests/examples/base/examples/j2eemanagement/src/org/objectweb/j2eemanagement/servlets/ClustMgmtServlet.java b/jonas_tests/examples/base/examples/j2eemanagement/src/org/objectweb/j2eemanagement/servlets/ClustMgmtServlet.java deleted file mode 100644 index bdba36c83104451c67a308215260e12570fc5259..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/j2eemanagement/src/org/objectweb/j2eemanagement/servlets/ClustMgmtServlet.java +++ /dev/null @@ -1,253 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2006 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.j2eemanagement.servlets; - -//import java -import java.io.IOException; -import java.io.PrintWriter; - -import javax.management.ObjectName; -import javax.management.j2ee.Management; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * This servlet is an example which shows how to access the MEJB from a servlet. - * @author JOnAS team - * @author Adriana Danes - */ -public class ClustMgmtServlet extends J2eemanagementBaseServlet { - - // ---------------------------------------------------------- Constants - /** Parameter */ - static final String PARAM_DOMAIN = "domainName"; - /** Parameter */ - static final String PARAM_CLUSTER = "clusterName"; - /** Parameter */ - static final String PARAM_VIEW = "view"; - /** Parameter */ - static final String VIEW_INIT = "init"; - - // ---------------------------------------------------------- Public methods - - /** - * Initialize the servlet. - * @param pConfig See HttpServlet - * @throws ServletException Could not execute request - */ - public void init(ServletConfig pConfig) throws ServletException { - super.init(pConfig); - } - - // ---------------------------------------------------------- Protected - // methods - - /** - * Response to the GET request. - * @param pRequest See HttpServlet - * @param pResponse See HttpServlet - * @throws IOException An input or output error is detected when the servlet handles the request - * @throws ServletException Could not execute request - */ - protected void doGet(HttpServletRequest pRequest, HttpServletResponse pResponse) throws IOException, - ServletException { - dispatch(pRequest, pResponse); - } - - /** - * Response to the POST request. - * @param pRequest See HttpServlet - * @param pResponse See HttpServlet - * @throws IOException An input or output error is detected when the servlet handles the request - * @throws ServletException Could not execute request - */ - protected void doPost(HttpServletRequest pRequest, HttpServletResponse pResponse) throws IOException, - ServletException { - dispatch(pRequest, pResponse); - } - - /** - * Dispatch the response. - * @param pRequest Request - * @param pResponse Response - * @throws IOException An input or output error is detected when the servlet handles the request - */ - protected void dispatch(HttpServletRequest pRequest, HttpServletResponse pResponse) throws IOException { - - pResponse.setContentType("text/html"); - PrintWriter out = pResponse.getWriter(); - - // Get parameters - String sParamDomain = pRequest.getParameter(PARAM_DOMAIN); - String sParamCluster = pRequest.getParameter(PARAM_CLUSTER); - String sParamView = pRequest.getParameter(PARAM_VIEW); - - // Dispatching - if ((sParamDomain == null) || (sParamDomain.length() == 0)) { - doViewError("Parameter Domain name not found", pRequest, out); - } else if ((sParamCluster == null) || (sParamCluster.length() == 0)) { - doViewError("Parameter Cluster name not found", pRequest, out); - } else if ((sParamView == null) || (sParamView.length() == 0) || VIEW_INIT.equals(sParamView)) { - doViewInit(pRequest, out); - doViewManagement(sParamDomain, sParamCluster, pRequest, out); - } else { - doViewError("Unknown View", pRequest, out); - } - - } - - /** - * Do management opeartions in this view. - * @param pDomainName Name of domain to access - * @param pClusterName Name of the cluster to manage in the domain - * @param pRequest Http request - * @param pOut Printer - */ - protected void doViewManagement(String pDomainName, String pClusterName, HttpServletRequest pRequest, PrintWriter pOut) { - Management mgmt = getMgmt(); - - // ------------------------------ - // Access to the J2EEDomain MBean - // ------------------------------ - ObjectName onDomain = accessJ2EEDomain(pDomainName, mgmt, pOut); - if (onDomain == null) { - return; - } - - if (!isMaster(onDomain, mgmt, pOut)) { - // End application - pOut.println("

    Application is OK

    "); - // Footer - printNavigationFooter(pRequest, pOut); - return; - } - - // Create a cluster in the domain - // ------------------------------- - ObjectName onCluster = createCluster(onDomain, pClusterName, mgmt, pOut); - if (onCluster == null) { - return; - } - - // ----------------------------------------------------- - // Using the domain management EJB to list servers and clusters - // ----------------------------------------------------- - String[] serverNames = null; - String[] serverNamesDom = null; - String[] servers = null; - String[] clusters = null; - try { - - pOut.println("

    Getting the list of cluster MBeans

    "); - clusters = (String[]) mgmt.getAttribute(onDomain, "clusters"); - pOut.println("
      "); - for (int i = 0; i < clusters.length; i++) { - pOut.println("
    • " + clusters[i] + "
    • "); - } - pOut.println("
    "); - } catch (Exception e) { - pOut.println("
  • Could not make MEJB list servers or clusters.
  • " + e); - e.printStackTrace(pOut); - return; - } - - pOut.println("

    Application is OK

    "); - - // Footer - printNavigationFooter(pRequest, pOut); - } - - /** - * Create J2EEDomain MBean's ObjectName and test if MBean registered - * @param pDomainName the name provided by the user - * @param mgmt MEJB - * @param pOut output stream - * @return true if management operation succeeded - */ - private ObjectName accessJ2EEDomain(String pDomainName, Management mgmt, PrintWriter pOut) { - ObjectName onDomain = null; - pOut.println("

    Access the J2EEDomain MBean

    "); - pOut.println("
      "); - - // Get the J2EEDomain MBean's ObjectName - try { - String name = pDomainName + ":j2eeType=J2EEDomain,name=" + pDomainName; - onDomain = ObjectName.getInstance(name); - pOut.println("
    • J2EEDomain object name \"" + name.toString() + "\" created.
    • "); - } catch (Exception e) { - pOut.println("
    • Cannot create object name for J2EEDomain managed object: " + e + "
    • "); - pOut.println("
    "); - return null; - } - // Check that the J2EEDomain MBean registered - try { - boolean exists = mgmt.isRegistered(onDomain); - if (exists) { - pOut.println("
  • Found this J2EEDomain MBean in the current MBean server
  • "); - pOut.println("
    "); - } else { - pOut.println("
  • Can't find this J2EEDomain MBean in the current MBean server
  • "); - pOut.println(""); - return null; - } - } catch (Exception e) { - pOut.println("
  • Error when using this J2EEDomain MBean: " + e + "
  • "); - pOut.println(""); - return null; - } - return onDomain; - } - - /** - * Create a cluster. - * @param pOnDomain - * @param pClusterName - * @param mgmt - * @param pOut - * @return The ObjectName of the cluster's MBean. - */ - private ObjectName createCluster(ObjectName pOnDomain, String pClusterName, Management mgmt, PrintWriter pOut) { - ObjectName on = null; - pOut.println("

    Create the MBean corresponding to the cluster " + pClusterName + "

    "); - pOut.println("
      "); - try { - String[] signature = new String[1]; - signature[0] = "java.lang.String"; - Object[] params = new Object[1]; - params[0] = pClusterName; - String clusterOn = (String) mgmt.invoke(pOnDomain, "createCluster", params, signature); - on = ObjectName.getInstance(clusterOn); - pOut.println("
    • Cluster " + pClusterName + " created.
    • "); - pOut.println("

    "); - } catch (Exception e) { - pOut.println("
  • Cannot create cluster " + pClusterName + ": " + e + "
  • "); - pOut.println(""); - } - return on; - } -} diff --git a/jonas_tests/examples/base/examples/j2eemanagement/src/org/objectweb/j2eemanagement/servlets/ClusterDaemonServlet.java b/jonas_tests/examples/base/examples/j2eemanagement/src/org/objectweb/j2eemanagement/servlets/ClusterDaemonServlet.java deleted file mode 100644 index c0c635d6fdcc02fed7e8eaa2432947cb6be98b36..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/j2eemanagement/src/org/objectweb/j2eemanagement/servlets/ClusterDaemonServlet.java +++ /dev/null @@ -1,220 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2006 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id: $ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.j2eemanagement.servlets; - -//import java -import java.io.IOException; -import java.io.PrintWriter; - -import javax.management.ObjectName; -import javax.management.j2ee.Management; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * This servlet is an example which shows how to access the MEJB from a servlet. - * @author JOnAS team - * @author Adriana Danes - */ -public class ClusterDaemonServlet extends J2eemanagementBaseServlet { - - // ---------------------------------------------------------- Constants - /** Parameter */ - static final String PARAM_DOMAIN = "domainName"; - /** Parameter */ - static final String PARAM_DAEMON = "daemonName"; - /** Parameter which gives the name of the server to be started by the daemon */ - static final String PARAM_SERVER = "serverName"; - /** Parameter */ - static final String PARAM_VIEW = "view"; - /** Parameter */ - static final String VIEW_INIT = "init"; - - // ---------------------------------------------------------- Public methods - - /** - * Initialize the servlet. - * @param pConfig See HttpServlet - * @throws ServletException Could not execute request - */ - public void init(ServletConfig pConfig) throws ServletException { - super.init(pConfig); - } - - // ---------------------------------------------------------- Protected - // methods - - /** - * Response to the GET request. - * @param pRequest See HttpServlet - * @param pResponse See HttpServlet - * @throws IOException An input or output error is detected when the servlet handles the request - * @throws ServletException Could not execute request - */ - protected void doGet(HttpServletRequest pRequest, HttpServletResponse pResponse) throws IOException, - ServletException { - dispatch(pRequest, pResponse); - } - - /** - * Response to the POST request. - * @param pRequest See HttpServlet - * @param pResponse See HttpServlet - * @throws IOException An input or output error is detected when the servlet handles the request - * @throws ServletException Could not execute request - */ - protected void doPost(HttpServletRequest pRequest, HttpServletResponse pResponse) throws IOException, - ServletException { - dispatch(pRequest, pResponse); - } - - /** - * Dispatch the response. - * @param pRequest Request - * @param pResponse Response - * @throws IOException An input or output error is detected when the servlet handles the request - */ - protected void dispatch(HttpServletRequest pRequest, HttpServletResponse pResponse) throws IOException { - - pResponse.setContentType("text/html"); - PrintWriter out = pResponse.getWriter(); - - // Get parameters - String sParamDomain = pRequest.getParameter(PARAM_DOMAIN); - String sParamDaemon = pRequest.getParameter(PARAM_DAEMON); - String sParamServer = pRequest.getParameter(PARAM_SERVER); - String sParamView = pRequest.getParameter(PARAM_VIEW); - - // Dispatching - if ((sParamDomain == null) || (sParamDomain.length() == 0)) { - doViewError("Parameter Domain name not found", pRequest, out); - } else if ((sParamDaemon == null) || (sParamDaemon.length() == 0)) { - doViewError("Parameter Daemon name not found", pRequest, out); - } else if ((sParamServer == null) || (sParamServer.length() == 0)) { - doViewError("Parameter Server name not found", pRequest, out); - } else if ((sParamView == null) || (sParamView.length() == 0) || VIEW_INIT.equals(sParamView)) { - doViewInit(pRequest, out); - doViewManagement(sParamDomain, sParamDaemon, sParamServer, pRequest, out); - } else { - doViewError("Unknown View", pRequest, out); - } - - } - - /** - * Do management opeartions in this view. - * @param pDomainName Name of domain to access - * @param pDaemonName Name of the deamon - * @param pServerName Name of the server to be started by the daemon - * @param pRequest Http request - * @param pOut Printer - */ - protected void doViewManagement(String pDomainName, String pDaemonName, String pServerName, HttpServletRequest pRequest, PrintWriter pOut) { - Management mgmt = getMgmt(); - - // ------------------------------ - // Access to the J2EEDomain MBean - // ------------------------------ - ObjectName onDomain = accessJ2EEDomain(pDomainName, mgmt, pOut); - if (onDomain == null) { - return; - } - - if (isMaster(onDomain, mgmt, pOut)) { - startServer(onDomain, pDaemonName, pServerName, mgmt, pOut); - } - - pOut.println("

    Application is OK

    "); - - // Footer - printNavigationFooter(pRequest, pOut); - } - - /** - * Create J2EEDomain MBean's ObjectName and test if MBean registered - * @param pDomainName the name provided by the user - * @param mgmt MEJB - * @param pOut output stream - * @return true if management operation succeeded - */ - private ObjectName accessJ2EEDomain(String pDomainName, Management mgmt, PrintWriter pOut) { - ObjectName onDomain = null; - pOut.println("

    Access the J2EEDomain MBean

    "); - pOut.println("
      "); - - // Get the J2EEDomain MBean's ObjectName - try { - String name = pDomainName + ":j2eeType=J2EEDomain,name=" + pDomainName; - onDomain = ObjectName.getInstance(name); - pOut.println("
    • J2EEDomain object name \"" + name.toString() + "\" created.
    • "); - } catch (Exception e) { - pOut.println("
    • Cannot create object name for J2EEDomain managed object: " + e + "
    • "); - pOut.println("
    "); - return null; - } - // Check that the J2EEDomain MBean registered - try { - boolean exists = mgmt.isRegistered(onDomain); - if (exists) { - pOut.println("
  • Found this J2EEDomain MBean in the current MBean server
  • "); - pOut.println("
    "); - } else { - pOut.println("
  • Can't find this J2EEDomain MBean in the current MBean server
  • "); - pOut.println(""); - return null; - } - } catch (Exception e) { - pOut.println("
  • Error when using this J2EEDomain MBean: " + e + "
  • "); - pOut.println(""); - return null; - } - return onDomain; - } - /** - * Start a server in domain - * @param pOnDomain J2EEDomain MBean ObjectName - * @param pDaemonName daemon name - currently not used - * @param pServerName server name - * @param mgmt MEJB - * @param pOut output stream - */ - private void startServer(ObjectName pOnDomain, String pDaemonName, String pServerName, Management mgmt, PrintWriter pOut) { - pOut.println("

    Start the server " + pServerName + "

    "); - pOut.println("
      "); - try { - String[] signature = {"java.lang.String"}; - String[] params = {pServerName}; - mgmt.invoke(pOnDomain, "startServer", params, signature); - pOut.println("
    • Server " + pServerName + " started.
    • "); - pOut.println("

    "); - } catch (Exception e) { - pOut.println("
  • Cannot create cluster start the server
  • "); - pOut.println(""); - } - } -} diff --git a/jonas_tests/examples/base/examples/j2eemanagement/src/org/objectweb/j2eemanagement/servlets/J2eemanagementBaseServlet.java b/jonas_tests/examples/base/examples/j2eemanagement/src/org/objectweb/j2eemanagement/servlets/J2eemanagementBaseServlet.java deleted file mode 100644 index 74639d83fae4b942e2e9f6dffc895238ce987a13..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/j2eemanagement/src/org/objectweb/j2eemanagement/servlets/J2eemanagementBaseServlet.java +++ /dev/null @@ -1,232 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2006-2008 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.j2eemanagement.servlets; - -import java.io.PrintWriter; - -import javax.management.ObjectName; -import javax.management.j2ee.Management; -import javax.management.j2ee.ManagementHome; -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.rmi.PortableRemoteObject; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; - -/** - * - * @author Adriana Danes - * - * Base classe containing common code for the j2eeManagement servlets - */ -public class J2eemanagementBaseServlet extends HttpServlet { - /** Printing constant*/ - static final String APP_TITLE = "J2EE Management sample"; - /** - * Standard J2EEManagement Bean - */ - private Management mgmt = null; - /** - * Naming context - */ - private Context initialContext = null; - - /** - * Header. - * @param pOut Printer - * @param pTitle Title to display - * @param pSubTitle Subtitle to display or null if not - */ - protected void printHeader(PrintWriter pOut, String pTitle, String pSubTitle) { - - pOut.println(""); - pOut.println(""); - pOut.println("" + pTitle); - if (pSubTitle != null) { - pOut.println(" - " + pSubTitle); - } - pOut.println(""); - pOut.println(""); - pOut.println(""); - printHeaderTitle(pOut, pTitle, pSubTitle); - } - /** - * Header title. - * @param pOut Printer - * @param pTitle Title to display - * @param pSubTitle Subtitle to display or null if not - */ - protected void printHeaderTitle(PrintWriter pOut, String pTitle, String pSubTitle) { - - pOut.println(""); - pOut.println(""); - pOut.println(""); - pOut.println(""); - pOut.println(""); - pOut.println(""); - if (pSubTitle != null) { - pOut.println(""); - } - pOut.println(""); - pOut.println("
    \"JOnAS

    " + pTitle + "

    " + pSubTitle + "

    "); - } - - /** - * Footer navigation. - * @param pRequest Http request - * @param pOut Printer - */ - protected void printNavigationFooter(HttpServletRequest pRequest, PrintWriter pOut) { - - // index - String sViewIndex = pRequest.getContextPath(); - - // Display - pOut.print(""); - pOut.print(""); - pOut.print(""); - pOut.println("
    Index
    "); - // Footer - printFooter(pOut); - } - /** - * Footer. - * @param pOut Printer - */ - protected void printFooter(PrintWriter pOut) { - pOut.println(""); - pOut.println(""); - } - - /** - * @param pRequest Client request - * @param pOut Writer for output - */ - protected void doViewInit(HttpServletRequest pRequest, PrintWriter pOut) { - // ----------------------------- - // Get initial context - // ----------------------------- - pOut.println("

    Create Initial naming context

    "); - pOut.println("
      "); - try { - initialContext = new InitialContext(); - pOut.println("
    • Initial context OK
    • "); - } catch (Exception e) { - pOut.print("
    • Cannot get initial context for JNDI: "); - pOut.println(e + "
    • "); - pOut.println("
    "); - printNavigationFooter(pRequest, pOut); - return; - } - pOut.println("
    "); - - // ----------------------------- - // Access to the MEJB - // ----------------------------- - pOut.println("

    Create MEJB

    "); - pOut.println("
      "); - - // Connecting to the MEJB home through JNDI - ManagementHome mgmtHome = null; - try { - mgmtHome = (ManagementHome) PortableRemoteObject.narrow(initialContext.lookup("java:comp/env/ejb/mgmt/MEJB"), - ManagementHome.class); - } catch (Exception e) { - pOut.println("
    • Cannot lookup java:comp/env/ejb/mgmt/MEJB: " + e + "
    • "); - pOut.println("
    "); - printNavigationFooter(pRequest, pOut); - return; - } - - // Management bean creation - try { - mgmt = mgmtHome.create(); - pOut.println("
  • MEJB created
  • "); - } catch (Exception e) { - pOut.println("
  • Cannot create MEJB: " + e + "
  • "); - pOut.println(""); - printNavigationFooter(pRequest, pOut); - return; - } - - pOut.println("
    "); - } - - /** - * Simply View error. - * @param pError Message error - * @param pRequest Http request - * @param pOut Printer - */ - protected void doViewError(String pError, HttpServletRequest pRequest, PrintWriter pOut) { - - // Header - printHeader(pOut, APP_TITLE, "Error"); - // Error message - pOut.println("

    " + pError + "

    "); - // Return - pOut.println("Return"); - // Footer - printFooter(pOut); - } - /** - * @return The management bean - */ - public Management getMgmt() { - return mgmt; - } - /** - * @return The initial naming context - */ - public Context getInitialContext() { - return initialContext; - } - - /** - * Check if the current server is a master - * @param pOnDomain J2EEDomain MBean's ObjectName - * @return true if the server is a master, false otherwise - */ - protected boolean isMaster(ObjectName pOnDomain, Management mgmt, PrintWriter pOut) { - pOut.println("

    Use the J2EEDomain MBean to check if the current server is a master

    "); - pOut.println("
      "); - boolean result = false; - try { - result = ((Boolean) mgmt.getAttribute(pOnDomain, "master")).booleanValue(); - } catch (Exception e) { - pOut.println("
    • Error when using this J2EEDomain MBean: " + e + "
    • "); - pOut.println("
    "); - return false; - } - if (result) { - pOut.println("
  • This is a Master server.
  • "); - } else { - pOut.println("
  • This server is not a Master !
  • "); - } - pOut.println(""); - return result; - } -} diff --git a/jonas_tests/examples/base/examples/j2eemanagement/src/org/objectweb/j2eemanagement/servlets/JmsAdminServlet.java b/jonas_tests/examples/base/examples/j2eemanagement/src/org/objectweb/j2eemanagement/servlets/JmsAdminServlet.java deleted file mode 100644 index 024986fd5bfca09d41c99661c9bc855ee3209f09..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/j2eemanagement/src/org/objectweb/j2eemanagement/servlets/JmsAdminServlet.java +++ /dev/null @@ -1,188 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2006 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.j2eemanagement.servlets; - -//import java -import java.io.IOException; -import java.io.PrintWriter; - -import javax.jms.Topic; -import javax.management.MalformedObjectNameException; -import javax.management.ObjectName; -import javax.management.j2ee.Management; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * This servlet is an example which shows how to access the MEJB from a servlet. - * The MEJB is used to invoke JoramAdmin Bean operations. - * @author JOnAS team - * @author Adriana Danes - */ -public class JmsAdminServlet extends J2eemanagementBaseServlet { - /** Parameter */ - static final String PARAM_TOPIC = "topicName"; - /** Parameter */ - static final String PARAM_SERVER_ID = "serverId"; - /** Parameter */ - static final String PARAM_VIEW = "view"; - /** Parameter */ - static final String VIEW_INIT = "init"; - - // ---------------------------------------------------------- Public methods - - /** - * Initialize the servlet. - * @param pConfig See HttpServlet - * @throws ServletException Could not initialize servlet - */ - public void init(ServletConfig pConfig) throws ServletException { - super.init(pConfig); - } - - // ---------------------------------------------------------- Protected - // methods - - /** - * Response to the GET request. - * @param pRequest See HttpServlet - * @param pResponse See HttpServlet - * @throws IOException Could not execute request - * @throws ServletException An input or output error is detected when the servlet handles the request - */ - protected void doGet(HttpServletRequest pRequest, HttpServletResponse pResponse) - throws IOException, ServletException { - dispatch(pRequest, pResponse); - } - - /** - * Response to the POST request. - * @param pRequest See HttpServlet - * @param pResponse See HttpServlet - * @throws IOException An input or output error is detected when the servlet handles the request - * @throws ServletException Could not execute request - */ - protected void doPost(HttpServletRequest pRequest, HttpServletResponse pResponse) - throws IOException, ServletException { - dispatch(pRequest, pResponse); - } - - /** - * Dispatch the response. - * @param pRequest Request - * @param pResponse Response - * @throws IOException An input or output error is detected when the servlet handles the request - */ - protected void dispatch(HttpServletRequest pRequest, HttpServletResponse pResponse) throws IOException { - - pResponse.setContentType("text/html"); - PrintWriter out = pResponse.getWriter(); - - // Get parameters - String sParamTopic = pRequest.getParameter(PARAM_TOPIC); - String sParamServerId = pRequest.getParameter(PARAM_SERVER_ID); - String sParamView = pRequest.getParameter(PARAM_VIEW); - - // Dispatching - if ((sParamTopic == null) || (sParamTopic.length() == 0)) { - doViewError("Parameter Topic name not found", pRequest, out); - } else if ((sParamServerId == null) || (sParamServerId.length() == 0)) { - doViewError("Parameter Joram server id not found", pRequest, out); - } else if ((sParamView == null) || (sParamView.length() == 0) || VIEW_INIT.equals(sParamView)) { - doViewInit(pRequest, out); - doViewManagement(sParamTopic, sParamServerId, pRequest, out); - } else { - doViewError("Unknown View", pRequest, out); - } - - } - - - - /** - * View init MEJB and access to MBEans J2EEDomain and J2EEServer. - * @param pTopicName Name of topic to create - * @param pServerId Joram server Id - * @param pRequest Http request - * @param pOut Printer - */ - protected void doViewManagement(String pTopicName, String pServerId, HttpServletRequest pRequest, PrintWriter pOut) { - - // ------------------------------------------------------------- - // Use the Joram MBean via the MEJB to make jms admin operations - // ------------------------------------------------------------- - pOut.println("

    Get Joram admin MBean

    "); - pOut.println("
      "); - Management mgmt = getMgmt(); - - String joramON = getInitParameter("mbeanName"); - if (joramON == null) { - joramON = "joramClient:type=JoramAdmin"; - } else { - pOut.println("
    • Use servlet init param 'mbeanName': " + joramON + "
    • "); - } - ObjectName joramOn = null; - try { - joramOn = ObjectName.getInstance(joramON); - } catch (MalformedObjectNameException e1) { - pOut.println("
    • Couldn't get Joram MBean
    • " + e1); - pOut.println("
    "); - printNavigationFooter(pRequest, pOut); - return; - } - pOut.println("
    "); - pOut.println("

    Use Joram admin MBean

    "); - pOut.println("
      "); - - try { - if (mgmt.isRegistered(joramOn)) { - Object[] asParam = {new Integer(pServerId), pTopicName }; - String[] asSignature = { - "int", "java.lang.String" - }; - String op = "createTopic"; - Topic topic = (Topic) mgmt.invoke(joramOn, op, asParam, asSignature); - getInitialContext().rebind(pTopicName, topic); - pOut.println("
    • Topic " + pTopicName + " created on server " + pServerId + "
    • "); - } - } catch (Exception e) { - pOut.println("
    • Could not use use Joram MBean to administer jms
    • " + e); - pOut.println("
    "); - printNavigationFooter(pRequest, pOut); - return; - } - - pOut.println("
    "); - - pOut.println("

    Application is OK

    "); - - // Footer - printNavigationFooter(pRequest, pOut); - } - -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/j2eemanagement/src/org/objectweb/j2eemanagement/servlets/MgmtServlet.java b/jonas_tests/examples/base/examples/j2eemanagement/src/org/objectweb/j2eemanagement/servlets/MgmtServlet.java deleted file mode 100644 index 601918b7107a1a93b3491bf567adabf759629d5f..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/j2eemanagement/src/org/objectweb/j2eemanagement/servlets/MgmtServlet.java +++ /dev/null @@ -1,849 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.j2eemanagement.servlets; - -//import java -import java.io.IOException; -import java.io.PrintWriter; -import java.net.MalformedURLException; -import java.rmi.RemoteException; -import java.util.List; - -import javax.management.MBeanException; -import javax.management.MBeanServerConnection; -import javax.management.MalformedObjectNameException; -import javax.management.ObjectName; -import javax.management.j2ee.ListenerRegistration; -import javax.management.j2ee.Management; -import javax.management.j2ee.ManagementHome; -import javax.management.remote.JMXConnector; -import javax.management.remote.JMXConnectorFactory; -import javax.management.remote.JMXServiceURL; -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.rmi.PortableRemoteObject; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * This servlet is an example which shows how to access the MEJB from a servlet. - * @author JOnAS team - * @author Adriana Danes - * @author Michel-Ange Anton - */ -public class MgmtServlet extends J2eemanagementBaseServlet { - - // ---------------------------------------------------------- Constants - /** Printing constant*/ - static final String APP_TITLE_LARGE = "J2EE Management sample with Servlet accessing the MEJB"; - /** Printing constant*/ - static final String APP_TITLE = "J2EE Management sample"; - /** Parameter */ - static final String PARAM_DOMAIN = "domainName"; - /** Parameter */ - static final String PARAM_VIEW = "view"; - /** Parameter */ - static final String VIEW_INIT = "init"; - /** Parameter */ - static final String VIEW_NOTIFICATIONS = "notifications"; - /** Parameter */ - static final String VIEW_OTHER = "other"; - /** Deploable module types */ - static final String JAR = "jar"; - /** Deploable module types */ - static final String WAR = "war"; - /** Deploable module types */ - static final String RAR = "rar"; - /** Deploable module types */ - static final String EAR = "ear"; - /** - * Listener object - */ - private MyListener mListener = null; - - // ---------------------------------------------------------- Public methods - - /** - * Initialize the servlet. - * @param pConfig See HttpServlet - * @throws ServletException - */ - public void init(ServletConfig pConfig) throws ServletException { - super.init(pConfig); - // Initialize variables - mListener = null; - } - - // ---------------------------------------------------------- Protected - // methods - - /** - * Response to the GET request. - * @param pRequest See HttpServlet - * @param pResponse See HttpServlet - * @throws IOException - * @throws ServletException - */ - protected void doGet(HttpServletRequest pRequest, HttpServletResponse pResponse) throws IOException, - ServletException { - dispatch(pRequest, pResponse); - } - - /** - * Response to the POST request. - * @param pRequest See HttpServlet - * @param pResponse See HttpServlet - * @throws IOException - * @throws ServletException - */ - protected void doPost(HttpServletRequest pRequest, HttpServletResponse pResponse) throws IOException, - ServletException { - dispatch(pRequest, pResponse); - } - - /** - * Dispatch the response. - * @param pRequest Request - * @param pResponse Response - * @throws IOException - */ - protected void dispatch(HttpServletRequest pRequest, HttpServletResponse pResponse) throws IOException { - - pResponse.setContentType("text/html"); - PrintWriter out = pResponse.getWriter(); - - // Get parameters - String sParamDomain = pRequest.getParameter(PARAM_DOMAIN); - String sParamView = pRequest.getParameter(PARAM_VIEW); - - // Dispatching - if ((sParamDomain == null) || (sParamDomain.length() == 0)) { - doViewError("Parameter domain not found", pRequest, out); - } else if ((sParamView == null) || (sParamView.length() == 0) || VIEW_INIT.equals(sParamView)) { - doViewInit(sParamDomain, pRequest, out); - } else if (VIEW_NOTIFICATIONS.equals(sParamView)) { - doViewNotifications(out); - } else if (VIEW_OTHER.equals(sParamView)) { - doViewOther(sParamDomain, pRequest, out); - } else { - doViewError("Unknown View", pRequest, out); - } - - } - - - /** - * Footer navigation. - * @param pDomainName Name of domain - * @param pRequest Http request - * @param pOut Printer - * @param pPrevious Previous view - * @param pNext Next view - */ - protected void printNavigationFooter(String pDomainName, HttpServletRequest pRequest, PrintWriter pOut, - String pPrevious, String pNext) { - - // index - String sViewIndex = pRequest.getContextPath(); - // Notifications - String sViewNotifications = pRequest.getRequestURI() + "?" + PARAM_DOMAIN + "=" + pDomainName + "&" - + PARAM_VIEW + "=" + VIEW_NOTIFICATIONS; - // Previous View - String sPrevView = null; - if (pPrevious != null) { - sPrevView = pRequest.getRequestURI() + "?" + PARAM_DOMAIN + "=" + pDomainName + "&" + PARAM_VIEW + "=" - + pPrevious; - } - // Next View - String sNextView = null; - if (pNext != null) { - sNextView = pRequest.getRequestURI() + "?" + PARAM_DOMAIN + "=" + pDomainName + "&" + PARAM_VIEW + "=" - + pNext; - } - - // Display - pOut.print(""); - pOut.print(""); - pOut.print(""); - pOut.print(""); - if (sPrevView != null) { - pOut.println(""); - } - if (sNextView != null) { - pOut.println(""); - } - pOut.println("
    Index Notifications Previous Next
    "); - // Footer - printFooter(pOut); - } - - /** - * View init MEJB and access to MBeans J2EEDomain and J2EEServer. - * @param pDomainName Name of domain to access - * @param pRequest Http request - * @param pOut Printer - */ - protected void doViewInit(String pDomainName, HttpServletRequest pRequest, PrintWriter pOut) { - - // Header - //printHeader(pOut, APP_TITLE_LARGE, "Init"); - - // ----------------------------- - // Get initial context - // ----------------------------- - pOut.println("

    Initial context

    "); - pOut.println("
      "); - Context initialContext = null; - try { - initialContext = new InitialContext(); - pOut.println("
    • Initial context OK
    • "); - } catch (Exception e) { - pOut.print("
    • Cannot get initial context for JNDI: "); - pOut.println(e + "
    • "); - pOut.println("
    "); - return; - } - pOut.println("
    "); - - // ----------------------------- - // Access to the MEJB - // ----------------------------- - pOut.println("

    Create MEJB

    "); - pOut.println("
      "); - - // Connecting to the MEJB home through JNDI - ManagementHome mgmtHome = null; - try { - mgmtHome = (ManagementHome) PortableRemoteObject.narrow(initialContext.lookup("java:comp/env/ejb/mgmt/MEJB"), - ManagementHome.class); - } catch (Exception e) { - pOut.println("
    • Cannot lookup java:comp/env/ejb/mgmt/MEJB: " + e + "
    • "); - pOut.println("
    "); - return; - } - - // Management bean creation - Management mgmt = null; - - try { - mgmt = mgmtHome.create(); - pOut.println("
  • MEJB created
  • "); - } catch (Exception e) { - pOut.println("
  • Cannot create MEJB: " + e + "
  • "); - return; - } - pOut.println("
    "); - // ------------------------------ - // Access to the J2EEDomain MBean - // ------------------------------ - - ObjectName onDomain = accessJ2EEDomain(pDomainName, mgmt, pOut); - if (onDomain == null) { - return; - } - - boolean master = checkIfMaster(onDomain, mgmt, pOut); - - // ----------------------------------------------------- - // Check for J2EEServer MBeans in the current J2EEDomain - // ----------------------------------------------------- - ObjectName onServer = accessJ2EEServer(onDomain, mgmt, pOut); - if (onServer == null) { - return; - } - - // ------------------------------ - // Test domain deployment - // ------------------------------ - if (master) { - pOut.println("

    Try to manage the current domain: deploy/undeploy on all servers in the domain

    "); - pOut.println("
      "); - pOut.println("
    • Use the J2EEDomain object name: \"" + onDomain.toString() + "\"
    • "); - String[] serverNames = null; - try { - serverNames = (String[]) mgmt.getAttribute(onDomain, "serverNames"); - } catch (Exception e) { - pOut.println("
    • Can't get serverNames attribute: " + e + "
    • "); - } - if (serverNames.length > 1) { - String fileName = null; - // Use deploy, undeploy - // (suppose sb.jar was installed under JONAS_BASE/ejbjars directory) - fileName = "sb.jar"; - deployModuleWithTarget(JAR, onDomain, serverNames, mgmt, fileName, pOut); - - // Use deploy, undeploy - // (suppose earsample.ear was installed under JONAS_BASE/apps directory) - fileName = "earsample.ear"; - deployModuleWithTarget(EAR, onDomain, serverNames, mgmt, fileName, pOut); - } else { - pOut.println("
    • Can't find server names in this domain
    • "); - } - pOut.println("

    "); - } else { - // ------------------------------ - // Test current server management - // ------------------------------ - pOut.println("

    Try to manage the current server

    "); - pOut.println("
      "); - pOut.println("
    • Using the J2EEServer object name: \"" + onServer.toString() + "\"
    • "); - - // Use deployJar, unDeployJar, isJarDeployed management opearations - // (suppose sb.jar was installed under JONAS_BASE/ejbjars directory) - String jarFileName = System.getProperty("jonas.base")+"/ejbjars/"+"sb.jar"; - deployJarModule(onServer, mgmt, jarFileName, pOut); - - // Use deployEar, unDeployEar, isEarDeployed management opearations - // (suppose earsample.ear was installed under JONAS_BASE/apps directory) - String earFileName = System.getProperty("jonas.base")+"/apps/"+"earsample.ear"; - deployEarModule(onServer, mgmt, earFileName, pOut); - - // (suppose autoload/earsample.ear was installed under JONAS_BASE/apps directory) - earFileName = "autoload/earsample.ear"; - deployEarModule(onServer, mgmt, earFileName, pOut); - - // Use deployRar, unDeployRar, isRarDeployed - // (suppose JDBC connection rar files installed under JONAS_BASE/rars directory) - /* - String rarFileName = "autoload/JOnAS_jdbcCP.rar"; - deployRarModule(onServer, mgmt, rarFileName, pOut); - */ - pOut.println("

    "); - } - // ----------------------------- - // Test Event Listener support - // ----------------------------- - - pOut.println("

    Register an event listener

    "); - pOut.println("
      "); - - // Test Monolog JMXHandler notifications - // ------------------------------------- - // Set this to true if you test the JMXHandler notifications ! - boolean testLogNotifs = true; - - String logServName = new String(pDomainName + ":type=service,name=log"); - ObjectName logServOn = null; - try { - logServOn = ObjectName.getInstance(logServName); - } catch (MalformedObjectNameException e1) { - pOut.println("
    • Can't create ObjectName for log service MBean: " + e1 + "
    • "); - testLogNotifs = false; - pOut.println("
    "); - } - if (testLogNotifs) { - boolean existsLog; - try { - existsLog = mgmt.isRegistered(logServOn); - if (existsLog) { - pOut.println("
  • Found log service MBean
  • "); - } else { - pOut.println("
  • Can't find log service MBean
  • "); - testLogNotifs = existsLog; - } - } catch (RemoteException e) { - pOut.println("
  • Failed to find the log service MBean
  • "); - } - } - - if (mListener == null) { - if (!testLogNotifs) { - mListener = new MyListener(); - pOut.println("
  • MyListener created
  • "); - } else { - mListener = new MonologListener(); - pOut.println("
  • MonologListener created
  • "); - } - } - - String sHandler = "MEJBTester"; - // Get the ListenerRegistration object - try { - pOut.println("
  • Create ListenerRegistration
  • "); - ListenerRegistration lr = mgmt.getListenerRegistry(); - pOut.println("
  • ListenerRegistration created
  • "); - if (lr != null) { - if (testLogNotifs) { - pOut.println("
  • Add listener for Monolog notifications (" + logServOn.toString() + ")
  • "); - lr.addNotificationListener(logServOn, mListener, null, sHandler); - } else { - pOut.println("
  • Add listener on J2EEServer (" + onServer.toString() + ")
  • "); - lr.addNotificationListener(onServer, mListener, null, sHandler); - } - pOut.println("
  • Notification Listener added
  • "); - String sViewNotifications = pRequest.getRequestURI() + "?" + PARAM_DOMAIN + "=" + pDomainName + "&" - + PARAM_VIEW + "=" + VIEW_NOTIFICATIONS; - pOut.println("See list of notifications"); - pOut.println(""); - } else { - pOut.println("
  • Can't add remote listener for the moment
  • "); - pOut.println(""); - } - } catch (Exception e) { - pOut.println("
  • Can't add notification listener on " + onServer.toString() + " : " + e + "
  • "); - } - - pOut.println("

    Application is OK

    "); - - // Footer - printNavigationFooter(pDomainName, pRequest, pOut, null, VIEW_OTHER); - } - - /** - * Header. - * @param pOut Printer - * @param pTitle Title to display - * @param pSubTitle Subtitle to display or null if not - */ - protected void printHeaderAutoRefresh(PrintWriter pOut, String pTitle, String pSubTitle) { - - pOut.println(""); - pOut.println(""); - pOut.println("" + pTitle + ""); - pOut.println(""); - pOut.println(""); - pOut.println(""); - printHeaderTitle(pOut, pTitle, pSubTitle); - } - /** - * View notifications. - * @param pOut Printer - */ - protected void doViewNotifications(PrintWriter pOut) { - - // Header - printHeaderAutoRefresh(pOut, APP_TITLE, "Notifications"); - pOut.println("

    List of notifications

    "); - - // Verify listener - if (mListener == null) { - pOut.println("Listener not found !"); - } else { - // Display notifications - List list = mListener.getListNotifications(); - if (list.size() > 0) { - pOut.println("
      "); - for (int i = 0; i < list.size(); i++) { - pOut.println("
    1. " + list.get(i) + "
    2. "); - } - pOut.println("
    "); - } else { - pOut.println("No notifications, the list is empty"); - } - } - - // Footer - printFooter(pOut); - } - - /** - * View example. - * @param pDomainName Name of domain to access - * @param pRequest Http request - * @param pOut Printer - */ - protected void doViewOther(String pDomainName, HttpServletRequest pRequest, PrintWriter pOut) { - - // Header - printHeader(pOut, APP_TITLE, "Other"); - - pOut.println("

    Other

    "); - - // Footer - printNavigationFooter(pDomainName, pRequest, pOut, VIEW_INIT, null); - } - - /** - * Create J2EEDomain MBean's ObjectName and test if MBean registered - * @param pDomainName the name provided by the user - * @param mgmt MEJB - * @param pOut output stream - * @return true if management operation succeeded - */ - private ObjectName accessJ2EEDomain(String pDomainName, Management mgmt, PrintWriter pOut) { - ObjectName onDomain = null; - pOut.println("

    Access the J2EEDomain MBean

    "); - pOut.println("
      "); - - // Get the J2EEDomain MBean's ObjectName - try { - String name = pDomainName + ":j2eeType=J2EEDomain,name=" + pDomainName; - onDomain = ObjectName.getInstance(name); - pOut.println("
    • J2EEDomain object name created: \"" + name.toString() + "\"
    • "); - } catch (Exception e) { - pOut.println("
    • Cannot create object name for J2EEDomain managed object: " + e + "
    • "); - pOut.println("
    "); - return null; - } - // Check that the J2EEDomain MBean registered - try { - boolean exists = mgmt.isRegistered(onDomain); - if (exists) { - pOut.println("
  • Found this J2EEDomain MBean in the current MBean server
  • "); - } else { - pOut.println("
  • Can't find this J2EEDomain MBean in the current MBean server
  • "); - pOut.println(""); - return null; - } - } catch (Exception e) { - pOut.println("
  • Error when using this J2EEDomain MBean: " + e + "
  • "); - pOut.println(""); - return null; - } - return onDomain; - } - - /** - * - * @param onDomain J2EEDomain MBean ObjectName - * @param mgmt Management EJB - * @param pOut output stream - * @return true if the current server is a master - */ - private boolean checkIfMaster(ObjectName onDomain, Management mgmt, PrintWriter pOut) { - try { - Boolean master = (Boolean) mgmt.getAttribute(onDomain, "master"); - if (master.booleanValue()) { - pOut.println("
  • The current server is a management master
  • "); - } - pOut.println(""); - return master.booleanValue(); - } catch (Exception e) { - pOut.println("
  • Error when using this J2EEDomain MBean: " + e + "
  • "); - } - pOut.println(""); - return false; - } - - /** - * Get a registered J2EEServer MBean - * @param onDomain J2EEDomain MBean's ObjectName - * @param mgmt MEJB - * @param pOut output stream - * @return true if management operation succeeded - */ - private ObjectName accessJ2EEServer(ObjectName onDomain, Management mgmt, PrintWriter pOut) { - pOut.println("

    Access the J2EEServer MBeans

    "); - pOut.println("
      "); - ObjectName onServer = null; - String[] listServers = null; - try { - listServers = (String[]) mgmt.getAttribute(onDomain, "servers"); - } catch (Exception e) { - pOut.println("
    • Cant' access the " + onDomain + " MBean's servers attribute
    • "); - pOut.println("

    "); - return null; - } - int nbServers = listServers.length; - if (nbServers == 0) { - pOut.println("
  • No J2EEServer MBeans in the " + onDomain + " MBean's servers list (problem with domain management !!)
  • "); - pOut.println("
    "); - return null; - } else { - if (nbServers == 1) { - String serverOn = (String) listServers[0]; - try { - onServer = ObjectName.getInstance(serverOn); - if (mgmt.isRegistered(onServer)) { - pOut.println("
  • Found one J2EEServer MBean registered in the current MBean server. Its OBJECT_NAME is: \"" + serverOn + "\"
  • "); - pOut.println("
    "); - return onServer; - } else { - pOut.println("
  • Can't find the J2EEServer MBean having OBJECT_NAME: " + serverOn + " in the current MBean server
  • "); - pOut.println("
    "); - return null; - } - } catch (Exception e) { - pOut.println("
  • Error witht OBJECT_NAME " + serverOn + ": " + e + "
  • "); - pOut.println("
    "); - return null; - } - } else { - pOut.println("
  • List of J2EEServer MBeans in the \"" + onDomain + "\" MBean's servers list:
  • "); - pOut.println("
      "); - for (int i = 0; i < nbServers; i++) { - String serverOn = listServers[i]; - ObjectName on = null; - try { - on = ObjectName.getInstance(serverOn); - } catch (MalformedObjectNameException e) { - pOut.print("
    1. Error witht OBJECT_NAME " + serverOn + ": " + e + "
    2. "); - continue; - } - pOut.print("
    3. \"" + serverOn + "\". "); - boolean isRegisterdServer = false; - try { - isRegisterdServer = mgmt.isRegistered(on); - } catch (RemoteException e) { - pOut.println("
        "); - pOut.println("
      • Error witht OBJECT_NAME " + serverOn + ": " + e + "
      • "); - pOut.println("
      "); - pOut.println("
    4. "); - continue; - } - if (isRegisterdServer) { - pOut.print("This MBean is registered in the current MBean server. It should correspond to the current server."); - pOut.println(""); - onServer = on; - } else { - pOut.println("This MBean is not registered in the current MBean server. It could correspond to a remote server."); - pOut.println(""); - pOut.println("
        "); - String name = on.getKeyProperty("name"); - String[] signature = {"java.lang.String"}; - String[] params = new String[1]; - params[0] = name; - String[] urls = null; - try { - urls = (String[]) mgmt.invoke(onDomain, "getConnectorServerURLs", params, signature); - } catch (Exception e) { - pOut.println("
      • Could not found a connector server URL for server " + name + ".
      • "); - pOut.println("
      "); - pOut.println(""); - continue; - } - if (urls == null) { - pOut.println("
    5. Could not found a connector server URL for server " + name + "
    6. "); - pOut.println(""); - pOut.println(""); - continue; - } - for (int j = 0; j < urls.length; j++) { - String url = urls[j]; - pOut.print("
    7. Try to connect to server " + name + " using connector server URL: " + url + "
    8. "); - MBeanServerConnection connection = createConnection(url); - if (connection != null) { - // Use connection directly instead of using MEJB - try { - if (connection.isRegistered(on)) { - pOut.print("
    9. Found MBean having OBJECT_NAME \"" + serverOn + "\" registered in the connected MBean server."); - } else { - pOut.print("
    10. The MBean having OBJECT_NAME \"" + serverOn + "\" is not registered in the connected MBean server."); - } - } catch (IOException ioe) { - pOut.print("
    11. Exception when trying to use connection: " + ioe.toString()); - } - } else { - pOut.print("
    12. Could not establish connection with server " + name + ". Server may be stopped or URL not valid.
    13. "); - } - } - pOut.println(""); - pOut.println(""); - } - } - pOut.println("
    "); - pOut.println("
    "); - return onServer; - } - } - } - - private MBeanServerConnection createConnection(String connectorServerURL) { - MBeanServerConnection connection; - // create a connector client for the connector server at the given url - JMXConnector connector = null; - try { - JMXServiceURL url = new JMXServiceURL(connectorServerURL); - connector = JMXConnectorFactory.newJMXConnector(url, null); - connector.connect(null); - connection = connector.getMBeanServerConnection(); - } catch (MalformedURLException e) { - // there is no provider for the protocol in url - connection = null; - } catch (IOException e) { - // connector client or connection cannot be made because of a communication problem. - connection = null; - } catch (java.lang.SecurityException e) { - // connection cannot be made for security reasons - connection = null; - } - return connection; - } - - /** - * Deploy if not already deployed, undeploy otherwise, a given jar file. - * @param onServer ObjectName of the J2EEServer MBean on which the mananagement operation has to be applied - * @param mgmt MEJB - * @param jarFileName name of the file to be deployed/undeployed - * @param pOut output stream - */ - private void deployJarModule(ObjectName onServer, Management mgmt, String jarFileName, PrintWriter pOut) { - String[] signature = {"java.lang.String"}; - String[] params = new String[1]; - params[0] = jarFileName; - pOut.println("
  • Test if " + jarFileName + " deployed
  • "); - boolean isDeployed = false; - try { - isDeployed = ((Boolean) mgmt.invoke(onServer, "isDeployed", params, signature)).booleanValue(); - } catch (Exception e) { - pOut.println("
  • Problem when invoking isDeployed management operation: " + e.toString()); - } - if (!isDeployed) { - pOut.println("
  • Try to deploy " + jarFileName + " !
  • "); - try { - String deployedObjectName = (String) mgmt.invoke(onServer, "deploy", params, signature); - pOut.println("
  • The Object Name of the deployed J2EEModule is: \"" + deployedObjectName + "\".
  • "); - } catch (MBeanException mbe) { - pOut.println("
  • Could not deploy " + jarFileName + " because of exception: " - + mbe.getTargetException().toString()); - } catch (Exception e) { - pOut.println("
  • Could not deploy " + jarFileName + " because of exception: " + e.toString() + "
  • "); - } - } else { - pOut.println("
  • Try to un-deploy " + jarFileName + " !
  • "); - try { - mgmt.invoke(onServer, "undeploy", params, signature); - pOut.println("
  • Done undeploy.>"); - } catch (MBeanException mbe) { - pOut.println("
  • Could not undeploy " + jarFileName + " because of exception: " - + mbe.getTargetException().toString()); - } catch (Exception e) { - pOut.println("
  • Could not undeploy " + jarFileName + " because of exception: " + e.toString() + "
  • "); - } - } - } - /** - * Deploy if not already deployed, undeploy otherwise, a given ear file. - * @param onServer ObjectName of the J2EEServer MBean on which the mananagement operation has to be applied - * @param mgmt MEJB - * @param earFileName name of the file to be deployed/undeployed - * @param pOut output stream - */ - private void deployEarModule(ObjectName onServer, Management mgmt, String earFileName, PrintWriter pOut) { - String[] signature = {"java.lang.String"}; - String[] params = new String[1]; - params[0] = earFileName; - pOut.println("
  • Test if " + earFileName + " deployed
  • "); - boolean isDeployed = false; - try { - isDeployed = ((Boolean) mgmt.invoke(onServer, "isDeployed", params, signature)).booleanValue(); - } catch (Exception e) { - pOut.println("
  • Problem when invoking isEarDeployed management operation: " + e.toString()); - } - if (!isDeployed) { - pOut.println("
  • Try to deploy " + earFileName + " !
  • "); - try { - String deployedObjectName = (String) mgmt.invoke(onServer, "deploy", params, signature); - pOut.println("
  • The Object Name of the deployed J2EEModule is: \"" + deployedObjectName + "\".
  • "); - } catch (MBeanException mbe) { - pOut.println("
  • Could not deploy " + earFileName + " because of exception: " - + mbe.getTargetException().toString()); - } catch (Exception e) { - pOut.println("
  • Could not deploy " + earFileName + " because of exception: " + e.toString() + "
  • "); - } - } else { - pOut.println("
  • Try to un-deploy " + earFileName + " !
  • "); - try { - mgmt.invoke(onServer, "undeploy", params, signature); - pOut.println("
  • Done undeploy.>"); - } catch (MBeanException mbe) { - pOut.println("
  • Could not undeploy " + earFileName + " because of exception: " - + mbe.getTargetException().toString()); - } catch (Exception e) { - pOut.println("
  • Could not undeploy " + earFileName + " because of exception: " + e.toString() + "
  • "); - } - } - } - - /** - * Deploy if not already deployed, undeploy otherwise, a given rar file. - * @param onServer ObjectName of the J2EEServer MBean on which the mananagement operation has to be applied - * @param mgmt MEJB - * @param rarFileName name of the file to be deployed/undeployed - * @param pOut output stream - */ - private void deployRarModule(ObjectName onServer, Management mgmt, String rarFileName, PrintWriter pOut) { - String[] signature = {"java.lang.String"}; - String[] params = new String[1]; - params[0] = rarFileName; - pOut.println("
  • Test if " + rarFileName + " deployed
  • "); - boolean isDeployed = false; - try { - isDeployed = ((Boolean) mgmt.invoke(onServer, "isDeployed", params, signature)).booleanValue(); - } catch (Exception e) { - pOut.println("
  • Problem when invoking isRarDeployed management operation: " + e.toString()); - } - if (!isDeployed) { - pOut.println("
  • Try to deploy " + rarFileName + " !
  • "); - try { - String deployedObjectName = (String) mgmt.invoke(onServer, "deploy", params, signature); - pOut.println("
  • The Object Name of the deployed J2EEModule is: \"" + deployedObjectName + "\".
  • "); - } catch (MBeanException mbe) { - pOut.println("
  • Could not deploy " + rarFileName + " because of exception: " - + mbe.getTargetException().toString()); - } catch (Exception e) { - pOut.println("
  • Could not deploy " + rarFileName + " because of exception: " + e.toString() + "
  • "); - } - } else { - pOut.println("
  • Try to un-deploy " + rarFileName + " !
  • "); - try { - mgmt.invoke(onServer, "undeploy", params, signature); - pOut.println("
  • Done undeploy.>"); - } catch (MBeanException mbe) { - pOut.println("
  • Could not undeploy " + rarFileName + " because of exception: " - + mbe.getTargetException().toString()); - } catch (Exception e) { - pOut.println("
  • Could not undeploy " + rarFileName + " because of exception: " + e.toString() + "
  • "); - } - } - } - - /** - * Deploy if not already deployed, undeploy otherwise, a given jar file. - * @param moduleType can be JAR, WAR, RAR or EAR - * @param onDomain J2EEDomain MBean ObjectName - * @param target names of the servers on which the mananagement operation has to be applied - * @param mgmt MEJB - * @param fileName name of the file to be deployed/undeployed - * @param pOut output stream - */ - private void deployModuleWithTarget(String moduleType, ObjectName onDomain, String[] target, Management mgmt, String fileName, PrintWriter pOut) { - String[] signature = {"[Ljava.lang.String;", "java.lang.String"}; - Object[] params = new Object[2]; - params[0] = target; - params[1] = fileName; - try { - String operationName = "deploy"; - pOut.println("
  • Try to " + operationName + " " + fileName + " on multiple target !
  • "); - mgmt.invoke(onDomain, operationName, params, signature); - operationName = "undeploy"; - pOut.println("
  • Try to " + operationName + " " + fileName + " on multiple target !
  • "); - mgmt.invoke(onDomain, operationName, params, signature); - } catch (MBeanException mbe) { - pOut.println("
  • Could not deploy/undeploy " + fileName + " because of exception: " - + mbe.getTargetException().toString()); - } catch (Exception e) { - pOut.println("
  • Could not deploy " + fileName + " because of exception: " + e.toString() + "
  • "); - } - } -} diff --git a/jonas_tests/examples/base/examples/j2eemanagement/src/org/objectweb/j2eemanagement/servlets/MonologListener.java b/jonas_tests/examples/base/examples/j2eemanagement/src/org/objectweb/j2eemanagement/servlets/MonologListener.java deleted file mode 100644 index 946111a74dd81e82db3531a1293057fd147530d6..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/j2eemanagement/src/org/objectweb/j2eemanagement/servlets/MonologListener.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id: $ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.j2eemanagement.servlets; - -import java.util.ArrayList; -import java.util.Date; -import java.util.logging.LogRecord; - -import javax.management.Notification; - -/** - * @author Adriana Danes - */ -public class MonologListener extends MyListener { - - private final static String monologNotifType = "Monolog.JMXHandler.Log"; - -// ---------------------------------------------------------- Public methods - /** - * Create a new element and add it to the list. - * @param notification received notification - * @param handback received handback - */ - public void handleNotification(Notification notification, Object handback) { - String type = notification.getType(); - if (type.equals(monologNotifType)) { - String message = notification.getMessage(); - LogRecord record = (LogRecord) notification.getUserData(); - String timestamp = new Date(record.getMillis()).toString(); - String loggerName = record.getLoggerName(); - String level = record.getLevel().toString(); - String sourceClass = record.getSourceClassName(); - String sourceMethod = record.getSourceMethodName(); - String resourceBundle = record.getResourceBundleName(); - StringBuffer buf = new StringBuffer(); - buf.append("Notification message = "); - buf.append(message); - buf.append('\n'); - - buf.append("Timestamp = "); - buf.append(timestamp); - buf.append('\n'); - - buf.append("LoggerName = "); - buf.append(loggerName); - buf.append('\n'); - - buf.append("Level = "); - buf.append(level); - buf.append('\n'); - - buf.append("SourceClass = "); - buf.append(sourceClass); - buf.append('\n'); - String s = new String(buf); - getListNotifications().add(s); - } else { - super.handleNotification(notification, handback); - } - } - - -} diff --git a/jonas_tests/examples/base/examples/j2eemanagement/src/org/objectweb/j2eemanagement/servlets/MyListener.java b/jonas_tests/examples/base/examples/j2eemanagement/src/org/objectweb/j2eemanagement/servlets/MyListener.java deleted file mode 100644 index 3774c529e7cbdc5fc8731299203a57c314759ec4..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/j2eemanagement/src/org/objectweb/j2eemanagement/servlets/MyListener.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.j2eemanagement.servlets; - -import java.util.ArrayList; - -import javax.management.NotificationListener; -import javax.management.Notification; - -/** - * @author Adriana Danes - * @author Michel-Ange Anton - */ -public class MyListener implements NotificationListener { - -// ---------------------------------------------------------- Properties variables - /** - * Each element in this list contains a received notification + infos about it - */ - private ArrayList listNotifications = null; - -// ---------------------------------------------------------- Constructor - /** - * Create list. - */ - public MyListener() { - listNotifications = new ArrayList(); - } - -// ---------------------------------------------------------- Public methods - /** - * Create a new element and add it to the list. - * @param notification received notification - * @param handback received handback - */ - public void handleNotification(Notification notification, Object handback) { - String s = "Notification = " + notification.toString() - + ", Handback = " + handback.toString(); - listNotifications.add(s); - } - -// ---------------------------------------------------------- Properties methods - /** - * @return notifications list - */ - public ArrayList getListNotifications() { - return listNotifications; - } - -} diff --git a/jonas_tests/examples/base/examples/j2eemanagement/src/org/objectweb/j2eemanagement/servlets/NewServerMgmtServlet.java b/jonas_tests/examples/base/examples/j2eemanagement/src/org/objectweb/j2eemanagement/servlets/NewServerMgmtServlet.java deleted file mode 100644 index 10b688d08c9b4458ac98fec07690c943375ff7e3..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/j2eemanagement/src/org/objectweb/j2eemanagement/servlets/NewServerMgmtServlet.java +++ /dev/null @@ -1,323 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2006 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.j2eemanagement.servlets; - -//import java -import java.io.IOException; -import java.io.PrintWriter; -import java.net.MalformedURLException; - -import javax.management.MBeanServerConnection; -import javax.management.MalformedObjectNameException; -import javax.management.ObjectName; -import javax.management.j2ee.Management; -import javax.management.remote.JMXConnector; -import javax.management.remote.JMXConnectorFactory; -import javax.management.remote.JMXServiceURL; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * This servlet is an example which shows how to access the MEJB from a servlet. - * @author JOnAS team - * @author Adriana Danes - */ -public class NewServerMgmtServlet extends J2eemanagementBaseServlet { - - // ---------------------------------------------------------- Constants - /** Parameter */ - static final String PARAM_DOMAIN = "domainName"; - /** Parameter */ - static final String PARAM_CLUSTER = "clusterName"; - /** Parameter */ - static final String PARAM_SERVER = "serverName"; - /** Parameter */ - static final String PARAM_SERVER_URL = "serverURL"; - /** Parameter */ - static final String PARAM_VIEW = "view"; - /** Parameter */ - static final String VIEW_INIT = "init"; - // ---------------------------------------------------------- Public methods - - /** - * Initialize the servlet. - * @param pConfig See HttpServlet - * @throws ServletException - */ - public void init(ServletConfig pConfig) throws ServletException { - super.init(pConfig); - } - - // ---------------------------------------------------------- Protected - // methods - - /** - * Response to the GET request. - * @param pRequest See HttpServlet - * @param pResponse See HttpServlet - * @throws IOException - * @throws ServletException - */ - protected void doGet(HttpServletRequest pRequest, HttpServletResponse pResponse) throws IOException, - ServletException { - dispatch(pRequest, pResponse); - } - - /** - * Response to the POST request. - * @param pRequest See HttpServlet - * @param pResponse See HttpServlet - * @throws IOException - * @throws ServletException - */ - protected void doPost(HttpServletRequest pRequest, HttpServletResponse pResponse) throws IOException, - ServletException { - dispatch(pRequest, pResponse); - } - - /** - * Dispatch the response. - * @param pRequest Request - * @param pResponse Response - * @throws IOException - */ - protected void dispatch(HttpServletRequest pRequest, HttpServletResponse pResponse) throws IOException { - - pResponse.setContentType("text/html"); - PrintWriter out = pResponse.getWriter(); - - // Get parameters - String sParamDomain = pRequest.getParameter(PARAM_DOMAIN); - String sParamCluster = pRequest.getParameter(PARAM_CLUSTER); - String sParamView = pRequest.getParameter(PARAM_VIEW); - String sParamServer = pRequest.getParameter(PARAM_SERVER); - String sParamServerURL = pRequest.getParameter(PARAM_SERVER_URL); - - // Dispatching - if ((sParamDomain == null) || (sParamDomain.length() == 0)) { - doViewError("Parameter Domain name not found", pRequest, out); - } else if ((sParamCluster == null) || (sParamCluster.length() == 0)) { - doViewError("Parameter Cluster name not found", pRequest, out); - } else if ((sParamServer == null) || (sParamServer.length() == 0)) { - doViewError("Parameter Server name not found", pRequest, out); - } else if ((sParamServerURL == null) || (sParamServerURL.length() == 0)) { - doViewError("Parameter Connector server url not found", pRequest, out); - } else if ((sParamView == null) || (sParamView.length() == 0) || VIEW_INIT.equals(sParamView)) { - doViewInit(pRequest, out); - doViewManagement(sParamDomain, sParamCluster, sParamServer, sParamServerURL, pRequest, out); - } else { - doViewError("Unknown View", pRequest, out); - } - - } - - - /** - * Do management operations in this view. - * @param pDomainName Name of domain to access - * @param pClusterName Name of the cluster to manage in the domain - * @param pServerName Name of the server to add in the domain - * @param pServerURL Address of the server's remote JMX connector - * @param pRequest Http request - * @param pOut Printer - */ - protected void doViewManagement(String pDomainName, String pClusterName, String pServerName, String pServerURL, HttpServletRequest pRequest, PrintWriter pOut) { - Management mgmt = getMgmt(); - - // ------------------------------ - // Access to the J2EEDomain MBean - // ------------------------------ - ObjectName onDomain = accessJ2EEDomain(pDomainName, mgmt, pOut); - if (onDomain == null) { - return; - } - - if (!isMaster(onDomain, mgmt, pOut)) { - // End application - pOut.println("

    Application is OK

    "); - // Footer - printNavigationFooter(pRequest, pOut); - return; - } - - // TO DO extend interface in order to read cluster daemon name - String clusterDaemonName = "cd"; - // Create the new server - createServer(onDomain, pClusterName, clusterDaemonName, pServerName, pServerURL, mgmt, pOut); - - // ------------------------------------------------------------- - // Using the domain management EJB to list servers in the domain - // ------------------------------------------------------------- - String[] serverNames = null; - String[] serverNamesDom = null; - String[] servers = null; - String domainName = onDomain.getKeyProperty("name"); - try { - pOut.println("

    Getting list of servers in the domain " + domainName + "

    "); - serverNames = (String[]) mgmt.getAttribute(onDomain, "serverNames"); - servers = (String[]) mgmt.getAttribute(onDomain, "servers"); - pOut.println("
      "); - for (int i = 0; i < serverNames.length; i++) { - String name = serverNames[i]; - /* - String[] signature = {"java.lang.String"}; - String[] params = {name}; - String state = (String) mgmt.invoke(onDomain, "getServerState", params, signature); - pOut.println("
    • " + name + " - " + state + "
    • ");*/ - pOut.println("
    • " + name + "
    • "); - } - pOut.println("
    "); - - } catch (Exception e) { - pOut.println("
  • Could not get list of servers in " + domainName + "
  • " + e); - e.printStackTrace(pOut); - return; - } - // ------------------------------------------------------------- - // Using the cluster management EJBs to list servers in clusters - // ------------------------------------------------------------- - String[] clusters = null; - String clusterName = null; - try { - clusters = (String[]) mgmt.getAttribute(onDomain, "clusters"); - for (int i = 0; i < clusters.length; i++) { - ObjectName onCluster = ObjectName.getInstance(clusters[i]); - clusterName = onCluster.getKeyProperty("name"); - if (!domainName.equals(clusterName)) { - // this is a cluster created by the administrator - // or a physical cluster created transparently - pOut.println("

    Getting list of servers in cluster " + clusterName + "

    "); - String[] signature = {"java.lang.String"}; - String[] params = new String[1]; - params[0] = clusterName; - String[] urls = null; - serverNames = (String[]) mgmt.invoke(onDomain, "getServerNames", params, signature); - pOut.println("
      "); - if (serverNames.length == 0) { - pOut.println("
    • There are no servers.
    • "); - } - for (int j = 0; j < serverNames.length; j++) { - String name = serverNames[j]; - /* - String[] signature = {"java.lang.String"}; - String[] params = {name}; - String state = (String) mgmt.invoke(onCluster, "getServerState", params, signature); - pOut.println("
    • " + name + " - " + state + "
    • "); - */ - pOut.println("
    • " + name + "
    • "); - } - pOut.println("
    "); - } - } - } catch (Exception e) { - pOut.println("
  • Could not get list of servers in clusters with the MEJB.
  • " + e); - e.printStackTrace(pOut); - return; - } - - pOut.println("

    Application is OK

    "); - - // Footer - printNavigationFooter(pRequest, pOut); - } - - /** - * Create J2EEDomain MBean's ObjectName and test if MBean registered - * @param pDomainName the name provided by the user - * @param mgmt MEJB - * @param pOut output stream - * @return true if management operation succeeded - */ - private ObjectName accessJ2EEDomain(String pDomainName, Management mgmt, PrintWriter pOut) { - ObjectName onDomain = null; - pOut.println("

    Access the J2EEDomain MBean

    "); - pOut.println("
      "); - - // Get the J2EEDomain MBean's ObjectName - try { - String name = pDomainName + ":j2eeType=J2EEDomain,name=" + pDomainName; - onDomain = ObjectName.getInstance(name); - pOut.println("
    • J2EEDomain object name created: \"" + name.toString() + "\"
    • "); - } catch (Exception e) { - pOut.println("
    • Cannot create object name for J2EEDomain managed object: " + e + "
    • "); - pOut.println("
    "); - return null; - } - // Check that the J2EEDomain MBean registered - try { - boolean exists = mgmt.isRegistered(onDomain); - if (exists) { - pOut.println("
  • Found this J2EEDomain MBean in the current MBean server
  • "); - pOut.println(""); - } else { - pOut.println("
  • Can't find this J2EEDomain MBean in the current MBean server
  • "); - pOut.println(""); - return null; - } - } catch (Exception e) { - pOut.println("
  • Error when using this J2EEDomain MBean: " + e + "
  • "); - pOut.println(""); - return null; - } - return onDomain; - } - /** - * Add a new server to the domain and possibly attach it to a cluster - * @param pOnDomain J2EDomain ObjectName - * @param pClusterName cluster name - * @param pServerName server name - * @param pServerURL server's JMX remote connection urls - * @param mgmt MEJB - * @param pOut output stream - */ - private void createServer(ObjectName pOnDomain, String pClusterName, String pClusterDaemonName, String pServerName, String pServerURL, Management mgmt, PrintWriter pOut) { - String domainName = pOnDomain.getDomain(); - try { - pOut.println("

    Add a server named " + pServerName + " to the domain " + domainName + "

    "); - pOut.println("
      "); - - String[] signature = new String[4]; - Object[] params = new Object[4]; - signature[0] = "java.lang.String"; - signature[1] = "java.lang.String"; - signature[2] = "java.lang.String"; - signature[3] = "[Ljava.lang.String;"; - params[0] = pServerName; - params[1] = pClusterName; - params[2] = pClusterDaemonName; - String[] urls = new String[1]; - urls[0] = pServerURL; - params[3] = urls; - mgmt.invoke(pOnDomain, "addServer", params, signature); - pOut.println("
    "); - } catch (Exception e) { - pOut.println("
  • Cannot add server " + pServerName + ": " + e + "
  • "); - pOut.println(""); - } - } -} diff --git a/jonas_tests/examples/base/examples/j_common.xml b/jonas_tests/examples/base/examples/j_common.xml deleted file mode 100644 index 76eb51306a7f4e40b75f71d7d6109d3b2bc85436..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/j_common.xml +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/jaasclient/README b/jonas_tests/examples/base/examples/jaasclient/README deleted file mode 100644 index f23dbe46e8c35e3993f9b2661c43e7c24e0491fa..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/jaasclient/README +++ /dev/null @@ -1,90 +0,0 @@ -$Id$ -@author Florent Benoit - -Example Overview: -================= - -This example shows how to use JAAS login modules for the authentication. - -There are two kind of clients. - - Without the use of the client container - - With the use of the client container - -First kind of client (without client container) ------------------------------------------------ -This example includes several ways of entering login and password (CallBack) - - The first way is a command line prompt - - The second way is a swing dialog (a window) - - The first way works without asking the user a login/password. - The login and password are given to the callbackhandler by the client - -You can configure the login module and the resource to use by configuring -the file in the JONAS_ROOT/conf/jaas.config file. - -There are two login modules : - - One for performing the authentication - - One for propagating to the JOnAS server the security context - - -Second kind of client (with client container): -------------------------------------------------- -The choice of the callback handler is done in the application-xml file. - -Two examples of clients are provided. - - jaasopclient1.jar uses the NoInputCallbackHandler as a login/password is - specified in the jonas-client.xml file - - - jaasopclient2.jar uses the CallbackHandler specified in the file - application-client.xml - - - jaasopclient3.jar uses Swing CallbackHandler specified in - application-client.xml file and launch a Swing client - -Both of them use the jaas configuration which is in the client.jar under the -name "jaas.config" - -The JAAS initialization and authentication is perfomed by the client container. - - -Compiling and installing this example: --------------------------------------- - do : ant install - -Running this example: --------------------- - -1) Run a jonas server: - jonas start - -2) Load the jaasop.jar if you have not added it in the ejb service descriptors list : - jonas admin -a jaasop.jar - -You should see something like this when the bean is loaded : - - JAASOp available - -3) Run the client program: - -a/ The client without client container : - ------------------------------------- -on UNIX: - jclient -cp $JONAS_BASE/ejbjars/jaasop.jar jaasclient.ClientJAASOp - -On Windows: - jclient -cp %JONAS_BASE%\ejbjars\jaasop.jar jaasclient.ClientJAASOp - -In fact, the "-cp" option is not useful here, because classes are found in the CLASSPATH. - -b/ A client with client container : - -------------------------------- -first client : -java -jar $JONAS_ROOT/lib/client.jar $JONAS_BASE/clients/jaasopclient1.jar - -second client : -java -jar $JONAS_ROOT/lib/client.jar $JONAS_BASE/clients/jaasopclient2.jar - -third client : -java -jar $JONAS_ROOT/lib/client.jar $JONAS_BASE/clients/jaasopclient3.jar - -4) Stop the jonas server - jonas stop diff --git a/jonas_tests/examples/base/examples/jaasclient/build.xml b/jonas_tests/examples/base/examples/jaasclient/build.xml deleted file mode 100644 index 0773463e1c9e78b18ad3a3740bbc4dcf8a6bb2de..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/jaasclient/build.xml +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/jaasclient/etc/xml/application-client-swing.xml b/jonas_tests/examples/base/examples/jaasclient/etc/xml/application-client-swing.xml deleted file mode 100644 index 19ece057bcb786097d11b1433f48be1073fd87e7..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/jaasclient/etc/xml/application-client-swing.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - Client of the JAASOp sample - - - ejb/JAASOp - Session - jaasclient.beans.secusb.JAASOpHome - jaasclient.beans.secusb.JAASOp - - - org.ow2.jonas.security.auth.callback.DialogCallbackHandler - - diff --git a/jonas_tests/examples/base/examples/jaasclient/etc/xml/application-client.xml b/jonas_tests/examples/base/examples/jaasclient/etc/xml/application-client.xml deleted file mode 100644 index 3430cd1d0f8ed7c528ca776e53503c3334be7847..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/jaasclient/etc/xml/application-client.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - Client of the JAASOp sample - - - ejb/JAASOp - Session - jaasclient.beans.secusb.JAASOpHome - jaasclient.beans.secusb.JAASOp - - - org.ow2.jonas.security.auth.callback.LoginCallbackHandler - - diff --git a/jonas_tests/examples/base/examples/jaasclient/etc/xml/jonas-client1.xml b/jonas_tests/examples/base/examples/jaasclient/etc/xml/jonas-client1.xml deleted file mode 100644 index bd0bc64b632def322be4db43ea9bb4cc8609572a..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/jaasclient/etc/xml/jonas-client1.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - ejb/JAASOp - JAASOpHome - - - - jaas.config - jaasclient - jonas - jonas - - - diff --git a/jonas_tests/examples/base/examples/jaasclient/etc/xml/jonas-client2.xml b/jonas_tests/examples/base/examples/jaasclient/etc/xml/jonas-client2.xml deleted file mode 100644 index a4331e8ff9d7605582a070cef6a4c6b78fac82e3..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/jaasclient/etc/xml/jonas-client2.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - ejb/JAASOp - JAASOpHome - - - - jaas.config - jaasclient - - - diff --git a/jonas_tests/examples/base/examples/jaasclient/etc/xml/jonas-client3.xml b/jonas_tests/examples/base/examples/jaasclient/etc/xml/jonas-client3.xml deleted file mode 100644 index a4331e8ff9d7605582a070cef6a4c6b78fac82e3..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/jaasclient/etc/xml/jonas-client3.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - ejb/JAASOp - JAASOpHome - - - - jaas.config - jaasclient - - - diff --git a/jonas_tests/examples/base/examples/jaasclient/etc/xml/jonas-secusb.xml b/jonas_tests/examples/base/examples/jaasclient/etc/xml/jonas-secusb.xml deleted file mode 100644 index 81fb51bb8df8e03ddc84eb74d7e8ae54c1eb098e..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/jaasclient/etc/xml/jonas-secusb.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - JAASOp - JAASOpHome - - diff --git a/jonas_tests/examples/base/examples/jaasclient/etc/xml/secusb.xml b/jonas_tests/examples/base/examples/jaasclient/etc/xml/secusb.xml deleted file mode 100644 index 763ce558de21d6a80bb8a9464c526a77c00b96ae..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/jaasclient/etc/xml/secusb.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - secured session bean JOnAS example - - secusb (jaasclient) - - - - JAASOp - jaasclient.beans.secusb.JAASOpHome - jaasclient.beans.secusb.JAASOp - jaasclient.beans.secusb.JAASOpBean - Stateful - Container - - - - - - jaas - - - - jaas - - JAASOp - * - - - - - - JAASOp - * - - Supports - - - - - diff --git a/jonas_tests/examples/base/examples/jaasclient/src/jaasclient/ClientJAASOp.java b/jonas_tests/examples/base/examples/jaasclient/src/jaasclient/ClientJAASOp.java deleted file mode 100644 index 31a4d084ccef0d7da13fb0a2b9c4e372fe1508c6..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/jaasclient/src/jaasclient/ClientJAASOp.java +++ /dev/null @@ -1,221 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): jonas team - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package jaasclient; - -import jaasclient.beans.secusb.JAASOp; -import jaasclient.beans.secusb.JAASOpHome; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.rmi.PortableRemoteObject; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.login.LoginContext; -import javax.security.auth.login.LoginException; -import javax.transaction.UserTransaction; - -import org.ow2.jonas.security.auth.callback.DialogCallbackHandler; -import org.ow2.jonas.security.auth.callback.LoginCallbackHandler; -import org.ow2.jonas.security.auth.callback.NoInputCallbackHandler; - -/** - * Sample for Session Bean. Usage: jclient jaasclient.ClientJAASOp - * @author jonas team - * @author Florent Benoit : use a JAAS login module configuration for the - * authentication - */ -public class ClientJAASOp { - - /** - * First amount to buy - */ - private static final int FIRST_BUY_AMOUNT = 10; - - /** - * Second amount to buy - */ - private static final int SECOND_BUY_AMOUNT = 20; - - /** - * Third amount to buy (will be rollback) - */ - private static final int THIRD_BUY_AMOUNT = 50; - - /** - * Constructor. Hide constructor as it is an utility class - */ - private ClientJAASOp() { - - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - //Check if there are valid args - if (args.length != 1) { - System.err.println("Syntax is : jclient jaasclient.ClientJAASOp "); - System.err.println(" - text : Prompt the user to enter login/password by command line"); - System.err.println(" - dialog : Prompt the user to enter login/password by a window dialog"); - System.err.println(" - noprompt : No prompt is asked to the user. A default login/password is used"); - System.exit(2); - } - - // Which handler use ? - CallbackHandler handler = null; - - if (args[0].equalsIgnoreCase("text")) { - handler = new LoginCallbackHandler(); - } else if (args[0].equalsIgnoreCase("dialog")) { - handler = new DialogCallbackHandler(); - } else if (args[0].equalsIgnoreCase("noprompt")) { - handler = new NoInputCallbackHandler("jonas", "jonas"); - } else { - System.err.println("Invalid type '" + args[0] - + "', valid syntax is : jclient jaasclient.ClientJAASOp "); - System.exit(2); - } - - Context initialContext = null; - try { - initialContext = new InitialContext(); - } catch (Exception e) { - System.err.println("Cannot get initial context for JNDI: " + e); - System.exit(2); - } - - // Obtain a LoginContext - LoginContext lc = null; - try { - lc = new LoginContext("jaasclient", handler); - } catch (LoginException le) { - System.err.println("Cannot create LoginContext: " + le.getMessage()); - System.exit(2); - } catch (SecurityException se) { - System.err.println("Cannot create LoginContext: " + se.getMessage()); - System.exit(2); - } - - System.out - .println("Use the l/p jonas/jonas to authenticate with the right role.\nYou can change this by editing the file JONAS_ROOT/conf/jonas-realm.xml."); - - // Login - try { - lc.login(); - } catch (LoginException le) { - System.err.println("Authentication failed : " + le.getMessage()); - System.exit(2); - } - - // Authentication is ok - System.out.println("Authentication succeeded"); - - // We want to start transactions from client: get UserTransaction - UserTransaction utx = null; - try { - - // Comment the following lines if you want to use a David Client: - utx = (UserTransaction) initialContext.lookup("javax.transaction.UserTransaction"); - } catch (Exception e) { - System.err.println("Cannot lookup UserTransaction: " + e); - System.exit(2); - } - - // Connecting to JAASOpHome thru JNDI - JAASOpHome home = null; - try { - home = (JAASOpHome) PortableRemoteObject.narrow(initialContext.lookup("JAASOpHome"), JAASOpHome.class); - } catch (Exception e) { - System.err.println("Cannot lookup JAASOpHome: " + e - + ". Maybe you haven't do the 'jonas admin -a jaasop.jar'"); - System.exit(2); - } - - // JAASOpBean creation - JAASOp t1 = null; - try { - System.out.println("Create a bean"); - t1 = home.create("User1"); - } catch (Exception e) { - System.err.println("Cannot create JAASOpBean: " + e); - System.exit(2); - } - - // First transaction (committed) - try { - System.out.println("Start a first transaction"); - utx.begin(); - System.out.println("First request on the new bean"); - t1.buy(FIRST_BUY_AMOUNT); - System.out.println("Second request on the bean"); - t1.buy(SECOND_BUY_AMOUNT); - System.out.println("Commit the transaction"); - utx.commit(); - } catch (Exception e) { - System.err.println("exception during 1st Tx: " + e); - System.exit(2); - } - // Start another transaction (rolled back) - try { - System.out.println("Start a second transaction"); - utx.begin(); - t1.buy(THIRD_BUY_AMOUNT); - System.out.println("Rollback the transaction"); - utx.rollback(); - } catch (Exception e) { - System.err.println("exception during 2nd Tx: " + e); - System.exit(2); - } - - // Get the total bought, outside the transaction - int val = 0; - try { - System.out.println("Request outside any transaction"); - val = t1.read(); - } catch (Exception e) { - System.err.println("Cannot read value on t1 : " + e); - System.exit(2); - } - if (val != FIRST_BUY_AMOUNT + SECOND_BUY_AMOUNT) { - System.err.println("Bad value read: " + val); - System.exit(2); - } - - // Remove Session bean - try { - t1.remove(); - } catch (Exception e) { - System.out.println("Exception on buy: " + e); - System.exit(2); - } - System.out.println("ClientJAASOp OK. Exiting."); - System.exit(0); - } -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/jaasclient/src/jaasclient/ClientJAASOpContClient.java b/jonas_tests/examples/base/examples/jaasclient/src/jaasclient/ClientJAASOpContClient.java deleted file mode 100644 index 638d7b840c91f0c359419043e25b84aafd9110db..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/jaasclient/src/jaasclient/ClientJAASOpContClient.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): jonas team - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package jaasclient; - -// import javax -import jaasclient.beans.secusb.JAASOp; -import jaasclient.beans.secusb.JAASOpHome; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.rmi.PortableRemoteObject; -import javax.transaction.UserTransaction; - -/** - * Sample for Session Bean. - * Usage: - * jclient jaasclient.ClientJAASOpContClient - * @author jonas team - * @author Florent Benoit - */ -public class ClientJAASOpContClient { - - /** - * First amount to buy - */ - private static final int FIRST_BUY_AMOUNT = 10; - - /** - * Second amount to buy - */ - private static final int SECOND_BUY_AMOUNT = 20; - - /** - * Third amount to buy (will be rollback) - */ - private static final int THIRD_BUY_AMOUNT = 50; - - /** - * Constructor. Hide constructor as it is an utility class - */ - private ClientJAASOpContClient() { - - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - Context initialContext = null; - try { - initialContext = new InitialContext(); - } catch (Exception e) { - System.err.println("Cannot get initial context for JNDI: " + e); - System.exit(2); - } - - // We want to start transactions from client: get UserTransaction - UserTransaction utx = null; - try { - utx = (UserTransaction) initialContext.lookup("java:comp/UserTransaction"); - } catch (Exception e) { - System.err.println("Cannot lookup java:comp/UserTransaction: " + e); - System.exit(2); - } - - // Connecting to JAASOpHome thru JNDI - JAASOpHome home = null; - try { - home = (JAASOpHome) PortableRemoteObject.narrow(initialContext.lookup("java:comp/env/ejb/JAASOp"), JAASOpHome.class); - } catch (Exception e) { - System.err.println("Cannot lookup java:comp/env/ejb/JAASOp: " + e + ". Maybe you haven't do the 'jonas admin -a jaasop.jar'"); - System.exit(2); - } - - // JAASOpBean creation - JAASOp t1 = null; - try { - System.out.println("Create a bean"); - t1 = home.create("User1"); - } catch (Exception e) { - System.err.println("Cannot create JAASOpBean: " + e); - System.exit(2); - } - - // First transaction (committed) - try { - System.out.println("Start a first transaction"); - utx.begin(); - System.out.println("First request on the new bean"); - t1.buy(FIRST_BUY_AMOUNT); - System.out.println("Second request on the bean"); - t1.buy(SECOND_BUY_AMOUNT); - System.out.println("Commit the transaction"); - utx.commit(); - } catch (Exception e) { - System.err.println("exception during 1st Tx: " + e); - System.exit(2); - } - // Start another transaction (rolled back) - try { - System.out.println("Start a second transaction"); - utx.begin(); - t1.buy(THIRD_BUY_AMOUNT); - System.out.println("Rollback the transaction"); - utx.rollback(); - } catch (Exception e) { - System.err.println("exception during 2nd Tx: " + e); - System.exit(2); - } - - // Get the total bought, outside the transaction - int val = 0; - try { - System.out.println("Request outside any transaction"); - val = t1.read(); - } catch (Exception e) { - System.err.println("Cannot read value on t1 : " + e); - System.exit(2); - } - if (val != FIRST_BUY_AMOUNT + SECOND_BUY_AMOUNT) { - System.err.println("Bad value read: " + val); - System.exit(2); - } - - // Remove Session bean - try { - t1.remove(); - } catch (Exception e) { - System.out.println("Exception on buy: " + e); - System.exit(2); - } - System.out.println("ClientJAASOpContClient OK. Exiting."); - System.exit(0); - } -} diff --git a/jonas_tests/examples/base/examples/jaasclient/src/jaasclient/ClientJAASOpContClientSwing.java b/jonas_tests/examples/base/examples/jaasclient/src/jaasclient/ClientJAASOpContClientSwing.java deleted file mode 100644 index 85e3725cf04bec5926abac5153d2db700e5b4b1c..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/jaasclient/src/jaasclient/ClientJAASOpContClientSwing.java +++ /dev/null @@ -1,184 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): jonas team - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package jaasclient; - -import jaasclient.beans.secusb.JAASOp; -import jaasclient.beans.secusb.JAASOpHome; - -import java.awt.event.ActionEvent; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.rmi.PortableRemoteObject; -import javax.swing.AbstractAction; -import javax.swing.Action; -import javax.swing.JButton; -import javax.swing.JFrame; -import javax.swing.WindowConstants; -import javax.transaction.UserTransaction; - -/** - * Sample for Session Bean. - * @author jonas team - * @author Florent Benoit - * @author Markus Karg : Add Swing interface - */ -public class ClientJAASOpContClientSwing { - - /** - * First amount to buy - */ - private static final int FIRST_BUY_AMOUNT = 10; - - /** - * Second amount to buy - */ - private static final int SECOND_BUY_AMOUNT = 20; - - /** - * Third amount to buy (will be rollback) - */ - private static final int THIRD_BUY_AMOUNT = 50; - - /** - * Constructor. Hide constructor as it is an utility class - */ - private ClientJAASOpContClientSwing() { - - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - - final JFrame jf = new JFrame("Test Application"); - jf.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); - final JButton jb = new JButton(); - final Action a = new AbstractAction("Click here to test!") { - public final void actionPerformed(final ActionEvent v) { - - - Context initialContext = null; - try { - initialContext = new InitialContext(); - } catch (Exception e) { - System.err.println("Cannot get initial context for JNDI: " + e); - System.exit(2); - } - - // We want to start transactions from client: get UserTransaction - UserTransaction utx = null; - try { - utx = (UserTransaction) initialContext.lookup("java:comp/UserTransaction"); - } catch (Exception e) { - System.err.println("Cannot lookup java:comp/UserTransaction: " + e); - System.exit(2); - } - - // Connecting to JAASOpHome thru JNDI - JAASOpHome home = null; - try { - home = (JAASOpHome) PortableRemoteObject.narrow(initialContext.lookup("java:comp/env/ejb/JAASOp"), JAASOpHome.class); - } catch (Exception e) { - System.err.println("Cannot lookup java:comp/env/ejb/JAASOp: " + e + ". Maybe you haven't do the 'jonas admin -a jaasop.jar'"); - System.exit(2); - } - - // JAASOpBean creation - JAASOp t1 = null; - try { - System.out.println("Create a bean"); - t1 = home.create("User1"); - } catch (Exception e) { - System.err.println("Cannot create JAASOpBean: " + e); - System.exit(2); - } - - // First transaction (committed) - try { - System.out.println("Start a first transaction"); - utx.begin(); - System.out.println("First request on the new bean"); - t1.buy(FIRST_BUY_AMOUNT); - System.out.println("Second request on the bean"); - t1.buy(SECOND_BUY_AMOUNT); - System.out.println("Commit the transaction"); - utx.commit(); - } catch (Exception e) { - System.err.println("exception during 1st Tx: " + e); - System.exit(2); - } - // Start another transaction (rolled back) - try { - System.out.println("Start a second transaction"); - utx.begin(); - t1.buy(THIRD_BUY_AMOUNT); - System.out.println("Rollback the transaction"); - utx.rollback(); - } catch (Exception e) { - System.err.println("exception during 2nd Tx: " + e); - System.exit(2); - } - - // Get the total bought, outside the transaction - int val = 0; - try { - System.out.println("Request outside any transaction"); - val = t1.read(); - } catch (Exception e) { - System.err.println("Cannot read value on t1 : " + e); - System.exit(2); - } - if (val != FIRST_BUY_AMOUNT + SECOND_BUY_AMOUNT) { - System.err.println("Bad value read: " + val); - System.exit(2); - } - - // Remove Session bean - try { - t1.remove(); - } catch (Exception e) { - System.out.println("Exception on buy: " + e); - System.exit(2); - } - System.out.println("ClientJAASOpContClientSwing OK. Exiting."); - System.exit(0); - - - - } - }; - jb.setAction(a); - jf.getContentPane().add(jb); - jf.pack(); - jf.setVisible(true); - } -} diff --git a/jonas_tests/examples/base/examples/jaasclient/src/jaasclient/beans/secusb/JAASOp.java b/jonas_tests/examples/base/examples/jaasclient/src/jaasclient/beans/secusb/JAASOp.java deleted file mode 100644 index a0ad103433e5792e70602a38416c67f3e5a71015..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/jaasclient/src/jaasclient/beans/secusb/JAASOp.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package jaasclient.beans.secusb; - -import java.rmi.RemoteException; - -import javax.ejb.EJBObject; - -/** - * Remote interface for the bean JAASOp - * @author JOnAS team - */ -public interface JAASOp extends EJBObject { - - /** - * Business method implementation. - * @param shares nb of shares to be bought - * @throws RemoteException if RMI failed. - */ - void buy (int shares) throws RemoteException; - - /** - * Business method implementation. - * @return the nb of shares bought - * @throws RemoteException if RMI failed. - */ - int read () throws RemoteException; - -} diff --git a/jonas_tests/examples/base/examples/jaasclient/src/jaasclient/beans/secusb/JAASOpBean.java b/jonas_tests/examples/base/examples/jaasclient/src/jaasclient/beans/secusb/JAASOpBean.java deleted file mode 100644 index 85b4aaf468150df03ff442a4c5de85d6f51c8235..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/jaasclient/src/jaasclient/beans/secusb/JAASOpBean.java +++ /dev/null @@ -1,240 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package jaasclient.beans.secusb; - -import javax.ejb.EJBException; -import javax.ejb.SessionBean; -import javax.ejb.SessionContext; -import javax.ejb.SessionSynchronization; - -/** - * This is an example of Session Bean, statefull, and synchronized. - * @author JOnAS team - */ -public class JAASOpBean implements SessionBean, SessionSynchronization { - - /** - * Actual state of the bean - */ - private int total = 0; - - /** - * value inside Tx, not yet committed. - */ - private int newtotal = 0; - - /** - * User client - */ - private String clientUser = null; - - /* ========================= ejbCreate methods ============================ */ - - /** - * There must be one ejbCreate() method per create() method on the Home - * interface, and with the same signature. - * @param user the user name - */ - public void ejbCreate(String user) { - total = 0; - // in case we are outside transactions - newtotal = total; - clientUser = user; - } - - /* =============== javax.ejb.SessionBean 2.0 implementation ============== */ - - /** - * The activate method is called when the instance is activated from its - * "passive" state. The instance should acquire any resource that it has - * released earlier in the ejbPassivate() method. This method is called with - * no transaction context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException This exception is defined in the method - * signature to provide backward compatibility for enterprise beans - * written for the EJB 1.0 specification. Enterprise beans written - * for the EJB 1.1 specification should throw the - * javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB2.0 and higher specifications must throw - * the javax.ejb.EJBException instead of this exception. - */ - public void ejbActivate() throws EJBException, java.rmi.RemoteException { - // Nothing to do for this simple example - } - - /** - * The passivate method is called before the instance enters the "passive" - * state. The instance should release any resources that it can re-acquire - * later in the ejbActivate() method. After the passivate method completes, - * the instance must be in a state that allows the container to use the Java - * Serialization protocol to externalize and store away the instance's - * state. This method is called with no transaction context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException This exception is defined in the method - * signature to provide backward compatibility for enterprise beans - * written for the EJB 1.0 specification. Enterprise beans written - * for the EJB 1.1 specification should throw the - * javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB2.0 and higher specifications must throw - * the javax.ejb.EJBException instead of this exception. - */ - public void ejbPassivate() throws EJBException, java.rmi.RemoteException { - // Nothing to do for this simple example - } - - /** - * A container invokes this method before it ends the life of the session - * object. This happens as a result of a client's invoking a remove - * operation, or when a container decides to terminate the session object - * after a timeout. This method is called with no transaction context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException This exception is defined in the method - * signature to provide backward compatibility for enterprise beans - * written for the EJB 1.0 specification. Enterprise beans written - * for the EJB 1.1 specification should throw the - * javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB2.0 and higher specifications must throw - * the javax.ejb.EJBException instead of this exception. - */ - public void ejbRemove() throws EJBException, java.rmi.RemoteException { - // Nothing to do for this simple example - } - - /** - * Set the associated session context. The container calls this method after - * the instance creation. The enterprise Bean instance should store the - * reference to the context object in an instance variable. This method is - * called with no transaction context. - * @param sessionContext A SessionContext interface for the instance. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException This exception is defined in the method - * signature to provide backward compatibility for applications - * written for the EJB 1.0 specification. Enterprise beans written - * for the EJB 1.1 specification should throw the - * javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB2.0 and higher specifications must throw - * the javax.ejb.EJBException instead of this exception. - */ - public void setSessionContext(SessionContext sessionContext) throws EJBException, java.rmi.RemoteException { - } - - /* - * ============== javax.ejb.SessionSynchronization implementation - * ============= - */ - - /** - * The afterBegin method notifies a session Bean instance that a new - * transaction has started, and that the subsequent business methods on the - * instance will be invoked in the context of the transaction. The instance - * can use this method, for example, to read data from a database and cache - * the data in the instance fields. This method executes in the proper - * transaction context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException - This exception is defined in the - * method signature to provide backward compatibility for enterprise - * beans written for the EJB 1.0 specification. Enterprise beans - * written for the EJB 1.1 and higher specifications should throw - * the javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB 2.0 and higher specifications must not - * throw the java.rmi.RemoteException. - */ - public void afterBegin() throws EJBException, java.rmi.RemoteException { - newtotal = total; - } - - /** - * The beforeCompletion method notifies a session Bean instance that a - * transaction is about to be committed. The instance can use this method, - * for example, to write any cached data to a database. This method executes - * in the proper transaction context. Note: The instance may still - * cause the container to rollback the transaction by invoking the - * setRollbackOnly() method on the instance context, or by throwing an - * exception. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException - This exception is defined in the - * method signature to provide backward compatibility for enterprise - * beans written for the EJB 1.0 specification. Enterprise beans - * written for the EJB 1.1 and higher specifications should throw - * the javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB 2.0 and higher specifications must not - * throw the java.rmi.RemoteException. - */ - public void beforeCompletion() throws EJBException, java.rmi.RemoteException { - } - - /** - * The afterCompletion method notifies a session Bean instance that a - * transaction commit protocol has completed, and tells the instance whether - * the transaction has been committed or rolled back. This method executes - * with no transaction context. - * @param committed - True if the transaction has been committed, false if - * is has been rolled back. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException - This exception is defined in the - * method signature to provide backward compatibility for enterprise - * beans written for the EJB 1.0 specification. Enterprise beans - * written for the EJB 1.1 and higher specifications should throw - * the javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB 2.0 and higher specifications must not - * throw the java.rmi.RemoteException. - */ - public void afterCompletion(boolean committed) throws EJBException, java.rmi.RemoteException { - - if (committed) { - total = newtotal; - } else { - newtotal = total; - } - } - - /* ========================= Op implementation ============================ */ - - /** - * Business method implementation. - * @param s nb of shares to be bought - */ - public void buy(int s) { - newtotal = newtotal + s; - return; - } - - /** - * Business method implementation. - * @return the nb of shares bought - */ - public int read() { - return newtotal; - } -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/jaasclient/src/jaasclient/beans/secusb/JAASOpHome.java b/jonas_tests/examples/base/examples/jaasclient/src/jaasclient/beans/secusb/JAASOpHome.java deleted file mode 100644 index aef5a80e2380c1a98a23d68b38d0dd14c0ff7e74..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/jaasclient/src/jaasclient/beans/secusb/JAASOpHome.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package jaasclient.beans.secusb; - -import java.rmi.RemoteException; - -import javax.ejb.CreateException; -import javax.ejb.EJBHome; - -/** - * Home interface for the bean JAASOp - * @author JOnAS team - */ -public interface JAASOpHome extends EJBHome { - - /** - * Create an instance of the Op bean. - * @param user the user name. - * @return the Remote interface of the bean Op. - * @throws CreateException if the creation failed. - * @throws RemoteException if the RMI call failed. - */ - JAASOp create(String user) throws CreateException, RemoteException; -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/jdo/Bank_src.zip b/jonas_tests/examples/base/examples/jdo/Bank_src.zip deleted file mode 100644 index daf554b007c0a03a721b63816e0f16adc20718e7..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/jdo/Bank_src.zip and /dev/null differ diff --git a/jonas_tests/examples/base/examples/jdo/README b/jonas_tests/examples/base/examples/jdo/README deleted file mode 100644 index 81e23ed261e101087845ccbd7f1ce6acfc92213a..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/jdo/README +++ /dev/null @@ -1,65 +0,0 @@ - -Example Overview -================ - -This example shows how to use Speedo, an open source implementation of JDO, via a Resource Adapter. -It's the 'bank' Speedo example and it was copied as it is from the Speedo project. -See - http://speedo.objectweb.org/ -for more information. - - -Prerequisites -============= - -1) Speedo Resource Adapter configuration in JOnAS: -- Check that the 'resource' service is present in the list of the JOnAS services - (see the jonas.services property in the jonas.properties) -- If JONAS_BASE is using, check that the speedo_for_jonas_ra.rar is present - cp $JONAS_ROOT/rars/speedo-jdo_for_jonas_ra.rar $JONAS_BASE/rars - - -2) Speedo configuration: -Update the Speedo configuration - cp $JONAS_ROOT/conf/speedo-jdo.properties $JONAS_BASE/conf - - -Building this example -===================== - -Under $JONAS_ROOT/examples/jdo, do - $ ant install - - -Creating the data structure -=========================== - -The first time, you must create the tables in the data base used in this example. -For that, you can use a special ant target with some properties setted with correct values: - $ ant -Dspeedo.dbconf=(${JONAS_BASE}|${JONAS_ROOT})/conf/.properties - -Djdbc.driver=.jar - createDataStruct - -For example: - $ ant -Dspeedo.dbconf=$JONAS_BASE/conf/PostgreSQL1.properties -Djdbc.driver=/usr/share/postgresql/pg74.215.jdbc3.jar createDataStruct - - -Running this example -==================== -Commands are given for an Unix system, similar commands can be done on Windows. - -1) Run a JOnAS server with speedo: - $ jonas start - $ jonas admin -a speedo-jdo_for_jonas_ra.rar - -2) Load the ejb-jar file of this example - $ jonas admin -a bank.jar - -3) Run the client - $ jclient -cp $JONAS_BASE/ejbjars/bank.jar:$JONAS_ROOT/lib/commons/jonas/speedo/speedo-jdo_client.jar Client - -4) Stop the JOnAS server - $ jonas stop - - - diff --git a/jonas_tests/examples/base/examples/jdo/build.xml b/jonas_tests/examples/base/examples/jdo/build.xml deleted file mode 100644 index 6c276d9aecc636629060a36524fb1f36648ab820..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/jdo/build.xml +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/jonas-common.xml b/jonas_tests/examples/base/examples/jonas-common.xml deleted file mode 100644 index 5cbe72064f34c0968e454ff68b6f2a9673ee9664..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/jonas-common.xml +++ /dev/null @@ -1,275 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/src/build.xml b/jonas_tests/examples/base/examples/src/build.xml deleted file mode 100644 index 8fc33165cf79240882f54a9cfc8faaeec742637e..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/build.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/src/eb/Account.idb b/jonas_tests/examples/base/examples/src/eb/Account.idb deleted file mode 100644 index 7c6ade33e9cc62182a3a0efb3ea9dd7701712f48..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/eb/Account.idb +++ /dev/null @@ -1,23 +0,0 @@ -; First load the JDBC driver and open a database. -d org.enhydra.instantdb.jdbc.idbDriver; -; for Instantdb version older than v3.14, put the following line instead: -; d jdbc.idbDriver; -o jdbc:idb=db1.prp; - -; Create the table -e DROP TABLE accountsample_; -e CREATE TABLE accountsample_ ( - accno_ int PRIMARY KEY, - customer_ VARCHAR(30), - balance_ double); - -; put some initial data in the table -p INSERT INTO accountsample_ VALUES (?,?,?); -s 101,'Antoine de St Exupery', 200.00; -s 102,'Alexandre Dumas fils', 400.00; -s 103,'Conan Doyle', 500.00; -s 104,'Alfred de Musset', 100.00; -s 105,'Phileas Lebegue', 350.00; -s 106,'Alphonse de Lamartine', 650.00; -q SELECT * FROM accountsample_; -c close; diff --git a/jonas_tests/examples/base/examples/src/eb/Account.java b/jonas_tests/examples/base/examples/src/eb/Account.java deleted file mode 100644 index 8dd7aa56fb85031e6905c2a59eb3f92292b7b8b2..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/eb/Account.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package eb; - -import java.rmi.RemoteException; - -import javax.ejb.EJBObject; - -/** - * Remote interface for the bean Account - * @author JOnAS team - */ -public interface Account extends EJBObject { - - double getBalance() throws RemoteException; - - void setBalance(double d) throws RemoteException; - - String getCustomer() throws RemoteException; - - void setCustomer(String c) throws RemoteException; - - int getNumber() throws RemoteException; -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/eb/Account.pgsql b/jonas_tests/examples/base/examples/src/eb/Account.pgsql deleted file mode 100644 index 2cdde8888893bf4a6f6dd8966b6dfe6dd3b67db4..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/eb/Account.pgsql +++ /dev/null @@ -1,12 +0,0 @@ -drop table accountsample_; -create table accountsample_ ( - accno_ integer primary key, - customer_ varchar(30), - balance_ float8 -); -insert into accountsample_ values(101, 'Antoine de St Exupery', 200.00); -insert into accountsample_ values(102, 'alexandre dumas fils', 400.00); -insert into accountsample_ values(103, 'conan doyle', 500.00); -insert into accountsample_ values(104, 'alfred de musset', 100.00); -insert into accountsample_ values(105, 'phileas lebegue', 350.00); -insert into accountsample_ values(106, 'alphonse de lamartine', 650.00); diff --git a/jonas_tests/examples/base/examples/src/eb/Account.sql b/jonas_tests/examples/base/examples/src/eb/Account.sql deleted file mode 100644 index 9838afcb83c62f86cafe82c2dffc39c270055d1e..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/eb/Account.sql +++ /dev/null @@ -1,12 +0,0 @@ -drop table accountsample_; -create table accountsample_ ( - accno_ integer primary key, - customer_ varchar(30), - balance_ number(15, 4) -); -insert into accountsample_ values(101, 'Antoine de St Exupery', 200.00); -insert into accountsample_ values(102, 'alexandre dumas fils', 400.00); -insert into accountsample_ values(103, 'conan doyle', 500.00); -insert into accountsample_ values(104, 'alfred de musset', 100.00); -insert into accountsample_ values(105, 'phileas lebegue', 350.00); -insert into accountsample_ values(106, 'alphonse de lamartine', 650.00); diff --git a/jonas_tests/examples/base/examples/src/eb/AccountExplBean.java b/jonas_tests/examples/base/examples/src/eb/AccountExplBean.java deleted file mode 100644 index 1d759eb781a8eeeb37500bb8e939716a099321fa..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/eb/AccountExplBean.java +++ /dev/null @@ -1,541 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package eb; - -import java.rmi.RemoteException; -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.Enumeration; -import java.util.Vector; - -import javax.ejb.CreateException; -import javax.ejb.EJBException; -import javax.ejb.EntityBean; -import javax.ejb.EntityContext; -import javax.ejb.FinderException; -import javax.ejb.ObjectNotFoundException; -import javax.ejb.RemoveException; -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.sql.DataSource; - -/** - * AccountExplBean is an entity bean with "bean managed persistence". The state - * of an instance is stored into a relational database. The following table - * should exist: create table ACCOUNT (ACCNO integer primary key, CUSTOMER - * varchar(30), BALANCE number(15,4)); Note : In order to keep the code - * readable, not all database errors have been handled. In particular the - * closing of the statement and of the connexion would have being put in a - * "finally" block. - * @author JOnAS team - */ - -public class AccountExplBean implements EntityBean { - - private DataSource dataSource = null; - - // Keep the reference on the EntityContext - protected EntityContext entityContext; - - // Object state - must de public (EJB spec.) - public Integer accno; - - public String customer; - - public double balance; - - /* ========================= ejbCreate methods ============================ */ - - /** - * There must be one ejbCreate() method per create() method on the Home - * interface, and with the same signature. - * @param accno account number - * @param customer customer name - * @param balance initial balance - * @return pk primary key - * @exception CreateException If the instance could not perform the function - * requested by the container - */ - public Integer ejbCreate(int val_accno, String val_customer, double val_balance) throws CreateException { - - // Init object state - accno = new Integer(val_accno); - customer = val_customer; - balance = val_balance; - - Connection conn = null; - PreparedStatement stmt = null; - try { - // get a connection for this transaction context - conn = getConnection(); - - // create object in DB - stmt = conn.prepareStatement("insert into accountsample_ (accno_, customer_, balance_) values (?, ?, ?)"); - stmt.setInt(1, accno.intValue()); - stmt.setString(2, customer); - stmt.setDouble(3, balance); - stmt.executeUpdate(); - - } catch (SQLException e) { - throw new CreateException("Failed to create bean in database: " + e); - } finally { - try { - if (stmt != null) { - //close statement - stmt.close(); - } - if (conn != null) { - //release connection - conn.close(); - } - } catch (Exception ignore) { - } - } - // Return the primary key - return accno; - } - - /** - * Each ejbCreate method should have a matching ejbPostCreate method - */ - public void ejbPostCreate(int val_accno, String val_customer, double val_balance) { - // Nothing to be done for this simple example. - } - - /* - * ====================== javax.ejb.EntityBean implementation - * ================= - */ - - /** - * A container invokes this method when the instance is taken out of the - * pool of available instances to become associated with a specific EJB - * object. This method transitions the instance to the ready state. This - * method executes in an unspecified transaction context. - * @exception EJBException Thrown by the method to indicate a failure caused - * by a system-level error. - */ - public void ejbActivate() { - // Nothing to be done for this simple example. - } - - /** - * A container invokes this method to instruct the instance to synchronize - * its state by loading it state from the underlying database. This method - * always executes in the proper transaction context. - * @exception EJBException Thrown by the method to indicate a failure caused - * by a system-level error. - * @exception RemoteException - This exception is defined in the method - * signature to provide backward compatibility for enterprise - * beans written for the EJB 1.0 specification. Enterprise beans - * written for the EJB 1.1 and higher specification should throw - * the javax.ejb.EJBException instead of this exception. - */ - public void ejbLoad() { - Connection conn = null; - PreparedStatement stmt = null; - try { - // get a connection for this transaction context - conn = getConnection(); - - // find account in DB - stmt = conn.prepareStatement("select customer_,balance_ from accountsample_ where accno_=?"); - Integer pk = (Integer) entityContext.getPrimaryKey(); - stmt.setInt(1, pk.intValue()); - ResultSet rs = stmt.executeQuery(); - if (!rs.next()) { - throw new EJBException("Failed to load bean from database"); - } - - // update object state - accno = pk; - customer = rs.getString("customer_"); - balance = rs.getDouble("balance_"); - - } catch (SQLException e) { - throw new EJBException("Failed to load bean from database " + e); - } finally { - try { - if (stmt != null) { - //close statement - stmt.close(); - } - if (conn != null) { - //release connection - conn.close(); - } - } catch (Exception ignore) { - } - } - } - - /** - * A container invokes this method on an instance before the instance - * becomes disassociated with a specific EJB object. After this method - * completes, the container will place the instance into the pool of - * available instances. This method executes in an unspecified transaction - * context. - * @exception EJBException Thrown by the method to indicate a failure caused - * by a system-level error. - */ - public void ejbPassivate() { - // Nothing to be done for this simple example. - } - - /** - * A container invokes this method before it removes the EJB object that is - * currently associated with the instance. This method is invoked when a - * client invokes a remove operation on the enterprise Bean's home interface - * or the EJB object's remote interface. This method transitions the - * instance from the ready state to the pool of available instances. This - * method is called in the transaction context of the remove operation. - * @exception EJBException Thrown by the method to indicate a failure caused - * by a system-level error. - * @exception RemoteException - This exception is defined in the method - * signature to provide backward compatibility for enterprise - * beans written for the EJB 1.0 specification. Enterprise beans - * written for the EJB 1.1 and higher specification should throw - * the javax.ejb.EJBException instead of this exception. - * @exception RemoveException The enterprise Bean does not allow destruction - * of the object. - */ - public void ejbRemove() throws RemoveException { - Connection conn = null; - PreparedStatement stmt = null; - try { - // get a connection for this transaction context - conn = getConnection(); - - // delete Object in DB - stmt = conn.prepareStatement("delete from accountsample_ where accno_=?"); - Integer pk = (Integer) entityContext.getPrimaryKey(); - stmt.setInt(1, pk.intValue()); - stmt.executeUpdate(); - - } catch (SQLException e) { - throw new RemoveException("Failed to delete bean from database" + e); - } finally { - try { - if (stmt != null) { - //close statement - stmt.close(); - } - if (conn != null) { - //release connection - conn.close(); - } - } catch (Exception ignore) { - } - } - } - - /** - * A container invokes this method to instruct the instance to synchronize - * its state by storing it to the underlying database. This method always - * executes in the proper transaction context. - * @exception EJBException Thrown by the method to indicate a failure caused - * by a system-level error. - * @exception RemoteException - This exception is defined in the method - * signature to provide backward compatibility for enterprise - * beans written for the EJB 1.0 specification. Enterprise beans - * written for the EJB 1.1 and higher specification should throw - * the javax.ejb.EJBException instead of this exception. - */ - public void ejbStore() { - Connection conn = null; - PreparedStatement stmt = null; - try { - // get a connection for this transaction context - conn = getConnection(); - - // store Object state in DB - stmt = conn.prepareStatement("update accountsample_ set customer_=?,balance_=? where accno_=?"); - stmt.setString(1, customer); - stmt.setDouble(2, balance); - Integer pk = (Integer) entityContext.getPrimaryKey(); - stmt.setInt(3, pk.intValue()); - stmt.executeUpdate(); - - } catch (SQLException e) { - throw new EJBException("Failed to store bean to database " + e); - } finally { - try { - if (stmt != null) { - //close statement - stmt.close(); - } - if (conn != null) { - //release connection - conn.close(); - } - } catch (Exception ignore) { - } - } - } - - /** - * Sets the associated entity context. The container invokes this method on - * an instance after the instance has been created. This method is called in - * an unspecified transaction context. - * @param ctx - An EntityContext interface for the instance. The instance - * should store the reference to the context in an instance variable. - * @exception EJBException Thrown by the method to indicate a failure caused - * by a system-level error. - * @exception RemoteException - This exception is defined in the method - * signature to provide backward compatibility for enterprise - * beans written for the EJB 1.0 specification. Enterprise beans - * written for the EJB 1.1 and higher specification should throw - * the javax.ejb.EJBException instead of this exception. - */ - public void setEntityContext(EntityContext ctx) { - - // Keep the entity context in object - entityContext = ctx; - - } - - /** - * Unsets the associated entity context. The container calls this method - * before removing the instance. This is the last method that the container - * invokes on the instance. The Java garbage collector will eventually - * invoke the finalize() method on the instance. This method is called in an - * unspecified transaction context. - * @exception EJBException Thrown by the method to indicate a failure caused - * by a system-level error. - * @exception RemoteException - This exception is defined in the method - * signature to provide backward compatibility for enterprise - * beans written for the EJB 1.0 specification. Enterprise beans - * written for the EJB 1.1 and higher specification should throw - * the javax.ejb.EJBException instead of this exception. - */ - public void unsetEntityContext() { - entityContext = null; - } - - /* ============================ ejbFind methods =========================== */ - - /** - * There must be one ejbFind method per find method on the Home interface, - * and with the same signature. ejbFindByPrimaryKey is the only mandatory - * ejbFind method. - * @param pk The primary key - * @return pk The primary key - * @exception FinderException - Failed to execute the query. - * @exception ObjectNotFoundException - Object not found for this primary - * key. - */ - public Integer ejbFindByPrimaryKey(Integer pk) throws ObjectNotFoundException, FinderException { - - Connection conn = null; - PreparedStatement stmt = null; - try { - // get a connection for this transaction context - conn = getConnection(); - - // lookup for this primary key in DB - stmt = conn.prepareStatement("select accno_ from accountsample_ where accno_=?"); - stmt.setInt(1, pk.intValue()); - ResultSet rs = stmt.executeQuery(); - if (!rs.next()) { - throw new javax.ejb.ObjectNotFoundException(); - } - - } catch (SQLException e) { - throw new javax.ejb.FinderException("Failed to executeQuery " + e); - } finally { - try { - if (stmt != null) { - //close statement - stmt.close(); - } - if (conn != null) { - //release connection - conn.close(); - } - } catch (Exception ignore) { - } - } - - // return primary key - return pk; - } - - /** - * Find Account by its account number - * @return pk The primary key - * @exception FinderException - Failed to execute the query. - * @exception ObjectNotFoundException - Object not found for this account - * number - */ - public Integer ejbFindByNumber(int accno) throws ObjectNotFoundException, FinderException { - - Connection conn = null; - PreparedStatement stmt = null; - try { - // get a connection for this transaction context - conn = getConnection(); - // lookup for this primary key in DB - stmt = conn.prepareStatement("select accno_ from accountsample_ where accno_=?"); - stmt.setInt(1, accno); - ResultSet rs = stmt.executeQuery(); - if (!rs.next()) { - throw new javax.ejb.ObjectNotFoundException(); - } - - } catch (SQLException e) { - throw new javax.ejb.FinderException("Failed to executeQuery " + e); - } finally { - try { - if (stmt != null) { - //close statement - stmt.close(); - } - if (conn != null) { - //release connection - conn.close(); - } - } catch (Exception ignore) { - } - } - - // return a primary key for this account - return new Integer(accno); - } - - /** - * Creates an enumeration of primary keys for all accounts - * @return pkv The primary keys - * @exception FinderException - Failed to execute the query. - */ - public Enumeration ejbFindAllAccounts() throws FinderException { - Connection conn = null; - PreparedStatement stmt = null; - Vector pkv = new Vector(); - try { - // get a connection for this transaction context - conn = getConnection(); - - // Lookup for all accounts in DB - stmt = conn.prepareStatement("select accno_ from accountsample_"); - ResultSet rs = stmt.executeQuery(); - - // Build the vector of primary keys - while (rs.next()) { - Integer pk = new Integer(rs.getInt("accno_")); - pkv.addElement((Object) pk); - } - - } catch (SQLException e) { - throw new javax.ejb.FinderException("Failed to executeQuery " + e); - } finally { - try { - if (stmt != null) { - //close statement - stmt.close(); - } - if (conn != null) { - //release connection - conn.close(); - } - } catch (Exception ignore) { - } - } - - // return primary keys - return pkv.elements(); - } - - /** - * @return the connection from the dataSource - * @exception EJBException Thrown by the method if the dataSource is not - * found in the naming. - * @exception SQLException may be thrown by dataSource.getConnection() - */ - private Connection getConnection() throws EJBException, SQLException { - if (dataSource == null) { - // Finds DataSource from JNDI - Context initialContext = null; - try { - initialContext = new InitialContext(); - dataSource = (DataSource) initialContext.lookup("java:comp/env/jdbc/AccountExplDs"); - } catch (Exception e) { - System.out.println("Cannot lookup dataSource" + e); - throw new javax.ejb.EJBException("Cannot lookup dataSource "); - } - } - return dataSource.getConnection(); - } - - /* - * ========================= Account implementation - * ============================ - */ - - /** - * Business method for returning the balance. - * @return balance - */ - public double getBalance() { - - return balance; - } - - /** - * Business method for updating the balance. - * @param d balance to update - */ - public void setBalance(double d) { - - balance = balance + d; - } - - /** - * Business method for returning the customer. - * @return customer - */ - public String getCustomer() { - - return customer; - } - - /** - * Business method for changing the customer name. - * @param c customer to update - */ - public void setCustomer(String c) { - - customer = c; - } - - /** - * Business method to get the Account number - */ - public int getNumber() { - return accno.intValue(); - } -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/eb/AccountHome.java b/jonas_tests/examples/base/examples/src/eb/AccountHome.java deleted file mode 100644 index 694c45a94918fed36281863732e2b4e20955ce01..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/eb/AccountHome.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package eb; - -import java.rmi.RemoteException; -import java.util.Enumeration; - -import javax.ejb.CreateException; -import javax.ejb.EJBHome; -import javax.ejb.FinderException; - -/** - * Home interface for the bean Account - * @author JOnAS team - */ -public interface AccountHome extends EJBHome { - - Account create(int accno, String customer, double balance) throws RemoteException, CreateException; - - Account findByPrimaryKey(Integer pk) throws RemoteException, FinderException; - - Account findByNumber(int accno) throws RemoteException, FinderException; - - Enumeration findAllAccounts() throws RemoteException, FinderException; - -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/eb/AccountImpl2Bean.java b/jonas_tests/examples/base/examples/src/eb/AccountImpl2Bean.java deleted file mode 100644 index df9b888ade5706f212fd1c763e82de851d60ea37..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/eb/AccountImpl2Bean.java +++ /dev/null @@ -1,218 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package eb; - -/** - * Accountbean is an entity bean with "container managed persistence version 2". - * The state of an instance is stored into a relational database. The following - * table should exist: create table ACCOUNT (ACCNO integer primary key, CUSTOMER - * varchar(30), BALANCE number(15,4)); - * @author Christophe Ney cney@batisseurs.com - */ - - -import javax.ejb.CreateException; -import javax.ejb.EntityBean; -import javax.ejb.EntityContext; -import javax.ejb.RemoveException; - -public abstract class AccountImpl2Bean implements EntityBean { - - // Keep the reference on the EntityContext - protected EntityContext entityContext; - - /* ========================= ejbCreate methods ============================ */ - - /** - * There must be one ejbCreate() method per create() method on the Home - * interface, and with the same signature. - * @param accno account number - * @param customer customer name - * @param balance initial balance - * @return pk primary key set to null - */ - public Integer ejbCreate(int val_accno, String val_customer, double val_balance) throws CreateException { - - // Init object state - setAccno(val_accno); - setCustomer(val_customer); - setBalance(val_balance); - return null; - } - - /** - * Each ejbCreate method should have a matching ejbPostCreate method - */ - public void ejbPostCreate(int val_accno, String val_customer, double val_balance) { - // Nothing to be done for this simple example. - } - - /* - * ====================== javax.ejb.EntityBean implementation - * ================= - */ - - /** - * A container invokes this method when the instance is taken out of the - * pool of available instances to become associated with a specific EJB - * object. This method transitions the instance to the ready state. This - * method executes in an unspecified transaction context. - * @exception EJBException Thrown by the method to indicate a failure caused - * by a system-level error. - */ - public void ejbActivate() { - // Nothing to be done for this simple example. - } - - /** - * A container invokes this method to instruct the instance to synchronize - * its state by loading it state from the underlying database. This method - * always executes in the proper transaction context. - * @exception EJBException Thrown by the method to indicate a failure caused - * by a system-level error. - * @exception RemoteException - This exception is defined in the method - * signature to provide backward compatibility for enterprise - * beans written for the EJB 1.0 specification. Enterprise beans - * written for the EJB 1.1 and higher specification should throw - * the javax.ejb.EJBException instead of this exception. - */ - public void ejbLoad() { - // Nothing to be done for this simple example, in implicit persistance. - } - - /** - * A container invokes this method on an instance before the instance - * becomes disassociated with a specific EJB object. After this method - * completes, the container will place the instance into the pool of - * available instances. This method executes in an unspecified transaction - * context. - * @exception EJBException Thrown by the method to indicate a failure caused - * by a system-level error. - */ - public void ejbPassivate() { - // Nothing to be done for this simple example. - } - - /** - * A container invokes this method before it removes the EJB object that is - * currently associated with the instance. This method is invoked when a - * client invokes a remove operation on the enterprise Bean's home interface - * or the EJB object's remote interface. This method transitions the - * instance from the ready state to the pool of available instances. This - * method is called in the transaction context of the remove operation. - * @exception EJBException Thrown by the method to indicate a failure caused - * by a system-level error. - * @exception RemoteException - This exception is defined in the method - * signature to provide backward compatibility for enterprise - * beans written for the EJB 1.0 specification. Enterprise beans - * written for the EJB 1.1 and higher specification should throw - * the javax.ejb.EJBException instead of this exception. - * @exception RemoveException The enterprise Bean does not allow destruction - * of the object. - */ - public void ejbRemove() throws RemoveException { - // Nothing to be done for this simple example, in implicit persistance. - } - - /** - * A container invokes this method to instruct the instance to synchronize - * its state by storing it to the underlying database. This method always - * executes in the proper transaction context. - * @exception EJBException Thrown by the method to indicate a failure caused - * by a system-level error. - * @exception RemoteException - This exception is defined in the method - * signature to provide backward compatibility for enterprise - * beans written for the EJB 1.0 specification. Enterprise beans - * written for the EJB 1.1 and higher specification should throw - * the javax.ejb.EJBException instead of this exception. - */ - public void ejbStore() { - // Nothing to be done for this simple example, in implicit persistance. - } - - /** - * Sets the associated entity context. The container invokes this method on - * an instance after the instance has been created. This method is called in - * an unspecified transaction context. - * @param ctx - An EntityContext interface for the instance. The instance - * should store the reference to the context in an instance variable. - * @exception EJBException Thrown by the method to indicate a failure caused - * by a system-level error. - * @exception RemoteException - This exception is defined in the method - * signature to provide backward compatibility for enterprise - * beans written for the EJB 1.0 specification. Enterprise beans - * written for the EJB 1.1 and higher specification should throw - * the javax.ejb.EJBException instead of this exception. - */ - public void setEntityContext(EntityContext ctx) { - - // Keep the entity context in object - entityContext = ctx; - } - - /** - * Unsets the associated entity context. The container calls this method - * before removing the instance. This is the last method that the container - * invokes on the instance. The Java garbage collector will eventually - * invoke the finalize() method on the instance. This method is called in an - * unspecified transaction context. - * @exception EJBException Thrown by the method to indicate a failure caused - * by a system-level error. - * @exception RemoteException - This exception is defined in the method - * signature to provide backward compatibility for enterprise - * beans written for the EJB 1.0 specification. Enterprise beans - * written for the EJB 1.1 and higher specification should throw - * the javax.ejb.EJBException instead of this exception. - */ - public void unsetEntityContext() { - entityContext = null; - } - - /** - * Business method to get the Account number - */ - public int getNumber() { - return getAccno(); - } - - /* - * ========================= Account implementation - * ============================ - */ - - public abstract String getCustomer(); - - public abstract void setCustomer(String customer); - - public abstract double getBalance(); - - public abstract void setBalance(double balance); - - public abstract int getAccno(); - - public abstract void setAccno(int accno); - -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/eb/AccountImplBean.java b/jonas_tests/examples/base/examples/src/eb/AccountImplBean.java deleted file mode 100644 index bc6a5e5d95d7a939cce0664fd333d96ddc7216d0..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/eb/AccountImplBean.java +++ /dev/null @@ -1,248 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package eb; - -/** - * Accountbean is an entity bean with "container managed persistence". The state - * of an instance is stored into a relational database. The following table - * should exist: create table ACCOUNT (ACCNO integer primary key, CUSTOMER - * varchar(30), BALANCE number(15,4)); - * @author JOnAS team - */ - - -import javax.ejb.CreateException; -import javax.ejb.EntityBean; -import javax.ejb.EntityContext; -import javax.ejb.RemoveException; - -public class AccountImplBean implements EntityBean { - - // Keep the reference on the EntityContext - protected EntityContext entityContext; - - // Object state - public Integer accno; - - public String customer; - - public double balance; - - /* ========================= ejbCreate methods ============================ */ - - /** - * There must be one ejbCreate() method per create() method on the Home - * interface, and with the same signature. - * @param accno account number - * @param customer customer name - * @param balance initial balance - * @return pk primary key set to null - */ - public Integer ejbCreate(int val_accno, String val_customer, double val_balance) throws CreateException { - - // Init object state - accno = new Integer(val_accno); - customer = val_customer; - balance = val_balance; - return null; - } - - /** - * Each ejbCreate method should have a matching ejbPostCreate method - */ - public void ejbPostCreate(int val_accno, String val_customer, double val_balance) { - // Nothing to be done for this simple example. - } - - /* - * ====================== javax.ejb.EntityBean implementation - * ================= - */ - - /** - * A container invokes this method when the instance is taken out of the - * pool of available instances to become associated with a specific EJB - * object. This method transitions the instance to the ready state. This - * method executes in an unspecified transaction context. - * @exception EJBException Thrown by the method to indicate a failure caused - * by a system-level error. - */ - public void ejbActivate() { - // Nothing to be done for this simple example. - } - - /** - * A container invokes this method to instruct the instance to synchronize - * its state by loading it state from the underlying database. This method - * always executes in the proper transaction context. - * @exception EJBException Thrown by the method to indicate a failure caused - * by a system-level error. - * @exception RemoteException - This exception is defined in the method - * signature to provide backward compatibility for enterprise - * beans written for the EJB 1.0 specification. Enterprise beans - * written for the EJB 1.1 and higher specification should throw - * the javax.ejb.EJBException instead of this exception. - */ - public void ejbLoad() { - // Nothing to be done for this simple example, in implicit persistance. - } - - /** - * A container invokes this method on an instance before the instance - * becomes disassociated with a specific EJB object. After this method - * completes, the container will place the instance into the pool of - * available instances. This method executes in an unspecified transaction - * context. - * @exception EJBException Thrown by the method to indicate a failure caused - * by a system-level error. - */ - public void ejbPassivate() { - // Nothing to be done for this simple example. - } - - /** - * A container invokes this method before it removes the EJB object that is - * currently associated with the instance. This method is invoked when a - * client invokes a remove operation on the enterprise Bean's home interface - * or the EJB object's remote interface. This method transitions the - * instance from the ready state to the pool of available instances. This - * method is called in the transaction context of the remove operation. - * @exception EJBException Thrown by the method to indicate a failure caused - * by a system-level error. - * @exception RemoteException - This exception is defined in the method - * signature to provide backward compatibility for enterprise - * beans written for the EJB 1.0 specification. Enterprise beans - * written for the EJB 1.1 and higher specification should throw - * the javax.ejb.EJBException instead of this exception. - * @exception RemoveException The enterprise Bean does not allow destruction - * of the object. - */ - public void ejbRemove() throws RemoveException { - // Nothing to be done for this simple example, in implicit persistance. - } - - /** - * A container invokes this method to instruct the instance to synchronize - * its state by storing it to the underlying database. This method always - * executes in the proper transaction context. - * @exception EJBException Thrown by the method to indicate a failure caused - * by a system-level error. - * @exception RemoteException - This exception is defined in the method - * signature to provide backward compatibility for enterprise - * beans written for the EJB 1.0 specification. Enterprise beans - * written for the EJB 1.1 and higher specification should throw - * the javax.ejb.EJBException instead of this exception. - */ - public void ejbStore() { - // Nothing to be done for this simple example, in implicit persistance. - } - - /** - * Sets the associated entity context. The container invokes this method on - * an instance after the instance has been created. This method is called in - * an unspecified transaction context. - * @param ctx - An EntityContext interface for the instance. The instance - * should store the reference to the context in an instance variable. - * @exception EJBException Thrown by the method to indicate a failure caused - * by a system-level error. - * @exception RemoteException - This exception is defined in the method - * signature to provide backward compatibility for enterprise - * beans written for the EJB 1.0 specification. Enterprise beans - * written for the EJB 1.1 and higher specification should throw - * the javax.ejb.EJBException instead of this exception. - */ - public void setEntityContext(EntityContext ctx) { - - // Keep the entity context in object - entityContext = ctx; - } - - /** - * Unsets the associated entity context. The container calls this method - * before removing the instance. This is the last method that the container - * invokes on the instance. The Java garbage collector will eventually - * invoke the finalize() method on the instance. This method is called in an - * unspecified transaction context. - * @exception EJBException Thrown by the method to indicate a failure caused - * by a system-level error. - * @exception RemoteException - This exception is defined in the method - * signature to provide backward compatibility for enterprise - * beans written for the EJB 1.0 specification. Enterprise beans - * written for the EJB 1.1 and higher specification should throw - * the javax.ejb.EJBException instead of this exception. - */ - public void unsetEntityContext() { - entityContext = null; - } - - /* - * ========================= Account implementation - * ============================ - */ - - /** - * Business method for returning the balance. - * @return balance - */ - public double getBalance() { - - return balance; - } - - /** - * Business method for updating the balance. - * @param d balance to update - */ - public void setBalance(double d) { - - balance = balance + d; - } - - /** - * Business method for returning the customer. - * @return customer - */ - public String getCustomer() { - - return customer; - } - - /** - * Business method for changing the customer name. - * @param c customer to update - */ - public void setCustomer(String c) { - - customer = c; - } - - /** - * Business method to get the Account number - */ - public int getNumber() { - return accno.intValue(); - } -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/eb/Accounthsqldb.sql b/jonas_tests/examples/base/examples/src/eb/Accounthsqldb.sql deleted file mode 100644 index 4885f418eeef0d17c0f704843e720c037f839552..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/eb/Accounthsqldb.sql +++ /dev/null @@ -1,12 +0,0 @@ -drop table accountsample_; -create table accountsample_ ( - accno_ integer primary key, - customer_ varchar(30), - balance_ float -); -insert into accountsample_ values(101, 'Antoine de St Exupery', 200.00); -insert into accountsample_ values(102, 'alexandre dumas fils', 400.00); -insert into accountsample_ values(103, 'conan doyle', 500.00); -insert into accountsample_ values(104, 'alfred de musset', 100.00); -insert into accountsample_ values(105, 'phileas lebegue', 350.00); -insert into accountsample_ values(106, 'alphonse de lamartine', 650.00); diff --git a/jonas_tests/examples/base/examples/src/eb/ClientAccount.java b/jonas_tests/examples/base/examples/src/eb/ClientAccount.java deleted file mode 100644 index efb4a15f0a3f73170063a16e63bd524f27655ff3..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/eb/ClientAccount.java +++ /dev/null @@ -1,170 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package eb; - -import java.util.Enumeration; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.rmi.PortableRemoteObject; -import javax.transaction.UserTransaction; - -/** - * Sample for entity beans. Usage: implicit persistance: java eb.ClientAccount - * AccountImplHome explicit persistance: java eb.ClientAccount AccountExplHome - * @author JOnAS team - */ -public class ClientAccount { - - /** - * UserTransaction object - */ - private static UserTransaction utx = null; - - private static void accountList(AccountHome h) { - Enumeration alist; - Account acc; - try { - utx.begin(); // faster if made inside a Tx - alist = h.findAllAccounts(); - while (alist.hasMoreElements()) { - acc = (Account) PortableRemoteObject.narrow(alist.nextElement(), Account.class); - System.out.println(acc.getNumber() + " " + acc.getCustomer() + " " + acc.getBalance()); - } - utx.commit(); - } catch (Exception e) { - System.err.println("Exception getting account list: " + e); - System.exit(2); - } - } - - public static void main(String[] args) { - - // 1st arg. is the bean home (AccountImplHome or AccountExplHome) - String beanName = args[0]; - - // get JNDI initial context - Context initialContext = null; - try { - initialContext = new InitialContext(); - } catch (Exception e) { - System.err.println("Cannot get initial context for JNDI: " + e); - System.exit(2); - } - - // We want to start transactions from client: get UserTransaction - System.out.println("Getting a UserTransaction object from JNDI"); - try { - - // Comment the following lines if you want to use a David Client: - utx = (UserTransaction) initialContext.lookup("javax.transaction.UserTransaction"); - - } catch (Exception e) { - System.err.println("Cannot lookup UserTransaction: " + e); - System.exit(2); - } - - // Connecting to Home thru JNDI - System.out.println("Connecting to the AccountHome"); - AccountHome home = null; - try { - home = (AccountHome) PortableRemoteObject.narrow(initialContext.lookup(beanName), AccountHome.class); - } catch (Exception e) { - System.err.println("Cannot lookup " + beanName + ": " + e); - System.exit(2); - } - - // List existing Accounts - System.out.println("Getting the list of existing accounts in database"); - accountList(home); - - // Create a first Account - System.out.println("Creating a new Account in database"); - Account a1 = null; - try { - a1 = home.create(109, "John Smith", 0); - } catch (Exception e) { - System.err.println("Cannot create Account: " + e); - System.exit(2); - } - - // Find a second Account - System.out.println("Finding an Account by its number in database"); - Account a2 = null; - try { - a2 = home.findByNumber(102); - } catch (Exception e) { - System.err.println("Cannot find Account: " + e); - System.exit(2); - } - - // First transaction (committed): - // transfert 100 from a2 to a1 - System.out.println("Starting a first transaction, that will be committed"); - try { - double value = 100.00; - utx.begin(); - a1.setBalance(value); - a2.setBalance(-value); - utx.commit(); - } catch (Exception e) { - System.err.println("exception during 1st Tx: " + e); - System.exit(2); - } - - // Start another transaction (rolled back): - // transfert 20 from a1 to a2 - System.out.println("Starting a second transaction, that will be rolled back"); - try { - double value = 20.00; - utx.begin(); - a1.setBalance(-value); - a2.setBalance(value); - utx.rollback(); - } catch (Exception e) { - System.err.println("exception during 2nd Tx: " + e); - System.exit(2); - } - - // List existing Accounts - System.out.println("Getting the new list of accounts in database"); - accountList(home); - - // Delete account - System.out.println("Removing Account previously created in database"); - try { - a1.remove(); - } catch (Exception e) { - System.err.println("exception during remove: " + e); - System.exit(2); - } - - // Exit program - System.out.println("ClientAccount terminated"); - } - -} - diff --git a/jonas_tests/examples/base/examples/src/eb/README b/jonas_tests/examples/base/examples/src/eb/README deleted file mode 100644 index 008d5088f95a1d053933be929ec879e2d2c0eaf9..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/eb/README +++ /dev/null @@ -1,42 +0,0 @@ -Copyright (C) BULL S.A. 1998-2002 - -This example illustrate the use of entity beans - -Entity beans "Account" ----------------------- -AccountImp2 entity bean with "container managed" persistance EJB2.x -AccountImpl entity bean with "container managed" persistance EJB1.x -AccountExpl entity bean with "bean managed" persistance - - -Compiling this example: ------------------------ -ant -find build.xml install - - -Running this example: ---------------------- -Your database access should be configured: a properties file defining a - Datasource object should be defined in $JONAS_BASE/conf (e.g. HSQL1.properties), - and the property jonas.service.dbm.datasources of the jonas.properties file should - be set to the name of this datasource description file (e.g. HSQL1). See JOnAS - documentation for more details. - You must also, the first time you run the test, create the table in the database. - If you use the default database embedded in JOnAS (hsqldb) you only have to do - ant init_db (in this directory) after having started JOnAS. - For Other databases scripts SQL are provided Account.sql for Oracle - Account.pgsql for Postgres. - - -1) Run an JOnAS Server to make beans available to clients: - - jonas start - -2) Run the client via the Ant task runclient - ant runclient - -4) Stop the jonas server - jonas stop - - - diff --git a/jonas_tests/examples/base/examples/src/eb/application-client.xml b/jonas_tests/examples/base/examples/src/eb/application-client.xml deleted file mode 100644 index 13436c357a7d391a38bfe7ac340abd00749605df..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/eb/application-client.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Client of the sb sample - - diff --git a/jonas_tests/examples/base/examples/src/eb/build.xml b/jonas_tests/examples/base/examples/src/eb/build.xml deleted file mode 100644 index 7a9cf96a82a84188cd9db34162bf3aaea9385111..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/eb/build.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - -urlid localhost-dbjonas -url jdbc:hsqldb:hsql://localhost:${jonas.service.db.port}/db_jonas -username jonas -password jonas - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/src/eb/db1.prp b/jonas_tests/examples/base/examples/src/eb/db1.prp deleted file mode 100644 index 9d87d68d0e919828f6375a515f40b54d58268544..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/eb/db1.prp +++ /dev/null @@ -1,325 +0,0 @@ -!--------------------------------------------------------------------- -! -! PROPERTIES for the InstantDB database used in the JOnAS eb example -! (builded from InstantDB/3.25/Examples/sample.prp) -! -!--------------------------------------------------------------------- - -!--------------------------------------------------------------------- -! -! BASIC PROPERTIES -! -!--------------------------------------------------------------------- - -! -! Path where index tables are held. Can be absolute or relative -! to the properties file. Defaults to tablePath. -! -indexPath=./tmp/indexes -! -! Path where system tables are held. Can be absolute or relative to -! the properties file. Defaults to tablePath. -! -systemPath=./tmp/system -! -! Path where database tables are held. Can be absolute or relative -! to the properties file. Defaults to "current" directory. -! -tablePath=./tmp/tables -! -! Path where results set tables are held. Can be absolute or relative -! to the properties file. Defaults to tablePath. -! -tmpPath=./tmp/tmp -! -! Non-zero means paths are relative to the properties file. -! Default is absolute paths for files. -! -relativeToProperties=1 -! -! Alternative partitions can be defined so that tables can be placed -! in multiple locations. Each partition is numbered: 1, 2, 3,... Tables -! can be created on partitions using the syntax -! -! CREATE TABLE ON PARTITION ... -! -! The partition count has to be supplied. -! -!partitionCount=2 -! -! The locations of each partition must be supplied. These are always -! absolute path names. -! -!partition1=d:/petes -!partition2=c:/temp - - -!--------------------------------------------------------------------- -! -! TUNING PROPERTIES -! -!--------------------------------------------------------------------- - -! -! The amount of each column to cache, expressed either as an absolute -! number of rows or as a percentage figure. Defaults to 256 or 10 respectively. -! -! This value applies only when tables are first created. It has no effect -! when a table is being re-opened. -! -cacheAmount=512 -! -! CACHE_ROWS Must be one of CACHE_ROWS or CACHE_PERCENT. Determines whether -! to cache columns in tables based on an absolute number of rows, or the -! percentage number of rows in the table. -! -! This value applies only when tables are first created. It has no effect -! when a table is being re-opened. -! -cacheCondition=CACHE_ROWS -! -! The amount of the system tables to be cached. Defaults to 100. -! -! This value applies only when tables are first created. It has no effect -! when a table is being re-opened. -! -!systemCacheSize=10 -! -! Similar to cacheCondition, but applies only to the system tables. -! -! This value applies only when tables are first created. It has no effect -! when a table is being re-opened. -! -!systemCacheCondition=CACHE_ROWS -! -! The percentage cache hit improvement required in order to move the -! cache to a new location in a column. -! -! (Currently not implemented). -! -cacheResetPercent=10 -! -! Non-zero means that database changes do not get written to the -! database immediately. See tuning.html. -! -fastUpdate=0 -! -! Percentage of free space in an index that must be present before -! the index reorganises itself. High values means frequent index -! reorganisation. Low values means slow index inserts. -! -indexLoad=5 -! -! The number of cache misses to include in calculations of the next -! base for the cache. -! -! (Currently not implemented). -! -missesInCacheStats=100 -! -! Non-zero means that results sets get instantiated on disk. By default -! InstantDB holds results sets emtirely in memory (apart from Binary -! columns). For large results sets this can be a problem. This property -! forces all results sets to be held on disk. -! -resultsOnDisk=0 -! -! Similar to cacheCondition but applies only to disk based -! results sets. Default is CACHE_ROWS. -! -resultsSetCache=CACHE_ROWS -! -! Similar to cacheAmount but applies only to disk based -! results sets. Default is 100. -! -resultsSetCacheAmount=100 -! -! Number of rows to read into the disk read ahead buffer. -! Recommended to be set somewhere around 128 to 256. -! Default is 20. -! -rowCacheSize=128 -! -! The read ahead buffer is effective at speeding up full -! table scans. However for indexed lookups or multiple -! simultaneous scans it is better to read a single row at -! a time. Each table holds a small number of single row -! buffers to improve such operations. Default is 8. -! -!singleRowCount=4 -! -! Sometimes the look ahead buffer can be held by a single -! thread even though it is not retrieveing many values from it. -! If too many lookups retrieve data from the single row -! buffers then it is better to flush the look ahead buffer and -! make it available for re-use. Default is 128. -! -!flushAfterCacheMisses=64 -! -! Number of rows to read ahead for system tables. By default -! system tables cache everything, so it is wasteful to have large -! read ahead buffers since they will very rarely be used. This -! allows the size of the system read ahead buffers to be reduced -! if necessary. Defaults to rowCacheSize. -! -!systemRows=20 -! -! The control column in all tables normally has a large cache -! since this speeds up all operation on that table. This can be -! varied to either improve performance or to reduce space. -! default is 8192. -! -! This value applies only when tables are first created. It has no effect -! when a table is being re-opened. -! -!controlColCacheSize=512 -! -! By default, InstantDB only does a cursory search for deleted rows during -! UPDATE statements. Setting searchDeletes=1 causes more detailed searches -! for deleted rows. This slows down UPDATE executions, but reults in more -! compact tables. Default is 0. -! -searchDeletes=0 -! -! The interval, in milliseconds, between checks for statement execution -! timeouts. Default is 5000. -! -!timerCheck=5000 - -!--------------------------------------------------------------------- -! -! LOGGING AND DEBUGGING PROPERTIES -! -!--------------------------------------------------------------------- - -! -! Non-zero means include SQL statements in the export file. -! -exportSQL=0 -! -! Non-zero means trace output also directed to console. -! Defaults to 0. -! -!traceConsole=1 -traceConsole=0 -! -! Relative or absolute path where exporting and tracing goes. -! -traceFile=./tmp/trace.log -! -! Bitmap of various items that can be traced. See debug.html. -! Defaults to 0. -! -traceLevel=2 - - -!--------------------------------------------------------------------- -! -! TRANSACTION AND RECOVERY PROPERTIES -! -!--------------------------------------------------------------------- - -! -! 0 means do not perform recovery on startup. -! 1 means perform automatic recovery -! 2 (default) means prompt the user using standard in -! -recoveryPolicy=2 -! -! Sets the level of transaction journalling. See trans.html. -! Defaults to 1. -! -! 0 - No journalling takes place. -! 1 - Normal journalling (default). -! 2 - Full journalling. -! -transLevel=1 -! -! When doing an import, defines the number of rows imported -! before the transaction is committed. Recommended value 8192. -! defaults to 100. -! -transImports=100 - -!--------------------------------------------------------------------- -! -! DATE, TIME AND CURRENCY PROPERTIES -! -!--------------------------------------------------------------------- - -! -! Number of digits after decimal point in currency outputs. Defaults to 2. -! -currencyDecimal=2 -! -! Currency symbol used in currency outputs. Defaults to $. -! -currencySymbol=$ -! -! Default format for date columns. Defaults to "yyyy-mm-dd". -! -dateFormat=yyyy-mm-dd -! -! Default format for timestamp columns. Defaults to "yyyy-mm-dd hh:mm:ss.lll". -! -dateTimeFormat=yyyy-mm-dd hh:mm:ss.lll -! -! If set, then all two digit dates less than its value are interpreted -! as 21st century dates. -! -!milleniumBoundary=50 -! -! Set to 1 causes the date string "now" to store a full timestamp. -! Default is to store only the date for fields with now hour in the -! format string. -! -nowMeansTime=0 - -!--------------------------------------------------------------------- -! -! STRING HANDLING PROPERTIES -! -!--------------------------------------------------------------------- - -! -! If set to 1 then String hashes use the JDK Object.hashCode() function. -! By default, uses InstantDB's String hashing. -! -altStringHashing=0 -! -! Set to 1 to cause LIKE clauses to always perform case insensitive -! comparisons. -! -likeIgnoreCase=0 -! -! Same as SET LITERAL STRICT_ON. Prevents string literals being interpreted -! as column names or numbers. Default is 0. -! -strictLiterals=0 -! -! Set this value to 1 (one) if you would like PreparedStatement.setString() -! to ignore "\" (backslash) characters when proceesing string constants. -! When set, InstantDB will not attempt to interpret \ as the start of an -! escape sequence. Default is 0. -! -!prepareIgnoresEscapes=1 - -!--------------------------------------------------------------------- -! -! MISCELLANEOUS PROPERTIES -! -!--------------------------------------------------------------------- - -! -! Allows selected InstantDB keywords to be un-reserved. -! e.g. ignoreKeywords=url,quote would allow the keywords -! url and quote to be used as table or column names. -! -! This faciliy is provided for compatatbility reasons only. -! It's use is not recommended AND IS NOT SUPPORTED. -! -!ignoreKeywords -! -! Non-zero means database is opened in read only mode. -! -readOnly=0 diff --git a/jonas_tests/examples/base/examples/src/eb/eb.xml b/jonas_tests/examples/base/examples/src/eb/eb.xml deleted file mode 100644 index f8f7d7d5f06e33de8c8a31f2a2985b04a7af79b4..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/eb/eb.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - - Deployment descriptor for the eb JOnAS example - eb example - - - Deployment descriptor for the AccountExpl bean JOnAS example - AccountExpl - eb.AccountHome - eb.Account - eb.AccountExplBean - Bean - java.lang.Integer - false - - jdbc/AccountExplDs - javax.sql.DataSource - Container - - - - Deployment descriptor for the AccountImpl bean JOnAS example - AccountImpl - eb.AccountHome - eb.Account - eb.AccountImplBean - Container - java.lang.Integer - false - 1.x - - accno - - - customer - - - balance - - accno - - - - Deployment descriptor for the AccountImpl2 bean with CMP2 JOnAS example - AccountImpl2 - eb.AccountHome - eb.Account - eb.AccountImpl2Bean - Container - java.lang.Integer - false - 2.x - accountsample - - accno - - - customer - - - balance - - accno - - - findByNumber - - int - - - SELECT OBJECT(o) FROM accountsample o WHERE o.accno = ?1 - - - - findAllAccounts - - - SELECT OBJECT(o) FROM accountsample o - - - - - - - - AccountExpl - * - - Required - - - - AccountImpl - * - - Required - - - - - AccountImpl2 - * - - Required - - - - \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/eb/jonas-eb.xml b/jonas_tests/examples/base/examples/src/eb/jonas-eb.xml deleted file mode 100644 index 1527da5e52847c1244186faa37dffd00c0a9fcbc..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/eb/jonas-eb.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - AccountExpl - AccountExplHome - - jdbc/AccountExplDs - jdbc_1 - - - - - AccountImpl - AccountImplHome - - jdbc_1 - accountsample_ - - accno - accno_ - - - customer - customer_ - - - balance - balance_ - - - - findByNumber - - where accno_ = ? - - - - findAllAccounts - - - - - - - - AccountImpl2 - AccountImpl2Home - - jdbc_1 - - - - - \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/lb/Client.java b/jonas_tests/examples/base/examples/src/lb/Client.java deleted file mode 100644 index 0546c28fa15695e6cce388f41dbe50bd825d9ba9..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/lb/Client.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package lb; - -import java.rmi.RemoteException; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; - -/** - * Client of the lb JOnAS example - * @author Helene Joanin - */ -public class Client { - - static Context initialContext = null; - - static ManagerHome home = null; - - static Manager manager = null; - - static boolean m_noinit = false; - - static int m_accounts = 4; - - static int m_valmove = 100; - - static int m_loops = 10; - - static int inival = 1000; - - public static void main(String[] args) { - // Get command args - for (int argn = 0; argn < args.length; argn++) { - String s_arg = args[argn]; - Integer i_arg; - if (s_arg.equals("-ni")) { - m_noinit = true; - } else if (s_arg.equals("-a")) { - s_arg = args[++argn]; - i_arg = java.lang.Integer.valueOf(s_arg); - m_accounts = i_arg.intValue(); - } else if (s_arg.equals("-m")) { - s_arg = args[++argn]; - i_arg = java.lang.Integer.valueOf(s_arg); - m_valmove = i_arg.intValue(); - } else if (s_arg.equals("-l")) { - s_arg = args[++argn]; - i_arg = java.lang.Integer.valueOf(s_arg); - m_loops = i_arg.intValue(); - } else { - usage(); - fatalError("wrong usage"); - } - } - - info("Calling lb.Client with : -a " + m_accounts + " -m " + m_valmove + " -l " + m_loops); - - // Get InitialContext - try { - initialContext = new InitialContext(); - } catch (NamingException e) { - fatalError("Cannot get InitialContext: " + e); - } - - // Create manager session bean - try { - home = (ManagerHome) javax.rmi.PortableRemoteObject.narrow(initialContext.lookup("ManagerHome"), - ManagerHome.class); - manager = home.create(inival); - } catch (Exception e) { - fatalError("Cannot create manager: " + e); - } - - // Create all accounts if noinit==false - if (!m_noinit) { - info("Re-initialization of the accounts database table"); - try { - manager.createAll(m_accounts); - } catch (Exception e) { - fatalError("Cannot create initial accounts: " + e); - } - } - - // Set move value - try { - manager.setValue(m_valmove); - } catch (Exception e) { - fatalError("Cannot init Session: " + e); - } - - // main loop - try { - for (int i = 0; i < m_loops; i++) { - // Choose the 2 accounts randomly - int d1 = random(m_accounts); - int c1 = random(m_accounts); - info(" Movement " + d1 + " -> " + c1 + ""); - // Set these accounts in session bean - manager.setAccounts(d1, c1); - // make the transfert - try { - manager.movement(); - } catch (RemoteException r) { - error("movement raised exception. ignoring..."); - } - // Check account that was debited - if (manager.checkAccount(d1) == false) { - error("Bad Account after move on account " + d1); - error("Stopping this session because some accounts are not ok"); - break; - } - } - } catch (Exception e) { - fatalError("Exception in main loop :" + e); - } - - // Check all accounts - try { - if (manager.checkAll() == false) { - error("FAIL when checking all accounts"); - } else { - info("PASS when checking all accounts"); - } - } catch (RemoteException e) { - error("checkAll() :" + e); - } - - // remove session bean - try { - manager.remove(); - } catch (Exception e) { - error("Cannot remove manager session: " + e); - } - - } - - /** - * Returns an integer between 0 and max-1 - */ - static int random(int max) { - - double d = Math.random(); - int ret = (int) (max * d); - return ret; - } - - /** - * Display the usage - */ - static void usage() { - info("lb.Client [-ni] [-a accounts] [-m value] [-l loops]"); - } - - /** - * Display the given information message - */ - static void info(String infoMsg) { - System.out.println(infoMsg); - } - - /** - * Display the given error message - */ - static void error(String errMsg) { - System.out.println("lb.Client error: " + errMsg); - } - - /** - * Display the given error message and exits - */ - static void fatalError(String errMsg) { - System.out.println("lb.Client fatal error: " + errMsg); - System.exit(2); - } - -} - diff --git a/jonas_tests/examples/base/examples/src/lb/ManacEC.java b/jonas_tests/examples/base/examples/src/lb/ManacEC.java deleted file mode 100644 index 22cbd95fa4c2112969e6a6b8ca812aadc35a21c8..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/lb/ManacEC.java +++ /dev/null @@ -1,225 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package lb; - -import javax.ejb.CreateException; -import javax.ejb.DuplicateKeyException; -import javax.ejb.EJBException; -import javax.ejb.EntityBean; -import javax.ejb.EntityContext; -import javax.ejb.RemoveException; - -/** - * Manac Implementation - * @author Philippe Durieux - */ -public class ManacEC implements EntityBean { - - EntityContext ejbContext; - - // ------------------------------------------------------------------ - // State of the bean. - // They must be public for Container Managed Persistance. - // ------------------------------------------------------------------ - public String name; - - public int num; - - public int balance; - - // ------------------------------------------------------------------ - // EntityBean implementation - // ------------------------------------------------------------------ - - /** - * Set the associated entity context. The container invokes this method on - * an instance after the instance has been created. This method is called in - * an unspecified transaction context. - * @param ctx - An EntityContext interface for the instance. The instance - * should store the reference to the context in an instance variable. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - */ - public void setEntityContext(EntityContext ctx) { - ejbContext = ctx; - } - - /** - * Unset the associated entity context. The container calls this method - * before removing the instance. This is the last method that the container - * invokes on the instance. The Java garbage collector will eventually - * invoke the finalize() method on the instance. This method is called in an - * unspecified transaction context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - */ - public void unsetEntityContext() { - ejbContext = null; - } - - /** - * A container invokes this method before it removes the EJB object that is - * currently associated with the instance. This method is invoked when a - * client invokes a remove operation on the enterprise Bean's home interface - * or the EJB object's remote interface. This method transitions the - * instance from the ready state to the pool of available instances. This - * method is called in the transaction context of the remove operation. - * @throws RemoveException The enterprise Bean does not allow destruction of - * the object. - * @throws EJBException - Thrown by the method to indicate a failure caused - * by a system-level error. - */ - public void ejbRemove() throws RemoveException { - } - - /** - * A container invokes this method to instruct the instance to synchronize - * its state by loading it state from the underlying database. This method - * always executes in the proper transaction context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - */ - public void ejbLoad() { - if (balance < 0) { - System.out.println(name + " : Bad balance loaded"); - throw new EJBException("ejbLoad: Balance " + name + " was negative =" + balance); - } - } - - /** - * A container invokes this method to instruct the instance to synchronize - * its state by storing it to the underlying database. This method always - * executes in the proper transaction context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - */ - public void ejbStore() { - if (balance < 0) { - System.out.println(name + " : Bad balance stored"); - throw new EJBException("ejbStore: Balance " + name + " was negative =" + balance); - } - } - - /** - * The Entity bean can define 0 or more ejbCreate methods. - * @throws CreateException Failure to create an entity EJB object. - * @throws DuplicateKeyException An object with the same key already exists. - */ - public java.lang.String ejbCreate(int num, String name, int ib) throws CreateException, DuplicateKeyException { - - // Init here the bean fields - this.num = num; - this.name = new String(name); - this.balance = ib; - - // In CMP, should return null. - return null; - } - - /** - * There must be an ejbPostCreate per ejbCreate method - * @throws CreateException Failure to create an entity EJB object. - */ - public void ejbPostCreate(int num, String name, int ib) throws CreateException { - } - - /** - * The Entity bean can define 0 or more ejbCreate methods. - * @throws CreateException Failure to create an entity EJB object. - * @throws DuplicateKeyException An object with the same key already exists. - */ - public java.lang.String ejbCreateWithDefaultName(int num, int ib) throws CreateException, DuplicateKeyException { - - // Init here the bean fields - this.num = num; - this.name = "M" + (new Integer(num)).toString(); - this.balance = ib; - - // In CMP, should return null. - return null; - } - - /** - * There must be an ejbPostCreate per ejbCreate method - * @throws CreateException Failure to create an entity EJB object. - */ - public void ejbPostCreateWithDefaultName(int num, int ib) throws CreateException { - - } - - /** - * A container invokes this method on an instance before the instance - * becomes disassociated with a specific EJB object. - */ - public void ejbPassivate() { - // balance may be wrong in case of rollback. - // Anyway, this instance is being released now, so no problem! - balance = -80000; - } - - /** - * A container invokes this method when the instance is taken out of the - * pool of available instances to become associated with a specific EJB - * object. - */ - public void ejbActivate() { - } - - // ------------------------------------------------------------------ - // Manac implementation - // ------------------------------------------------------------------ - - /** - * getBalance - */ - public int getBalance() { - return balance; - } - - /** - * credit - */ - public void credit(int v) { - balance += v; - } - - /** - * debit - */ - public void debit(int v) { - balance -= v; - if (balance < 0) { - System.out.println(name + " : set rollback only."); - ejbContext.setRollbackOnly(); - balance = -90000; // put it a very bad balance to check rollback is - // OK - } - } - - public String getName() { - return name; - } -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/lb/ManacLocal.java b/jonas_tests/examples/base/examples/src/lb/ManacLocal.java deleted file mode 100644 index 103a01b3592c14912bc8321b87153be9b08d706e..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/lb/ManacLocal.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package lb; - -import javax.ejb.EJBLocalObject; - -/** - * Manac local interface - * @author Philippe Durieux - */ -public interface ManacLocal extends EJBLocalObject { - - int getBalance(); - - void credit(int value); - - void debit(int value); - - String getName(); -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/lb/ManacLocalHome.java b/jonas_tests/examples/base/examples/src/lb/ManacLocalHome.java deleted file mode 100644 index 16e22f47303dea7bc12d71ce87d8a732e8dcfd8c..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/lb/ManacLocalHome.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package lb; - -import java.util.Collection; - -import javax.ejb.CreateException; -import javax.ejb.EJBLocalHome; -import javax.ejb.FinderException; - -/** - * Local Home interface for the bean Manac - * @author Philippe Durieux, Helene Joanin - */ -public interface ManacLocalHome extends EJBLocalHome { - - ManacLocal create(int num, String name, int initbal) throws CreateException; - - ManacLocal createWithDefaultName(int num, int initbal) throws CreateException; - - ManacLocal findByPrimaryKey(java.lang.String pk) throws FinderException; - - ManacLocal findByNum(int num) throws FinderException; - - Collection findAll() throws FinderException; -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/lb/Manager.java b/jonas_tests/examples/base/examples/src/lb/Manager.java deleted file mode 100644 index 5470630b1e2cbe452203e9c6fb0956c29a4f7756..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/lb/Manager.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package lb; - -import java.rmi.RemoteException; - -import javax.ejb.EJBObject; - -/** - * Manager remote interface - * @author Philippe Durieux - */ -public interface Manager extends EJBObject { - - void createAll(int nb) throws RemoteException; - - void setAccounts(int d1, int c1) throws RemoteException; - - void setValue(int v) throws RemoteException; - - void movement() throws RemoteException; - - boolean checkAll() throws RemoteException; - - boolean checkAccount(int a) throws RemoteException; -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/lb/ManagerHome.java b/jonas_tests/examples/base/examples/src/lb/ManagerHome.java deleted file mode 100644 index a94b076e50e8852390815a710db7cde2ceda9da3..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/lb/ManagerHome.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package lb; - -import java.rmi.RemoteException; - -import javax.ejb.CreateException; -import javax.ejb.EJBHome; - -/** - * Home interface for the bean Manager - * @author Philippe Durieux - */ -public interface ManagerHome extends EJBHome { - - Manager create(int ival) throws CreateException, RemoteException; -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/lb/ManagerSF.java b/jonas_tests/examples/base/examples/src/lb/ManagerSF.java deleted file mode 100644 index b58c4e964866f830b473874d8d2206bbe7f32961..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/lb/ManagerSF.java +++ /dev/null @@ -1,281 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package lb; - -import java.rmi.RemoteException; -import java.sql.Connection; -import java.sql.SQLException; -import java.sql.Statement; -import java.util.Collection; -import java.util.Iterator; - -import javax.ejb.CreateException; -import javax.ejb.EJBException; -import javax.ejb.FinderException; -import javax.ejb.SessionBean; -import javax.ejb.SessionContext; -import javax.ejb.TransactionRolledbackLocalException; -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; -import javax.sql.DataSource; - -/** - * Manager Implementation - * @author Philippe Durieux - */ -public class ManagerSF implements SessionBean { - - SessionContext ejbContext; - - ManacLocalHome manacLocalHome = null; - - int c1 = 0; - - int d1 = 0; - - ManacLocal cred1, deb1; - - int initialValue = 1000; - - int value = 10; - - // ------------------------------------------------------------------ - // init DataBase for Manac beans - // ------------------------------------------------------------------ - private void initDB() { - - // Get my DataSource from JNDI - DataSource ds = null; - InitialContext ictx = null; - try { - ictx = new InitialContext(); - } catch (Exception e) { - System.out.println("new InitialContext() : " + e); - throw new EJBException("Cannot get JNDI InitialContext"); - } - try { - ds = (DataSource) ictx.lookup("java:comp/env/jdbc/mydb"); - } catch (Exception e) { - System.out.println("cannot lookup datasource " + e); - throw new EJBException("cannot lookup datasource"); - } - - // Drop table - Connection conn = null; - Statement stmt = null; - // myTable must be from jonas-xml file (Manac bean) - String myTable = "manacsample"; - try { - conn = ds.getConnection(); - stmt = conn.createStatement(); - stmt.execute("drop table " + myTable); - stmt.close(); - } catch (SQLException e) { - // The first time, table will not exist. - } - - // Create table. - try { - stmt = conn.createStatement(); - stmt.execute("create table " + myTable - + "(c_name varchar(30) not null primary key, c_num integer, c_balance integer)"); - stmt.close(); - conn.close(); - } catch (SQLException e) { - System.out.println("Exception in createTable : " + e); - throw new EJBException("Exception in createTable"); - } - } - - // ------------------------------------------------------------------ - // SessionBean implementation - // ------------------------------------------------------------------ - - /** - * Set the associated session context. The container calls this method after - * the instance creation. The enterprise Bean instance should store the - * reference to the context object in an instance variable. This method is - * called with no transaction context. - * @param sessionContext A SessionContext interface for the instance. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - */ - public void setSessionContext(SessionContext ctx) { - ejbContext = ctx; - } - - /** - * A container invokes this method before it ends the life of the session - * object. This happens as a result of a client's invoking a remove - * operation, or when a container decides to terminate the session object - * after a timeout. This method is called with no transaction context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - */ - public void ejbRemove() { - } - - /** - * The Session bean must define 1 or more ejbCreate methods. - * @throws CreateException Failure to create a session EJB object. - */ - public void ejbCreate(int ival) throws CreateException { - - // lookup ManacLocalHome - try { - Context ictx = new InitialContext(); - manacLocalHome = (ManacLocalHome) ictx.lookup("java:comp/env/ejb/manac"); - } catch (NamingException e) { - System.out.println("ManagerSF : Cannot get ManacLocalHome:" + e); - throw new CreateException("Cannot get ManacLocalHome"); - } - - initialValue = ival; - } - - /** - * A container invokes this method on an instance before the instance - * becomes disassociated with a specific EJB object. - */ - public void ejbPassivate() { - } - - /** - * A container invokes this method when the instance is taken out of the - * pool of available instances to become associated with a specific EJB - * object. - */ - public void ejbActivate() { - } - - // ------------------------------------------------------------------ - // Manager implementation - // ------------------------------------------------------------------ - - public void createAll(int nb) throws RemoteException { - - // init database for Manac bean - initDB(); - - // create accounts - for (int i = 0; i < nb; i++) { - try { - manacLocalHome.createWithDefaultName(i, initialValue); - } catch (CreateException e) { - System.out.println("createAll:\n" + e); - throw new RemoteException("Cannot create Manac"); - } - } - } - - public void setAccounts(int d1, int c1) throws RemoteException { - this.d1 = d1; - this.c1 = c1; - try { - deb1 = manacLocalHome.findByNum(d1); - cred1 = manacLocalHome.findByNum(c1); - } catch (FinderException e) { - System.out.println("Cannot find manac bean:" + e); - throw new RemoteException("Cannot find manac bean"); - } - } - - public void setValue(int v) throws RemoteException { - this.value = v; - } - - public void movement() throws RemoteException { - - // credit accounts first because we don't want a rollback if - // same account is debited and credited in the same operation. - try { - cred1.credit(value); - } catch (EJBException e) { - System.out.println("ManagerSF: Cannot credit account:" + e); - throw new RemoteException("ManagerSF: Cannot credit account"); - } - - // debit accounts - try { - deb1.debit(value); - } catch (TransactionRolledbackLocalException e) { - System.out.println("ManagerSF: Rollback transaction"); - } catch (EJBException e) { - System.out.println("ManagerSF debit:" + e); - } - } - - public boolean checkAccount(int a) throws RemoteException { - - boolean ret = false; - ManacLocal m = null; - - try { - m = manacLocalHome.findByNum(a); - int b = m.getBalance(); - if (b >= 0) { - ret = true; - } else { - System.out.println("ManagerSF checkAccount: bad balance=" + b); - } - return ret; - } catch (Exception e) { - System.out.println("ManagerSF checkAccount: cannot check account: " + e); - return false; - } - } - - public boolean checkAll() throws RemoteException { - - int count = 0; - int total = 0; - try { - Collection accCol = manacLocalHome.findAll(); - for (Iterator accIter = accCol.iterator(); accIter.hasNext();) { - count++; - ManacLocal a = (ManacLocal) accIter.next(); - int balance = a.getBalance(); - if (balance < 0) { - System.out.println("checkAllAccounts: bad balance: " + balance); - return false; - } - String name = a.getName(); - total += balance; - } - } catch (Exception e) { - System.out.println("checkAllAccounts:" + e); - return false; - } - int exp = initialValue * count; - if (total != exp) { - System.out.println("checkAllAccounts: bad total: " + total + " (expected: " + exp + ")"); - return false; - } - return true; - } - -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/lb/README b/jonas_tests/examples/base/examples/src/lb/README deleted file mode 100644 index 3af0ddfd4f2207f7f356d85a57feb2e1b81233d2..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/lb/README +++ /dev/null @@ -1,55 +0,0 @@ -The lb JOnAS example: ---------------------- - -This example illustrates the use of local interfaces. -This is a good example for understanding what must be done when a local client -(typically a session bean) is collocated with an entity bean providing local interfaces. - -This JOnAS example is inspired by the 'manac' JOnAS stress test: - jonas_tests/stress/src/org/objectweb/jonas/stests/manac - -It uses two enterprise beans "Manac" and "Manager". -The "Manac" bean is an entity bean with container-managed persistence. -Its Component and Home interfaces are local interfaces. -This bean represents an account. Its balance cannot be negative (rollback is set -in this case). - -The "Manager" bean is a stateful session bean and allows to manage the "Manac" bean, -i.e. to move amounts from an account to an other. - - -"Client" is the client of the "Manager" session bean. -It performs the following steps: -- initialization of the database table of accounts if no -ni argument. - (A specified number of accounts are created with a default balance 1000). -- transfer of a specified 'value' from an account to an other account, - 'loops' times; (accounts are choosen randomly). -- last, check the total of the balance of all the accounts. -Its usage is: - Client [-ni] [-a accounts] [-m value] [-l loops] -(Client -a 4 -m 100 -l 10 is the default usage) - - -Compiling this example: ------------------------ -This example is compiled with the others by "ant install" in $JONAS_ROOT/examples. - -Running this example: ---------------------- -Your database access should be configured: a properties files defining a - Datasource object should be defined in $JONAS_BASE/conf (e.g. InstantDB1.properties), - and the property jonas.service.dbm.datasources of the jonas.properties file should - be set to the name of this datasource description file (e.g. InstantDB1). See JOnAS - documentation for more details. - -1) Run an EJB Server to make beans available to clients: - - jonas start - -2) Run the client via the Ant task runclient - jclient -cp $JONAS_BASE/ejbjars/lb.jar lb.Client - or - ant runclient - -3) Stop the jonas server - jonas stop diff --git a/jonas_tests/examples/base/examples/src/lb/application-client.xml b/jonas_tests/examples/base/examples/src/lb/application-client.xml deleted file mode 100644 index 13436c357a7d391a38bfe7ac340abd00749605df..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/lb/application-client.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Client of the sb sample - - diff --git a/jonas_tests/examples/base/examples/src/lb/build.xml b/jonas_tests/examples/base/examples/src/lb/build.xml deleted file mode 100644 index 978ced5399bb08c2bbef3c691bc9985602b91e1e..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/lb/build.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/src/lb/db1.prp b/jonas_tests/examples/base/examples/src/lb/db1.prp deleted file mode 100644 index 9d87d68d0e919828f6375a515f40b54d58268544..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/lb/db1.prp +++ /dev/null @@ -1,325 +0,0 @@ -!--------------------------------------------------------------------- -! -! PROPERTIES for the InstantDB database used in the JOnAS eb example -! (builded from InstantDB/3.25/Examples/sample.prp) -! -!--------------------------------------------------------------------- - -!--------------------------------------------------------------------- -! -! BASIC PROPERTIES -! -!--------------------------------------------------------------------- - -! -! Path where index tables are held. Can be absolute or relative -! to the properties file. Defaults to tablePath. -! -indexPath=./tmp/indexes -! -! Path where system tables are held. Can be absolute or relative to -! the properties file. Defaults to tablePath. -! -systemPath=./tmp/system -! -! Path where database tables are held. Can be absolute or relative -! to the properties file. Defaults to "current" directory. -! -tablePath=./tmp/tables -! -! Path where results set tables are held. Can be absolute or relative -! to the properties file. Defaults to tablePath. -! -tmpPath=./tmp/tmp -! -! Non-zero means paths are relative to the properties file. -! Default is absolute paths for files. -! -relativeToProperties=1 -! -! Alternative partitions can be defined so that tables can be placed -! in multiple locations. Each partition is numbered: 1, 2, 3,... Tables -! can be created on partitions using the syntax -! -! CREATE TABLE ON PARTITION ... -! -! The partition count has to be supplied. -! -!partitionCount=2 -! -! The locations of each partition must be supplied. These are always -! absolute path names. -! -!partition1=d:/petes -!partition2=c:/temp - - -!--------------------------------------------------------------------- -! -! TUNING PROPERTIES -! -!--------------------------------------------------------------------- - -! -! The amount of each column to cache, expressed either as an absolute -! number of rows or as a percentage figure. Defaults to 256 or 10 respectively. -! -! This value applies only when tables are first created. It has no effect -! when a table is being re-opened. -! -cacheAmount=512 -! -! CACHE_ROWS Must be one of CACHE_ROWS or CACHE_PERCENT. Determines whether -! to cache columns in tables based on an absolute number of rows, or the -! percentage number of rows in the table. -! -! This value applies only when tables are first created. It has no effect -! when a table is being re-opened. -! -cacheCondition=CACHE_ROWS -! -! The amount of the system tables to be cached. Defaults to 100. -! -! This value applies only when tables are first created. It has no effect -! when a table is being re-opened. -! -!systemCacheSize=10 -! -! Similar to cacheCondition, but applies only to the system tables. -! -! This value applies only when tables are first created. It has no effect -! when a table is being re-opened. -! -!systemCacheCondition=CACHE_ROWS -! -! The percentage cache hit improvement required in order to move the -! cache to a new location in a column. -! -! (Currently not implemented). -! -cacheResetPercent=10 -! -! Non-zero means that database changes do not get written to the -! database immediately. See tuning.html. -! -fastUpdate=0 -! -! Percentage of free space in an index that must be present before -! the index reorganises itself. High values means frequent index -! reorganisation. Low values means slow index inserts. -! -indexLoad=5 -! -! The number of cache misses to include in calculations of the next -! base for the cache. -! -! (Currently not implemented). -! -missesInCacheStats=100 -! -! Non-zero means that results sets get instantiated on disk. By default -! InstantDB holds results sets emtirely in memory (apart from Binary -! columns). For large results sets this can be a problem. This property -! forces all results sets to be held on disk. -! -resultsOnDisk=0 -! -! Similar to cacheCondition but applies only to disk based -! results sets. Default is CACHE_ROWS. -! -resultsSetCache=CACHE_ROWS -! -! Similar to cacheAmount but applies only to disk based -! results sets. Default is 100. -! -resultsSetCacheAmount=100 -! -! Number of rows to read into the disk read ahead buffer. -! Recommended to be set somewhere around 128 to 256. -! Default is 20. -! -rowCacheSize=128 -! -! The read ahead buffer is effective at speeding up full -! table scans. However for indexed lookups or multiple -! simultaneous scans it is better to read a single row at -! a time. Each table holds a small number of single row -! buffers to improve such operations. Default is 8. -! -!singleRowCount=4 -! -! Sometimes the look ahead buffer can be held by a single -! thread even though it is not retrieveing many values from it. -! If too many lookups retrieve data from the single row -! buffers then it is better to flush the look ahead buffer and -! make it available for re-use. Default is 128. -! -!flushAfterCacheMisses=64 -! -! Number of rows to read ahead for system tables. By default -! system tables cache everything, so it is wasteful to have large -! read ahead buffers since they will very rarely be used. This -! allows the size of the system read ahead buffers to be reduced -! if necessary. Defaults to rowCacheSize. -! -!systemRows=20 -! -! The control column in all tables normally has a large cache -! since this speeds up all operation on that table. This can be -! varied to either improve performance or to reduce space. -! default is 8192. -! -! This value applies only when tables are first created. It has no effect -! when a table is being re-opened. -! -!controlColCacheSize=512 -! -! By default, InstantDB only does a cursory search for deleted rows during -! UPDATE statements. Setting searchDeletes=1 causes more detailed searches -! for deleted rows. This slows down UPDATE executions, but reults in more -! compact tables. Default is 0. -! -searchDeletes=0 -! -! The interval, in milliseconds, between checks for statement execution -! timeouts. Default is 5000. -! -!timerCheck=5000 - -!--------------------------------------------------------------------- -! -! LOGGING AND DEBUGGING PROPERTIES -! -!--------------------------------------------------------------------- - -! -! Non-zero means include SQL statements in the export file. -! -exportSQL=0 -! -! Non-zero means trace output also directed to console. -! Defaults to 0. -! -!traceConsole=1 -traceConsole=0 -! -! Relative or absolute path where exporting and tracing goes. -! -traceFile=./tmp/trace.log -! -! Bitmap of various items that can be traced. See debug.html. -! Defaults to 0. -! -traceLevel=2 - - -!--------------------------------------------------------------------- -! -! TRANSACTION AND RECOVERY PROPERTIES -! -!--------------------------------------------------------------------- - -! -! 0 means do not perform recovery on startup. -! 1 means perform automatic recovery -! 2 (default) means prompt the user using standard in -! -recoveryPolicy=2 -! -! Sets the level of transaction journalling. See trans.html. -! Defaults to 1. -! -! 0 - No journalling takes place. -! 1 - Normal journalling (default). -! 2 - Full journalling. -! -transLevel=1 -! -! When doing an import, defines the number of rows imported -! before the transaction is committed. Recommended value 8192. -! defaults to 100. -! -transImports=100 - -!--------------------------------------------------------------------- -! -! DATE, TIME AND CURRENCY PROPERTIES -! -!--------------------------------------------------------------------- - -! -! Number of digits after decimal point in currency outputs. Defaults to 2. -! -currencyDecimal=2 -! -! Currency symbol used in currency outputs. Defaults to $. -! -currencySymbol=$ -! -! Default format for date columns. Defaults to "yyyy-mm-dd". -! -dateFormat=yyyy-mm-dd -! -! Default format for timestamp columns. Defaults to "yyyy-mm-dd hh:mm:ss.lll". -! -dateTimeFormat=yyyy-mm-dd hh:mm:ss.lll -! -! If set, then all two digit dates less than its value are interpreted -! as 21st century dates. -! -!milleniumBoundary=50 -! -! Set to 1 causes the date string "now" to store a full timestamp. -! Default is to store only the date for fields with now hour in the -! format string. -! -nowMeansTime=0 - -!--------------------------------------------------------------------- -! -! STRING HANDLING PROPERTIES -! -!--------------------------------------------------------------------- - -! -! If set to 1 then String hashes use the JDK Object.hashCode() function. -! By default, uses InstantDB's String hashing. -! -altStringHashing=0 -! -! Set to 1 to cause LIKE clauses to always perform case insensitive -! comparisons. -! -likeIgnoreCase=0 -! -! Same as SET LITERAL STRICT_ON. Prevents string literals being interpreted -! as column names or numbers. Default is 0. -! -strictLiterals=0 -! -! Set this value to 1 (one) if you would like PreparedStatement.setString() -! to ignore "\" (backslash) characters when proceesing string constants. -! When set, InstantDB will not attempt to interpret \ as the start of an -! escape sequence. Default is 0. -! -!prepareIgnoresEscapes=1 - -!--------------------------------------------------------------------- -! -! MISCELLANEOUS PROPERTIES -! -!--------------------------------------------------------------------- - -! -! Allows selected InstantDB keywords to be un-reserved. -! e.g. ignoreKeywords=url,quote would allow the keywords -! url and quote to be used as table or column names. -! -! This faciliy is provided for compatatbility reasons only. -! It's use is not recommended AND IS NOT SUPPORTED. -! -!ignoreKeywords -! -! Non-zero means database is opened in read only mode. -! -readOnly=0 diff --git a/jonas_tests/examples/base/examples/src/lb/jonas-lb.xml b/jonas_tests/examples/base/examples/src/lb/jonas-lb.xml deleted file mode 100644 index ec4779578858b2cfe69ab5a5b15a31ae4839eceb..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/lb/jonas-lb.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - Manager - ManagerHome - - jdbc/mydb - jdbc_1 - - - - - Manac - ManacLocalHome - - jdbc_1 - manacsample - - name - c_name - - - num - c_num - - - balance - c_balance - - - - findByNum - - where c_num = ? - - - - findAll - - - - - - - diff --git a/jonas_tests/examples/base/examples/src/lb/lb.xml b/jonas_tests/examples/base/examples/src/lb/lb.xml deleted file mode 100644 index cd3838373204a0cdbedece89c6f7b179e44c8cc7..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/lb/lb.xml +++ /dev/null @@ -1,133 +0,0 @@ - - - - - Deployment descriptor for the lb JOnAS example - lb example - - - - - Manager Session Bean with Remote interface - Manager - Manager - lb.ManagerHome - lb.Manager - lb.ManagerSF - Stateful - Container - - ejb/manac - Entity - lb.ManacLocalHome - lb.ManacLocal - Manac - - - jdbc/mydb - javax.sql.DataSource - Application - - - - - Managed Account Entity Bean, with local interface - Manac - Manac - lb.ManacLocalHome - lb.ManacLocal - lb.ManacEC - Container - java.lang.String - true - 1.x - - name - - - num - - - balance - - name - - - - - - - - Manac - * - - - Manager - * - - Supports - - - - - Manager - createAll - - NotSupported - - - - Manac - credit - - - Manac - debit - - - Manager - movement - - - Manager - checkAll - - - Manager - checkAccount - - Required - - - diff --git a/jonas_tests/examples/base/examples/src/mailsb/ClientMailer.java b/jonas_tests/examples/base/examples/src/mailsb/ClientMailer.java deleted file mode 100644 index 18dbed93adc913a6dc5a674c0a3413349b3dec45..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mailsb/ClientMailer.java +++ /dev/null @@ -1,282 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Florent BENOIT & Ludovic BERT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package mailsb; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.IOException; -import javax.naming.InitialContext; -import javax.naming.Context; -import javax.rmi.PortableRemoteObject; - -/** - * Sample for Mailer Session Bean. Usage: java mailsb.ClientMailer - * @author Florent Benoit - * @author Ludovic Bert - */ -public class ClientMailer { - - /** - * Session case - */ - private static final int SESSION_CASE = 1; - - /** - * MimePartDatasource case - */ - private static final int MIMEPARTDS_CASE = 2; - - /** - * Content of the mail - */ - private static String content = null; - - /** - * Constructor. Hide constructor as it is an utility class - */ - private ClientMailer() { - - } - - /** - * Read from bufferedReader the text which is given by the user after the - * given prompt. - * @param bufferedReader the buffer to read input. - * @param prompt the prompt asking the user. - * @return the text given by the user. - * @throws IOException if it can't the bufferedReader. - */ - private static String getTextFromUser(BufferedReader bufferedReader, String prompt) throws IOException { - - boolean isSet = false; - String txt = null; - while (!isSet) { - System.out.print(prompt + " :"); - txt = bufferedReader.readLine(); - if (!txt.equals("")) { - isSet = true; - } else { - System.out.println("'" + prompt + "' can't be empty."); - } - } - return txt; - } - - /** - * Main method of the class - * @param args the arguments of the program - */ -public static void main(String[] args) { - - //Check if there are valid args - if (args.length < 1) { - System.err.println("Syntax is : java mailsb.ClientMailer "); - System.exit(2); - } - - - int argType = 0; - if (args[0].equalsIgnoreCase("SessionMailer")) { - argType = SESSION_CASE; - } else if (args[0].equalsIgnoreCase("MimePartDSMailer")) { - argType = MIMEPARTDS_CASE; - } else { - System.err.println("Invalid type '" + args[0] + "', valid syntax is : java mailsb.ClientMailer "); - System.exit(2); - } - - //Get the initial context - Context initialContext = null; - try { - initialContext = new InitialContext(); - } catch (Exception e) { - System.err.println("Cannot get initial context for JNDI: " + e.getMessage()); - System.exit(2); - } - - switch (argType) { - case SESSION_CASE : - sessionMailer(initialContext); - break; - case MIMEPARTDS_CASE : - if (args.length > 1) { - content = "Content of mail :"; - for (int i = 1; i < args.length; i++) { - content += args[i]; - } - } - mimePartDSMailer(initialContext); - break; - default : - - } - - - } - /** - * Deal with the MimePartDSMailer bean - * @param initialContext the initial context - */ - private static void mimePartDSMailer(Context initialContext) { - - // Connecting to the mailer bean MailerHome thru JNDI - MimePartDSMailerHome mimePartDSMailerHome = null; - try { - System.out.print("Looking up the Session mailer home..."); - mimePartDSMailerHome = (MimePartDSMailerHome) PortableRemoteObject.narrow(initialContext - .lookup("MimePartDSMailerHome"), MimePartDSMailerHome.class); - System.out.println("OK !"); - } catch (Exception e) { - System.out.println("failed !"); - System.err.println("Cannot lookup MimePartDSMailerHome: " + e.getMessage()); - System.exit(2); - } - - // MimePartDSMailerBean creation - MimePartDSMailer mimePartDSMailer = null; - try { - System.out.print("Creating a MimePartDS mailer bean ..."); - mimePartDSMailer = mimePartDSMailerHome.create("MimePartDS mailer"); - System.out.println("OK !"); - } catch (Exception e) { - System.out.println("failed !"); - System.err.println("Cannot create MimePartDSMailerBean: " + e.getMessage()); - System.exit(2); - } - - if (content == null) { - //Read the value from the user - BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in)); - - try { - System.out.println("Content of the mail (Only one line)"); - content = getTextFromUser(bufferedReader, "Content"); - } catch (IOException e) { - System.err.println("Cannot read line from the bufferedReader : " + e.getMessage()); - System.exit(2); - } - } - - //Set the message with a recipient, a subject and a content - try { - System.out.print("Setting the message with given content '" + content + "'..."); - mimePartDSMailer.setMessage(content); - System.out.println("OK !"); - } catch (Exception e) { - System.out.println("failed !"); - System.err.println("Cannot set args of the message : " + e); - System.exit(2); - } - - //And send the message - try { - System.out.print("Sending the message..."); - mimePartDSMailer.send(); - System.out.println("OK !"); - } catch (Exception e) { - System.out.println("Failed !"); - System.err.println("Cannot send the message with MailerBean:" + e); - System.exit(2); - } - } - - /** - * Deal with the SessionMailer bean - * @param initialContext the initial context - */ - private static void sessionMailer(Context initialContext) { - // Connecting to the mailer bean MailerHome thru JNDI - SessionMailerHome sessionMailerHome = null; - try { - System.out.print("Looking up the Session mailer home..."); - sessionMailerHome = (SessionMailerHome) PortableRemoteObject.narrow(initialContext - .lookup("SessionMailerHome"), SessionMailerHome.class); - System.out.println("OK !"); - } catch (Exception e) { - System.out.println("failed !"); - System.err.println("Cannot lookup MailerHome: " + e.getMessage()); - System.exit(2); - } - - // MailerBean creation - SessionMailer sessionMailer = null; - try { - System.out.print("Creating a session mailer bean..."); - sessionMailer = sessionMailerHome.create("mailer"); - System.out.println("OK !"); - } catch (Exception e) { - System.out.println("failed !"); - System.err.println("Cannot create MailerBean: " + e.getMessage()); - System.exit(2); - } - - String toRecipient = null; - String subject = null; - String content = null; - - //Read the value from the user - BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in)); - - try { - System.out.println("Recipient is the 'to' field of a mail"); - toRecipient = getTextFromUser(bufferedReader, "TO"); - - System.out.println("Subject of the mail"); - subject = getTextFromUser(bufferedReader, "Subject"); - - System.out.println("Content of the mail (Only one line)"); - content = getTextFromUser(bufferedReader, "Content"); - - } catch (IOException e) { - System.err.println("Cannot read line from the bufferedReader : " + e.getMessage()); - System.exit(2); - } - - //Set the message with a recipient, a subject and a content - try { - System.out.print("Setting the message with given args..."); - sessionMailer.setMessage(toRecipient, subject, content); - System.out.println("OK !"); - } catch (Exception e) { - System.out.println("failed !"); - System.err.println("Cannot set args of the message : " + e); - System.exit(2); - } - - //And send the message - try { - System.out.print("Sending the message..."); - sessionMailer.send(); - System.out.println("OK !"); - } catch (Exception e) { - System.out.println("Failed !"); - System.err.println("Cannot send the message with MailerBean:" + e); - System.exit(2); - } - } - -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/mailsb/MimePartDSMailer.java b/jonas_tests/examples/base/examples/src/mailsb/MimePartDSMailer.java deleted file mode 100644 index 19bc38a082fd7703e7e256fe0168d12a83b81a97..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mailsb/MimePartDSMailer.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Florent BENOIT & Ludovic BERT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package mailsb; - -import java.rmi.RemoteException; -import javax.ejb.EJBObject; - -/** - * Remote interface for the bean Mailer Work with - * javax.mail.internet.MimePartDataSource - * @author Florent Benoit - * @author Ludovic Bert - */ -public interface MimePartDSMailer extends EJBObject { - - /** - * Set the message with a specific recipient, subject and content. - * @param content the content of the message. - * @throws Exception if a problem occurs. - * @throws RemoteException if the call failed. - */ - void setMessage(String content) throws Exception, RemoteException; - - /** - * Send the message by creating it with the mail factory properties. - * @throws Exception if a problem occurs. - * @throws RemoteException if the call failed. - */ - void send() throws Exception, RemoteException; - -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/mailsb/MimePartDSMailerBean.java b/jonas_tests/examples/base/examples/src/mailsb/MimePartDSMailerBean.java deleted file mode 100644 index 98a232c9c3a6c7dffbcc32eb507a9b66ebe5fbc9..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mailsb/MimePartDSMailerBean.java +++ /dev/null @@ -1,228 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Florent BENOIT & Ludovic BERT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package mailsb; - -//import java -import java.rmi.RemoteException; - -//import javax -import javax.ejb.EJBException; -import javax.ejb.SessionBean; -import javax.ejb.SessionContext; - -import javax.mail.Message; -import javax.mail.MessageContext; -import javax.mail.MessagingException; -import javax.mail.Transport; -import javax.mail.internet.MimePartDataSource; -import javax.naming.InitialContext; -import javax.naming.NamingException; - -/** - * Implementation of the mailer Session Bean. It uses - * javax.mail.internet.MimePartDataSource This bean is a statefull, and - * synchronized bean. The container uses the SessionBean methods to notify the - * enterprise Bean instances of the instance's life cycle events. - * @author Florent Benoit - * @author Ludovic Bert - */ -public class MimePartDSMailerBean implements SessionBean { - - /** - * Name of the bean - */ - private String name = null; - - /** - * Session context that the container provides for a session enterprise Bean - * instance. - */ - private SessionContext sessionContext = null; - - /** - * Reference to the javax.mail.Message object which is the message to send - * with javamail - */ - private Message message = null; - - /* ========================= ejbCreate methods =========================== */ - - /** - * There must be one ejbCreate() method per create() method on the Home - * interface, and with the same signature. - * @param name the name of the bean - */ - public void ejbCreate(String name) { - this.name = name; - } - - /* =============== javax.ejb.SessionBean 2.0 implementation ============== */ - - /** - * Set the associated session context. The container calls this method after - * the instance creation. The enterprise Bean instance should store the - * reference to the context object in an instance variable. This method is - * called with no transaction context. - * @param sessionContext A SessionContext interface for the instance. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException This exception is defined in the method - * signature to provide backward compatibility for applications - * written for the EJB 1.0 specification. Enterprise beans written - * for the EJB 1.1 specification should throw the - * javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB2.0 and higher specifications must throw - * the javax.ejb.EJBException instead of this exception. - */ - public void setSessionContext(SessionContext sessionContext) throws EJBException, java.rmi.RemoteException { - this.sessionContext = sessionContext; - } - - /** - * A container invokes this method before it ends the life of the session - * object. This happens as a result of a client's invoking a remove - * operation, or when a container decides to terminate the session object - * after a timeout. This method is called with no transaction context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException This exception is defined in the method - * signature to provide backward compatibility for enterprise beans - * written for the EJB 1.0 specification. Enterprise beans written - * for the EJB 1.1 specification should throw the - * javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB2.0 and higher specifications must throw - * the javax.ejb.EJBException instead of this exception. - */ - public void ejbRemove() throws EJBException, java.rmi.RemoteException { - // Nothing to do for this simple mailer example - } - - /** - * The activate method is called when the instance is activated from its - * "passive" state. The instance should acquire any resource that it has - * released earlier in the ejbPassivate() method. This method is called with - * no transaction context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException This exception is defined in the method - * signature to provide backward compatibility for enterprise beans - * written for the EJB 1.0 specification. Enterprise beans written - * for the EJB 1.1 specification should throw the - * javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB2.0 and higher specifications must throw - * the javax.ejb.EJBException instead of this exception. - */ - public void ejbActivate() throws EJBException, java.rmi.RemoteException { - // Nothing to do for this simple mailer example - } - - /** - * The passivate method is called before the instance enters the "passive" - * state. The instance should release any resources that it can re-acquire - * later in the ejbActivate() method. After the passivate method completes, - * the instance must be in a state that allows the container to use the Java - * Serialization protocol to externalize and store away the instance's - * state. This method is called with no transaction context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException This exception is defined in the method - * signature to provide backward compatibility for enterprise beans - * written for the EJB 1.0 specification. Enterprise beans written - * for the EJB 1.1 specification should throw the - * javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB2.0 and higher specifications must throw - * the javax.ejb.EJBException instead of this exception. - */ - public void ejbPassivate() throws EJBException, java.rmi.RemoteException { - // Nothing to do for this simple mailer example - } - - /* ======================== Mailer implementation ======================== */ - - /** - * Set the message with a specific recipient, subject and content. - * @param content the content of the message. - * @throws Exception if a problem occurs. - * @throws RemoteException if the call failed. - */ - public void setMessage(String content) throws Exception, RemoteException { - - //Get the initial context - InitialContext ictx = null; - try { - ictx = new InitialContext(); - } catch (NamingException e) { - throw new Exception("Can not get an inital context : " + e.getMessage()); - } - - //get a new MimePartDataSource from our ENC envirnoment java:comp/env - MimePartDataSource mimePartDataSource = null; - try { - mimePartDataSource = (MimePartDataSource) ictx.lookup("java:comp/env/mail/MailMimePartDataSource"); - } catch (NamingException e) { - throw new Exception("You have not configure the mail factory with the name specified" - + " in the jonas-ejb-jar.xml file for java:comp/env/mail/MailMimePartDataSource ." - + " By default, the factory's name is mailMimePartDS_1 :" + e.getMessage()); - } - - //Get the message context - MessageContext messageContext = mimePartDataSource.getMessageContext(); - - if (messageContext == null) { - throw new Exception("Can not get the message Context of the mimepartDatasource"); - } - - //Get the message from the context - message = messageContext.getMessage(); - - try { - message.setContent(content, "text/plain"); - } catch (MessagingException e) { - throw new Exception("A failure occurs when setting content of the message :" + e.getMessage()); - } - } - - /** - * Send the message which was previously configured. - * @throws Exception if a problem occurs. - * @throws RemoteException if the send failed. - */ - public void send() throws Exception, RemoteException { - - if (message == null) { - throw new Exception("The message can not be send because the method setMessage() " - + " was not called before the send() method."); - } - - try { - Transport.send(message); - } catch (MessagingException e) { - throw new Exception("The message can not be send : " + e.getMessage()); - } - } - -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/mailsb/MimePartDSMailerHome.java b/jonas_tests/examples/base/examples/src/mailsb/MimePartDSMailerHome.java deleted file mode 100644 index c790753f9d53da98db9891f135c51ac29f3bf0ea..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mailsb/MimePartDSMailerHome.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Florent BENOIT & Ludovic BERT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package mailsb; - -import java.rmi.RemoteException; -import javax.ejb.CreateException; -import javax.ejb.EJBHome; - -/** - * Home interface for the bean Mailer - * Work with javax.mail.internet.MimePartDataSource - * @author Florent Benoit - * @author Ludovic Bert - */ -public interface MimePartDSMailerHome extends EJBHome { - - /** - * Create a bean with a specific name - * @param name the name of the bean - * @throws CreateException if the bean creation failed. - * @throws RemoteException if the call failed. - * @return the "mailer" bean created - */ - MimePartDSMailer create(String name) throws CreateException, RemoteException; -} diff --git a/jonas_tests/examples/base/examples/src/mailsb/README b/jonas_tests/examples/base/examples/src/mailsb/README deleted file mode 100644 index dd47d3e2897f0693c20d0b20abdd1004b1dbf0ef..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mailsb/README +++ /dev/null @@ -1,37 +0,0 @@ -Session beans "Mailer" ----------------------- -SessionMailer : session bean using javax.mail.Session mail factory -MimePartDSMailer : session bean using javax.mail.internet.MimePartDataSource mail factory - -Compiling this example: ------------------------ -ant -find build.xml install - -Running this example: ---------------------- -In order to run this example, you must configure two types of mail factory : -You can use the provided templates : - $JONAS_ROOT/conf/MailSession1 - $JONAS_ROOT/conf/MailMimePartDS1 - -MailSession1 is a javax.mail.Session mail factory. --> Only the property mail.host need to be defined. - -MailMimePartDS1 is a javax.mail.internet.MimePartDataSource mail factory. --> The properties mail.host, mail.to and mail.subject must be defined. - -Assuming that jonas.service.mail.factories property is already set in -the jonas.properties file, start JOnAS, with the mail service. - jonas start -Djonas.services=registry,jmx,security,jtm,dbm,ejb2,mail -(You can instead change the service list in jonas.properties) - - -Run the client : -jclient -cp $JONAS_BASE/ejbjars/mailsb.jar mailsb.ClientMailer SessionMailer -or -Run the client via the Ant task runclient - ant runclient - -Stop the jonas server - jonas stop - diff --git a/jonas_tests/examples/base/examples/src/mailsb/SessionMailer.java b/jonas_tests/examples/base/examples/src/mailsb/SessionMailer.java deleted file mode 100644 index c0ed14fe20f20e29afbd85f61454178803e3e770..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mailsb/SessionMailer.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Florent BENOIT & Ludovic BERT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package mailsb; - -import java.rmi.RemoteException; -import javax.ejb.EJBObject; - -/** - * Remote interface for the bean Mailer Work with javax.mail.Session - * @author Florent Benoit - * @author Ludovic Bert - */ -public interface SessionMailer extends EJBObject { - - /** - * Set the message with a specific recipient, subject and content. - * @param recipient the 'TO' field of the message. - * @param subject the subject of the message. - * @param content the content of the message. - * @throws Exception if a problem occurs. - * @throws RemoteException if the call failed. - */ - void setMessage(String recipient, String subject, String content) throws Exception, RemoteException; - - /** - * Send the message which was previously configured. - * @throws Exception if a problem occurs. - * @throws RemoteException if the call failed. - */ - void send() throws Exception, RemoteException; - -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/mailsb/SessionMailerBean.java b/jonas_tests/examples/base/examples/src/mailsb/SessionMailerBean.java deleted file mode 100644 index 82b2073459d78c4b96d863ce56db5f9582e3e31a..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mailsb/SessionMailerBean.java +++ /dev/null @@ -1,234 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Florent BENOIT & Ludovic BERT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package mailsb; - -//import java -import java.rmi.RemoteException; - -//import javax -import javax.ejb.EJBException; -import javax.ejb.SessionBean; -import javax.ejb.SessionContext; - -import javax.mail.Message; -import javax.mail.MessagingException; -import javax.mail.Session; -import javax.mail.Transport; -import javax.mail.internet.InternetAddress; -import javax.mail.internet.MimeMessage; - -import javax.naming.InitialContext; -import javax.naming.NamingException; - -/** - * Implementation of the mailer Session Bean. It uses javax.mail.Session This - * bean is a statefull, and synchronized bean. The container uses the - * SessionBean methods to notify the enterprise Bean instances of the instance's - * life cycle events. - * @author Florent Benoit - * @author Ludovic Bert - */ -public class SessionMailerBean implements SessionBean { - - /** - * Name of the bean - */ - private String name = null; - - /** - * Session context that the container provides for a session enterprise Bean - * instance. - */ - private SessionContext sessionContext = null; - - /** - * Reference to the javax.mail.Message object which is the message to send - * with javamail - */ - private Message message = null; - - /* ========================= ejbCreate methods =========================== */ - - /** - * There must be one ejbCreate() method per create() method on the Home - * interface, and with the same signature. - * @param name the name of the bean - */ - public void ejbCreate(String name) { - this.name = name; - } - - /* =============== javax.ejb.SessionBean 2.0 implementation ============== */ - - /** - * Set the associated session context. The container calls this method after - * the instance creation. The enterprise Bean instance should store the - * reference to the context object in an instance variable. This method is - * called with no transaction context. - * @param sessionContext A SessionContext interface for the instance. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException This exception is defined in the method - * signature to provide backward compatibility for applications - * written for the EJB 1.0 specification. Enterprise beans written - * for the EJB 1.1 specification should throw the - * javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB2.0 and higher specifications must throw - * the javax.ejb.EJBException instead of this exception. - */ - public void setSessionContext(SessionContext sessionContext) throws EJBException, java.rmi.RemoteException { - this.sessionContext = sessionContext; - } - - /** - * A container invokes this method before it ends the life of the session - * object. This happens as a result of a client's invoking a remove - * operation, or when a container decides to terminate the session object - * after a timeout. This method is called with no transaction context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException This exception is defined in the method - * signature to provide backward compatibility for enterprise beans - * written for the EJB 1.0 specification. Enterprise beans written - * for the EJB 1.1 specification should throw the - * javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB2.0 and higher specifications must throw - * the javax.ejb.EJBException instead of this exception. - */ - public void ejbRemove() throws EJBException, java.rmi.RemoteException { - // Nothing to do for this simple mailer example - } - - /** - * The activate method is called when the instance is activated from its - * "passive" state. The instance should acquire any resource that it has - * released earlier in the ejbPassivate() method. This method is called with - * no transaction context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException This exception is defined in the method - * signature to provide backward compatibility for enterprise beans - * written for the EJB 1.0 specification. Enterprise beans written - * for the EJB 1.1 specification should throw the - * javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB2.0 and higher specifications must throw - * the javax.ejb.EJBException instead of this exception. - */ - public void ejbActivate() throws EJBException, java.rmi.RemoteException { - // Nothing to do for this simple mailer example - } - - /** - * The passivate method is called before the instance enters the "passive" - * state. The instance should release any resources that it can re-acquire - * later in the ejbActivate() method. After the passivate method completes, - * the instance must be in a state that allows the container to use the Java - * Serialization protocol to externalize and store away the instance's - * state. This method is called with no transaction context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException This exception is defined in the method - * signature to provide backward compatibility for enterprise beans - * written for the EJB 1.0 specification. Enterprise beans written - * for the EJB 1.1 specification should throw the - * javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB2.0 and higher specifications must throw - * the javax.ejb.EJBException instead of this exception. - */ - public void ejbPassivate() throws EJBException, java.rmi.RemoteException { - // Nothing to do for this simple mailer example - } - - /* ======================== Mailer implementation ======================== */ - - /** - * Set the message with a specific recipient, subject and content. - * @param recipient the 'TO' field of the message. - * @param subject the subject of the message. - * @param content the content of the message. - * @throws Exception if a problem occurs. - * @throws RemoteException if the call failed. - */ - public void setMessage(String recipient, String subject, String content) throws Exception, RemoteException { - - //Get the initial context - InitialContext ictx = null; - try { - ictx = new InitialContext(); - } catch (NamingException e) { - throw new Exception("Can not get an inital context : " + e.getMessage()); - } - - //get a new Session from our ENC envirnoment java:comp/env - Session session = null; - try { - session = (Session) ictx.lookup("java:comp/env/mail/MailSession"); - } catch (NamingException e) { - throw new Exception("You have not configure the mail factory with the name specified" - + " in the jonas-ejb-jar.xml file for java:comp/env/mail/MailSession ." - + " By default, the factory's name is mailSession_1 :" + e.getMessage()); - } - - try { - //Create the message - message = new MimeMessage(session); - InternetAddress[] toRecipients = new InternetAddress[] {new InternetAddress(recipient)}; - /* - * try { toRecipients[0].validate(); } catch (AddressException e) { - * throw new Exception("A failure occurs when validating the email - * address '" + recipient + "' :" + e.getMessage()); } - */ - message.setRecipients(Message.RecipientType.TO, toRecipients); - message.setSubject(subject); - message.setContent(content, "text/plain"); - } catch (MessagingException e) { - throw new Exception("A failure occurs when getting a message from the session and setting " - + "the different parameters :" + e.getMessage()); - } - - } - - /** - * Send the message which was previously configured. - * @throws Exception if a problem occurs. - * @throws RemoteException if the send failed. - */ - public void send() throws Exception, RemoteException { - - if (message == null) { - throw new Exception("The message can not be send because the method setMessage() " - + " was not called before the send() method."); - } - - try { - Transport.send(message); - } catch (MessagingException e) { - throw new Exception("The message can not be send : " + e.getMessage()); - } - } - -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/mailsb/SessionMailerHome.java b/jonas_tests/examples/base/examples/src/mailsb/SessionMailerHome.java deleted file mode 100644 index eeb40ea16983a5659897bd1576abd23bdec09820..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mailsb/SessionMailerHome.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Florent BENOIT & Ludovic BERT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package mailsb; - -import java.rmi.RemoteException; -import javax.ejb.CreateException; -import javax.ejb.EJBHome; - -/** - * Home interface for the bean Mailer - * Work with javax.mail.Session - * @author Florent Benoit - * @author Ludovic Bert - */ -public interface SessionMailerHome extends EJBHome { - - /** - * Create a bean with a specific name - * @param name the name of the bean - * @throws CreateException if the bean creation failed. - * @throws RemoteException if the call failed. - * @return the "mailer" bean created - */ - SessionMailer create(String name) throws CreateException, RemoteException; -} diff --git a/jonas_tests/examples/base/examples/src/mailsb/application-client.xml b/jonas_tests/examples/base/examples/src/mailsb/application-client.xml deleted file mode 100644 index 13436c357a7d391a38bfe7ac340abd00749605df..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mailsb/application-client.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Client of the sb sample - - diff --git a/jonas_tests/examples/base/examples/src/mailsb/build.xml b/jonas_tests/examples/base/examples/src/mailsb/build.xml deleted file mode 100644 index f304f220cdd56b24d97a587c7d1a6a31f591878f..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mailsb/build.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/src/mailsb/jonas-mailsb.xml b/jonas_tests/examples/base/examples/src/mailsb/jonas-mailsb.xml deleted file mode 100644 index 0d54d38a2ff00aab820e7391b64a3e137971e063..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mailsb/jonas-mailsb.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - SessionMailer - SessionMailerHome - - mail/MailSession - mailSession_1 - - - - MimePartDSMailer - MimePartDSMailerHome - - mail/MailMimePartDataSource - mailMimePartDS_1 - - - diff --git a/jonas_tests/examples/base/examples/src/mailsb/mailsb.xml b/jonas_tests/examples/base/examples/src/mailsb/mailsb.xml deleted file mode 100644 index 861d926941ea2b8d6ed1b2f0ed975356209ea4e6..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mailsb/mailsb.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - Deployment descriptor for the mailsb JOnAS example - mailsb example - - - SessionMailer - mailsb.SessionMailerHome - mailsb.SessionMailer - mailsb.SessionMailerBean - Stateful - Container - - mail/MailSession - javax.mail.Session - Container - - - - MimePartDSMailer - mailsb.MimePartDSMailerHome - mailsb.MimePartDSMailer - mailsb.MimePartDSMailerBean - Stateful - Container - - mail/MailMimePartDataSource - javax.mail.internet.MimePartDataSource - Container - - - - - - - SessionMailer - * - - - MimePartDSMailer - * - - Required - - - diff --git a/jonas_tests/examples/base/examples/src/mdb/newsamplemdb/MdbBean.java b/jonas_tests/examples/base/examples/src/mdb/newsamplemdb/MdbBean.java deleted file mode 100644 index 6ca0a5beb0084d8fa3d4994018227df197f954a1..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/newsamplemdb/MdbBean.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): ____________________________________. - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -// MdbBean.java -// Message Driven bean - -package newsamplemdb; - - -import javax.jms.Message; -import javax.jms.TextMessage; -import javax.jms.JMSException; - - - -/** - * Example of MessageDrivenBean on a Topic. The transactions are container managed (Required) - * this class have superclasses in which are defined ejbCreate() and onMessage() - * this strange structure is only for reproducing bug 300387 - * for a more normal structure see the samplemdb sample - */ -public class MdbBean extends MdbBean_b { - - - /** - * Default constructor - * - */ - public MdbBean() { - } - - - - /** - * onMessage1 method - */ - public void onMessage1(Message message) { - System.out.println( "MdbBean onMessage1"); - try{ - TextMessage mess = (TextMessage)message; - System.out.println( "Message received: "+mess.getText()); - }catch(JMSException ex){ - System.err.println("Exception caught: "+ex); - } - } -} diff --git a/jonas_tests/examples/base/examples/src/mdb/newsamplemdb/MdbBean_a.java b/jonas_tests/examples/base/examples/src/mdb/newsamplemdb/MdbBean_a.java deleted file mode 100644 index dad6d748c5f72c559f850627a107033661e90584..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/newsamplemdb/MdbBean_a.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): ____________________________________. - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -// MdbBean_a.java -// Message Driven bean - -package newsamplemdb; - -import javax.ejb.MessageDrivenBean; -import javax.ejb.MessageDrivenContext; - - - -/** - * Superclass of the MessageDrivenBean class MdbBean - * Note that this class is not public but ejbCreate is public - * (it's only for reproducing the 300387 bug!) - */ - class MdbBean_a implements MessageDrivenBean { - - private transient MessageDrivenContext mdbContext; - - - - // ------------------------------------------------------------------ - // MessageDrivenBean implementation - // ------------------------------------------------------------------ - - /** - * Default constructor - * - */ - public MdbBean_a() { - } - - /** - * Set the associated context. The container call this method - * after the instance creation. - * The enterprise Bean instance should store the reference to the context - * object in an instance variable. - * This method is called with no transaction context. - * - * @param ctx A MessageDrivenContext interface for the instance. - */ - - public void setMessageDrivenContext(MessageDrivenContext ctx) { - System.out.println("MdbBean_a setMessageDrivenContext"); - mdbContext = ctx; - } - - /** - * A container invokes this method before it ends the life of the message-driven object. - * This happens when a container decides to terminate the message-driven object. - * - * This method is called with no transaction context. - * - */ - public void ejbRemove() { - System.out.println("MdbBean_a ejbRemove"); - } - - /** - * The Message driven bean must define an ejbCreate methods with no args. - * - */ - public void ejbCreate() { - System.out.println("MdbBean_a ejbCreate"); - } - - -} diff --git a/jonas_tests/examples/base/examples/src/mdb/newsamplemdb/MdbBean_b.java b/jonas_tests/examples/base/examples/src/mdb/newsamplemdb/MdbBean_b.java deleted file mode 100644 index 675f1d8fc0e0793c277c0d33aaa2742460a2b57d..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/newsamplemdb/MdbBean_b.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): ____________________________________. - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -// MdbBean_b.java -// Message Driven bean - -package newsamplemdb; - -import javax.ejb.MessageDrivenContext; -import javax.jms.MessageListener; -import javax.jms.Message; -import javax.jms.TextMessage; -import javax.jms.JMSException; - -/** - * Superclass of the MessageDrivenBean class MdbBean - * Note that this public class is implementing onMessage method - * (it's only for reproducing the 300387 bug!) - */ -public class MdbBean_b extends MdbBean_a implements MessageListener { - - - - - /** - * Default constructor - * - */ - public MdbBean_b() { - } - - /** - * onMessage method - */ - public void onMessage(Message message) { - System.out.println( "MdbBean onMessage"); - try{ - TextMessage mess = (TextMessage)message; - System.out.println( "Message received: "+mess.getText()); - }catch(JMSException ex){ - System.err.println("Exception caught: "+ex); - } - } - - - -} diff --git a/jonas_tests/examples/base/examples/src/mdb/newsamplemdb/MdbClient.java b/jonas_tests/examples/base/examples/src/mdb/newsamplemdb/MdbClient.java deleted file mode 100644 index b387194fbdc444c2481f46cfdd154960e94ff950..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/newsamplemdb/MdbClient.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): ____________________________________. - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -// MdbClient.java -// mini Client for accessing bean Mdb - -package newsamplemdb; -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.*; -import javax.jms.*; - -/** - * - */ -public class MdbClient { - - static Context ictx = null; - static TopicConnectionFactory tcf = null; - static TopicPublisher tp = null; - static Topic topic = null; - // JNDI name of the Topic - static String topicName = "mdbTopic"; - // JNDI name of the default connection factory - static String conFactName = "JTCF"; - - public static void main(String[] arg) { - // Get InitialContext - try { - ictx = new InitialContext(); - // lookup the TopicConnectionFactory through its JNDI name - tcf = (TopicConnectionFactory) ictx.lookup(conFactName ); - System.out.println("JMS client: tcf = " + tcf); - // lookup the Topic through its JNDI name - topic = (Topic) ictx.lookup(topicName); - System.out.println("JMS client: topic = " + topic); - } catch (NamingException e) { - e.printStackTrace(); - System.exit(2); - } - - TopicConnection tc = null; - TopicSession session = null; - try { - tc = tcf.createTopicConnection(); - System.out.println("JMS client: tc = " + tc.toString()); - session = tc.createTopicSession(false, Session.AUTO_ACKNOWLEDGE); - tp = session.createPublisher(topic); - }catch (Exception e) { - e.printStackTrace(); - System.exit(2); - } - - // publish 10 messages to the topic - int nbmess = 100; - try { - TextMessage message; - for (int i=0;i - - - - Client of the sb sample - - diff --git a/jonas_tests/examples/base/examples/src/mdb/newsamplemdb/build.xml b/jonas_tests/examples/base/examples/src/mdb/newsamplemdb/build.xml deleted file mode 100644 index 31eb79c0f57eb0dffceeb998fca31be290f0327a..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/newsamplemdb/build.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/src/mdb/newsamplemdb/jonas-newsamplemdb.xml b/jonas_tests/examples/base/examples/src/mdb/newsamplemdb/jonas-newsamplemdb.xml deleted file mode 100644 index 6dc54be4fbc46e8c4bc5e926ab447d60d804cbc2..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/newsamplemdb/jonas-newsamplemdb.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - Mdb - - joramActivationSpec - - 20 - 10 - - - - diff --git a/jonas_tests/examples/base/examples/src/mdb/newsamplemdb/newsamplemdb.xml b/jonas_tests/examples/base/examples/src/mdb/newsamplemdb/newsamplemdb.xml deleted file mode 100644 index e27a89ae09a58b7bb224ac9eda5213e915dc3e68..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/newsamplemdb/newsamplemdb.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - Deployment descriptor for the newsamplemdb JOnAS example - newsamplemdb example - - - Describe here the message driven bean Mdb - Message Driven Bean Mdb - Mdb - newsamplemdb.MdbBean - javax.jms.MessageListener - Container - javax.jms.Topic - - - destination - mdbTopic - - - destinationType - javax.jms.Topic - - - subscriptionDurability - NonDurable - - - - - - - - - - Mdb - * - - Required - - - - diff --git a/jonas_tests/examples/base/examples/src/mdb/newsamplemdb2/MdbBean.java b/jonas_tests/examples/base/examples/src/mdb/newsamplemdb2/MdbBean.java deleted file mode 100644 index 3021f4b62fe695a4ae11904b6c5ee185a5ece017..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/newsamplemdb2/MdbBean.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): ____________________________________. - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -// MdbBean.java -// Message Driven bean - -package newsamplemdb2; - - -import javax.jms.Message; -import javax.jms.TextMessage; -import javax.jms.JMSException; - - - -/** - * Example of MessageDrivenBean on a Queue. The transactions are container managed (Required) - * this class have superclasses in which are defined ejbCreate() and onMessage() - * this strange structure is only for reproducing bug 300387 - * for a more normal structure see the samplemdb sample - */ -public class MdbBean extends MdbBean_b { - - - /** - * Default constructor - * - */ - public MdbBean() { - } - - - - /** - * onMessage1 method - */ - public void onMessage1(Message message) { - System.out.println( "MdbBean onMessage1"); - try{ - TextMessage mess = (TextMessage)message; - System.out.println( "Message received: "+mess.getText()); - }catch(JMSException ex){ - System.err.println("Exception caught: "+ex); - } - } -} diff --git a/jonas_tests/examples/base/examples/src/mdb/newsamplemdb2/MdbBean_a.java b/jonas_tests/examples/base/examples/src/mdb/newsamplemdb2/MdbBean_a.java deleted file mode 100644 index 16b7866da157351a25070af1cf9fedf6767fcfed..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/newsamplemdb2/MdbBean_a.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): ____________________________________. - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -// MdbBean_a.java -// Message Driven bean - -package newsamplemdb2; - -import javax.ejb.MessageDrivenBean; -import javax.ejb.MessageDrivenContext; - - - -/** - * Superclass of the MessageDrivenBean class MdbBean - * Note that this class is not public but ejbCreate is public - * (it's only for reproducing the 300387 bug!) - */ - class MdbBean_a implements MessageDrivenBean { - - private transient MessageDrivenContext mdbContext; - - - - // ------------------------------------------------------------------ - // MessageDrivenBean implementation - // ------------------------------------------------------------------ - - /** - * Default constructor - * - */ - public MdbBean_a() { - } - - /** - * Set the associated context. The container call this method - * after the instance creation. - * The enterprise Bean instance should store the reference to the context - * object in an instance variable. - * This method is called with no transaction context. - * - * @param ctx A MessageDrivenContext interface for the instance. - */ - - public void setMessageDrivenContext(MessageDrivenContext ctx) { - System.out.println("MdbBean_a setMessageDrivenContext"); - mdbContext = ctx; - } - - /** - * A container invokes this method before it ends the life of the message-driven object. - * This happens when a container decides to terminate the message-driven object. - * - * This method is called with no transaction context. - * - */ - public void ejbRemove() { - System.out.println("MdbBean_a ejbRemove"); - } - - /** - * The Message driven bean must define an ejbCreate methods with no args. - * - */ - public void ejbCreate() { - System.out.println("MdbBean_a ejbCreate"); - } - - -} diff --git a/jonas_tests/examples/base/examples/src/mdb/newsamplemdb2/MdbBean_b.java b/jonas_tests/examples/base/examples/src/mdb/newsamplemdb2/MdbBean_b.java deleted file mode 100644 index f3be938781db3e24a00905e42f8eabf0b4a14710..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/newsamplemdb2/MdbBean_b.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): ____________________________________. - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -// MdbBean_b.java -// Message Driven bean - -package newsamplemdb2; - -import javax.ejb.MessageDrivenContext; -import javax.jms.MessageListener; -import javax.jms.Message; -import javax.jms.TextMessage; -import javax.jms.JMSException; - -/** - * Superclass of the MessageDrivenBean class MdbBean - * Note that this public class is implementing onMessage method - * (it's only for reproducing the 300387 bug!) - */ -public class MdbBean_b extends MdbBean_a implements MessageListener { - - - - - /** - * Default constructor - * - */ - public MdbBean_b() { - } - - /** - * onMessage method - */ - public void onMessage(Message message) { - System.out.println( "MdbBean onMessage"); - try{ - TextMessage mess = (TextMessage)message; - System.out.println( "Message received: "+mess.getText()); - }catch(JMSException ex){ - System.err.println("Exception caught: "+ex); - } - } - - - -} diff --git a/jonas_tests/examples/base/examples/src/mdb/newsamplemdb2/MdbClient.java b/jonas_tests/examples/base/examples/src/mdb/newsamplemdb2/MdbClient.java deleted file mode 100644 index 95822753d0745928dadb2f7be25e9c1ab9620483..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/newsamplemdb2/MdbClient.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): ____________________________________. - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -// MdbClient.java -// mini Client for accessing bean Mdb - -package newsamplemdb2; -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.*; -import javax.jms.*; - -/** - * - */ -public class MdbClient { - - static Context ictx = null; - static QueueConnectionFactory qcf = null; - static QueueSender qp = null; - static Queue queue = null; - // JNDI name of the Queue - static String queueName = "mdbQueue"; - // JNDI name of the default connection factory - static String conFactName = "JQCF"; - - public static void main(String[] arg) { - // Get InitialContext - try { - ictx = new InitialContext(); - // lookup the QueueConnectionFactory through its JNDI name - qcf = (QueueConnectionFactory) ictx.lookup(conFactName ); - System.out.println("JMS client: qcf = " + qcf); - // lookup the Queue through its JNDI name - queue = (Queue) ictx.lookup(queueName); - System.out.println("JMS client: queue = " + queue); - } catch (NamingException e) { - e.printStackTrace(); - System.exit(2); - } - - QueueConnection qc = null; - QueueSession session = null; - try { - qc = qcf.createQueueConnection(); - System.out.println("JMS client: qc = " + qc.toString()); - session = qc.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); - qp = session.createSender(queue); - }catch (Exception e) { - e.printStackTrace(); - System.exit(2); - } - - // publish 10 messages to the queue - int nbmess = 10; - try { - TextMessage message; - for (int i=0;i - - - - Client of the sb sample - - diff --git a/jonas_tests/examples/base/examples/src/mdb/newsamplemdb2/build.xml b/jonas_tests/examples/base/examples/src/mdb/newsamplemdb2/build.xml deleted file mode 100644 index 469640ddb5346d9e5ada11e2680d8d1115e60ffe..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/newsamplemdb2/build.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/src/mdb/newsamplemdb2/jonas-newsamplemdb2.xml b/jonas_tests/examples/base/examples/src/mdb/newsamplemdb2/jonas-newsamplemdb2.xml deleted file mode 100644 index 6dc54be4fbc46e8c4bc5e926ab447d60d804cbc2..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/newsamplemdb2/jonas-newsamplemdb2.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - Mdb - - joramActivationSpec - - 20 - 10 - - - - diff --git a/jonas_tests/examples/base/examples/src/mdb/newsamplemdb2/newsamplemdb2.xml b/jonas_tests/examples/base/examples/src/mdb/newsamplemdb2/newsamplemdb2.xml deleted file mode 100644 index c5b2f6daff7fa5c1018c4b6ab1f690dfc33aa4ef..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/newsamplemdb2/newsamplemdb2.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - Deployment descriptor for the newsamplemdb2 JOnAS example - newsamplemdb2 example - - - Describe here the message driven bean Mdb - Message Driven Bean Mdb - Mdb - newsamplemdb2.MdbBean - javax.jms.MessageListener - Container - javax.jms.Queue - - - destination - mdbQueue - - - destinationType - javax.jms.Queue - - - subscriptionDurability - NonDurable - - - - - - - - - - Mdb - * - - Required - - - - diff --git a/jonas_tests/examples/base/examples/src/mdb/sampleappli/Env.java b/jonas_tests/examples/base/examples/src/mdb/sampleappli/Env.java deleted file mode 100644 index 427385f77f203685dfc70cb7fb11a9548bbb089b..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/sampleappli/Env.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): ____________________________________. - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -// Env.java -package sampleappli; - -import java.rmi.RemoteException; -import javax.ejb.EJBObject; - -/** - * Env remote interface - * @author JOnAS team - */ -public interface Env extends EJBObject { - - void init() throws RemoteException; - - void clean() throws RemoteException; -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/mdb/sampleappli/EnvBean.java b/jonas_tests/examples/base/examples/src/mdb/sampleappli/EnvBean.java deleted file mode 100644 index 99fe71650c81231f0794f93887d941811eb9d645..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/sampleappli/EnvBean.java +++ /dev/null @@ -1,238 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): ____________________________________. - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -// EnvBean.java -// Stateless Session bean - -package sampleappli; - -import java.rmi.RemoteException; -import java.sql.Connection; -import java.sql.SQLException; -import java.sql.Statement; -import java.io.File; -import javax.ejb.CreateException; -import javax.ejb.EJBException; -import javax.ejb.RemoveException; -import javax.ejb.EJBObject; -import javax.ejb.SessionBean; -import javax.ejb.SessionContext; -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; -import javax.sql.DataSource; - -/** - * EnvBean is a stateless session bean use to create and clean a correct - * environement for the running of the StockClient it creates/remove the - * StockTable and the order file - * @author JOnAS team - */ -public class EnvBean implements SessionBean { - - SessionContext ejbContext; - - DataSource dataSource = null; - - Connection conn = null; - - Statement stmt; - - String stocktablename = null; - - String orderfilename = null; - - // ------------------------------------------------------------------ - // SessionBean implementation - // ------------------------------------------------------------------ - - /** - * Set the associated session context. The container calls this method after - * the instance creation. The enterprise Bean instance should store the - * reference to the context object in an instance variable. This method is - * called with no transaction context. - * @param sessionContext A SessionContext interface for the instance. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - */ - public void setSessionContext(SessionContext ctx) { - ejbContext = ctx; - if (dataSource == null) { - // Finds DataSource from JNDI - Context initialContext = null; - try { - initialContext = new InitialContext(); - dataSource = (DataSource) initialContext.lookup("java:comp/env/jdbc/myDS"); - } catch (Exception e) { - System.err.println(" new InitialContext() : " + e); - throw new EJBException("Cannot get JNDI InitialContext"); - } - // Find the stocktablename - try { - stocktablename = (String) initialContext.lookup("java:comp/env/stocktablename"); - } catch (Exception e) { - System.err.println("cannot lookup environment " + e); - throw new EJBException("cannot lookup environment"); - } - // Find the orderfilename - try { - orderfilename = (String) initialContext.lookup("java:comp/env/orderfilename"); - } catch (Exception e) { - System.err.println("cannot lookup environment " + e); - throw new EJBException("cannot lookup environment"); - } - } - } - - /** - * A container invokes this method before it ends the life of the session - * object. This happens as a result of a client's invoking a remove - * operation, or when a container decides to terminate the session object - * after a timeout. This method is called with no transaction context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - */ - public void ejbRemove() { - } - - /** - * The Session bean must define 1 or more ejbCreate methods. - * @throws CreateException Failure to create a session EJB object. - */ - public void ejbCreate() throws CreateException { - } - - /** - * A container invokes this method on an instance before the instance - * becomes disassociated with a specific EJB object. - */ - public void ejbPassivate() { - } - - /** - * A container invokes this method when the instance is taken out of the - * pool of available instances to become associated with a specific EJB - * object. - */ - public void ejbActivate() { - } - - // ------------------------------------------------------------------ - // Env implementation - // ------------------------------------------------------------------ - - /** - * init - */ - public void init() { - createTableStock(); - createOrderFile(); - } - - /** - * clean - */ - public void clean() { - dropTableStock(); - removeOrderFile(); - } - - // ------------------------------------------------------------------ - // Env internal methods - // ------------------------------------------------------------------ - public void dropTableStock() { - // drop table - try { - conn = dataSource.getConnection(); - stmt = conn.createStatement(); - stmt.execute("DROP TABLE " + stocktablename); - stmt.close(); - conn.close(); - } catch (Exception e) { - System.err.println("Exception in dropTable : \n" + stocktablename + " " + e); - } - } - - public void createTableStock() { - // get connection - try { - conn = dataSource.getConnection(); - - } catch (Exception e) { - System.err.println("Cannot get Connection: \n" + e); - throw new EJBException("Cannot get Connection"); - } - try { - stmt = conn.createStatement(); - stmt.execute("DROP TABLE " + stocktablename); - stmt.close(); - } catch (Exception e) { - } - // create table - try { - stmt = conn.createStatement(); - stmt.execute("create table " + stocktablename + "(ID varchar(5) not null primary key, QUANTITY integer)"); - stmt.execute("insert into " + stocktablename + " values ('00000', 10)"); - stmt.execute("insert into " + stocktablename + " values ('00001', 20)"); - stmt.execute("insert into " + stocktablename + " values ('00002', 10)"); - stmt.execute("insert into " + stocktablename + " values ('00003', 20)"); - stmt.execute("insert into " + stocktablename + " values ('00004', 10)"); - stmt.close(); - conn.close(); - } catch (SQLException e) { - System.err.println("Exception in createTable : " + e); - throw new EJBException("Exception in createTable"); - } - } - - public void createOrderFile() { - try { - File f = new File(System.getProperty("java.io.tmpdir") + File.separator + System.getProperty("user.name") - + "_" + orderfilename); - if (!f.createNewFile()) { - f.delete(); - f.createNewFile(); - } - } catch (Exception ex) { - System.err.println("Exception on createOrderFile: " + ex); - throw new EJBException("Exception in createOrderFile"); - } - - } - - public void removeOrderFile() { - try { - File f = new File(System.getProperty("java.io.tmpdir") + File.separator + System.getProperty("user.name") - + "_" + orderfilename); - f.delete(); - } catch (Exception ex) { - System.err.println("Exception on removeOrderFile: " + ex); - throw new EJBException("Exception in removeOrderFile"); - } - } -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/mdb/sampleappli/EnvHome.java b/jonas_tests/examples/base/examples/src/mdb/sampleappli/EnvHome.java deleted file mode 100644 index 093ed2fb844578de174d6b0ad53b36d4a46f854b..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/sampleappli/EnvHome.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): ____________________________________. - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package sampleappli; - -import java.rmi.RemoteException; -import javax.ejb.CreateException; -import javax.ejb.EJBHome; - - -/** - * Home interface for the bean Env - * @author JOnAS team - */ -public interface EnvHome extends EJBHome { - - Env create() throws CreateException, RemoteException; -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/mdb/sampleappli/OrderBean.java b/jonas_tests/examples/base/examples/src/mdb/sampleappli/OrderBean.java deleted file mode 100644 index b9ea5d35e75d90dcd82b584c894211c6e02d4351..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/sampleappli/OrderBean.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): ____________________________________. - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -// OrderBean.java -// Message Driven bean -package sampleappli; - -import javax.ejb.MessageDrivenBean; -import javax.ejb.MessageDrivenContext; -import javax.jms.Message; -import javax.jms.MessageListener; -import javax.jms.TextMessage; - -import javax.naming.Context; -import javax.naming.InitialContext; - -import java.io.DataOutputStream; -import java.io.BufferedOutputStream; -import java.io.File; -import java.io.FileOutputStream; - -/** - * - */ -public class OrderBean implements MessageDrivenBean, MessageListener { - - private transient MessageDrivenContext mdbContext; - - String filename = null; - - // ------------------------------------------------------------------ - // MessageDrivenBean implementation - // ------------------------------------------------------------------ - - /** - * Default constructor - */ - public OrderBean() { - } - - /** - * Set the associated context. The container call this method after the - * instance creation. The enterprise Bean instance should store the - * reference to the context object in an instance variable. This method is - * called with no transaction context. - * @param MessageDrivenContext A MessageDrivenContext interface for the - * instance. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - */ - - public void setMessageDrivenContext(MessageDrivenContext ctx) { - mdbContext = ctx; - Context initialContext = null; - if (filename == null) { - try { - initialContext = new InitialContext(); - // Check that the SessionContext is the good one. - filename = (String) initialContext.lookup("java:comp/env/orderfilename"); - } catch (Exception e) { - System.err.println("cannot lookup environment"); - } - } - } - - /** - * A container invokes this method before it ends the life of the - * message-driven object. This happens when a container decides to terminate - * the message-driven object. This method is called with no transaction - * context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - */ - public void ejbRemove() { - } - - /** - * The Message driven bean must define an ejbCreate methods with no args. - */ - public void ejbCreate() { - } - - /** - * onMessage method - */ - public void onMessage(Message message) { - TextMessage msg = (TextMessage) message; - try { - File f = new File(System.getProperty("java.io.tmpdir") + File.separator + System.getProperty("user.name") - + "_" + filename); - DataOutputStream fileout = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(f - .getCanonicalPath(), true))); - fileout.writeBytes(msg.getText() + System.getProperty("line.separator")); - fileout.close(); - } catch (Exception e) { - System.err.println("OrderBean onMessage Exception caught: " + e); - } - } -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/mdb/sampleappli/README b/jonas_tests/examples/base/examples/src/mdb/sampleappli/README deleted file mode 100644 index a5b40b5e5656aaa64562aab5e5b30405c4ca478e..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/sampleappli/README +++ /dev/null @@ -1,69 +0,0 @@ -Example description -------------------- - -The object of this example is to show how Message driven beans may -be involved in global transactions as well as Entity beans - -In this sample appli: - - - StockBean is an entity bean CMP that handles a stock table - a Stock item is composed with a Stockid (String) which is the primary key - and a Quantity (int) - the method decreaseQuantity(int qty) decrease the quantity for the - corresponding stockid but may throw a RemoteException "Negative stock" - - - StockHandlerBean is a Message Driven Bean that receives Map messages: - "CustomerId", String - "ProductId", String - "Quantity", int - - the onMessage method will run in the scope of a transaction started - by the the container in the receipt of a message on the - topic (StockHandlerTopic) - it will send a Text message on a Queue (OrderQueue) and decrease - the stock quantity for the Stock element identified by the "ProductId". - If it catches a RemoteException on the decreaseQuantity method it will call - the setRollbackOnly method of the MessageDrivenContext linked to the - instance in this case the container transaction will be rolled back. - - - OrderBean is another Message Driven Bean listening on the OrderQueue Queue - on receipt of a Text message on this queue it will write the corresponding - String as a new line in a file (order.txt) - - - EnvBean is a stateless session bean used for creating the stock table - in the database and for deleting this table - - - SampleAppliClient is a java application that sends n messages to the - topic StockHandlerTopic for decreasing several Stock items these - n messages doesn't cause the raise of Remote Exception negative stock - and sends one message on the Stock id "00000" that must cause - a rollback of the transaction. - At the end it verifies the number of messages received by the - Order message driven bean by counting the nb of lines in the - order.txt file (it must be equal to n) and verifies that the - stock quantity for "00000" has not changed and all the other must - be equal to 1. - - -Compiling the example : ---------------------- - -ant -find build.xml install - -Running this example : ---------------------- -You can use the provided run.sh (Unix) or run.bat (Windows) scripts to execute the -whole example or run it step by step. - - jonas start - ant runclient - jonas stop - -Note : -Running this example will lead to a normal exception in the JOnAS server : - - System Exception in business method: -java.rmi.RemoteException: Negative stock - at sampleappli.StockBean.decreaseQuantity(StockBean.java:199) - ... - diff --git a/jonas_tests/examples/base/examples/src/mdb/sampleappli/SampleAppliClient.java b/jonas_tests/examples/base/examples/src/mdb/sampleappli/SampleAppliClient.java deleted file mode 100644 index bb05f221c7244cbe0dac65fa5151858fd4fe8e45..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/sampleappli/SampleAppliClient.java +++ /dev/null @@ -1,309 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): ____________________________________. - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -// SampleAppliClient.java -// - -package sampleappli; - -import java.rmi.RemoteException; -import java.util.Enumeration; -import java.io.DataInputStream; -import java.io.BufferedInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.BufferedReader; -import java.io.InputStreamReader; -import javax.jms.*; -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; -import javax.rmi.PortableRemoteObject; - -/** - * - */ -public class SampleAppliClient { - - static Context initialContext = null; - - static EnvHome home = null; - - // Number of second to wait before the checking process - static int sleepSecond = 10; - - public static void main(String[] args) { - - // Initialize the number of second to wait before the checking process - if (args.length > 0) { - sleepSecond = (new Integer(args[0])).intValue(); - } - - // Get InitialContext - try { - initialContext = new InitialContext(); - } catch (NamingException e) { - e.printStackTrace(); - System.exit(2); - } - - // Lookup bean home - String beanName = "EnvHome"; - try { - home = (EnvHome) PortableRemoteObject.narrow(initialContext.lookup(beanName), EnvHome.class); - } catch (Exception e) { - e.printStackTrace(); - System.exit(2); - } - - // Init the environment for the application - Env env = null; - try { - env = home.create(); - env.init(); - } catch (Exception ex) { - System.err.println("Cannot init Environment: " + ex); - System.exit(2); - } - - TopicConnectionFactory tcf = null; - TopicPublisher tp = null; - Topic topic = null; - // JNDI name of the Topics - String topicName = "StockHandlerTopic"; - // JNDI name of the connection factory - String conFactName = "JTCF"; - - try { - // lookup the TopicConnectionFactory through its JNDI name - tcf = (TopicConnectionFactory) initialContext.lookup(conFactName); - // lookup the Topic through its JNDI name - topic = (Topic) initialContext.lookup(topicName); - } catch (NamingException e) { - e.printStackTrace(); - System.exit(2); - } - - TopicConnection tc = null; - TopicSession session = null; - try { - tc = tcf.createTopicConnection(); - session = tc.createTopicSession(false, Session.AUTO_ACKNOWLEDGE); - tp = session.createPublisher(topic); - } catch (Exception e) { - e.printStackTrace(); - System.exit(2); - } - - MapMessage mess = null; - int nbmess = 0; - // We send several messages that will update the database and the file - // order - try { - mess = session.createMapMessage(); - mess.setString("CustomerId", "customer10"); - mess.setString("ProductId", "00003"); - mess.setInt("Quantity", 3); - tp.publish(mess); - nbmess++; - - mess = session.createMapMessage(); - mess.setString("CustomerId", "customer1"); - mess.setString("ProductId", "00001"); - mess.setInt("Quantity", 5); - tp.publish(mess); - nbmess++; - - mess = session.createMapMessage(); - mess.setString("CustomerId", "customer3"); - mess.setString("ProductId", "00002"); - mess.setInt("Quantity", 2); - tp.publish(mess); - nbmess++; - - mess = session.createMapMessage(); - mess.setString("CustomerId", "customer2"); - mess.setString("ProductId", "00004"); - mess.setInt("Quantity", 6); - tp.publish(mess); - nbmess++; - - mess = session.createMapMessage(); - mess.setString("CustomerId", "customer2"); - mess.setString("ProductId", "00003"); - mess.setInt("Quantity", 10); - tp.publish(mess); - nbmess++; - - mess = session.createMapMessage(); - mess.setString("CustomerId", "customer3"); - mess.setString("ProductId", "00001"); - mess.setInt("Quantity", 10); - tp.publish(mess); - nbmess++; - - mess = session.createMapMessage(); - mess.setString("CustomerId", "customer1"); - mess.setString("ProductId", "00002"); - mess.setInt("Quantity", 5); - tp.publish(mess); - nbmess++; - - mess = session.createMapMessage(); - mess.setString("CustomerId", "customer10"); - mess.setString("ProductId", "00004"); - mess.setInt("Quantity", 3); - tp.publish(mess); - nbmess++; - - mess = session.createMapMessage(); - mess.setString("CustomerId", "customer122"); - mess.setString("ProductId", "00003"); - mess.setInt("Quantity", 6); - tp.publish(mess); - nbmess++; - - mess = session.createMapMessage(); - mess.setString("CustomerId", "customer45"); - mess.setString("ProductId", "00001"); - mess.setInt("Quantity", 4); - tp.publish(mess); - nbmess++; - - mess = session.createMapMessage(); - mess.setString("CustomerId", "customer7"); - mess.setString("ProductId", "00002"); - mess.setInt("Quantity", 2); - tp.publish(mess); - nbmess++; - - // Here we send a message that will force the rollback of the - // transaction - // in the onMessage of StockHandler MessageDrivenBean - mess = session.createMapMessage(); - mess.setString("CustomerId", "customer00"); - mess.setString("ProductId", "00000"); - mess.setInt("Quantity", 1000); - tp.publish(mess); - session.close(); - tc.close(); - - } catch (Exception ex) { - System.err.println("Exception caught when sending messages: " + ex); - System.exit(2); - } - - // Before the checking process we wait a little .... - try { - Thread.currentThread().sleep(1000 * sleepSecond); - } catch (InterruptedException e) { - System.err.println("InterruptedException"); - System.exit(2); - } - - // We have to check that nbmess have actually sent to the Message driven - // bean Order - // this is done by reading the order file (order.txt), it must have - // nbmess lines - BufferedReader inorderbr = null; - try { - File f = new File(System.getProperty("java.io.tmpdir") + File.separator + System.getProperty("user.name") - + "_order.txt"); - DataInputStream inorder = new DataInputStream(new BufferedInputStream(new FileInputStream(f))); - inorderbr = new BufferedReader(new InputStreamReader(inorder)); - } catch (Exception ex) { - System.err.println("Cannot open the order file: " + ex); - System.exit(2); - } - - String s = null; - int n = 0; - try { - while ((s = inorderbr.readLine()) != null) { - n++; - System.out.println(s); - } - inorderbr.close(); - } catch (java.io.IOException ex) { - System.err.println("cannot read the order file: " + ex); - } - if (n == nbmess) { - System.out.println("Nb messages sent and received OK"); - } else { - System.out.println("Problem: nb messages sent = " + nbmess + ", nb messages received = " + n); - System.out.println(" (re-run SampleAppliClent with an argument greater than " + sleepSecond + ")"); - } - - // Lookup bean home - String stockbeanName = "StockHome"; - StockHome shome = null; - Enumeration listOfStocks = null; - try { - shome = (StockHome) PortableRemoteObject.narrow(initialContext.lookup(stockbeanName), StockHome.class); - } catch (Exception e) { - e.printStackTrace(); - System.exit(2); - } - - try { - listOfStocks = shome.findAllStocks(); - } catch (Exception e) { - System.err.println("Cannot findAllStocks: " + e); - } - Stock stock = null; - try { - while (listOfStocks.hasMoreElements()) { - stock = (Stock) listOfStocks.nextElement(); - String id = stock.getId(); - int qty = stock.getQuantity(); - System.out.println("StockId = " + id + " Quantity = " + qty); - if (id.equals("00000")) { - if (qty != 10) { - System.err.println("Problem: Stock id 00000 must be set to 10"); - System.out.println(" (re-run SampleAppliClent with an argument greater than " - + sleepSecond + ")"); - System.exit(2); - } - } else { - // for the other id the stock quantity must be equals to 1 - if (qty != 1) { - System.err.println("Problem: Stock id " + id + " must be set to 1"); - System.out.println(" (re-run SampleAppliClent with an argument greater than " - + sleepSecond + ")"); - System.exit(2); - } - } - } - } catch (Exception ex) { - System.err.println("Exception caught while reading stocks: " + ex); - } - - System.out.println("SampleApplicationClient OK"); - - } -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/mdb/sampleappli/Stock.java b/jonas_tests/examples/base/examples/src/mdb/sampleappli/Stock.java deleted file mode 100644 index 27c55b6c4bbb58e3ce87cb91b03d78d84ff7ee3e..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/sampleappli/Stock.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): ____________________________________. - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -// Stock.java -package sampleappli; - -import java.rmi.RemoteException; -import javax.ejb.EJBObject; - -/** - * Stock remote interface - */ -public interface Stock extends EJBObject { - - public void increaseQuantity(int qty) throws RemoteException; - - public void decreaseQuantity(int qty) throws RemoteException; - - public int getQuantity() throws RemoteException; - - public void setQuantity(int qty) throws RemoteException; - - public String getId() throws RemoteException; -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/mdb/sampleappli/StockBean.java b/jonas_tests/examples/base/examples/src/mdb/sampleappli/StockBean.java deleted file mode 100644 index 1502f57c4f38e892d6f53f63c7292760a0813937..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/sampleappli/StockBean.java +++ /dev/null @@ -1,207 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): ____________________________________. - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -// StockBean.java -// Entity Bean -package sampleappli; - -import java.rmi.RemoteException; - -import javax.ejb.CreateException; -import javax.ejb.DuplicateKeyException; -import javax.ejb.EJBException; -import javax.ejb.EntityBean; -import javax.ejb.EntityContext; -import javax.ejb.FinderException; -import javax.ejb.ObjectNotFoundException; -import javax.ejb.RemoveException; -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; -import javax.sql.DataSource; -import javax.transaction.NotSupportedException; - -/** - * - */ -public class StockBean implements EntityBean { - - EntityContext ejbContext; - - // ------------------------------------------------------------------ - // State of the bean. - // They must be public for Container Managed Persistance. - // ------------------------------------------------------------------ - public String stockid; - - public int stockqty; - - // ------------------------------------------------------------------ - // EntityBean implementation - // ------------------------------------------------------------------ - - /** - * Set the associated entity context. The container invokes this method on - * an instance after the instance has been created. This method is called in - * an unspecified transaction context. - * @param ctx - An EntityContext interface for the instance. The instance - * should store the reference to the context in an instance variable. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - */ - public void setEntityContext(EntityContext ctx) { - ejbContext = ctx; - } - - /** - * Unset the associated entity context. The container calls this method - * before removing the instance. This is the last method that the container - * invokes on the instance. The Java garbage collector will eventually - * invoke the finalize() method on the instance. This method is called in an - * unspecified transaction context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - */ - public void unsetEntityContext() { - ejbContext = null; - } - - /** - * A container invokes this method before it removes the EJB object that is - * currently associated with the instance. This method is invoked when a - * client invokes a remove operation on the enterprise Bean's home interface - * or the EJB object's remote interface. This method transitions the - * instance from the ready state to the pool of available instances. This - * method is called in the transaction context of the remove operation. - * @throws RemoveException The enterprise Bean does not allow destruction of - * the object. - * @throws EJBException - Thrown by the method to indicate a failure caused - * by a system-level error. - */ - public void ejbRemove() throws RemoveException { - } - - /** - * A container invokes this method to instruct the instance to synchronize - * its state by loading it state from the underlying database. This method - * always executes in the proper transaction context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - */ - public void ejbLoad() { - } - - /** - * A container invokes this method to instruct the instance to synchronize - * its state by storing it to the underlying database. This method always - * executes in the proper transaction context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - */ - public void ejbStore() { - } - - /** - * There must be an ejbPostCreate par ejbCreate method - * @throws CreateException Failure to create an entity EJB object. - */ - public void ejbPostCreate(String id, int qty) throws CreateException { - } - - /** - * The Entity bean can define 0 or more ejbCreate methods. - * @throws CreateException Failure to create an entity EJB object. - * @throws DuplicateKeyException An object with the same key already exists. - */ - public java.lang.String ejbCreate(String id, int qty) throws CreateException, DuplicateKeyException { - - // Init here the bean fields - stockid = id; - stockqty = qty; - - // In CMP, should return null. - return null; - } - - /** - * A container invokes this method on an instance before the instance - * becomes disassociated with a specific EJB object. - */ - public void ejbPassivate() { - } - - /** - * A container invokes this method when the instance is taken out of the - * pool of available instances to become associated with a specific EJB - * object. - */ - public void ejbActivate() { - } - - // ------------------------------------------------------------------ - // Stock implementation - // ------------------------------------------------------------------ - - /** - * increaseQuantity - */ - public void increaseQuantity(int qty) { - stockqty += qty; - } - - /** - * decreaseStockQuantity - */ - public void decreaseQuantity(int qty) throws RemoteException { - stockqty = stockqty - qty; - if (stockqty < 0) { - throw new RemoteException("Negative stock"); - } - } - - /** - * getStockQuantity - */ - public int getQuantity() throws RemoteException { - return stockqty; - } - - /** - * setStockQuantity - */ - public void setQuantity(int qty) throws RemoteException { - stockqty = qty; - } - - /** - * getStockQuantity - */ - public String getId() throws RemoteException { - return stockid; - } -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/mdb/sampleappli/StockHandlerBean.java b/jonas_tests/examples/base/examples/src/mdb/sampleappli/StockHandlerBean.java deleted file mode 100644 index 90b5146e29b76c9463c53d7ec0686a4fda4e7570..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/sampleappli/StockHandlerBean.java +++ /dev/null @@ -1,180 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): ____________________________________. - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -// StockHandlerBean.java -// Message Driven bean - -package sampleappli; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.ejb.MessageDrivenBean; -import javax.ejb.MessageDrivenContext; -import javax.ejb.EJBException; -import javax.jms.*; -import javax.rmi.PortableRemoteObject; - -/** - * StockHandlerBean is a Message driven bean which is listening to a topic It - * receives MapMessages that contains a customer identification, a product - * identification and a quantity for the product When the StockHandlerBean - * receives a message it builds a message corresponding to an Order and sends it - * to a Queue destination then it updates the Stock database. - */ -public class StockHandlerBean implements MessageDrivenBean, MessageListener { - - private transient MessageDrivenContext mdbContext; - - StockHome sh = null; - - QueueConnectionFactory queueConnectionFactory = null; - - QueueConnection queueConnection = null; - - Queue queue = null; - - Context initialContext = null; - - // ------------------------------------------------------------------ - // MessageDrivenBean implementation - // ------------------------------------------------------------------ - - /** - * Default constructor - */ - public StockHandlerBean() { - } - - /** - * Set the associated context. The container call this method after the - * instance creation. The enterprise Bean instance should store the - * reference to the context object in an instance variable. This method is - * called with no transaction context. - * @param MessageDrivenContext A MessageDrivenContext interface for the - * instance. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - */ - - public void setMessageDrivenContext(MessageDrivenContext ctx) { - mdbContext = ctx; - } - - /** - * A container invokes this method before it ends the life of the - * message-driven object. This happens when a container decides to terminate - * the message-driven object. This method is called with no transaction - * context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - */ - public void ejbRemove() { - } - - /** - * The Message driven bean must define an ejbCreate methods with no args. - */ - public void ejbCreate() { - try { - initialContext = new InitialContext(); - sh = (StockHome) PortableRemoteObject.narrow(initialContext.lookup("java:comp/env/ejb/Stock"), - StockHome.class); - queue = (Queue) initialContext.lookup("java:comp/env/jms/Orders"); - queueConnectionFactory = (QueueConnectionFactory) initialContext - .lookup("java:comp/env/jms/QueueConnectionFactory"); - queueConnection = queueConnectionFactory.createQueueConnection(); - } catch (Exception e) { - System.err.println("StockHandlerBean ejbCreate : " + e); - } - } - - /** - * onMessage method Map Messages are receive with the following format: - * "CustomerId" String "ProductId" String "Quantity" int the Message driven - * bean will construct a string for an Order that will be sent to the Queue - * Orders and decrease the stock quantity for the product identified by - * ProductId this method run in the scope of a transaction that the - * container started immediately before dispatching the onMessage method the - * sending message to the Order queue and the updating of the Stock table is - * made in the same global transaction this transaction may be rolled back - * if the stock quantity became negative - */ - - public void onMessage(Message message) { - QueueSession session = null; - QueueSender qs = null; - int code; - String pid = null; - ; - int qty = 0; - String cid = null; - ; - MapMessage msg = (MapMessage) message; - Stock stock = null; - try { - if (message.getJMSRedelivered()) { - System.out.println("Ok, that's it!"); - return; - } - } catch (Exception ex) { - System.err.println(ex.toString()); - } - try { - pid = msg.getString("ProductId"); - qty = msg.getInt("Quantity"); - cid = msg.getString("CustomerId"); - session = queueConnection.createQueueSession(true, Session.AUTO_ACKNOWLEDGE); - qs = session.createSender(queue); - stock = sh.findByPrimaryKey(pid); - System.out.println("StockHandlerBean findByPrimaryKey(" + pid + ")"); - } catch (Exception ex) { - System.err.println(ex.toString()); - } - try { - TextMessage tm = session.createTextMessage(); - String m = "For CustomerId = " + cid + " ProductId= " + pid + " Quantity= " + qty; - tm.setText(m); - qs.send(tm); - System.out.println("StockHandlerBean message sent: " + m); - stock.decreaseQuantity(qty); - } catch (Exception ex) { - // on negative Stock -> rollback the transaction - mdbContext.setRollbackOnly(); - } finally { - if (session != null) { - try { - session.close(); - System.out.println("StockHandlerBean session closed"); - } catch (Exception e) { - e.printStackTrace(); - } - } - } - } - -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/mdb/sampleappli/StockHome.java b/jonas_tests/examples/base/examples/src/mdb/sampleappli/StockHome.java deleted file mode 100644 index 0de16e31db5d12638b37290f37188e758c356aa4..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/sampleappli/StockHome.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): ____________________________________. - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -// StockHome.java -package sampleappli; - -import java.rmi.RemoteException; -import java.util.Enumeration; -import javax.ejb.CreateException; -import javax.ejb.EJBHome; -import javax.ejb.FinderException; - -/** - * Home interface for the bean Stock - */ -public interface StockHome extends EJBHome { - - Stock create(String id, int qty) throws CreateException, RemoteException; - - Stock findByPrimaryKey(java.lang.String pk) throws FinderException, RemoteException; - - public Enumeration findAllStocks() throws RemoteException, FinderException; - -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/mdb/sampleappli/application-client.xml b/jonas_tests/examples/base/examples/src/mdb/sampleappli/application-client.xml deleted file mode 100644 index 13436c357a7d391a38bfe7ac340abd00749605df..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/sampleappli/application-client.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Client of the sb sample - - diff --git a/jonas_tests/examples/base/examples/src/mdb/sampleappli/build.xml b/jonas_tests/examples/base/examples/src/mdb/sampleappli/build.xml deleted file mode 100644 index a5102a1a10c7d62e57d8c8636e45a121429de322..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/sampleappli/build.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/src/mdb/sampleappli/db1.prp b/jonas_tests/examples/base/examples/src/mdb/sampleappli/db1.prp deleted file mode 100644 index 9d87d68d0e919828f6375a515f40b54d58268544..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/sampleappli/db1.prp +++ /dev/null @@ -1,325 +0,0 @@ -!--------------------------------------------------------------------- -! -! PROPERTIES for the InstantDB database used in the JOnAS eb example -! (builded from InstantDB/3.25/Examples/sample.prp) -! -!--------------------------------------------------------------------- - -!--------------------------------------------------------------------- -! -! BASIC PROPERTIES -! -!--------------------------------------------------------------------- - -! -! Path where index tables are held. Can be absolute or relative -! to the properties file. Defaults to tablePath. -! -indexPath=./tmp/indexes -! -! Path where system tables are held. Can be absolute or relative to -! the properties file. Defaults to tablePath. -! -systemPath=./tmp/system -! -! Path where database tables are held. Can be absolute or relative -! to the properties file. Defaults to "current" directory. -! -tablePath=./tmp/tables -! -! Path where results set tables are held. Can be absolute or relative -! to the properties file. Defaults to tablePath. -! -tmpPath=./tmp/tmp -! -! Non-zero means paths are relative to the properties file. -! Default is absolute paths for files. -! -relativeToProperties=1 -! -! Alternative partitions can be defined so that tables can be placed -! in multiple locations. Each partition is numbered: 1, 2, 3,... Tables -! can be created on partitions using the syntax -! -! CREATE TABLE ON PARTITION ... -! -! The partition count has to be supplied. -! -!partitionCount=2 -! -! The locations of each partition must be supplied. These are always -! absolute path names. -! -!partition1=d:/petes -!partition2=c:/temp - - -!--------------------------------------------------------------------- -! -! TUNING PROPERTIES -! -!--------------------------------------------------------------------- - -! -! The amount of each column to cache, expressed either as an absolute -! number of rows or as a percentage figure. Defaults to 256 or 10 respectively. -! -! This value applies only when tables are first created. It has no effect -! when a table is being re-opened. -! -cacheAmount=512 -! -! CACHE_ROWS Must be one of CACHE_ROWS or CACHE_PERCENT. Determines whether -! to cache columns in tables based on an absolute number of rows, or the -! percentage number of rows in the table. -! -! This value applies only when tables are first created. It has no effect -! when a table is being re-opened. -! -cacheCondition=CACHE_ROWS -! -! The amount of the system tables to be cached. Defaults to 100. -! -! This value applies only when tables are first created. It has no effect -! when a table is being re-opened. -! -!systemCacheSize=10 -! -! Similar to cacheCondition, but applies only to the system tables. -! -! This value applies only when tables are first created. It has no effect -! when a table is being re-opened. -! -!systemCacheCondition=CACHE_ROWS -! -! The percentage cache hit improvement required in order to move the -! cache to a new location in a column. -! -! (Currently not implemented). -! -cacheResetPercent=10 -! -! Non-zero means that database changes do not get written to the -! database immediately. See tuning.html. -! -fastUpdate=0 -! -! Percentage of free space in an index that must be present before -! the index reorganises itself. High values means frequent index -! reorganisation. Low values means slow index inserts. -! -indexLoad=5 -! -! The number of cache misses to include in calculations of the next -! base for the cache. -! -! (Currently not implemented). -! -missesInCacheStats=100 -! -! Non-zero means that results sets get instantiated on disk. By default -! InstantDB holds results sets emtirely in memory (apart from Binary -! columns). For large results sets this can be a problem. This property -! forces all results sets to be held on disk. -! -resultsOnDisk=0 -! -! Similar to cacheCondition but applies only to disk based -! results sets. Default is CACHE_ROWS. -! -resultsSetCache=CACHE_ROWS -! -! Similar to cacheAmount but applies only to disk based -! results sets. Default is 100. -! -resultsSetCacheAmount=100 -! -! Number of rows to read into the disk read ahead buffer. -! Recommended to be set somewhere around 128 to 256. -! Default is 20. -! -rowCacheSize=128 -! -! The read ahead buffer is effective at speeding up full -! table scans. However for indexed lookups or multiple -! simultaneous scans it is better to read a single row at -! a time. Each table holds a small number of single row -! buffers to improve such operations. Default is 8. -! -!singleRowCount=4 -! -! Sometimes the look ahead buffer can be held by a single -! thread even though it is not retrieveing many values from it. -! If too many lookups retrieve data from the single row -! buffers then it is better to flush the look ahead buffer and -! make it available for re-use. Default is 128. -! -!flushAfterCacheMisses=64 -! -! Number of rows to read ahead for system tables. By default -! system tables cache everything, so it is wasteful to have large -! read ahead buffers since they will very rarely be used. This -! allows the size of the system read ahead buffers to be reduced -! if necessary. Defaults to rowCacheSize. -! -!systemRows=20 -! -! The control column in all tables normally has a large cache -! since this speeds up all operation on that table. This can be -! varied to either improve performance or to reduce space. -! default is 8192. -! -! This value applies only when tables are first created. It has no effect -! when a table is being re-opened. -! -!controlColCacheSize=512 -! -! By default, InstantDB only does a cursory search for deleted rows during -! UPDATE statements. Setting searchDeletes=1 causes more detailed searches -! for deleted rows. This slows down UPDATE executions, but reults in more -! compact tables. Default is 0. -! -searchDeletes=0 -! -! The interval, in milliseconds, between checks for statement execution -! timeouts. Default is 5000. -! -!timerCheck=5000 - -!--------------------------------------------------------------------- -! -! LOGGING AND DEBUGGING PROPERTIES -! -!--------------------------------------------------------------------- - -! -! Non-zero means include SQL statements in the export file. -! -exportSQL=0 -! -! Non-zero means trace output also directed to console. -! Defaults to 0. -! -!traceConsole=1 -traceConsole=0 -! -! Relative or absolute path where exporting and tracing goes. -! -traceFile=./tmp/trace.log -! -! Bitmap of various items that can be traced. See debug.html. -! Defaults to 0. -! -traceLevel=2 - - -!--------------------------------------------------------------------- -! -! TRANSACTION AND RECOVERY PROPERTIES -! -!--------------------------------------------------------------------- - -! -! 0 means do not perform recovery on startup. -! 1 means perform automatic recovery -! 2 (default) means prompt the user using standard in -! -recoveryPolicy=2 -! -! Sets the level of transaction journalling. See trans.html. -! Defaults to 1. -! -! 0 - No journalling takes place. -! 1 - Normal journalling (default). -! 2 - Full journalling. -! -transLevel=1 -! -! When doing an import, defines the number of rows imported -! before the transaction is committed. Recommended value 8192. -! defaults to 100. -! -transImports=100 - -!--------------------------------------------------------------------- -! -! DATE, TIME AND CURRENCY PROPERTIES -! -!--------------------------------------------------------------------- - -! -! Number of digits after decimal point in currency outputs. Defaults to 2. -! -currencyDecimal=2 -! -! Currency symbol used in currency outputs. Defaults to $. -! -currencySymbol=$ -! -! Default format for date columns. Defaults to "yyyy-mm-dd". -! -dateFormat=yyyy-mm-dd -! -! Default format for timestamp columns. Defaults to "yyyy-mm-dd hh:mm:ss.lll". -! -dateTimeFormat=yyyy-mm-dd hh:mm:ss.lll -! -! If set, then all two digit dates less than its value are interpreted -! as 21st century dates. -! -!milleniumBoundary=50 -! -! Set to 1 causes the date string "now" to store a full timestamp. -! Default is to store only the date for fields with now hour in the -! format string. -! -nowMeansTime=0 - -!--------------------------------------------------------------------- -! -! STRING HANDLING PROPERTIES -! -!--------------------------------------------------------------------- - -! -! If set to 1 then String hashes use the JDK Object.hashCode() function. -! By default, uses InstantDB's String hashing. -! -altStringHashing=0 -! -! Set to 1 to cause LIKE clauses to always perform case insensitive -! comparisons. -! -likeIgnoreCase=0 -! -! Same as SET LITERAL STRICT_ON. Prevents string literals being interpreted -! as column names or numbers. Default is 0. -! -strictLiterals=0 -! -! Set this value to 1 (one) if you would like PreparedStatement.setString() -! to ignore "\" (backslash) characters when proceesing string constants. -! When set, InstantDB will not attempt to interpret \ as the start of an -! escape sequence. Default is 0. -! -!prepareIgnoresEscapes=1 - -!--------------------------------------------------------------------- -! -! MISCELLANEOUS PROPERTIES -! -!--------------------------------------------------------------------- - -! -! Allows selected InstantDB keywords to be un-reserved. -! e.g. ignoreKeywords=url,quote would allow the keywords -! url and quote to be used as table or column names. -! -! This faciliy is provided for compatatbility reasons only. -! It's use is not recommended AND IS NOT SUPPORTED. -! -!ignoreKeywords -! -! Non-zero means database is opened in read only mode. -! -readOnly=0 diff --git a/jonas_tests/examples/base/examples/src/mdb/sampleappli/jonas-sampleappli.xml b/jonas_tests/examples/base/examples/src/mdb/sampleappli/jonas-sampleappli.xml deleted file mode 100644 index 052aec3f73823c7e76509a747529bd416c52c9c5..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/sampleappli/jonas-sampleappli.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - Env - EnvHome - - jdbc/myDS - jdbc_1 - - - - - Stock - StockHome - - jdbc_1 - sampleappliStockTable - - stockid - ID - - - stockqty - QUANTITY - - - - findAllStocks - - - - - - - - StockHandler - - StockHandlerTopic - - - ejb/Stock - StockHome - - - jms/QueueConnectionFactory - QCF - - - jms/Orders - OrderQueue - - - - - - Order - - OrderQueue - - - - diff --git a/jonas_tests/examples/base/examples/src/mdb/sampleappli/sampleappli.xml b/jonas_tests/examples/base/examples/src/mdb/sampleappli/sampleappli.xml deleted file mode 100644 index 22940e08fce93576ebe01a2a3d061a1d5dfe4e47..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/sampleappli/sampleappli.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - Deployment descriptor for the mdb sampleappli JOnAS example - sampleappli example - - - - Describe here the session bean Env - Env - Env - sampleappli.EnvHome - sampleappli.Env - sampleappli.EnvBean - Stateless - Container - - stocktablename - java.lang.String - sampleappliStockTable - - - orderfilename - java.lang.String - order.txt - - - jdbc/myDS - javax.sql.DataSource - Application - - - - - Describe here the entity bean Stock - Stock - Stock - sampleappli.StockHome - sampleappli.Stock - sampleappli.StockBean - Container - java.lang.String - false - 1.x - - stockid - - - stockqty - - stockid - - - - Describe here the message driven bean StockHandler - Message Driven Bean StockHandler - StockHandler - sampleappli.StockHandlerBean - Container - - - - destinationType - javax.jms.Topic - - - acknowledgeMode - Auto-acknowledge - - - - subscriptionDurability - NonDurable - - - - ejb/Stock - Entity - sampleappli.StockHome - sampleappli.Stock - - - jms/QueueConnectionFactory - javax.jms.QueueConnectionFactory - Container - - - jms/Orders - javax.jms.Queue - - - - - Describe here the message driven bean Order - Message Driven Bean Order - Order - sampleappli.OrderBean - Container - - - destinationType - javax.jms.Queue - - - acknowledgeMode - Auto-acknowledge - - - - orderfilename - java.lang.String - order.txt - - - - - - - - - Stock - * - - Required - - - - - Env - * - - NotSupported - - - - - StockHandler - * - - Required - - - - - Order - * - - NotSupported - - - - - diff --git a/jonas_tests/examples/base/examples/src/mdb/samplemdb/MdbBean.java b/jonas_tests/examples/base/examples/src/mdb/samplemdb/MdbBean.java deleted file mode 100644 index 2f653e2905e14610068e70cf227e4bb8083feb30..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/samplemdb/MdbBean.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): ____________________________________. - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -// MdbBean.java -// Message Driven bean -package samplemdb; - -import javax.ejb.MessageDrivenBean; -import javax.ejb.MessageDrivenContext; -import javax.jms.Message; -import javax.jms.MessageListener; -import javax.jms.TextMessage; -import javax.jms.JMSException; - -/** - * Example of MessageDrivenBean on a Topic. The transactions are container - * managed (Required) - */ -public class MdbBean implements MessageDrivenBean, MessageListener { - - private transient MessageDrivenContext mdbContext; - - // ------------------------------------------------------------------ - // MessageDrivenBean implementation - // ------------------------------------------------------------------ - - /** - * Default constructor - */ - public MdbBean() { - } - - /** - * Set the associated context. The container call this method after the - * instance creation. The enterprise Bean instance should store the - * reference to the context object in an instance variable. This method is - * called with no transaction context. - * @param MessageDrivenContext A MessageDrivenContext interface for the - * instance. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - */ - - public void setMessageDrivenContext(MessageDrivenContext ctx) { - System.out.println("MdbBean setMessageDrivenContext"); - mdbContext = ctx; - } - - /** - * A container invokes this method before it ends the life of the - * message-driven object. This happens when a container decides to terminate - * the message-driven object. This method is called with no transaction - * context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - */ - public void ejbRemove() { - System.out.println("MdbBean ejbRemove"); - } - - /** - * The Message driven bean must define an ejbCreate methods with no args. - */ - public void ejbCreate() { - System.out.println("MdbBean ejbCreate"); - } - - /** - * onMessage method - */ - public void onMessage(Message message) { - System.out.println("MdbBean onMessage"); - try { - TextMessage mess = (TextMessage) message; - System.out.println("Message received: " + mess.getText()); - } catch (JMSException ex) { - System.err.println("Exception caught: " + ex); - } - } -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/mdb/samplemdb/MdbClient.java b/jonas_tests/examples/base/examples/src/mdb/samplemdb/MdbClient.java deleted file mode 100644 index 1a859a48dced838250e107b3254c435b672d8f20..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/samplemdb/MdbClient.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): ____________________________________. - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -// MdbClient.java -// mini Client for accessing bean Mdb -package samplemdb; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.*; -import javax.jms.*; - -/** - * - */ -public class MdbClient { - - static Context ictx = null; - - static TopicConnectionFactory tcf = null; - - static TopicPublisher tp = null; - - static Topic topic = null; - - // JNDI name of the Topic - static String topicName = "mdbTopic"; - - // JNDI name of the default connection factory - static String conFactName = "JTCF"; - - public static void main(String[] arg) { - // Get InitialContext - try { - ictx = new InitialContext(); - // lookup the TopicConnectionFactory through its JNDI name - tcf = (TopicConnectionFactory) ictx.lookup(conFactName); - System.out.println("JMS client: tcf = " + tcf.toString()); - // lookup the Topic through its JNDI name - topic = (Topic) ictx.lookup(topicName); - } catch (NamingException e) { - e.printStackTrace(); - System.exit(2); - } - - TopicConnection tc = null; - TopicSession session = null; - try { - tc = tcf.createTopicConnection(); - System.out.println("JMS client: tc = " + tc.toString()); - session = tc.createTopicSession(false, Session.AUTO_ACKNOWLEDGE); - tp = session.createPublisher(topic); - } catch (Exception e) { - e.printStackTrace(); - System.exit(2); - } - - // publish 10 messages to the topic - int nbmess = 10; - try { - TextMessage message; - for (int i = 0; i < nbmess; i++) { - message = session.createTextMessage(); - message.setText("Message" + i); - tp.publish(message); - - } - session.close(); - tc.close(); - } catch (Exception e) { - e.printStackTrace(); - System.exit(2); - } - System.out.println("MDBsample is Ok"); - } -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/mdb/samplemdb/README b/jonas_tests/examples/base/examples/src/mdb/samplemdb/README deleted file mode 100644 index 563c3806bd303285283126baf7c132225e70b25d..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/samplemdb/README +++ /dev/null @@ -1,43 +0,0 @@ -Copyright (C) Bull, 2001-2002 - - -Example description -------------------- -This unrealistic example is very sample for illustrating the use of -Message Driven Beans in JOnAS. - -The EJBClient (MdbClient) is a pure JMS Client that sends 10 messages -on a Topic named "mdbTopic". -In the JOnAS Server is deployed a Message Driven Bean Mdb that asynchrounsly -receives and prints the messages. - - -Compiling this example: ----------------------- -ant -find build.xml install - -Running this example: ---------------------- - -Toy can use the provided scripts (run.sh on Unix or run.bat on Windows) to execute the -whole example. - -or, steb by step: - jonas start - ant runclient - jonas stop - -You may want to execute this example with the MOM JMS that is running in a -separate JVM. For this, you must first : --> in case of the jms service - - a] Set the property jonas.service.jms.collocated to false - in jonas.properties then run the JmsServer first. - b] Run the standalone Jms Server : JmsServer & - --> in case of the rar joram - - set the config-property 'CollocatedServer' to false - in ra.xml of the joram's rar - - diff --git a/jonas_tests/examples/base/examples/src/mdb/samplemdb/application-client.xml b/jonas_tests/examples/base/examples/src/mdb/samplemdb/application-client.xml deleted file mode 100644 index 13436c357a7d391a38bfe7ac340abd00749605df..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/samplemdb/application-client.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Client of the sb sample - - diff --git a/jonas_tests/examples/base/examples/src/mdb/samplemdb/build.xml b/jonas_tests/examples/base/examples/src/mdb/samplemdb/build.xml deleted file mode 100644 index 55b9e41cea647cbbda1ede6c8e6d7f794ed29aab..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/samplemdb/build.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/src/mdb/samplemdb/jonas-samplemdb.xml b/jonas_tests/examples/base/examples/src/mdb/samplemdb/jonas-samplemdb.xml deleted file mode 100644 index 160d775d8be4033f04e247d0546f8d4339d875b1..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/samplemdb/jonas-samplemdb.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - Mdb - - mdbTopic - - 20 - 10 - - - - diff --git a/jonas_tests/examples/base/examples/src/mdb/samplemdb/samplemdb.xml b/jonas_tests/examples/base/examples/src/mdb/samplemdb/samplemdb.xml deleted file mode 100644 index afed6233eb8a04d04a43771360eb08a5832a0dbf..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/mdb/samplemdb/samplemdb.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - Deployment descriptor for the samplemdb JOnAS example - samplemdb example - - - Describe here the message driven bean Mdb - Message Driven Bean Mdb - Mdb - samplemdb.MdbBean - javax.jms.MessageListener - Container - javax.jms.Topic - - - destinationType - javax.jms.Topic - - - acknowledgeMode - Auto-acknowledge - - - - subscriptionDurability - NonDurable - - - - - - - - - - Mdb - * - - Required - - - - diff --git a/jonas_tests/examples/base/examples/src/sb/ClientOp.java b/jonas_tests/examples/base/examples/src/sb/ClientOp.java deleted file mode 100644 index 2a0995b11a2c7a865a4a13f233254a91d38b8f2d..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/sb/ClientOp.java +++ /dev/null @@ -1,170 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): ____________________________________. - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package sb; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.rmi.PortableRemoteObject; -import javax.transaction.UserTransaction; - -/** - * Sample for Session Bean. Usage: java sb.ClientOp - * Heavy client doing some operations on a bean - * @author jonas team - */ -public class ClientOp { - /** - * First amount to buy - */ - private static final int FIRST_BUY_AMOUNT = 10; - - /** - * Second amount to buy - */ - private static final int SECOND_BUY_AMOUNT = 20; - - /** - * Third amount to buy (will be rollback) - */ - private static final int THIRD_BUY_AMOUNT = 50; - - /** - * Constructor. Hide constructor as it is an utility class - */ - private ClientOp() { - - } - - /** - * Main method - * @param args arguments of the client - */ - public static void main(String[] args) { - - Context initialContext = null; - try { - initialContext = new InitialContext(); - } catch (Exception e) { - System.err.println("Cannot get initial context for JNDI: " + e); - System.exit(2); - } - - // We want to start transactions from client: get UserTransaction - UserTransaction utx = null; - try { - - // Comment the following lines if you want to use a David Client: - utx = (UserTransaction) initialContext.lookup("javax.transaction.UserTransaction"); - - // Uncomment the following lines if you want to use a David Client: - /* - * Properties prop = new Properties(); - * prop.put("java.naming.factory.initial", - * "com.sun.jndi.rmi.registry.RegistryContextFactory"); - * prop.put("java.naming.provider.url", "rmi://localhost:1099"); // - * update the port if necessary InitialContext ictx = new - * InitialContext(prop); utx = (UserTransaction) - * ictx.lookup("javax.transaction.UserTransaction"); - */ - - } catch (Exception e) { - System.err.println("Cannot lookup UserTransaction: " + e); - System.exit(2); - } - - // Connecting to OpHome thru JNDI - OpHome home = null; - try { - home = (OpHome) PortableRemoteObject.narrow(initialContext.lookup("OpHome"), OpHome.class); - } catch (Exception e) { - System.err.println("Cannot lookup OpHome: " + e); - System.exit(2); - } - - // OpBean creation - Op t1 = null; - try { - System.out.println("Create a bean"); - t1 = home.create("User1"); - } catch (Exception e) { - System.err.println("Cannot create OpBean: " + e); - System.exit(2); - } - - // First transaction (committed) - try { - System.out.println("Start a first transaction"); - utx.begin(); - System.out.println("First request on the new bean"); - t1.buy(FIRST_BUY_AMOUNT); - System.out.println("Second request on the bean"); - t1.buy(SECOND_BUY_AMOUNT); - System.out.println("Commit the transaction"); - utx.commit(); - } catch (Exception e) { - System.err.println("exception during 1st Tx: " + e); - System.exit(2); - } - // Start another transaction (rolled back) - try { - System.out.println("Start a second transaction"); - utx.begin(); - t1.buy(THIRD_BUY_AMOUNT); - System.out.println("Rollback the transaction"); - utx.rollback(); - } catch (Exception e) { - System.err.println("exception during 2nd Tx: " + e); - System.exit(2); - } - - // Get the total bought, outside the transaction - int val = 0; - try { - System.out.println("Request outside any transaction"); - val = t1.read(); - } catch (Exception e) { - System.err.println("Cannot read value on t1 : " + e); - System.exit(2); - } - if (val != FIRST_BUY_AMOUNT + SECOND_BUY_AMOUNT) { - System.err.println("Bad value read: " + val); - System.exit(2); - } - - // Remove Session bean - try { - t1.remove(); - } catch (Exception e) { - System.out.println("Exception on buy: " + e); - System.exit(2); - } - System.out.println("ClientOp OK. Exiting."); - } -} - diff --git a/jonas_tests/examples/base/examples/src/sb/Op.java b/jonas_tests/examples/base/examples/src/sb/Op.java deleted file mode 100644 index a9068f61999bc25d47a1ce9a56b88632b867a1d9..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/sb/Op.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): ____________________________________. - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package sb; - -import java.rmi.RemoteException; - -import javax.ejb.EJBObject; - -/** - * Remote interface for the bean Op - * @author JOnAS team - */ -public interface Op extends EJBObject { - - /** - * Business method implementation. - * @param shares nb of shares to be bought - * @throws RemoteException if RMI failed. - */ - void buy (int shares) throws RemoteException; - - /** - * Business method implementation. - * @return the nb of shares bought - * @throws RemoteException if RMI failed. - */ - int read () throws RemoteException; - -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/sb/OpBean.java b/jonas_tests/examples/base/examples/src/sb/OpBean.java deleted file mode 100644 index c786974d6cc90f9ee68e9ed2f55f37c71f437cdf..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/sb/OpBean.java +++ /dev/null @@ -1,259 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): ____________________________________. - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package sb; - -import javax.ejb.EJBException; -import javax.ejb.SessionBean; -import javax.ejb.SessionContext; -import javax.ejb.SessionSynchronization; -import javax.naming.InitialContext; -import javax.naming.NamingException; - -/** - * This is an example of Session Bean, statefull, and synchronized. - * @author JOnAS team - */ -public class OpBean implements SessionBean, SessionSynchronization { - - /** - * Actual state of the bean - */ - private int total = 0; - - /** - * value inside Tx, not yet committed. - */ - private int newtotal = 0; - - /** - * User client - */ - private String clientUser = null; - - - /* ========================= ejbCreate methods ============================ */ - - /** - * There must be one ejbCreate() method per create() method on the Home - * interface, and with the same signature. - * @param user the user name - */ - public void ejbCreate(String user) { - - total = 0; - newtotal = total; // in case we are outside transactions - clientUser = user; - } - - /* - * ====================== javax.ejb.SessionBean implementation - * ================= - */ - - /** - * The activate method is called when the instance is activated from its - * "passive" state. The instance should acquire any resource that it has - * released earlier in the ejbPassivate() method. This method is called with - * no transaction context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException This exception is defined in the method - * signature to provide backward compatibility for enterprise beans - * written for the EJB 1.0 specification. Enterprise beans written - * for the EJB 1.1 specification should throw the - * javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB2.0 and higher specifications must throw - * the javax.ejb.EJBException instead of this exception. - */ - public void ejbActivate() throws EJBException, java.rmi.RemoteException { - // Nothing to do for this simple example - } - - /** - * The passivate method is called before the instance enters the "passive" - * state. The instance should release any resources that it can re-acquire - * later in the ejbActivate() method. After the passivate method completes, - * the instance must be in a state that allows the container to use the Java - * Serialization protocol to externalize and store away the instance's - * state. This method is called with no transaction context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException This exception is defined in the method - * signature to provide backward compatibility for enterprise beans - * written for the EJB 1.0 specification. Enterprise beans written - * for the EJB 1.1 specification should throw the - * javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB2.0 and higher specifications must throw - * the javax.ejb.EJBException instead of this exception. - */ - public void ejbPassivate() throws EJBException, java.rmi.RemoteException { - // Nothing to do for this simple example - } - - /** - * A container invokes this method before it ends the life of the session - * object. This happens as a result of a client's invoking a remove - * operation, or when a container decides to terminate the session object - * after a timeout. This method is called with no transaction context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException This exception is defined in the method - * signature to provide backward compatibility for enterprise beans - * written for the EJB 1.0 specification. Enterprise beans written - * for the EJB 1.1 specification should throw the - * javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB2.0 and higher specifications must throw - * the javax.ejb.EJBException instead of this exception. - */ - public void ejbRemove() throws EJBException, java.rmi.RemoteException { - // Nothing to do for this simple example - } - - /** - * Set the associated session context. The container calls this method after - * the instance creation. The enterprise Bean instance should store the - * reference to the context object in an instance variable. This method is - * called with no transaction context. - * @param sessionContext A SessionContext interface for the instance. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException This exception is defined in the method - * signature to provide backward compatibility for applications - * written for the EJB 1.0 specification. Enterprise beans written - * for the EJB 1.1 specification should throw the - * javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB2.0 and higher specifications must throw - * the javax.ejb.EJBException instead of this exception. - */ - public void setSessionContext(SessionContext sessionContext) throws EJBException, java.rmi.RemoteException { - - } - - /* - * ============== javax.ejb.SessionSynchronization implementation - * ============= - */ - - /** - * The afterBegin method notifies a session Bean instance that a new - * transaction has started, and that the subsequent business methods on the - * instance will be invoked in the context of the transaction. The instance - * can use this method, for example, to read data from a database and cache - * the data in the instance fields. This method executes in the proper - * transaction context. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException - This exception is defined in the - * method signature to provide backward compatibility for enterprise - * beans written for the EJB 1.0 specification. Enterprise beans - * written for the EJB 1.1 and higher specifications should throw - * the javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB 2.0 and higher specifications must not - * throw the java.rmi.RemoteException. - */ - public void afterBegin() throws EJBException, java.rmi.RemoteException { - newtotal = total; - } - - /** - * The beforeCompletion method notifies a session Bean instance that a - * transaction is about to be committed. The instance can use this method, - * for example, to write any cached data to a database. This method executes - * in the proper transaction context. Note: The instance may still - * cause the container to rollback the transaction by invoking the - * setRollbackOnly() method on the instance context, or by throwing an - * exception. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException - This exception is defined in the - * method signature to provide backward compatibility for enterprise - * beans written for the EJB 1.0 specification. Enterprise beans - * written for the EJB 1.1 and higher specifications should throw - * the javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB 2.0 and higher specifications must not - * throw the java.rmi.RemoteException. - */ - public void beforeCompletion() throws EJBException, java.rmi.RemoteException { - // Nothing to do for this simple example - - // We can access the bean environment everywhere in the bean, - // for example here! - try { - InitialContext ictx = new InitialContext(); - String value = (String) ictx.lookup("java:comp/env/prop1"); - // value should be the one defined in ejb-jar.xml - } catch (NamingException e) { - throw new EJBException(e); - } - } - - /** - * The afterCompletion method notifies a session Bean instance that a - * transaction commit protocol has completed, and tells the instance whether - * the transaction has been committed or rolled back. This method executes - * with no transaction context. - * @param committed - True if the transaction has been committed, false if - * is has been rolled back. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - * @throws java.rmi.RemoteException - This exception is defined in the - * method signature to provide backward compatibility for enterprise - * beans written for the EJB 1.0 specification. Enterprise beans - * written for the EJB 1.1 and higher specifications should throw - * the javax.ejb.EJBException instead of this exception. Enterprise - * beans written for the EJB 2.0 and higher specifications must not - * throw the java.rmi.RemoteException. - */ - public void afterCompletion(boolean committed) throws EJBException, java.rmi.RemoteException { - if (committed) { - total = newtotal; - } else { - newtotal = total; - } - } - - /* ========================= Op implementation ============================ */ - - /** - * Business method implementation. - * @param s nb of shares to be bought - */ - public void buy(int s) { - newtotal = newtotal + s; - return; - } - - /** - * Business method implementation. - * @return the nb of shares bought - */ - public int read() { - return newtotal; - } -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/sb/OpHome.java b/jonas_tests/examples/base/examples/src/sb/OpHome.java deleted file mode 100644 index b3cf09571c335035d74d8e34638b374350ad2160..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/sb/OpHome.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): ____________________________________. - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package sb; - -import java.rmi.RemoteException; - -import javax.ejb.CreateException; -import javax.ejb.EJBHome; - -/** - * Home interface for the bean Op - * @author JOnAS team - */ -public interface OpHome extends EJBHome { - - /** - * Create an instance of the Op bean. - * @param user the user name. - * @return the Remote interface of the bean Op. - * @throws CreateException if the creation failed. - * @throws RemoteException if the RMI call failed. - */ - Op create(String user) throws CreateException, RemoteException; -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/src/sb/README b/jonas_tests/examples/base/examples/src/sb/README deleted file mode 100644 index a02b46bfdad434eb55efbf1485cd8df416441e10..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/sb/README +++ /dev/null @@ -1,36 +0,0 @@ -Copyright (C) BULL S.A. 1998-2002. - - -Compiling this example: ------------------------ -This example is compiled with the others by "ant install" in $JONAS_ROOT/examples. - -Running this example: ---------------------- -1) Run the JOnAS EJB Server to make beans available to clients: - - jonas start - -2) Load the sb.jar if you have not added it in the ejb service descriptors list : - -on UNIX: - jonas admin -a $JONAS_BASE/ejbjars/sb.jar - -On Windows: - jonas admin -a $JONAS_BASE/ejbjars/sb.jar - -You should see something like this when the bean is loaded : - - Op available - -3) Run the client program: - -on UNIX: - jclient -cp $JONAS_BASE/ejbjars/sb.jar sb.ClientOp - -On Windows: - jclient -cp "%JONAS_BASE%\ejbjars\sb.jar sb.ClientOp - - -4) Stop the jonas server - jonas stop diff --git a/jonas_tests/examples/base/examples/src/sb/application-client.xml b/jonas_tests/examples/base/examples/src/sb/application-client.xml deleted file mode 100644 index 13436c357a7d391a38bfe7ac340abd00749605df..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/sb/application-client.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Client of the sb sample - - diff --git a/jonas_tests/examples/base/examples/src/sb/build.xml b/jonas_tests/examples/base/examples/src/sb/build.xml deleted file mode 100644 index d45e5981aea386c8e99e767b895be6609b57db0b..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/sb/build.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/src/sb/jonas-sb.xml b/jonas_tests/examples/base/examples/src/sb/jonas-sb.xml deleted file mode 100644 index 4fa36f99ab6394e9e1fd48d3f70c2450bc1c5784..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/sb/jonas-sb.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - Op - OpHome - - - diff --git a/jonas_tests/examples/base/examples/src/sb/sb.xml b/jonas_tests/examples/base/examples/src/sb/sb.xml deleted file mode 100644 index 968f28f488f8b91df96746b8a74ffcc9b3ca9d3c..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/sb/sb.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - Deployment descriptor for the sb JOnAS example - sb example - - - Op - sb.OpHome - sb.Op - sb.OpBean - Stateful - Container - - prop1 - java.lang.String - prop1 value - - - - - - - Op - * - - Required - - - diff --git a/jonas_tests/examples/base/examples/src/src_common.xml b/jonas_tests/examples/base/examples/src/src_common.xml deleted file mode 100644 index b753eb52696360366b592347dd5fdb91be83b874..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/src/src_common.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/statelessbean/build.xml b/jonas_tests/examples/base/examples/statelessbean/build.xml deleted file mode 100644 index 429177e4abc88520701d82640958def1c10d0cd5..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/statelessbean/build.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/statelessbean/etc/web.xml b/jonas_tests/examples/base/examples/statelessbean/etc/web.xml deleted file mode 100644 index ed9b4b352cb20a9696eed0e58e21e1a59c13bd51..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/statelessbean/etc/web.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - StatelessClient - - org.ow2.easybeans.examples.statelessbean.ClientServletStateless - - - - - StatelessClient - / - - - \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/statelessbean/src/java/org/ow2/easybeans/examples/statelessbean/ClientServletStateless.java b/jonas_tests/examples/base/examples/statelessbean/src/java/org/ow2/easybeans/examples/statelessbean/ClientServletStateless.java deleted file mode 100644 index 798d50a92194047ea0e5276adbac91d4edea1cfd..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/statelessbean/src/java/org/ow2/easybeans/examples/statelessbean/ClientServletStateless.java +++ /dev/null @@ -1,179 +0,0 @@ -/** - * EasyBeans - * Copyright (C) 2006 Bull S.A.S. - * Contact: easybeans@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.easybeans.examples.statelessbean; - -import java.io.IOException; -import java.io.PrintWriter; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * Servlet's client for the stateless session bean. - * @author Florent Benoit - */ -public class ClientServletStateless extends HttpServlet { - - /** - * Serializable class uid. - */ - private static final long serialVersionUID = 6893863749912962928L; - - /** - * Called by the server (via the service method) to allow a servlet to - * handle a GET request. - * @param request an HttpServletRequest object that contains the request the - * client has made of the servlet - * @param response an HttpServletResponse object that contains the response - * the servlet sends to the client - * @throws IOException if an input or output error is detected when the - * servlet handles the GET request - * @throws ServletException if the request for the GET could not be handled - */ - @Override - public void doGet(final HttpServletRequest request, final HttpServletResponse response) throws IOException, ServletException { - - response.setContentType("text/html"); - PrintWriter out = response.getWriter(); - out.println(""); - out.println(""); - out.println(""); - out.println("Client of stateless session bean"); - out.println(""); - out.println(""); - - // no operation ? displays button for hello world and calculator - String operation = request.getParameter("operation"); - if (operation != null) { - if (operation.equals("helloWorld")) { - displayHelloWorld(out); - } else if (operation.equals("add")) { - // get two parameters - String param1 = request.getParameter("p1"); - String param2 = request.getParameter("p2"); - if (param1 != null && param2 != null) { - int v1 = Integer.parseInt(param1); - int v2 = Integer.parseInt(param2); - displayResult(out, v1, v2); - } else { - out.println("Missing values for operation add"); - } - } - } - out.println("
    "); - displayDefault(out); - - - out.println(""); - out.println(""); - out.close(); - } - - /** - * Call HelloWorld method. - * @param out the given writer - */ - private void displayHelloWorld(final PrintWriter out) { - out.println("Calling helloWorld() method"); - out.println("
    "); - try { - getBean().helloWorld(); - out.println("helloWorld() method called OK."); - } catch (Exception e) { - displayException(out, "Cannot call helloworld on the bean", e); - } - } - - /** - * By default, call helloWorld method. - * @param out the given writer - */ - private void displayDefault(final PrintWriter out) { - out.println("
    "); - out.println("sum of a + b :"); - out.println("

    "); - out.println("

    "); - out.println("

    "); - out.println("

    "); - out.println("
    "); - out.println("
    "); - out.println("

    "); - out.println("

    "); - out.println("
    "); - } - - /** - * Prints he result of the sum of val1 and val2. - * @param out the given writer - * @param val1 first arg for add method - * @param val2 second arg for add method - */ - private void displayResult(final PrintWriter out, final int val1, final int val2) { - out.println("
    Sum of '" + val1 + "' and '" + val2 + "' = "); - try { - int sum = getBean().add(val1, val2); - out.println(sum); - } catch (Exception e) { - displayException(out, "
    Cannot call add() method on the bean", e); - } - } - - /** - * If there is an exception, print the exception. - * @param out the given writer - * @param errMsg the error message - * @param e the content of the exception - */ - private void displayException(final PrintWriter out, final String errMsg, final Exception e) { - out.println("

    Exception : " + errMsg); - out.println("

    ");
    -        e.printStackTrace(out);
    -        out.println("

    "); - } - - /** - * Lookup the stateless bean and gets a reference on it. - * @return the stateless bean business interface. - * @throws Exception if the bean cannot be retrieved. - */ - private StatelessRemote getBean() throws Exception { - Context initialContext = new InitialContext(); - Object o = initialContext.lookup("org.ow2.easybeans.examples.statelessbean.StatelessBean" + "_" - + StatelessRemote.class.getName() + "@Remote"); - - if (o instanceof StatelessRemote) { - StatelessRemote statelessBean = (StatelessRemote) o; - return statelessBean; - } - throw new Exception("Cannot cast object into StatelessRemote"); - - } - -} diff --git a/jonas_tests/examples/base/examples/statelessbean/src/java/org/ow2/easybeans/examples/statelessbean/ClientStateless.java b/jonas_tests/examples/base/examples/statelessbean/src/java/org/ow2/easybeans/examples/statelessbean/ClientStateless.java deleted file mode 100644 index 63ebf198b5c868a8464cb42e2bd9bbbb4daf8352..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/statelessbean/src/java/org/ow2/easybeans/examples/statelessbean/ClientStateless.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * EasyBeans - * Copyright (C) 2006 Bull S.A.S. - * Contact: easybeans@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.easybeans.examples.statelessbean; - -import java.util.Hashtable; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; - -/** - * Simple client of the stateless. - * @author Florent Benoit - */ -public final class ClientStateless { - - /** - * Default InitialContextFactory to use. - */ - private static final String DEFAULT_INITIAL_CONTEXT_FACTORY = "org.ow2.carol.jndi.spi.MultiOrbInitialContextFactory"; - - /** - * Utility class. - */ - private ClientStateless() { - - } - - /** - * Main method. - * @param args the arguments (not required) - * @throws Exception if exception is found. - */ - public static void main(final String[] args) throws Exception { - - Context initialContext = getInitialContext(); - - // Thread.currentThread().sleep(5000); - - StatelessRemote statelessBean = (StatelessRemote) initialContext - .lookup("org.ow2.easybeans.examples.statelessbean.StatelessBean" - + "_" + StatelessRemote.class.getName() + "@Remote"); - - System.out.println("Calling the first method..."); - System.out.println("Calling helloWorld method..."); - statelessBean.helloWorld(); - - System.out.println("-----------------------------"); - System.out.println("-----------------------------"); - System.out.println("Calling the secode method..."); - System.out.println("Add 1 + 2..."); - int resultAdd = statelessBean.add(1, 2); - System.out.println("Sum = '" + resultAdd + "'."); - - System.out.println("-----------------------------"); - System.out.println("-----------------------------"); - System.out.println("Calling the third method..."); - System.out.println("Div 6 / 3 (expect exception)..."); - int resultDiv = statelessBean.div(6, 3); - System.out.println("Div = '" + resultDiv + "'."); - } - - /** - * @return Returns the InitialContext. - * @throws NamingException If the Context cannot be created. - */ - private static Context getInitialContext() throws NamingException { - - // if user don't use jclient/client container - // we can specify the InitialContextFactory to use - // But this is *not recommended*. - Hashtable env = new Hashtable(); - env.put(Context.INITIAL_CONTEXT_FACTORY, getInitialContextFactory()); - - // Usually a simple new InitialContext() without any parameters is sufficent. - // return new InitialContext(); - - return new InitialContext(env); - } - - /** - * Returns a configurable InitialContextFactory classname.
    - * Can be configured with the easybeans.client.initial-context-factory System property. - * @return Returns a configurable InitialContextFactory classname. - */ - private static String getInitialContextFactory() { - String prop = System.getProperty("easybeans.client.initial-context-factory"); - // If not found, use the default - if (prop == null) { - prop = DEFAULT_INITIAL_CONTEXT_FACTORY; - } - return prop; - } - - -} diff --git a/jonas_tests/examples/base/examples/statelessbean/src/java/org/ow2/easybeans/examples/statelessbean/StatelessBean.java b/jonas_tests/examples/base/examples/statelessbean/src/java/org/ow2/easybeans/examples/statelessbean/StatelessBean.java deleted file mode 100644 index 7103a4deba73f59e9ee3e9065fdb964ec849a278..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/statelessbean/src/java/org/ow2/easybeans/examples/statelessbean/StatelessBean.java +++ /dev/null @@ -1,111 +0,0 @@ -/** - * EasyBeans - * Copyright (C) 2006 Bull S.A.S. - * Contact: easybeans@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.easybeans.examples.statelessbean; - -import javax.ejb.Local; -import javax.ejb.Remote; -import javax.ejb.Stateless; -import javax.interceptor.AroundInvoke; -import javax.interceptor.ExcludeClassInterceptors; -import javax.interceptor.Interceptors; -import javax.interceptor.InvocationContext; - - -import org.ow2.cmi.annotation.Cluster; -import org.ow2.cmi.annotation.Policy; -import org.ow2.cmi.lb.policy.RoundRobin; - -/** - * Simple stateless bean. - * @author Florent Benoit - */ -@Stateless -@Local(StatelessLocal.class) -@Remote(StatelessRemote.class) -@Interceptors({StatelessInterceptor.class}) -@Cluster(name="test_cluster") -@Policy(RoundRobin.class) -public class StatelessBean implements StatelessRemote { - - /** - * Hello world. - */ - public void helloWorld() { - System.out.println("Hello world !"); - } - - /** - * Compute a + b. - * @param a first int - * @param b second int - * @return a + b - */ - @Interceptors({StatelessOnlyAddMethodInterceptor.class}) - public int add(final int a, final int b) { - return a + b; - } - - /** - * Divide a by b. - * @param a first int - * @param b second int - * @return a / b - */ - public int div(final int a, final int b) { - if (b == 0) { - throw new IllegalArgumentException("cannot divide by 0"); - } - return a / b; - } - - /** - * Methods without interceptors. - */ - @ExcludeClassInterceptors - public void notInterceptedMethod() { - - } - - - /** - * Trace method's time. - * @param invocationContext contains attributes of invocation - * @return method's invocation result - * @throws Exception if invocation fails - */ - @AroundInvoke - public Object trace(final InvocationContext invocationContext) throws Exception { - System.out.println("TraceInterceptor : method '" + invocationContext.getMethod().getName() - + "'."); - long startPeriod = System.nanoTime(); - try { - return invocationContext.proceed(); - } finally { - long elapsed = System.nanoTime() - startPeriod; - System.out.println("TraceInterceptor : Elapsed time = " + elapsed + " ns"); - } - } -} diff --git a/jonas_tests/examples/base/examples/statelessbean/src/java/org/ow2/easybeans/examples/statelessbean/StatelessInterceptor.java b/jonas_tests/examples/base/examples/statelessbean/src/java/org/ow2/easybeans/examples/statelessbean/StatelessInterceptor.java deleted file mode 100644 index 72e55cc7f5bfff71ac40d6bd818ef33be0ef7b08..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/statelessbean/src/java/org/ow2/easybeans/examples/statelessbean/StatelessInterceptor.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * EasyBeans - * Copyright (C) 2006 Bull S.A.S. - * Contact: easybeans@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.easybeans.examples.statelessbean; - -import java.lang.reflect.Method; - -import javax.annotation.PostConstruct; -import javax.interceptor.AroundInvoke; -import javax.interceptor.InvocationContext; - -/** - * Simple interceptor class. Mix of business interceptors and lifecycle interceptors. - * @author Florent Benoit - */ -public class StatelessInterceptor { - - /** - * Another class interceptor. - * @param invocationContext contains attributes of invocation - * @return method's invocation result - * @throws Exception if invocation fails - */ - @SuppressWarnings("finally") - @AroundInvoke - public Object toto(final InvocationContext invocationContext) throws Exception { - System.out.println("Another class interceptor"); - Method m = invocationContext.getMethod(); - // Change the returned value for add method - Object returnedValue = null; - try { - returnedValue = invocationContext.proceed(); - } finally { - if (m.getName().equals("add")) { - // Uncomment the following line to change the returned value - //return Integer.valueOf(-1); - return returnedValue; - } - return returnedValue; - } - } - - /** - * Callback in an external class. - * @param invocationContext the invocationcontext. - */ - @PostConstruct - public void myPostConst(final InvocationContext invocationContext) { - System.out.println("postConstruct in class Statelesslistener of bean " + invocationContext.getTarget()); - try { - invocationContext.proceed(); - } catch (Exception e) { - throw new RuntimeException("Cannot proceed invocationContext", e); - } - } - -} diff --git a/jonas_tests/examples/base/examples/statelessbean/src/java/org/ow2/easybeans/examples/statelessbean/StatelessLocal.java b/jonas_tests/examples/base/examples/statelessbean/src/java/org/ow2/easybeans/examples/statelessbean/StatelessLocal.java deleted file mode 100644 index 542b89a1fe1fefae7f8284318c9ed5681647bfb8..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/statelessbean/src/java/org/ow2/easybeans/examples/statelessbean/StatelessLocal.java +++ /dev/null @@ -1,61 +0,0 @@ -/** - * EasyBeans - * Copyright (C) 2006 Bull S.A.S. - * Contact: easybeans@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.easybeans.examples.statelessbean; - -/** - * Simple interface for a stateless bean. - * It acts as a local interface. - * @author Florent Benoit - */ -public interface StatelessLocal { - - /** - * Hello world. - */ - void helloWorld(); - - /** - * Compute a + b. - * @param a first int - * @param b second int - * @return a + b - */ - int add(final int a, final int b); - - /** - * Divide a by b. - * @param a first int - * @param b second int - * @return a / b - */ - int div(final int a, final int b); - - - /** - * Methods without interceptors. - */ - void notInterceptedMethod(); -} diff --git a/jonas_tests/examples/base/examples/statelessbean/src/java/org/ow2/easybeans/examples/statelessbean/StatelessOnlyAddMethodInterceptor.java b/jonas_tests/examples/base/examples/statelessbean/src/java/org/ow2/easybeans/examples/statelessbean/StatelessOnlyAddMethodInterceptor.java deleted file mode 100644 index c6948710cfebd06cd80d80add839ab02fdd67d1e..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/statelessbean/src/java/org/ow2/easybeans/examples/statelessbean/StatelessOnlyAddMethodInterceptor.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * EasyBeans - * Copyright (C) 2006 Bull S.A.S. - * Contact: easybeans@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.easybeans.examples.statelessbean; - -import java.lang.reflect.Method; - -import javax.interceptor.AroundInvoke; -import javax.interceptor.InvocationContext; - - -/** - * Simple interceptor class which should be launched only on add method. - * @author Florent Benoit - */ -public class StatelessOnlyAddMethodInterceptor { - - /** - * Another class interceptor. - * @param invocationContext contains attributes of invocation - * @return method's invocation result - * @throws Exception if invocation fails - */ - @AroundInvoke - public Object onlyAdd(final InvocationContext invocationContext) throws Exception { - System.out.println("Add interceptor"); - Method m = invocationContext.getMethod(); - // Checks the method name - if (m.getName().equals("add")) { - System.out.println("Applied on the correct method"); - } else { - throw new Exception("Error, should be only on add method while it is applied on '" + m.getName() + "' method."); - } - return invocationContext.proceed(); - } - -} diff --git a/jonas_tests/examples/base/examples/statelessbean/src/java/org/ow2/easybeans/examples/statelessbean/StatelessRemote.java b/jonas_tests/examples/base/examples/statelessbean/src/java/org/ow2/easybeans/examples/statelessbean/StatelessRemote.java deleted file mode 100644 index 34be426ffb76668fda6b2d7596c124e4346db8dc..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/statelessbean/src/java/org/ow2/easybeans/examples/statelessbean/StatelessRemote.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * EasyBeans - * Copyright (C) 2006 Bull S.A.S. - * Contact: easybeans@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.easybeans.examples.statelessbean; - - -/** - * Simple interface for a stateless bean. - * It acts as a remote interface. - * @author Florent Benoit - */ -public interface StatelessRemote extends StatelessLocal { - -} diff --git a/jonas_tests/examples/base/examples/statelessbean/src/java/org/ow2/easybeans/examples/statelessbean/package.html b/jonas_tests/examples/base/examples/statelessbean/src/java/org/ow2/easybeans/examples/statelessbean/package.html deleted file mode 100644 index 42fce5fae51659c3a24cb91e131836bf88484595..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/statelessbean/src/java/org/ow2/easybeans/examples/statelessbean/package.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - EJB 3.0 - - -

    Example of EJB 3.0 container

    - - diff --git a/jonas_tests/examples/base/examples/webservices/README b/jonas_tests/examples/base/examples/webservices/README deleted file mode 100644 index 5233e72593a625d934100572d1a2d88b6775aa13..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/README +++ /dev/null @@ -1,64 +0,0 @@ - -JOnAS WebServices Sample -------------------------- - -This example is composed of 4 sub examples : - - a Standalone Web Application exposing a JaxRpc Endpoint as WebService and a simple client (wswarsample.war) - - a Standalone WebApplication which is client of a WebServices (Google) (wsaccess.war) - - an Application with 1 EJB : a Stateless Session bean exposed as web service (ws.ear). This example also shows - how to add security to a Stateless Session bean using WsGen. The security parameters are specified in jonas-webservices.xml - and the username and password required is jonas:jonas - - an Application composed by a Session Bean acting as web service client accessed through a JSP (wsclient.ear). - -What it show ? ---------------- - -In this sample, we will show the usage of a new tag in Web and Ejb Deployment Desc. - - service-ref tag is used to declare a dependancy of the component on a WebServices. - In other word, the component is client of an external WebService. - This tag can be used in the web.xml Deployment desc and in ejb-jar deployment desc. - -> This tag MAY be used jointly with jonas-service-ref tag in JOnAS specific Deployment Descriptor (jonas-web.xml and - jonas-ejb-jar.xml) : It's optionnal. - -For declaring a WebService endpoint, a new Deployment Descriptor has been introduced : webservices.xml. It can be used in an ejbjar or webapp file. - -You can notice that the beans/wsclient/build.xml do not use anymore the genic and wsgen tasks. They are automatically -applied on the server side. -Just make sure that the property jonas.service.ws.auto-wsgen.engaged (in jonas.properties) is set to 'true' (or commented). -Otherwise, needed ws artifacts will not be generated. - -Report to the documentation for more information. - -How to : ---------- - -1. Install the example - ant install - -2. start JOnAS - jonas start - -3. install the archives in JOnAS - jonas admin -a wsaccess.war - jonas admin -a wswarsample.war - jonas admin -a ws.ear - jonas admin -a wsclient.ear - -4. View the results in your browser - http://:/wsaccess/ - http://:/wswarsample/ - http://:/axis-ws/ssbEndpoint/WSBeanEndpointLocal?JWSDL (username:jonas password: jonas) - http://:/wsclient/ - - -Notes : --------- -If you have a proxy to access the internet, you have to add some properties in your JAVA_OPTS environment variable before you launch JOnAS. -export JAVA_OPTS=$JAVA_OPTS"-Dhttp.proxyHost= \ - -Dhttp.proxyPort= \ - -Dhttp.proxyUser= \ - -Dhttp.proxyPassword= \ - -Dhttp.nonProxyHosts= \ - -Dhttp.proxySet=true" - -You should see some Exceptions when using WsGen (Class not found with digester), don't be afraid, this is normal. \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/webservices/beans/ws/build.xml b/jonas_tests/examples/base/examples/webservices/beans/ws/build.xml deleted file mode 100644 index 047962b7c69c5605487488038346ff8b3151f12c..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/beans/ws/build.xml +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/webservices/beans/ws/etc/xml/jonas-webservices.xml b/jonas_tests/examples/base/examples/webservices/beans/ws/etc/xml/jonas-webservices.xml deleted file mode 100644 index a5d1d4dbc21e1bafebd6e922300348b033838f31..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/beans/ws/etc/xml/jonas-webservices.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - gen-axis-webapp.war - axis-ws - - - - My Web Services - - - ssbEndpoint - - /services1/webservice - - - - - - - - Stateless Session Bean Endpoint - - /services1/webservice - - - jonas-admin - - - - - - BASIC - - WS Example Authentication Area - - - - - - jonas-admin - - - - memrlm_1 - - - - WS Example Authentication Area - - - diff --git a/jonas_tests/examples/base/examples/webservices/beans/ws/etc/xml/ssbEndpointMapping.xml b/jonas_tests/examples/base/examples/webservices/beans/ws/etc/xml/ssbEndpointMapping.xml deleted file mode 100644 index 9414385f85be92749c4e820674de6f8e1b589fab..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/beans/ws/etc/xml/ssbEndpointMapping.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - org.objectweb.wssample.beans.ws - http://ws.beans.wssample.objectweb.org - - - org.objectweb.wssample.beans.ws.WSBeanEndpoint - ns:WSBeanEndpointLocal - ns:WSBeanEndpointLocalSoapBinding - - getCotes - getCotes - - int - ns:getCotesResponse - getCotesReturn - - - - sayHello - sayHello - - 0 - java.lang.String - - ns:sayHelloRequest - in0 - IN - - - - java.lang.String - ns:sayHelloResponse - sayHelloReturn - - - - diff --git a/jonas_tests/examples/base/examples/webservices/beans/ws/etc/xml/webservices.xml b/jonas_tests/examples/base/examples/webservices/beans/ws/etc/xml/webservices.xml deleted file mode 100644 index d7a709de7cb083845415598b0c0884543b0e6e37..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/beans/ws/etc/xml/webservices.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - My Web Services - - My Web Services - META-INF/wsdl/ssbEndpoint.wsdl - META-INF/ssbEndpointMapping.xml - - ssbEndpoint - beanswssample:WSBeanEndpointLocal - org.objectweb.wssample.beans.ws.WSBeanEndpoint - - WSBeanEndpointSLL - - - - diff --git a/jonas_tests/examples/base/examples/webservices/beans/ws/etc/xml/wsdl/ssbEndpoint.wsdl b/jonas_tests/examples/base/examples/webservices/beans/ws/etc/xml/wsdl/ssbEndpoint.wsdl deleted file mode 100644 index 6e9f48e67c8bd5382e90b390165122f3f20f7b78..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/beans/ws/etc/xml/wsdl/ssbEndpoint.wsdl +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/webservices/beans/ws/src/org/objectweb/wssample/beans/ws/WSBeanEndpoint.java b/jonas_tests/examples/base/examples/webservices/beans/ws/src/org/objectweb/wssample/beans/ws/WSBeanEndpoint.java deleted file mode 100644 index 5de3cd68ea88106bad24ef36cb79f957ae39eb95..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/beans/ws/src/org/objectweb/wssample/beans/ws/WSBeanEndpoint.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.objectweb.wssample.beans.ws; - -import java.rmi.Remote; -import java.rmi.RemoteException; - - -/** - * ServiceEndpoint interface - * - * @author Guillaume Sauthier - */ -public interface WSBeanEndpoint extends Remote { - - /** - * @param name name - * @return Returns "Hello " + name - * @throws RemoteException RemoteException - */ - String sayHello(String name) throws RemoteException; - - /** - * @return Returns integer - * @throws RemoteException RemoteException - */ - int getCotes() throws RemoteException; -} diff --git a/jonas_tests/examples/base/examples/webservices/beans/ws/src/org/objectweb/wssample/beans/ws/WSBeanEndpointSLL.java b/jonas_tests/examples/base/examples/webservices/beans/ws/src/org/objectweb/wssample/beans/ws/WSBeanEndpointSLL.java deleted file mode 100644 index e8f525f78b8660129c4aef0e1ca990e307e672f9..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/beans/ws/src/org/objectweb/wssample/beans/ws/WSBeanEndpointSLL.java +++ /dev/null @@ -1,116 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.objectweb.wssample.beans.ws; - -import javax.ejb.CreateException; -import javax.ejb.SessionBean; -import javax.ejb.SessionContext; - -import org.ow2.jonas.lib.util.Log; -import org.objectweb.util.monolog.api.Logger; -import org.objectweb.util.monolog.api.BasicLevel; - -/** - * - */ -public class WSBeanEndpointSLL implements SessionBean { - - /** - * logger - */ - private static Logger logger = null; - - /** - * EJB SessionContext - */ - private SessionContext ejbContext; - - // ------------------------------------------------------------------ - // SessionBean implementation - // ------------------------------------------------------------------ - - /** - * Set the SessionContext - * @param ctx SessionContext - */ - public void setSessionContext(SessionContext ctx) { - if (logger == null) { - logger = Log.getLogger("org.objectweb.jonas_tests"); - } - logger.log(BasicLevel.DEBUG, ""); - ejbContext = ctx; - } - - /** - * ejbRemove - */ - public void ejbRemove() { - logger.log(BasicLevel.DEBUG, ""); - } - - /** - * ejbRemove - * @throws CreateException CreateException - */ - public void ejbCreate() throws CreateException { - logger.log(BasicLevel.DEBUG, ""); - } - - /** - * ejbPassivate - */ - public void ejbPassivate() { - logger.log(BasicLevel.DEBUG, ""); - } - - /** - * ejbActivate - */ - public void ejbActivate() { - logger.log(BasicLevel.DEBUG, ""); - } - - // ------------------------------------------------------------------ - // WSBeanEndpoint implementation - // ------------------------------------------------------------------ - - /** - * @param name name - * @return Returns "Hello " + name - */ - public String sayHello(String name) { - logger.log(BasicLevel.INFO, "sayHello(" + name + ") invokation."); - return "Hello " + name; - } - - /** - * @return Returns integer - */ - public int getCotes() { - logger.log(BasicLevel.INFO, "getCotes invokation"); - return 12; - } -} - diff --git a/jonas_tests/examples/base/examples/webservices/beans/ws/src/org/objectweb/wssample/beans/ws/jonas-wsearsample.xml b/jonas_tests/examples/base/examples/webservices/beans/ws/src/org/objectweb/wssample/beans/ws/jonas-wsearsample.xml deleted file mode 100644 index d2cd8045ea33c798a8cd489eb141ab15d72b66c7..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/beans/ws/src/org/objectweb/wssample/beans/ws/jonas-wsearsample.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - WSBeanEndpointSLL - ejbs/WSBeanEndpointHome - - - diff --git a/jonas_tests/examples/base/examples/webservices/beans/ws/src/org/objectweb/wssample/beans/ws/wsearsample.xml b/jonas_tests/examples/base/examples/webservices/beans/ws/src/org/objectweb/wssample/beans/ws/wsearsample.xml deleted file mode 100644 index 2da15f2e97666f33fd56968558058733516c449b..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/beans/ws/src/org/objectweb/wssample/beans/ws/wsearsample.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - Describe here the content of this file - wsearsample - - - - Describe here the session bean WSBeanEndpoint - wsearsample/WSBeanEndpointSLL - WSBeanEndpointSLL - - org.objectweb.wssample.beans.ws.WSBeanEndpoint - org.objectweb.wssample.beans.ws.WSBeanEndpointSLL - Stateless - Container - - - - - - - jonas-admin - - - jonas-admin - - WSBeanEndpointSLL - * - - - - - WSBeanEndpointSLL - * - - Supports - - - diff --git a/jonas_tests/examples/base/examples/webservices/beans/wsclient/build.xml b/jonas_tests/examples/base/examples/webservices/beans/wsclient/build.xml deleted file mode 100644 index 44b974a028fa145602e1e845b8fe0d95b6371ce2..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/beans/wsclient/build.xml +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/web/images/jetty.gif b/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/web/images/jetty.gif deleted file mode 100644 index 01f44a87f6801b200f142513d0d02b12cea0fb46..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/web/images/jetty.gif and /dev/null differ diff --git a/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/web/images/jonas.ico b/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/web/images/jonas.ico deleted file mode 100644 index 108c5c21ede334f3b80d9a373f618c52efee7877..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/web/images/jonas.ico and /dev/null differ diff --git a/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/web/images/ow_jonas_logo.gif b/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/web/images/ow_jonas_logo.gif deleted file mode 100644 index 1b56943a721f82a8cb81776030567772265433f2..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/web/images/ow_jonas_logo.gif and /dev/null differ diff --git a/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/web/images/ow_logo.png b/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/web/images/ow_logo.png deleted file mode 100644 index 60617270bf0c0d21c9f40e4f7c85ef5bfdbda548..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/web/images/ow_logo.png and /dev/null differ diff --git a/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/web/images/tomcat.gif b/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/web/images/tomcat.gif deleted file mode 100644 index 61756736b82350f64b5ea1b2bfc31ac57e30a3d3..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/web/images/tomcat.gif and /dev/null differ diff --git a/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/web/index.html b/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/web/index.html deleted file mode 100644 index 70df9fb7e8d545cff26c8de80a0b69f1e6867a45..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/web/index.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - EJB accessing Google WS API - - - - - - -
    - Jakarta Tomcat - Mortbay Jetty - JOnAS WebSite -
    - -
    - EJB accessing Google WebService API -
    - -
    -
    - - - diff --git a/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/web/search-google.jsp b/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/web/search-google.jsp deleted file mode 100644 index 430c6ed9df4003016f83d95db997e9ffd412f0e4..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/web/search-google.jsp +++ /dev/null @@ -1,84 +0,0 @@ -<%@page contentType="text/html"%> - -<%@page import="org.objectweb.wssample.beans.wsclient.*"%> -<%@page import="org.objectweb.wssample.genbean.google.*"%> - -<%@page import="javax.naming.*"%> - - - Using Google WebServices - - - - - -
    - Jakarta Tomcat - Mortbay Jetty - JOnAS WebSite -
    -<% - if (request.getParameter("search") == null) { -%> -
    - Google Search -
    - - -<% - } else { -%> -
    - Results -
    - -<% - } -%> - - diff --git a/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/web/style/ow_jonas.css b/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/web/style/ow_jonas.css deleted file mode 100644 index c3f068d9a5aa850d59a4f126168fab80b34a023b..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/web/style/ow_jonas.css +++ /dev/null @@ -1,119 +0,0 @@ -/* - Context Root css. based on css from http://jonas.objectweb.org - XHTML by Florent BENOIT -*/ - -.bodywelcome -{ - background-color: #FFFFFF; - color: #000000; - background-image: url(../images/ow_logo.png); - background-repeat: no-repeat; - margin: 0; -} - - -img { - margin: 5px; - border:0; -} - -body -{ - background-color: #FFFFFF; - margin: 10px; - color: black; - font-family: Arial,Helvetica, sans-serif; - font-size: 12px; - line-height: 16px; - font-weight: normal; - -} - -div.logos { - top: 5px; - width: 99%; - text-align: right; -} - - -div.links { - margin-top : 40px; - margin-left : 200px; -} - - -div.titlepage { - margin-left: 200px; - color: #E06611; - font-family: Arial, Helvetica, sans-serif; - font-size: 22px; - line-height: 27px; - font-weight: bold; - border-color: #99C; - border-width: 0 0 4px 0; - border-style: none none solid none; -} - - -div.footer { - margin-top : 50px; - color: #FFFFFF; - font-size: 8pt; - text-align: center; -} - - -/*HTML elements */ - - - -ul, ol, dl -{ - color: black; - font-family: Arial,Helvetica, sans-serif; - font-size: 12px; - line-height: 16px; - font-weight: normal; -} - -li -{ - color: black; - font-family: Arial, Helvetica, sans-serif; - font-size: 14px; - font-weight: normal; - margin: 10px 0px 5px 0px; - -} -a -{ - color: #3F3975; - background-color: transparent; - text-decoration: underline; -} - -a:visited -{ - color: #9898CB; - background-color: transparent; - text-decoration: underline; -} - -a:hover -{ - color: #E06611; - background-color: transparent; - text-decoration: underline; -} - - -a:active -{ - color: #FFFFFF; - background-color: #E06611; - text-decoration: underline; -} - - - diff --git a/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/xml/application-wsclient.xml b/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/xml/application-wsclient.xml deleted file mode 100644 index 90057b129e249e08513b6d2299a99062b57176b8..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/xml/application-wsclient.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - ear example secusb/servlet - earsample secusb/servlet - - - wsclient.jar - - - - - wsclient-front.war - wsclient - - - - diff --git a/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/xml/ejb-jar.xml b/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/xml/ejb-jar.xml deleted file mode 100644 index f5f7045b38621bf8d3f11624d6a433def88927a0..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/xml/ejb-jar.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - Describe here the content of this file - wsearsample - - - Describe here the session bean GoogleClientBean - googleClient/GoogleClientBeanSLL - GoogleClientBeanSLR - org.objectweb.wssample.beans.wsclient.GoogleClientBeanHome - org.objectweb.wssample.beans.wsclient.GoogleClientBean - - org.objectweb.wssample.beans.wsclient.GoogleClientBeanSLR - Stateless - Container - - googleKey - java.lang.String - j1LnsP9QFHLsT76x8dXU5HYjG1wxlgU3 - - - service/google - - org.objectweb.wssample.genbean.google.GoogleSearchService - META-INF/wsdl/GoogleSearch.wsdl - META-INF/googleMapping.xml - - google:GoogleSearchService - - - - - - - - GoogleClientBeanSLR - * - - Supports - - - diff --git a/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/xml/googleMapping.xml b/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/xml/googleMapping.xml deleted file mode 100644 index 8d075e6d81b3c8b9c93898eeffa489df37e7269d..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/xml/googleMapping.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - org.objectweb.wssample.genbean.google - urn:GoogleSearch - - - org.objectweb.wssample.genbean.google.GoogleSearchResult - ns:GoogleSearchResult - complexType - - - org.objectweb.wssample.genbean.google.ResultElement - ns:ResultElement - complexType - - - org.objectweb.wssample.genbean.google.ResultElement[] - ns:ResultElementArray - complexType - - - org.objectweb.wssample.genbean.google.DirectoryCategory[] - ns:DirectoryCategoryArray - complexType - - - org.objectweb.wssample.genbean.google.DirectoryCategory - ns:DirectoryCategory - complexType - - - diff --git a/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/xml/jonas-ejb-jar.xml b/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/xml/jonas-ejb-jar.xml deleted file mode 100644 index bdc3f59bb8f30ee8caace739ddcaebd481b47875..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/xml/jonas-ejb-jar.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - GoogleClientBeanSLR - ejbs/GoogleClientBeanHome - - diff --git a/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/xml/web-wsclient-front.xml b/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/xml/web-wsclient-front.xml deleted file mode 100644 index 91226811bbc7ed9b1e38d1cf298955626680669b..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/xml/web-wsclient-front.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - ejb/GoogleClient - Session - org.objectweb.wssample.beans.wsclient.GoogleClientBeanHome - org.objectweb.wssample.beans.wsclient.GoogleClientBean - wsclient.jar#GoogleClientBeanSLR - - - diff --git a/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/xml/wsdl/GoogleSearch.wsdl b/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/xml/wsdl/GoogleSearch.wsdl deleted file mode 100644 index 746ad2298cb28e33f2b59b3aa564a70c042617b7..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/beans/wsclient/etc/xml/wsdl/GoogleSearch.wsdl +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/webservices/beans/wsclient/src/org/objectweb/wssample/beans/wsclient/GoogleClientBean.java b/jonas_tests/examples/base/examples/webservices/beans/wsclient/src/org/objectweb/wssample/beans/wsclient/GoogleClientBean.java deleted file mode 100644 index 69147d766ff3d305d9d3472d80b9826ce26e8a54..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/beans/wsclient/src/org/objectweb/wssample/beans/wsclient/GoogleClientBean.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Guillaume Sauthier______________. - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.objectweb.wssample.beans.wsclient; - -import java.rmi.RemoteException; - -import javax.ejb.EJBObject; - -import org.objectweb.wssample.genbean.google.GoogleSearchResult; - -/** - * GoogleClientBean local interface - */ -public interface GoogleClientBean extends EJBObject { - /** - * Execute a Query via Google WS api. - * - * @param query Query String - * @return Result of the Search - * - * @throws RemoteException When query went wrong - */ - GoogleSearchResult executeQuery(java.lang.String query) throws RemoteException; -} diff --git a/jonas_tests/examples/base/examples/webservices/beans/wsclient/src/org/objectweb/wssample/beans/wsclient/GoogleClientBeanHome.java b/jonas_tests/examples/base/examples/webservices/beans/wsclient/src/org/objectweb/wssample/beans/wsclient/GoogleClientBeanHome.java deleted file mode 100644 index beb77bc543d5d81d782967dd9bfb761c58100e21..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/beans/wsclient/src/org/objectweb/wssample/beans/wsclient/GoogleClientBeanHome.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Guillaume Sauthier______________. - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.objectweb.wssample.beans.wsclient; - -import java.rmi.RemoteException; - -import javax.ejb.CreateException; -import javax.ejb.EJBHome; - -/** - * Local Home interface for the bean GoogleClientBean - */ -public interface GoogleClientBeanHome extends EJBHome { - - /** - * Create a new GoogleCLientBean local instance. - * - * @return a new GoogleCLientBean local instance. - * @throws CreateException When server cannot create the instance. - * @throws RemoteException When creation went wrong - */ - GoogleClientBean create() throws CreateException, RemoteException; -} diff --git a/jonas_tests/examples/base/examples/webservices/beans/wsclient/src/org/objectweb/wssample/beans/wsclient/GoogleClientBeanSLR.java b/jonas_tests/examples/base/examples/webservices/beans/wsclient/src/org/objectweb/wssample/beans/wsclient/GoogleClientBeanSLR.java deleted file mode 100644 index af36799001fc5b8ef803cfdd3f8c69f7ff4ffb6e..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/beans/wsclient/src/org/objectweb/wssample/beans/wsclient/GoogleClientBeanSLR.java +++ /dev/null @@ -1,162 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer(s): Guillaume Sauthier______________. - * Contributor(s): ______________________________________. - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.objectweb.wssample.beans.wsclient; - -import java.rmi.RemoteException; - -import javax.ejb.CreateException; -import javax.ejb.SessionBean; -import javax.ejb.SessionContext; -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; - -import org.ow2.jonas.lib.util.Log; -import org.objectweb.util.monolog.api.Logger; -import org.objectweb.util.monolog.api.BasicLevel; - -import org.objectweb.wssample.genbean.google.GoogleSearchResult; -import org.objectweb.wssample.genbean.google.GoogleSearchService; -import org.objectweb.wssample.genbean.google.GoogleSearchPort; - -import javax.xml.rpc.ServiceException; - -/** - * GoogleClientBean implementation. This bean use Google WebServices API - * to execute a given Query. - * - * @author Guillaume Sauthier - */ -public class GoogleClientBeanSLR implements SessionBean { - - /** - * logger - */ - private static Logger logger = null; - - /** - * Session Context - */ - private SessionContext ejbContext; - - // ------------------------------------------------------------------ - // SessionBean implementation - // ------------------------------------------------------------------ - - /** - * Set the SessionContext - * @param ctx the SessionContext - */ - public void setSessionContext(SessionContext ctx) { - if (logger == null) { - logger = Log.getLogger("org.objectweb.jonas_tests"); - } - logger.log(BasicLevel.DEBUG, ""); - ejbContext = ctx; - } - - /** - * ejbRemove - */ - public void ejbRemove() { - logger.log(BasicLevel.DEBUG, ""); - } - - /** - * ejbCreate - * @throws CreateException CreateException - */ - public void ejbCreate() throws CreateException { - logger.log(BasicLevel.DEBUG, ""); - } - - /** - * ejbPassivate - */ - public void ejbPassivate() { - logger.log(BasicLevel.DEBUG, ""); - } - - /** - * ejbActivate - */ - public void ejbActivate() { - logger.log(BasicLevel.DEBUG, ""); - } - - // ------------------------------------------------------------------ - // GoogleClientBean implementation - // ------------------------------------------------------------------ - - /** - * Execute a Query via Google WS api. - * - * @param query Query String - * @return query results - */ - public GoogleSearchResult executeQuery(java.lang.String query) { - - logger.log(BasicLevel.INFO, "Executing Google Query '" + query + "'"); - - try { - - // Get the InitialContext where retrieve Service - Context ctx = new InitialContext(); - - // Lookup the service - GoogleSearchService google = - (GoogleSearchService) ctx.lookup("java:comp/env/service/google"); - - // get Google Port - GoogleSearchPort search = google.getGoogleSearchPort(); - - // get Google Key - String key = (String) ctx.lookup("java:comp/env/googleKey"); - - // Execute the query - return search.doGoogleSearch(key, - query, - 0, // first index - 10, // maxresult - false, //filter - null, //restrict - false, // safesearch - null, //lr - null, //ie - null //oe - ); - } catch (NamingException ne) { - return null; - } catch (RemoteException re) { - return null; - } catch (ServiceException se) { - return null; - } - } -} - diff --git a/jonas_tests/examples/base/examples/webservices/beans/wsclient/src/org/objectweb/wssample/genbean/google/DirectoryCategory.java b/jonas_tests/examples/base/examples/webservices/beans/wsclient/src/org/objectweb/wssample/genbean/google/DirectoryCategory.java deleted file mode 100644 index 4509e3edfb84cd820b1db3feeb2c270363097a10..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/beans/wsclient/src/org/objectweb/wssample/genbean/google/DirectoryCategory.java +++ /dev/null @@ -1,152 +0,0 @@ -/** - * DirectoryCategory.java - * - * This file was auto-generated from WSDL - * by the Apache Axis 1.2RC1 Sep 29, 2004 (08:29:40 EDT) WSDL2Java emitter. - */ - -package org.objectweb.wssample.genbean.google; - -public class DirectoryCategory implements java.io.Serializable { - private java.lang.String fullViewableName; - private java.lang.String specialEncoding; - - public DirectoryCategory() { - } - - public DirectoryCategory( - java.lang.String fullViewableName, - java.lang.String specialEncoding) { - this.fullViewableName = fullViewableName; - this.specialEncoding = specialEncoding; - } - - - /** - * Gets the fullViewableName value for this DirectoryCategory. - * - * @return fullViewableName - */ - public java.lang.String getFullViewableName() { - return fullViewableName; - } - - - /** - * Sets the fullViewableName value for this DirectoryCategory. - * - * @param fullViewableName - */ - public void setFullViewableName(java.lang.String fullViewableName) { - this.fullViewableName = fullViewableName; - } - - - /** - * Gets the specialEncoding value for this DirectoryCategory. - * - * @return specialEncoding - */ - public java.lang.String getSpecialEncoding() { - return specialEncoding; - } - - - /** - * Sets the specialEncoding value for this DirectoryCategory. - * - * @param specialEncoding - */ - public void setSpecialEncoding(java.lang.String specialEncoding) { - this.specialEncoding = specialEncoding; - } - - private java.lang.Object __equalsCalc = null; - public synchronized boolean equals(java.lang.Object obj) { - if (!(obj instanceof DirectoryCategory)) return false; - DirectoryCategory other = (DirectoryCategory) obj; - if (obj == null) return false; - if (this == obj) return true; - if (__equalsCalc != null) { - return (__equalsCalc == obj); - } - __equalsCalc = obj; - boolean _equals; - _equals = true && - ((this.fullViewableName==null && other.getFullViewableName()==null) || - (this.fullViewableName!=null && - this.fullViewableName.equals(other.getFullViewableName()))) && - ((this.specialEncoding==null && other.getSpecialEncoding()==null) || - (this.specialEncoding!=null && - this.specialEncoding.equals(other.getSpecialEncoding()))); - __equalsCalc = null; - return _equals; - } - - private boolean __hashCodeCalc = false; - public synchronized int hashCode() { - if (__hashCodeCalc) { - return 0; - } - __hashCodeCalc = true; - int _hashCode = 1; - if (getFullViewableName() != null) { - _hashCode += getFullViewableName().hashCode(); - } - if (getSpecialEncoding() != null) { - _hashCode += getSpecialEncoding().hashCode(); - } - __hashCodeCalc = false; - return _hashCode; - } - - // Type metadata - private static org.apache.axis.description.TypeDesc typeDesc = - new org.apache.axis.description.TypeDesc(DirectoryCategory.class, true); - - static { - typeDesc.setXmlType(new javax.xml.namespace.QName("urn:GoogleSearch", "DirectoryCategory")); - org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); - elemField.setFieldName("fullViewableName"); - elemField.setXmlName(new javax.xml.namespace.QName("", "fullViewableName")); - elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); - typeDesc.addFieldDesc(elemField); - elemField = new org.apache.axis.description.ElementDesc(); - elemField.setFieldName("specialEncoding"); - elemField.setXmlName(new javax.xml.namespace.QName("", "specialEncoding")); - elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); - typeDesc.addFieldDesc(elemField); - } - - /** - * Return type metadata object - */ - public static org.apache.axis.description.TypeDesc getTypeDesc() { - return typeDesc; - } - - /** - * Get Custom Serializer - */ - public static org.apache.axis.encoding.Serializer getSerializer( - java.lang.String mechType, - java.lang.Class _javaType, - javax.xml.namespace.QName _xmlType) { - return - new org.apache.axis.encoding.ser.BeanSerializer( - _javaType, _xmlType, typeDesc); - } - - /** - * Get Custom Deserializer - */ - public static org.apache.axis.encoding.Deserializer getDeserializer( - java.lang.String mechType, - java.lang.Class _javaType, - javax.xml.namespace.QName _xmlType) { - return - new org.apache.axis.encoding.ser.BeanDeserializer( - _javaType, _xmlType, typeDesc); - } - -} diff --git a/jonas_tests/examples/base/examples/webservices/beans/wsclient/src/org/objectweb/wssample/genbean/google/GoogleSearchPort.java b/jonas_tests/examples/base/examples/webservices/beans/wsclient/src/org/objectweb/wssample/genbean/google/GoogleSearchPort.java deleted file mode 100644 index 669b9e07ab97c4fc64f043894a284cdea8bc69e6..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/beans/wsclient/src/org/objectweb/wssample/genbean/google/GoogleSearchPort.java +++ /dev/null @@ -1,14 +0,0 @@ -/** - * GoogleSearchPort.java - * - * This file was auto-generated from WSDL - * by the Apache Axis 1.2RC1 Sep 29, 2004 (08:29:40 EDT) WSDL2Java emitter. - */ - -package org.objectweb.wssample.genbean.google; - -public interface GoogleSearchPort extends java.rmi.Remote { - public byte[] doGetCachedPage(java.lang.String key, java.lang.String url) throws java.rmi.RemoteException; - public java.lang.String doSpellingSuggestion(java.lang.String key, java.lang.String phrase) throws java.rmi.RemoteException; - public org.objectweb.wssample.genbean.google.GoogleSearchResult doGoogleSearch(java.lang.String key, java.lang.String q, int start, int maxResults, boolean filter, java.lang.String restrict, boolean safeSearch, java.lang.String lr, java.lang.String ie, java.lang.String oe) throws java.rmi.RemoteException; -} diff --git a/jonas_tests/examples/base/examples/webservices/beans/wsclient/src/org/objectweb/wssample/genbean/google/GoogleSearchResult.java b/jonas_tests/examples/base/examples/webservices/beans/wsclient/src/org/objectweb/wssample/genbean/google/GoogleSearchResult.java deleted file mode 100644 index b6f843845f6e1019db3fa21482a0eed867b55e51..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/beans/wsclient/src/org/objectweb/wssample/genbean/google/GoogleSearchResult.java +++ /dev/null @@ -1,450 +0,0 @@ -/** - * GoogleSearchResult.java - * - * This file was auto-generated from WSDL - * by the Apache Axis 1.2RC1 Sep 29, 2004 (08:29:40 EDT) WSDL2Java emitter. - */ - -package org.objectweb.wssample.genbean.google; - -public class GoogleSearchResult implements java.io.Serializable { - private boolean documentFiltering; - private java.lang.String searchComments; - private int estimatedTotalResultsCount; - private boolean estimateIsExact; - private org.objectweb.wssample.genbean.google.ResultElement[] resultElements; - private java.lang.String searchQuery; - private int startIndex; - private int endIndex; - private java.lang.String searchTips; - private org.objectweb.wssample.genbean.google.DirectoryCategory[] directoryCategories; - private double searchTime; - - public GoogleSearchResult() { - } - - public GoogleSearchResult( - boolean documentFiltering, - java.lang.String searchComments, - int estimatedTotalResultsCount, - boolean estimateIsExact, - org.objectweb.wssample.genbean.google.ResultElement[] resultElements, - java.lang.String searchQuery, - int startIndex, - int endIndex, - java.lang.String searchTips, - org.objectweb.wssample.genbean.google.DirectoryCategory[] directoryCategories, - double searchTime) { - this.documentFiltering = documentFiltering; - this.searchComments = searchComments; - this.estimatedTotalResultsCount = estimatedTotalResultsCount; - this.estimateIsExact = estimateIsExact; - this.resultElements = resultElements; - this.searchQuery = searchQuery; - this.startIndex = startIndex; - this.endIndex = endIndex; - this.searchTips = searchTips; - this.directoryCategories = directoryCategories; - this.searchTime = searchTime; - } - - - /** - * Gets the documentFiltering value for this GoogleSearchResult. - * - * @return documentFiltering - */ - public boolean isDocumentFiltering() { - return documentFiltering; - } - - - /** - * Sets the documentFiltering value for this GoogleSearchResult. - * - * @param documentFiltering - */ - public void setDocumentFiltering(boolean documentFiltering) { - this.documentFiltering = documentFiltering; - } - - - /** - * Gets the searchComments value for this GoogleSearchResult. - * - * @return searchComments - */ - public java.lang.String getSearchComments() { - return searchComments; - } - - - /** - * Sets the searchComments value for this GoogleSearchResult. - * - * @param searchComments - */ - public void setSearchComments(java.lang.String searchComments) { - this.searchComments = searchComments; - } - - - /** - * Gets the estimatedTotalResultsCount value for this GoogleSearchResult. - * - * @return estimatedTotalResultsCount - */ - public int getEstimatedTotalResultsCount() { - return estimatedTotalResultsCount; - } - - - /** - * Sets the estimatedTotalResultsCount value for this GoogleSearchResult. - * - * @param estimatedTotalResultsCount - */ - public void setEstimatedTotalResultsCount(int estimatedTotalResultsCount) { - this.estimatedTotalResultsCount = estimatedTotalResultsCount; - } - - - /** - * Gets the estimateIsExact value for this GoogleSearchResult. - * - * @return estimateIsExact - */ - public boolean isEstimateIsExact() { - return estimateIsExact; - } - - - /** - * Sets the estimateIsExact value for this GoogleSearchResult. - * - * @param estimateIsExact - */ - public void setEstimateIsExact(boolean estimateIsExact) { - this.estimateIsExact = estimateIsExact; - } - - - /** - * Gets the resultElements value for this GoogleSearchResult. - * - * @return resultElements - */ - public org.objectweb.wssample.genbean.google.ResultElement[] getResultElements() { - return resultElements; - } - - - /** - * Sets the resultElements value for this GoogleSearchResult. - * - * @param resultElements - */ - public void setResultElements(org.objectweb.wssample.genbean.google.ResultElement[] resultElements) { - this.resultElements = resultElements; - } - - - /** - * Gets the searchQuery value for this GoogleSearchResult. - * - * @return searchQuery - */ - public java.lang.String getSearchQuery() { - return searchQuery; - } - - - /** - * Sets the searchQuery value for this GoogleSearchResult. - * - * @param searchQuery - */ - public void setSearchQuery(java.lang.String searchQuery) { - this.searchQuery = searchQuery; - } - - - /** - * Gets the startIndex value for this GoogleSearchResult. - * - * @return startIndex - */ - public int getStartIndex() { - return startIndex; - } - - - /** - * Sets the startIndex value for this GoogleSearchResult. - * - * @param startIndex - */ - public void setStartIndex(int startIndex) { - this.startIndex = startIndex; - } - - - /** - * Gets the endIndex value for this GoogleSearchResult. - * - * @return endIndex - */ - public int getEndIndex() { - return endIndex; - } - - - /** - * Sets the endIndex value for this GoogleSearchResult. - * - * @param endIndex - */ - public void setEndIndex(int endIndex) { - this.endIndex = endIndex; - } - - - /** - * Gets the searchTips value for this GoogleSearchResult. - * - * @return searchTips - */ - public java.lang.String getSearchTips() { - return searchTips; - } - - - /** - * Sets the searchTips value for this GoogleSearchResult. - * - * @param searchTips - */ - public void setSearchTips(java.lang.String searchTips) { - this.searchTips = searchTips; - } - - - /** - * Gets the directoryCategories value for this GoogleSearchResult. - * - * @return directoryCategories - */ - public org.objectweb.wssample.genbean.google.DirectoryCategory[] getDirectoryCategories() { - return directoryCategories; - } - - - /** - * Sets the directoryCategories value for this GoogleSearchResult. - * - * @param directoryCategories - */ - public void setDirectoryCategories(org.objectweb.wssample.genbean.google.DirectoryCategory[] directoryCategories) { - this.directoryCategories = directoryCategories; - } - - - /** - * Gets the searchTime value for this GoogleSearchResult. - * - * @return searchTime - */ - public double getSearchTime() { - return searchTime; - } - - - /** - * Sets the searchTime value for this GoogleSearchResult. - * - * @param searchTime - */ - public void setSearchTime(double searchTime) { - this.searchTime = searchTime; - } - - private java.lang.Object __equalsCalc = null; - public synchronized boolean equals(java.lang.Object obj) { - if (!(obj instanceof GoogleSearchResult)) return false; - GoogleSearchResult other = (GoogleSearchResult) obj; - if (obj == null) return false; - if (this == obj) return true; - if (__equalsCalc != null) { - return (__equalsCalc == obj); - } - __equalsCalc = obj; - boolean _equals; - _equals = true && - this.documentFiltering == other.isDocumentFiltering() && - ((this.searchComments==null && other.getSearchComments()==null) || - (this.searchComments!=null && - this.searchComments.equals(other.getSearchComments()))) && - this.estimatedTotalResultsCount == other.getEstimatedTotalResultsCount() && - this.estimateIsExact == other.isEstimateIsExact() && - ((this.resultElements==null && other.getResultElements()==null) || - (this.resultElements!=null && - java.util.Arrays.equals(this.resultElements, other.getResultElements()))) && - ((this.searchQuery==null && other.getSearchQuery()==null) || - (this.searchQuery!=null && - this.searchQuery.equals(other.getSearchQuery()))) && - this.startIndex == other.getStartIndex() && - this.endIndex == other.getEndIndex() && - ((this.searchTips==null && other.getSearchTips()==null) || - (this.searchTips!=null && - this.searchTips.equals(other.getSearchTips()))) && - ((this.directoryCategories==null && other.getDirectoryCategories()==null) || - (this.directoryCategories!=null && - java.util.Arrays.equals(this.directoryCategories, other.getDirectoryCategories()))) && - this.searchTime == other.getSearchTime(); - __equalsCalc = null; - return _equals; - } - - private boolean __hashCodeCalc = false; - public synchronized int hashCode() { - if (__hashCodeCalc) { - return 0; - } - __hashCodeCalc = true; - int _hashCode = 1; - _hashCode += (isDocumentFiltering() ? Boolean.TRUE : Boolean.FALSE).hashCode(); - if (getSearchComments() != null) { - _hashCode += getSearchComments().hashCode(); - } - _hashCode += getEstimatedTotalResultsCount(); - _hashCode += (isEstimateIsExact() ? Boolean.TRUE : Boolean.FALSE).hashCode(); - if (getResultElements() != null) { - for (int i=0; - i - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/webservices/etc/xml/application.xml b/jonas_tests/examples/base/examples/webservices/etc/xml/application.xml deleted file mode 100644 index 37339099c28baf624e5f029ffc2dd51740c2e437..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/etc/xml/application.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - WebServices Sample application - WebServices Sample application - - - ws.jar - - - - - wsEarSample.war - wsEarSample - - - - diff --git a/jonas_tests/examples/base/examples/webservices/webs/webclient/build.xml b/jonas_tests/examples/base/examples/webservices/webs/webclient/build.xml deleted file mode 100644 index 590cc4294762adfd886aec77120b20d4e94ab0b2..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webclient/build.xml +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/resources/googleByJSP.jsp b/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/resources/googleByJSP.jsp deleted file mode 100644 index 0909c82a8cd5005bf40324d43d4d56f40e16e471..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/resources/googleByJSP.jsp +++ /dev/null @@ -1,90 +0,0 @@ -<%@page contentType="text/html"%> - -<%@page import="org.objectweb.wssample.gen.google.*"%> -<%@page import="javax.naming.*"%> - - - Using Google WebServices - - - -
    - - Jakarta Tomcat - - Mortbay Jetty - JOnAS WebSite -
    - - -<% - if (request.getParameter("search") == null) { -%> -
    Google WebServices Access via JSP
    - - - -<% - } else { -%> -
    Results
    - -<% - } -%> - - diff --git a/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/resources/googleByServlet.html b/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/resources/googleByServlet.html deleted file mode 100644 index 49eb724189f900f98e7c3c33cc42ab73ce23099d..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/resources/googleByServlet.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - Google WebServices Access via Servlet - - - - -
    - - Jakarta Tomcat - - Mortbay Jetty - JOnAS WebSite -
    - -
    Google WebServices Access via Servlet
    - - - - diff --git a/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/resources/images/jetty.gif b/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/resources/images/jetty.gif deleted file mode 100644 index 01f44a87f6801b200f142513d0d02b12cea0fb46..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/resources/images/jetty.gif and /dev/null differ diff --git a/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/resources/images/jonas.ico b/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/resources/images/jonas.ico deleted file mode 100644 index 108c5c21ede334f3b80d9a373f618c52efee7877..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/resources/images/jonas.ico and /dev/null differ diff --git a/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/resources/images/ow_jonas_logo.gif b/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/resources/images/ow_jonas_logo.gif deleted file mode 100644 index 1b56943a721f82a8cb81776030567772265433f2..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/resources/images/ow_jonas_logo.gif and /dev/null differ diff --git a/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/resources/images/ow_logo.png b/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/resources/images/ow_logo.png deleted file mode 100644 index 60617270bf0c0d21c9f40e4f7c85ef5bfdbda548..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/resources/images/ow_logo.png and /dev/null differ diff --git a/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/resources/images/tomcat.gif b/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/resources/images/tomcat.gif deleted file mode 100644 index 61756736b82350f64b5ea1b2bfc31ac57e30a3d3..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/resources/images/tomcat.gif and /dev/null differ diff --git a/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/resources/index.html b/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/resources/index.html deleted file mode 100644 index 8f962e2717eedde30646f9f50eb064d7af248a14..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/resources/index.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - WebServices Client from a WebApp - - - - -
    - - Jakarta Tomcat - - Mortbay Jetty - JOnAS WebSite -
    - -
    WebServices Client from a WebApp
    - - - - diff --git a/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/resources/style/ow_jonas.css b/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/resources/style/ow_jonas.css deleted file mode 100644 index c3f068d9a5aa850d59a4f126168fab80b34a023b..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/resources/style/ow_jonas.css +++ /dev/null @@ -1,119 +0,0 @@ -/* - Context Root css. based on css from http://jonas.objectweb.org - XHTML by Florent BENOIT -*/ - -.bodywelcome -{ - background-color: #FFFFFF; - color: #000000; - background-image: url(../images/ow_logo.png); - background-repeat: no-repeat; - margin: 0; -} - - -img { - margin: 5px; - border:0; -} - -body -{ - background-color: #FFFFFF; - margin: 10px; - color: black; - font-family: Arial,Helvetica, sans-serif; - font-size: 12px; - line-height: 16px; - font-weight: normal; - -} - -div.logos { - top: 5px; - width: 99%; - text-align: right; -} - - -div.links { - margin-top : 40px; - margin-left : 200px; -} - - -div.titlepage { - margin-left: 200px; - color: #E06611; - font-family: Arial, Helvetica, sans-serif; - font-size: 22px; - line-height: 27px; - font-weight: bold; - border-color: #99C; - border-width: 0 0 4px 0; - border-style: none none solid none; -} - - -div.footer { - margin-top : 50px; - color: #FFFFFF; - font-size: 8pt; - text-align: center; -} - - -/*HTML elements */ - - - -ul, ol, dl -{ - color: black; - font-family: Arial,Helvetica, sans-serif; - font-size: 12px; - line-height: 16px; - font-weight: normal; -} - -li -{ - color: black; - font-family: Arial, Helvetica, sans-serif; - font-size: 14px; - font-weight: normal; - margin: 10px 0px 5px 0px; - -} -a -{ - color: #3F3975; - background-color: transparent; - text-decoration: underline; -} - -a:visited -{ - color: #9898CB; - background-color: transparent; - text-decoration: underline; -} - -a:hover -{ - color: #E06611; - background-color: transparent; - text-decoration: underline; -} - - -a:active -{ - color: #FFFFFF; - background-color: #E06611; - text-decoration: underline; -} - - - diff --git a/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/xml/googleMapping.xml b/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/xml/googleMapping.xml deleted file mode 100644 index 2cba3939eef1498ad57ce6d51a4601cc8d404871..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/xml/googleMapping.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - org.objectweb.wssample.gen.google - urn:GoogleSearch - - - org.objectweb.wssample.gen.google.GoogleSearchResult - ns:GoogleSearchResult - complexType - - - org.objectweb.wssample.gen.google.ResultElement - ns:ResultElement - complexType - - - org.objectweb.wssample.gen.google.ResultElement[] - ns:ResultElementArray - complexType - - - org.objectweb.wssample.gen.google.DirectoryCategory[] - ns:DirectoryCategoryArray - complexType - - - org.objectweb.wssample.gen.google.DirectoryCategory - ns:DirectoryCategory - complexType - - - diff --git a/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/xml/jonas-web.xml b/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/xml/jonas-web.xml deleted file mode 100644 index c6d0fef833253c5f1839a334f1d760fbcbf9e48b..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/xml/jonas-web.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - service/google - - - org.objectweb.wssample.gen.google.GoogleSearchPort - ns:GoogleSearchPort - - javax.xml.rpc.session.maintain - true - - - javax.xml.rpc.session.maintain - true - - - - - \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/xml/web.xml b/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/xml/web.xml deleted file mode 100644 index 5ea6ffa00aa200e4dac56959cb38d377ed06794c..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/xml/web.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - WebApplication using Distant WebServices - - - GoogleClientServlet - org.objectweb.wssample.servlets.wsclient.WsClientServlet - - - - GoogleClientServlet - /googleByServlet.action - - - - index.html - index.jsp - - - - service/google - org.objectweb.wssample.gen.google.GoogleSearchService - WEB-INF/wsdl/GoogleSearch.wsdl - WEB-INF/googleMapping.xml - google:GoogleSearchService - - org.objectweb.wssample.gen.google.GoogleSearchPort - - - - - key - java.lang.String - j1LnsP9QFHLsT76x8dXU5HYjG1wxlgU3 - - - - - diff --git a/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/xml/wsdl/GoogleSearch.wsdl b/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/xml/wsdl/GoogleSearch.wsdl deleted file mode 100644 index c99d55a69da86c083ecd861f5c2b66ea75525b71..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webclient/etc/xml/wsdl/GoogleSearch.wsdl +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/webservices/webs/webclient/src/org/objectweb/wssample/gen/google/DirectoryCategory.java b/jonas_tests/examples/base/examples/webservices/webs/webclient/src/org/objectweb/wssample/gen/google/DirectoryCategory.java deleted file mode 100644 index 6f877268641f50711d2161dde76b60a4974b9dbd..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webclient/src/org/objectweb/wssample/gen/google/DirectoryCategory.java +++ /dev/null @@ -1,152 +0,0 @@ -/** - * DirectoryCategory.java - * - * This file was auto-generated from WSDL - * by the Apache Axis 1.2RC2 Dec 15, 2004 (10:53:17 CET) WSDL2Java emitter. - */ - -package org.objectweb.wssample.gen.google; - -public class DirectoryCategory implements java.io.Serializable { - private java.lang.String fullViewableName; - private java.lang.String specialEncoding; - - public DirectoryCategory() { - } - - public DirectoryCategory( - java.lang.String fullViewableName, - java.lang.String specialEncoding) { - this.fullViewableName = fullViewableName; - this.specialEncoding = specialEncoding; - } - - - /** - * Gets the fullViewableName value for this DirectoryCategory. - * - * @return fullViewableName - */ - public java.lang.String getFullViewableName() { - return fullViewableName; - } - - - /** - * Sets the fullViewableName value for this DirectoryCategory. - * - * @param fullViewableName - */ - public void setFullViewableName(java.lang.String fullViewableName) { - this.fullViewableName = fullViewableName; - } - - - /** - * Gets the specialEncoding value for this DirectoryCategory. - * - * @return specialEncoding - */ - public java.lang.String getSpecialEncoding() { - return specialEncoding; - } - - - /** - * Sets the specialEncoding value for this DirectoryCategory. - * - * @param specialEncoding - */ - public void setSpecialEncoding(java.lang.String specialEncoding) { - this.specialEncoding = specialEncoding; - } - - private java.lang.Object __equalsCalc = null; - public synchronized boolean equals(java.lang.Object obj) { - if (!(obj instanceof DirectoryCategory)) return false; - DirectoryCategory other = (DirectoryCategory) obj; - if (obj == null) return false; - if (this == obj) return true; - if (__equalsCalc != null) { - return (__equalsCalc == obj); - } - __equalsCalc = obj; - boolean _equals; - _equals = true && - ((this.fullViewableName==null && other.getFullViewableName()==null) || - (this.fullViewableName!=null && - this.fullViewableName.equals(other.getFullViewableName()))) && - ((this.specialEncoding==null && other.getSpecialEncoding()==null) || - (this.specialEncoding!=null && - this.specialEncoding.equals(other.getSpecialEncoding()))); - __equalsCalc = null; - return _equals; - } - - private boolean __hashCodeCalc = false; - public synchronized int hashCode() { - if (__hashCodeCalc) { - return 0; - } - __hashCodeCalc = true; - int _hashCode = 1; - if (getFullViewableName() != null) { - _hashCode += getFullViewableName().hashCode(); - } - if (getSpecialEncoding() != null) { - _hashCode += getSpecialEncoding().hashCode(); - } - __hashCodeCalc = false; - return _hashCode; - } - - // Type metadata - private static org.apache.axis.description.TypeDesc typeDesc = - new org.apache.axis.description.TypeDesc(DirectoryCategory.class, true); - - static { - typeDesc.setXmlType(new javax.xml.namespace.QName("urn:GoogleSearch", "DirectoryCategory")); - org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); - elemField.setFieldName("fullViewableName"); - elemField.setXmlName(new javax.xml.namespace.QName("", "fullViewableName")); - elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); - typeDesc.addFieldDesc(elemField); - elemField = new org.apache.axis.description.ElementDesc(); - elemField.setFieldName("specialEncoding"); - elemField.setXmlName(new javax.xml.namespace.QName("", "specialEncoding")); - elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); - typeDesc.addFieldDesc(elemField); - } - - /** - * Return type metadata object - */ - public static org.apache.axis.description.TypeDesc getTypeDesc() { - return typeDesc; - } - - /** - * Get Custom Serializer - */ - public static org.apache.axis.encoding.Serializer getSerializer( - java.lang.String mechType, - java.lang.Class _javaType, - javax.xml.namespace.QName _xmlType) { - return - new org.apache.axis.encoding.ser.BeanSerializer( - _javaType, _xmlType, typeDesc); - } - - /** - * Get Custom Deserializer - */ - public static org.apache.axis.encoding.Deserializer getDeserializer( - java.lang.String mechType, - java.lang.Class _javaType, - javax.xml.namespace.QName _xmlType) { - return - new org.apache.axis.encoding.ser.BeanDeserializer( - _javaType, _xmlType, typeDesc); - } - -} diff --git a/jonas_tests/examples/base/examples/webservices/webs/webclient/src/org/objectweb/wssample/gen/google/GoogleSearchPort.java b/jonas_tests/examples/base/examples/webservices/webs/webclient/src/org/objectweb/wssample/gen/google/GoogleSearchPort.java deleted file mode 100644 index 44c06c879c721d32f560531ec5293beefeae2bb6..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webclient/src/org/objectweb/wssample/gen/google/GoogleSearchPort.java +++ /dev/null @@ -1,14 +0,0 @@ -/** - * GoogleSearchPort.java - * - * This file was auto-generated from WSDL - * by the Apache Axis 1.2RC2 Dec 15, 2004 (10:53:17 CET) WSDL2Java emitter. - */ - -package org.objectweb.wssample.gen.google; - -public interface GoogleSearchPort extends java.rmi.Remote { - public byte[] doGetCachedPage(java.lang.String key, java.lang.String url) throws java.rmi.RemoteException; - public java.lang.String doSpellingSuggestion(java.lang.String key, java.lang.String phrase) throws java.rmi.RemoteException; - public org.objectweb.wssample.gen.google.GoogleSearchResult doGoogleSearch(java.lang.String key, java.lang.String q, int start, int maxResults, boolean filter, java.lang.String restrict, boolean safeSearch, java.lang.String lr, java.lang.String ie, java.lang.String oe) throws java.rmi.RemoteException; -} diff --git a/jonas_tests/examples/base/examples/webservices/webs/webclient/src/org/objectweb/wssample/gen/google/GoogleSearchResult.java b/jonas_tests/examples/base/examples/webservices/webs/webclient/src/org/objectweb/wssample/gen/google/GoogleSearchResult.java deleted file mode 100644 index 92d54ba1009f59add9b52ad54bc41ebd4d18a64b..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webclient/src/org/objectweb/wssample/gen/google/GoogleSearchResult.java +++ /dev/null @@ -1,450 +0,0 @@ -/** - * GoogleSearchResult.java - * - * This file was auto-generated from WSDL - * by the Apache Axis 1.2RC2 Dec 15, 2004 (10:53:17 CET) WSDL2Java emitter. - */ - -package org.objectweb.wssample.gen.google; - -public class GoogleSearchResult implements java.io.Serializable { - private boolean documentFiltering; - private java.lang.String searchComments; - private int estimatedTotalResultsCount; - private boolean estimateIsExact; - private org.objectweb.wssample.gen.google.ResultElement[] resultElements; - private java.lang.String searchQuery; - private int startIndex; - private int endIndex; - private java.lang.String searchTips; - private org.objectweb.wssample.gen.google.DirectoryCategory[] directoryCategories; - private double searchTime; - - public GoogleSearchResult() { - } - - public GoogleSearchResult( - boolean documentFiltering, - java.lang.String searchComments, - int estimatedTotalResultsCount, - boolean estimateIsExact, - org.objectweb.wssample.gen.google.ResultElement[] resultElements, - java.lang.String searchQuery, - int startIndex, - int endIndex, - java.lang.String searchTips, - org.objectweb.wssample.gen.google.DirectoryCategory[] directoryCategories, - double searchTime) { - this.documentFiltering = documentFiltering; - this.searchComments = searchComments; - this.estimatedTotalResultsCount = estimatedTotalResultsCount; - this.estimateIsExact = estimateIsExact; - this.resultElements = resultElements; - this.searchQuery = searchQuery; - this.startIndex = startIndex; - this.endIndex = endIndex; - this.searchTips = searchTips; - this.directoryCategories = directoryCategories; - this.searchTime = searchTime; - } - - - /** - * Gets the documentFiltering value for this GoogleSearchResult. - * - * @return documentFiltering - */ - public boolean isDocumentFiltering() { - return documentFiltering; - } - - - /** - * Sets the documentFiltering value for this GoogleSearchResult. - * - * @param documentFiltering - */ - public void setDocumentFiltering(boolean documentFiltering) { - this.documentFiltering = documentFiltering; - } - - - /** - * Gets the searchComments value for this GoogleSearchResult. - * - * @return searchComments - */ - public java.lang.String getSearchComments() { - return searchComments; - } - - - /** - * Sets the searchComments value for this GoogleSearchResult. - * - * @param searchComments - */ - public void setSearchComments(java.lang.String searchComments) { - this.searchComments = searchComments; - } - - - /** - * Gets the estimatedTotalResultsCount value for this GoogleSearchResult. - * - * @return estimatedTotalResultsCount - */ - public int getEstimatedTotalResultsCount() { - return estimatedTotalResultsCount; - } - - - /** - * Sets the estimatedTotalResultsCount value for this GoogleSearchResult. - * - * @param estimatedTotalResultsCount - */ - public void setEstimatedTotalResultsCount(int estimatedTotalResultsCount) { - this.estimatedTotalResultsCount = estimatedTotalResultsCount; - } - - - /** - * Gets the estimateIsExact value for this GoogleSearchResult. - * - * @return estimateIsExact - */ - public boolean isEstimateIsExact() { - return estimateIsExact; - } - - - /** - * Sets the estimateIsExact value for this GoogleSearchResult. - * - * @param estimateIsExact - */ - public void setEstimateIsExact(boolean estimateIsExact) { - this.estimateIsExact = estimateIsExact; - } - - - /** - * Gets the resultElements value for this GoogleSearchResult. - * - * @return resultElements - */ - public org.objectweb.wssample.gen.google.ResultElement[] getResultElements() { - return resultElements; - } - - - /** - * Sets the resultElements value for this GoogleSearchResult. - * - * @param resultElements - */ - public void setResultElements(org.objectweb.wssample.gen.google.ResultElement[] resultElements) { - this.resultElements = resultElements; - } - - - /** - * Gets the searchQuery value for this GoogleSearchResult. - * - * @return searchQuery - */ - public java.lang.String getSearchQuery() { - return searchQuery; - } - - - /** - * Sets the searchQuery value for this GoogleSearchResult. - * - * @param searchQuery - */ - public void setSearchQuery(java.lang.String searchQuery) { - this.searchQuery = searchQuery; - } - - - /** - * Gets the startIndex value for this GoogleSearchResult. - * - * @return startIndex - */ - public int getStartIndex() { - return startIndex; - } - - - /** - * Sets the startIndex value for this GoogleSearchResult. - * - * @param startIndex - */ - public void setStartIndex(int startIndex) { - this.startIndex = startIndex; - } - - - /** - * Gets the endIndex value for this GoogleSearchResult. - * - * @return endIndex - */ - public int getEndIndex() { - return endIndex; - } - - - /** - * Sets the endIndex value for this GoogleSearchResult. - * - * @param endIndex - */ - public void setEndIndex(int endIndex) { - this.endIndex = endIndex; - } - - - /** - * Gets the searchTips value for this GoogleSearchResult. - * - * @return searchTips - */ - public java.lang.String getSearchTips() { - return searchTips; - } - - - /** - * Sets the searchTips value for this GoogleSearchResult. - * - * @param searchTips - */ - public void setSearchTips(java.lang.String searchTips) { - this.searchTips = searchTips; - } - - - /** - * Gets the directoryCategories value for this GoogleSearchResult. - * - * @return directoryCategories - */ - public org.objectweb.wssample.gen.google.DirectoryCategory[] getDirectoryCategories() { - return directoryCategories; - } - - - /** - * Sets the directoryCategories value for this GoogleSearchResult. - * - * @param directoryCategories - */ - public void setDirectoryCategories(org.objectweb.wssample.gen.google.DirectoryCategory[] directoryCategories) { - this.directoryCategories = directoryCategories; - } - - - /** - * Gets the searchTime value for this GoogleSearchResult. - * - * @return searchTime - */ - public double getSearchTime() { - return searchTime; - } - - - /** - * Sets the searchTime value for this GoogleSearchResult. - * - * @param searchTime - */ - public void setSearchTime(double searchTime) { - this.searchTime = searchTime; - } - - private java.lang.Object __equalsCalc = null; - public synchronized boolean equals(java.lang.Object obj) { - if (!(obj instanceof GoogleSearchResult)) return false; - GoogleSearchResult other = (GoogleSearchResult) obj; - if (obj == null) return false; - if (this == obj) return true; - if (__equalsCalc != null) { - return (__equalsCalc == obj); - } - __equalsCalc = obj; - boolean _equals; - _equals = true && - this.documentFiltering == other.isDocumentFiltering() && - ((this.searchComments==null && other.getSearchComments()==null) || - (this.searchComments!=null && - this.searchComments.equals(other.getSearchComments()))) && - this.estimatedTotalResultsCount == other.getEstimatedTotalResultsCount() && - this.estimateIsExact == other.isEstimateIsExact() && - ((this.resultElements==null && other.getResultElements()==null) || - (this.resultElements!=null && - java.util.Arrays.equals(this.resultElements, other.getResultElements()))) && - ((this.searchQuery==null && other.getSearchQuery()==null) || - (this.searchQuery!=null && - this.searchQuery.equals(other.getSearchQuery()))) && - this.startIndex == other.getStartIndex() && - this.endIndex == other.getEndIndex() && - ((this.searchTips==null && other.getSearchTips()==null) || - (this.searchTips!=null && - this.searchTips.equals(other.getSearchTips()))) && - ((this.directoryCategories==null && other.getDirectoryCategories()==null) || - (this.directoryCategories!=null && - java.util.Arrays.equals(this.directoryCategories, other.getDirectoryCategories()))) && - this.searchTime == other.getSearchTime(); - __equalsCalc = null; - return _equals; - } - - private boolean __hashCodeCalc = false; - public synchronized int hashCode() { - if (__hashCodeCalc) { - return 0; - } - __hashCodeCalc = true; - int _hashCode = 1; - _hashCode += (isDocumentFiltering() ? Boolean.TRUE : Boolean.FALSE).hashCode(); - if (getSearchComments() != null) { - _hashCode += getSearchComments().hashCode(); - } - _hashCode += getEstimatedTotalResultsCount(); - _hashCode += (isEstimateIsExact() ? Boolean.TRUE : Boolean.FALSE).hashCode(); - if (getResultElements() != null) { - for (int i=0; - iGET and POST - * methods. - * - * @param request servlet request - * @param response servlet response - * - * @throws ServletException default servlet exception thrown - * @throws IOException default servlet exception thrown - */ - protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, - IOException { - - response.setContentType("text/html"); - PrintWriter out = response.getWriter(); - // output your page here - out.println(""); - out.println(""); - out.println("Google WebService Response"); - out.println(""); - out.println(""); - out.println(""); - - out.println("
    "); - out.println("\"Jakarta"); - out.println("\"Mortbay"); - out.println("\"JOnAS"); - out.println("
    "); - - // Get and Display results - try { - // Get the Context - Context ctx = new InitialContext(); - - String key = (String) ctx.lookup("java:comp/env/key"); - - // Lookup the binded service - Object s = ctx.lookup("java:comp/env/service/google"); - GoogleSearchService google = (GoogleSearchService) s; - - // get the Port object - GoogleSearchPort search = google.getGoogleSearchPort(); - - // execute the query - GoogleSearchResult result = search.doGoogleSearch(key, request.getParameter("search"), 0, // first - // index - 10, // maxresult - false, //filter - null, //restrict - false, // safesearch - null, //lr - null, //ie - null //oe - ); - - out.println("
    Results
    "); - out.println("
    "); - - // Display the results - ResultElement[] elements = result.getResultElements(); - for (int i = 0; i < elements.length; i++) { - out.println("" + elements[i].getTitle() + "
    "); - out.println(elements[i].getSummary() + "

    "); - } - out.println("
    "); - - } catch (NamingException ne) { - out.println("
    Error when looking for service-ref
    "); - ne.printStackTrace(out); - } catch (ServiceException se) { - out.println("
    Error when performign service-ref
    "); - se.printStackTrace(out); - } - - out.println(""); - out.println(""); - out.close(); - } - - /** - * Handles the HTTP GET method. - * - * @param request servlet request - * @param response servlet response - * - * @throws ServletException default servlet exception thrown - * @throws IOException default servlet exception thrown - */ - protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - processRequest(request, response); - } - - /** - * Handles the HTTP POST method. - * - * @param request servlet request - * @param response servlet response - * - * @throws ServletException default servlet exception thrown - * @throws IOException default servlet exception thrown - */ - protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, - IOException { - processRequest(request, response); - } - - /** - * @return Returns a short description of the servlet. - */ - public String getServletInfo() { - return "Servlet which is client of the WebServices API of Google"; - } - -} diff --git a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/README b/jonas_tests/examples/base/examples/webservices/webs/webendpoint/README deleted file mode 100644 index 91034c89bc722832df4a46e2e92a117dca232996..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/README +++ /dev/null @@ -1,40 +0,0 @@ -webendpoint sample README ----------------------------- - -This sample show you how to use secured endpoint : -* how to configure the endpoint for Authentication -* how to configure your endpoint for Encryption - -You can directly use the authentication endpoint, but -some preliminary steps are required for the Encryption, -as it use a keystore and because Encryption needs BouncyCastle -JCE provider that is not packaged inside JOnAS (please -read the following). - -IMPORTANT : ------------ -If you want to use advanced capabilities of WSS4J, in particular Encryption, ... -You have to download BouncyCastle JCE Provider. -You can download latest version here : -http://www.bouncycastle.org/latest_releases.html -Choose the bcprov-jdk**-XXX.jar according to the JDK version you're running JOnAS on. -Place that downloaded jar in JONAS_ROOT/lib/commons/jonas/ws-security. -BouncyCastle provider will be available for the next JOnAS reboot. - -Please take the time to read the following web page : -http://www.bouncycastle.org/specifications.html -Especially the patent statement. - -How to create a keystore ? ---------------------------- - -Here are the steps : -1. create the keystore with an single certificate : -$> $JAVA_HOME/bin/keytool -genkey -alias jonas-ws -keyalg RSA -keystore $JONAS_BASE/conf/my-wssample-keystore - -2. You will be prompted for the keystore password, type "security" (without the quote) -3. Enter the certificate information (Name, Company, ...) -4. Reuse the SAME password ("security") for the certificate (just press enter) - -This will create a keystore in JONAS_BASE/conf with 1 certificate for the user 'jonas-ws'. -This keystore is used by WSS4Jhandler. diff --git a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/build.xml b/jonas_tests/examples/base/examples/webservices/webs/webendpoint/build.xml deleted file mode 100644 index 4f59f6fdde6889da70639fa8a3cb876a155e947e..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/build.xml +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/resources/credentials.properties b/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/resources/credentials.properties deleted file mode 100644 index e438706e375c49fbc9c0a778d51f4fddbb8a1caa..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/resources/credentials.properties +++ /dev/null @@ -1,2 +0,0 @@ -# Couple user/password -jonas SHA:NaLG+uYfgHeqth+qQBlyKr8FCTw= \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/resources/sample-crypto.properties b/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/resources/sample-crypto.properties deleted file mode 100644 index ce0c0908e93581965a84a94867956ad6b543e767..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/resources/sample-crypto.properties +++ /dev/null @@ -1,8 +0,0 @@ -org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin -org.apache.ws.security.crypto.merlin.keystore.type=pkcs12 -org.apache.ws.security.crypto.merlin.keystore.password=security -org.apache.ws.security.crypto.merlin.keystore.alias=jonas-ws -org.apache.ws.security.crypto.merlin.alias.password=security -# keystore filname -# Must be available from ClassLoader -org.apache.ws.security.crypto.merlin.file=my-wssample-keystore diff --git a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/web/images/jetty.gif b/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/web/images/jetty.gif deleted file mode 100644 index 01f44a87f6801b200f142513d0d02b12cea0fb46..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/web/images/jetty.gif and /dev/null differ diff --git a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/web/images/jonas.ico b/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/web/images/jonas.ico deleted file mode 100644 index 108c5c21ede334f3b80d9a373f618c52efee7877..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/web/images/jonas.ico and /dev/null differ diff --git a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/web/images/ow_jonas_logo.gif b/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/web/images/ow_jonas_logo.gif deleted file mode 100644 index 1b56943a721f82a8cb81776030567772265433f2..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/web/images/ow_jonas_logo.gif and /dev/null differ diff --git a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/web/images/ow_logo.png b/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/web/images/ow_logo.png deleted file mode 100644 index 60617270bf0c0d21c9f40e4f7c85ef5bfdbda548..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/web/images/ow_logo.png and /dev/null differ diff --git a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/web/images/tomcat.gif b/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/web/images/tomcat.gif deleted file mode 100644 index 61756736b82350f64b5ea1b2bfc31ac57e30a3d3..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/web/images/tomcat.gif and /dev/null differ diff --git a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/web/index.html b/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/web/index.html deleted file mode 100644 index d06b5fa26c45be93bebdbccc4159d8ea5bc8aff8..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/web/index.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - WebServices Endpoint Deployment in WebApp - - - - -
    - - Jakarta Tomcat - - Mortbay Jetty - JOnAS WebSite -
    - -
    WebServices Endpoint Deployment in WebApp
    - - - - diff --git a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/web/jaxrpcTest.jsp b/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/web/jaxrpcTest.jsp deleted file mode 100644 index c816922d9f9db4974707a6040e30e7abeed47a31..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/web/jaxrpcTest.jsp +++ /dev/null @@ -1,49 +0,0 @@ -<%@page contentType="text/html"%> - - - - Prepare Local JaxRpc WebService Call - - - - -
    - - Jakarta Tomcat - - Mortbay Jetty - JOnAS WebSite -
    - -
    Prepare Local JaxRpc WebService Call
    - - - - diff --git a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/web/style/ow_jonas.css b/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/web/style/ow_jonas.css deleted file mode 100644 index c3f068d9a5aa850d59a4f126168fab80b34a023b..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/web/style/ow_jonas.css +++ /dev/null @@ -1,119 +0,0 @@ -/* - Context Root css. based on css from http://jonas.objectweb.org - XHTML by Florent BENOIT -*/ - -.bodywelcome -{ - background-color: #FFFFFF; - color: #000000; - background-image: url(../images/ow_logo.png); - background-repeat: no-repeat; - margin: 0; -} - - -img { - margin: 5px; - border:0; -} - -body -{ - background-color: #FFFFFF; - margin: 10px; - color: black; - font-family: Arial,Helvetica, sans-serif; - font-size: 12px; - line-height: 16px; - font-weight: normal; - -} - -div.logos { - top: 5px; - width: 99%; - text-align: right; -} - - -div.links { - margin-top : 40px; - margin-left : 200px; -} - - -div.titlepage { - margin-left: 200px; - color: #E06611; - font-family: Arial, Helvetica, sans-serif; - font-size: 22px; - line-height: 27px; - font-weight: bold; - border-color: #99C; - border-width: 0 0 4px 0; - border-style: none none solid none; -} - - -div.footer { - margin-top : 50px; - color: #FFFFFF; - font-size: 8pt; - text-align: center; -} - - -/*HTML elements */ - - - -ul, ol, dl -{ - color: black; - font-family: Arial,Helvetica, sans-serif; - font-size: 12px; - line-height: 16px; - font-weight: normal; -} - -li -{ - color: black; - font-family: Arial, Helvetica, sans-serif; - font-size: 14px; - font-weight: normal; - margin: 10px 0px 5px 0px; - -} -a -{ - color: #3F3975; - background-color: transparent; - text-decoration: underline; -} - -a:visited -{ - color: #9898CB; - background-color: transparent; - text-decoration: underline; -} - -a:hover -{ - color: #E06611; - background-color: transparent; - text-decoration: underline; -} - - -a:active -{ - color: #FFFFFF; - background-color: #E06611; - text-decoration: underline; -} - - - diff --git a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/xml/clientMapping.xml b/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/xml/clientMapping.xml deleted file mode 100644 index 6ad4979e7afb35887fb6a41d18ebf808fad75567..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/xml/clientMapping.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - org.objectweb.wssample.gen.jaxrpc - http://ws.servlets.wssample.objectweb.org - - \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/xml/jaxrpcEndpointMapping.xml b/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/xml/jaxrpcEndpointMapping.xml deleted file mode 100644 index 143af0b1db6a00978c2a24cacc955f55887d8ed5..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/xml/jaxrpcEndpointMapping.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - org.objectweb.wssample.servlets.ws - http://ws.servlets.wssample.objectweb.org - - diff --git a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/xml/jonas-webservices.xml b/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/xml/jonas-webservices.xml deleted file mode 100644 index c69b1dda8bbb99cdf3ac780238416cac5698fd4d..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/xml/jonas-webservices.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - MyWebService - - - jaxrpcEndpoint1 - /endpoints/jaxrpc - - - encryptedEndpoint - /endpoints/encrypted - - - - diff --git a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/xml/web.xml b/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/xml/web.xml deleted file mode 100644 index fb7140f49ba138ad49f0362ec6a627df7c3517e9..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/xml/web.xml +++ /dev/null @@ -1,210 +0,0 @@ - - - - - WebServices packaged in WebApp Sample - - JaxRpcEndpoint1 Servlet - JaxRpcEndpoint1 - org.objectweb.wssample.servlets.ws.JaxRpcEndpoint - - - EncryptedJaxRpcEndpoint Servlet - EncryptedJaxRpcEndpoint - org.objectweb.wssample.servlets.ws.JaxRpcEndpoint - - - - JaxRpcEndpoint Test Servlet - JaxRpcEndpointTest - org.objectweb.wssample.servlets.wsclient.JOnASJaxRpcClientServlet - - - - JaxRpcEndpointTest - /jaxrpcTest.do - - - - service/jaxrpc - org.objectweb.wssample.gen.jaxrpc.JaxRpcEndpointInterfaceService - WEB-INF/wsdl/jaxrpcEndpoint.wsdl - WEB-INF/clientMapping.xml - - org.objectweb.wssample.gen.jaxrpc.JaxRpcEndpointInterface - wswarsample.war#jaxrpcEndpoint1 - - - - WSS4JHandler-UsernameToken - org.apache.ws.security.handler.WSS4JHandler - - - - - - - - action - UsernameToken - - - - - flow - request-only - - - - - - passwordCallbackClass - org.objectweb.wssample.security.ServerSideCallbackHandler - - - - - passwordType - PasswordDigest - - - - - - deployment - client - - - - - - JaxRpcEndpoint1 - - - - - service/crypted-jaxrpc - org.objectweb.wssample.gen.jaxrpc.JaxRpcEndpointInterfaceService - WEB-INF/wsdl/jaxrpcEndpoint.wsdl - WEB-INF/clientMapping.xml - - org.objectweb.wssample.gen.jaxrpc.JaxRpcEndpointInterface - wswarsample.war#encryptedEndpoint - - - - WSS4JHandler-Encryption - org.apache.ws.security.handler.WSS4JHandler - - - - - - - - - action - UsernameToken Encrypt - - - - - flow - request-only - - - - - - passwordCallbackClass - org.objectweb.wssample.security.ServerSideCallbackHandler - - - - - passwordType - PasswordDigest - - - - - - deployment - client - - - - - - mustUnderstand - true - - - - addUTElement - Nonce Created - - - - - - - encryptionPropFile - sample-crypto.properties - - - - encryptionKeyIdentifier - X509KeyIdentifier - - - - encryptionUser - jonas-ws - - - - encryptionParts - {Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}UsernameToken - - - - - - EncryptedJaxRpcEndpoint - - - - - - - Protected Area - - /jaxrpcTest.do - - DELETE - GET - POST - PUT - - - - ws-security - - - - - - BASIC - Example Basic Authentication Area - - - - - ws-security - - - diff --git a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/xml/webservices.xml b/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/xml/webservices.xml deleted file mode 100644 index c3bf0b44b46c159f78beb88f20047ed587702b98..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/xml/webservices.xml +++ /dev/null @@ -1,119 +0,0 @@ - - - MyWebServices - - MyWebService - WEB-INF/wsdl/jaxrpcEndpoint.wsdl - WEB-INF/jaxrpcEndpointMapping.xml - - jaxrpcEndpoint1 - servletswssample:JaxRpcEndpoint1 - org.objectweb.wssample.servlets.ws.JaxRpcEndpointInterface - - JaxRpcEndpoint1 - - - - WSS4JHandler - - org.apache.ws.security.handler.WSS4JHandler - - - - - - - action - UsernameToken - - - - flow - request-only - - - - - passwordCallbackClass - org.objectweb.wssample.security.ServerSideCallbackHandler - - - - deployment - server - - - - - - encryptedEndpoint - ws:EncryptedJaxRpcEndpoint - org.objectweb.wssample.servlets.ws.JaxRpcEndpointInterface - - EncryptedJaxRpcEndpoint - - - - WSS4JHandler - - org.apache.ws.security.handler.WSS4JHandler - - - - - - - action - UsernameToken Encrypt - - - - flow - request-only - - - - - passwordCallbackClass - org.objectweb.wssample.security.ServerSideCallbackHandler - - - - deployment - server - - - - - decryptionPropFile - sample-crypto.properties - - - - mustUnderstand - true - - - - encryptionUser - jonas-ws - - - - encryptionParts - {Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}UsernameToken - - - - encryptionKeyIdentifier - DirectReference - - - - - - diff --git a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/xml/wsdl/jaxrpcEndpoint.wsdl b/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/xml/wsdl/jaxrpcEndpoint.wsdl deleted file mode 100644 index 68966684a7fec54664c1ea7979b8b80881b01117..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/etc/xml/wsdl/jaxrpcEndpoint.wsdl +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/src/org/objectweb/wssample/gen/jaxrpc/JaxRpcEndpointInterface.java b/jonas_tests/examples/base/examples/webservices/webs/webendpoint/src/org/objectweb/wssample/gen/jaxrpc/JaxRpcEndpointInterface.java deleted file mode 100644 index 4f4ea1a6bfba5d69840a5c42838481bef036c02b..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/src/org/objectweb/wssample/gen/jaxrpc/JaxRpcEndpointInterface.java +++ /dev/null @@ -1,13 +0,0 @@ -/** - * JaxRpcEndpointInterface.java - * - * This file was auto-generated from WSDL - * by the Apache Axis 1.2RC2 Dec 15, 2004 (10:53:17 CET) WSDL2Java emitter. - */ - -package org.objectweb.wssample.gen.jaxrpc; - -public interface JaxRpcEndpointInterface extends java.rmi.Remote { - public java.lang.String sayHello(java.lang.String in0) throws java.rmi.RemoteException; - public int getCotes() throws java.rmi.RemoteException; -} diff --git a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/src/org/objectweb/wssample/gen/jaxrpc/JaxRpcEndpointInterfaceService.java b/jonas_tests/examples/base/examples/webservices/webs/webendpoint/src/org/objectweb/wssample/gen/jaxrpc/JaxRpcEndpointInterfaceService.java deleted file mode 100644 index 2c077c7234a0750b19e3594ab0da9642cacc9e65..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/src/org/objectweb/wssample/gen/jaxrpc/JaxRpcEndpointInterfaceService.java +++ /dev/null @@ -1,20 +0,0 @@ -/** - * JaxRpcEndpointInterfaceService.java - * - * This file was auto-generated from WSDL - * by the Apache Axis 1.2RC2 Dec 15, 2004 (10:53:17 CET) WSDL2Java emitter. - */ - -package org.objectweb.wssample.gen.jaxrpc; - -public interface JaxRpcEndpointInterfaceService extends javax.xml.rpc.Service { - public java.lang.String getJaxRpcEndpoint1Address(); - - public org.objectweb.wssample.gen.jaxrpc.JaxRpcEndpointInterface getJaxRpcEndpoint1() throws javax.xml.rpc.ServiceException; - - public org.objectweb.wssample.gen.jaxrpc.JaxRpcEndpointInterface getJaxRpcEndpoint1(java.net.URL portAddress) throws javax.xml.rpc.ServiceException; - - public org.objectweb.wssample.gen.jaxrpc.JaxRpcEndpointInterface getEncryptedJaxRpcEndpoint() throws javax.xml.rpc.ServiceException; - - public org.objectweb.wssample.gen.jaxrpc.JaxRpcEndpointInterface getEncryptedJaxRpcEndpoint(java.net.URL portAddress) throws javax.xml.rpc.ServiceException; -} diff --git a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/src/org/objectweb/wssample/security/ServerSideCallbackHandler.java b/jonas_tests/examples/base/examples/webservices/webs/webendpoint/src/org/objectweb/wssample/security/ServerSideCallbackHandler.java deleted file mode 100644 index c093be311493be60228120bb4105bd6447281398..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/src/org/objectweb/wssample/security/ServerSideCallbackHandler.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.objectweb.wssample.security; - -import java.io.IOException; -import java.io.InputStream; -import java.util.Properties; - -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.UnsupportedCallbackException; - -import org.apache.ws.security.WSPasswordCallback; - -/** - * WSS4J Sample CallbackHandler. It is intended to be used from a JOnAS server (servlet/ejb client & JAX-RPC/SSB endpoint). - * It will get the 'memrlm_1' instance and try to get the needed password from that JResource. - * - * @author Guillaume Sauthier - */ -public class ServerSideCallbackHandler implements CallbackHandler { - - /** - * encryptionUser value (used to access keystore - look in crypto.properties) - */ - private static final String ENCRYPTION_USER = "jonas-ws"; - - /** - * encryptionUser password : password used to access keystore - */ - private static final String ENCRYPTION_PASSWORD = "security"; - - /** - * File name which contains credentials - */ - private static final String CREDENTIALS_FILE_NAME = "credentials.properties"; - - /** - * @see javax.security.auth.callback.CallbackHandler#handle(javax.security.auth.callback.Callback[]) - */ - public void handle(Callback[] callbacks) throws IOException, - UnsupportedCallbackException { - for (int i = 0; i < callbacks.length; i++) { - if (callbacks[i] instanceof WSPasswordCallback) { - WSPasswordCallback pc = (WSPasswordCallback) callbacks[i]; - // set the password given a username - - if (!ENCRYPTION_USER.equals(pc.getIdentifer())) { - // Get hash password for this identifier - InputStream is = getClass().getResourceAsStream("/" + CREDENTIALS_FILE_NAME); - Properties props = new Properties(); - props.load(is); - String password = props.getProperty(pc.getIdentifer()); - // Set the password - pc.setPassword(password); - } else { - // this is the ecryption username - // we must return the correct password (stored in crypto.properties) - pc.setPassword(ENCRYPTION_PASSWORD); - } - - } else { - throw new UnsupportedCallbackException(callbacks[i], "Unrecognized Callback"); - } - } - } - -} diff --git a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/src/org/objectweb/wssample/servlets/ws/JaxRpcEndpoint.java b/jonas_tests/examples/base/examples/webservices/webs/webendpoint/src/org/objectweb/wssample/servlets/ws/JaxRpcEndpoint.java deleted file mode 100644 index 6477f880471caf44ce7829900af510bc8f01fae6..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/src/org/objectweb/wssample/servlets/ws/JaxRpcEndpoint.java +++ /dev/null @@ -1,83 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.objectweb.wssample.servlets.ws; - -import org.ow2.jonas.lib.util.Log; - -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; - -/** - * Service implementation of JaxRpcEndpointInterface. This class is a JaxRpc - * endpoint. It is declared in the web.xml. And it will run inside the web - * container. - * - * Notice that a default class constructor is REQUIRED. - * Notice that JaxRpcEndpoint does not implements JaxRpcEndpointInterface - * This is not a requirement. - * - * This JAXRPC service endpoint class may implements javax.xml.rpc.server.ServiceLifecycle - * interface. - * - * @see org.objectweb.wssample.servlets.ws.JaxRpcEndpointInterface - * - * @author Guillaume Sauthier - */ -public class JaxRpcEndpoint { - - /** - * return value of getCotes() - */ - private static final int GET_COTES_VALUE = 12; - - /** - * logger - */ - private static Logger logger = Log.getLogger("org.ow2.jonas.ws"); - - /** - * default constructor needed for JaxRpc Service Endpoint. - */ - public JaxRpcEndpoint() { - } - - /** - * @param name String to append to "Hello " - * @return Returns "Hello " + name - */ - public String sayHello(String name) { - logger.log(BasicLevel.INFO, "sayHello(" + name + ") invoked."); - return "Hello " + name; - } - - /** - * @return Returns an arbitrary integer - */ - public int getCotes() { - logger.log(BasicLevel.INFO, "getCotes() invoked."); - return GET_COTES_VALUE; - } - -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/src/org/objectweb/wssample/servlets/ws/JaxRpcEndpointInterface.java b/jonas_tests/examples/base/examples/webservices/webs/webendpoint/src/org/objectweb/wssample/servlets/ws/JaxRpcEndpointInterface.java deleted file mode 100644 index 44bca25b389a047bcbf1205bc7b528273eb148a2..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/src/org/objectweb/wssample/servlets/ws/JaxRpcEndpointInterface.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.objectweb.wssample.servlets.ws; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -/** - * The Service interface. - * Notice that it extends Remote and all methods are throwing RemoteException - * @see org.objectweb.wssample.servlets.ws.JaxRpcEndpoint - * @author Guillaume Sauthier - */ -public interface JaxRpcEndpointInterface extends Remote { - - /** - * @param name String to append to "Hello " - * @return Returns "Hello " + name - * @throws RemoteException required because of the Remote interface - */ - String sayHello(String name) throws RemoteException; - - /** - * @return Returns an arbitrary integer - * @throws RemoteException required because of the Remote interface - */ - int getCotes() throws RemoteException; -} diff --git a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/src/org/objectweb/wssample/servlets/wsclient/JOnASJaxRpcClientServlet.java b/jonas_tests/examples/base/examples/webservices/webs/webendpoint/src/org/objectweb/wssample/servlets/wsclient/JOnASJaxRpcClientServlet.java deleted file mode 100644 index 7ffc78f225c6dcd53318f52e8b2867d9bf7b8699..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/webservices/webs/webendpoint/src/org/objectweb/wssample/servlets/wsclient/JOnASJaxRpcClientServlet.java +++ /dev/null @@ -1,191 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.objectweb.wssample.servlets.wsclient; - -import java.io.IOException; -import java.io.PrintWriter; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.xml.rpc.ServiceException; -import javax.xml.rpc.Stub; - -import org.objectweb.wssample.gen.jaxrpc.JaxRpcEndpointInterface; -import org.objectweb.wssample.gen.jaxrpc.JaxRpcEndpointInterfaceService; - -/** - * @author Guillaume Sauthier - */ -public class JOnASJaxRpcClientServlet extends HttpServlet { - - /** - * Initializes the servlet. - * @param config ServletConfig - * @throws ServletException thrown by super.init(config); - */ - public void init(ServletConfig config) throws ServletException { - super.init(config); - } - - /** - * Destroys the servlet. - */ - public void destroy() { - - } - - /** - * Processes requests for both HTTP GET and POST - * methods. - * - * @param request servlet request - * @param response servlet response - * - * @throws ServletException default servlet exception thrown - * @throws IOException servlet exception thrown - */ - protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, - IOException { - response.setContentType("text/html"); - PrintWriter out = response.getWriter(); - - out.println(""); - out.println(""); - out.println("JOnAS JaxRpc WebService Test Page"); - out.println(""); - out.println(""); - out.println(""); - - out.println("
    "); - out.println("\"Jakarta"); - out.println("\"Mortbay"); - out.println("\"JOnAS"); - out.println("
    "); - - // do we need to use the encrypted endpoint or not ? - boolean encrypt = false; - if ("true".equalsIgnoreCase(request.getParameter("encrypt"))) { - encrypt = true; - } - - try { - - // Get the service instance - //--------------------------------------------- - Context ctx = new InitialContext(); - JaxRpcEndpointInterfaceService service = null; - JaxRpcEndpointInterface port = null; - - // We can use the same service because the 2 ws use the same interface - // Get the port where execute methods - - if (encrypt) { - service = (JaxRpcEndpointInterfaceService) ctx.lookup("java:comp/env/service/crypted-jaxrpc"); - //--------------------------------------------- - port = service.getEncryptedJaxRpcEndpoint(); - } else { - service = (JaxRpcEndpointInterfaceService) ctx.lookup("java:comp/env/service/jaxrpc"); - //--------------------------------------------- - port = service.getJaxRpcEndpoint1(); - } - - // Use the context username for WSS4JHandler - ((Stub) port)._setProperty("user", request.getUserPrincipal().getName()); - - // Execute Methods : - String hello = port.sayHello(request.getParameter("name")); - int cotes = port.getCotes(); - - if (encrypt) { - out.println("
    Results With Encryption
    "); - } else { - out.println("
    Results
    "); - } - out.println("
    "); - - // Display results : - out.println("Working with URL : " + ((Stub) port)._getProperty(Stub.ENDPOINT_ADDRESS_PROPERTY) - + "
    "); - out.println("result of sayHello(name) method :" + hello + "
    "); - out.println("result of getCotes() method :" + cotes + "
    "); - - out.println("
    "); - } catch (ServiceException se) { - out.println("
    Something goes wrong when calling the WebService
    "); - se.printStackTrace(out); - out.println("
    "); - } catch (NamingException ne) { - out.println("
    Exception while retrieving InitialContext
    "); - ne.printStackTrace(out); - out.println("
    "); - } - - out.println(""); - out.println(""); - - out.close(); - } - - /** - * Handles the HTTP GET method. - * - * @param request servlet request - * @param response servlet response - * - * @throws ServletException default servlet exception thrown - * @throws IOException default servlet exception thrown - */ - protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - processRequest(request, response); - } - - /** - * Handles the HTTP POST method. - * - * @param request servlet request - * @param response servlet response - * - * @throws ServletException default servlet exception thrown - * @throws IOException default servlet exception thrown - */ - protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, - IOException { - processRequest(request, response); - } - - /** - * @return Returns a short description of the servlet. - */ - public String getServletInfo() { - return "Short description"; - } - -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/xdoclet/ClientCustomer.java b/jonas_tests/examples/base/examples/xdoclet/ClientCustomer.java deleted file mode 100644 index f930ff7b21295cefaf976d671aa8ba1978aa80b7..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/xdoclet/ClientCustomer.java +++ /dev/null @@ -1,154 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package xdoclet; - -import java.io.BufferedReader; -import java.io.FileInputStream; -import java.io.InputStreamReader; -import java.io.IOException; -import java.rmi.RemoteException; -import java.util.Collection; -import java.util.Iterator; -import java.util.Hashtable; -import java.util.Properties; -import javax.ejb.FinderException; -import javax.ejb.RemoveException; -import javax.transaction.UserTransaction; -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.rmi.PortableRemoteObject; -import xdoclet.CustomerHomeRemote; -import xdoclet.CustomerRemote; - -/** - * Sample for entity beans CMP2 xdoclet - */ - -public class ClientCustomer { - - private static UserTransaction utx = null; - - private static void PrintAllCustomerAndPhones(CustomerHomeRemote h) { - Iterator alist; - CustomerRemote customer; - String phone; - try { - utx.begin(); // faster if made inside a Tx - alist = h.findAllCustomers().iterator(); - while (alist.hasNext()) { - customer = (CustomerRemote) alist.next(); - System.out.println("Customer name is :" + customer.getLastName() + " " + customer.getFirstName()); - Iterator phonelist = customer.getPhoneList().iterator(); - while (phonelist.hasNext()) { - phone = (String) phonelist.next(); - System.out.println("Phone number is: " + phone); - } - } - utx.commit(); - } catch (Exception e) { - System.err.println("Exception getting all Customer phone list: " + e); - System.exit(2); - } - } - - public static void main(String[] args) { - - String beanName = "CustomerBeanHome"; - - // get JNDI initial context - Context initialContext = null; - try { - initialContext = new InitialContext(); - } catch (Exception e) { - System.err.println("Cannot get initial context for JNDI: " + e); - System.exit(2); - } - - // We want to start transactions from client: get UserTransaction - System.out.println("Getting a UserTransaction object from JNDI"); - try { - - // Comment the following lines if you want to use a David Client: - utx = (UserTransaction) initialContext.lookup("javax.transaction.UserTransaction"); - - } catch (Exception e) { - System.err.println("Cannot lookup UserTransaction: " + e); - System.exit(2); - } - - // Connecting to Home thru JNDI - System.out.println("Connecting to the CustomerHome"); - CustomerHomeRemote home = null; - try { - home = (CustomerHomeRemote) PortableRemoteObject.narrow(initialContext.lookup(beanName), - CustomerHomeRemote.class); - } catch (Exception e) { - System.err.println("Cannot lookup " + beanName + ": " + e); - System.exit(2); - } - - // List existing customer - System.out.println("Getting the list of existing Customer in database"); - PrintAllCustomerAndPhones(home); - - // Create a first customer - System.out.println("Creating a new customer in database"); - CustomerRemote c1 = null; - try { - c1 = home.create(new Integer(1), new Name("jerome", "camilleri")); - } catch (Exception e) { - System.err.println("Cannot create Customer: " + e); - System.exit(2); - } - - // Add phone number - try { - c1.addPhoneNumber("0476254717", (byte) 0); - c1.addPhoneNumber("0625785511", (byte) 0); - } catch (Exception e) { - System.out.println("Problem during add phone number"); - e.printStackTrace(System.out); - } - // List existing customer - System.out.println("Getting the list of customer with Phone number in database"); - PrintAllCustomerAndPhones(home); - - // Delete Account2 - System.out.println("Removing Customer and phone previously created in database"); - try { - c1.removePhoneNumber((byte) 0); - c1.remove(); - } catch (Exception e) { - System.err.println("exception during remove: " + e); - System.exit(2); - } - - // Exit program - System.out.println("ClientCustomer terminated"); - } - -} - diff --git a/jonas_tests/examples/base/examples/xdoclet/CustomerBean.java b/jonas_tests/examples/base/examples/xdoclet/CustomerBean.java deleted file mode 100644 index 91756f811b66f084e83c6a0f47129f1472661efa..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/xdoclet/CustomerBean.java +++ /dev/null @@ -1,262 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package xdoclet; - -import java.rmi.RemoteException; -import javax.ejb.EntityBean; -import javax.ejb.EntityContext; -import javax.ejb.ObjectNotFoundException; -import javax.ejb.RemoveException; -import javax.ejb.CreateException; -import javax.ejb.EJBException; -import java.util.Date; -import java.util.Collection; -import java.util.Iterator; -import java.util.Vector; -import javax.naming.InitialContext; -import javax.naming.NamingException; -/** - * CustomerBean is an entity bean with "container managed persistence version 2". - * The state of an instance is stored into a relational database. - * - * @ejb.bean - * name="CustomerBean" - * description="Deployment descriptor for the CustomerBean bean with CMP2 JOnAS example" - * type="CMP" - * view-type="both" - * primkey-field="id" - * jndi-name="CustomerBeanHome" - * cmp-version="2.x" - * reentrant="false" - * @ejb.home - * remote-class="xdoclet.CustomerHomeRemote" - * local-class="xdoclet.CustomerHomeLocal" - * @ejb.interface - * remote-class="xdoclet.CustomerRemote" - * local-class="xdoclet.CustomerLocal" - * @ejb:pk - * class="java.lang.Integer" - * @ejb.ejb-ref - * ejb-name="PhoneBean" - * view-type="local" - * ref-name="ejb/PhoneHomeLocal" - * - * @jonas.jdbc-mapping - * jdbc-table-name = "MyCustomer" - * - * @ejb:finder - * signature= "java.util.Collection findByName(java.lang.String lastName, java.lang.String firstName)" - * query ="SELECT OBJECT(c) FROM CustomerBean c WHERE c.lastName LIKE ?1 AND c.firstName LIKE ?2" - * @ejb:finder - * signature= "java.util.Collection findAllCustomers()" - * query ="SELECT OBJECT(c) FROM CustomerBean AS c" - * - * @jonas.session-timeout - * session-timeout="60" - * @ejb:transaction - * type="Required" - */ -public abstract class CustomerBean implements EntityBean { - - // Keep the reference on the EntityContext - protected EntityContext entityContext; - - /** - * EJBCREATE - * @return pk primary key set to null - * - * @ejb.create-method - */ - public Integer ejbCreate(Integer id, Name name) - throws CreateException { - setLastName(name.getLastName()); - setFirstName(name.getFirstName()); - - // Init object state - this.setId(id); - return null; - } - - public void ejbPostCreate(Integer id, Name name) {} - - // business methods - /** - * @ejb.interface-method - * - **/ - public Name getName() { - Name name = new Name(getLastName(),getFirstName()); - return name; - } - /** - * @ejb.interface-method - **/ - public void setName(Name name) { - setLastName(name.getLastName()); - setFirstName(name.getFirstName()); - } - - - /** - * @ejb.interface-method - **/ - public void addPhoneNumber(String number, byte type) throws NamingException, CreateException { - InitialContext jndiEnc = new InitialContext(); - PhoneHomeLocal phoneHomeL = (PhoneHomeLocal) (jndiEnc.lookup("java:comp/env/ejb/PhoneHomeLocal")); - - PhoneLocal phone = phoneHomeL.create(number, type); - Collection phoneNumbers = this.getPhoneNumber(); - phoneNumbers.add(phone); - } - - /** - * @ejb.interface-method - **/ - public void removePhoneNumber(byte typeToRemove) { - Collection phoneNumbers = this.getPhoneNumber(); - Iterator iterator = phoneNumbers.iterator(); - - while (iterator.hasNext()) { - PhoneLocal phone = (PhoneLocal) iterator.next(); - if (phone.getType() == typeToRemove) { - phoneNumbers.remove(phone); - try { - phone.remove(); - } catch (Exception e) { - System.out.println("Problem during removing phone"); - } - } - - } - } - - /** - * @ejb.interface-method - **/ - public void updatePhoneNumber(String number, byte typeToUpdate) { - Collection phoneNumbers = this.getPhoneNumber(); - Iterator iterator = phoneNumbers.iterator(); - while (iterator.hasNext()) { - PhoneLocal phone = (PhoneLocal) iterator.next(); - if (phone.getType() == typeToUpdate) { - phone.setNumber(number); - break; - } - } - } - - /** - * @ejb.interface-method - **/ - public Vector getPhoneList() { - - Vector vv = new Vector(); - Collection phoneNumbers = this.getPhoneNumber(); - - Iterator iterator = phoneNumbers.iterator(); - while (iterator.hasNext()) { - PhoneLocal phone = (PhoneLocal) iterator.next(); - String ss = "Type=" + phone.getType() + " Number=" + phone.getNumber(); - vv.add(ss); - } - return vv; - } - - // persistent relationships - /** - * @ejb.relation - * name="CUSTOMER-PHONE" - * role-name="PHONE-has-CUSTOMER" - * target-ejb="PhoneBean" - * target-role-name="CUSTOMER-has-PHONE" - * - * @jonas.field-mapping - * foreign-key-jdbc-name="CUSTOMER_FK_PHONE" - * key-jdbc-name="CustomerId" - **/ - public abstract Collection getPhoneNumber( ); - public abstract void setPhoneNumber(Collection phones); - - // abstract accessor methods - /** - * @ejb.persistent-field - * @ejb.interface-method - * @jonas.cmp-field-jdbc-mapping - * field-name="id" - * jdbc-field-name="CustomerId" - */ - public abstract Integer getId(); - - /** - * @ejb.persistent-field - * @ejb.interface-method - */ - public abstract void setId(Integer id); - /** - * @ejb.persistent-field - * @ejb.interface-method - */ - public abstract String getLastName( ); - /** - * @ejb.persistent-field - * @ejb.interface-method - */ - public abstract void setLastName(String lname); - - /** - * @ejb.persistence - * column-name="CustomerFirstName" - * jdbc-type="VARCHAR" - * @ejb.persistent-field - * @ejb.interface-method - */ - public abstract String getFirstName( ); - /** - * @ejb.persistent-field - * @ejb.interface-method - */ - public abstract void setFirstName(String fname); - - // standard call back methods - - public void ejbActivate() {} - public void ejbLoad() {} - public void ejbPassivate() {} - public void ejbRemove() throws RemoveException {} - - public void ejbStore() {} - - - public void setEntityContext(EntityContext ctx) { - - // Keep the entity context in object - entityContext = ctx; - } - - public void unsetEntityContext() { - entityContext = null; - } - -} diff --git a/jonas_tests/examples/base/examples/xdoclet/Name.java b/jonas_tests/examples/base/examples/xdoclet/Name.java deleted file mode 100644 index 4faa7469ca32eec470eaa9db99798acb08d7efca..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/xdoclet/Name.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package xdoclet; - -public class Name implements java.io.Serializable { - - private String lastName; - - private String firstName; - - public Name(String lname, String fname) { - lastName = lname; - firstName = fname; - } - - public String getLastName() { - return lastName; - } - - public String getFirstName() { - return firstName; - } -} \ No newline at end of file diff --git a/jonas_tests/examples/base/examples/xdoclet/PhoneBean.java b/jonas_tests/examples/base/examples/xdoclet/PhoneBean.java deleted file mode 100644 index 66c64b9aed6b7ea8fa27ba28060b9679a8a54448..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/xdoclet/PhoneBean.java +++ /dev/null @@ -1,114 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2004 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package xdoclet; - -import javax.ejb.EntityContext; -import java.util.Date; -import javax.naming.InitialContext; -import javax.naming.NamingException; -/** - * PhoneBean is an entity bean with "container managed persistence version 2". - * The state of an instance is stored into a relational database. - * - * @ejb.bean - * name="PhoneBean" - * description="Deployment descriptor for the PhoneBean bean with CMP2 JOnAS example" - * type="CMP" - * view-type="local" - * jndi-name="PhoneBeanHome" - * cmp-version="2.x" - * reentrant="false" - * @ejb.home - * local-class="xdoclet.PhoneHomeLocal" - * @ejb.interface - * local-class="xdoclet.PhoneLocal" - * @ejb:pk - * class="java.lang.Object" - * @jonas.jdbc-mapping - * automatic-pk-field-name="pkphone" - * @ejb:finder - * signature= "java.util.Collection findAllPhones()" - * query ="SELECT OBJECT(o) FROM PhoneBean o" - * @jonas.session-timeout - * session-timeout="60" - * @ejb:transaction type="Required" - */ - -public abstract class PhoneBean implements javax.ejb.EntityBean { - - /** - * EJBCREATE - * @return pk primary key set to null - * - * @ejb.create-method - */ - public Object ejbCreate( String number, byte type) throws javax.ejb.CreateException { - setNumber(number); - setType(type); - return null; - } - - public void ejbPostCreate(String number, byte type) { - System.out.println("PhoneBean ejbPostCreate number= "+number); - } - - - - /** - * @ejb.persistent-field - * @ejb.interface-method - * @jonas.cmp-field-jdbc-mapping - * field-name="number" - * jdbc-field-name="PhoneNumber" - */ - public abstract String getNumber(); - /** - * @ejb.persistent-field - * @ejb.interface-method - */ - public abstract void setNumber(String number); - /** - * @ejb.persistent-field - * @ejb.interface-method - */ - public abstract byte getType(); - /** - * @ejb.persistent-field - * @ejb.interface-method - */ - public abstract void setType(byte type); - - // standard call back methods - - public void setEntityContext(EntityContext ec){} - public void unsetEntityContext(){} - public void ejbLoad(){} - public void ejbStore(){} - public void ejbActivate(){} - public void ejbPassivate(){} - public void ejbRemove() throws javax.ejb.RemoveException{} - -} diff --git a/jonas_tests/examples/base/examples/xdoclet/README b/jonas_tests/examples/base/examples/xdoclet/README deleted file mode 100644 index ece9448495dd9ac634ec85838722b1994cf3adcb..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/xdoclet/README +++ /dev/null @@ -1,131 +0,0 @@ -Copyright (C) BULL S.A. 1998-2002 - -Please read How to configure and use xdoclet for JOnAS at : -http://jonas.objectweb.org/current/doc/howto/howtoXdoclet.html - -Entity beans "Customer-Phone" for xdoclet ------------------------------------------ -CustomerBean entity bean with CMP2 persistance and relationship (CustomerBean--1------------n-->PhoneBean) -PhoneBean entity bean with CMP2 persitance - -this directory contains initially only this files : -build.xml : the build which contain target for xdoclet and jonas compilation -build.properties : properties for jonas target -CustomerBean.java : Bean class with xdoclet tag -PhoneBean.java : Bean class with xdoclet tag -Name.java : Utilities class -ClientCustomer.java : Client -README : - -Generated this example with xdoclet: ------------------------------------ -Using default target (install) ; - -You should have this return : -ejbdoclet: -[ejbdoclet] Dec 15, 2004 2:39:04 PM xdoclet.XDocletMain start -[ejbdoclet] INFO: Running -[ejbdoclet] Generating Remote interface for 'xdoclet.CustomerBean'. -[ejbdoclet] Dec 15, 2004 2:39:04 PM xdoclet.XDocletMain start -[ejbdoclet] INFO: Running -[ejbdoclet] Generating Local interface for 'xdoclet.CustomerBean'. -[ejbdoclet] Generating Local interface for 'xdoclet.PhoneBean'. -[ejbdoclet] Dec 15, 2004 2:39:04 PM xdoclet.XDocletMain start -[ejbdoclet] INFO: Running -[ejbdoclet] Generating Home interface for 'xdoclet.CustomerBean'. -[ejbdoclet] Dec 15, 2004 2:39:04 PM xdoclet.XDocletMain start -[ejbdoclet] INFO: Running -[ejbdoclet] Generating Local Home interface for 'xdoclet.CustomerBean'. -[ejbdoclet] Generating Local Home interface for 'xdoclet.PhoneBean'. -[ejbdoclet] Dec 15, 2004 2:39:05 PM xdoclet.XDocletMain start -[ejbdoclet] INFO: Running -[ejbdoclet] Generating EJB deployment descriptor (ejb-jar.xml). -[ejbdoclet] Dec 15, 2004 2:39:05 PM xdoclet.XDocletMain start -[ejbdoclet] INFO: Running -[ejbdoclet] Dec 15, 2004 2:39:05 PM xdoclet.TemplateSubTask engineStarted -[ejbdoclet] INFO: Generating output 'jonas-ejb-jar.xml' using template file 'jar:file:/home/camillej/MyJonas/JONAS_4_2/lib/examples/xdoclet-objectweb-module-1.2.2.jar!/xdoclet/modules/objectweb/jonas/ejb/resources/jonas.xdt'. - -compile: - [javac] Compiling 10 source files to /home/camillej/MyJonas/JONAS_4_2/examples/classes - -jonasejbjar: - [ejbjar] building xdoclet.jar with 11 files - [genic] GenIC for JOnAS 4.2.2: 'CustomerBean', 'PhoneBean' generation ... - [genic] Stubs and Skels successfully generated for rmi/jrmp - -install: - [copy] Copying 1 file to /home/camillej/MyJonas/JONAS_4_2/ejbjars - - -9 files must be generated into the current directory : - CustomerRemote.java - CustomerLocal.java - CustomerHomeRemote.java - PhoneLocal.java - PhoneHomeLocal.java - PhoneBean.java - CustomerHomeLocal.java - jonas-ejb-jar.xml - ej-jar.xml - -Compiling this example: ------------------------ -ant install - - -Running this example: ---------------------- -Your database access should be configured: a properties files defining a - Datasource object should be defined in $JONAS_BASE/conf (e.g. InstantDB1.properties), - and the property jonas.service.dbm.datasources of the jonas.properties file should - be set to the name of this datasource description file (e.g. InstantDB1). See JOnAS - documentation for more details. - -1) Run an EJB Server to make beans available to clients: - -on UNIX or Windows - - jonas start - -2) Load xdoclet.jar if you have not added it in the ejb vice descriptors list: - - jonas admin -a $JONAS_BASE/ejbjars/xdoclet.jar - -You should see something like this when the bean is loaded : - ... -2003-03-07 13:50:24,112 : JContainer.addBean : CustomerBean is loaded and using rdb.mysql -2003-03-07 13:50:24,112 : JContainer.addBean : CustomerBean available -2003-03-07 13:50:24,622 : JContainer.addBean : PhoneBean is loaded and using rdb.mysql -2003-03-07 13:50:24,622 : JContainer.addBean : PhoneBean available -2003-03-07 13:50:24,662 : ServiceManager.startServices : ejb service started - -3) Run the client program: - -on UNIX: - jclient -cp $JONAS_BASE/ejbjars/xdoclet.jar xdoclet.ClientCustomer - -On Windows: - jclient -cp "%JONAS_BASE%\ejbjars\xdoclet.jar" xdoclet.ClientCustomer - -In fact, the "-cp" option is not useful here, because classes are found in the CLASSPATH. - -You should see something like this when the client is run : - -Getting a UserTransaction object from JNDI -Connecting to the CustomerHome -Getting the list of existing Customer in database -Creating a new customer in database -PhoneBean ejbPostCreate number= 0476254717ID = 0 -PhoneBean ejbPostCreate number= 0625785511ID = 1 -Getting the list of customer with Phone number in database -Customer name is :jerome camilleri -Phone number is:Type=0 Number=0476254717 -Phone number is:Type=0 Number=0625785511 -Removing Customer and phone previously created in database -ClientCustomer terminated - -At the end of the test all bean are removed. - -4) Stop the jonas server - jonas stop - diff --git a/jonas_tests/examples/base/examples/xdoclet/build.xml b/jonas_tests/examples/base/examples/xdoclet/build.xml deleted file mode 100644 index ce8157ca2a142ea45902a28748cbe17f88da38cf..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/base/examples/xdoclet/build.xml +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/base/examples/xdoclet/lib/xdoclet-1.2.2.jar b/jonas_tests/examples/base/examples/xdoclet/lib/xdoclet-1.2.2.jar deleted file mode 100644 index a5a2764441976e2e0d8a26bdb3ece84e87ac4146..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/xdoclet/lib/xdoclet-1.2.2.jar and /dev/null differ diff --git a/jonas_tests/examples/base/examples/xdoclet/lib/xdoclet-apache-module-1.2.2.jar b/jonas_tests/examples/base/examples/xdoclet/lib/xdoclet-apache-module-1.2.2.jar deleted file mode 100644 index 784cfb1d5a453b2d3ea67c9e6aa27aea754a4441..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/xdoclet/lib/xdoclet-apache-module-1.2.2.jar and /dev/null differ diff --git a/jonas_tests/examples/base/examples/xdoclet/lib/xdoclet-ejb-module-1.2.2.jar b/jonas_tests/examples/base/examples/xdoclet/lib/xdoclet-ejb-module-1.2.2.jar deleted file mode 100644 index 8692fd538eaa435e43d9bc6fdb70beff1f3ccbaf..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/xdoclet/lib/xdoclet-ejb-module-1.2.2.jar and /dev/null differ diff --git a/jonas_tests/examples/base/examples/xdoclet/lib/xdoclet-exolab-module-1.2.2.jar b/jonas_tests/examples/base/examples/xdoclet/lib/xdoclet-exolab-module-1.2.2.jar deleted file mode 100644 index 4dcaea39a13bd9211dec2e77005a181109c0e81f..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/xdoclet/lib/xdoclet-exolab-module-1.2.2.jar and /dev/null differ diff --git a/jonas_tests/examples/base/examples/xdoclet/lib/xdoclet-objectweb-module-1.2.2.jar b/jonas_tests/examples/base/examples/xdoclet/lib/xdoclet-objectweb-module-1.2.2.jar deleted file mode 100644 index ce9f35e76b7e774fe888420c2629996e7d85fbcb..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/xdoclet/lib/xdoclet-objectweb-module-1.2.2.jar and /dev/null differ diff --git a/jonas_tests/examples/base/examples/xdoclet/lib/xdoclet-web-module-1.2.2.jar b/jonas_tests/examples/base/examples/xdoclet/lib/xdoclet-web-module-1.2.2.jar deleted file mode 100644 index 47e6cd4d871fc102620caa0332e0690e54342082..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/xdoclet/lib/xdoclet-web-module-1.2.2.jar and /dev/null differ diff --git a/jonas_tests/examples/base/examples/xdoclet/lib/xjavadoc-1.1.jar b/jonas_tests/examples/base/examples/xdoclet/lib/xjavadoc-1.1.jar deleted file mode 100644 index ee0520535ffcae5e5167d57b2090e3652892a64d..0000000000000000000000000000000000000000 Binary files a/jonas_tests/examples/base/examples/xdoclet/lib/xjavadoc-1.1.jar and /dev/null differ diff --git a/jonas_tests/examples/build.xml b/jonas_tests/examples/build.xml deleted file mode 100644 index f8dd1e5f5ea0338c76af64955f3f4aadae44bbaf..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/build.xml +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/alarm/C_alarm.java b/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/alarm/C_alarm.java deleted file mode 100644 index eb193ecdf7ae3b94c882f2edb934aa474352d025..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/alarm/C_alarm.java +++ /dev/null @@ -1,239 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.examples.clients.alarm; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.examples.util.JExampleTestCase; - -import com.meterware.httpunit.AuthorizationRequiredException; -import com.meterware.httpunit.TableCell; -import com.meterware.httpunit.WebForm; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - -/** - * Define a class to test the Alarm example - * Test authentication, generate alarm and process alarms - * @author Florent Benoit - */ -public class C_alarm extends JExampleTestCase { - - - /** - * URL of the alarm index - */ - private static final String URL_ALARM = "/alarm/secured/list.jsp"; - - /** - * URL of the list of alarms - */ - private static final String URL_ALARM_LIST = "/alarm/secured/setfilter.jsp?profil=all-I"; - - /** - * URL of the alarm generator - */ - private static final String URL_ALARM_GENERATE = "/alarm/generator.html"; - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new C_alarm(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(C_alarm.class); - } - - /** - * Setup need for these tests - * alarm is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - useEar("alarm"); - } - - /** - * Constructor with a specified name - * @param s name - */ - public C_alarm(String s) { - super(s, URL_ALARM); - } - - - /** - * Try to log in without authentication - * @throws Exception if an error occurs - */ - public void testTryWithoutAuth() throws Exception { - try { - WebResponse wr = wc.getResponse(url); - fail("Alarm is not protected"); - } catch (AuthorizationRequiredException e) { - ; - } - } - - /** - * Try to authenticate with a bad login/password - * @throws Exception if an error occurs - */ - public void testTryWithBadAuth() throws Exception { - try { - wc.setAuthorization("bad", "bad"); - WebResponse wr = wc.getResponse(url); - fail("Alarm is not protected"); - } catch (AuthorizationRequiredException e) { - ; - } - } - - /** - * Try to authenticate with a right login/password (jetty) - * @throws Exception if an error occurs - */ - public void testTryWithJettyAuth() throws Exception { - try { - wc.setAuthorization("jetty", "jetty"); - WebResponse wr = wc.getResponse(url); - } catch (AuthorizationRequiredException e) { - fail("Alarm don't accept l/p jetty/jetty"); - } - } - - /** - * Try to authenticate with a right login/password (tomcat) - * @throws Exception if an error occurs - */ - public void testTryWithTomcatAuth() throws Exception { - try { - wc.setAuthorization("tomcat", "tomcat"); - WebResponse wr = wc.getResponse(url); - } catch (AuthorizationRequiredException e) { - fail("Alarm don't accept l/p tomcat/tomcat"); - } - } - /** - * Try to generate alarms. One of each kind of alarm (severe, informative, warning) - * @throws Exception if an error occurs - */ - public void testGenerateAlarms() throws Exception { - try { - wc.setAuthorization("tomcat", "tomcat"); - WebResponse wr = wc.getResponse(getAbsoluteUrl(URL_ALARM_GENERATE)); - - WebForm[] webForms = wr.getForms(); - - WebForm webForm = webForms[0]; - assertNotNull("There must be a form in the html page", webForm); - - String[] levels = new String[] {"S", "W", "I"}; - - for (int i = 0; i < 3; i++) { - webForm.setParameter("message", "Automatic test" + i); - webForm.setParameter("device", "aut" + i); - webForm.setParameter("level", levels[i]); - WebResponse wFormRes = webForm.submit(); - String txt = wFormRes.getText(); - if (txt.indexOf("Message sent") == -1) { - fail("The alarm was not generated : " + txt); - } - } - - } catch (AuthorizationRequiredException e) { - fail("Alarm don't accept l/p tomcat/tomcat"); - } - } - - /** - * Try to process all alarms which were generated - * @throws Exception if an error occurs - */ - public void testProcessAlarms() throws Exception { - try { - // Wait a little if the previous alarms were not generated - Thread.sleep(1000); - - wc.setAuthorization("tomcat", "tomcat"); - WebResponse wr = wc.getResponse(getAbsoluteUrl(URL_ALARM_LIST)); - WebTable[] webTables = wr.getTables(); - - WebTable wTable = webTables[1]; - assertNotNull("There must be a table in the html page", wTable); - - int rows = wTable.getRowCount(); - int cols = wTable.getColumnCount(); - - assertEquals("The tables must have 6 columns", 6, cols); - - // For each alarm - for (int i = 1; i < rows; i++) { - TableCell tableCell = wTable.getTableCell(i, cols - 1); - assertNotNull("There must be a cell in this row", tableCell); - WebLink[] links = tableCell.getLinks(); - assertNotNull("There must have links in this cell", links); - for (int l = 0; l < links.length; l++) { - links[l].click(); - } - } - - //Now check alarms are empty (rows = 1) - wr = wc.getResponse(getAbsoluteUrl(URL_ALARM_LIST)); - webTables = wr.getTables(); - wTable = webTables[1]; - rows = wTable.getRowCount(); - assertEquals(1, rows); - - } catch (AuthorizationRequiredException e) { - fail("Authentication failed"); - } - } -} diff --git a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/cmp2/C_cmp2.java b/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/cmp2/C_cmp2.java deleted file mode 100644 index 92d3d813fe3b73fd604cb1fe52aef97ecdc8526b..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/cmp2/C_cmp2.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.examples.clients.cmp2; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.examples.util.JExampleTestCase; - -import com.meterware.httpunit.WebForm; -import com.meterware.httpunit.WebResponse; - -/** - * Define a class to test the cmp2 example - * Test the three servlet are ok - * @author Philippe Coq - */ -public class C_cmp2 extends JExampleTestCase { - - /** - * URL of the cmp2 page - */ - private static final String URL_EARCMP2 = "/cmp2"; - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new C_cmp2(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(C_cmp2.class); - } - - /** - * Setup need for these tests - * cmp2 is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - useEar("cmp2"); - } - - /** - * Constructor with a specified name - * @param s name - */ - public C_cmp2(String s) { - super(s, URL_EARCMP2); - } - - /** - * Test the examples showing 1-to-1 relationship - * @throws Exception if an error occurs - */ - public void testFirstServlet() throws Exception { - - WebResponse wr = wc.getResponse(url); - - WebForm[] webForms = wr.getForms(); - WebForm webForm = webForms[0]; - assertNotNull("There must be a form in the html page", webForm); - WebResponse wFormRes = webForm.submit(); - String txt = wFormRes.getText(); - if (txt.indexOf("Servlet is OK.") == -1) { - fail("The example was not ok : " + txt); - } - } - - - /** - * Test the examples showing n-to-1 1-to-n relationship - * @throws Exception if an error occurs - */ - public void testSecondServlet() throws Exception { - - WebResponse wr = wc.getResponse(url); - - WebForm[] webForms = wr.getForms(); - WebForm webForm = webForms[1]; - assertNotNull("There must be a form in the html page", webForm); - WebResponse wFormRes = webForm.submit(); - String txt = wFormRes.getText(); - if (txt.indexOf("Servlet is OK.") == -1) { - fail("The example was not ok : " + txt); - } - } - - /** - * Test the examples using EJB-QL - * @throws Exception if an error occurs - */ - public void testThirdServlet() throws Exception { - - WebResponse wr = wc.getResponse(url); - - WebForm[] webForms = wr.getForms(); - WebForm webForm = webForms[2]; - assertNotNull("There must be a form in the html page", webForm); - WebResponse wFormRes = webForm.submit(); - String txt = wFormRes.getText(); - if (txt.indexOf("Servlet is OK.") == -1) { - fail("The example was not ok : " + txt); - } - } - -} diff --git a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/earsample/C_earsample.java b/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/earsample/C_earsample.java deleted file mode 100644 index 2f11320a9de1ba55da968ed2d809c03d99fd48af..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/earsample/C_earsample.java +++ /dev/null @@ -1,169 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.examples.clients.earsample; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.examples.util.JExampleTestCase; - -import com.meterware.httpunit.AuthorizationRequiredException; -import com.meterware.httpunit.WebResponse; - -/** - * Define a class to test the Alarm example - * Test authentication, and check the sample is ok - * @author Florent Benoit - */ -public class C_earsample extends JExampleTestCase { - - /** - * URL of the earsample page - */ - private static final String URL_EARSAMPLE = "/earsample/secured/Op"; - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new C_earsample(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(C_earsample.class); - } - - /** - * Setup need for these tests - * earsample is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - useEar("earsample"); - } - - /** - * Constructor with a specified name - * @param s name - */ - public C_earsample(String s) { - super(s, URL_EARSAMPLE); - } - - /** - * Try to log in without authentication - * @throws Exception if an error occurs - */ - public void testTryWithoutAuth() throws Exception { - try { - WebResponse wr = wc.getResponse(url); - fail("earsample is not protected"); - } catch (AuthorizationRequiredException e) { - ; - } - } - - /** - * Try to authenticate with a bad login/password - * @throws Exception if an error occurs - */ - public void testTryWithBadAuth() throws Exception { - try { - wc.setAuthorization("bad", "bad"); - WebResponse wr = wc.getResponse(url); - fail("earsample is not protected"); - } catch (AuthorizationRequiredException e) { - ; - } - } - - /** - * Try to authenticate with a right login/password (jetty) - * @throws Exception if an error occurs - */ - public void testTryWithJettyAuth() throws Exception { - try { - wc.setAuthorization("jetty", "jetty"); - WebResponse wr = wc.getResponse(url); - } catch (AuthorizationRequiredException e) { - fail("earsample don't accept l/p jetty/jetty"); - } - } - - /** - * Try to authenticate with a right login/password (tomcat) - * @throws Exception if an error occurs - */ - public void testTryWithTomcatAuth() throws Exception { - try { - wc.setAuthorization("tomcat", "tomcat"); - WebResponse wr = wc.getResponse(url); - } catch (AuthorizationRequiredException e) { - fail("earsample don't accept l/p tomcat/tomcat"); - } - } - - /** - * Check if the sample is OK. Analyze response - * @throws Exception if an error occurs - */ - public void testIsSampleOk() throws Exception { - try { - wc.setAuthorization("tomcat", "tomcat"); - WebResponse wr = wc.getResponse(url); - String txt = wr.getText(); - - if (txt.indexOf("Sample is OK.") == -1) { - fail("The example was not ok : " + txt); - } - - } catch (AuthorizationRequiredException e) { - fail("Authentication failed"); - } - } - - -} diff --git a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/eb/C_eb.java b/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/eb/C_eb.java deleted file mode 100644 index 54fcd48d72b89721ffedc421b248ebab51c412a2..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/eb/C_eb.java +++ /dev/null @@ -1,189 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.examples.clients.eb; - -import java.lang.reflect.InvocationTargetException; -import junit.framework.*; - -import org.objectweb.jonas.examples.util.JExampleTestCase; -import org.objectweb.jonas.examples.util.JPrintStream; -import org.objectweb.jonas.examples.util.NoExitSecurityManager; - -/** - * Define a class to test the eb example - * Test the client of eb example (Check if the text is "ClientAccount terminated") - * - test case of AccountImplHome - * - test case of AccountExplHome - * @author Florent Benoit - */ -public class C_eb extends JExampleTestCase { - - - /** - * Class of the eb.client - */ - private static final String CLIENT_CLASS = "eb.ClientAccount"; - - /** - * Text to check - */ - private static final String CLIENT_OK_TXT = "ClientAccount terminated" ; - - /** - * Impl EJB1.x - */ - private static final String ACC_IMPL = "AccountImplHome"; - - /** - * Impl EJB2.x - */ - private static final String ACC_IMPL2 = "AccountImpl2Home"; - /** - * Expl - */ - private static final String ACC_EXPL = "AccountExplHome"; - - - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new C_eb(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(C_eb.class); - } - - /** - * Setup need for these tests - * eb is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - useBeans("eb"); - } - - /** - * Step to do at the end - * unload eb - * @throws Exception if it fails - */ - protected void tearDown() throws Exception { - super.tearDown(); - unUseBeans("eb"); - } - - /** - * Constructor with a specified name - * @param s name - */ - public C_eb(String s) { - super(s); - } - - /** - * Test the return text of the example eb - * by using a specific mode (Impl or Expl) - * @param mode Can be AccountImplHome or AccountExplHome - */ - private void doTestEb(String mode) { - JPrintStream jPrintStream = new JPrintStream(System.out); - System.setOut(jPrintStream); - String txt = null; - try { - // Define a SecurityManager to handle System.exit() case - System.setSecurityManager(new NoExitSecurityManager()); - - // Call Method - callMainMethod(CLIENT_CLASS, "eb" , new String[] {mode}); - - txt = jPrintStream.getStringBuffer().toString(); - } catch (InvocationTargetException ite) { - fail("Fail when invoking the client. It can be due to a System.exit()"); - } catch (Exception e) { - fail("Client was not ok" + e); - } finally { - System.setSecurityManager(new SecurityManager()); - jPrintStream.remove(); - } - - // Check the text - if (txt.indexOf(CLIENT_OK_TXT) == -1) { - fail("The text that the client sent was not " + CLIENT_OK_TXT); - } - } - - - /** - * Try to launch the client of the example eb - * with the case AccountImpl2 - * @throws Exception if an error occurs - */ - public void testClientAccountImpl2() throws Exception { - doTestEb(ACC_IMPL2); - } - /** - * Try to launch the client of the example eb - * with the case AccountImpl - * @throws Exception if an error occurs - */ - public void testClientAccountImpl() throws Exception { - doTestEb(ACC_IMPL); - } - - /** - * Try to launch the client of the example eb - * with the case AccountExpl - * @throws Exception if an error occurs - */ - public void testClientAccountExpl() throws Exception { - doTestEb(ACC_EXPL); - } - -} diff --git a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/hibernate/C_hibernate.java b/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/hibernate/C_hibernate.java deleted file mode 100644 index 6999edaca2f010391545e761e15d6cc7908d761b..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/hibernate/C_hibernate.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Guillaume Sauthier - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.examples.clients.hibernate; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.examples.util.JExampleTestCase; - -import com.meterware.httpunit.WebResponse; - -/** - * Define a class to test the Alarm example - * Test authentication, and check the sample is ok - * @author Florent Benoit - */ -public class C_hibernate extends JExampleTestCase { - - /** - * URL of the hibernate page - */ - private static final String URL_HIBERNATE = "/hibernate-sample/testHibernate"; - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new C_hibernate(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(C_hibernate.class); - } - - /** - * Setup need for these tests - * earsample is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - useWar("hibernate-sample"); - } - - /** - * Constructor with a specified name - * @param s name - */ - public C_hibernate(String s) { - super(s, URL_HIBERNATE); - } - - /** - * Try to log in without authentication - * @throws Exception if an error occurs - */ - public void testAccessHibernatePage() throws Exception { - WebResponse wr = wc.getResponse(url); - String page = wr.getText(); - - // check "Servlet is OK" - if (page.indexOf("Servlet is OK") == -1) { - fail("Missing 'Servlet is OK' ending text. Check on " + this.url); - } - - } - -} diff --git a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/j2eemanagement/C_j2eemanagement.java b/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/j2eemanagement/C_j2eemanagement.java deleted file mode 100644 index 3cd2fbfcee88d8db09fd1d4a854d408ec7b82b25..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/j2eemanagement/C_j2eemanagement.java +++ /dev/null @@ -1,109 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2006 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.examples.clients.j2eemanagement; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.examples.util.JExampleTestCase; - -import com.meterware.httpunit.WebResponse; - -/** - * Define a class to test the j2eemanagement example - * Test authentication, and check the sample is ok - * @author Adriana Danes - */ -public class C_j2eemanagement extends JExampleTestCase { - - /** - * URL of the earsample page - */ - private static final String URL_J2EEMANAGEMENT_DOMAIN = "/j2eemanagement/mgmt?domainName=jonas"; - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new C_j2eemanagement(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(C_j2eemanagement.class); - } - - /** - * Setup need for these tests - * earsample is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - useEar("j2eemanagement"); - } - - /** - * Constructor with a specified name - * @param s name - */ - public C_j2eemanagement(String s) { - // Need to use login/password because the web pages we want to access are secured - super(s, URL_J2EEMANAGEMENT_DOMAIN, "jonas", "jonas"); - } - - /** - * Check if the sample is OK. Analyze response - * @throws Exception if an error occurs - */ - public void testIsSampleOk() throws Exception { - WebResponse wr = wc.getResponse(url); - String txt = wr.getText(); - - if (txt.indexOf("Application is OK") == -1) { - fail("The example was not ok : " + txt); - } - } - - -} diff --git a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/lb/C_lb.java b/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/lb/C_lb.java deleted file mode 100644 index 1c850f0ce470819d02ff02fdbcda74de01da88ac..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/lb/C_lb.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.examples.clients.lb; - -import java.lang.reflect.InvocationTargetException; -import junit.framework.*; - -import org.objectweb.jonas.examples.util.JExampleTestCase; -import org.objectweb.jonas.examples.util.JPrintStream; -import org.objectweb.jonas.examples.util.NoExitSecurityManager; - -/** - * Define a class to test the lb example - * Test the client of lb example (Check if the text is "PASS when checking all accounts") - * @author Florent Benoit - */ -public class C_lb extends JExampleTestCase { - - - /** - * Class of the lb.client - */ - private static final String CLIENT_CLASS = "lb.Client"; - - /** - * Text to check - */ - private static final String CLIENTOP_OK_TXT = "PASS when checking all accounts" ; - - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new C_lb(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(C_lb.class); - } - - /** - * Setup need for these tests - * lb is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - useBeans("lb"); - } - - /** - * Step to do at the end - * unload lb - * @throws Exception if it fails - */ - protected void tearDown() throws Exception { - super.tearDown(); - unUseBeans("lb"); - } - - - /** - * Constructor with a specified name - * @param s name - */ - public C_lb(String s) { - super(s); - } - - - /** - * Try to launch the client of the example lb - * @throws Exception if an error occurs - */ - public void testClient() throws Exception { - JPrintStream jPrintStream = new JPrintStream(System.out); - System.setOut(jPrintStream); - String txt = null; - try { - //Define a SecurityManager to handle System.exit() case - System.setSecurityManager(new NoExitSecurityManager()); - - //Call Method - callMainMethod(CLIENT_CLASS, "lb"); - - txt = jPrintStream.getStringBuffer().toString(); - } catch (InvocationTargetException ite) { - System.out.println("Error = " + ite); - ite.printStackTrace(); - fail("Fail when invoking the client. It can be due to a System.exit()"); - } catch (Exception e) { - fail("Client was not ok" + e); - } finally { - System.setSecurityManager(new SecurityManager()); - jPrintStream.remove(); - } - - // Check the text - if (txt.indexOf(CLIENTOP_OK_TXT) == -1) { - fail("The text that the client sent was not " + CLIENTOP_OK_TXT); - } - - } - -} diff --git a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/mailsb/C_mailsb.java b/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/mailsb/C_mailsb.java deleted file mode 100644 index 130a1c5275ad85c06bc804f426cc77da5abd7b0d..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/mailsb/C_mailsb.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.examples.clients.mailsb; - -import java.lang.reflect.InvocationTargetException; -import junit.framework.*; - -import org.objectweb.jonas.examples.util.JExampleTestCase; -import org.objectweb.jonas.examples.util.JPrintStream; -import org.objectweb.jonas.examples.util.NoExitSecurityManager; - -/** - * Define a class to test the mailsb example - * Test the client of mailsb example - * Test only MimePartDS as MailSession do some prompts - * (Check if the text is "OK !OK !OK !OK !") - * @author Florent Benoit - */ -public class C_mailsb extends JExampleTestCase { - - - /** - * Class of the mailsb.client - */ - private static final String CLIENT_CLASS = "mailsb.ClientMailer"; - - /** - * Text to check - */ - private static final String CLIENTOP_OK_TXT = "OK !OK !OK !OK !" ; - - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new C_mailsb(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(C_mailsb.class); - } - - /** - * Setup need for these tests - * mailsb is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - useBeans("mailsb"); - } - - /** - * Step to do at the end - * unload mailsb - * @throws Exception if it fails - */ - protected void tearDown() throws Exception { - super.tearDown(); - unUseBeans("mailsb"); - } - - - /** - * Constructor with a specified name - * @param s name - */ - public C_mailsb(String s) { - super(s); - } - - - /** - * Try to launch the client of the example mailsb - * @throws Exception if an error occurs - */ - public void testClientMimePartDS() throws Exception { - JPrintStream jPrintStream = new JPrintStream(System.out); - System.setOut(jPrintStream); - String txt = null; - try { - //Define a SecurityManager to handle System.exit() case - System.setSecurityManager(new NoExitSecurityManager()); - - //Call Method - callMainMethod(CLIENT_CLASS, "mailsb", new String[] {"MimePartDSMailer", "content of junit test"}); - - txt = jPrintStream.getStringBuffer().toString(); - } catch (InvocationTargetException ite) { - fail("Fail when invoking the client. It can be due to a System.exit()"); - } catch (Exception e) { - fail("Client was not ok" + e); - } finally { - System.setSecurityManager(new SecurityManager()); - jPrintStream.remove(); - } - - // Check the text - if (txt.indexOf(CLIENTOP_OK_TXT) == -1) { - fail("The text that the client sent was not " + CLIENTOP_OK_TXT); - } - - } - -} diff --git a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/mdb/C_mdb.java b/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/mdb/C_mdb.java deleted file mode 100644 index 4d6d9a92a2875b9c508cfef0c29914f87beb1585..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/mdb/C_mdb.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id:C_mdb.java 10573 2007-06-08 10:12:46Z coqp $ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.examples.clients.mdb; - -import junit.framework.Test; -import junit.framework.TestSuite; - - -import org.objectweb.jonas.examples.util.JExampleTestCase; - -/** - * Define a class to test all the mdb examples - * Test : - sampleappli - * - samplemdb - * @author Philippe Coq - */ -public class C_mdb extends JExampleTestCase { - - /** - * Constructor with a specified name - * @param name the name - */ - public C_mdb(String name) { - super(name); - } - - /** - * Get a new TestSuite for this class - * It includes earsample, alarm and jonasAdmin - * @return a new TestSuite for this class - */ - public static Test suite() { - TestSuite suite = new TestSuite(); - /**suite.addTest(F_sampleappli.suite());**/ - suite.addTest(F_samplemdb.suite()); - return suite; - } - - /** - * Main method - * @param args the arguments - */ - public static void main (String[] args) { - junit.textui.TestRunner.run(suite()); - } -} diff --git a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/mdb/F_sampleappli.java b/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/mdb/F_sampleappli.java deleted file mode 100644 index 364f2adb88155ea98d6fdac7e8447f655c001a1c..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/mdb/F_sampleappli.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.examples.clients.mdb; - -import java.lang.reflect.InvocationTargetException; -import junit.framework.*; - -import org.objectweb.jonas.examples.util.JExampleTestCase; -import org.objectweb.jonas.examples.util.JPrintStream; -import org.objectweb.jonas.examples.util.NoExitSecurityManager; - -/** - * Define a class to test the mdb example - * Test the client of mdb/sampleAppli example - * (Check if the text is "SampleApplicationClient OK" - * @author Florent Benoit - */ -public class F_sampleappli extends JExampleTestCase { - - - /** - * Class of the mdb.client - */ - private static final String CLIENT_CLASS = "sampleappli.SampleAppliClient"; - - /** - * Text to check - */ - private static final String CLIENTOP_OK_TXT1 = "Nb messages sent and received OK"; - - /** - * Second text to check - */ - private static final String CLIENTOP_OK_TXT2 = "SampleApplicationClient OK" ; - - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_sampleappli(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_sampleappli.class); - } - - /** - * Setup need for these tests - * sampleappli is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - useBeans("sampleappli"); - } - - /** - * Step to do at the end - * unload sampleappli - * @throws Exception if it fails - */ - protected void tearDown() throws Exception { - super.tearDown(); - unUseBeans("sampleappli"); - } - - - /** - * Constructor with a specified name - * @param s name - */ - public F_sampleappli(String s) { - super(s); - } - - - /** - * Try to launch the client of the example mdb.sampleappli - * @throws Exception if an error occurs - */ - public void testClient() throws Exception { - JPrintStream jPrintStream = new JPrintStream(System.out); - System.setOut(jPrintStream); - String txt = null; - try { - //Define a SecurityManager to handle System.exit() case - System.setSecurityManager(new NoExitSecurityManager()); - - //Call Method - callMainMethod(CLIENT_CLASS, "mdb"); - - txt = jPrintStream.getStringBuffer().toString(); - } catch (InvocationTargetException ite) { - System.out.println("Error = " + ite); - ite.printStackTrace(); - fail("Fail when invoking the client. It can be due to a System.exit()"); - } catch (Exception e) { - fail("Client was not ok" + e); - } finally { - System.setSecurityManager(new SecurityManager()); - jPrintStream.remove(); - } - - System.out.println("Sample appli txt = " + txt); - - // Check the text - if (txt.indexOf(CLIENTOP_OK_TXT1) == -1) { - fail("The text that the client sent was not " + CLIENTOP_OK_TXT1); - } - - // Check the second text - if (txt.indexOf(CLIENTOP_OK_TXT2) == -1) { - fail("The text that the client sent was not " + CLIENTOP_OK_TXT2); - } - - - } - -} diff --git a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/mdb/F_samplemdb.java b/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/mdb/F_samplemdb.java deleted file mode 100644 index 5a011057ab176209be8bdfdd559b965ed226be8f..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/mdb/F_samplemdb.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.examples.clients.mdb; - -import java.lang.reflect.InvocationTargetException; -import junit.framework.*; - -import org.objectweb.jonas.examples.util.JExampleTestCase; -import org.objectweb.jonas.examples.util.JPrintStream; -import org.objectweb.jonas.examples.util.NoExitSecurityManager; - -/** - * Define a class to test the mdb example - * Test the client of mdb/sampleAppli example - * (Check if the text is "SampleApplicationClient OK" - * @author Florent Benoit - */ -public class F_samplemdb extends JExampleTestCase { - - - /** - * Class of the mdb.client - */ - private static final String CLIENT_CLASS = "samplemdb.MdbClient"; - - /** - * Text to check - */ - private static final String CLIENTOP_OK_TXT = "MDBsample is Ok"; - - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_samplemdb(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_samplemdb.class); - } - - /** - * Setup need for these tests - * samplemdb is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - useBeans("samplemdb"); - } - - /** - * Step to do at the end - * unload samplemdb - * @throws Exception if it fails - */ - protected void tearDown() throws Exception { - super.tearDown(); - unUseBeans("samplemdb"); - } - - - /** - * Constructor with a specified name - * @param s name - */ - public F_samplemdb(String s) { - super(s); - } - - - /** - * Try to launch the client of the example mdb - * @throws Exception if an error occurs - */ - public void testClient() throws Exception { - JPrintStream jPrintStream = new JPrintStream(System.out); - System.setOut(jPrintStream); - String txt = null; - try { - //Define a SecurityManager to handle System.exit() case - System.setSecurityManager(new NoExitSecurityManager()); - - //Call Method - callMainMethod(CLIENT_CLASS, "mdb"); - - txt = jPrintStream.getStringBuffer().toString(); - } catch (InvocationTargetException ite) { - System.out.println("Error = " + ite); - ite.printStackTrace(); - fail("Fail when invoking the client. It can be due to a System.exit()"); - } catch (Exception e) { - fail("Client was not ok" + e); - } finally { - System.setSecurityManager(new SecurityManager()); - jPrintStream.remove(); - } - - System.out.println("Sample mdb txt = " + txt); - - // Check the text - if (txt.indexOf(CLIENTOP_OK_TXT) == -1) { - fail("The text that the client sent was not " + CLIENTOP_OK_TXT); - } - - } - -} diff --git a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/sampleCluster2/C_sampleCluster2.java b/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/sampleCluster2/C_sampleCluster2.java deleted file mode 100644 index 85b57326cfbbaf6220fb9392dde4bc2c950c9033..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/sampleCluster2/C_sampleCluster2.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - */ - -package org.objectweb.jonas.examples.clients.sampleCluster2; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.examples.util.JExampleTestCase; - -import com.meterware.httpunit.WebResponse; - -/** - * Define a class to test the sampleCluster2 example - * @author Georges Goebel - */ -public class C_sampleCluster2 extends JExampleTestCase { - - /** - * URL of the earsample page - */ - private static final String URL_EARSAMPLE = "/sampleCluster2"; - - /** - * Constructor with a specified name - * @param s name - */ - public C_sampleCluster2(String s) { - super(s, URL_EARSAMPLE); - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new C_sampleCluster2(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(C_sampleCluster2.class); - } - - /** - * Setup need for these tests sampleCluster2 is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - useEar("sampleCluster2"); - } - - /** - * Check if the First Page is OK. Analyze response - * @throws Exception if an error occurs - */ - public void testIsFirstPageOk() throws Exception { - WebResponse wr = wc.getResponse(url); - String txt = wr.getText(); - - if (txt.indexOf("Sample is OK.") == -1) { - fail("The example was not ok : " + txt); - } - } - - /** - * Check if the sessionServlet is OK. Analyze response - * @throws Exception if an error occurs - */ - public void testIsSessionOk() throws Exception { - WebResponse wr = wc.getResponse(url + "/servlet/session"); - String txt = wr.getText(); - - if (txt.indexOf("Sample is OK.") == -1) { - fail("The example was not ok : " + txt); - } - } - - /** - * Check if the checkServlet is OK. Analyze response - * @throws Exception if an error occurs - */ - public void testIsCheckOk() throws Exception { - WebResponse wr = wc.getResponse(url + "/servlet/check"); - String txt = wr.getText(); - - if (txt.indexOf("Sample is OK.") == -1) { - fail("The example was not ok : " + txt); - } - } - - /** - * Check if the releaseServlet is OK. Analyze response - * @throws Exception if an error occurs - */ - public void testIsReleaseOk() throws Exception { - WebResponse wr = wc.getResponse(url + "/servlet/release"); - String txt = wr.getText(); - - if (txt.indexOf("Sample is OK.") == -1) { - fail("The example was not ok : " + txt); - } - } - -} diff --git a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/sb/C_sb.java b/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/sb/C_sb.java deleted file mode 100644 index 1c1fa9a4f6c86eab8c767721657b30c82c626426..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/sb/C_sb.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.examples.clients.sb; - -import java.lang.reflect.InvocationTargetException; -import junit.framework.*; - -import org.objectweb.jonas.examples.util.JExampleTestCase; -import org.objectweb.jonas.examples.util.JPrintStream; -import org.objectweb.jonas.examples.util.NoExitSecurityManager; - -/** - * Define a class to test the sb example - * Test the client of sb example (Check if the text is "ClientOp OK. Exiting.") - * @author Florent Benoit - */ -public class C_sb extends JExampleTestCase { - - - /** - * Class of the sb.client - */ - private static final String CLIENT_CLASS = "sb.ClientOp"; - - /** - * Text to check - */ - private static final String CLIENTOP_OK_TXT = "ClientOp OK. Exiting." ; - - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new C_sb(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(C_sb.class); - } - - /** - * Setup need for these tests - * sb is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - useBeans("sb"); - } - - /** - * Step to do at the end - * unload sb - * @throws Exception if it fails - */ - protected void tearDown() throws Exception { - super.tearDown(); - unUseBeans("sb"); - } - - - /** - * Constructor with a specified name - * @param s name - */ - public C_sb(String s) { - super(s); - } - - - /** - * Try to launch the client of the example sb - * @throws Exception if an error occurs - */ - public void testClient() throws Exception { - JPrintStream jPrintStream = new JPrintStream(System.out); - System.setOut(jPrintStream); - String txt = null; - try { - //Define a SecurityManager to handle System.exit() case - System.setSecurityManager(new NoExitSecurityManager()); - - //Call Method - callMainMethod(CLIENT_CLASS, "sb"); - - txt = jPrintStream.getStringBuffer().toString(); - } catch (InvocationTargetException ite) { - fail("Fail when invoking the client. It can be due to a System.exit()"); - } catch (Exception e) { - fail("Client was not ok" + e); - } finally { - System.setSecurityManager(new SecurityManager()); - jPrintStream.remove(); - } - - // Check the text - if (txt.indexOf(CLIENTOP_OK_TXT) == -1) { - fail("The text that the client sent was not " + CLIENTOP_OK_TXT); - } - - } - -} diff --git a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/suite/C_WebExamples.java b/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/suite/C_WebExamples.java deleted file mode 100644 index fce70b24d68febfda60800b1d4fab8d5c1f0c0e4..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/suite/C_WebExamples.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.examples.clients.suite; - -import junit.framework.Test; -import junit.framework.TestSuite; - -import org.objectweb.jonas.examples.clients.alarm.C_alarm; -import org.objectweb.jonas.examples.clients.earsample.C_earsample; -import org.objectweb.jonas.examples.util.JExampleTestCase; - -/** - * Define a class to test all the examples - * Test : - alarm - * - earsample - * @author Florent Benoit - */ -public class C_WebExamples extends JExampleTestCase { - - /** - * Constructor with a specified name - * @param name the name - */ - public C_WebExamples(String name) { - super(name); - } - - /** - * Get a new TestSuite for this class - * It includes earsample, alarm and jonasAdmin - * @return a new TestSuite for this class - */ - public static Test suite() { - TestSuite suite = new TestSuite(); - suite.addTest(C_earsample.suite()); - suite.addTest(C_alarm.suite()); - return suite; - } - - /** - * Main method - * @param args the arguments - */ - public static void main (String[] args) { - junit.textui.TestRunner.run(suite()); - } -} diff --git a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/suite/C_suite.java b/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/suite/C_suite.java deleted file mode 100644 index 700740966e9f29425688c981d8b325b94a06da98..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/suite/C_suite.java +++ /dev/null @@ -1,89 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id:C_suite.java 10573 2007-06-08 10:12:46Z coqp $ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.examples.clients.suite; - -import junit.framework.Test; -import junit.framework.TestSuite; - -import org.objectweb.jonas.examples.clients.alarm.C_alarm; -import org.objectweb.jonas.examples.clients.cmp2.C_cmp2; -import org.objectweb.jonas.examples.clients.earsample.C_earsample; -import org.objectweb.jonas.examples.clients.eb.C_eb; -import org.objectweb.jonas.examples.clients.hibernate.C_hibernate; -import org.objectweb.jonas.examples.clients.j2eemanagement.C_j2eemanagement; -import org.objectweb.jonas.examples.clients.lb.C_lb; -import org.objectweb.jonas.examples.clients.mailsb.C_mailsb; -import org.objectweb.jonas.examples.clients.mdb.C_mdb; -import org.objectweb.jonas.examples.clients.sb.C_sb; -import org.objectweb.jonas.examples.clients.webservices.C_webservices; -import org.objectweb.jonas.examples.util.JExampleTestCase; - -/** - * Define a class to test all the examples - * - * @author Florent Benoit - */ -public class C_suite extends JExampleTestCase { - - /** - * Constructor with a specified name - * @param name the name - */ - public C_suite(String name) { - super(name); - } - - /** - * Get a new TestSuite for this class - * It includes earsample, alarm and jonasAdmin - * @return a new TestSuite for this class - */ - public static Test suite() { - TestSuite suite = new TestSuite(); - suite.addTest(C_earsample.suite()); - suite.addTest(C_alarm.suite()); - suite.addTest(C_cmp2.suite()); - suite.addTest(C_eb.suite()); - suite.addTest(C_hibernate.suite()); - suite.addTest(C_j2eemanagement.suite()); - suite.addTest(C_lb.suite()); - suite.addTest(C_mailsb.suite()); - suite.addTest(C_sb.suite()); - suite.addTest(C_webservices.suite()); - suite.addTest(C_mdb.suite()); - - - return suite; - } - - /** - * Main method - * @param args the arguments - */ - public static void main (String[] args) { - junit.textui.TestRunner.run(suite()); - } -} diff --git a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/webservices/A_WebServices.java b/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/webservices/A_WebServices.java deleted file mode 100644 index ef05bac0ad9d9b953fda8d31a27edfaaabfcdca7..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/webservices/A_WebServices.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.examples.clients.webservices; - - -import org.objectweb.jonas.examples.util.JExampleTestCase; - -import com.meterware.httpunit.WebForm; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; - -/** - * Define an abstract class to test the webServices examples - * @author Guillaume Sauthier - */ -public abstract class A_WebServices extends JExampleTestCase { - - public A_WebServices(String s, String urlPrefix) { - super(s, urlPrefix); - } - - public A_WebServices(String s, String urlPrefix, String username, String password){ - super(s, urlPrefix, username, password); - } - - /** - * Check if home page is accessible - * @throws Exception if an error occurs - */ - public void checkDeploymentCompleted(int nbHomePageLinks) throws Exception { - WebResponse wr = wc.getResponse(url + "index.html"); - WebLink[] links = wr.getLinks(); - assertEquals("deployment OK", nbHomePageLinks, links.length); - } - - public WebResponse executeGoogleWebService(String page, String query) throws Exception { - - WebResponse wr = wc.getResponse(url + page); - - WebForm form = wr.getForms()[0]; - // set Search Query - form.setParameter("search", query); - return form.submit(); - } -} diff --git a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/webservices/A_WebServicesEndpoint.java b/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/webservices/A_WebServicesEndpoint.java deleted file mode 100644 index d3823ebced8524fb29a13720a017ea352a55a5cb..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/webservices/A_WebServicesEndpoint.java +++ /dev/null @@ -1,182 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.examples.clients.webservices; - -import java.io.File; -import java.io.FileInputStream; -import java.util.Properties; - -import javax.wsdl.Definition; -import javax.wsdl.Port; -import javax.wsdl.Service; -import javax.wsdl.extensions.soap.SOAPAddress; -import javax.wsdl.factory.WSDLFactory; -import javax.wsdl.xml.WSDLReader; -import javax.xml.namespace.QName; - -import com.meterware.httpunit.WebForm; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; - -/** - * Define a class to test the webServices examples wsWarExample - * Test WebServices deployment OK and test Call on deployed WebService - * @author Guillaume Sauthier - */ -public abstract class A_WebServicesEndpoint extends A_WebServices { - - /** - * property name => file1 WSDLHandler is mandatory for this test ! - */ - private static final String JPROP_WSDL_LOCATION = "jonas.service.publish.file.directory"; - - public A_WebServicesEndpoint(String s, String urlPrefix) { - super(s, urlPrefix); - } - - public A_WebServicesEndpoint(String s, String urlPrefix, String username, String password) { - super(s, urlPrefix, username, password); - } - - /** - * Check if Axis is Running - * @param idServicesLink indicate where is the link to /services in the homepage - * @param portName the name of the port we want to check - * @throws Exception if an error occurs - */ - public void checkAxisServicesAccessible(int idServicesLink, String context, String portName) throws Exception { - - WebResponse wr = wc.getResponse(url + "index.html"); - WebLink services = wr.getLinks()[idServicesLink]; - - // click the link - WebResponse swr = services.click(); - - // traverse the links and find the interresting one. - boolean found = false; - for (int i = 0; i < swr.getLinks().length; i++) { - String ws_url = swr.getLinks()[i].getURLString(); - if (ws_url.equalsIgnoreCase(url + context + "/" + portName + "?jwsdl")) - found = true; - } - if (!found) - fail("endpoint '" + portName + "' not found in /" + context); - - } - - /** - * Check if WSDL is generated - * @param idWSDLServiceLink indicate where we can find the link - * to WSDL of the port we want to test. (first, second, ...) - * @throws Exception if an error occurs - */ - public void checkAxisWSDL(String path) throws Exception { - - WebResponse wr = wc.getResponse(url + path); - assertEquals("Must be an XML mime type", "text/xml", wr.getContentType()); - - } - - /** - * Check if deployed WebService is running - * @param formPage the filename of the webpage containing the form - * @param endpoint the URL where local service can be found - * @param name the name to set as parameter - * @param pageTitle title of the returned page - * @throws Exception if an error occurs - */ - public void checkDeployedWebService(String formPage, - String endpoint, - String name, - String pageTitle) throws Exception { - - // Get the page containing the form - WebResponse wr = wc.getResponse(url + formPage); - - // get the form named "prepare" - WebForm form = wr.getFormWithName("prepare"); - // set all parameters - form.setParameter("name", name); - // submit - WebResponse wr2 = form.submit(); - - String text = wr2.getText(); - - String valTitle = "" + pageTitle + ""; - String valURL = "Working with URL : " + endpoint + "
    "; - String valHello = "result of sayHello(name) method :Hello " + name + "
    "; - String valQuotes = "result of getCotes() method :12
    "; - - assertTrue("incorrect title", (text.indexOf(valTitle) != -1)); - assertTrue("incorrect URL", (text.indexOf(valURL) != -1)); - assertTrue("incorrect Name", (text.indexOf(valHello) != -1)); - assertTrue("incorrect Cotes", (text.indexOf(valQuotes) != -1)); - - } - - - /** - * Check if WSDL has been published. - * @param wsdlFilename the filename of the WSDL file - * @param tns targetNameSpace of the Definition - * @param serviceName the localpart of the Service QName - * @param portName the name of the WSDL' Port - * @param endpoint the expected URL - * @throws Exception if an error occurs - */ - public void checkWSDLPublication(String wsdlFilename, - String tns, - String serviceName, - String portName, - String endpoint) throws Exception { - - String jonasbase = System.getProperty("jonas.base"); - Properties props = new Properties(); - props.load(new FileInputStream(new File(jonasbase, "conf" + File.separator + "file1.properties"))); - String wsdlLoc = props.getProperty(JPROP_WSDL_LOCATION); - - File wsdl = new File(wsdlLoc, wsdlFilename); - - assertTrue("WSDL is not created", wsdl.exists()); - assertTrue("WSDL is not a file", wsdl.isFile()); - - WSDLFactory f = WSDLFactory.newInstance(); - WSDLReader r = f.newWSDLReader(); - - r.setFeature("javax.wsdl.verbose", true); - r.setFeature("javax.wsdl.importDocuments", false); - - Definition def = r.readWSDL(wsdl.getPath()); - Service s = def.getService(new QName(tns, serviceName)); - Port p = s.getPort(portName); - SOAPAddress sa = (SOAPAddress) p.getExtensibilityElements().get(0); - - assertEquals("URL has not been updated", endpoint, sa.getLocationURI()); - - } - - -} diff --git a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/webservices/C_webservices.java b/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/webservices/C_webservices.java deleted file mode 100644 index c2a0cf7a35ef212f5ec0db838d66215f007e4d8d..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/webservices/C_webservices.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id:C_webservices.java 10573 2007-06-08 10:12:46Z coqp $ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.examples.clients.webservices; - -import junit.framework.Test; -import junit.framework.TestSuite; - - -import org.objectweb.jonas.examples.util.JExampleTestCase; - -/** - * Define a class to test all the webservices examples - * Test : - F_WsAccessTest - * - F_WsEarSample - * - F_WsWarSample - * @author Philippe Coq - */ -public class C_webservices extends JExampleTestCase { - - /** - * Constructor with a specified name - * @param name the name - */ - public C_webservices(String name) { - super(name); - } - - /** - * Get a new TestSuite for this class - * It includes earsample, alarm and jonasAdmin - * @return a new TestSuite for this class - */ - public static Test suite() { - TestSuite suite = new TestSuite(); - // The WsAccessTest is using a SOAP Search WS from Google that have been retired on 07/09/2009 - // http://googlecode.blogspot.com/2009/08/well-earned-retirement-for-soap-search.html - // Commented until a replacement WS has been found - //suite.addTest(F_WsAccessTest.suite()); - suite.addTest(F_WsEarSample.suite()); - /**suite.addTest(F_WsWarSample.suite()); **/ - return suite; - } - - /** - * Main method - * @param args the arguments - */ - public static void main (String[] args) { - junit.textui.TestRunner.run(suite()); - } -} diff --git a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/webservices/F_WsAccessTest.java b/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/webservices/F_WsAccessTest.java deleted file mode 100644 index aa785a25de41b4fd1a945f006f8a9143782c5d76..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/webservices/F_WsAccessTest.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.examples.clients.webservices; - -import junit.framework.TestSuite; - -import com.meterware.httpunit.WebResponse; - - -/** - * Define a class to test the webServices examples wsAccessTest - * Test WebServices deployment OK - * @author Guillaume Sauthier - */ -public class F_WsAccessTest extends A_WebServices { - - /** - * URL of the wsAccessTest page - */ - private static final String URL_WSACCESSTEST = "/wsaccess/"; - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_WsAccessTest(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_WsAccessTest.class); - } - - /** - * Setup need for these tests - * earsample is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - useWar("wsaccess"); - } - - /** - * Constructor with a specified name - * @param s name - */ - public F_WsAccessTest(String s) { - super(s, URL_WSACCESSTEST); - } - - /** - * Check if home page is accessible - * @throws Exception if an error occurs - */ - public void testDeploymentCompleted() throws Exception { - // 2 links + 3 logo links on homepage - checkDeploymentCompleted(2+3); - } - - /** - * Check if JSP can access external google WebService - * @throws Exception if an error occurs - */ - public void testWebServiceJspAccess() throws Exception { - - WebResponse wr = executeGoogleWebService("googleByJSP.jsp", - "ObjectWeb JOnAS"); - assertTrue("a list is returned", wr.getLinks().length > 0); - } - - /** - * Check if JSP can access external google WebService - * @throws Exception if an error occurs - */ - public void testWebServiceServletAccess() throws Exception { - - WebResponse wr = executeGoogleWebService("googleByServlet.html", - "ObjectWeb JOnAS"); - assertTrue("a list is returned", wr.getLinks().length > 0); - - } -} diff --git a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/webservices/F_WsEarSample.java b/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/webservices/F_WsEarSample.java deleted file mode 100644 index ccc41a3c9f1d71aebdbeabfbb0fcd4fcfcce7098..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/webservices/F_WsEarSample.java +++ /dev/null @@ -1,139 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.examples.clients.webservices; - - -import java.io.File; - -import junit.framework.TestSuite; - -import com.meterware.httpunit.WebResponse; - -/** - * Define a class to test the webServices examples - * Test WebServices deployment OK and test Call on deployed WebService - * @author Guillaume Sauthier - */ -public class F_WsEarSample extends A_WebServicesEndpoint { - - /** - * URL of the wsEarSample page - */ - private static final String URL_WSEARSAMPLE = "/axis-ws/"; - - /** - * The username to use for the webapp - */ - private static final String USERNAME = "jonas"; - - /** - * The password to use for teh webapp - */ - private static final String PASSWORD = "jonas"; - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_WsEarSample(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_WsEarSample.class); - } - - /** - * Setup need for these tests - * earsample is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - useEar("ws"); - } - - /** - * Constructor with a specified name - * @param s name - */ - public F_WsEarSample(String s) { - super(s, URL_WSEARSAMPLE, USERNAME, PASSWORD); - } - - /** - * Check if services page is accessible - * @throws Exception if an error occurs - */ - public void testDeploymentCompleted() throws Exception { - - WebResponse wr = wc.getResponse(url + "services1/webservice"); - assertNotNull("no homepage", wr); - } - - /** - * Check if WSDL is generated - * @throws Exception if an error occurs - */ - public void testAxisWSDL() throws Exception { - - // for wsEarSample axis generated WSDL link is in second place (1) - checkAxisWSDL("services1/webservice?JWSDL"); - } - - /** - * Check if WSDL has been published - * @throws Exception if an error occurs - */ - public void testWSDLPublication() throws Exception { - - checkWSDLPublication("My Web Services" + File.separator + "ssbEndpoint.wsdl", - "http://ws.beans.wssample.objectweb.org", - "WSBeanEndpointLocalService", - "WSBeanEndpointLocal", - url + "services1/webservice"); - } - - -} diff --git a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/webservices/F_WsWarSample.java b/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/webservices/F_WsWarSample.java deleted file mode 100644 index 7656ed4e1a3b567d14e6b377042644cdebaecbf3..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/src/org/objectweb/jonas/examples/clients/webservices/F_WsWarSample.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.examples.clients.webservices; - - -import java.io.File; - -import junit.framework.TestSuite; - - -/** - * Define a class to test the webServices examples wsWarExample - * Test WebServices deployment OK and test Call on deployed WebService - * @author Guillaume Sauthier - */ -public class F_WsWarSample extends A_WebServicesEndpoint { - - /** - * URL of the wsWarSample page - */ - private static final String URL_WSWARSAMPLE = "/wswarsample/"; - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_WsWarSample(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_WsWarSample.class); - } - - /** - * Setup need for these tests - * earsample is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - useWar("wswarsample"); - } - - /** - * Constructor with a specified name - * @param s name - */ - public F_WsWarSample(String s) { - super(s, URL_WSWARSAMPLE); - } - - /** - * Check if home page is accessible - * @throws Exception if an error occurs - */ - public void testDeploymentCompleted() throws Exception { - // 3 links + 3 logo links on homepage - checkDeploymentCompleted(3+3); - } - - /** - * Check if Axis is Running - * @throws Exception if an error occurs - */ - public void testAxisServicesAccessible() throws Exception { - - // links to /jaxrpcEndpoint1/* in first place (0) - checkAxisServicesAccessible(3, "endpoints", "jaxrpc"); - } - - /** - * Check if WSDL is generated - * @throws Exception if an error occurs - */ - public void testAxisWSDL() throws Exception { - - // for wsWarSample axis generated WSDL link is in second place (1) - checkAxisWSDL("endpoints/jaxrpc?JWSDL"); - } - - /** - * Check if deployed WebService is running - * @throws Exception if an error occurs - */ - public void testDeployedWebService() throws Exception { - - this.wc.setAuthorization("jonas", "jonas"); - checkDeployedWebService("jaxrpcTest.jsp", - url + "endpoints/jaxrpc", - "JOnAS", - "JOnAS JaxRpc WebService Test Page"); - } - - /** - * Check if WSDL has been published - * @throws Exception if an error occurs - */ - public void testWSDLPublication() throws Exception { - - checkWSDLPublication("MyWebService" + File.separator + "jaxrpcEndpoint.wsdl", - "http://ws.servlets.wssample.objectweb.org", - "JaxRpcEndpointInterfaceService", - "JaxRpcEndpoint1", - url + "endpoints/jaxrpc"); - - } - - -} diff --git a/jonas_tests/examples/src/org/objectweb/jonas/examples/util/JExampleTestCase.java b/jonas_tests/examples/src/org/objectweb/jonas/examples/util/JExampleTestCase.java deleted file mode 100644 index c133c9d7e415a04371d9da2608d6e5399a91c479..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/src/org/objectweb/jonas/examples/util/JExampleTestCase.java +++ /dev/null @@ -1,500 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.examples.util; - -import java.io.File; -import java.io.IOException; -import java.lang.reflect.Method; -import java.net.URL; -import java.net.URLClassLoader; -import java.util.Set; -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; -import javax.management.remote.JMXConnector; -import javax.management.remote.JMXConnectorFactory; -import javax.management.remote.JMXServiceURL; -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; -import junit.framework.TestCase; - -import com.meterware.httpunit.WebConversation; - -/** - * Define a class to add useful methods for test the examples - * - Deploy ear, war and beans - * - Retrieve initial context - * @author Florent Benoit - */ -public class JExampleTestCase extends TestCase { - - /** - * Name of the JOnAS server used for tests - */ - private static String jonasName = "jonas"; - - /** - * Initial context used for lookup - */ - private static Context ictx = null; - - /* - * JONAS_BASE - */ - protected static String jb = null; - - /** - * Connection to the MBeanServer - */ - private static MBeanServerConnection cnx = null; - - - /** - * Conversation used for HttpUnit - */ - protected WebConversation wc = null; - - /** - * URL used for the constructor - */ - protected String url = null; - - /** - * Prefix for build URLs - */ - private String prefixUrl = null; - - /** - * Add to the specified url the prefix - * @param url relative URL - * @return absolute path of URL - */ - protected String getAbsoluteUrl (String url) { - return (this.prefixUrl + url); - } - - /** - * Make an absolute path with the filename. - */ - public String absPath(String name, String extension) { - - String ret = ""; - if ( extension.equals(".jar")) { - ret = jb + "/ejbjars/" + name + ".jar"; - } else if ( extension.equals(".war")) { - ret = jb + "/webapps/" + name + ".war"; - } else if (extension.equals(".ear")) { - ret = jb + "/apps/" + name + ".ear"; - } - return ret; - } - private static JMXServiceURL jmxServerUrl = null; - private static String urlSuffix = "service:jmx:"; - private static String registry = null; - private static String defaultRegistry = "rmi://localhost:1099"; - private static String protocol = null; - private static String defaultProtocol = "jrmp"; - - /* - * Get Connection to the MBean server - * Set the static cnx variable - */ - private void getJmxCnx() { - if (cnx == null) { - try { - if (registry == null) { - registry = defaultRegistry; - } - registry = registry + "/"; - int indx = registry.lastIndexOf(":"); - String st = registry.substring(0, indx); - String serverUrl = urlSuffix + st +"/jndi/"+registry; - if (protocol == null) { - protocol = defaultProtocol; - } - String connectorName = protocol.concat("connector_"); - connectorName = connectorName.concat(jonasName); - serverUrl = serverUrl.concat(connectorName); - jmxServerUrl = new JMXServiceURL(serverUrl); - System.out.println("JMX connector: "+serverUrl); - JMXConnector cntor = JMXConnectorFactory.connect(jmxServerUrl, null); - cnx = cntor.getMBeanServerConnection(null); - } catch (IOException e) { - System.err.println("Can't reach server " + jonasName - + " as couldn't create JMXConnector (" + e.getMessage() - + ")"); - System.err.println("Check name, registry and protocol options."); - System.exit(2); - } - } - } - - /* - * ObjectName of y=the J2eeServerMBean - */ - private static ObjectName j2eeserver = null; - - /* - * Get the ObjectName of the J2eeServerMBean - * @return the ObjectName - */ - private ObjectName getJ2eeServer() { - if (j2eeserver == null) { - try { - ObjectName on = ObjectName.getInstance("*:j2eeType=J2EEServer,name=" + jonasName); - Set j2eeservers = cnx.queryNames(on, null); - if (j2eeservers.isEmpty()) { - System.err.println("Can't admin server " + jonasName + ": didn't found J2EEServer MBean"); - System.exit(2); - } - j2eeserver = (ObjectName) j2eeservers.iterator().next(); - } catch (Exception e) { - System.err.println("Can't invoke mbeanServer: " + e); - } - } - return j2eeserver; - } - - /** - * Initialize the port used by tests and the prefix - */ - private void init() { - String port = System.getProperty("http.port"); - if (port == null) { - port = "9000"; - } - - prefixUrl = "http://localhost:" + port; - } - - /** - * Constructor with a specified name - * @param s the name - */ - public JExampleTestCase(String s) { - super(s); - init(); - } - /** - * Constructor with a specified name and url - * @param s the name - * @param url the url which can be used - */ - public JExampleTestCase(String s, String url) { - super(s); - wc = new WebConversation(); - init(); - this.url = getAbsoluteUrl(url); - } - - public JExampleTestCase(String s, String url, String username, String password) { - super(s); - wc = new WebConversation(); - wc.setAuthorization(username, password); - init(); - this.url = getAbsoluteUrl(url); - } - - /** - * Get initialContext - * @return the initialContext - * @throws NamingException if the initial context can't be retrieved - */ - private Context getInitialContext() throws NamingException { - return new InitialContext(); - } - - /** - * Common setUp routine, used for every test. - * @throws Exception if an error occurs - */ - protected void setUp() throws Exception { - try { - // get InitialContext - if (ictx == null) { - ictx = getInitialContext(); - } - jb = System.getProperty("jonas.base"); - registry = System.getProperty("registry"); - protocol = System.getProperty("protocol"); - getJmxCnx(); - - } catch (NamingException e) { - System.err.println("Cannot setup test: " + e); - e.printStackTrace(); - } - } - - - /** - * Load an ear file in the jonas server - * @param fname ear file, without ".ear" extension - * @throws Exception if an error occurs - */ - public void useEar(String fname) throws Exception { - String filename = absPath(fname, ".ear"); - try { - // Load ear in JOnAS if not already loaded. - if (!isEarLoaded(filename)) { - loadEar(filename); - } - - } catch (Exception e) { - throw new Exception("Cannot load Ear : " + e.getMessage()); - } - } - - /** - * Load a war file in the jonas server - * @param filename war file, without ".war" extension - * @throws Exception if an error occurs - */ - public void useWar(String fname) throws Exception { - String filename = absPath(fname, ".war"); - try { - // Load war in JOnAS if not already loaded. - if (!isWarLoaded(filename)) { - loadWar(filename); - } - } catch (Exception e) { - throw new Exception("Cannot load War : " + e.getMessage()); - } - } - - /** - * Load a bean jar file in the jonas server - * @param filename jar file, without ".jar" extension - * @throws Exception if an error occurs - */ - public void useBeans(String fname) throws Exception { - try { - String filename = absPath(fname, ".jar"); - // Load bean in EJBServer if not already loaded. - if (!isJarLoaded(filename)) { - addBeans(filename); - } - } catch (Exception e) { - throw new Exception("Cannot load Bean : " + e.getMessage()); - } - } - - /* - * isLoaded remote operation - */ - private boolean isLoaded(String filename) { - boolean ret = false; - String[] params = {filename}; - String[] signature = {"java.lang.String"}; - try { - Boolean r = (Boolean) cnx.invoke(getJ2eeServer(), "isDeployed", params, signature); - ret = r.booleanValue(); - } catch (Exception e) { - System.err.println("Cannot deploy " + filename + ": " + e); - } - return ret; - } - /** - * isJarLoaded remote operation - * @param filename jar file, with ".jar" extension - */ - private boolean isJarLoaded(String filename) { - boolean ret = false; - try { - return isLoaded(filename); - } catch (Exception e) { - System.err.println("Cannot test bean: " + e); - } - - return ret; - } - - /** - * addBean remote operation - * @param filename jar file, with ".jar" extension - */ - public void addBeans(String filename) { - - try { - String[] params = {filename}; - String[] signature = {"java.lang.String"}; - try { - cnx.invoke(getJ2eeServer(), "deploy", params, signature); - } catch (Exception e) { - System.err.println("Cannot deploy " + filename + ": " + e); - } - - } catch (Exception e) { - System.err.println("Cannot load bean: " + e); - } - } - - - - /** - * unloadBean remote operation - * @param filename jar file, with ".jar" extension - */ - public void unloadBeans(String filename) { - try { - String[] params = {filename}; - String[] signature = {"java.lang.String"}; - try { - cnx.invoke(getJ2eeServer(), "undeploy", params, signature); - } catch (Exception e) { - System.err.println("Cannot undeploy " + filename + ": " + e); - } - - } catch (Exception e) { - System.err.println("Cannot unload bean: " + e); - } - } - - - /** - * isEarLoaded remote operation - * @param filename ear file, with ".ear" extension - */ - private boolean isEarLoaded(String filename) { - boolean ret = false; - try { - return isLoaded(filename); - - } catch (Exception e) { - System.err.println("Cannot test bean: " + e); - } - - return ret; - } - /** - * loadEar remote operation - * @param filename ear file, with ".ear" extension - */ - public void loadEar(String filename) { - try { - - String[] params = {filename}; - String[] signature = {"java.lang.String"}; - try { - cnx.invoke(getJ2eeServer(), "deploy", params, signature); - } catch (Exception e) { - System.err.println("Cannot deploy " + filename + ": " + e); - } - - } catch (Exception e) { - System.err.println("Cannot load bean: " + e); - } - } - - /** - * isWarLoaded remote operation - * @param filename war file, with ".war" extension - */ - private boolean isWarLoaded(String filename) { - boolean ret = false; - try { - return isLoaded(filename); - } catch (Exception e) { - System.err.println("Cannot test bean: " + e); - } - - return ret; - } - - /** - * loadEar remote operation - * @param filename war file, with ".war" extension - */ - public void loadWar(String filename) { - try { - - String[] params = {filename}; - String[] signature = {"java.lang.String"}; - try { - cnx.invoke(getJ2eeServer(), "deploy", params, signature); - } catch (Exception e) { - System.err.println("Cannot deploy " + filename + ": " + e); - } - - } catch (Exception e) { - System.err.println("Cannot load bean: " + e); - } - } - - /** - * Unload a bean jar file in the jonas server - * @param filename jar file, without ".jar" extension - * @throws Exception if an error occurs - */ - public void unUseBeans(String filename) throws Exception { - try { - - if (isJarLoaded(filename + ".jar")) { - unloadBeans(filename + ".jar"); - } - } catch (Exception e) { - throw new Exception("Cannot unload Bean : " + e.getMessage()); - } - } - - - /** - * Call the main method of a specific class with empty args - * @param classToLoad name of class which contains the main method - * @throws Exception if it fails - */ - protected void callMainMethod(String classToLoad, String ejbname) throws Exception { - callMainMethod(classToLoad, ejbname, new String[]{}); - } - - - /** - * Call the main method of a specific class and the specific args - * @param classToLoad name of class which contains the main method - * @param args args to give to the main method - * @throws Exception if it fails - */ - protected void callMainMethod(String classToLoad, String ejbname , String[] args) throws Exception { - //Build classloader - ClassLoader cl = Thread.currentThread().getContextClassLoader(); - URL[] urls = new URL[4]; - urls[0] = new File(System.getProperty("jonas.root") + File.separator + "examples" + File.separator + "classes").toURL(); - urls[1] = new File("base" + File.separator + "examples" + File.separator + "classes").toURL(); - urls[2] = new File("examples" + File.separator + "base" + File.separator + "examples" + File.separator + "classes").toURL(); - urls[3] = new File(System.getProperty("jonas.base") + File.separator + "ejbjars" + File.separator + ejbname + ".jar").toURL(); - URLClassLoader loader = new URLClassLoader(urls); - Thread.currentThread().setContextClassLoader(loader); - Class clazz = loader.loadClass(classToLoad); - Class[] argList = new Class[] {args.getClass()}; - Method meth = clazz.getMethod("main", argList); - Object appli = meth.invoke(null, new Object[]{args}); - } - - - - - -} diff --git a/jonas_tests/examples/src/org/objectweb/jonas/examples/util/JPrintStream.java b/jonas_tests/examples/src/org/objectweb/jonas/examples/util/JPrintStream.java deleted file mode 100644 index a6cfeebe0737ed12a8b5a153016034d82077e5b5..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/src/org/objectweb/jonas/examples/util/JPrintStream.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.examples.util; - -import java.io.PrintStream; - -/** - * Allow to redirect the System.out stream or System.err - * @author Florent Benoit - */ -public class JPrintStream extends PrintStream { - - - /** - * Old PrintStream - */ - protected PrintStream printStream = null; - - - /** - * Text which was sent to this stream - */ - protected StringBuffer buffer = null; - - /** - * Constructor. Build a new JPrintStream. - * @param printStream stream to use - */ - public JPrintStream(PrintStream printStream) { - super(printStream); - this.buffer = new StringBuffer(); - this.printStream = printStream; - System.setOut(this); - } - - /** - * Return the buffer which is used - * @return buffer which is used - */ - public StringBuffer getStringBuffer() { - return buffer; - } - - - /** - * Print to the stream and log it - * @param x text to log - */ - public void println(String x) { - buffer.append(x); - // Don't print info - //printStream.println(x); - } - - /** - * Print to the stream and log it - * @param x text to log - */ - public void println(Object x) { - buffer.append(x.toString()); - } - - /** - * Remove all the information logged - */ - public void reset() { - buffer = new StringBuffer(); - } - - /** - * Set the stream back - */ - public void remove() { - System.setOut(printStream); - } -} diff --git a/jonas_tests/examples/src/org/objectweb/jonas/examples/util/NoExitSecurityManager.java b/jonas_tests/examples/src/org/objectweb/jonas/examples/util/NoExitSecurityManager.java deleted file mode 100644 index db3b15dcb2fdc2a587bd5cbb0ef8f573362abf11..0000000000000000000000000000000000000000 --- a/jonas_tests/examples/src/org/objectweb/jonas/examples/util/NoExitSecurityManager.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.examples.util; - -/** - * Defines a Security Manager without Exit permission - * @author Florent Benoit - */ - -public class NoExitSecurityManager extends SecurityManager { - - /** - * Method use to catch the exit() which can be done in examples - * @param status status code. For us in all cases, raise a new Exception - */ - public void checkExit(int status) { - throw new SecurityException("Fail !"); - } -} - diff --git a/jonas_tests/j2eeca/.cvsignore b/jonas_tests/j2eeca/.cvsignore deleted file mode 100644 index edd6709bda5ba3b97d2400d49e260a285e840948..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -classes -jar diff --git a/jonas_tests/j2eeca/build.xml b/jonas_tests/j2eeca/build.xml deleted file mode 100644 index ee3325ce9355a42fb7f02039791c610798b9c7ec..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/build.xml +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/j2eeca/rars/ErsatzEIS/ErsatzEIS.rar b/jonas_tests/j2eeca/rars/ErsatzEIS/ErsatzEIS.rar deleted file mode 100644 index 7f997a6fdbb9e4b27248f01ffd31514aff843fd6..0000000000000000000000000000000000000000 Binary files a/jonas_tests/j2eeca/rars/ErsatzEIS/ErsatzEIS.rar and /dev/null differ diff --git a/jonas_tests/j2eeca/rars/ErsatzEIS/META-INF/jonas-ra.xml b/jonas_tests/j2eeca/rars/ErsatzEIS/META-INF/jonas-ra.xml deleted file mode 100644 index e8bde55dc5ce2f567001a922b687ecf4a8db1950..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/rars/ErsatzEIS/META-INF/jonas-ra.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - true - ersatz.resourceadapter - - 0 - 0 - -1 - 0 - 10 - - - 0 - - - ersatz.resourceadapter.ManagedConnectionFactoryImpl - eis/ErsatzEIS - - - ersatz.resourceadapter.MsgListenerInterface - eis/ErsatzAS - - diff --git a/jonas_tests/j2eeca/rars/ErsatzEIS/META-INF/ra.xml b/jonas_tests/j2eeca/rars/ErsatzEIS/META-INF/ra.xml deleted file mode 100644 index 8d47876ab15ec76dd24ae6856768f74535af6f9a..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/rars/ErsatzEIS/META-INF/ra.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - Ersatz Resource Adapter --ErsatzEIS-- to Test JOnAS - ErsatzEIS - - Bull HN - ErsatzEIS - 1.1 - - false - - - - ersatz.resourceadapter.ResourceAdapterImpl - - - - URL for EIS instance - EIS_URL - java.lang.String - ErsatzEIS - - - - - - ersatz.resourceadapter.ManagedConnectionFactoryImpl - - - - - Test ServerName Property 1 - ServerName - java.lang.String - 111.111.111.111 - - - Test PortNumber Property 2 - PortNumber - java.lang.String - ak41 - - - Default User Name - DUserName - java.lang.String - defaultUserName - - - Default Password - DPassword - java.lang.String - defaultPassword - - - Protocol to use - protocol - java.lang.String - LINE - - - - javax.resource.cci.ConnectionFactory - - - ersatz.resourceadapter.ConnectionFactoryImpl - - javax.resource.cci.Connection - ersatz.resourceadapter.ConnectionImpl - - NoTransaction - false - - - - - - - ersatz.resourceadapter.MsgListenerInterface - - - - ersatz.resourceadapter.ActivationSpecImpl - - - just to test setFormat - Format - - - - - - - - diff --git a/jonas_tests/j2eeca/rars/ErsatzLoTransaction/META-INF/jonas-ra.xml b/jonas_tests/j2eeca/rars/ErsatzLoTransaction/META-INF/jonas-ra.xml deleted file mode 100644 index 6508a4ac0768228b93c23789ce24a2350875cc6f..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/rars/ErsatzLoTransaction/META-INF/jonas-ra.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - true - ersatz.resourceadapter - - 0 - 0 - -1 - 0 - 10 - - - 0 - - - ersatz.resourceadapter.ManagedConnectionFactoryImpl - eis/ErsatzLoTransaction - - - ersatz.resourceadapter.MsgListenerInterface - eis/ErsatzAS1 - - diff --git a/jonas_tests/j2eeca/rars/ErsatzLoTransaction/META-INF/ra.xml b/jonas_tests/j2eeca/rars/ErsatzLoTransaction/META-INF/ra.xml deleted file mode 100644 index d7b9165e17cc2f789c48daf81a7cf5b970423e56..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/rars/ErsatzLoTransaction/META-INF/ra.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - Ersatz Resource Adapter --ErsatzLoTransaction-- to Test JOnAS - ErsatzLoTransaction - - Bull HN - ErsatzLoTransaction - 1.2 - - false - - - - ersatz.resourceadapter.ResourceAdapterImpl - - - - URL for EIS instance - EIS_URL - java.lang.String - ErsatzLoTransaction - - - - - - ersatz.resourceadapter.ManagedConnectionFactoryImpl - - - - - Test ServerName Property 1 - ServerName - java.lang.String - 222.222.222.222 - - - Test PortNumber Property 2 - PortNumber - java.lang.String - ak42 - - - Default User Name - DUserName - java.lang.String - defaultUserName - - - Default Password - DPassword - java.lang.String - defaultPassword - - - Protocol to use(CPIC, LINE, NONE) - protocol - java.lang.String - LINE - - - - javax.resource.cci.ConnectionFactory - - - ersatz.resourceadapter.ConnectionFactoryImpl - - javax.resource.cci.Connection - ersatz.resourceadapter.ConnectionImpl - - LocalTransaction - false - - - - - - - ersatz.resourceadapter.MsgListenerInterface - - - - ersatz.resourceadapter.ActivationSpecImpl - - - just to test setFormat - Format - - - - - - - - diff --git a/jonas_tests/j2eeca/rars/ErsatzNolog/META-INF/jonas-ra.xml b/jonas_tests/j2eeca/rars/ErsatzNolog/META-INF/jonas-ra.xml deleted file mode 100644 index acffa6f557966a3e74c8992805bd5b8d92abbaf1..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/rars/ErsatzNolog/META-INF/jonas-ra.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - false - ersatz.resourceadapter - - 0 - 0 - -1 - 0 - 10 - - - 0 - - - ersatz.resourceadapter.ManagedConnectionFactoryImpl - eis/ErsatzNolog - - - ersatz.resourceadapter.MsgListenerInterface - eis/ErsatzAS2 - - diff --git a/jonas_tests/j2eeca/rars/ErsatzNolog/META-INF/ra.xml b/jonas_tests/j2eeca/rars/ErsatzNolog/META-INF/ra.xml deleted file mode 100644 index 7c3dfbb6e31b0de8b4965a092a8f720ad13f9bfd..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/rars/ErsatzNolog/META-INF/ra.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - Ersatz Resource Adapter --ErsatzNolog-- to Test JOnAS - ErsatzNolog - - Bull HN - ErsatzNolog - 1.3 - - false - - - - ersatz.resourceadapter.ResourceAdapterImpl - - - - URL for EIS instance - EIS_URL - java.lang.String - ErsatzNolog - - - - - - ersatz.resourceadapter.ManagedConnectionFactoryImpl - - - - - Test ServerName Property 1 - ServerName - java.lang.String - 333.333.333.333 - - - Test PortNumber Property 2 - PortNumber - java.lang.String - ak43 - - - Default User Name - DUserName - java.lang.String - defaultUserName - - - Default Password - DPassword - java.lang.String - defaultPassword - - - Protocol to use(CPIC, LINE, NONE) - protocol - java.lang.String - LINE - - - - javax.resource.cci.ConnectionFactory - - - ersatz.resourceadapter.ConnectionFactoryImpl - - javax.resource.cci.Connection - ersatz.resourceadapter.ConnectionImpl - - NoTransaction - false - - - - - - - ersatz.resourceadapter.MsgListenerInterface - - - - ersatz.resourceadapter.ActivationSpecImpl - - - just to test setFormat - Format - - - - - - - - diff --git a/jonas_tests/j2eeca/rars/ErsatzSecurity/META-INF/jonas-ra.xml b/jonas_tests/j2eeca/rars/ErsatzSecurity/META-INF/jonas-ra.xml deleted file mode 100644 index 50f9062610747954b04f4ed2659e1f63f384f672..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/rars/ErsatzSecurity/META-INF/jonas-ra.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - true - ersatz.resourceadapter - - 0 - 0 - -1 - 0 - 10 - - - 0 - - - ersatz.resourceadapter.ManagedConnectionFactoryImpl - eis/ErsatzSecurity - - - ersatz.resourceadapter.MsgListenerInterface - eis/ErsatzAS3 - - diff --git a/jonas_tests/j2eeca/rars/ErsatzSecurity/META-INF/ra.xml b/jonas_tests/j2eeca/rars/ErsatzSecurity/META-INF/ra.xml deleted file mode 100644 index 3f26f66cf30d15c00b48bf82169f6c1395c00ed7..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/rars/ErsatzSecurity/META-INF/ra.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - Ersatz Resource Adapter --ErsatzSecurity-- to Test JOnAS - ErsatzSecurity - - Bull HN - ErsatzSecurity - 1.4 - - false - - - - ersatz.resourceadapter.ResourceAdapterImpl - - - - URL for EIS instance - EIS_URL - java.lang.String - ErsatzSecurity - - - - - - ersatz.resourceadapter.ManagedConnectionFactoryImpl - - - - - Test ServerName Property 1 - ServerName - java.lang.String - 444.444.444.444 - - - Test PortNumber Property 2 - PortNumber - java.lang.String - ak44 - - - Default User Name - DUserName - java.lang.String - defaultUserName - - - Default Password - DPassword - java.lang.String - defaultPassword - - - Protocol to use(CPIC, LINE, NONE) - protocol - java.lang.String - LINE - - - - javax.resource.cci.ConnectionFactory - - - ersatz.resourceadapter.ConnectionFactoryImpl - - javax.resource.cci.Connection - ersatz.resourceadapter.ConnectionImpl - - NoTransaction - - false - - - - - - - ersatz.resourceadapter.MsgListenerInterface - - - - ersatz.resourceadapter.ActivationSpecImpl - - - just to test setFormat - Format - - - - - - - - diff --git a/jonas_tests/j2eeca/rars/ErsatzXATransaction/META-INF/jonas-ra.xml b/jonas_tests/j2eeca/rars/ErsatzXATransaction/META-INF/jonas-ra.xml deleted file mode 100644 index df9c2613678ce25f753cc2e6638b49282981d7ac..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/rars/ErsatzXATransaction/META-INF/jonas-ra.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - true - ersatz.resourceadapter - - 0 - 0 - -1 - 0 - 10 - - - 0 - - - ersatz.resourceadapter.ManagedConnectionFactoryImpl - eis/ErsatzXATransaction - - - ersatz.resourceadapter.MsgListenerInterface - eis/ErsatzAS4 - - diff --git a/jonas_tests/j2eeca/rars/ErsatzXATransaction/META-INF/ra.xml b/jonas_tests/j2eeca/rars/ErsatzXATransaction/META-INF/ra.xml deleted file mode 100644 index 24ab3d99feaf59e8b36924051566d0c4f5e02dc3..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/rars/ErsatzXATransaction/META-INF/ra.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - Ersatz Resource Adapter --ErsatzXATransaction-- to Test JOnAS - ErsatzXATransaction - - Bull HN - ErsatzXATransaction - 1.5 - - false - - - - ersatz.resourceadapter.ResourceAdapterImpl - - - - URL for EIS instance - EIS_URL - java.lang.String - ErsatzXATransaction - - - - - - ersatz.resourceadapter.ManagedConnectionFactoryImpl - - - - - Test ServerName Property 1 - ServerName - java.lang.String - 555.555.555.555 - - - Test PortNumber Property 2 - PortNumber - java.lang.String - ak45 - - - Default User Name - DUserName - java.lang.String - defaultUserName - - - Default Password - DPassword - java.lang.String - defaultPassword - - - Protocol to use - protocol - java.lang.String - XA - - - - javax.resource.cci.ConnectionFactory - - - ersatz.resourceadapter.ConnectionFactoryImpl - - javax.resource.cci.Connection - ersatz.resourceadapter.ConnectionImpl - - XATransaction - false - - - - - - - ersatz.resourceadapter.MsgListenerInterface - - - - ersatz.resourceadapter.ActivationSpecImpl - - - just to test setFormat - Format - - - - - - - - diff --git a/jonas_tests/j2eeca/rars/JtestResourceAdapter/META-INF/jonas-ra.xml b/jonas_tests/j2eeca/rars/JtestResourceAdapter/META-INF/jonas-ra.xml deleted file mode 100644 index 224801330cee6c39d36cb63f2b42ca10c312fc2c..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/rars/JtestResourceAdapter/META-INF/jonas-ra.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - FictionalEIS - - - true - fictional.resourceadapter - - 0 - 0 - 5 - - - ServerName - 111.222.333.444 - - - PortNumber - ak41 - - - DUserName - defaultUserName - - - DPassword - defaultPassword - - - protocol - LINE - - diff --git a/jonas_tests/j2eeca/rars/JtestResourceAdapter/META-INF/ra.xml b/jonas_tests/j2eeca/rars/JtestResourceAdapter/META-INF/ra.xml deleted file mode 100644 index 35cb2de1f81adaef468cb1709736b9343d59a105..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/rars/JtestResourceAdapter/META-INF/ra.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - Fictional Resource Adapter to Test JOnAS - Bull - 1.0 - FictionalEIS - 2.1 - - fictional.resourceadapter.JtestResourceAdapter - javax.resource.cci.ConnectionFactory - fictional.resourceadapter.CommonClient - javax.resource.cci.Connection - fictional.resourceadapter.ConnectionImpl - NoTransaction - - Test ServerName Property 1 - ServerName - java.lang.String - 111.222.333.444 - - - Test PortNumber Property 2 - PortNumber - java.lang.String - ak41 - - - Default User Name - DUserName - java.lang.String - defaultUserName - - - Default Password - DPassword - java.lang.String - defaultPassword - - - Protocol to use(CPIC, LINE, NONE) - protocol - java.lang.String - LINE - - - BasicPassword - javax.resource.security.PasswordCredential - - false - - diff --git a/jonas_tests/j2eeca/rars/Nolog/META-INF/jonas-ra.xml b/jonas_tests/j2eeca/rars/Nolog/META-INF/jonas-ra.xml deleted file mode 100644 index 8f47dd7776d29ed98ca278966c17b18589f57736..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/rars/Nolog/META-INF/jonas-ra.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - FictionalNolog - - - false - fictional.resourceadapter - - 0 - 0 - 5 - - - ServerName - 111.222.333.444 - - - PortNumber - ak41 - - - DUserName - defaultUserName - - - DPassword - defaultPassword - - - protocol - LINE - - diff --git a/jonas_tests/j2eeca/rars/Nolog/META-INF/ra.xml b/jonas_tests/j2eeca/rars/Nolog/META-INF/ra.xml deleted file mode 100644 index 9355803730b61a9c12d4d7110da2e53a79440e69..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/rars/Nolog/META-INF/ra.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - Fictional Resource Adapter to Test JOnAS - Bull - 1.0 - FictionalNolog - 2.1 - - fictional.resourceadapter.JtestResourceAdapter - javax.resource.cci.ConnectionFactory - fictional.resourceadapter.CommonClient - javax.resource.cci.Connection - fictional.resourceadapter.ConnectionImpl - NoTransaction - - Test ServerName Property 1 - ServerName - java.lang.String - 111.222.333.444 - - - Test PortNumber Property 2 - PortNumber - java.lang.String - ak41 - - - Default User Name - DUserName - java.lang.String - defaultUserName - - - Default Password - DPassword - java.lang.String - defaultPassword - - - Protocol to use(CPIC, LINE, NONE) - protocol - java.lang.String - LINE - - - BasicPassword - javax.resource.security.PasswordCredential - - false - - diff --git a/jonas_tests/j2eeca/rars/Reauth/META-INF/jonas-ra.xml b/jonas_tests/j2eeca/rars/Reauth/META-INF/jonas-ra.xml deleted file mode 100644 index 4e94d22f444b471a71609a145d64d9320fb14178..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/rars/Reauth/META-INF/jonas-ra.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - FictionalReauth - - - true - fictional.resourceadapter - - 0 - 0 - 5 - - - ServerName - 111.222.333.444 - - - PortNumber - ak41 - - - DUserName - defaultUserName - - - DPassword - defaultPassword - - - protocol - LINE - - diff --git a/jonas_tests/j2eeca/rars/Reauth/META-INF/ra.xml b/jonas_tests/j2eeca/rars/Reauth/META-INF/ra.xml deleted file mode 100644 index 45382b86c59a9684cc00b0175fae77b5d201f14d..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/rars/Reauth/META-INF/ra.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - Fictional Resource Adapter to Test JOnAS - Bull - 1.0 - FictionalReauth - 2.1 - - fictional.resourceadapter.JtestResourceAdapter - javax.resource.cci.ConnectionFactory - fictional.resourceadapter.CommonClient - javax.resource.cci.Connection - fictional.resourceadapter.ConnectionImpl - NoTransaction - - Test ServerName Property 1 - ServerName - java.lang.String - 111.222.333.444 - - - Test PortNumber Property 2 - PortNumber - java.lang.String - ak41 - - - Default User Name - DUserName - java.lang.String - defaultUserName - - - Default Password - DPassword - java.lang.String - defaultPassword - - - Protocol to use(CPIC, LINE, NONE) - protocol - java.lang.String - LINE - - - BasicPassword - javax.resource.security.PasswordCredential - - true - - diff --git a/jonas_tests/j2eeca/rars/Security/META-INF/jonas-ra.xml b/jonas_tests/j2eeca/rars/Security/META-INF/jonas-ra.xml deleted file mode 100644 index 3b102aecb6f79d939660a1b641e86a42c4270022..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/rars/Security/META-INF/jonas-ra.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - FictionalSecurity - - - true - fictional.resourceadapter - - 0 - 0 - 5 - - - ServerName - 111.222.333.444 - - - PortNumber - ak41 - - - DUserName - defaultUserName - - - DPassword - defaultPassword - - - protocol - LINE - - diff --git a/jonas_tests/j2eeca/rars/Security/META-INF/ra.xml b/jonas_tests/j2eeca/rars/Security/META-INF/ra.xml deleted file mode 100644 index b3486e7dfff5798d18bbea8e6364413f9cf5a243..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/rars/Security/META-INF/ra.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - Fictional Resource Adapter to Test JOnAS - Bull - 1.0 - FictionalSecurity - 2.1 - - fictional.resourceadapter.JtestResourceAdapter - javax.resource.cci.ConnectionFactory - fictional.resourceadapter.CommonClient - javax.resource.cci.Connection - fictional.resourceadapter.ConnectionImpl - NoTransaction - - Test ServerName Property 1 - ServerName - java.lang.String - 111.222.333.444 - - - Test PortNumber Property 2 - PortNumber - java.lang.String - ak41 - - - Default User Name - DUserName - java.lang.String - defaultUserName - - - Default Password - DPassword - java.lang.String - defaultPassword - - - Protocol to use(CPIC, LINE, NONE) - protocol - java.lang.String - LINE - - - BasicPassword - javax.resource.security.PasswordCredential - - false - - diff --git a/jonas_tests/j2eeca/rars/Transaction/META-INF/jonas-ra.xml b/jonas_tests/j2eeca/rars/Transaction/META-INF/jonas-ra.xml deleted file mode 100644 index 9d782a175761f5822bae196b80e61af0d4593ad8..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/rars/Transaction/META-INF/jonas-ra.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - FictionalLoTransaction - - - true - fictional.resourceadapter - - 0 - 0 - 5 - - - ServerName - 111.222.333.444 - - - PortNumber - ak41 - - - DUserName - defaultUserName - - - DPassword - defaultPassword - - - protocol - LINE - - diff --git a/jonas_tests/j2eeca/rars/Transaction/META-INF/ra.xml b/jonas_tests/j2eeca/rars/Transaction/META-INF/ra.xml deleted file mode 100644 index 98c7639866866b5028e082d772baec11e4e66362..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/rars/Transaction/META-INF/ra.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - Fictional Resource Adapter to Test JOnAS - Bull - 1.0 - FictionalLoTransaction - 2.1 - - fictional.resourceadapter.JtestResourceAdapter - javax.resource.cci.ConnectionFactory - fictional.resourceadapter.CommonClient - javax.resource.cci.Connection - fictional.resourceadapter.ConnectionImpl - LocalTransaction - - Test ServerName Property 1 - ServerName - java.lang.String - 111.222.333.444 - - - Test PortNumber Property 2 - PortNumber - java.lang.String - ak41 - - - Default User Name - DUserName - java.lang.String - defaultUserName - - - Default Password - DPassword - java.lang.String - defaultPassword - - - Protocol to use(CPIC, LINE, NONE) - protocol - java.lang.String - LINE - - - BasicPassword - javax.resource.security.PasswordCredential - - false - - diff --git a/jonas_tests/j2eeca/rars/XATransaction/META-INF/jonas-ra.xml b/jonas_tests/j2eeca/rars/XATransaction/META-INF/jonas-ra.xml deleted file mode 100644 index a2a4136c4d7239b9be0fde7daebe94469698eb38..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/rars/XATransaction/META-INF/jonas-ra.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - FictionalXATransaction - - - true - fictional.resourceadapter - - 0 - 0 - 5 - - - ServerName - 111.222.333.444 - - - PortNumber - ak41 - - - DUserName - defaultUserName - - - DPassword - defaultPassword - - - protocol - LINE - - diff --git a/jonas_tests/j2eeca/rars/XATransaction/META-INF/ra.xml b/jonas_tests/j2eeca/rars/XATransaction/META-INF/ra.xml deleted file mode 100644 index 1248685cd2ba4f779d29cfe638a6df6ab99f7e08..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/rars/XATransaction/META-INF/ra.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - Fictional Resource Adapter to Test JOnAS - Bull - 1.0 - FictionalXATransaction - 2.1 - - fictional.resourceadapter.JtestResourceAdapter - javax.resource.cci.ConnectionFactory - fictional.resourceadapter.CommonClient - javax.resource.cci.Connection - fictional.resourceadapter.ConnectionImpl - XATransaction - - Test ServerName Property 1 - ServerName - java.lang.String - 111.222.333.444 - - - Test PortNumber Property 2 - PortNumber - java.lang.String - ak41 - - - Default User Name - DUserName - java.lang.String - defaultUserName - - - Default Password - DPassword - java.lang.String - defaultPassword - - - Protocol to use(CPIC, LINE, NONE) - protocol - java.lang.String - LINE - - - BasicPassword - javax.resource.security.PasswordCredential - - false - - diff --git a/jonas_tests/j2eeca/src/ersatz/resourceadapter/ActivationSpecImpl.java b/jonas_tests/j2eeca/src/ersatz/resourceadapter/ActivationSpecImpl.java deleted file mode 100644 index b0ca2bd4b0e52a5a36c57e6eb57d2e483eb0cee1..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/src/ersatz/resourceadapter/ActivationSpecImpl.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Created on January 12, 2004 - * - * ActivationSpecImpl.java is used to test JCA 1.5 - * as implemented by JOnAS. This class implements the ActivationSpec Interface - * - * An ActivationSpec JavaBean represents inbound connectivity information from - * an EIS instance - */ -package ersatz.resourceadapter; - -import javax.resource.ResourceException; -import javax.resource.spi.ResourceAdapter; -import javax.resource.spi.ActivationSpec; - - // ActivationSpec interface extends ResourceAdapterAssociation interface. - -public class ActivationSpecImpl implements ActivationSpec, - java.io.Serializable -{ - private transient ResourceAdapter ra = null; // loaded by Application Server - private boolean raLoaded; - private String messageObjectType; - String cName = "ActivationSpecImpl"; - ResourceAdapterImpl rai; - - public ActivationSpecImpl() - { - Utility.log(cName+".constructor"); - } - public void validate() - throws javax.resource.spi.InvalidPropertyException - { - Utility.log(cName+".validate. eis="+rai.EIS_URL); - } - public ResourceAdapter getResourceAdapter() - { - return ra; - } - /** Set the ResourceAdapter association. - * - * @param ra ResourceAdapter passed in by Application Server (JOnAS) - * @exception javax.resource.ResourceException - **/ - public void setResourceAdapter(ResourceAdapter ra) throws ResourceException - { - Utility.log(cName+".setResourceAdapter arg="+ra); - rai = (ResourceAdapterImpl)ra; - if (ra==null) { - String s = "Application Server cannot set ResourceAdapter to null"; - Utility.log(cName+".setResourceAdapter error: "+s); - throw new ResourceException(s); - } - if (this.ra==null) { - this.ra = ra; - } else if (this.ra != ra) { - String s = "ResourceAdapter already set to "+this.ra - +". Must not change association"; - Utility.log(cName+".setResourceAdapter error: "+s); - throw new ResourceException(s); - } - } - - // test "setter" methods in Message Driven Bean MessageTakerMD.java - // as specified in deployment descriptor - // - public void setFormat(String f) { - messageObjectType=f; // f="String" - } - public String getFormat() { - return messageObjectType; - } - // TODO ...other methods -} \ No newline at end of file diff --git a/jonas_tests/j2eeca/src/ersatz/resourceadapter/ConnectionFactoryImpl.java b/jonas_tests/j2eeca/src/ersatz/resourceadapter/ConnectionFactoryImpl.java deleted file mode 100644 index d5c9f93c0ab2ea1df1b176abaee9271635bb356c..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/src/ersatz/resourceadapter/ConnectionFactoryImpl.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Created on December 12, 2003 - * - * ConnectionFactoryImpl.java is used to test the J2EE Connector - * as implemented by JOnAS. - * - */ -package ersatz.resourceadapter; - -import javax.naming.Reference; -import javax.naming.NamingException; -import javax.resource.ResourceException; -import javax.resource.NotSupportedException; -import javax.resource.spi.ConnectionManager; -// interfaces implemented in this class -import javax.resource.cci.ConnectionFactory; -import javax.resource.cci.Connection; -import javax.resource.cci.ConnectionSpec; // j2ee 1.5 -import javax.resource.cci.RecordFactory; -import javax.resource.cci.ResourceAdapterMetaData; -import java.io.Serializable; -import javax.resource.Referenceable; -/** - * @author Bob Kruse - * - * used to test the J2EE Connector as implemented by JOnAS. - * - */ -public class ConnectionFactoryImpl implements ConnectionFactory, - Referenceable, Serializable - -{ - Reference reference; - private ConnectionManager cm; - private ManagedConnectionFactoryImpl mcf; // used in cm.allocateConnection - private ConnectionSpecImpl cs; // ConnectionSpec - protected boolean managed = true; - private String userName = ""; - private String passWord = ""; - String cName = "ConnectionFactoryImpl"; - - // - // ConnectionFactory instance created during lookup() by Application Server - // - public ConnectionFactoryImpl() { - } - public ConnectionFactoryImpl(ManagedConnectionFactoryImpl mcf, ConnectionManager cm) { - this.mcf=mcf; - this.cm=cm; - - } - // - // Container Managed Sign-on calls getConnection() from the Application Component - // - // Container-managed sign-on when deployment file contains line below - // - // Container - // - public Connection getConnection() - throws ResourceException - { - Utility.log(cName+".getConnection"+" (Container Managed Sign-on)"); - ConnectionImpl conn = null; - try { - conn = (ConnectionImpl)getConnection(null); - return conn; - } catch (ResourceException ex) { - throw ex; - } - } - // - // Component Managed Sign-on calls getConnection(cs) directly from the Application Component - // - // Component-managed sign-on when file "connector.xml / secured.jar" contains line below - // - // Application - // - public Connection getConnection(ConnectionSpec connectionspec) - throws ResourceException - { - ConnectionImpl conn = null; - ConnectionSpecImpl cs = null; - ConnectionRequestInfoImpl jcri=null; // - - if (connectionspec==null) { - mcf.setRes_Auth("Container"); - Utility.log(cName+".getConnection detected res-auth='"+mcf.getRes_Auth()+"'"); - // TODO what now? anything? - // now pass null to cm.allocateConnection(mcf, null); - } else { - mcf.setRes_Auth("Application"); - Utility.log(cName+".getConnection detected res-auth='"+mcf.getRes_Auth()+"'"); - cs = (ConnectionSpecImpl)connectionspec; - // load user and password into ConnectionRequestInfo instance - jcri = new ConnectionRequestInfoImpl(); - jcri.setUserName(cs.getUserName()); - jcri.setPassword(cs.getPassword()); - - } - Utility.log(cName+".getConnection calling cm.allocateConnection"); - try { - conn = (ConnectionImpl)cm.allocateConnection(mcf, jcri); - if (conn==null) { - Utility.log(cName+". getConnection, cm.allocateConnection" - +" error: Null connection object returned"); - throw new ResourceException("Null connection object returned by allocateConnection"); - } - conn.crii=jcri; - return conn; - } catch (IllegalStateException is) { - Utility.log(cName+".getConnection IllegalStateException"+is); - throw is; - } catch (ResourceException re) { - Utility.log(cName+".getConnection ResourceException="+re); - throw re; - } - } - - public RecordFactory getRecordFactory() - throws ResourceException - { - NotSupportedException nse = new NotSupportedException( - "RecordFactory is not currently supported"); - Utility.log(cName+".getRecordFactory "+nse); - throw nse; - } - - public ResourceAdapterMetaData getMetaData() - throws ResourceException - { - Utility.log(cName+".getMetaData"); - ResourceAdapterMetaData rd = null; // TODO do something - return rd; - } - public ConnectionManager getCM() { - return cm; - } - public ManagedConnectionFactoryImpl getMcf() { - return mcf; - } - // - // ***************** - // Reference - // ***************** - // - /** Required by the referencable attribute - * @param ref Reference object - **/ - public void setReference(javax.naming.Reference ref) - { - this.reference = ref; - } - - /** Required by the referencable attribute - * @return Reference object - **/ - public Reference getReference() - throws NamingException - { - return reference; - } -} diff --git a/jonas_tests/j2eeca/src/ersatz/resourceadapter/ConnectionImpl.java b/jonas_tests/j2eeca/src/ersatz/resourceadapter/ConnectionImpl.java deleted file mode 100644 index 9f5a1289396f175b884f6fc11b1f994ce7a267d0..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/src/ersatz/resourceadapter/ConnectionImpl.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Created on Jul 10, 2003 - * - * ConnectionImpl.java is used to test the J2EE Connector - * as implemented by JOnAS. - * - */ -package ersatz.resourceadapter; - -import javax.resource.ResourceException; -import javax.resource.NotSupportedException; -import javax.resource.cci.Connection; -import javax.resource.cci.Interaction; -import javax.resource.cci.ConnectionMetaData; -import javax.resource.cci.LocalTransaction; -import javax.resource.cci.ResultSetInfo; -import javax.resource.spi.ManagedConnection; -import javax.resource.spi.ConnectionEvent; -import javax.resource.spi.ConnectionRequestInfo; - -/** - * @author Bob Kruse - * - * Ersatz Resource Adapter - * - * used to test the J2EE Connector as implemented by JOnAS. - * - */ -public class ConnectionImpl - implements Connection -{ - public String product="Ersatz EIS"; // see J2eeConnectorTestBeanClient - String version="1.1"; - String UserName="Ersatz"; // - private ManagedConnectionImpl mc; - public ConnectionRequestInfoImpl crii = null; - public LocalTransactionImpl lt; - boolean closed = false; // connection is closed - String cName = "ConnectionImpl"; - private boolean autoCommitMode = false; - - public ConnectionImpl(ManagedConnectionImpl mc) { // constructor for Connection - Utility.log(cName+".constructor"); - this.mc=mc; - } - // - // close connection handle - // - public void close() throws ResourceException - { - Utility.log(cName - +".close with ConnectionEvent.CONNECTION_CLOSED=" - +ConnectionEvent.CONNECTION_CLOSED); - closed = true; - - if (mc != null) { - try { - mc.sendEvent(ConnectionEvent.CONNECTION_CLOSED, null, this); - mc=null; - Utility.log(cName - +".close sendevent 'CONNECTION_CLOSED'"); - } catch (ResourceException e) { - Utility.log(cName+".close error: unable to close"); - throw e; - } - } else { - Utility.log(cName+".close error: mc=null"); - } - return; - } - // - // close physical connection - // - // The connectionErrorOccurred method indicates that the associated - // ManagedConnection instance is now invalid and unusable. - // mc.sendEvent method makes the call to connectionErrorOccurred - // - public void close(int eType) throws ResourceException - { - Utility.log(cName+".close("+eType+")"); - closed = true; - - if (mc != null) { - try { - mc.sendEvent(eType, null, this); - mc=null; - Utility.log(cName - +".close(CONNECTION_ERROR_OCCURRED=" - +ConnectionEvent.CONNECTION_ERROR_OCCURRED+") to " - +"close physical connection"); - } catch (ResourceException e) { - Utility.log(cName - +".close error: unable to close physical connection" - +" with 'CONNECTION_ERROR_OCCURRED'"); - throw e; - } - } else { - Utility.log(cName+".close error: mc=null already"); - } - return; - } - public Interaction createInteraction() throws ResourceException - { - Utility.log(cName+".createInteraction"); - InteractionImpl gi=new InteractionImpl(this, mc); - // TODO Interaction gi = new Interaction(this, this.mc, lw); - return gi; - } - public ConnectionMetaData getMetaData() throws ResourceException - { - Utility.log(cName+".getMetaData"); - ConnectionMetaDataImpl eisInfo = new ConnectionMetaDataImpl(this, mc); - return eisInfo; - } - public LocalTransaction getLocalTransaction() - throws ResourceException - { - try { - lt = (LocalTransactionImpl)mc.getLocalTransaction(true); - Utility.log(cName+".getLocalTransaction lt="+lt); - } catch (Exception e) { - Utility.log(cName+".getLocalTransaction error: " - +e.getMessage()+" <<<<<<<<<<<<"); - } - return (lt); - } - public ResultSetInfo getResultSetInfo() throws ResourceException - { - Utility.log(cName+".getResultSetInfo"); - NotSupportedException nse = new NotSupportedException("getResultSetInfo is not supported"); - throw nse; - } - public void associateConnection(ManagedConnectionImpl mc) throws IllegalStateException - { - Utility.log(cName+".associateConnection"); - this.mc=mc; - } - public ManagedConnectionImpl getMC() throws ResourceException - { - if (mc==null) - Utility.log(cName+".getMC mc="+this.mc); - else - Utility.log(cName+".getMC mc="+this.mc+" mc.xar="+mc.xar+", mc.xari="+mc.xari); - return this.mc; - } - public void setAutoCommit(boolean a) { - autoCommitMode=a; - } - public boolean getAutoCommit() { - return autoCommitMode; - } -} diff --git a/jonas_tests/j2eeca/src/ersatz/resourceadapter/ConnectionMetaDataImpl.java b/jonas_tests/j2eeca/src/ersatz/resourceadapter/ConnectionMetaDataImpl.java deleted file mode 100644 index 0885ada93ae72a9942b9eccd89a4e863c00633fa..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/src/ersatz/resourceadapter/ConnectionMetaDataImpl.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Created on December 11, 2003 - * - * ConnectionMetaDataImpl.java is used to test the J2EE Connector - * as implemented by JOnAS. - * - */ -package ersatz.resourceadapter; - -import javax.resource.ResourceException; -import javax.resource.cci.ConnectionMetaData; - -/** - * @author Bob Kruse - * - * Ersatz Resource Adapter - * - * used to test the J2EE Connector as implemented by JOnAS. - * - */ -public class ConnectionMetaDataImpl - implements ConnectionMetaData -{ - public String product="Ersatz EIS"; // see J2eeConnectorTestBeanClient - String version="1.1"; - String UserName="Ersatz_User_Name"; // - private ManagedConnectionImpl mc; - private ConnectionImpl conn; - String cName = "ConnectionImpl"; - - // - // The method getUserName returns the user name for an active connection as - // known to the underlying EIS instance. The name corresponds the resource - // principal under whose security context a connection to the EIS - // instance has been established. - // - public ConnectionMetaDataImpl(ConnectionImpl c, ManagedConnectionImpl mc) { // constructor - Utility.log(cName+".constructor"); - this.mc=mc; - this.conn=c; - } - public String getEISProductName() - throws ResourceException - { - return (product); - } - public String getEISProductVersion() - throws ResourceException - { - return (version); - } - public String getUserName() - throws ResourceException - { - return (UserName); - } -} diff --git a/jonas_tests/j2eeca/src/ersatz/resourceadapter/ConnectionRequestInfoImpl.java b/jonas_tests/j2eeca/src/ersatz/resourceadapter/ConnectionRequestInfoImpl.java deleted file mode 100644 index 50fa16dba1a6e20ffd91e1ee8c4663bb47d2859a..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/src/ersatz/resourceadapter/ConnectionRequestInfoImpl.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Created on December 11, 2003 - * - * ConnectionRequestInfoImpl.java is used to test the J2EE Connector 1.5 - * as implemented by JOnAS. - */ -package ersatz.resourceadapter; - -import javax.naming.Reference; -import javax.resource.spi.ConnectionRequestInfo; - -/** - * @author Bob Kruse - * - * used to test the J2EE Connector as implemented by JOnAS. - * - */ -public class ConnectionRequestInfoImpl implements ConnectionRequestInfo -{ - Reference reference; - // Resource adapter name form EIS_URL - public String raName=""; - // Managed Connection Factory s - String serverName=""; - String portNumber=""; - String userName=""; - String password=""; - String protocol=""; - - String Id=""; // used in hashcode() for ConnectionRequestInfo - String cName = "ConnectionRequestInfoImpl"; - // - // constructor - public ConnectionRequestInfoImpl() - { - Id=""; - Utility.log(cName+"() "+this ); - } - public ConnectionRequestInfoImpl(ConnectionRequestInfoImpl crii) - { - raName=crii.raName; - serverName=crii.serverName; - portNumber=crii.portNumber; - userName =crii.userName ; - password =crii.password ; - protocol =crii.protocol ; - Id =""; - Utility.log(cName+"(crii) "+this); - - } - - // module to add additional connection properties than - // the ones configured for the ConnectionFactory. This - // class is passed to the App Server and will be used - // on matchManagedConnections or createConnection - // methods by the App Server. - // - // - public void setUserName(String u) { - userName=u; - Utility.log(cName+".setUserName="+u); - } - public void setPassword(String p) { - password=p; - Utility.log(cName+".setPassword="+p); - } - public String getUserName() { - Utility.log(cName+".getUserName="+userName); - return userName; - } - public String getPassword() { - Utility.log(cName+".getPassword="+password); - return password; - } - public void setRaName(String s) { - raName=s; - } - public void setServerName(String s) { - serverName=s; - } - public void setPortNumber(String s) { - portNumber=s; - } - public void setProtocol(String s) { - protocol=s; - } - public String getRaName() { - return raName; - } - public String getServerName() { - return serverName; - } - public String getPortNumber() { - return portNumber; - } - public String getProtocol() { - return protocol; - } - private void setId() - { - if (Id == null || Id.length() == 0) - Id=raName + serverName + portNumber + userName + password + protocol; - - } - public String getId() - { - setId(); - return Id; - - } - // - // hashCode and equals method used in ConnectionRequestInfo, - // ManagedConnectionFactory - public int hashCode() - { - setId(); - int hash = Id.hashCode(); - return hash; - } - public boolean equals(Object obj) - { - boolean ret = false; - if (obj!=null) { - if ( obj instanceof ConnectionRequestInfoImpl) { - ConnectionRequestInfoImpl other = (ConnectionRequestInfoImpl)obj; - try { - ret= raName.equalsIgnoreCase(other.raName) && - serverName.equalsIgnoreCase(other.serverName) && - portNumber.equalsIgnoreCase(other.portNumber) && - userName.equalsIgnoreCase(other.userName) && - password.equalsIgnoreCase(other.password) && - protocol.equalsIgnoreCase(other.protocol); - } catch (Exception e) { - ret=false; - } - } - } - Utility.log(cName+".equals "+ret); - return ret; - } - -} \ No newline at end of file diff --git a/jonas_tests/j2eeca/src/ersatz/resourceadapter/ConnectionSpecImpl.java b/jonas_tests/j2eeca/src/ersatz/resourceadapter/ConnectionSpecImpl.java deleted file mode 100644 index e48539794d14badca3b19c8301c558f391f249e5..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/src/ersatz/resourceadapter/ConnectionSpecImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Created on December 12, 2003 - * - * ConnectionFactoryImpl.java is used to test the J2EE Connector - * as implemented by JOnAS. - * - */ -package ersatz.resourceadapter; - -import javax.resource.cci.ConnectionSpec; // j2ee 1.5 -/** - * @author Bob Kruse - * - * used to test the J2EE Connector as implemented by JOnAS. - * - */ -public class ConnectionSpecImpl - implements ConnectionSpec - -{ - private String userName = ""; - private String passWord = ""; - String cName = "ConnectionSpecImpl"; - - public ConnectionSpecImpl() { - } - public void setUserName(String u) { - userName=u; - Utility.log(cName+".setUserName="+u); - } - public void setPassword(String p) { - passWord=p; - Utility.log(cName+".setPassword="+p); - } - public String getUserName() { - Utility.log(cName+".getUserName="+userName); - return userName; - } - public String getPassword() { - Utility.log(cName+".getPassword="+passWord); - return passWord; - } -} diff --git a/jonas_tests/j2eeca/src/ersatz/resourceadapter/DefaultConnectionManager.java b/jonas_tests/j2eeca/src/ersatz/resourceadapter/DefaultConnectionManager.java deleted file mode 100644 index 2efa2765e28c437a9384920b51391ec532190673..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/src/ersatz/resourceadapter/DefaultConnectionManager.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Created on March 3, 2004 - * - * DefaultConnectionManager.java is used to test the J2EE Connector - * as implemented by JOnAS. - * -*/ -package ersatz.resourceadapter; - -import java.io.Serializable; -import javax.resource.ResourceException; -import javax.resource.spi.ConnectionManager; -import javax.resource.cci.ConnectionFactory; -import javax.resource.spi.ConnectionRequestInfo; -import javax.resource.spi.ManagedConnectionFactory; -import javax.resource.spi.ResourceAdapterInternalException; - -/** - * @author Bob Kruse - * - * used to test the J2EE Connector as implemented by JOnAS. - * - */ -public class DefaultConnectionManager - implements ConnectionManager, Serializable -{ - - String cName = "DefaultConnectionManager"; - - /**

    This method gets called by the connection factory instance. - *

    - * - * @param ManagedConnectionFactory - * used by application server to delegate - * connection matching/creation - * @param ConnectionRequestInfo - * connection request Information - * - * @return connection handle to the appropriate GCOS system - * - * - * @throws ResourceException Generic exception - * @throws ResourceAllocationException - * Failed to allocate system resources for - * connection request - * @throws ResourceAdapterInternalException - * Resource adapter related error condition - **/ - public Object allocateConnection(ManagedConnectionFactory MCF, - ConnectionRequestInfo info) - throws ResourceException - { - Object obj; - - ManagedConnectionFactoryImpl mcf = (ManagedConnectionFactoryImpl) MCF; - try { - ManagedConnectionImpl mc = - (ManagedConnectionImpl) mcf.createManagedConnection(null, info); - obj = mc.getConnection(null, info); - Utility.log(cName+".allocateConnection mc.getConnection(null, info) obj="+obj); - return obj; - } - catch (ResourceAdapterInternalException raie) - { - throw raie; - } - catch (Exception ex) - { - ResourceException re = new ResourceException(ex.getMessage()); - throw re; - } - } - -} - \ No newline at end of file diff --git a/jonas_tests/j2eeca/src/ersatz/resourceadapter/ExecutionContext.java b/jonas_tests/j2eeca/src/ersatz/resourceadapter/ExecutionContext.java deleted file mode 100644 index 40ad9ce30007c7720762361a995e9ca286c9fe34..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/src/ersatz/resourceadapter/ExecutionContext.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Created on January 27, 2004 - * - * ExecutionContext.java is used to test JCA 1.5 as implemented by - * JOnAS. This class implements the ExecutionContext Interface - * - */ -package ersatz.resourceadapter; - -import javax.transaction.xa.Xid; -import javax.resource.NotSupportedException; - -/** - * @author Bob Kruse - * - * JCA1.5 ExecutionContext class - * - * used to test the J2EE Connector as implemented by JOnAS. - * - */ -public class ExecutionContext -{ - private Xid xid; - private long seconds; - String cName = "ExecutionContext"; - - public void setXid(Xid xid) - { - this.xid=xid; - Utility.log(cName+".setXid of="+xid); - } - public Xid getXid() - { - return xid; - } - public long getTransactionTimeout() - { - return seconds; - } - public void setTransactionTimeout(long seconds) - throws NotSupportedException - { - Utility.log(cName+".setTransactionTimeout seconds="+seconds); - this.seconds=seconds; - } -} \ No newline at end of file diff --git a/jonas_tests/j2eeca/src/ersatz/resourceadapter/InteractionImpl.java b/jonas_tests/j2eeca/src/ersatz/resourceadapter/InteractionImpl.java deleted file mode 100644 index 7535806c905b3ce0d000b62bae9b7db37310a781..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/src/ersatz/resourceadapter/InteractionImpl.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Created on December 10, 2003 - * - * InteractionImpl.java is used to test the J2EE Connector - * as implemented by JOnAS. This class implements the Interaction - * (cci) classes. - * - */ -package ersatz.resourceadapter; - -import javax.resource.ResourceException; -import javax.resource.NotSupportedException; -import javax.resource.cci.Interaction; -import javax.resource.cci.InteractionSpec; -import javax.resource.cci.Connection; -import javax.resource.cci.Record; -import javax.resource.cci.ResourceWarning; -/** - * @author Bob Kruse - * - * Jtest Resource Adapter - * - * used to test the J2EE Connector as implemented by JOnAS. - * - */ -public class InteractionImpl - implements Interaction -{ - - private Record output; - private boolean closed = false; - private ConnectionImpl con; - private ManagedConnectionImpl mcon; - String cName = "InteractionImpl"; - - public InteractionImpl(ConnectionImpl c) { - Utility.log(cName+".constructor"); - con=c; - } - public InteractionImpl(ConnectionImpl c, ManagedConnectionImpl mc) { - Utility.log(cName+".constructor"); - con=c; - mcon=mc; - } - /* - If an Interaction implementation does not support a variant of the execute - method, the method must throw a javax.resource.NotSupportedException. - */ - public boolean execute(InteractionSpec ispec, - Record input, - Record output) throws ResourceException - { - NotSupportedException nse = new NotSupportedException( - "InteractionImpl.execute is not currently supported"); - Utility.log(cName+".execute "+nse.toString()); - throw nse; - } - public Record execute(InteractionSpec ispec, - Record input) throws ResourceException - { - NotSupportedException nse = new NotSupportedException( - "InteractionImpl.execute is not currently supported"); - Utility.log(cName+".execute "+nse.toString()); - throw nse; - } - public void close() - throws ResourceException - { - Utility.log(cName+".close"); - closed=true; - } - public Connection getConnection() - { - Utility.log(cName+".getConnection"); - return con; - } - public ResourceWarning getWarnings() - throws ResourceException - { - Utility.log(cName+".getWarnings"); - NotSupportedException nse = new NotSupportedException( - "InteractionImpl.getWarnings is not currently supported"); - throw nse; - } - public void clearWarnings() - throws ResourceException - { - Utility.log(cName+".clearWarnings"); - NotSupportedException nse = new NotSupportedException( - "InteractionImpl.clearWarnings is not currently supported"); - throw nse; - } - -} diff --git a/jonas_tests/j2eeca/src/ersatz/resourceadapter/InteractionSpecImpl.java b/jonas_tests/j2eeca/src/ersatz/resourceadapter/InteractionSpecImpl.java deleted file mode 100644 index 8cf65e8321b6e4f8ab4752b25d287cc803ba0f21..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/src/ersatz/resourceadapter/InteractionSpecImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Created on December 10, 2003 - * - * JtestInteraction.java is used to test the J2EE Connector - * as implemented by JOnAS. - * - */ -package ersatz.resourceadapter; - -import javax.resource.cci.InteractionSpec; -import javax.resource.cci.Record; -import javax.resource.cci.ResultSet; - -/** - * @author Bob Kruse - * - * Jtest Resource Adapter - * - * used to test the J2EE Connector as implemented by JOnAS. This is an empty - * class used to avoid an error of missing "implements InteractionSpec". - * - */ -public class InteractionSpecImpl - implements InteractionSpec, java.io.Serializable -{ - - private boolean closed = false; - private ConnectionImpl con; - private ManagedConnectionImpl mcon; - String cName = "InteractionSpecImpl"; - - /**************************** - * InteractionSpec methods - ****************************/ - public InteractionSpecImpl() { - Utility.log(cName+".constructor"); - } -} diff --git a/jonas_tests/j2eeca/src/ersatz/resourceadapter/LocalTransactionImpl.java b/jonas_tests/j2eeca/src/ersatz/resourceadapter/LocalTransactionImpl.java deleted file mode 100644 index 361e3e5a4c87fd2b3e03230ae689c4e86a4cbb1e..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/src/ersatz/resourceadapter/LocalTransactionImpl.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Created on December 10, 2003 - * - * LocalTransactionImpl.java is used to test the J2EE Connector - * as implemented by JOnAS. This class implements - * javax.resource.spi.LocalTransaction and - * javax.resource.cci.LocalTransaction - */ -package ersatz.resourceadapter; - -import javax.resource.ResourceException; -import javax.resource.spi.ManagedConnection; -import javax.resource.spi.ConnectionEvent; - -/** - * @author Bob Kruse - * - * Jtest Resource Adapter - * - * used to test the J2EE Connector as implemented by JOnAS. - * - */ -public class LocalTransactionImpl - implements javax.resource.spi.LocalTransaction, - javax.resource.cci.LocalTransaction -{ - private ManagedConnection mc; - String cName = "LocalTransactionImpl"; - private boolean sendEvent; - // - // This LocalTransactionImpl instance STATE - final private int RESET = 0; - final private int BEGUN = 1; - final private int ENDED = 2; - final private int PREPARED = 3; - final private int FORGOT = 4; - final private int COMMITTED = 5; - final private int ROLLEDBACK = 6; - - int txState; - - public LocalTransactionImpl(ManagedConnection MC, boolean se) { - Utility.log(cName+".constructor"); - this.mc = MC; - txState = RESET; - sendEvent = se; - } - public void setSendEvent(boolean event) { - sendEvent=event; - } - public int getTxState() { - return txState; - } - public ManagedConnection getCurrentMc() { - return mc; - } - public void begin() throws ResourceException - { - Utility.log(cName+".begin (enter) txState="+txState); - int curState=txState; - ManagedConnectionImpl omc = (ManagedConnectionImpl) mc; - try { - if (txState==RESET) { - if (sendEvent) { - omc.sendEvent(ConnectionEvent.LOCAL_TRANSACTION_STARTED, null, omc.getCHandle()); - txState=BEGUN; - Utility.log(cName - +".begin (exit) (sendEvent(LOCAL_TRANSACTION_STARTED=" - +ConnectionEvent.LOCAL_TRANSACTION_STARTED+"))" - +" From State="+curState+" to State="+txState); - } else { - txState=BEGUN; - } - omc.inLocalTrans=true; - } - else { - IllegalStateException ex = new IllegalStateException("LocalTransaction Already active"); - Utility.log(cName+".begin (exit) error: State="+txState - +" should be="+RESET+". "+ex.getMessage()); - throw ex; - } - - } catch (Exception e) { - Utility.log(cName - +".begin (exit) error: unable to sendEvent" - +" with 'LOCAL_TRANSACTION_STARTED' "+e.toString()); - } - } - public void commit() throws ResourceException - { - Utility.log(cName+".commit (enter) txState="+txState); - int curState=txState; - ManagedConnectionImpl omc = (ManagedConnectionImpl) mc; - try { - if (txState==BEGUN) { - if (sendEvent) { - omc.sendEvent(ConnectionEvent.LOCAL_TRANSACTION_COMMITTED, null, omc.getCHandle()); - txState=COMMITTED; - Utility.log(cName - +".commit (exit) (sendEvent(LOCAL_TRANSACTION_COMMITTED=" - +ConnectionEvent.LOCAL_TRANSACTION_COMMITTED+"))" - +" From State="+curState+" to State="+txState); - } else { - txState=COMMITTED; - } - } - else { - IllegalStateException ex = new IllegalStateException( - "LocalTransaction Illegal State during commit"); - Utility.log(cName+".commit (exit) error: State="+txState - +" should be="+BEGUN+". "+ex.getMessage()); - omc.inLocalTrans=false; - throw ex; - } - } catch (Exception e) { - Utility.log(cName - +".commit (exit) error: unable to sendEvent" - +" with 'LOCAL_TRANSACTION_COMMITTED' "+e.toString()); - } - omc.inLocalTrans=false; - } - public void rollback() throws ResourceException - { - int curState=txState; - Utility.log(cName+".rollback (enter) txState="+txState); - ManagedConnectionImpl omc = (ManagedConnectionImpl) mc; - try { - if (txState == BEGUN) { - if (sendEvent) { - omc.sendEvent(ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK, null, omc.getCHandle()); - txState=ROLLEDBACK; - Utility.log(cName - +".rollback (exit) (sendEvent(LOCAL_TRANSACTION_ROLLEDBACK=" - +ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK+"))" - +" From State="+curState+" to State="+txState); - } else { - txState=ROLLEDBACK; - } - } - else { - IllegalStateException ex = new IllegalStateException( - "LocalTransaction Illegal State during rollback"); - Utility.log(cName+".rollback (exit) error: State="+txState - +" should be="+BEGUN+". "+ex.getMessage()); - omc.inLocalTrans=false; - throw ex; - } - } catch (Exception e) { - Utility.log(cName - +".rollback (exit) error: unable to sendEvent" - +" with 'LOCAL_TRANSACTION_ROLLEDBACK' "+e.toString()); - } - omc.inLocalTrans=false; - } -} diff --git a/jonas_tests/j2eeca/src/ersatz/resourceadapter/ManagedConnectionFactoryImpl.java b/jonas_tests/j2eeca/src/ersatz/resourceadapter/ManagedConnectionFactoryImpl.java deleted file mode 100644 index 5c718e09d5a2dca738b3775e9ba46d043fd7bb97..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/src/ersatz/resourceadapter/ManagedConnectionFactoryImpl.java +++ /dev/null @@ -1,406 +0,0 @@ -/* - * Created on December 11, 2003 - * - * ManagedConnectionFactoryImpl.java is part of a Resource Adapter to test - * J2EE Connector 1.5 as implemented by JOnAS. - */ -package ersatz.resourceadapter; - -import javax.naming.Reference; -import java.io.PrintWriter; -import java.util.Set; -import java.util.Timer; -import java.util.Iterator; -import java.util.Date; -import javax.security.auth.Subject; -import javax.resource.ResourceException; -import javax.resource.NotSupportedException; -import javax.resource.spi.ResourceAllocationException; -import javax.resource.spi.ManagedConnectionFactory; -import javax.resource.spi.ResourceAdapterAssociation; -import javax.resource.spi.ConnectionManager; -import javax.resource.spi.ConnectionRequestInfo; -import javax.resource.spi.ManagedConnection; -import javax.resource.spi.ResourceAdapter; -import javax.resource.spi.BootstrapContext; -import javax.resource.spi.security.PasswordCredential; -import java.io.Serializable; - -/** - * @author Bob Kruse - * - * used to test the J2EE Connector as implemented by JOnAS. - * - */ -public class ManagedConnectionFactoryImpl - implements ManagedConnectionFactory, ResourceAdapterAssociation, - Serializable -{ - Reference reference; - public String defaultUserName=""; // used in ManagedConnectionImpl, ConnectionRequestInfo - public String defaultPassword=""; // set by "getter" method - - // loaded by Application Server - ResourceAdapter ra=null; - String ServerName=""; - String PortNumber=""; - String userName=""; - String password=""; - String protocol=""; - - public ConnectionManager cm; // loaded by ManagedConnectionFactory - private ManagedConnectionFactoryImpl mcf; - private ConnectionRequestInfoImpl crii; - private ResourceAdapterImpl rai=null; // re-cast at the same time - private BootstrapContext bootstrapCtx; // used to test timer - private boolean raLoaded=false; - PrintWriter pw; // App Server sets to null by default - boolean forceMatchNull; // in matchManagedConnections() when debugging - public String res_auth; // set by ConnectionFactory.getConnection() - // then put into ManagedConnection when created - String mfId; - String cName="ManagedConnectionFactoryImpl"; - // - public ManagedConnectionFactoryImpl() - { - crii = new ConnectionRequestInfoImpl(); - pw = null; - } - - public Object createConnectionFactory(ConnectionManager connectionmanager) - throws ResourceException - { - cm = connectionmanager; - Utility.log(cName+".createConnectionFactory cm="+cm); - Object obj; - obj = new ConnectionFactoryImpl(this, cm); // creates ConnectionFactory - return obj; - } - /** - * - * When the createConnectionFactory method takes no arguments, the resource adapter - * provides a default ConnectionManager instance. This case is used in a non-managed - * application scenario. - */ - public Object createConnectionFactory() - throws ResourceException - { - Utility.log(cName+": error - non-managed detected"); - throw new NotSupportedException( - "A non-managed two-tier application environment is not supported in J2EE testing."); - } - public ManagedConnection createManagedConnection(Subject subject, - ConnectionRequestInfo CRI) - throws ResourceException - { - ConnectionRequestInfoImpl info = (ConnectionRequestInfoImpl)CRI; - Utility.log(cName+".createManagedConnection subject="+subject - +", cri="+info); - mcf = this; - ManagedConnectionImpl mc; - if (subject!=null) { - // - // The application server user's password to the EIS is carried in Subject - // - try { - PasswordCredential pc = Utility.getPasswordCredential(this, subject, info); - if (pc==null) { - Utility.log(cName - +".createManagedConnection PasswordCredential = null, Subject not null."); - } else { - if (pc.getUserName()==null || pc.getUserName().length()==0) { - Utility.log(cName+".createManagedConnection userName=empty"); - } else { - userName = new String(pc.getUserName()); - Utility.log(cName+".createManagedConnection" - +" PasswordCredential userName="+userName); - password = new String(pc.getPassword()); // pc.password is char[] - Utility.log(cName+".createManagedConnection" - +" PasswordCredential password="+password); - } - } - } catch (Exception e) { - Utility.log(cName+".createManagedConnection getPasswordCredential " - +"error: e="+e.toString()); - } - } - - if (info != null) { - // - // The client application component user's password is carried in info - // Use defaults if userName or password is empty - // - String s = info.getUserName(); - if (s.length()>0) userName = s; - else - Utility.log(cName+".createManagedConnection" - +" ConnectionRequestInfo userName="+s+". Use default="+userName); - Utility.log(cName+".createManagedConnection" - +" ConnectionRequestInfo userName="+userName); - s = info.getPassword(); - if (s.length()>0) password = s; - else - Utility.log(cName+".createManagedConnection" - +" ConnectionRequestInfo password="+s+". Use default="+password); - Utility.log(cName+".createManagedConnection" - +" ConnectionRequestInfo password="+password); - } - - if ((subject==null && info==null) || userName=="") { - // - // The default user's password is carried in the ManagedConnectionFactory instance - // - userName=defaultUserName; - password=defaultPassword; - Utility.log(cName+".createManagedConnection default userName="+userName); - Utility.log(cName+".createManagedConnection default password="+password); - } - ConnectionRequestInfoImpl mcCrii = new ConnectionRequestInfoImpl(crii); - mcCrii.setPassword(password); - mcCrii.setUserName(userName); - try { - // - // Create the ManagedConnectionImpl Instance - // - mc = new ManagedConnectionImpl(mcCrii); - mc.setMcf(mcf); - mc.setRes_Auth(res_auth); - mc.setLogWriter(pw); - Utility.log(cName+".createManagedConnection for eis="+rai.getEIS_URL() - +" mc="+mc); - return mc; - } catch (Exception ex) { - Utility.log(cName+".createManagedConnection : error - Exception ex=" - +ex.getMessage()); - throw new ResourceAllocationException(ex.getMessage()); - } - } - public void setMatchNull(boolean truefalse) { // nobody calls this - forceMatchNull=truefalse; - } - public ManagedConnection matchManagedConnections(Set connectionSet, - Subject subject, - ConnectionRequestInfo info) - throws ResourceException - { - String mName=".matchManagedConnections"; - Utility.log(cName+mName+" Set="+connectionSet+" Subject="+subject+" Crinfo="+info); - ManagedConnectionImpl mc = null; - if (forceMatchNull) { - Utility.log(cName+mName+" force new connection"); - return mc; // forces new connection - } - - ConnectionRequestInfoImpl mcCrii = null; - ConnectionRequestInfoImpl curCrii = new ConnectionRequestInfoImpl(crii); - ManagedConnectionImpl wmc = null; - Iterator it = connectionSet.iterator(); - int cnt=0; - while (it.hasNext()) { - Object obj = it.next(); - Utility.log(cName+mName - +" find next ManagedConnectionImpl in Set cnt="+ (++cnt)+" obj="+obj); - if (obj instanceof ManagedConnectionImpl) { - // see if ManagedConnectionImpl is available - // i.e., no connection handle exists for mc instance - // i.e., the connection is closed - // TODO choose one of the above - wmc = (ManagedConnectionImpl) obj; - mcCrii=wmc.getCrii(); - if (curCrii.equals(mcCrii)) { - if (wmc.getCHandle()==null || wmc.isClosed()) { - mc=wmc; - Utility.log(cName+mName - +" connection handle == null. Set cnt="+cnt+" matched mc="+wmc); - - } else { - // error: connection should not exist J2ee 1.0 pg. 32 - String s = "connection handle should not exist"; - Utility.log(cName+mName - +"error: "+s+". connectionSet cnt="+cnt); - } - } - - } - } - if (mc==null) - Utility.log(cName+mName+" mc=null No match found. Set cnt="+cnt); - else - Utility.log(cName+mName+" match found mc="+mc); - return mc; - } - // - // The setLogWriter and getLogWriter - // the Application Server calls ManagedConnectionImpl.setLogWriter(pw) - // - public void setLogWriter(PrintWriter printwriter) - throws ResourceException - { - Utility.log(cName+".setLogWriter mcfi.pw="+pw+" ApplicationServer's PrintWriter="+printwriter); - if (printwriter!=null) pw = printwriter; - } - - public PrintWriter getLogWriter() - throws ResourceException - { - return pw; - } - public ResourceAdapter getResourceAdapter() - { - return ra; - } - /** Set the ResourceAdapter association. - * - * @param ra ResourceAdapter passed in by Application Server (JOnAS) - * @exception javax.resource.ResourceException - **/ - public void setResourceAdapter(ResourceAdapter ra) throws ResourceException - { - Utility.log(cName+".setResourceAdapter arg="+ra); - if (ra==null) { - String s = "Application Server cannot set ResourceAdapter to null"; - Utility.log(cName+".setResourceAdapter error: "+s); - throw new ResourceException(s); - } - if (!raLoaded) { - this.ra = ra; - rai = (ResourceAdapterImpl)ra; - crii.setRaName(rai.getEIS_URL()); - raLoaded=true; // load exactly once - } else { - if (this.ra==ra) { - String s = "setResoruceAdapter called again by the Application " - +"Server with same ResourceAdapter value."; - Utility.log(cName+".setResourceAdapter error: "+s); - throw new ResourceException(s); - } else { - String s = "ResourceAdapter already set to "+this.ra - +". Must not change association"; - Utility.log(cName+".setResourceAdapter error: "+s); - throw new ResourceException(s); - } - } - } - // - // config-property processing "setter" properties - // - /** Set the JOnAS config-property.. Default value is "". - * - * @param c1 String of config-property. - * for testng RA. - **/ - public void setServerName(String c1) - { - ServerName = c1; - crii.setServerName(ServerName); - //Utility.log(cName+".setServerName="+ServerName); - } - public String getServerName() { - return ServerName; - } - public void setPortNumber(String s) - { - PortNumber=s; - crii.setPortNumber(PortNumber); - //Utility.log(cName+".setPortNumber="+PortNumber); - } - public String getPortNumber() - { - return PortNumber; - } - public void setDUserName(String s) - { - defaultUserName=s; - crii.setUserName(s); - //Utility.log(cName+".setDUserName="+defaultUserName); - } - public String getDUserName() - { - return defaultUserName; - } - public void setDPassword(String s) - { - defaultPassword=s; - crii.setPassword(s); - //Utility.log(cName+".setDPassword="+defaultPassword); - } - public String getDPassword() - { - return defaultPassword; - } - public void setProtocol(String s) - { - protocol=s; - crii.setProtocol(protocol); - //Utility.log(cName+".setProtocol="+protocol); - } - public String getProtocol() - { - return protocol; - } - public ConnectionManager getCM() - { - return cm; - } - public String getRes_Auth() { - return res_auth; - } - public void setRes_Auth(String r) { - res_auth=r; - } - // - // hashCode and equals method used in ConnectionRequestInfo, - // ManagedConnectionFactory - public int hashCode() - { - if (mfId == null || mfId.length() == 0) { - crii.hashCode(); - mfId = crii.getId(); - } - int hash = mfId.hashCode(); - return hash; - } - public boolean equals(Object other) - { - boolean match = false; - if (other==null) { - return match; - } - if (other instanceof ManagedConnectionFactoryImpl) { - ManagedConnectionFactoryImpl otherMcf = (ManagedConnectionFactoryImpl)other; - try { - if (hashCode() != otherMcf.hashCode()) { - Utility.log(cName+".equals("+otherMcf+") return="+match); - return false; - } - match = crii.equals(otherMcf.crii); - } catch (Exception e) { - Utility.log(cName+".equals("+otherMcf+") Exception="+e); - return false; - } - } - return match; - } - /* 10.3.7 - A resource adapter may not be able to directly create a Timer instance, if it does - not have adequate runtime permissions to create threads. This is because the Timer - instance starts a background thread. In such a case, the resource adapter can - instead use the BootstrapContext instance to obtain a Timer instance from the - application server. - */ - public boolean isTimerWorking() - { - ResourceAdapterImpl rai = (ResourceAdapterImpl)ra; - try { - if (rai.bootstrapCtx==null) { - throw new Exception("bootstrapCtx=null"); - } - Timer timer = rai.bootstrapCtx.createTimer(); // get a Timer instance - Utility.log(cName+".isTimerWorking Timer was created. "); - return true; - } catch (Exception e) { - Utility.log(cName+".isTimerWorking Error: "+e); - return false; - } - } -} diff --git a/jonas_tests/j2eeca/src/ersatz/resourceadapter/ManagedConnectionImpl.java b/jonas_tests/j2eeca/src/ersatz/resourceadapter/ManagedConnectionImpl.java deleted file mode 100644 index 6023e018ba969b5ab474a9d4e4aecf4e22be37b1..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/src/ersatz/resourceadapter/ManagedConnectionImpl.java +++ /dev/null @@ -1,381 +0,0 @@ -/* - * Created on December 11, 2003 - * - * ManagedConnectionImpl.java is a Resource Adapter class to test the J2EE Connector - * as implemented by JOnAS. - */ -package ersatz.resourceadapter; - -import java.io.PrintWriter; -import java.util.Date; -import java.util.Vector; // <========= -import javax.security.auth.Subject; -import javax.resource.ResourceException; -import javax.resource.spi.ConnectionEvent; -import javax.transaction.xa.XAResource; -import javax.resource.spi.ManagedConnectionFactory; -import javax.resource.spi.ConnectionEventListener; -import javax.resource.spi.ConnectionManager; -import javax.resource.spi.ConnectionRequestInfo; -import javax.resource.spi.LocalTransaction; -import javax.resource.spi.ManagedConnection; -import javax.resource.spi.ManagedConnectionMetaData; - -/** - * @author Bob Kruse - * - * used to test the J2EE Connector as implemented by JOnAS. - * - */ -public class ManagedConnectionImpl - implements ManagedConnection -{ - String Id = ""; - private String userName=""; - private String password=""; - private ManagedConnectionFactory mcf; // loaded by ManagedConnectionFactory - public ConnectionManager cm; // loaded by ManagedConnectionFactory - private ConnectionRequestInfoImpl crii; - public LocalTransactionImpl loTx=null; - PrintWriter pw; // App Server sets to null by default - private Vector listeners; - //Managed environment - public String res_auth; // set by ConnectionFactory.getConnection() - // then put into ManagedConnection when created - public String re_authentication_UserName; // set by ConnectionFactory.getConnection() - public String re_authentication_Password; - public XAResource xar; - public XAResourceImpl xari; - boolean closed; - public ConnectionImpl cHandle; // ManagedConnection mapped 1:1 to a physical connection - private boolean destroyed; //set when destroyed - public boolean inXATrans; - public boolean inLocalTrans; - public boolean sendEvent; - String cName = "ManagedConnectionImpl"; - - // - // constructor - public ManagedConnectionImpl(ConnectionRequestInfoImpl CRII) - { - crii = new ConnectionRequestInfoImpl(CRII); - userName=crii.userName; - password=crii.password; - closed = true; - listeners = new Vector(); - pw = null; - xar = null; - xari = null; - loTx = null; - } - public void setUserName(String u) { - userName=u; - Utility.log(cName+".setUserName="+u); - } - public void setPassword(String p) { - password=p; - Utility.log(cName+".setPassword="+p); - } - public void setRes_Auth(String r) { - res_auth=r; - Utility.log(cName+".setRes_Auth="+r); - } - // - // Referenced classes of package javax.resource.spi: - // ConnectionRequestInfo, ConnectionEventListener, LocalTransaction, - // ManagedConnectionMetaData - // - // NOTE: Subject is instantiated by Application Server - // - public int cntListeners() { - Vector lst = (Vector) listeners.clone(); - int len = lst.size(); - Utility.log(cName+".cntListeners counted="+len); - return len; - } - public ConnectionImpl getCHandle() { - return cHandle; - } - public boolean isClosed() { - return closed; - } - public ConnectionRequestInfoImpl getCrii() { - return crii; - } - - public Object getConnection(Subject subject, ConnectionRequestInfo connectionrequestinfo) - throws ResourceException - { - Utility.log(cName+".getConnection *******************"); - if (subject!=null) { - // - // for this code to execute, the following will be present in ra.xml - // true - // - Utility.log(cName+".getConnection via PasswordCredential"); - Utility.log("true"); - try { - // TODO Find out about org.ietf.jgss.GSSCredential interface in J2SE 1.4 - } catch (Exception e) { - Utility.log(cName+".getConnection getPasswordCredential error: e=" - +e.toString()); - } - } - // Code for reauthentication-support when Subject==null and ConnectionRequestInfo - // contains different password and username - // - if (connectionrequestinfo!=null) { - Utility.log(cName+".getConnection via ConnectionRequestInfo"); - Utility.log("true"); - ConnectionRequestInfoImpl cri = (ConnectionRequestInfoImpl)connectionrequestinfo; - String re_authentication_UserName = new String(cri.getUserName()); - String re_authentication_Password = new String(cri.getPassword()); - Utility.log( - " re-authentication userName="+re_authentication_UserName+ - " compare to existing userName="+userName); - Utility.log( - " re-authentication password="+re_authentication_Password+ - " compare to existing password="+password); - } - Object obj = new ConnectionImpl(this); - cHandle = (ConnectionImpl)obj; - closed=false; - destroyed=false; - return obj; - } - public void destroy() - throws ResourceException - { - Utility.log(cName+".destroy"); - // the physical connection is closed - destroyed = true; - closed = true; - cHandle=null; - } - - public void cleanup() - throws ResourceException - { - // the physical connection stays open - // but all connection handles invalidated - Utility.log(cName+".cleanup"); - cHandle=null; - closed=true; - - } - - public void associateConnection(Object obj) - throws ResourceException - { - Utility.log(cName+".associateConnection"); - if (obj instanceof ConnectionImpl) { - ConnectionImpl conn = (ConnectionImpl) obj; - conn.associateConnection(this); // TODO may need more arg to associate - } else { - Utility.log(cName+".associateConnection "+ - "error: obj not instanceof ConnectionImpl"); - } - } - - public void addConnectionEventListener(ConnectionEventListener listener) - { - listeners.addElement(listener); - Utility.log(cName+".addConnectionEventListener listener=" - +listener); - } - - public void removeConnectionEventListener(ConnectionEventListener listener) - { - Vector lst = (Vector) listeners.clone(); - int len = lst.size(); - Utility.log(cName+".removeConnectionEventListener " - +"Number of listeners="+len); - try { - listeners.removeElement(listener); - } catch (Exception e) { - Utility.log(cName+".removeConnectionEventListener error: " - +"unable to remove listener"); - } - lst = (Vector) listeners.clone(); - len = lst.size(); - Utility.log(cName+".removeConnectionEventListener listener=" - +listener+" was removed. Number listeners left="+len); - } - - public XAResource getXAResource() - throws ResourceException - { - // TODO determine if NoTransaction - // throw ResourceException - if (xar==null) - xar = (XAResource)new XAResourceImpl(this); - Utility.log(cName+".getXAResource xar="+xar); - return xar; - } - public void resetXar() { - // dissociate XAResource Xid from this ManagedConnection - Utility.log(cName+ - ".resetXar dissociate XAResource Xid from this ManagedConnection"); - xar=null; - xari=null; - } - public XAResourceImpl getCurrentXar() - throws ResourceException - { - xari=(XAResourceImpl)xar; - Utility.log(cName+".getCurrentXar xari="+xari); - return xari; - } - - public javax.resource.cci.LocalTransaction getLocalTransaction(boolean sendEvent) - throws ResourceException - { - LocalTransactionImpl lt = null; - Utility.log(cName+".getLocalTransaction(sendEvent)"); - this.sendEvent=sendEvent; - try { - lt = (LocalTransactionImpl) getLocalTransaction(); - Utility.log(cName+".getLocalTransaction(sendEvent) lt="+lt); - } catch (Exception e) { - Utility.log(cName+".getLocalTransaction(sendEvent) " - +"error: "+e.getMessage()); - } - return (lt); - } - - public LocalTransaction getLocalTransaction() - throws ResourceException - { - Utility.log(cName+".getLocalTransaction"); - if (loTx==null) { - loTx = new LocalTransactionImpl(this, sendEvent); - Utility.log(cName+".getLocalTransaction new loTx="+loTx); - return loTx; - } else { - Utility.log(cName+".getLocalTransaction old loTx="+loTx); - loTx.setSendEvent(sendEvent); - return loTx; - } - } - - public ManagedConnectionMetaData getMetaData() - throws ResourceException - { - Utility.log(cName+".getMetaData"); - return new ManagedConnectionMetaDataImpl(); - } - /** Send the specified event to all the EventListeners that have - * registered with this ManagedConnection instance. - * - * @param int Event type to send - * @param Exception if one is associated with this event - * @param ch Connection handle associated with this event - * @throws ResourceException generic exception if operation fails - * @throws IllegalArgumentException if an invalid event is specified - **/ - public void sendEvent(int eType, Exception ex, Object ch) throws ResourceException - { - Vector lst = (Vector) listeners.clone(); - ConnectionEvent ce = null; - if (ex==null) { - ce = new ConnectionEvent(this, eType); - } - else - ce = new ConnectionEvent(this, eType, ex); - - if (ch != null) - ce.setConnectionHandle(ch); - else - Utility.log(cName+".sendEvent ch==null"); - - int len = lst.size(); - for (int i=0; iRESET) { - xidState=COMMITTED; - Utility.log(cName+".commit From State="+curState+ - " to State="+xidState+" xid="+xid+" onePhase="+onePhase); - } - else { - Utility.log(cName+".commit error: State="+xidState - +" should be="+STARTED+"or more. xid="+xid+" onePhase="+onePhase); - } - } - public void end(Xid xid, int flags) throws XAException - { - int curState=xidState; - xidState=ENDED; - ManagedConnectionImpl jmc = (ManagedConnectionImpl) mc; - jmc.resetXar(); - Utility.log(cName+".end From State="+curState+ - " to State="+xidState+" for xid="+xid+" flags="+flags); - } - public void forget(Xid xid) throws XAException - { - Utility.log(cName+".forget State="+xidState); - xidState=FORGOT; - } - public int prepare(Xid xid) throws XAException - { - Utility.log(cName+".prepare State="+xidState); - xidState=PREPARED; - //return 1; - return XA_OK; - } - /** - * Obtain a list of prepared transaction branches from a resource manager. - */ - public Xid[] recover(int flag) throws XAException - { - recoverFlag=flag; - Utility.log(cName+".recover State="+xidState); - return xidArray; - } - public void rollback(Xid xid) throws XAException - { - int curState=xidState; - if (xidState >= STARTED) { - xidState=ROLLEDBACK; - Utility.log(cName+".rollback From State="+curState+ - " to State="+xidState+" xid="+xid); - } - else { - Utility.log(cName+".rollback error: State="+xidState - +" should be="+STARTED+"or more. xid="+xid); - } - } - public void start(Xid xid, int flags) throws XAException - { - Utility.log(cName+".start xid="+xid+" flags="+flags); - currentXid=xid; - xFlags=flags; - int curState=xidState; - if (xidState==RESET) { - xidState=STARTED; - Utility.log(cName+".start From State="+curState+ - " to State="+xidState+" xid="+xid+" flags="+flags); - } - else { - Utility.log(cName+".start error: State="+xidState - +" should be="+RESET+" xid="+xid+" flags="+flags); - } - } - public int getTransactionTimeout() throws XAException - { - Utility.log(cName+".getTransactionTimeout timeout="+timeout); - return timeout; - } - public boolean setTransactionTimeout(int seconds) throws XAException - { - timeout=seconds; - Utility.log(cName+".setTransactionTimeout seconds="+seconds); - return true; - } - /** - * Determine if the resource manager instance represented by the target object is the - * same as the resource manager instance represented by the parameter xares - */ - public boolean isSameRM(XAResource xares) throws XAException - { - boolean a = true; - Utility.log(cName+".isSameRM xares="+xares+" return="+a); - return a; - } -} diff --git a/jonas_tests/j2eeca/src/fictional/resourceadapter/CommonClient.java b/jonas_tests/j2eeca/src/fictional/resourceadapter/CommonClient.java deleted file mode 100644 index ba9d0f2e7fbf6981b684f1755a9c038feee15363..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/src/fictional/resourceadapter/CommonClient.java +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Created on Jun 12, 2003 - * - * CommonClient.java is used to test the J2EE Connector - * as implemented by JOnAS. This class implements some the Common Client Interface - * (cci) classes. Each cci method simulates actual functionality and returns test - * results to the caller which is a JUnit test program. - * - */ -package fictional.resourceadapter; - -import javax.naming.Reference; -import javax.naming.NamingException; -import javax.resource.ResourceException; -import javax.resource.NotSupportedException; -import javax.resource.spi.ConnectionManager; -import javax.resource.spi.ManagedConnectionFactory; -import javax.resource.spi.ConnectionRequestInfo; -// interfaces implemented in this class -import javax.resource.cci.ConnectionFactory; -import javax.resource.cci.Connection; -import javax.resource.cci.ConnectionSpec; // j2ee 1.5 -import javax.resource.cci.RecordFactory; -import javax.resource.cci.ResourceAdapterMetaData; -import java.io.Serializable; -import javax.resource.Referenceable; -// logger imports -import org.ow2.jonas.lib.util.Log; -import org.objectweb.util.monolog.api.Logger; -import org.objectweb.util.monolog.api.BasicLevel; -/** - * @author Bob Kruse - * - * used to test the J2EE Connector as implemented by JOnAS. - * - */ -public class CommonClient - implements - ConnectionFactory, - ConnectionSpec, // j2ee 1.5 - ResourceAdapterMetaData, - Referenceable, - Serializable - -{ - Reference reference; - private ConnectionManager cm; - private ManagedConnectionFactory mcf; // used in cm.allocateConnection - private CommonClient cs; // ConnectionSpec - protected boolean managed = true; - private Logger logger = null; - private String userName = ""; - private String passWord = ""; - String cName = ""; - - public CommonClient() { - if (logger == null) { - logger = Log.getLogger("fictional.resourceadapter"); - } - } - // - // ***************** - // ConnectionSpec methods - // ***************** - // - public void setUserName(String u) { - userName=u; - cName = "ConnectionSpec"; - logger.log(BasicLevel.DEBUG, cName+".setUserName="+u); - } - public void setPassword(String p) { - passWord=p; - cName = "ConnectionSpec"; - logger.log(BasicLevel.DEBUG, cName+".setPassword="+p); - } - public String getUserName() { - cName = "ConnectionSpec"; - logger.log(BasicLevel.DEBUG, cName+".getUserName="+userName); - return userName; - } - public String getPassword() { - cName = "ConnectionSpec"; - logger.log(BasicLevel.DEBUG, cName+".getPassword="+passWord); - return passWord; - } - // - // ***************** - // ConnectionFactory methods - // ***************** - // - // Referenced classes of package javax.resource.cci: - // Connection, ConnectionSpec, RecordFactory, ResourceAdapterMetaData - // (below is constructor for ConnectionFactory - // - // ConnectionFactory instance created during lookup() by Application Server - // - public CommonClient(ManagedConnectionFactory mcf, ConnectionManager cm) { - if (logger == null) { - logger = Log.getLogger("fictional.resourceadapter"); - } - this.mcf=mcf; - this.cm=cm; - - } - private String impl(Object obj) { - if (obj instanceof ConnectionFactory) { - return "ConnectionFactory"; - } else if (obj instanceof ConnectionSpec) { - return "ConnectionSpec"; - } else if (obj instanceof ResourceAdapterMetaData) { - return "ResourceAdapterMetaData"; - } else - return "CommonClient. Is this an error"; - - } - // - // Container Managed Sign-on calls getConnection() from the Application Component - // - // Container-managed sign-on when file "connector.xml / secured.jar" contains line below - // - // Container - // - public Connection getConnection() - throws ResourceException - { - cName = "ConnectionFactory"; - logger.log(BasicLevel.DEBUG, cName+".getConnection"+" (Container Managed Sign-on)"); - Connection conn = null; - try { - conn = (Connection)getConnection(null); - return conn; - } catch (ResourceException ex) { - throw ex; - } - } - // - // Component Managed Sign-on calls getConnection(cs) directly from the Application Component - // - // Component-managed sign-on when file "connector.xml / secured.jar" contains line below - // - // Application - // - public Connection getConnection(ConnectionSpec connectionspec) - throws ResourceException - { - cName = "ConnectionFactory"; - JtestResourceAdapter jmcf = (JtestResourceAdapter)mcf; // ManagedConnectionFactory - Connection conn = null; - CommonClient cs; // ConnectionSpec - JtestResourceAdapter jcri=null; // ConnectionRequestInfo - - if (connectionspec==null) { - jmcf.setRes_Auth("Container"); - logger.log(BasicLevel.DEBUG, cName+".getConnection detected res-auth='"+jmcf.getRes_Auth()+"'"); - // TODO what now? anything? - // now pass null to cm.allocateConnection(mcf, null); - } else { - jmcf.setRes_Auth("Application"); - logger.log(BasicLevel.DEBUG, cName+".getConnection detected res-auth='"+jmcf.getRes_Auth()+"'"); - cs = (CommonClient)connectionspec; - // load user and password into ConnectionRequestInfo instance - jcri = new JtestResourceAdapter(); // ConnectionRequestInfo - jcri.setUserName(cs.getUserName()); - jcri.setPassword(cs.getPassword()); - - } - logger.log(BasicLevel.DEBUG, cName+".getConnection calling cm.allocateConnection"); - try { - ConnectionRequestInfo cri = (ConnectionRequestInfo) jcri; - conn = (Connection)cm.allocateConnection(mcf, cri); - if (conn==null) { - logger.log(BasicLevel.DEBUG, cName+". getConnection, cm.allocateConnection" - +" error: Null connection object returned"); - throw new ResourceException("Null connection object returned by allocateConnection"); - } - return conn; - } catch (IllegalStateException is) { - logger.log(BasicLevel.DEBUG, cName+".getConnection IllegalStateException"+is); - throw is; - } catch (ResourceException re) { - logger.log(BasicLevel.DEBUG, cName+".getConnection ResourceException="+re); - throw re; - } - } - - public RecordFactory getRecordFactory() - throws ResourceException - { - cName = "ConnectionFactory"; - logger.log(BasicLevel.DEBUG, cName+".getRecordFactory"); - NotSupportedException nse = new NotSupportedException( - "RecordFactory is not currently supported"); - throw nse; - } - - public ResourceAdapterMetaData getMetaData() - throws ResourceException - { - cName = "ConnectionFactory"; - logger.log(BasicLevel.DEBUG, cName+".getMetaData"); - ResourceAdapterMetaData rd = null; // TODO do something - return rd; - } - public ManagedConnectionFactory getMcf() { - ManagedConnectionFactory MCF = (ManagedConnectionFactory)mcf; - return MCF; - } - // - // ***************** - // Reference - // ***************** - // - /** Required by the referencable attribute - * @param ref Reference object - **/ - public void setReference(javax.naming.Reference ref) - { - this.reference = ref; - } - - /** Required by the referencable attribute - * @return Reference object - **/ - public Reference getReference() - throws NamingException - { - return reference; - } - // - // *********************** - // ResourceAdapterMetaData methods - // *********************** - // - public String getAdapterVersion() { - return "1.0"; - } - public String getAdapterVendorName() { - return "Bull"; - } - public String getAdapterName() { - return "JOnAS Test Resource Adapter"; - } - public String getAdapterShortDescription() { - return "Test JOnAS Application Server compliance to J2EE Java Community Process (JSR112)"; - } - public String getSpecVersion() { - return "J2EE Java Community Process (JSR112)"; - } - public String[] getInteractionSpecsSupported() { - String[]s = {"JSR016","JSR112"}; - return s; - } - public boolean supportsExecuteWithInputAndOutputRecord() { - return true; - } - public boolean supportsExecuteWithInputRecordOnly() { - return true; - } - public boolean supportsLocalTransactionDemarcation() { - return false; - } -} diff --git a/jonas_tests/j2eeca/src/fictional/resourceadapter/ConnectionImpl.java b/jonas_tests/j2eeca/src/fictional/resourceadapter/ConnectionImpl.java deleted file mode 100644 index e08553b54b096033624a6460fbccab5db1a60cb8..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/src/fictional/resourceadapter/ConnectionImpl.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Created on Jul 10, 2003 - * - * ConnectionImpl.java is used to test the J2EE Connector - * as implemented by JOnAS. This class implements the Connection Interface - * and ConnectionMetaData Interface (cci) classes. - * - */ -package fictional.resourceadapter; - -import javax.resource.ResourceException; -import javax.resource.NotSupportedException; -import javax.resource.cci.*; -import javax.resource.spi.ManagedConnection; -import javax.resource.spi.ConnectionEvent; -import org.ow2.jonas.lib.util.Log; -import org.objectweb.util.monolog.api.Logger; -import org.objectweb.util.monolog.api.BasicLevel; - -/** - * @author Bob Kruse - * - * Jtest Resource Adapter - * - * used to test the J2EE Connector as implemented by JOnAS. - * - */ -public class ConnectionImpl - implements Connection, - ConnectionMetaData, - java.io.Serializable -{ - public String product="Fictional EIS"; // see J2eeConnectorTestBeanClient - String version="1.1"; - String UserName="Fictional_User_Name"; // - private ManagedConnection mc; - public LocalTransactionImpl lt; - boolean closed = false; // connection is closed - private Logger logger = null; - String cName = ""; - private boolean autoCommitMode = false; - - // - // ***************** - // Connection methods - // ***************** - // - public ConnectionImpl(Object mc) { // constructor for Connection - if (logger == null) { - logger = Log.getLogger("fictional.resourceadapter"); - } - logger.log(BasicLevel.DEBUG, impl(this)+".constructor"); - this.mc=(ManagedConnection)mc; - } - private String impl(Object obj) { - if (obj instanceof Connection) { - return "ConnectionImpl"; - } else if (obj instanceof ConnectionImpl) { - return "Connection"; - } else if (obj instanceof ConnectionMetaData) { - return "ConnectionMetaData"; - } else - return "ConnectionImpl. Is this an error"; - } - // - // close connection handle - // - public void close() throws ResourceException - { - logger.log(BasicLevel.DEBUG, impl(this) - +".close with ConnectionEvent.CONNECTION_CLOSED=" - +ConnectionEvent.CONNECTION_CLOSED); - closed = true; - - if (mc != null) { - try { - JtestResourceAdapter omc = (JtestResourceAdapter) mc; - omc.sendEvent(ConnectionEvent.CONNECTION_CLOSED, null, this); - mc=null; - logger.log(BasicLevel.DEBUG, impl(this) - +".close sendevent 'CONNECTION_CLOSED'"); - } catch (ResourceException e) { - logger.log(BasicLevel.DEBUG, impl(this)+".close error: unable to close"); - throw e; - } - } else { - logger.log(BasicLevel.DEBUG, impl(this)+".close error: mc=null"); - } - return; - } - // - // close physical connection - // - // The connectionErrorOccurred method indicates that the associated - // ManagedConnection instance is now invalid and unusable. - // mc.sendEvent method makes the call to connectionErrorOccurred - // - public void close(int eType) throws ResourceException - { - logger.log(BasicLevel.DEBUG, impl(this)+".close("+eType+")"); - closed = true; - - if (mc != null) { - try { - JtestResourceAdapter omc = (JtestResourceAdapter) mc; - omc.sendEvent(eType, null, this); - mc=null; - logger.log(BasicLevel.DEBUG, impl(this) - +".close(CONNECTION_ERROR_OCCURRED=" - +ConnectionEvent.CONNECTION_ERROR_OCCURRED+") to " - +"close physical connection"); - } catch (ResourceException e) { - logger.log(BasicLevel.DEBUG, impl(this) - +".close error: unable to close physical connection" - +" with 'CONNECTION_ERROR_OCCURRED'"); - throw e; - } - } else { - logger.log(BasicLevel.DEBUG, impl(this)+".close error: mc=null already"); - } - return; - } - public Interaction createInteraction() throws ResourceException - { - logger.log(BasicLevel.DEBUG, impl(this)+".createInteraction"); - Interaction gi=new JtestInteraction(this, mc); - // TODO Interaction gi = new Interaction(this, this.mc, lw); - return gi; - } - public ConnectionMetaData getMetaData() throws ResourceException - { - logger.log(BasicLevel.DEBUG, impl(this)+".getMetaData"); - ConnectionMetaData eisInfo = (ConnectionMetaData)new ConnectionImpl(mc); - return eisInfo; - } - public LocalTransaction getLocalTransaction() - throws ResourceException - { - try { - JtestResourceAdapter jmc = (JtestResourceAdapter)mc; - lt = (LocalTransactionImpl) jmc.getLocalTransaction(true); - logger.log(BasicLevel.DEBUG, impl(this)+".getLocalTransaction lt="+lt); - } catch (Exception e) { - logger.log(BasicLevel.DEBUG, impl(this)+".getLocalTransaction error: " - +e.getMessage()+" <<<<<<<<<<<<"); - } - return (lt); - } - public ResultSetInfo getResultSetInfo() throws ResourceException - { - logger.log(BasicLevel.DEBUG, impl(this)+".getResultSetInfo"); - NotSupportedException nse = new NotSupportedException("getResultSetInfo is not supported"); - throw nse; - } - public void associateConnection(ManagedConnection mc) throws IllegalStateException - { - logger.log(BasicLevel.DEBUG, impl(this)+".associateConnection"); - this.mc=mc; - } - public ManagedConnection getMC() throws ResourceException - { - logger.log(BasicLevel.DEBUG, impl(this)+".getMC mc="+this.mc); - return this.mc; - } - public void setAutoCommit(boolean a) { - autoCommitMode=a; - } - public boolean getAutoCommit() { - return autoCommitMode; - } - // - // ********************** - // ConnectionMetaData methods - // ********************** - // - // The method getUserName returns the user name for an active connection as - // known to the underlying EIS instance. The name corresponds the resource - // principal under whose security context a connection to the EIS - // instance has been established. (page 109 CA 1.0) - // - public String getEISProductName() - throws ResourceException - { - return (product); - } - public String getEISProductVersion() - throws ResourceException - { - return (version); - } - public String getUserName() - throws ResourceException - { - return (UserName); - } -} diff --git a/jonas_tests/j2eeca/src/fictional/resourceadapter/JtestInteraction.java b/jonas_tests/j2eeca/src/fictional/resourceadapter/JtestInteraction.java deleted file mode 100644 index ff3205998a9aa27f074c151683d31059966e8150..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/src/fictional/resourceadapter/JtestInteraction.java +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Created on Jul 10, 2003 - * - * JtestInteraction.java is used to test the J2EE Connector - * as implemented by JOnAS. This class implements the Interaction and InteractionSpec - * (cci) classes. - * - */ -package fictional.resourceadapter; - -import javax.resource.ResourceException; -import javax.resource.NotSupportedException; -import javax.resource.cci.*; -import javax.resource.spi.*; -// logger imports -import org.ow2.jonas.lib.util.Log; -import org.objectweb.util.monolog.api.Logger; -import org.objectweb.util.monolog.api.BasicLevel; - -/** - * @author Bob Kruse - * - * Jtest Resource Adapter - * - * used to test the J2EE Connector as implemented by JOnAS. - * - */ -public class JtestInteraction - implements Interaction, - InteractionSpec, - java.io.Serializable -{ - - private Record output; - private boolean closed = false; - private Connection con; - private ManagedConnection mcon; - private Logger logger = null; - String cName = ""; - - public JtestInteraction(Connection c) { - cName = "Interaction"; - if (logger == null) { - logger = Log.getLogger("fictional.resourceadapter"); - } - logger.log(BasicLevel.DEBUG, cName+".constructor"); - con=c; - } - public JtestInteraction(Connection c, ManagedConnection mc) { - cName = "Interaction"; - if (logger == null) { - logger = Log.getLogger("fictional.resourceadapter"); - } - logger.log(BasicLevel.DEBUG, cName+".constructor"); - con=c; - mcon=mc; - } - private String impl(Object obj) { - if (obj instanceof Interaction) { - return "Interaction"; - } else if (obj instanceof InteractionSpec) { - return "InteractionSpec"; - } else - return "InteractionSpec. Is this an error"; - } - /**************************** - * Interaction methods - ****************************/ - public boolean execute(InteractionSpec ispec, - Record input, - Record output) throws ResourceException - { - cName = "Interaction"; - logger.log(BasicLevel.DEBUG, cName+".execute"); - this.output = input; - return(true); - } - public Record execute(InteractionSpec ispec, - Record input) throws ResourceException - { - cName = "Interaction"; - logger.log(BasicLevel.DEBUG, cName+".execute"); - return (output); - } - public void close() - throws ResourceException - { - cName = "Interaction"; - logger.log(BasicLevel.DEBUG, cName+".close"); - closed=true; - } - public Connection getConnection() - { - cName = "Interaction"; - logger.log(BasicLevel.DEBUG, cName+".getConnection"); - return con; - } - public ResourceWarning getWarnings() - throws ResourceException - { - cName = "Interaction"; - logger.log(BasicLevel.DEBUG, cName+".getWarnings"); - NotSupportedException nse = new NotSupportedException( - "Interaction.getWarnings is not currently supported"); - throw nse; - } - public void clearWarnings() - throws ResourceException - { - cName = "Interaction"; - logger.log(BasicLevel.DEBUG, cName+".clearWarnings"); - NotSupportedException nse = new NotSupportedException( - "Interaction.clearWarnings is not currently supported"); - throw nse; - } - - - /**************************** - * InteractionSpec methods - ****************************/ - // standard properties - private int interactionVerb; - // SYNC_SEND =0 These interactionVerb values are from - // SYNC_SEND_RECEIVE =1 Constant Field Values of J2EE API - // SYNC_RECEIVE =2 - - private String FunctionName; - private int ExecutionTimeout; - private int FetchSize; - private int FetchDirection; - private int MaxFieldSize; - private int ResultSetType; - private int ResultSetConcurrency; - - public JtestInteraction() { - cName = "InteractionSpec"; - if (logger == null) { - logger = Log.getLogger("fictional.resourceadapter"); - } - logger.log(BasicLevel.DEBUG, cName+".constructor"); - interactionVerb = SYNC_SEND_RECEIVE; - FunctionName = ""; - FetchDirection = 0; - ExecutionTimeout = 2000; - FetchSize = 30; - MaxFieldSize = 444; - ResultSetType = 5; - ResultSetConcurrency = 6; - } - public void setFunctionName(String n) { - FunctionName = n; - } - public String getFunctionName() { - return (FunctionName); - } - public void setInteractionVerb(int verb) { - interactionVerb = verb; - } - public int getInteractionVerb() { - return (interactionVerb); - } - public void setExecutionTimeout(int verb) { - ExecutionTimeout = verb; - } - public int getExecutionTimeout() { - return (ExecutionTimeout); - } - - public void setFetchSize (int x) { - FetchSize = x;; - } - public int getFetchSize () { - return (FetchSize); - } - - public void setFetchDirection(int x) { - FetchDirection = x;; - } - public int getFetchDirection() { - return (FetchDirection); - } - - public void setMaxFieldSize(int x) { - MaxFieldSize = x;; - } - public int getMaxFieldSize() { - return (MaxFieldSize); - } - - public void setResultSetType(int x) { - ResultSetType = x; - } - public int getResultSetType() { - return (ResultSetType); - } - - public void setResultSetConcurrency(int x) { - ResultSetConcurrency = x;; - } - public int getResultSetConcurrency() { - return (ResultSetConcurrency); - } -} diff --git a/jonas_tests/j2eeca/src/fictional/resourceadapter/JtestResourceAdapter.java b/jonas_tests/j2eeca/src/fictional/resourceadapter/JtestResourceAdapter.java deleted file mode 100644 index 745ecabe180a1784d2415f682746f2bd4548abd8..0000000000000000000000000000000000000000 --- a/jonas_tests/j2eeca/src/fictional/resourceadapter/JtestResourceAdapter.java +++ /dev/null @@ -1,851 +0,0 @@ -/* - * Created on Jun 11, 2003 - * - * JtestResourceAdapter.java is a Resource Adapter to test the J2EE Connector - * as implemented by JOnAS. This class implements all the connector classes. Each - * connector method simulates actual functionality and returns test results to the - * caller which is a JUnit test program. - */ -package fictional.resourceadapter; - -import java.io.PrintWriter; -import java.io.Serializable; -import java.util.Date; -import java.util.Iterator; -import java.util.Set; -import java.util.Vector; - -import javax.naming.NamingException; -import javax.naming.Reference; -import javax.resource.NotSupportedException; -import javax.resource.Referenceable; -import javax.resource.ResourceException; -import javax.resource.spi.ConnectionEvent; -import javax.resource.spi.ConnectionEventListener; -import javax.resource.spi.ConnectionManager; -import javax.resource.spi.ConnectionRequestInfo; -import javax.resource.spi.LocalTransaction; -import javax.resource.spi.ManagedConnection; -import javax.resource.spi.ManagedConnectionFactory; -import javax.resource.spi.ManagedConnectionMetaData; -import javax.resource.spi.ResourceAllocationException; -import javax.resource.spi.security.GenericCredential; -import javax.resource.spi.security.PasswordCredential; -import javax.security.auth.Subject; -import javax.transaction.xa.XAResource; - -import org.ow2.jonas.lib.util.Log; -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; - -/** - * @author Bob Kruse - * - * used to test the J2EE Connector as implemented by JOnAS. - * - */ -public class JtestResourceAdapter - implements ManagedConnectionFactory, - ConnectionRequestInfo, - //LocalTransaction, - ManagedConnection, - ManagedConnectionMetaData, - GenericCredential, - Serializable, Referenceable -{ - Reference reference; - String timeStamp = ""; - private String defaultUserName=""; // used in ManagedConnection, ConnectionRequestInfo - private String defaultPassword=""; // set by "getter" method - private String userName=""; - private String password=""; - private ManagedConnectionFactory mcf; // loaded by ManagedConnectionFactory - public ConnectionManager cm; // loaded by ManagedConnectionFactory - public LocalTransactionImpl loTx=null; - PrintWriter pw; // App Server sets to null by default - private Vector listeners; - private Logger logger = null; - //Managed environment - public boolean managed; // see ConnectionRequestInfo - public String res_auth; // set by ConnectionFactory.getConnection() - // then put into ManagedConnection when created - public String re_authentication_UserName; // see by ConnectionFactory.getConnection() - public String re_authentication_Password; - public XAResource xar = null; - public XAResourceImpl xari = null; - String cName = ""; - // - // constructor for all "implements" in this class - public JtestResourceAdapter() - { - if (logger == null) { - logger = Log.getLogger("fictional.resourceadapter"); - } - timeStamp = Long.toString(System.currentTimeMillis()); // unique for this obj - forceMatchNull=false; - managed = true; - closed = true; // Managed Connection - connDate = null; // Managed Connection - listeners = new Vector(); // used in ManagedConnection - pw = null; - xar = null; // used in ManagedConnection - xari = null; - loTx = null; // used in ManagedConnection - } - - private String impl(Object obj) { - if (obj instanceof ManagedConnectionFactory) { - return "ManagedConnectionFactory"; - } else if (obj instanceof ConnectionRequestInfo) { - return "ConnectionRequestInfo"; - } else if (obj instanceof ManagedConnection) { - return "ManagedConnection"; - } else if (obj instanceof ManagedConnectionMetaData) { - return "ManagedConnectionMetaData"; - } else if (obj instanceof GenericCredential) { - return "GenericCredential"; - } else - return "JtestResourceAdapter. Is this an error"; - - } - // ************************ - // ManagedConnectionFactory methods see 5.5.3 - // ************************ - // Referenced classes of package javax.resource.spi: - // ConnectionManager, ConnectionRequestInfo, ManagedConnection - public Object createConnectionFactory(ConnectionManager connectionmanager) - throws ResourceException - { - cm = connectionmanager; - cName="ManagedConnectionFactory"; - logger.log(BasicLevel.DEBUG, cName+".createConnectionFactory cm="+cm); - Object obj; - obj = new CommonClient(this, connectionmanager); // creates ConnectionFactory - return obj; - } - /** - * - * When the createConnectionFactory method takes no arguments, the resource adapter - * provides a default ConnectionManager instance. This case is used in a non-managed - * application scenario. - * see 5.5.3 - */ - public Object createConnectionFactory() - throws ResourceException - { - cName="ManagedConnectionFactory"; - logger.log(BasicLevel.DEBUG, cName+": error - non-managed detected"); - throw new NotSupportedException( - "A non-managed two-tier application environment is not supported in J2EE testing."); - } - public ManagedConnection createManagedConnection(Subject subject, - ConnectionRequestInfo connectionrequestinfo) - throws ResourceException - { - cName="ManagedConnectionFactory"; - logger.log(BasicLevel.DEBUG, cName+".createManagedConnection subject="+subject - +", cri="+connectionrequestinfo); - mcf = (ManagedConnectionFactory) this; - if (subject!=null) { - // - // The application server user's password to the EIS is carried in Subject - // - try { - PasswordCredential pc = getPasswordCredential(mcf, subject, connectionrequestinfo); - if (pc==null) { - logger.log(BasicLevel.DEBUG, cName - +".createManagedConnection PasswordCredential = null, Subject not null."); - } else { - if (pc.getUserName()==null || pc.getUserName().length()==0) { - logger.log(BasicLevel.DEBUG, cName+".createManagedConnection userName=empty"); - } else { - userName = new String(pc.getUserName()); - logger.log(BasicLevel.DEBUG, cName+".createManagedConnection" - +" PasswordCredential userName="+userName); - password = new String(pc.getPassword()); // pc.password is char[] - logger.log(BasicLevel.DEBUG, cName+".createManagedConnection" - +" PasswordCredential password="+password); - } - } - } catch (Exception e) { - logger.log(BasicLevel.DEBUG, cName+".createManagedConnection getPasswordCredential " - +"error: e="+e.toString()); - } - } - - if (connectionrequestinfo != null) { - // - // The client application component user's password is carried in ConnectionRequestInfo - // Use defaults if userName or password is empty - // - JtestResourceAdapter jinfo = (JtestResourceAdapter) connectionrequestinfo; - String s = jinfo.getUserName(); - if (s.length()>0) userName = s; - else - logger.log(BasicLevel.DEBUG, cName+".createManagedConnection" - +" ConnectionRequestInfo userName="+s+". Use default="+userName); - logger.log(BasicLevel.DEBUG, cName+".createManagedConnection" - +" ConnectionRequestInfo userName="+userName); - s = jinfo.getPassword(); - if (s.length()>0) password = s; - else - logger.log(BasicLevel.DEBUG, cName+".createManagedConnection" - +" ConnectionRequestInfo password="+s+". Use default="+password); - logger.log(BasicLevel.DEBUG, cName+".createManagedConnection" - +" ConnectionRequestInfo password="+password); - } - - if (subject==null && connectionrequestinfo==null) { - // - // The default user's password is carried in the ManagedConnectionFactory instance - // - userName=defaultUserName; - password=defaultPassword; - logger.log(BasicLevel.DEBUG, cName+".createManagedConnection default userName="+userName); - logger.log(BasicLevel.DEBUG, cName+".createManagedConnection default password="+password); - } - - Date cDate = new Date(); - try { - // - // Create the ManagedConnection Instance - // - ManagedConnection mc = (ManagedConnection) new JtestResourceAdapter(); - JtestResourceAdapter obj = (JtestResourceAdapter)mc; - obj.setConnDate(cDate); - obj.setMcf(mcf); - obj.setPassword(password); - obj.setUserName(userName); - obj.setRes_Auth(res_auth); - obj.setLogWriter(pw); - logger.log(BasicLevel.DEBUG, cName+".createManagedConnection mc="+mc - +" with connDate="+cDate); - return mc; - } catch (Exception ex) { - logger.log(BasicLevel.DEBUG, cName+".createManagedConnection : error - Exception ex=" - +ex.getMessage()); - throw new ResourceAllocationException(ex.getMessage()); - } - } - boolean forceMatchNull; - public void setMatchNull(boolean truefalse) { - forceMatchNull=truefalse; - } - public ManagedConnection matchManagedConnections(Set connectionSet, - Subject subject, - ConnectionRequestInfo connectionrequestinfo) - throws ResourceException - { - cName="ManagedConnectionFactory"; - logger.log(BasicLevel.DEBUG, cName+".matchManagedConnections"); - ManagedConnection mc = null; - if (forceMatchNull) { - logger.log(BasicLevel.DEBUG, cName+".matchManagedConnections force new connection"); - return mc; // forces new connection - } - JtestResourceAdapter wmc = null; - Iterator it = connectionSet.iterator(); - int cnt=0; - while (it.hasNext()) { - Object obj = it.next(); - logger.log(BasicLevel.DEBUG, cName+".matchManagedConnections " - +"find next ManagedConnection in Set. connectionSet cnt="+ (++cnt)); - if (obj instanceof ManagedConnection) { - // see if ManagedConnection is available - // i.e., no connection handle exists for mc instance - // i.e., the connection is closed - // TODO choose one of the above - wmc = (JtestResourceAdapter) obj; - if (wmc.getCHandle()==null || wmc.isClosed()) { - mc=(ManagedConnection)wmc; - logger.log(BasicLevel.DEBUG, cName+".matchManagedConnections " - +"connection handle == null. connectionSet cnt="+cnt); - } else { - // error: connection should not exist J2ee 1.0 pg. 32 - String s = "connection handle should not exist"; - logger.log(BasicLevel.DEBUG, cName+".matchManagedConnections " - +"error: "+s+". connectionSet cnt="+cnt); - } - } - } - if (mc==null) - logger.log(BasicLevel.DEBUG, cName+".matchManagedConnections mc=null connectionSet cnt="+cnt); - else - logger.log(BasicLevel.DEBUG, cName+".matchManagedConnections with connDate=" - +wmc.getConnDate()); - return mc; - } - // - // The setLogWriter and getLogWriter are used in ManagedConnectionFactory - // and ManagedConnection - // the Application Server calls ManagedConnection.setLogWriter(pw) - // - public void setLogWriter(PrintWriter printwriter) - throws ResourceException - { - if (printwriter!=null) pw = printwriter; - } - - public PrintWriter getLogWriter() - throws ResourceException - { - return pw; - } - // - // config-property processing "setter" properties - // - String ServerName=""; - String PortNumber=""; - String protocol=""; - /** Set the JOnAS config-property.. Default value is "". - * - * @param c1 String of config-property. - * for testng RA. - **/ - public void setServerName(String c1) - { - ServerName = c1; - //logger.log(BasicLevel.DEBUG, cName+".setServerName="+ServerName); - } - public String getServerName() { - return ServerName; - } - public void setPortNumber(String s) - { - PortNumber=s; - //logger.log(BasicLevel.DEBUG, cName+".setPortNumber="+PortNumber); - } - public void setDUserName(String s) - { - defaultUserName=s; - //logger.log(BasicLevel.DEBUG, cName+".setDUserName="+defaultUserName); - } - public void setDPassword(String s) - { - defaultPassword=s; - //logger.log(BasicLevel.DEBUG, cName+".setDPassword="+defaultPassword); - } - public void setProtocol(String s) - { - protocol=s; - //logger.log(BasicLevel.DEBUG, cName+".setProtocol="+protocol); - } - public String getProtocol() - { - return protocol; - } - public ConnectionManager getCM() - { - return cm; - } - public String getRes_Auth() { - return res_auth; - } - public void setRes_Auth(String r) { - res_auth=r; - } - //************************ - // ConnectionRequestInfo - //************************ - // module to add additional connection properties than - // the ones configured for the ConnectionFactory. This - // class is passed to the App Server and will be used - // on matchManagedConnections or createConnection - // methods by the App Server. - // - String Id=""; // used in hashcode() for ConnectionRequestInfo - // - public void setUserName(String u) { - userName=u; - if (cName.length() == 0) cName=impl(this); - logger.log(BasicLevel.DEBUG, cName+".setUserName="+u); - } - public void setPassword(String p) { - password=p; - if (cName.length() == 0) cName=impl(this); - logger.log(BasicLevel.DEBUG, cName+".setPassword="+p); - } - public String getUserName() { - if (cName.length() == 0) cName=impl(this); - logger.log(BasicLevel.DEBUG, cName+".getUserName="+userName); - return userName; - } - public String getPassword() { - if (cName.length() == 0) cName=impl(this); - logger.log(BasicLevel.DEBUG, cName+".getPassword="+password); - return password; - } - private void setId() - { - if (Id == null || Id.length() == 0) - Id=timeStamp; - - } - // - // hashCode and equals method used in ConnectionRequestInfo, - // ManagedConnectionFactory - // and GenericCredential - public int hashCode() - { - int hash = 1; - setId(); - hash = Id.hashCode(); - return hash; - } - public boolean equals(Object obj) - { - boolean match = false; - if (obj==null) { - return match; - } - JtestResourceAdapter other = (JtestResourceAdapter)obj; - if (this.timeStamp.equals(other.getTimeStamp())) match = true; - return match; - } - - // ***************** - // GenericCredential methods - // ***************** - // - String gcID =""; // used in hashcode() for GenericCredential - public String getName() - { - cName="GenericCredential"; - logger.log(BasicLevel.DEBUG, cName+".getName"); - return ""; - } - - public String getMechType() - { - cName="GenericCredential"; - logger.log(BasicLevel.DEBUG, cName+".getMechType"); - return ""; - } - - public byte[] getCredentialData() - throws SecurityException - { - cName="GenericCredential"; - logger.log(BasicLevel.DEBUG, cName+".getCredentialData"); - byte[] x = {0,0}; - return x; - } - - // ***************** - // ManagedConnection methods - // ***************** - // - // Referenced classes of package javax.resource.spi: - // ConnectionRequestInfo, ConnectionEventListener, LocalTransaction, - // ManagedConnectionMetaData - // - // NOTE: Subject is instantiated by Application Server - // - boolean closed; - public ConnectionImpl cHandle; // ManagedConnection mapped 1:1 to a physical connection - private boolean destroyed; //set when destroyed - private Date connDate; //save connection date/time for a ManagedConnection - public boolean inXATrans; - public boolean inLocalTrans; - public boolean sendEvent; - - public int cntListeners() { - cName="ManagedConnection"; - Vector lst = (Vector) listeners.clone(); - int len = lst.size(); - logger.log(BasicLevel.DEBUG, cName+".cntListeners counted="+len); - return len; - } - public ConnectionImpl getCHandle() { - return cHandle; - } - public boolean isClosed() { - return closed; - } - - public Object getConnection(Subject subject, ConnectionRequestInfo connectionrequestinfo) - throws ResourceException - { - cName="ManagedConnection"; - logger.log(BasicLevel.DEBUG, cName+".getConnection *******************"); - if (subject!=null) { - // - // for this code to execute, the following will be present in ra.xml - // true - // - logger.log(BasicLevel.DEBUG, cName+".getConnection via PasswordCredential"); - logger.log(BasicLevel.DEBUG, "true"); - try { - PasswordCredential pc = getPasswordCredential(mcf, subject, connectionrequestinfo); - if (pc==null) { - logger.log(BasicLevel.DEBUG, cName+".getConnection PasswordCredential = null"); - } else { - if (pc.getUserName()==null || pc.getUserName().length()==0) { - logger.log(BasicLevel.DEBUG, cName+".getConnection userName=empty"); - } else { - String re_authentication_UserName = new String(pc.getUserName()); - String re_authentication_Password = new String(pc.getPassword()); - logger.log(BasicLevel.DEBUG, cName+".getConnection" - +" re-authentication userName="+re_authentication_UserName); - logger.log(BasicLevel.DEBUG, cName+".getConnection" - +" compare to existing userName="+userName); - logger.log(BasicLevel.DEBUG, cName+".getConnection" - +" re-authentication password="+re_authentication_Password); - logger.log(BasicLevel.DEBUG, cName+".getConnection" - +" compare to existing password="+password); - } - } - } catch (Exception e) { - logger.log(BasicLevel.DEBUG, cName+".getConnection getPasswordCredential error: e=" - +e.toString()); - } - } - // Code for reauthentication-support when Subject==null and ConnectionRequestInfo - // contains different password and username - // - if (connectionrequestinfo!=null) { - logger.log(BasicLevel.DEBUG, impl(this)+".getConnection via ConnectionRequestInfo"); - logger.log(BasicLevel.DEBUG, "true"); - JtestResourceAdapter jcri = (JtestResourceAdapter) connectionrequestinfo; - String re_authentication_UserName = new String(jcri.getUserName()); - String re_authentication_Password = new String(jcri.getPassword()); - logger.log(BasicLevel.DEBUG, - " re-authentication userName="+re_authentication_UserName+ - " compare to existing userName="+userName); - logger.log(BasicLevel.DEBUG, - " re-authentication password="+re_authentication_Password+ - " compare to existing password="+password); - } - Object obj = new ConnectionImpl(this); - cHandle = (ConnectionImpl)obj; - closed=false; - destroyed=false; - return obj; - } - public void destroy() - throws ResourceException - { - cName="ManagedConnection"; - logger.log(BasicLevel.DEBUG, cName+".destroy"); - // the physical connection is closed - destroyed = true; - closed = true; - cHandle=null; - } - - public void cleanup() - throws ResourceException - { - cName="ManagedConnection"; - // the physical connection stays open - // but all connection handles invalidated - logger.log(BasicLevel.DEBUG, cName+".cleanup"); - cHandle=null; - closed=true; - - } - - public void associateConnection(Object obj) - throws ResourceException - { - cName="ManagedConnection"; - logger.log(BasicLevel.DEBUG, cName+".associateConnection"); - if (obj instanceof ConnectionImpl) { - ConnectionImpl conn = (ConnectionImpl) obj; - conn.associateConnection(this); // TODO may need more arg to associate - } else { - logger.log(BasicLevel.DEBUG, cName+".associateConnection "+ - "error: obj not instanceof ConnectionImpl"); - } - } - - public void addConnectionEventListener(ConnectionEventListener listener) - { - cName="ManagedConnection"; - listeners.addElement(listener); - logger.log(BasicLevel.DEBUG, cName+".addConnectionEventListener listener=" - +listener); - } - - public void removeConnectionEventListener(ConnectionEventListener listener) - { - cName="ManagedConnection"; - Vector lst = (Vector) listeners.clone(); - int len = lst.size(); - logger.log(BasicLevel.DEBUG, cName+".removeConnectionEventListener " - +"Number of listeners="+len); - try { - listeners.removeElement(listener); - } catch (Exception e) { - logger.log(BasicLevel.DEBUG, cName+".removeConnectionEventListener error: " - +"unable to remove listener"); - } - lst = (Vector) listeners.clone(); - len = lst.size(); - logger.log(BasicLevel.DEBUG, cName+".removeConnectionEventListener listener=" - +listener+" was removed. Number listeners left="+len); - } - - public XAResource getXAResource() - throws ResourceException - { - cName="ManagedConnection"; - if (xar==null) - xar = (XAResource)new XAResourceImpl(this); - logger.log(BasicLevel.DEBUG, cName+".getXAResource xar="+xar); - return xar; - } - public void resetXar() { - // dissociate XAResource Xid from this ManagedConnection - xar=null; - xari=null; - } - public XAResourceImpl getCurrentXar() - throws ResourceException - { - xari=(XAResourceImpl)xar; - return xari; - } - - public javax.resource.cci.LocalTransaction getLocalTransaction(boolean sendEvent) - throws ResourceException - { - cName="ManagedConnection"; - LocalTransactionImpl lt = null; - logger.log(BasicLevel.DEBUG, cName+".getLocalTransaction(sendEvent)"); - this.sendEvent=sendEvent; - try { - lt = (LocalTransactionImpl) getLocalTransaction(); - logger.log(BasicLevel.DEBUG, cName+".getLocalTransaction(sendEvent) lt="+lt); - } catch (Exception e) { - logger.log(BasicLevel.DEBUG, cName+".getLocalTransaction(sendEvent) " - +"error: "+e.getMessage()); - } - return (lt); - } - - public LocalTransaction getLocalTransaction() - throws ResourceException - { - cName="ManagedConnection"; - logger.log(BasicLevel.DEBUG, cName+".getLocalTransaction"); - if (loTx==null) { - loTx = new LocalTransactionImpl(this, sendEvent); - logger.log(BasicLevel.DEBUG, cName+".getLocalTransaction new loTx="+loTx); - return loTx; - } else { - logger.log(BasicLevel.DEBUG, cName+".getLocalTransaction old loTx="+loTx); - loTx.setSendEvent(sendEvent); - return loTx; - } - } - - public ManagedConnectionMetaData getMetaData() - throws ResourceException - { - cName="ManagedConnection"; - logger.log(BasicLevel.DEBUG, cName+".getMetaData"); - return (ManagedConnectionMetaData) new JtestResourceAdapter(); - } - /** Send the specified event to all the EventListeners that have - * registered with this ManagedConnection instance. - * - * @param int Event type to send - * @param Exception if one is associated with this event - * @param ch Connection handle associated with this event - * @throws ResourceException generic exception if operation fails - * @throws IllegalArgumentException if an invalid event is specified - **/ - public void sendEvent(int eType, Exception ex, Object ch) throws ResourceException - { - cName="ManagedConnection"; - Vector lst = (Vector) listeners.clone(); - ConnectionEvent ce = null; - if (ex==null) { - ce = new ConnectionEvent(this, eType); - } - else - ce = new ConnectionEvent(this, eType, ex); - - if (ch != null) - ce.setConnectionHandle(ch); - else - logger.log(BasicLevel.DEBUG, cName+".sendEvent ch==null"); - - int len = lst.size(); - for (int i=0; iRESET) { - xidState=COMMITTED; - logger.log(BasicLevel.DEBUG, impl(this)+".commit From State="+curState+ - " to State="+xidState+" xid="+xid+" onePhase="+onePhase); - } - else { - logger.log(BasicLevel.DEBUG, impl(this)+".commit error: State="+xidState - +" should be="+STARTED+"or more. xid="+xid+" onePhase="+onePhase); - } - } - public void end(Xid xid, int flags) throws XAException - { - int curState=xidState; - xidState=ENDED; - JtestResourceAdapter jmc = (JtestResourceAdapter) mc; - jmc.resetXar(); - logger.log(BasicLevel.DEBUG, impl(this)+".end From State="+curState+ - " to State="+xidState+" for xid="+xid+" flags="+flags); - } - public void forget(Xid xid) throws XAException - { - logger.log(BasicLevel.DEBUG, impl(this)+".forget State="+xidState); - xidState=FORGOT; - } - public int prepare(Xid xid) throws XAException - { - logger.log(BasicLevel.DEBUG, impl(this)+".prepare State="+xidState); - xidState=PREPARED; - //return 1; - return XA_OK; - } - /** - * Obtain a list of prepared transaction branches from a resource manager. - */ - public Xid[] recover(int flag) throws XAException - { - recoverFlag=flag; - logger.log(BasicLevel.DEBUG, impl(this)+".recover State="+xidState); - return xidArray; - } - public void rollback(Xid xid) throws XAException - { - int curState=xidState; - if (xidState >= STARTED) { - xidState=ROLLEDBACK; - logger.log(BasicLevel.DEBUG, impl(this)+".rollback From State="+curState+ - " to State="+xidState+" xid="+xid); - } - else { - logger.log(BasicLevel.DEBUG, impl(this)+".rollback error: State="+xidState - +" should be="+STARTED+"or more. xid="+xid); - } - } - public void start(Xid xid, int flags) throws XAException - { - currentXid=xid; - xFlags=flags; - int curState=xidState; - if (xidState==RESET) { - xidState=STARTED; - logger.log(BasicLevel.DEBUG, impl(this)+".start From State="+curState+ - " to State="+xidState+" xid="+xid+" flags="+flags); - } - else { - logger.log(BasicLevel.DEBUG, impl(this)+".start error: State="+xidState - +" should be="+RESET+" xid="+xid+" flags="+flags); - } - } - public int getTransactionTimeout() throws XAException - { - logger.log(BasicLevel.DEBUG, impl(this)+".getTransactionTimeout timeout="+timeout); - return timeout; - } - public boolean setTransactionTimeout(int seconds) throws XAException - { - timeout=seconds; - logger.log(BasicLevel.DEBUG, impl(this)+".setTransactionTimeout seconds="+seconds); - return true; - } - /** - * Determine if the resource manager instance represented by the target object is the - * same as the resource manager instance represented by the parameter xares - */ - public boolean isSameRM(XAResource xares) throws XAException - { - boolean a = true; - logger.log(BasicLevel.DEBUG, impl(this)+".isSameRM xares="+xares+" return="+a); - return a; - } -} diff --git a/jonas_tests/jaxws/jaxws-felix/pom.xml b/jonas_tests/jaxws/jaxws-felix/pom.xml deleted file mode 100644 index 4eeb9df599a6c3fb101c6b95bbca93c5d2b38396..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-felix/pom.xml +++ /dev/null @@ -1,521 +0,0 @@ - - - - - org.ow2.jonas - jonas-modules - 5.1.0-RC3-SNAPSHOT - - 4.0.0 - org.ow2.jonas.ws.jaxws.itests - felix - pom - JOnAS :: Tests :: JAXWS :: Felix - Tests of JOnAS JAXWS - - - - - 1.0.2 - - - 5.1.0-RC1 - 0.0.4 - 1.1.0-RC2-SNAPSHOT - 2.1.12 - 3.0.5 - 1.0.1 - 2.1.3 - 2.1.3 - 1.1.2 - 2.9.3-patch - 3.2.2 - 1.7.1 - 1.6.3 - 1.5.4 - 1.6.1 - 1.6 - 5.2.1 - 2.1.4 - - - 2.2.3-jonas-patch-20071018 - 1.3 - - - 1.0.15 - - - 1.0.16 - - - 6.1.5 - 6.0.18 - - - 1.2.0 - 1.2.0 - - 1.4.1 - 1.0.2 - 0.9.0-incubator-2007.12.14 - 1.2.1 - 1.0.10 - 1.1.0-2008.07.10 - - 1.2.0 - - 2.0.9 - - 1.3 - 1.3 - - - 2.0-alpha-1 - - - 1.2_08 - - - 2.0.9 - - - 1.0rc1 - 2.0rc5 - - - - - - org.ow2.easybeans.osgi - easybeans-osgi-itests-base - ${easybeans.version} - tests - test - - - - org.testng - testng - 5.8 - jdk15 - - - - org.ow2.easybeans.osgi - easybeans-client-fix - ${easybeans.version} - test - - - org.ow2.easybeans.osgi - easybeans-client-fix - ${easybeans.version} - test - - - org.ow2.jonas.ws.jaxws.itests - tests - ${project.version} - test - - - com.sun.xml.messaging.saaj - saaj-impl - 1.3.2 - - - - - - - ow2 - OW2 repository - http://maven.ow2.org/maven2 - - true - - - false - - - - ow2-snapshot - OW2 repository - http://maven.ow2.org/maven2-snapshot - - true - - - false - - - - - - - elca-services - http://el4.elca-services.ch/el4j/maven2repository - - true - - - false - - - - - - - - install - - - - - - maven-dependency-plugin - - - unpack-assembly - package - - unpack - - - - - - org.ow2.jonas.assemblies.profiles - jonas-full - ${project.version} - bin - zip - - - - ${project.build.directory} - - true - true - - - - - - - - maven-antrun-plugin - - - package - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - run - - - - - - - - org.ow2.util.maven - maven-osgi-plugin-launcher-core - - felix - - - ${basedir}/src/main/config/config.properties - - - ${basedir}/src/main/config/jonas-autodeploy-bundles.properties - - - - jonas.base - ${basedir}/target/jonas_base - - - jonas.root - ${basedir}/target/jonas-full-${project.version} - - - java.security.auth.login.config - ${basedir}/target/jonas-full-${project.version}/conf/jaas.config - - - m2.repository - ${settings.localRepository} - - - java.naming.factory.initial - - org.ow2.carol.jndi.spi.MultiOrbInitialContextFactory - - - - java.security.policy - ${basedir}/target/jonas-full-${project.version}/conf/java.policy - - - java.security.auth.login.config - ${basedir}/target/jonas-full-${project.version}/conf/jaas.config - - - - java.endorsed.dirs - ${basedir}/target/jonas-full-${project.version}/lib/endorsed/ - - - ConfigHome - ${basedir}/target/jonas_base/conf/ - - - - - - javax.security.jacc.PolicyConfigurationFactory.provider - - - org.ow2.jonas.lib.security.jacc.JPolicyConfigurationFactory - - - - monolog.wrappers - - mx4j.log.CommonsLogger,mx4j.log.Logger,java.util.logging.Logger,org.ow2.util.log.JDKLogger, - org.apache.juli.logging.DirectJDKLog,org.ow2.carol.util.configuration.TraceCarol - - - - java.awt.headless - true - - - ipojo.log.level - ERROR - - - - - bootstrap.kill.timeout - 420 - - - - - true - - - - ${itestsdebug} - 8000 - - - - 30 - - - 10 - - - - - - ${basedir}/target/jonas_base/conf/ - - - - - - - - start-framework - pre-integration-test - - start - - - - - stop-framework - post-integration-test - - stop - - - - - - org.ow2.util.maven - maven-osgi-plugin-launcher-framework-felix - ${ow2-util-plugin.version} - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - ${basedir}/target - - - ${basedir}/src/main/config/testng.xml - - - - - rmi.port - 19099 - - - jonas.root - ${basedir}/target/jonas-full-${project.version}/ - - - jonas.base - ${basedir}/target/jonas_base/ - - - - - ${basedir}/target/jonas-full-${project.version}/lib/client.jar - - - - - - testing-JOnAS-Full - integration-test - - test - - - - - - - - - - diff --git a/jonas_tests/jaxws/jaxws-felix/src/main/config/config.properties b/jonas_tests/jaxws/jaxws-felix/src/main/config/config.properties deleted file mode 100644 index 66ce492366252e3af1bb421a913e1adae44988e9..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-felix/src/main/config/config.properties +++ /dev/null @@ -1,183 +0,0 @@ -# =================================================================== # -# Felix Configuration file (for easybeans only) # -# =================================================================== # - -# -# Framework config properties. -# -org.osgi.framework.bootdelegation=com.sun.corba.*,\ - com.sun.org.apache.xalan.internal.*,\ - com.sun.org.apache.xerces.internal.*,\ - com.sun.org.apache.xml.internal.*,\ - com.sun.org.apache.xpath.internal.* - -# Packages exported by the underlying JVM (and System bundle) -org.osgi.framework.system.packages org.osgi.framework; version=1.4.0, \ - org.osgi.service.packageadmin; version=1.2.0, \ - org.osgi.service.startlevel; version=1.1.0, \ - org.osgi.service.url; version=1.0.0, \ - org.osgi.util.tracker; version=1.3.3, \ - javax.accessibility; \ - javax.activity; \ - javax.imageio; \ - javax.crypto;\ - javax.crypto.spec;\ - javax.crypto.interfaces;\ - javax.imageio.event; \ - javax.imageio.metadata; \ - javax.imageio.plugins.bmp; \ - javax.imageio.plugins.jpeg; \ - javax.imageio.spi; \ - javax.imageio.stream; \ - javax.management; \ - javax.management.loading; \ - javax.management.modelmbean; \ - javax.management.monitor; \ - javax.management.openmbean; \ - javax.management.relation; \ - javax.management.remote; \ - javax.management.remote.rmi; \ - javax.management.timer; \ - javax.naming; \ - javax.naming.directory; \ - javax.naming.event; \ - javax.naming.ldap; \ - javax.naming.spi; \ - javax.net; \ - javax.net.ssl; \ - javax.print; \ - javax.print.attribute; \ - javax.print.attribute.standard; \ - javax.print.event; \ - javax.rmi; \ - javax.rmi.CORBA; \ - javax.rmi.ssl; \ - javax.security.auth; \ - javax.security.auth.callback; \ - javax.security.auth.kerberos; \ - javax.security.auth.login; \ - javax.security.auth.spi; \ - javax.security.auth.x500; \ - javax.security.cert; \ - javax.security.sasl; \ - javax.sound.midi; \ - javax.sound.midi.spi; \ - javax.sound.sampled; \ - javax.sound.sampled.spi; \ - javax.sql; \ - javax.sql.rowset; \ - javax.sql.rowset.serial; \ - javax.sql.rowset.spi; \ - javax.swing; \ - javax.swing.border; \ - javax.swing.colorchooser; \ - javax.swing.event; \ - javax.swing.filechooser; \ - javax.swing.plaf; \ - javax.swing.plaf.basic; \ - javax.swing.plaf.metal; \ - javax.swing.plaf.multi; \ - javax.swing.plaf.synth; \ - javax.swing.table; \ - javax.swing.text; \ - javax.swing.text.html; \ - javax.swing.text.html.parser; \ - javax.swing.text.rtf; \ - javax.swing.tree; \ - javax.swing.undo; \ - javax.xml; \ - javax.xml.datatype; \ - javax.xml.namespace; \ - javax.xml.parsers; \ - javax.xml.transform; \ - javax.xml.transform.dom; \ - javax.xml.transform.sax; \ - javax.xml.transform.stream; \ - javax.xml.validation; \ - javax.xml.xpath; \ - org.ietf.jgss; \ - org.apache.xpath; \ - org.apache.xpath.compiler; \ - org.apache.xpath.functions; \ - org.apache.xpath.objects; \ - org.apache.xml.utils; \ - org.jacorb.orb.etf; \ - org.jacorb.orb.iiop; \ - org.jacorb.orb.portableInterceptor; \ - org.jacorb.orb.rmi; \ - org.jacorb.poa; \ - org.omg.CORBA; \ - org.omg.CORBA_2_3; \ - org.omg.CORBA_2_3.portable; \ - org.omg.CORBA.DynAnyPackage; \ - org.omg.CORBA.ORBPackage; \ - org.omg.CORBA.portable; \ - org.omg.CORBA.TypeCodePackage; \ - org.omg.CosNaming; \ - org.omg.CosNaming.NamingContextExtPackage; \ - org.omg.CosNaming.NamingContextPackage; \ - org.omg.CosTransactions; \ - org.omg.CSI; \ - org.omg.CSIIOP; \ - org.omg.Dynamic; \ - org.omg.DynamicAny; \ - org.omg.DynamicAny.DynAnyFactoryPackage; \ - org.omg.DynamicAny.DynAnyPackage; \ - org.omg.ETF; \ - org.omg.GSSUP; \ - org.omg.IOP; \ - org.omg.IOP.CodecFactoryPackage; \ - org.omg.IOP.CodecPackage; \ - org.omg.Messaging; \ - org.omg.PortableInterceptor; \ - org.omg.PortableInterceptor.ORBInitInfoPackage; \ - org.omg.PortableServer; \ - org.omg.PortableServer.CurrentPackage; \ - org.omg.PortableServer.POAManagerPackage; \ - org.omg.PortableServer.POAPackage; \ - org.omg.PortableServer.portable; \ - org.omg.PortableServer.ServantLocatorPackage; \ - org.omg.SendingContext; \ - org.omg.SSLIOP; \ - org.omg.stub.java.rmi; \ - org.omg.stub.javax.management.remote.rmi; \ - org.w3c.dom; \ - org.w3c.dom.bootstrap; \ - org.w3c.dom.css; \ - org.w3c.dom.events; \ - org.w3c.dom.html; \ - org.w3c.dom.ls; \ - org.w3c.dom.ranges; \ - org.w3c.dom.stylesheets; \ - org.w3c.dom.traversal; \ - org.w3c.dom.views; \ - org.w3c.dom.xpath; \ - org.xml.sax; \ - org.xml.sax.ext; \ - org.xml.sax.helpers; \ - sun.rmi.registry; \ - sun.rmi.server; \ - sun.rmi.transport; \ - sun.security.util; \ - sun.security.provider; \ - sun.util.calendar; \ - version="1.5.0" - -#felix.auto.start.1= \ -# file:bundle/org.apache.felix.shell-1.0.0.jar \ -# file:bundle/org.apache.felix.shell.tui-1.0.0.jar \ -# file:bundle/org.apache.felix.bundlerepository-1.0.0.jar - -org.osgi.framework.startlevel=1 -felix.startlevel.bundle=1 - -# Invalid fragment bundles throw an 'exception' by default, but -# uncomment the follow line to have them log a 'warning' instead. -felix.fragment.validation=warning - -# -# Bundle config properties. -# -#org.osgi.service.http.port=8080 -obr.shell.telnet=on - diff --git a/jonas_tests/jaxws/jaxws-felix/src/main/config/jonas-autodeploy-bundles.properties b/jonas_tests/jaxws/jaxws-felix/src/main/config/jonas-autodeploy-bundles.properties deleted file mode 100644 index 936ec545a30b8f63655b036c9e9a518a3468730b..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-felix/src/main/config/jonas-autodeploy-bundles.properties +++ /dev/null @@ -1,73 +0,0 @@ -# Generated Mon May 18 20:03:53 CST 2009 by JOnAS. - -install.level.1 org.apache.felix:org.apache.felix.shell.tui:1.0.2 - -start.level.1 org.apache.felix:org.apache.felix.shell:1.0.2, \ - org.apache.felix:org.apache.felix.bundlerepository:1.2.1, \ - org.apache.felix:org.apache.felix.ipojo:1.2.0, \ - org.apache.felix:org.apache.felix.ipojo.arch:1.2.0, \ - org.ow2.bundles:ow2-bundles-externals-commons-collections:1.0.16-SNAPSHOT, \ - org.ow2.bundles:ow2-bundles-externals-commons-logging:1.0.16-SNAPSHOT, \ - org.ow2.bundles:ow2-util-archive-api:1.0.16-SNAPSHOT, \ - org.ow2.bundles:ow2-util-archive-impl:1.0.16-SNAPSHOT, \ - org.ow2.bundles:ow2-util-ee-deploy-api:1.0.16-SNAPSHOT, \ - org.ow2.bundles:ow2-util-ee-deploy-impl:1.0.16-SNAPSHOT, \ - org.ow2.bundles:ow2-util-scan-api:1.0.16-SNAPSHOT, \ - org.ow2.bundles:ow2-util-scan-impl:1.0.16-SNAPSHOT, \ - org.ow2.bundles:ow2-util-ee-metadata-common-api:1.0.16-SNAPSHOT, \ - org.ow2.bundles:ow2-util-ee-metadata-common-impl:1.0.16-SNAPSHOT, \ - org.ow2.bundles:ow2-util-ee-metadata-car-api:1.0.16-SNAPSHOT, \ - org.ow2.bundles:ow2-util-ee-metadata-car-impl:1.0.16-SNAPSHOT, \ - org.ow2.bundles:ow2-util-ee-metadata-ws-api:1.0.16-SNAPSHOT, \ - org.ow2.bundles:ow2-util-ee-metadata-ws-impl:1.0.16-SNAPSHOT, \ - org.ow2.bundles:ow2-util-ee-metadata-war-api:1.0.16-SNAPSHOT, \ - org.ow2.bundles:ow2-util-ee-metadata-war-impl:1.0.16-SNAPSHOT, \ - org.ow2.bundles:ow2-util-event-api:1.0.16-SNAPSHOT, \ - org.ow2.bundles:ow2-util-file:1.0.16-SNAPSHOT, \ - org.ow2.bundles:ow2-util-i18n:1.0.16-SNAPSHOT, \ - org.ow2.bundles:ow2-util-jmx-api:1.0.16-SNAPSHOT, \ - org.ow2.bundles:ow2-util-log:1.0.16-SNAPSHOT, \ - org.ow2.bundles:ow2-util-pool-api:1.0.16-SNAPSHOT, \ - org.ow2.bundles:ow2-util-url:1.0.16-SNAPSHOT, \ - org.ow2.bundles:ow2-util-xml:1.0.16-SNAPSHOT, \ - org.ow2.bundles:util-plan-schemas:1.0.16-SNAPSHOT, \ - org.ow2.bundles:util-plan-fetcher-api:1.0.16-SNAPSHOT, \ - org.ow2.bundles:util-plan-fetcher-impl:1.0.16-SNAPSHOT, \ - org.ow2.bundles:util-plan-fetcher-impl-url:1.0.16-SNAPSHOT, \ - org.ow2.bundles:util-plan-fetcher-impl-maven2:1.0.16-SNAPSHOT, \ - org.ow2.bundles:util-plan-fetcher-impl-obr:1.0.16-SNAPSHOT, \ - org.ow2.bundles:util-plan-deploy-api:1.0.16-SNAPSHOT, \ - org.ow2.bundles:util-plan-deploy-impl:1.0.16-SNAPSHOT, \ - org.ow2.bundles:util-plan-repository-api:1.0.16-SNAPSHOT, \ - org.ow2.bundles:util-plan-repository-impl:1.0.16-SNAPSHOT, \ - org.ow2.bundles:util-plan-monitor:1.0.16-SNAPSHOT, \ - org.ow2.bundles:util-plan-reader:1.0.16-SNAPSHOT, \ - org.ow2.bundles:util-plan-deployer:1.0.16-SNAPSHOT, \ - org.ow2.jonas.osgi:javaee-api:5.1.0-RC3-SNAPSHOT, \ - org.ow2.bundles:ow2-bundles-externals-jaxb2:1.0.16-SNAPSHOT, \ - org.ow2.bundles:ow2-util-xmlconfig:1.0.16-SNAPSHOT, \ - org.ow2.jonas:jonas-extension-loader:5.1.0-RC3-SNAPSHOT:{ipojo}, \ - org.ow2.easybeans.osgi:easybeans-api:1.1.0-RC2-SNAPSHOT, \ - org.ow2.jonas:jonas-services-api:5.1.0-RC3-SNAPSHOT, \ - org.ow2.jonas.osgi:monolog:5.1.0-RC3-SNAPSHOT, \ - org.ow2.jonas:jonas-version:5.1.0-RC3-SNAPSHOT, \ - org.ow2.jonas:jonas-commons:5.1.0-RC3-SNAPSHOT, \ - org.apache.felix:org.apache.felix.configadmin:1.0.10, \ - org.ow2.jonas:bootstrap:5.1.0-RC3-SNAPSHOT:{ipojo}, \ - org.ow2.carol:carol-interceptors:1.0.1, \ - org.ow2.jonas:jonas-naming:5.1.0-RC3-SNAPSHOT:{ipojo}, \ - org.ow2.jonas:jonas-carol-registry:5.1.0-RC3-SNAPSHOT:{ipojo}, \ - org.ow2.jonas:jonas-management-javaee:5.1.0-RC3-SNAPSHOT, \ - org.ow2.jonas:jonas-jmx:5.1.0-RC3-SNAPSHOT:{ipojo}, \ - org.ow2.jonas:jonas-deployment:5.1.0-RC3-SNAPSHOT, \ - org.ow2.jonas:jonas-domain:5.1.0-RC3-SNAPSHOT, \ - org.ow2.jonas:jonas-management-reconfig:5.1.0-RC3-SNAPSHOT, \ - org.ow2.jonas:jonas-security-auth:5.1.0-RC3-SNAPSHOT, \ - org.ow2.jonas:jonas-security-jacc:5.1.0-RC3-SNAPSHOT, \ - org.ow2.jonas:jonas-security-jacc-handlers:5.1.0-RC3-SNAPSHOT, \ - org.ow2.jonas:jonas-timer:5.1.0-RC3-SNAPSHOT, \ - org.ow2.jonas:jonas-ejb-container-svc:5.1.0-RC3-SNAPSHOT, \ - org.ow2.jonas:jonas-ejb-container:5.1.0-RC3-SNAPSHOT, \ - org.ow2.jonas:jonas-service-manager:5.1.0-RC3-SNAPSHOT:{ipojo}, \ - org.ow2.jonas:jonas-mbeans:5.1.0-RC3-SNAPSHOT:{ipojo}, \ - org.ow2.jonas:jndi-interceptors:5.1.0-RC3-SNAPSHOT:{ipojo} diff --git a/jonas_tests/jaxws/jaxws-felix/src/main/config/testng.xml b/jonas_tests/jaxws/jaxws-felix/src/main/config/testng.xml deleted file mode 100644 index 49ba8e8bf5ef41c99192a4fbe29a2b12ca18f149..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-felix/src/main/config/testng.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/jonas_tests/jaxws/jaxws-test-base/ejb3/pom.xml b/jonas_tests/jaxws/jaxws-test-base/ejb3/pom.xml deleted file mode 100644 index 3e9d55ee8467ccaf9cb94b74d6d293cfd9885e53..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/ejb3/pom.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - org.ow2.jonas - jonas-itests - 5.1.0-RC3-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas.ws.jaxws.itests.base.ejb - ejb3 - jar - JOnAS :: Tests :: JAXWS :: Tests :: Base :: EJB3 - http://maven.apache.org - - - org.ow2.jonas.osgi - javaee-api - ${project.version} - provided - - - - ejb3 - - diff --git a/jonas_tests/jaxws/jaxws-test-base/ejb3/src/main/java/org/ow2/jonas/ejb3/Hello.java b/jonas_tests/jaxws/jaxws-test-base/ejb3/src/main/java/org/ow2/jonas/ejb3/Hello.java deleted file mode 100644 index 56d95e567e4fd5bbd197661361099b493a0c8aeb..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/ejb3/src/main/java/org/ow2/jonas/ejb3/Hello.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ejb3; - - -public interface Hello -{ - public abstract String sayHello(String s); -} - diff --git a/jonas_tests/jaxws/jaxws-test-base/ejb3/src/main/java/org/ow2/jonas/ejb3/HelloBean.java b/jonas_tests/jaxws/jaxws-test-base/ejb3/src/main/java/org/ow2/jonas/ejb3/HelloBean.java deleted file mode 100644 index 7aacc3ca479cabeb929e12f0be6673749605a051..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/ejb3/src/main/java/org/ow2/jonas/ejb3/HelloBean.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ejb3; - -import javax.ejb.Remote; -import javax.ejb.Stateless; - -// Referenced classes of package org.ow2.jonas.ws.axis2.test.ejb3: -// Hello - -@Remote(Hello.class) -@Stateless -public class HelloBean - implements Hello -{ - - public HelloBean() - { - } - - public String sayHello(String str) - { - System.out.println((new StringBuilder("HelloWorldEJB3: ")).append(str).toString()); - return "HelloWorld EJB3!"; - } -} \ No newline at end of file diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-descriptor/pom.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-descriptor/pom.xml deleted file mode 100644 index 6747e9e4deb85f378b20d24820026021b6b93e78..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-descriptor/pom.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - org.ow2.jonas - jonas-itests - 5.1.0-RC3-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas.ws.jaxws.itests.base.ejb - jaxws-ejb-descriptor - jar - JOnAS :: Tests :: JAXWS :: Tests :: Base :: EJB :: Descriptor - http://maven.apache.org - - - org.ow2.jonas.osgi - javaee-api - ${project.version} - provided - - - - jaxws-ejb-descriptor - - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-descriptor/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSBean_descriptor.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-descriptor/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSBean_descriptor.java deleted file mode 100644 index dd6c8a8262880f9b33ca29a7b5f2beced7e7a635..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-descriptor/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSBean_descriptor.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2009 Bull S.A.S - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: xiaoda - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.ejb; - -import javax.ejb.Remote; -import javax.ejb.Stateless; -import javax.jws.WebService; -import javax.jws.WebMethod; -import javax.jws.soap.SOAPBinding; -import javax.xml.namespace.QName; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPFactory; -import javax.xml.soap.SOAPFault; -import javax.xml.ws.soap.SOAPFaultException; - -/** - * This is an EJB based JAXWS web service with @WebMethod annotation. - * @author xiaoda - * - */ -@WebService(name="JAXWSBean_descriptor", - serviceName="JAXWSBean_descriptor", - wsdlLocation="META-INF/wsdl/JAXWSBean_descriptor.wsdl") - -@Stateless(mappedName="JAXWSBean_With_WebMethod") -@Remote(JAXWSGreeter.class) -@SOAPBinding(style=SOAPBinding.Style.DOCUMENT, - use=SOAPBinding.Use.LITERAL, - parameterStyle=SOAPBinding.ParameterStyle.WRAPPED -) -public class JAXWSBean_descriptor implements JAXWSGreeter { - - @WebMethod(exclude=false) - public String greetMe(final String me) { - System.out.println("i'm a ejb ws: " + me); - if (!"foo bar".equals(me)) { - throw new RuntimeException("Wrong parameter"); - } - return "Hello " + me; - } - - - public void greetMeFault(final String me) { - System.out.println("generate SOAP fault"); - SOAPFault fault = null; - try { - fault = SOAPFactory.newInstance().createFault(); - fault.setFaultCode(new QName("http://foo", "MyFaultCode")); - fault.setFaultString("my error"); - fault.setFaultActor("my actor"); - } catch (SOAPException ex) { - throw new RuntimeException(ex); - } - - throw new SOAPFaultException(fault); - } - -} diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-descriptor/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSGreeter.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-descriptor/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSGreeter.java deleted file mode 100644 index a77053df35c2c9e272e5108ed65538d63763544e..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-descriptor/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSGreeter.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2009 Bull S.A.S - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: xiaoda - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.ejb; - - -public interface JAXWSGreeter { - - public String greetMe(String me); - -} diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-descriptor/src/main/resources/META-INF/easybeans.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-descriptor/src/main/resources/META-INF/easybeans.xml deleted file mode 100644 index b1118d6229230a71551080ef7d5a310f0a6b3205..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-descriptor/src/main/resources/META-INF/easybeans.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - JAXWSBean_descriptor - - - \ No newline at end of file diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-descriptor/src/main/resources/META-INF/webservices.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-descriptor/src/main/resources/META-INF/webservices.xml deleted file mode 100644 index 05c4da6a48a0ca36e0cad2960016c125add081cc..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-descriptor/src/main/resources/META-INF/webservices.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - ejb-descriptor - META-INF/wsdl/JAXWSBean_descriptor.wsdl - - JAXWSBean_descriptor - ejb:JAXWSBean_descriptor - ejb:JAXWSBean_descriptorPort - false - org.ow2.jonas.ws.jaxws.test.ejb.JAXWSGreeter - - JAXWSBean_descriptor - - - - \ No newline at end of file diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-descriptor/src/main/resources/META-INF/wsdl/JAXWSBean_descriptor.wsdl b/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-descriptor/src/main/resources/META-INF/wsdl/JAXWSBean_descriptor.wsdl deleted file mode 100644 index 7e6c62ef3813e242ab74cb580cbc9953362b63f5..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-descriptor/src/main/resources/META-INF/wsdl/JAXWSBean_descriptor.wsdl +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-injection/pom.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-injection/pom.xml deleted file mode 100644 index 58617328da3c77e381833425258e4321dd6500e9..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-injection/pom.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - org.ow2.jonas - jonas-itests - 5.1.0-RC3-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas.ws.jaxws.itests.base.ejb - jaxws-ejb-injection - jar - JOnAS :: Tests :: JAXWS :: Tests :: Base :: EJB :: Injection - http://maven.apache.org - - - org.ow2.jonas.osgi - javaee-api - ${project.version} - provided - - - - jaxws-ejb-injection - - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-injection/src/main/java/org/ow2/jonas/ejb3/Hello.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-injection/src/main/java/org/ow2/jonas/ejb3/Hello.java deleted file mode 100644 index 56d95e567e4fd5bbd197661361099b493a0c8aeb..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-injection/src/main/java/org/ow2/jonas/ejb3/Hello.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ejb3; - - -public interface Hello -{ - public abstract String sayHello(String s); -} - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-injection/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSBeanInjection.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-injection/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSBeanInjection.java deleted file mode 100644 index e536e3f0be39e46d0bbc3b0992a437076d22c18b..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-injection/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSBeanInjection.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.ejb; - -import javax.annotation.Resource; -import javax.ejb.EJB; -import javax.ejb.Remote; -import javax.ejb.SessionContext; -import javax.ejb.Stateless; -import javax.jws.WebService; -import javax.jws.WebMethod; -import javax.jws.soap.SOAPBinding; -import javax.xml.namespace.QName; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPFactory; -import javax.xml.soap.SOAPFault; -import javax.xml.ws.WebServiceContext; -import javax.xml.ws.soap.SOAPFaultException; - -import org.ow2.jonas.ejb3.Hello; - -/** - * This is an EJB based JAXWS web service with @WebMethod annotation. - * - * @author xiaoda - * - */ -@WebService(name = "JAXWSBeanInjection", serviceName = "JAXWSBeanInjection", wsdlLocation = "META-INF/wsdl/JAXWSBeanInjection.wsdl") -@Stateless(mappedName = "JAXWSBeanInjection") -@Remote(JAXWSGreeter.class) -@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) -public class JAXWSBeanInjection implements JAXWSGreeter { - - @Resource - private SessionContext sessionContext; - - @Resource - WebServiceContext wsContext; - - @EJB(name = "Hello", beanInterface=Hello.class,beanName="org.ow2.jonas.ejb3.HelloBean") - Hello hello; - - @WebMethod(exclude = false) - public String greetMe(final String me) { - String res = new String(); - res = me; - - if (wsContext != null) { - System.out.println("wsContext is not null"); - res = res + "wsContext"; - } - if (hello != null) { - System.out.println("hello is not null"); - res = res + "hello"; - } - - if (sessionContext != null) { - System.out.println("sessionContext is not null"); - res = res + "sessionContext"; - } - return res; - } - - public void greetMeFault(final String me) { - System.out.println("generate SOAP fault"); - SOAPFault fault = null; - try { - fault = SOAPFactory.newInstance().createFault(); - fault.setFaultCode(new QName("http://foo", "MyFaultCode")); - fault.setFaultString("my error"); - fault.setFaultActor("my actor"); - } catch (SOAPException ex) { - throw new RuntimeException(ex); - } - throw new SOAPFaultException(fault); - } - -} diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-injection/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSGreeter.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-injection/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSGreeter.java deleted file mode 100644 index 6f646d0ec3b78873cf97925c97cfc626d5960e69..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-injection/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSGreeter.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.ejb; - - -public interface JAXWSGreeter { - - public String greetMe(String me); - -} diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-injection/src/main/resources/META-INF/wsdl/JAXWSBeanInjection.wsdl b/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-injection/src/main/resources/META-INF/wsdl/JAXWSBeanInjection.wsdl deleted file mode 100644 index 7ca02a3b1ecc592c091ed63560e50b0e8ac2b606..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-injection/src/main/resources/META-INF/wsdl/JAXWSBeanInjection.wsdl +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-interceptor/pom.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-interceptor/pom.xml deleted file mode 100644 index 7f1e75eeb7786356323f0a703ee85d8d416a9da5..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-interceptor/pom.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - org.ow2.jonas - jonas-itests - 5.1.0-RC3-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas.ws.jaxws.itests.base.ejb - jaxws-ejb-interceptor - jar - JOnAS :: Tests :: JAXWS :: Tests :: Base :: EJB :: Interceptor - http://maven.apache.org - - - org.ow2.jonas.osgi - javaee-api - ${project.version} - provided - - - - jaxws-ejb-interceptor - - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-interceptor/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/EJBWSwihtInterceptors.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-interceptor/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/EJBWSwihtInterceptors.java deleted file mode 100644 index 445b925060ed079e8e5f72b46133dd0a009cda67..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-interceptor/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/EJBWSwihtInterceptors.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.ejb; - -import javax.ejb.Remote; -import javax.ejb.Stateless; -import javax.interceptor.AroundInvoke; -import javax.interceptor.Interceptors; -import javax.interceptor.InvocationContext; -import javax.jws.WebService; -import javax.jws.WebMethod; -import javax.jws.soap.SOAPBinding; -import javax.xml.namespace.QName; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPFactory; -import javax.xml.soap.SOAPFault; -import javax.xml.ws.soap.SOAPFaultException; - -/** - * This is an EJB based JAXWS web service with @WebMethod annotation. - * @author xiaoda - * - */ -@WebService(name="EJBWSwihtInterceptors", - serviceName="EJBWSwihtInterceptors", - wsdlLocation="META-INF/wsdl/EJBWSwihtInterceptors.wsdl", - endpointInterface="org.ow2.jonas.ws.jaxws.test.ejb.JAXWSGreeterForWithWM") - -@Stateless(mappedName="JAXWSBeanWithWebMethod") -@Remote(JAXWSGreeterForWithWM.class) -@SOAPBinding(style=SOAPBinding.Style.DOCUMENT, - use=SOAPBinding.Use.LITERAL, - parameterStyle=SOAPBinding.ParameterStyle.WRAPPED -) -@Interceptors(GreeterInterceptor.class) -public class EJBWSwihtInterceptors implements JAXWSGreeter { - - private String response = "Hello"; - - @WebMethod - public String greetMe(final String me) { - System.out.println("i'm a ejb ws: " + me); - return response + me; - } - - @WebMethod - public void greetMeFault(final String me) { - System.out.println("generate SOAP fault"); - SOAPFault fault = null; - try { - fault = SOAPFactory.newInstance().createFault(); - fault.setFaultCode(new QName("http://foo", "MyFaultCode")); - fault.setFaultString("my error"); - fault.setFaultActor("my actor"); - } catch (SOAPException ex) { - throw new RuntimeException(ex); - } - - throw new SOAPFaultException(fault); - } - - public String greetYou(final String you) { - System.out.println("i'm a ejb ws: " + you); - System.out.println("greet you"); - return "Hi " + you; - } - - public String sayHello(String name) { - return "Hello World! " + name; - } - - - @AroundInvoke - public Object trace(InvocationContext ic) throws Exception { - //ic.getParameters()[0] = "inceptor"; - response = response + " intercepted"; - System.out.println("Intercepted method : " + ic.getMethod().getName()); - return ic.proceed(); - } -} diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-interceptor/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/EJBWSwithAroundInvoke.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-interceptor/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/EJBWSwithAroundInvoke.java deleted file mode 100644 index 166aacb3adb9116506c8c9547f4e0f2517a195d6..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-interceptor/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/EJBWSwithAroundInvoke.java +++ /dev/null @@ -1,101 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.ejb; - -import javax.ejb.Remote; -import javax.ejb.Stateless; -import javax.interceptor.AroundInvoke; -import javax.interceptor.InvocationContext; -import javax.jws.WebService; -import javax.jws.WebMethod; -import javax.jws.soap.SOAPBinding; -import javax.xml.namespace.QName; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPFactory; -import javax.xml.soap.SOAPFault; -import javax.xml.ws.soap.SOAPFaultException; - -/** - * This is an EJB based JAXWS web service with @WebMethod annotation. - * @author xiaoda - * - */ -@WebService(name="EJBWSwithAroundInvoke", - serviceName="EJBWSwithAroundInvoke", - wsdlLocation="META-INF/wsdl/EJBWSwithAroundInvoke.wsdl", - endpointInterface="org.ow2.jonas.ws.jaxws.test.ejb.JAXWSGreeterForWithWM") - -@Stateless(mappedName="JAXWSBeanWithWebMethod") -@Remote(JAXWSGreeterForWithWM.class) -@SOAPBinding(style=SOAPBinding.Style.DOCUMENT, - use=SOAPBinding.Use.LITERAL, - parameterStyle=SOAPBinding.ParameterStyle.WRAPPED -) -public class EJBWSwithAroundInvoke implements JAXWSGreeter { - - private String response = "Hello"; - - @WebMethod - public String greetMe(final String me) { - System.out.println("i'm a ejb ws: " + me); - return response + me; - } - - @WebMethod - public void greetMeFault(final String me) { - System.out.println("generate SOAP fault"); - SOAPFault fault = null; - try { - fault = SOAPFactory.newInstance().createFault(); - fault.setFaultCode(new QName("http://foo", "MyFaultCode")); - fault.setFaultString("my error"); - fault.setFaultActor("my actor"); - } catch (SOAPException ex) { - throw new RuntimeException(ex); - } - - throw new SOAPFaultException(fault); - } - - public String greetYou(final String you) { - System.out.println("i'm a ejb ws: " + you); - System.out.println("greet you"); - return "Hi " + you; - } - - public String sayHello(String name) { - return "Hello World! " + name; - } - - - @AroundInvoke - public Object trace(InvocationContext ic) throws Exception { - //ic.getParameters()[0] = "inceptor"; - response = response + " intercepted"; - System.out.println("Intercepted method : " + ic.getMethod().getName()); - return ic.proceed(); - } -} diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-interceptor/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/GreeterInterceptor.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-interceptor/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/GreeterInterceptor.java deleted file mode 100644 index 9056dc9a04f48c01a0c314111f00be42122ef634..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-interceptor/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/GreeterInterceptor.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.ejb; - -import javax.interceptor.AroundInvoke; -import javax.interceptor.InvocationContext;/** - * This class intercepts Business interfaces methods - */ -public class GreeterInterceptor { /** - * Invocation counter - */ - private int counter = 0; /** - * Count the invocations of a bean. - * @param ic InvocationContext - * @return proceeded method - * @throws Exception if something wrong occurs. - */ - @AroundInvoke - public Object count(InvocationContext ic) throws Exception { synchronized(this) { - counter++; - System.out.println("Method '" + ic.getMethod().getName() - + "' invoked " + counter + " times."); - return ic.proceed(); - } - } -} \ No newline at end of file diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-interceptor/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSGreeter.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-interceptor/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSGreeter.java deleted file mode 100644 index bec8bb79a5407fb230505bde42b55c5a082f331b..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-interceptor/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSGreeter.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.ejb; - - -public interface JAXWSGreeter { - - public String sayHello(String name); - -} diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-interceptor/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSGreeterForWithWM.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-interceptor/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSGreeterForWithWM.java deleted file mode 100644 index cff98020c5993870d937f80071d71a9e4d792c8c..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-interceptor/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSGreeterForWithWM.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.ejb; - -import javax.jws.WebService; - -@WebService -public interface JAXWSGreeterForWithWM { - - public String greetMe(final String me); - public void greetMeFault(final String me); -} \ No newline at end of file diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-interceptor/src/main/resources/META-INF/wsdl/EJBWSwihtInterceptors.wsdl b/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-interceptor/src/main/resources/META-INF/wsdl/EJBWSwihtInterceptors.wsdl deleted file mode 100644 index 2bebc399346a3bd1228913dcb953cdca3a3620ec..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-interceptor/src/main/resources/META-INF/wsdl/EJBWSwihtInterceptors.wsdl +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-interceptor/src/main/resources/META-INF/wsdl/EJBWSwithAroundInvoke.wsdl b/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-interceptor/src/main/resources/META-INF/wsdl/EJBWSwithAroundInvoke.wsdl deleted file mode 100644 index d3d2bb6e40ec5229ba354248400811b8a8dec3df..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-interceptor/src/main/resources/META-INF/wsdl/EJBWSwithAroundInvoke.wsdl +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-webmethod/pom.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-webmethod/pom.xml deleted file mode 100644 index ea622aee8f40fe1d200c8061d0019f984ea2b998..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-webmethod/pom.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - org.ow2.jonas - jonas-itests - 5.1.0-RC3-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas.ws.jaxws.itests.base.ejb - jaxws-ejb - jar - JOnAS :: Tests :: JAXWS :: Tests :: Base :: EJB :: Webmethod - http://maven.apache.org - - - org.ow2.jonas.osgi - javaee-api - ${project.version} - provided - - - - jaxws-ejb-webmethod - - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-webmethod/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSBeanWithWebMethod.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-webmethod/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSBeanWithWebMethod.java deleted file mode 100644 index 801fe966f25eb0fe66bd06603589299b4acfc1a2..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-webmethod/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSBeanWithWebMethod.java +++ /dev/null @@ -1,91 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.ejb; - -import javax.annotation.Resource; -import javax.ejb.EJB; -import javax.ejb.Remote; -import javax.ejb.Stateless; -import javax.jws.WebService; -import javax.jws.WebMethod; -import javax.jws.soap.SOAPBinding; -import javax.xml.namespace.QName; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPFactory; -import javax.xml.soap.SOAPFault; -import javax.xml.ws.soap.SOAPFaultException; - -/** - * This is an EJB based JAXWS web service with @WebMethod annotation. - * @author xiaoda - * - */ -@WebService(name="JAXWSBeanWithWebMethod", - serviceName="JAXWSBeanWithWebMethod", - wsdlLocation="META-INF/wsdl/JAXWSBeanWithWebMethod.wsdl", - endpointInterface="org.ow2.jonas.ws.jaxws.test.ejb.JAXWSGreeterForWithWM") - -@Stateless(mappedName="JAXWSBeanWithWebMethod") -@Remote(JAXWSGreeterForWithWM.class) -@SOAPBinding(style=SOAPBinding.Style.DOCUMENT, - use=SOAPBinding.Use.LITERAL, - parameterStyle=SOAPBinding.ParameterStyle.WRAPPED -) -public class JAXWSBeanWithWebMethod implements JAXWSGreeter { - - - @WebMethod - public String greetMe(final String me) { - System.out.println("i'm a ejb ws: " + me); - return "Hello " + me; - } - - @WebMethod - public void greetMeFault(final String me) { - System.out.println("generate SOAP fault"); - SOAPFault fault = null; - try { - fault = SOAPFactory.newInstance().createFault(); - fault.setFaultCode(new QName("http://foo", "MyFaultCode")); - fault.setFaultString("my error"); - fault.setFaultActor("my actor"); - } catch (SOAPException ex) { - throw new RuntimeException(ex); - } - - throw new SOAPFaultException(fault); - } - - public String greetYou(final String you) { - System.out.println("i'm a ejb ws: " + you); - System.out.println("greet you"); - return "Hi " + you; - } - - public String sayHello(String name) { - return "Hello World! " + name; - } -} diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-webmethod/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSBeanWithoutWebMethod.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-webmethod/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSBeanWithoutWebMethod.java deleted file mode 100644 index 14a4f01b7577a262c983e395d4278f43bb2e8f8e..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-webmethod/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSBeanWithoutWebMethod.java +++ /dev/null @@ -1,92 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.ejb; - -import javax.ejb.Remote; -import javax.ejb.Stateless; -import javax.jws.WebService; -import javax.jws.soap.SOAPBinding; -import javax.xml.namespace.QName; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPFactory; -import javax.xml.soap.SOAPFault; -import javax.xml.ws.soap.SOAPFaultException; - -/** - * This is an EJB based JAXWS web service with @WebMethod annotation. - * @author xiaoda - * - */ - -// Here we do not specify the SEI, web service container will generate a default SEI -// this SEI will contain all @WebMethod annotated methods and public methods -// see specs Web Services for Java EE, Version 1.2 # chapter 3.3 -@WebService(name="JAXWSBeanWithoutWebMethod", - serviceName="JAXWSBeanWithoutWebMethod", - wsdlLocation="META-INF/wsdl/JAXWSBeanWithoutWebMethod.wsdl") - -@Stateless(mappedName="JAXWSBeanWithoutWebMethod") -@Remote(JAXWSGreeter.class) -@SOAPBinding(style=SOAPBinding.Style.DOCUMENT, - use=SOAPBinding.Use.LITERAL, - parameterStyle=SOAPBinding.ParameterStyle.WRAPPED -) -public class JAXWSBeanWithoutWebMethod implements JAXWSGreeter { - - - public String greetMe(final String me) { - System.out.println("i'm a ejb ws : " + me); - System.out.println("greet me"); - return "Hello " + me; - } - - - public void greetMeFault(final String me) { - System.out.println("generate SOAP fault"); - SOAPFault fault = null; - try { - fault = SOAPFactory.newInstance().createFault(); - fault.setFaultCode(new QName("http://foo", "MyFaultCode")); - fault.setFaultString("my error"); - fault.setFaultActor("my actor"); - } catch (SOAPException ex) { - throw new RuntimeException(ex); - } - - throw new SOAPFaultException(fault); - } - - public String greetYou(final String you) { - System.out.println("i'm a ejb ws: " + you); - System.out.println("greet you"); - return "Hi " + you; - } - - public String sayHello(String name) { - return "Hello World!" + name; - } - -} diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-webmethod/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSGreeter.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-webmethod/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSGreeter.java deleted file mode 100644 index 20275f480a9c8d2e7095d26b3d18b72099be0c6b..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-webmethod/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSGreeter.java +++ /dev/null @@ -1,32 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.ejb; - - -public interface JAXWSGreeter { - - public String sayHello(String name); -} diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-webmethod/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSGreeterForWithWM.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-webmethod/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSGreeterForWithWM.java deleted file mode 100644 index b10888a5ec108c11fdffe1e26af8b6ab338f680f..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-webmethod/src/main/java/org/ow2/jonas/ws/jaxws/test/ejb/JAXWSGreeterForWithWM.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.ow2.jonas.ws.jaxws.test.ejb; - -import javax.jws.WebService; - -@WebService -public interface JAXWSGreeterForWithWM { - - public String greetMe(final String me); - public void greetMeFault(final String me); -} \ No newline at end of file diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-webmethod/src/main/resources/META-INF/wsdl/JAXWSBeanWithWebMethod.wsdl b/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-webmethod/src/main/resources/META-INF/wsdl/JAXWSBeanWithWebMethod.wsdl deleted file mode 100644 index a7ffbe337f22e7c573a388685dde27f7a320e810..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-webmethod/src/main/resources/META-INF/wsdl/JAXWSBeanWithWebMethod.wsdl +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-webmethod/src/main/resources/META-INF/wsdl/JAXWSBeanWithoutWebMethod.wsdl b/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-webmethod/src/main/resources/META-INF/wsdl/JAXWSBeanWithoutWebMethod.wsdl deleted file mode 100644 index decd5d35796835e13fdec3f4a4a8dda46e9b8303..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-ejb-webmethod/src/main/resources/META-INF/wsdl/JAXWSBeanWithoutWebMethod.wsdl +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/pom.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/pom.xml deleted file mode 100644 index 364777af11b6f63972afdeb14795ca65ede890c0..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/pom.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - org.ow2.jonas - jonas-itests - 5.1.0-RC3-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas.ws.jaxws.itests.base.pojo - jaxws-pojo-complex - war - JOnAS :: Tests :: JAXWS :: Tests :: Base :: POJO :: Complex - - - org.ow2.jonas.osgi - javaee-api - ${project.version} - provided - - - - jaxws-pojo-complex - - \ No newline at end of file diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/JAXWSBean3.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/JAXWSBean3.java deleted file mode 100644 index 8ba61102c062460a5b67fbbe969d3482da3d4b6e..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/JAXWSBean3.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2009 Bull S.A.S - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: xiaoda - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - - -package org.ow2.jonas.ws.jaxws.test.pojo; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.ws.WebServiceContext; -import javax.jws.WebService; -import javax.annotation.Resource; - -@WebService(name = "Person", - targetNamespace = "http://org.ow2.jonas.ws.jaxws.test.person",wsdlLocation="WEB-INF/wsdl/JAXWSBean3Service.wsdl") -public class JAXWSBean3 { - -@Resource WebServiceContext wsContext; - - private static List PERSONS = new ArrayList(); - - static { - PERSONS.add(new Person("eric", "cartman")); - PERSONS.add(new Person("homer", "simpson")); - } - - public Person[] getPersons1() { - System.out.println(wsContext); - return PERSONS.toArray(new Person [] {}); - } - - public List getPersons2() { - return PERSONS; - } - -} diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/Person.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/Person.java deleted file mode 100644 index 2a238f0733a458b1539b6bbdc389952a9fec128f..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/Person.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2009 Bull S.A.S - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.pojo; - -public class Person { - - private String firstName; - private String lastName; - - public Person() { - } - - public Person(String firstName, String lastName) { - this.firstName = firstName; - this.lastName = lastName; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - -} diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/jaxws/GetPersons1.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/jaxws/GetPersons1.java deleted file mode 100644 index 6956a14862f1c7bc72ef3cf67158c4203503bdfd..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/jaxws/GetPersons1.java +++ /dev/null @@ -1,24 +0,0 @@ - -package org.ow2.jonas.ws.jaxws.test.pojo.jaxws; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - -/** - * This class was generated by the CXF 2.0.9 - * Mon Jun 22 21:09:13 CST 2009 - * Generated source version: 2.0.9 - * - */ - -@XmlRootElement(name = "getPersons1", namespace = "http://org.ow2.jonas.ws.jaxws.test.person") -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "getPersons1", namespace = "http://org.ow2.jonas.ws.jaxws.test.person") - -public class GetPersons1 { - - -} - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/jaxws/GetPersons1Response.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/jaxws/GetPersons1Response.java deleted file mode 100644 index 30e0a44da1a048c78dfdf45888643225953df867..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/jaxws/GetPersons1Response.java +++ /dev/null @@ -1,35 +0,0 @@ - -package org.ow2.jonas.ws.jaxws.test.pojo.jaxws; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - -/** - * This class was generated by the CXF 2.0.9 - * Mon Jun 22 21:09:13 CST 2009 - * Generated source version: 2.0.9 - * - */ - -@XmlRootElement(name = "getPersons1Response", namespace = "http://org.ow2.jonas.ws.jaxws.test.person") -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "getPersons1Response", namespace = "http://org.ow2.jonas.ws.jaxws.test.person") - -public class GetPersons1Response { - - @XmlElement(name = "return") - private org.ow2.jonas.ws.jaxws.test.pojo.Person[] _return; - - public org.ow2.jonas.ws.jaxws.test.pojo.Person[] get_return() { - return this._return; - } - - public void set_return( org.ow2.jonas.ws.jaxws.test.pojo.Person[] new_return ) { - this._return = new_return; - } - -} - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/jaxws/GetPersons2.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/jaxws/GetPersons2.java deleted file mode 100644 index b8b6eb17d8a1b8d80f12a326d93f2054a6e888e6..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/jaxws/GetPersons2.java +++ /dev/null @@ -1,24 +0,0 @@ - -package org.ow2.jonas.ws.jaxws.test.pojo.jaxws; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - -/** - * This class was generated by the CXF 2.0.9 - * Mon Jun 22 21:09:13 CST 2009 - * Generated source version: 2.0.9 - * - */ - -@XmlRootElement(name = "getPersons2", namespace = "http://org.ow2.jonas.ws.jaxws.test.person") -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "getPersons2", namespace = "http://org.ow2.jonas.ws.jaxws.test.person") - -public class GetPersons2 { - - -} - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/jaxws/GetPersons2Response.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/jaxws/GetPersons2Response.java deleted file mode 100644 index fd08ad7d69b64f71118fb973a46a54a9925cbf09..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/jaxws/GetPersons2Response.java +++ /dev/null @@ -1,35 +0,0 @@ - -package org.ow2.jonas.ws.jaxws.test.pojo.jaxws; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - -/** - * This class was generated by the CXF 2.0.9 - * Mon Jun 22 21:09:13 CST 2009 - * Generated source version: 2.0.9 - * - */ - -@XmlRootElement(name = "getPersons2Response", namespace = "http://org.ow2.jonas.ws.jaxws.test.person") -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "getPersons2Response", namespace = "http://org.ow2.jonas.ws.jaxws.test.person") - -public class GetPersons2Response { - - @XmlElement(name = "return") - private java.util.List _return; - - public java.util.List get_return() { - return this._return; - } - - public void set_return( java.util.List new_return ) { - this._return = new_return; - } - -} - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/src/main/webapp/WEB-INF/jonas-web.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/src/main/webapp/WEB-INF/jonas-web.xml deleted file mode 100644 index 27eb0b90c90d8a9967030ace1cb215ab7c17cb1d..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/src/main/webapp/WEB-INF/jonas-web.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - pojo - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/src/main/webapp/WEB-INF/web.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 08957617887d5bfe7df6ab840ba41666a8b8731c..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - JOnAS Package index - - Display the context which are preconfigured. - - - - SimpleService - org.ow2.jonas.ws.jaxws.test.JAXWSBean3 - - - - SimpleService - /SimpleService - - \ No newline at end of file diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/src/main/webapp/WEB-INF/wsdl/JAXWSBean3Service.wsdl b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/src/main/webapp/WEB-INF/wsdl/JAXWSBean3Service.wsdl deleted file mode 100644 index 5b8988c86d83769f23c63900c4db44cb2d5ae023..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-complex/src/main/webapp/WEB-INF/wsdl/JAXWSBean3Service.wsdl +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/pom.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/pom.xml deleted file mode 100644 index 41ec8a9b66ee1fe699d74320cd261ca4a85f5629..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/pom.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - org.ow2.jonas - jonas-itests - 5.1.0-RC3-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas.ws.jaxws.itests.base.pojo - jaxws-pojo-descriptor - war - JOnAS :: Tests :: JAXWS :: Tests :: Base :: POJO :: Descriptor - - - org.ow2.jonas.osgi - javaee-api - ${project.version} - provided - - - - jaxws-pojo-descriptor - - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/java/org/ow2/jonas/ejb3/Hello.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/java/org/ow2/jonas/ejb3/Hello.java deleted file mode 100644 index 384133d381184cad74db97a4db8e65b04eccd782..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/java/org/ow2/jonas/ejb3/Hello.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.ow2.jonas.ejb3; - - -public interface Hello -{ - public abstract String sayHello(String s); -} - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/java/org/ow2/jonas/ejb3/HelloBean.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/java/org/ow2/jonas/ejb3/HelloBean.java deleted file mode 100644 index 3ffb9c9a3e21ee6aed9107d37905fd88f41ef6d2..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/java/org/ow2/jonas/ejb3/HelloBean.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.ow2.jonas.ejb3; - -import javax.ejb.Remote; -import javax.ejb.Stateless; - -// Referenced classes of package org.ow2.jonas.ws.axis2.test.ejb3: -// Hello - -@Remote(Hello.class) -@Stateless -public class HelloBean - implements Hello -{ - - public HelloBean() - { - } - - public String sayHello(String str) - { - System.out.println((new StringBuilder("HelloWorldEJB3: ")).append(str).toString()); - return "HelloWorld EJB3!"; - } -} \ No newline at end of file diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/GreeterLogicalHandler.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/GreeterLogicalHandler.java deleted file mode 100644 index 6b890ff2097f3eb99efcabd17b3e5fecbbeeda54..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/GreeterLogicalHandler.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.pojo; - - -import javax.ejb.EJB; -import javax.xml.ws.handler.LogicalMessageContext; -import javax.xml.ws.handler.MessageContext; -//import org.ow2.jonas.ws.axis2.ejb3.Hello; - -public class GreeterLogicalHandler implements javax.xml.ws.handler.LogicalHandler { - - //@Resource(name = "greeting") - //private String greeting; - - //@EJB(name="org.ow2.jonas.ws.axis2.ejb3.Hello") - //Hello hello; - - public void close(final MessageContext arg0) { - // TODO Auto-generated method stub - System.out.println("CLOSE in LogicalHandler"); - } - - public boolean handleFault(final LogicalMessageContext arg0) { - // TODO Auto-generated method stub - return true; - } - - public boolean handleMessage(final LogicalMessageContext context) { - - // TODO Auto-generated method stub - System.out.println("GREATERLogicalHandler HandleMessage"); - //System.out.println(greeting); - //hello.sayHello("hello world"); - - return true; - } -} - - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/GreeterSOAPHandler.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/GreeterSOAPHandler.java deleted file mode 100644 index c593b55918bbb25bebdaf16f7aa071b3ffeda025..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/GreeterSOAPHandler.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.pojo; - - -import java.util.Iterator; -import java.util.Map; -import java.util.Set; -import java.util.TreeSet; -import javax.annotation.PostConstruct; -import javax.annotation.PreDestroy; -import javax.annotation.Resource; -import javax.xml.namespace.QName; -import javax.xml.soap.Node; -import javax.xml.soap.SOAPElement; -import javax.xml.soap.SOAPException; -import javax.xml.ws.WebServiceContext; -import javax.xml.ws.handler.MessageContext; -import javax.xml.ws.handler.soap.SOAPHandler; -import javax.xml.ws.handler.soap.SOAPMessageContext; - -public class GreeterSOAPHandler implements SOAPHandler { - - @Resource - WebServiceContext WSContext = null; - - //@Resource(name = "greeting") - //private String greeting; - - @PostConstruct - public void init() { - System.out.println(this + " init: " + WSContext); - } - - @PreDestroy - public void destroy() { - System.out.println(this + " destroy"); - } - - public void init(final Map config) { - } - - public boolean handleFault(final SOAPMessageContext context) { - System.out.println(this + " handleFault"); - return true; - } - - public void close(final MessageContext context) { - System.out.println("CLOSE in SOAPHandler"); - } - - public boolean handleMessage(final SOAPMessageContext context) { - System.out.println("GREATERSOAPHandler HandleMessage"); - System.out.println(context == null); - System.out.println(WSContext == null); - System.out.println(context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY)); - - try { - if("false".equalsIgnoreCase(context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY).toString())) { - String content = context.getMessage().getSOAPPart().getEnvelope().getBody().getFirstChild().getFirstChild().getFirstChild().getTextContent(); - context.getMessage().getSOAPPart().getEnvelope().getBody().getFirstChild().getFirstChild().getFirstChild().setTextContent(content + "SOAPHandler"); - } - } catch (SOAPException e) { - e.printStackTrace(); - } - return true; - } - - public Set getHeaders() { - System.out.println(this + " getHeaders"); - return new TreeSet(); - } - -} diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/SimpleService.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/SimpleService.java deleted file mode 100644 index 5efc23f641d65e5e2b39a844dffcdc4d12884fb8..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/SimpleService.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.ow2.jonas.ws.jaxws.test.pojo; - -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2009 Bull S.A.S - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: xiaoda - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -import javax.annotation.Resource; -import javax.jws.WebService; - -import org.ow2.jonas.ejb3.Hello; - -/** - * This is a basic JAXWS pojo web service. - * @author xiaoda - * - */ -@WebService(name="SimpleService",serviceName="SimpleService",wsdlLocation="WEB-INF/wsdl/SimpleService.wsdl") -public class SimpleService implements SimpleServiceInterface { - - private static final long serialVersionUID = 1L; - - public String greetMe(String str) { - return "hello" + str; - } -} diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/SimpleServiceInterface.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/SimpleServiceInterface.java deleted file mode 100644 index 073685bc6ed1927f8b8b72d7a4f490a12f84c7f4..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/SimpleServiceInterface.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.pojo; - -import javax.jws.WebMethod; - -public interface SimpleServiceInterface { - - @WebMethod(exclude=false) - public String greetMe(String str); -} diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/webapp/WEB-INF/jonas-web.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/webapp/WEB-INF/jonas-web.xml deleted file mode 100644 index b1fe7890ef7fc37b1d59951b0ebbd567c4b07b3f..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/webapp/WEB-INF/jonas-web.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - pojo - - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/webapp/WEB-INF/web.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 63b069a6dedf869d8b9eadfb68f23a51280e4f5e..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - JOnAS Package index - - Display the context which are preconfigured. - - - - SimpleService - org.ow2.jonas.ws.jaxws.test.pojo.SimpleService - - - - SimpleService - /SimpleService - - - \ No newline at end of file diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/webapp/WEB-INF/webservices.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/webapp/WEB-INF/webservices.xml deleted file mode 100644 index 5be46740a1160a10325facbc316179ce1e74dd8f..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/webapp/WEB-INF/webservices.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - POJO WS (with wsdl) - WEB-INF/wsdl/SService.wsdl - - SimpleService - pojo:SimpleService - pojo:SimpleServicePort - false - org.ow2.jonas.ws.jaxws.test.pojo.SimpleServiceInterface - - SimpleService - - - - - GreeterHandlerA - org.ow2.jonas.ws.jaxws.test.pojo.GreeterSOAPHandler - - - GreeterHandlerB - org.ow2.jonas.ws.jaxws.test.pojo.GreeterSOAPHandler - - - - - - \ No newline at end of file diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/webapp/WEB-INF/wsdl/SService.wsdl b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/webapp/WEB-INF/wsdl/SService.wsdl deleted file mode 100644 index c17a2fe443dcfac310bb0ebfef285ef4ae0eb16a..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/webapp/WEB-INF/wsdl/SService.wsdl +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/webapp/WEB-INF/wsdl/SimpleService.wsdl b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-descriptor/src/main/webapp/WEB-INF/wsdl/SimpleService.wsdl deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-handlers/pom.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-handlers/pom.xml deleted file mode 100644 index 7e4dd8599697ee32c073a250321b853307203de8..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-handlers/pom.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - org.ow2.jonas - jonas-itests - 5.1.0-RC3-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas.ws.jaxws.itests.base.pojo - jaxws-pojo-handler - war - JOnAS :: Tests :: JAXWS :: Tests :: Base :: POJO :: Handlers - - - org.ow2.jonas.osgi - javaee-api - ${project.version} - provided - - - - jaxws-pojo-handlers - - \ No newline at end of file diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-handlers/src/main/java/org/ow2/jonas/ws/jaxws/test/handlers/GreeterLogicalHandler.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-handlers/src/main/java/org/ow2/jonas/ws/jaxws/test/handlers/GreeterLogicalHandler.java deleted file mode 100644 index d3a5c06cd8b08fdd7e8f1fec9c7f7025dd9fa155..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-handlers/src/main/java/org/ow2/jonas/ws/jaxws/test/handlers/GreeterLogicalHandler.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.handlers; - - -import javax.ejb.EJB; -import javax.xml.ws.handler.LogicalMessageContext; -import javax.xml.ws.handler.MessageContext; -//import org.ow2.jonas.ws.axis2.ejb3.Hello; - -public class GreeterLogicalHandler implements javax.xml.ws.handler.LogicalHandler { - - //@Resource(name = "greeting") - //private String greeting; - - //@EJB(name="org.ow2.jonas.ws.axis2.ejb3.Hello") - //Hello hello; - - public void close(final MessageContext arg0) { - // TODO Auto-generated method stub - System.out.println("CLOSE in LogicalHandler"); - } - - public boolean handleFault(final LogicalMessageContext arg0) { - // TODO Auto-generated method stub - return true; - } - - public boolean handleMessage(final LogicalMessageContext context) { - - // TODO Auto-generated method stub - System.out.println("GREATERLogicalHandler HandleMessage"); - //System.out.println(greeting); - //hello.sayHello("hello world"); - - return true; - } -} - - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-handlers/src/main/java/org/ow2/jonas/ws/jaxws/test/handlers/GreeterSOAPHandler.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-handlers/src/main/java/org/ow2/jonas/ws/jaxws/test/handlers/GreeterSOAPHandler.java deleted file mode 100644 index c1ea7f3c5b3fed426094216d2ced952af564e1e4..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-handlers/src/main/java/org/ow2/jonas/ws/jaxws/test/handlers/GreeterSOAPHandler.java +++ /dev/null @@ -1,100 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.handlers; - - -import java.util.Iterator; -import java.util.Map; -import java.util.Set; -import java.util.TreeSet; -import javax.annotation.PostConstruct; -import javax.annotation.PreDestroy; -import javax.annotation.Resource; -import javax.xml.namespace.QName; -import javax.xml.soap.Node; -import javax.xml.soap.SOAPElement; -import javax.xml.soap.SOAPException; -import javax.xml.ws.WebServiceContext; -import javax.xml.ws.handler.MessageContext; -import javax.xml.ws.handler.soap.SOAPHandler; -import javax.xml.ws.handler.soap.SOAPMessageContext; - -public class GreeterSOAPHandler implements SOAPHandler { - - @Resource - WebServiceContext wsContext; - - //@Resource(name = "greeting") - //private String greeting; - - @PostConstruct - public void init() { - System.out.println(this + " init: " + wsContext); - } - - @PreDestroy - public void destroy() { - System.out.println(this + " destroy"); - } - - public void init(final Map config) { - } - - public boolean handleFault(final SOAPMessageContext context) { - System.out.println(this + " handleFault"); - return true; - } - - public void close(final MessageContext context) { - System.out.println("CLOSE in SOAPHandler"); - } - - public boolean handleMessage(final SOAPMessageContext context) { - System.out.println("GREATERSOAPHandler HandleMessage"); - System.out.println(context == null); - System.out.println(wsContext == null); - System.out.println(context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY)); - - try { - if("false".equalsIgnoreCase(context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY).toString())) { - String content = context.getMessage().getSOAPPart().getEnvelope().getBody().getFirstChild().getFirstChild().getFirstChild().getTextContent(); - content = content + "SOAPHandler"; - if(wsContext!=null) { - content = content + "wsContext"; - } - context.getMessage().getSOAPPart().getEnvelope().getBody().getFirstChild().getFirstChild().getFirstChild().setTextContent(content); - } - } catch (SOAPException e) { - e.printStackTrace(); - } - return true; - } - - public Set getHeaders() { - System.out.println(this + " getHeaders"); - return new TreeSet(); - } - -} diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-handlers/src/main/java/org/ow2/jonas/ws/jaxws/test/handlers/SimpleService.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-handlers/src/main/java/org/ow2/jonas/ws/jaxws/test/handlers/SimpleService.java deleted file mode 100644 index d21fc9de31626c75f41660ce378ea52f17e92749..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-handlers/src/main/java/org/ow2/jonas/ws/jaxws/test/handlers/SimpleService.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.handlers; - - -import javax.annotation.Resource; -import javax.jws.HandlerChain; -import javax.jws.WebService; -import javax.xml.ws.WebServiceContext; - - -/** - * This is a basic JAXWS pojo web service. - * @author xiaoda - * - */ -@WebService(name="SimpleService",serviceName="SimpleService",wsdlLocation="WEB-INF/wsdl/SimpleService.wsdl") -@HandlerChain(file="/WEB-INF/handlers.xml") -public class SimpleService implements SimpleServiceInterface { - - @Resource - WebServiceContext WSContext = null; - - private static final long serialVersionUID = 1L; - - public String greetMe(String str) { - return "hello" + str; - } -} diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-handlers/src/main/java/org/ow2/jonas/ws/jaxws/test/handlers/SimpleServiceInterface.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-handlers/src/main/java/org/ow2/jonas/ws/jaxws/test/handlers/SimpleServiceInterface.java deleted file mode 100644 index 0d0a4252e3e3b40da7bc216e113a7ef12e7b2e5d..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-handlers/src/main/java/org/ow2/jonas/ws/jaxws/test/handlers/SimpleServiceInterface.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.handlers; - -import javax.jws.WebMethod; - -public interface SimpleServiceInterface { - - @WebMethod(exclude=false) - public String greetMe(String str); -} diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-handlers/src/main/webapp/WEB-INF/handlers.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-handlers/src/main/webapp/WEB-INF/handlers.xml deleted file mode 100644 index f783cff4d25b6eaf3be97b243b2e04d7abef4588..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-handlers/src/main/webapp/WEB-INF/handlers.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - GreeterSOAPHandler - org.ow2.jonas.ws.jaxws.test.handlers.GreeterSOAPHandler - - - - GreeterLogicalHandler - org.ow2.jonas.ws.jaxws.test.handlers.GreeterLogicalHandler - - - - \ No newline at end of file diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-handlers/src/main/webapp/WEB-INF/jonas-web.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-handlers/src/main/webapp/WEB-INF/jonas-web.xml deleted file mode 100644 index 27eb0b90c90d8a9967030ace1cb215ab7c17cb1d..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-handlers/src/main/webapp/WEB-INF/jonas-web.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - pojo - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-handlers/src/main/webapp/WEB-INF/web.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-handlers/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 307ef9dbd73f32460c6b48cbcb8f460eca25b943..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-handlers/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - JOnAS Package index - - Display the context which are preconfigured. - - - - SimpleService - org.ow2.jonas.ws.jaxws.test.pojo.SimpleService - - - - SimpleService - /SimpleService - - \ No newline at end of file diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-handlers/src/main/webapp/WEB-INF/wsdl/SimpleService.wsdl b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-handlers/src/main/webapp/WEB-INF/wsdl/SimpleService.wsdl deleted file mode 100644 index 0b4b1fbb528c2e739fc83c16095284a4ed91fe7b..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-handlers/src/main/webapp/WEB-INF/wsdl/SimpleService.wsdl +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-injection/pom.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-injection/pom.xml deleted file mode 100644 index 5d1f529c3d1b5d82d4811e029dd98e5285b03198..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-injection/pom.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - org.ow2.jonas - jonas-itests - 5.1.0-RC3-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas.ws.jaxws.itests.base.pojo - jaxws-pojo-injection - war - JOnAS :: Tests :: JAXWS :: Tests :: Base :: POJO :: Injection - - - org.ow2.jonas.osgi - javaee-api - ${project.version} - provided - - - - jaxws-pojo-injection - - \ No newline at end of file diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-injection/src/main/java/org/ow2/jonas/ejb3/Hello.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-injection/src/main/java/org/ow2/jonas/ejb3/Hello.java deleted file mode 100644 index 56d95e567e4fd5bbd197661361099b493a0c8aeb..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-injection/src/main/java/org/ow2/jonas/ejb3/Hello.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ejb3; - - -public interface Hello -{ - public abstract String sayHello(String s); -} - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-injection/src/main/java/org/ow2/jonas/ws/jaxws/test/injection/SimpleService.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-injection/src/main/java/org/ow2/jonas/ws/jaxws/test/injection/SimpleService.java deleted file mode 100644 index af76102879d7ba160cee77901d5153ab4a9bbe24..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-injection/src/main/java/org/ow2/jonas/ws/jaxws/test/injection/SimpleService.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.injection; - -import javax.annotation.Resource; -import javax.ejb.EJB; -import javax.jws.WebService; -import javax.xml.ws.WebServiceContext; -import org.ow2.jonas.ejb3.Hello; - -/** - * This is a basic JAXWS pojo web service. - * - * @author xiaoda - * - */ -@WebService(name = "SimpleService", serviceName = "SimpleService", wsdlLocation = "WEB-INF/wsdl/SimpleService.wsdl") -public class SimpleService implements SimpleServiceInterface { - - @Resource - WebServiceContext context = null; - - @EJB(name = "org.ow2.jonas.ejb3.Hello") - Hello hello; - - private static final long serialVersionUID = 1L; - - public String greetMe(String str) { - System.out.println(hello==null); - if (context != null) { - return "hello" + str; - } else { - return str; - } - } -} diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-injection/src/main/java/org/ow2/jonas/ws/jaxws/test/injection/SimpleServiceInterface.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-injection/src/main/java/org/ow2/jonas/ws/jaxws/test/injection/SimpleServiceInterface.java deleted file mode 100644 index 0438629d0594d572c034978802e41cb19faef965..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-injection/src/main/java/org/ow2/jonas/ws/jaxws/test/injection/SimpleServiceInterface.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.injection; - -import javax.jws.WebMethod; - -public interface SimpleServiceInterface { - - @WebMethod(exclude=false) - public String greetMe(String str); -} diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-injection/src/main/webapp/WEB-INF/handlers.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-injection/src/main/webapp/WEB-INF/handlers.xml deleted file mode 100644 index f783cff4d25b6eaf3be97b243b2e04d7abef4588..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-injection/src/main/webapp/WEB-INF/handlers.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - GreeterSOAPHandler - org.ow2.jonas.ws.jaxws.test.handlers.GreeterSOAPHandler - - - - GreeterLogicalHandler - org.ow2.jonas.ws.jaxws.test.handlers.GreeterLogicalHandler - - - - \ No newline at end of file diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-injection/src/main/webapp/WEB-INF/jonas-web.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-injection/src/main/webapp/WEB-INF/jonas-web.xml deleted file mode 100644 index 27eb0b90c90d8a9967030ace1cb215ab7c17cb1d..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-injection/src/main/webapp/WEB-INF/jonas-web.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - pojo - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-injection/src/main/webapp/WEB-INF/web.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-injection/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 307ef9dbd73f32460c6b48cbcb8f460eca25b943..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-injection/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - JOnAS Package index - - Display the context which are preconfigured. - - - - SimpleService - org.ow2.jonas.ws.jaxws.test.pojo.SimpleService - - - - SimpleService - /SimpleService - - \ No newline at end of file diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-injection/src/main/webapp/WEB-INF/wsdl/SimpleService.wsdl b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-injection/src/main/webapp/WEB-INF/wsdl/SimpleService.wsdl deleted file mode 100644 index 779d407a03e3d3d58d25663b1e06824a5e0b348d..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-injection/src/main/webapp/WEB-INF/wsdl/SimpleService.wsdl +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-with-wsdl/pom.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-with-wsdl/pom.xml deleted file mode 100644 index 7b6b3e71ce6b873f0ed89351e8c7a2c858762cc7..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-with-wsdl/pom.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - org.ow2.jonas - jonas-itests - 5.1.0-RC3-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas.ws.jaxws.itests.base.pojo - jaxws-pojo-simple-with-wsdl - war - JOnAS :: Tests :: JAXWS :: Tests :: Base :: POJO :: Simple :: With :: WSDL - - - org.ow2.jonas.osgi - javaee-api - ${project.version} - provided - - - - jaxws-pojo-simple-with-wsdl - - \ No newline at end of file diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-with-wsdl/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/SimpleService.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-with-wsdl/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/SimpleService.java deleted file mode 100644 index 965df4918b89dcd9e6e6dd18766aa1f9ab1c39b9..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-with-wsdl/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/SimpleService.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.pojo; - -import javax.jws.WebMethod; -import javax.jws.WebService; - -/** - * This is a basic JAXWS pojo web service. - * @author xiaoda - * - */ -@WebService(name="SimpleService",serviceName="SimpleService",wsdlLocation="WEB-INF/wsdl/SimpleService.wsdl") -public class SimpleService implements SimpleServiceInterface { - - private static final long serialVersionUID = 1L; - - @WebMethod(exclude=false) - public String greetMe(String str) { - return "hello" + str; - } -} diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-with-wsdl/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/SimpleServiceInterface.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-with-wsdl/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/SimpleServiceInterface.java deleted file mode 100644 index 073685bc6ed1927f8b8b72d7a4f490a12f84c7f4..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-with-wsdl/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/SimpleServiceInterface.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.pojo; - -import javax.jws.WebMethod; - -public interface SimpleServiceInterface { - - @WebMethod(exclude=false) - public String greetMe(String str); -} diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-with-wsdl/src/main/webapp/WEB-INF/jonas-web.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-with-wsdl/src/main/webapp/WEB-INF/jonas-web.xml deleted file mode 100644 index 27eb0b90c90d8a9967030ace1cb215ab7c17cb1d..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-with-wsdl/src/main/webapp/WEB-INF/jonas-web.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - pojo - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-with-wsdl/src/main/webapp/WEB-INF/web.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-with-wsdl/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 307ef9dbd73f32460c6b48cbcb8f460eca25b943..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-with-wsdl/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - JOnAS Package index - - Display the context which are preconfigured. - - - - SimpleService - org.ow2.jonas.ws.jaxws.test.pojo.SimpleService - - - - SimpleService - /SimpleService - - \ No newline at end of file diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-with-wsdl/src/main/webapp/WEB-INF/wsdl/SimpleService.wsdl b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-with-wsdl/src/main/webapp/WEB-INF/wsdl/SimpleService.wsdl deleted file mode 100644 index c17a2fe443dcfac310bb0ebfef285ef4ae0eb16a..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-with-wsdl/src/main/webapp/WEB-INF/wsdl/SimpleService.wsdl +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-without-wsdl/pom.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-without-wsdl/pom.xml deleted file mode 100644 index 4df798bc70eaed9c3d7d6b28636ec00891c3c45e..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-without-wsdl/pom.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - org.ow2.jonas - jonas-itests - 5.1.0-RC3-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas.ws.jaxws.itests.base.pojo - jaxws-pojo-simple-without-wsdl - war - JOnAS :: Tests :: JAXWS :: Tests :: Base :: POJO :: Simple :: Without :: WSDL - - - org.ow2.jonas.osgi - javaee-api - ${project.version} - provided - - - - jaxws-pojo-simple-without-wsdl - - \ No newline at end of file diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-without-wsdl/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/SimpleService.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-without-wsdl/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/SimpleService.java deleted file mode 100644 index 1c3d14e7f06cdeba39eaaa78271e0b0d418db044..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-without-wsdl/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/SimpleService.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.pojo; - -import javax.jws.WebMethod; -import javax.jws.WebService; - -/** - * This is a basic JAXWS pojo web service. - * @author xiaoda - * - */ -@WebService(name="SimpleService",serviceName="SimpleService") -public class SimpleService implements SimpleServiceInterface { - - private static final long serialVersionUID = 1L; - - @WebMethod(exclude=false) - public String greetMe(String str) { - return "hello" + str; - } -} diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-without-wsdl/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/SimpleServiceInterface.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-without-wsdl/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/SimpleServiceInterface.java deleted file mode 100644 index 073685bc6ed1927f8b8b72d7a4f490a12f84c7f4..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-without-wsdl/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/SimpleServiceInterface.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.pojo; - -import javax.jws.WebMethod; - -public interface SimpleServiceInterface { - - @WebMethod(exclude=false) - public String greetMe(String str); -} diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-without-wsdl/src/main/webapp/WEB-INF/jonas-web.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-without-wsdl/src/main/webapp/WEB-INF/jonas-web.xml deleted file mode 100644 index 27eb0b90c90d8a9967030ace1cb215ab7c17cb1d..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-without-wsdl/src/main/webapp/WEB-INF/jonas-web.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - pojo - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-without-wsdl/src/main/webapp/WEB-INF/web.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-without-wsdl/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 307ef9dbd73f32460c6b48cbcb8f460eca25b943..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-simple-without-wsdl/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - JOnAS Package index - - Display the context which are preconfigured. - - - - SimpleService - org.ow2.jonas.ws.jaxws.test.pojo.SimpleService - - - - SimpleService - /SimpleService - - \ No newline at end of file diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-soap-binding/pom.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-soap-binding/pom.xml deleted file mode 100644 index 28a9d769bbcb0a1d802d0556af04d9c8859914fe..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-soap-binding/pom.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - org.ow2.jonas - jonas-itests - 5.1.0-RC3-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas.ws.jaxws.itests.base.pojo - jaxws-pojo-soapBinding - war - JOnAS :: Tests :: JAXWS :: Tests :: Base :: POJO :: SOAPBinding - - - org.ow2.jonas.osgi - javaee-api - ${project.version} - provided - - - - jaxws-pojo-SOAPBinding - - \ No newline at end of file diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-soap-binding/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/SimpleService.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-soap-binding/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/SimpleService.java deleted file mode 100644 index ca4619fcb1f5a8cecda9a7d6bfc018ce3b199a6e..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-soap-binding/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/SimpleService.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.pojo; - -import javax.jws.WebMethod; -import javax.jws.WebService; -import javax.jws.soap.SOAPBinding; - -/** - * This is a basic JAXWS pojo web service. - * @author xiaoda - * - */ -@WebService(name="SimpleService",serviceName="SimpleService",wsdlLocation="WEB-INF/wsdl/SimpleService.wsdl") -@SOAPBinding( - style = SOAPBinding.Style.RPC, - use = SOAPBinding.Use.LITERAL) -public class SimpleService implements SimpleServiceInterface { - - private static final long serialVersionUID = 1L; - - @WebMethod(exclude=false) - public String greetMe(String str) { - return "hello" + str; - } -} diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-soap-binding/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/SimpleServiceInterface.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-soap-binding/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/SimpleServiceInterface.java deleted file mode 100644 index 073685bc6ed1927f8b8b72d7a4f490a12f84c7f4..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-soap-binding/src/main/java/org/ow2/jonas/ws/jaxws/test/pojo/SimpleServiceInterface.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.pojo; - -import javax.jws.WebMethod; - -public interface SimpleServiceInterface { - - @WebMethod(exclude=false) - public String greetMe(String str); -} diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-soap-binding/src/main/webapp/WEB-INF/jonas-web.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-soap-binding/src/main/webapp/WEB-INF/jonas-web.xml deleted file mode 100644 index 27eb0b90c90d8a9967030ace1cb215ab7c17cb1d..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-soap-binding/src/main/webapp/WEB-INF/jonas-web.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - pojo - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-soap-binding/src/main/webapp/WEB-INF/web.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-soap-binding/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 307ef9dbd73f32460c6b48cbcb8f460eca25b943..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-soap-binding/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - JOnAS Package index - - Display the context which are preconfigured. - - - - SimpleService - org.ow2.jonas.ws.jaxws.test.pojo.SimpleService - - - - SimpleService - /SimpleService - - \ No newline at end of file diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-soap-binding/src/main/webapp/WEB-INF/wsdl/SimpleService.wsdl b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-soap-binding/src/main/webapp/WEB-INF/wsdl/SimpleService.wsdl deleted file mode 100644 index f299828cd7f4c171bfe22e87da8242e98f4e7145..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-soap-binding/src/main/webapp/WEB-INF/wsdl/SimpleService.wsdl +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-wsProvider/pom.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-wsProvider/pom.xml deleted file mode 100644 index 31749208d8b7db0a714099f6d2cbae64631f8aa5..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-wsProvider/pom.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - org.ow2.jonas - jonas-itests - 5.1.0-RC3-SNAPSHOT - ../pom.xml - - 4.0.0 - org.ow2.jonas.ws.jaxws.itests.base.pojo - jaxws-pojo-wsProvider - war - JOnAS :: Tests :: JAXWS :: Tests :: Base :: POJO :: WSProvider - - - org.ow2.jonas.osgi - javaee-api - ${project.version} - provided - - - - jaxws-pojo-wsProvider - - \ No newline at end of file diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-wsProvider/src/main/java/org/ow2/jonas/ws/jaxws/test/CalculatorImpl.java b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-wsProvider/src/main/java/org/ow2/jonas/ws/jaxws/test/CalculatorImpl.java deleted file mode 100644 index b7bf40d3d1219a7bfa2858736efb6dd02932ab4a..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-wsProvider/src/main/java/org/ow2/jonas/ws/jaxws/test/CalculatorImpl.java +++ /dev/null @@ -1,116 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2009 Bull S.A.S - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: xiaoda - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.ws.jaxws.test; - -import java.io.ByteArrayInputStream; - -import javax.annotation.Resource; -import javax.servlet.ServletRequest; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.transform.Source; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamSource; -import javax.xml.ws.BindingType; -import javax.xml.ws.Provider; -import javax.xml.ws.WebServiceContext; -import javax.xml.ws.WebServiceProvider; -import javax.xml.ws.handler.MessageContext; -import javax.xml.ws.http.HTTPBinding; -import javax.xml.ws.http.HTTPException; - -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.xml.sax.InputSource; - -@WebServiceProvider -@BindingType(value=HTTPBinding.HTTP_BINDING) -public class CalculatorImpl implements Provider { - - @Resource - protected WebServiceContext wsContext; - - public Source invoke(Source source) { - try { - String num1 = null; - String num2 = null; - - if (source == null) { - System.out.println("Getting input from query string"); - MessageContext mc = wsContext.getMessageContext(); - String query = (String)mc.get(MessageContext.QUERY_STRING); - System.out.println("Query String = " + query); - ServletRequest req = (ServletRequest)mc.get(MessageContext.SERVLET_REQUEST); - num1 = req.getParameter("num1"); - num2 = req.getParameter("num2"); - } else { - System.out.println("Getting input from input message"); - Node n = null; - if (source instanceof DOMSource) { - n = ((DOMSource)source).getNode(); - } else if (source instanceof StreamSource) { - StreamSource streamSource = (StreamSource)source; - DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); - DocumentBuilder db = dbf.newDocumentBuilder(); - InputSource inputSource = null; - if (streamSource.getInputStream() != null) { - inputSource = new InputSource(streamSource.getInputStream()); - } else if (streamSource.getReader() != null) { - inputSource = new InputSource(streamSource.getReader()); - } - n = db.parse(inputSource); - } else { - throw new RuntimeException("Unsupported source: " + source); - } - NodeList children = n.getChildNodes(); - for (int i = 0; i < children.getLength(); i++) { - Node child = children.item(i); - if (child.getNodeName().equals("add")) { - num1 = child.getAttributes().getNamedItem("num1").getNodeValue(); - num2 = child.getAttributes().getNamedItem("num2").getNodeValue(); - break; - } - } - } - - int n1 = Integer.parseInt(num1); - int n2 = Integer.parseInt(num2); - return createResultSource(n1 + n2); - } catch(Exception e) { - e.printStackTrace(); - throw new HTTPException(500); - } - } - - private Source createResultSource(int sum) { - String body = - "" - + sum - + ""; - Source source = new StreamSource(new ByteArrayInputStream(body.getBytes())); - return source; - } -} diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-wsProvider/src/main/webapp/WEB-INF/jonas-web.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-wsProvider/src/main/webapp/WEB-INF/jonas-web.xml deleted file mode 100644 index 27eb0b90c90d8a9967030ace1cb215ab7c17cb1d..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-wsProvider/src/main/webapp/WEB-INF/jonas-web.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - pojo - diff --git a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-wsProvider/src/main/webapp/WEB-INF/web.xml b/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-wsProvider/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index da9338dd11f6f03cee2930e630d9ebd93230aeb1..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/jaxws-pojo-wsProvider/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - JOnAS Package index - - Display the context which are preconfigured. - - - - SimpleService - org.ow2.jonas.ws.jaxws.test.CalculatorImpl - - - - SimpleService - /SimpleService - - \ No newline at end of file diff --git a/jonas_tests/jaxws/jaxws-test-base/pom.xml b/jonas_tests/jaxws/jaxws-test-base/pom.xml deleted file mode 100644 index f4b2bcff156abe4a5cef2c3f4d322e34d2f673ef..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-base/pom.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - org.ow2.jonas - jonas-modules - 5.1.0-RC3-SNAPSHOT - - 4.0.0 - org.ow2.jonas.ws.jaxws.itests - base - pom - JOnAS :: Tests :: JAXWS :: Tests :: Base - Tests base for JAXWS - - - jaxws-pojo-simple-with-wsdl - jaxws-pojo-simple-without-wsdl - jaxws-pojo-complex - jaxws-pojo-handlers - jaxws-pojo-descriptor - jaxws-pojo-injection - jaxws-pojo-wsProvider - jaxws-pojo-soap-binding - ejb3 - jaxws-ejb-webmethod - jaxws-ejb-injection - jaxws-ejb-descriptor - jaxws-ejb-interceptor - - - - - diff --git a/jonas_tests/jaxws/jaxws-test-clients/pom.xml b/jonas_tests/jaxws/jaxws-test-clients/pom.xml deleted file mode 100644 index 11bcfeb405dc9b5f5257f65e18dba06570d92579..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-clients/pom.xml +++ /dev/null @@ -1,135 +0,0 @@ - - - - - org.ow2.jonas - jonas-modules - 5.1.0-RC3-SNAPSHOT - - 4.0.0 - org.ow2.jonas.ws.jaxws.itests - tests - jar - JOnAS :: Tests :: JAXWS :: Tests :: Clients - http://maven.apache.org - - - - org.testng - testng - 5.8 - jdk15 - - - org.ow2.jonas.ws.jaxws.itests.base.pojo - jaxws-pojo-simple-without-wsdl - ${project.version} - war - - - org.ow2.jonas.ws.jaxws.itests.base.pojo - jaxws-pojo-simple-with-wsdl - ${project.version} - war - - - org.ow2.jonas.ws.jaxws.itests.base.pojo - jaxws-pojo-complex - ${project.version} - war - - - org.ow2.jonas.ws.jaxws.itests.base.pojo - jaxws-pojo-injection - ${project.version} - war - - - org.ow2.jonas.ws.jaxws.itests.base.pojo - jaxws-pojo-handler - ${project.version} - war - - - org.ow2.jonas.ws.jaxws.itests.base.pojo - jaxws-pojo-descriptor - ${project.version} - war - - - org.ow2.jonas.ws.jaxws.itests.base.ejb - jaxws-ejb - ${project.version} - - - org.ow2.jonas.ws.jaxws.itests.base.ejb - jaxws-ejb-descriptor - ${project.version} - - - - httpunit - httpunit - 1.6 - - - org.ow2.jonas.osgi - javaee-api - ${project.version} - - - com.sun.xml.messaging.saaj - saaj-impl - 1.3.2 - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - test-jar - - - - - - - \ No newline at end of file diff --git a/jonas_tests/jaxws/jaxws-test-clients/src/main/java/org/ow2/jonas/ejb3/Hello.java b/jonas_tests/jaxws/jaxws-test-clients/src/main/java/org/ow2/jonas/ejb3/Hello.java deleted file mode 100644 index 56d95e567e4fd5bbd197661361099b493a0c8aeb..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-clients/src/main/java/org/ow2/jonas/ejb3/Hello.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ejb3; - - -public interface Hello -{ - public abstract String sayHello(String s); -} - diff --git a/jonas_tests/jaxws/jaxws-test-clients/src/main/java/org/ow2/jonas/ws/jaxws/test/DispatchAPIWebserviceClientTestCase.java b/jonas_tests/jaxws/jaxws-test-clients/src/main/java/org/ow2/jonas/ws/jaxws/test/DispatchAPIWebserviceClientTestCase.java deleted file mode 100644 index 07e26e68b5a68466a92227f98b8b030439b61df8..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-clients/src/main/java/org/ow2/jonas/ws/jaxws/test/DispatchAPIWebserviceClientTestCase.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test; - -import java.io.ByteArrayOutputStream; -import java.net.URL; -import javax.xml.namespace.QName; -import javax.xml.soap.MessageFactory; -import javax.xml.soap.SOAPBody; -import javax.xml.soap.SOAPConstants; -import javax.xml.soap.SOAPElement; -import javax.xml.soap.SOAPEnvelope; -import javax.xml.soap.SOAPMessage; -import javax.xml.soap.SOAPPart; -import javax.xml.ws.Dispatch; -import javax.xml.ws.Service; -import org.testng.Assert; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; -import org.ow2.jonas.ws.jaxws.test.util.JWebServicesTestCase; - - -/** - * This is a client of SimpleService web service and it tests the - * JAXWS Dispatch API by using Dispatch API to invoke the web service. - * - * @author xiaoda - * - */ -public class DispatchAPIWebserviceClientTestCase extends JWebServicesTestCase { - - public DispatchAPIWebserviceClientTestCase(String s) throws Exception { - super(s); - } - private static final String PORT_URL = "/pojo/SimpleService"; - - - @BeforeClass - public void setUp() throws Exception { - useWar("jaxws-pojo-simple-with-wsdl"); - } - - @AfterClass - public void tearDown() throws Exception { - unUseWar("jaxws-pojo-simple-with-wsdl"); - } - - @Test(groups = { "DispatchAPI" }) - public void testInvokeWithDispatchAPI() { - - try{ - - String port = System.getProperty("http.port"); - - if(port == null) { - port = "9000"; - } - //String endpointUrl = "http://localhost" + port + PORT_URL; - - URL wsdlLocation = new URL("http://localhost:" + port + PORT_URL + "?wsdl"); - - QName serviceName = new QName("http://pojo.test.jaxws.ws.jonas.ow2.org/", - "SimpleService"); - - - QName portName = new QName("http://pojo.test.jaxws.ws.jonas.ow2.org/", - "SimpleServicePort"); - Service service = Service.create(wsdlLocation, serviceName); - - //service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING, endpointUrl); - Assert.assertNotNull(service); - - /** Create a Dispatch instance from a service.**/ - Dispatch dispatch = service.createDispatch(portName, - SOAPMessage.class, Service.Mode.MESSAGE); - - Assert.assertNotNull(dispatch); - - /** Create SOAPMessage request. **/ - // compose a request message - MessageFactory mf = MessageFactory.newInstance(SOAPConstants.SOAP_1_1_PROTOCOL); - - // Create a message. This example works with the SOAPPART. - SOAPMessage request = mf.createMessage(); - SOAPPart part = request.getSOAPPart(); - - // Obtain the SOAPEnvelope and header and body elements. - SOAPEnvelope env = part.getEnvelope(); - SOAPBody body = env.getBody(); - - // Construct the message payload. - SOAPElement operation = body.addChildElement(env.createName("greetMe")); - SOAPElement value = operation.addChildElement("arg0"); - value.addTextNode("JOnAS"); - request.saveChanges(); - - /** Invoke the service endpoint. **/ - SOAPMessage response = dispatch.invoke(request); - - Assert.assertNotNull(response); - - ByteArrayOutputStream os = new ByteArrayOutputStream(); - response.writeTo(os); - String str = new String(os.toByteArray()); - System.out.println(str); - Assert.assertTrue(str.contains("helloJOnAS")); - } catch(Exception e) { - e.printStackTrace(); - } - } -} diff --git a/jonas_tests/jaxws/jaxws-test-clients/src/main/java/org/ow2/jonas/ws/jaxws/test/DynamicProxyWebserviceClientTestCase.java b/jonas_tests/jaxws/jaxws-test-clients/src/main/java/org/ow2/jonas/ws/jaxws/test/DynamicProxyWebserviceClientTestCase.java deleted file mode 100644 index d2fdc7576a628a9f9f5f38e4c40c9330d0e05e22..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-clients/src/main/java/org/ow2/jonas/ws/jaxws/test/DynamicProxyWebserviceClientTestCase.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test; - - -import java.net.MalformedURLException; -import java.net.URL; -import javax.xml.namespace.QName; -import javax.xml.ws.Service; -import org.ow2.jonas.ws.jaxws.test.util.JWebServicesTestCase; -import org.ow2.jonas.ws.jaxws.test.util.SimpleServiceInterface; -import org.testng.Assert; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - -public class DynamicProxyWebserviceClientTestCase extends JWebServicesTestCase { - - public DynamicProxyWebserviceClientTestCase(String s) throws Exception { - super(s); - } - private static final String PORT_URL = "/pojo/SimpleService"; - - - @BeforeClass - public void setUp() throws Exception { - useWar("jaxws-pojo-simple-with-wsdl"); - } - - @AfterClass - public void tearDown() throws Exception { - unUseWar("jaxws-pojo-simple-with-wsdl"); - } - - - @Test(groups = { "DynamicProxy" }) - public void testInvokeWithDispatchAPI() throws MalformedURLException { - - String port = System.getProperty("http.port"); - - if(port == null) { - port = "9000"; - } - String UrlString = "http://localhost:"+ port + PORT_URL +"?wsdl"; - - QName serviceName = new QName("http://pojo.test.jaxws.ws.jonas.ow2.org/","SimpleService"); - - QName portName = new QName("http://pojo.test.jaxws.ws.jonas.ow2.org/","SimpleServicePort"); - - System.out.println("UrlString = " + UrlString); - URL helloWsdlUrl = new URL(UrlString); - - //ServiceFactory serviceFactory = ServiceFactory.newInstance(); - - Service simpleService = Service.create(helloWsdlUrl, serviceName); - SimpleServiceInterface ssi =(SimpleServiceInterface)simpleService.getPort( portName, SimpleServiceInterface.class); - - //javax.xml.ws.BindingProvider bp = (javax.xml.ws.BindingProvider)ssi; - //Map context = bp.getRequestContext(); - //context.put("javax.xml.ws.session.maintain", Boolean.TRUE); - - Assert.assertEquals( ssi.greetMe("JOnAS"), "helloJOnAS"); - } -} diff --git a/jonas_tests/jaxws/jaxws-test-clients/src/main/java/org/ow2/jonas/ws/jaxws/test/EJBClientTestCases.java b/jonas_tests/jaxws/jaxws-test-clients/src/main/java/org/ow2/jonas/ws/jaxws/test/EJBClientTestCases.java deleted file mode 100644 index 9ef18cecae18c2c1b7210fd0e0f4d73bb3c0d4dc..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-clients/src/main/java/org/ow2/jonas/ws/jaxws/test/EJBClientTestCases.java +++ /dev/null @@ -1,247 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test; - -import java.io.ByteArrayOutputStream; -import javax.wsdl.Definition; -import javax.wsdl.WSDLException; -import javax.wsdl.factory.WSDLFactory; -import javax.wsdl.xml.WSDLReader; -import javax.xml.messaging.URLEndpoint; -import javax.xml.soap.MessageFactory; -import javax.xml.soap.SOAPBody; -import javax.xml.soap.SOAPConnection; -import javax.xml.soap.SOAPConnectionFactory; -import javax.xml.soap.SOAPElement; -import javax.xml.soap.SOAPEnvelope; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; -import javax.xml.soap.SOAPPart; -import org.ow2.jonas.ws.jaxws.test.util.JWebServicesTestCase; -import org.testng.Assert; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - - -public class EJBClientTestCases extends JWebServicesTestCase { - private static final String PORT_URL_WITH_WEBMETHOD = "/jaxws-ejb-webmethod/JAXWSBeanWithWebMethod"; - private static final String PORT_URL_WITHOUT_WEBMETHOD = "/jaxws-ejb-webmethod/JAXWSBeanWithoutWebMethod"; - private static final String PORT_URL_DESCRIPTOR = "/jaxws-ejb-descriptor/JAXWSBean_descriptor"; - private static final String PORT_URL_INJECTION = "/jaxws-ejb-injection/JAXWSBeanInjection"; - private static final String PORT_URL_INTERCEPTOR = "/jaxws-ejb-interceptor/EJBWSwihtInterceptors"; - public EJBClientTestCases(String s) throws Exception { - super(s); - } - - @BeforeClass - public void setUp() throws Exception { - } - - @AfterClass - public void tearDown() throws Exception { - } - - @Test(groups = { "EJB_with_webmethod" }) - public void testWithWebmethodWSDL() throws Exception { - useBeans("jaxws-ejb-webmethod"); - try { - Assert.assertNotNull(getWSDLForService(PORT_URL_WITH_WEBMETHOD),"Can not get wsdl for EJB_with_webmethod!"); - } finally { - unUseBeans("jaxws-ejb-webmethod"); - } - } - - @Test(groups = { "EJB_with_webmethod" }) - public void testWithWebmethodInvoke() throws Exception { - useBeans("jaxws-ejb-webmethod"); - String response = null; - try { - response = invokeEJBWebService(PORT_URL_WITH_WEBMETHOD,"greetMe","arg0"); - Assert.assertTrue(response.contains("Hello foo bar"),"greetMe() should be exposed as web method!"); - - response = invokeEJBWebService(PORT_URL_WITH_WEBMETHOD,"greetMeFault","arg0"); - Assert.assertTrue(response.contains("my error"),"greetMeFault() should be exposed as web method!"); - - response = invokeEJBWebService(PORT_URL_WITH_WEBMETHOD,"greetYou","arg0"); - Assert.assertTrue(!response.contains("Hi foo bar"),"greetYou() should not be exposed as web method!"); - - response = invokeEJBWebService(PORT_URL_WITH_WEBMETHOD,"sayHello","arg0"); - Assert.assertTrue(!response.contains("Hello World! foo bar"),"sayHello() should not be exposed as web method!"); - - } finally { - unUseBeans("jaxws-ejb-webmethod"); - } - } - - @Test(groups = { "EJB_without_webmethod" }) - public void testWithoutWebmethodWSDL() throws Exception { - useBeans("jaxws-ejb-webmethod"); - try { - Assert.assertNotNull(getWSDLForService(PORT_URL_WITHOUT_WEBMETHOD),"Can not get wsdl for EJB_without_webmethod!"); - } finally { - unUseBeans("jaxws-ejb-webmethod"); - } - } - - @Test(groups = { "EJB_without_webmethod" }) - public void testWithoutWebmethodInvoke() throws Exception { - useBeans("jaxws-ejb-webmethod"); - String response = null; - try { - response = invokeEJBWebService(PORT_URL_WITHOUT_WEBMETHOD,"greetMe","arg0"); - Assert.assertTrue(response.contains("Hello foo bar"),"greetMe() should be exposed as web method!"); - - response = invokeEJBWebService(PORT_URL_WITHOUT_WEBMETHOD,"greetYou","arg0"); - //System.out.println("******************greetYou : " + response); - Assert.assertTrue(response.contains("Hi foo bar"),"greetYou() should be exposed as web method!"); - - response = invokeEJBWebService(PORT_URL_WITHOUT_WEBMETHOD,"greetMeFault","arg0"); - Assert.assertTrue(response.contains("my error"),"greetMeFault() should be exposed as web method!"); - - response = invokeEJBWebService(PORT_URL_WITHOUT_WEBMETHOD,"sayHello","arg0"); - Assert.assertTrue(!response.contains("Hello World! foo bar"),"sayHello() should not be exposed as web method!"); - - } finally { - unUseBeans("jaxws-ejb-webmethod"); - } - } - - @Test(groups = { "EJB_descriptor" }) - public void testDescriptorWSDL() throws Exception { - useBeans("jaxws-ejb-descriptor"); - try { - Assert.assertNotNull(getWSDLForService(PORT_URL_DESCRIPTOR),"Can not get wsdl for EJB_descriptor!"); - } finally { - unUseBeans("jaxws-ejb-descriptor"); - } - } - - @Test(groups = { "EJB_descriptor" }) - public void testDescriptorInvoke() throws Exception { - useBeans("jaxws-ejb-descriptor"); - String response = null; - try { - response = invokeEJBWebService(PORT_URL_DESCRIPTOR,"greetMe","arg0"); - Assert.assertTrue(response.contains("Hello foo bar"),"Reply of greetMe() is not right!"); - } finally { - unUseBeans("jaxws-ejb-descriptor"); - } - } - - @Test(groups = { "EJB_injection" }) - public void testWSContextInjectionInvoke() throws Exception { - useBeans("jaxws-ejb-injection"); - String response = null; - try { - response = invokeEJBWebService(PORT_URL_INJECTION,"greetMe","arg0"); - Assert.assertTrue(response.contains("foo barwsContext"),"wsContext is not injected correctly!"); - } finally { - unUseBeans("jaxws-ejb-injection"); - } - } - - @Test(groups = { "EJB_injection" }) - public void testEJBResourceInjectionInvoke() throws Exception { - useBeans("jaxws-ejb-injection"); - useBeans("ejb3"); - String response = null; - try { - response = invokeEJBWebService(PORT_URL_INJECTION,"greetMe","arg0"); - Assert.assertTrue(response.contains("foo barwsContexthello"),"EJB resource is not injected correctly!"); - } finally { - unUseBeans("jaxws-ejb-injection"); - unUseBeans("ejb3"); - } - } - - @Test(groups = { "EJB_interceptor" }) - public void testEJBInterceptorInvoke() throws Exception { - useBeans("jaxws-ejb-interceptor"); - String response = null; - try { - response = invokeEJBWebService(PORT_URL_INTERCEPTOR,"greetMe","arg0"); - Assert.assertTrue(response.contains("intercepted"),"EJB resource is not injected correctly!"); - } finally { - unUseBeans("jaxws-ejb-interceptor"); - } - } - - private Definition getWSDLForService(String servicePort) throws WSDLException { - String port = System.getProperty("http.port"); - if(port == null) - port = "9000"; - - String url = "http://localhost:" + port + servicePort + "?WSDL"; - WSDLFactory factory = WSDLFactory.newInstance(); - WSDLReader reader = factory.newWSDLReader(); - reader.setFeature("javax.wsdl.importDocuments", true); - return reader.readWSDL(url); - } - - private String invokeEJBWebService(String servicePort, String opName, String paraName) throws UnsupportedOperationException, SOAPException { - - String port = System.getProperty("http.port"); - - if(port == null) { - port = "9000"; - } - SOAPConnectionFactory soapConnFactory = - SOAPConnectionFactory.newInstance(); - SOAPConnection connection = soapConnFactory.createConnection(); - - MessageFactory messageFactory = MessageFactory.newInstance(); - SOAPMessage message = messageFactory.createMessage(); - - SOAPPart soapPart = message.getSOAPPart(); - SOAPEnvelope envelope = (SOAPEnvelope) soapPart.getEnvelope(); - SOAPBody body = envelope.getBody(); - - SOAPElement bodyElement = body.addChildElement(envelope.createName(opName)); - SOAPElement strElement = bodyElement.addChildElement(paraName); - strElement.setValue("foo bar"); - - message.saveChanges(); - //message.writeTo(System.out); - //System.out.println(); - - URLEndpoint destination = new URLEndpoint("http://localhost:"+ port + servicePort); - SOAPMessage reply = connection.call(message, destination); - - Assert.assertNotNull(reply,"Reply of " + servicePort + " is Null!"); - String response = null; - try{ - ByteArrayOutputStream os = new ByteArrayOutputStream(); - reply.writeTo(os); - response = new String(os.toByteArray()); - } catch(Exception e) { - e.printStackTrace(); - } - connection.close(); - return response; - } - -} diff --git a/jonas_tests/jaxws/jaxws-test-clients/src/main/java/org/ow2/jonas/ws/jaxws/test/PojoClientTestCases.java b/jonas_tests/jaxws/jaxws-test-clients/src/main/java/org/ow2/jonas/ws/jaxws/test/PojoClientTestCases.java deleted file mode 100644 index 1558e59afe167e0f58de7ebec5388772ac2c0470..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-clients/src/main/java/org/ow2/jonas/ws/jaxws/test/PojoClientTestCases.java +++ /dev/null @@ -1,453 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test; - -import java.io.ByteArrayOutputStream; -import javax.wsdl.Definition; -import javax.wsdl.WSDLException; -import javax.wsdl.factory.WSDLFactory; -import javax.wsdl.xml.WSDLReader; -import javax.xml.messaging.URLEndpoint; -import javax.xml.soap.MessageFactory; -import javax.xml.soap.SOAPBody; -import javax.xml.soap.SOAPConnection; -import javax.xml.soap.SOAPConnectionFactory; -import javax.xml.soap.SOAPElement; -import javax.xml.soap.SOAPEnvelope; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; -import javax.xml.soap.SOAPPart; -import java.net.HttpURLConnection; -import java.io.IOException; -import java.io.InputStream; -import java.net.HttpURLConnection; -import org.xml.sax.InputSource; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Text; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.xml.sax.InputSource; -import java.io.InputStream; -import java.net.URL; -import java.io.StringReader; -import java.io.OutputStream; -import java.io.BufferedReader; -import java.io.InputStreamReader; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import org.ow2.jonas.ws.jaxws.test.util.JWebServicesTestCase; -import org.testng.Assert; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; - -public class PojoClientTestCases extends JWebServicesTestCase { - - private static final String SIMPLE_PORT = "/pojo/SimpleService"; - private static final String COMPLEX_PORT = "/pojo/JAXWSBean3Service"; - - public PojoClientTestCases(String s) throws Exception { - super(s); - } - - @BeforeClass - public void setUp() throws Exception { - } - - @AfterClass - public void tearDown() throws Exception { - } - - @Test(groups = { "Pojo_WebserviceContext_Injection" }) - public void testWsContextInjectionWSDL() throws Exception { - useWar("jaxws-pojo-injection"); - try { - Assert.assertNotNull(getWSDLForService(SIMPLE_PORT),"Can not get wsdl for Pojo_WebserviceContext_Injection!"); - } finally { - unUseWar("jaxws-pojo-injection"); - } - } - - @Test(groups = { "Pojo_WebserviceContext_Injection" }) - public void testWsContextInjectionInvoke() throws Exception { - useWar("jaxws-pojo-injection"); - try { - Assert.assertTrue(invokePojoService(SIMPLE_PORT).contains("helloJOnAS"),"Reply of greetMe() is not right!"); - } finally { - unUseWar("jaxws-pojo-injection"); - } - } - - @Test(groups = { "Pojo_Simple_with_WSDL" }) - public void testSimpleWithWSDLWSDL() throws Exception { - useWar("jaxws-pojo-simple-with-wsdl"); - try { - Assert.assertNotNull(getWSDLForService(SIMPLE_PORT),"Can not get wsdl for Pojo_Simple_with_WSDL!"); - } finally { - unUseWar("jaxws-pojo-simple-with-wsdl"); - } - } - - @Test(groups = { "Pojo_Simple_with_WSDL" }) - public void testSimpleWithWSDLInvoke() throws Exception { - useWar("jaxws-pojo-simple-with-wsdl"); - try { - Assert.assertTrue(invokePojoService(SIMPLE_PORT).contains("helloJOnAS"),"Reply of greetMe() is not right!"); - } finally { - unUseWar("jaxws-pojo-simple-with-wsdl"); - } - } - - - @Test(groups = { "Pojo_Simple_without_WSDL" }) - public void testSimpleWithoutWSDLWSDL() throws Exception { - useWar("jaxws-pojo-simple-without-wsdl"); - try { - Assert.assertNotNull(getWSDLForService(SIMPLE_PORT),"Can not get wsdl for Pojo_Simple_without_WSDL!"); - } finally { - unUseWar("jaxws-pojo-simple-without-wsdl"); - } - } - - @Test(groups = { "Pojo_Simple_with_WSDL" }) - public void testSimpleWithoutWSDLInvoke() throws Exception { - useWar("jaxws-pojo-simple-without-wsdl"); - try { - Assert.assertTrue(invokePojoService(SIMPLE_PORT).contains("helloJOnAS"),"Reply of SimpleService is not right!"); - } finally { - unUseWar("jaxws-pojo-simple-without-wsdl"); - } - } - - @Test(groups = { "Pojo_Descriptor" }) - public void testDescriptorWSDL() throws Exception { - useWar("jaxws-pojo-descriptor"); - try { - Assert.assertNotNull(getWSDLForService(SIMPLE_PORT),"Can not get wsdl for SimpleService!"); - } finally { - unUseWar("jaxws-pojo-descriptor"); - } - } - - @Test(groups = { "Pojo_Descriptor" }) - public void testDescriptorInvoke() throws Exception { - useWar("jaxws-pojo-descriptor"); - try { - Assert.assertTrue(invokePojoService(SIMPLE_PORT).contains("helloJOnASSOAPHandlerSOAPHandler"),"Reply of SimpleService is not right!"); - } finally { - unUseWar("jaxws-pojo-descriptor"); - } - } - - @Test(groups = { "Pojo_Handler" }) - public void testHandlerWSDL() throws Exception { - useWar("jaxws-pojo-handlers"); - Assert.assertNotNull(getWSDLForService(SIMPLE_PORT),"Can not get wsdl for SimpleService!"); - unUseWar("jaxws-pojo-handlers"); - } - - @Test(groups = { "Pojo_Handler" }) - public void testHandlerInvoke() throws Exception { - useWar("jaxws-pojo-handlers"); - try { - Assert.assertTrue(invokePojoService(SIMPLE_PORT).contains("helloJOnASSOAPHandler"),"Handler is not called correctly!"); - - } finally { - unUseWar("jaxws-pojo-handlers"); - } - } - - - @Test(groups = { "Pojo_Handler_Injection" }) - public void testHandlerInjectionInvoke() throws Exception { - useWar("jaxws-pojo-handlers"); - try { - Assert.assertTrue(invokePojoService(SIMPLE_PORT).contains("helloJOnASSOAPHandlerwsContext"),"WS Context injection in Handler is not correct!"); - } finally { - unUseWar("jaxws-pojo-handlers"); - } - } - - - @Test(groups = { "Pojo_Complex" }) - public void testComplexWithWSDLWSDL() throws Exception { - useWar("jaxws-pojo-complex"); - try { - Assert.assertNotNull(getWSDLForService(COMPLEX_PORT),"Can not get wsdl for SimpleService!"); - } finally { - unUseWar("jaxws-pojo-complex"); - } - } - - @Test(groups = { "Pojo_Complex" }) - public void testComplexWithWSDLInvoke() throws Exception { - useWar("jaxws-pojo-complex"); - try { - String port = System.getProperty("http.port"); - if(port == null) - port = "9000"; - - SOAPConnectionFactory soapConnFactory = - SOAPConnectionFactory.newInstance(); - SOAPConnection connection = soapConnFactory.createConnection(); - - MessageFactory messageFactory = MessageFactory.newInstance(); - SOAPMessage message = messageFactory.createMessage(); - - SOAPPart soapPart = message.getSOAPPart(); - SOAPEnvelope envelope = (SOAPEnvelope) soapPart.getEnvelope(); - SOAPBody body = envelope.getBody(); - - - SOAPElement bodyElement = body.addChildElement(envelope.createName("getPersons1")); - - message.saveChanges(); - - URLEndpoint destination = new URLEndpoint("http://localhost:"+ port + "/pojo/JAXWSBean3Service"); - SOAPMessage reply = connection.call(message, destination); - String response = null; - try{ - ByteArrayOutputStream os = new ByteArrayOutputStream(); - reply.writeTo(os); - response = new String(os.toByteArray()); - } catch(Exception e) { - e.printStackTrace(); - } - - Assert.assertTrue(response.contains("ericcartmanhomersimpson"),"Reply of SimpleService is not right!"); - - - soapConnFactory = SOAPConnectionFactory.newInstance(); - - connection = soapConnFactory.createConnection(); - - messageFactory = MessageFactory.newInstance(); - message = messageFactory.createMessage(); - - soapPart = message.getSOAPPart(); - envelope = (SOAPEnvelope) soapPart.getEnvelope(); - body = envelope.getBody(); - - - bodyElement = body.addChildElement(envelope.createName("getPersons2")); - - message.saveChanges(); - - destination = new URLEndpoint("http://localhost:"+ port + "/pojo/JAXWSBean3Service"); - reply = connection.call(message, destination); - response = null; - try{ - ByteArrayOutputStream os = new ByteArrayOutputStream(); - reply.writeTo(os); - response = new String(os.toByteArray()); - } catch(Exception e) { - e.printStackTrace(); - } - - - Assert.assertTrue(response.contains("ericcartmanhomersimpson"),"Reply of SimpleService is not right!"); - - } finally { - unUseWar("jaxws-pojo-complex"); - } - } - @Test(groups = { "Pojo_SOAPBinding" }) - public void testSOAPBindingInvoke() throws Exception { - //useWar("jaxws-pojo-SOAPBinding"); - try { - //Assert.assertTrue(invokePojoService(SIMPLE_PORT).contains("helloJOnAS"),"Reply of greetMe() is not right!"); - } finally { - //unUseWar("jaxws-pojo-SOAPBinding"); - } - } - - @Test(groups = { "Pojo_wsProvider" }) - public void testWSProviderInvoke() throws Exception { - useWar("jaxws-pojo-wsProvider"); - try { - InputStream requestInput = this.getClass().getResourceAsStream("/request1.xml"); - - URL url = new URL("http://localhost:9000/pojo/SimpleService"); - HttpURLConnection conn = (HttpURLConnection) url.openConnection(); - try { - String reply = call(requestInput, conn); - //System.out.println("********************************"+reply); - - InputSource is = new InputSource(new StringReader(reply)); - Document doc = parseMessage(is); - - Text replyMsg = findText(doc.getDocumentElement(), "120"); - Assert.assertEquals(replyMsg.getData(), "120"); - - - } finally { - conn.disconnect(); - } - } finally { - unUseWar("jaxws-pojo-wsProvider"); - } - } - - - - private Definition getWSDLForService(String servicePort) throws WSDLException { - String port = System.getProperty("http.port"); - if(port == null) - port = "9000"; - - String url = "http://localhost:" + port + servicePort + "?WSDL"; - WSDLFactory factory = WSDLFactory.newInstance(); - WSDLReader reader = factory.newWSDLReader(); - reader.setFeature("javax.wsdl.importDocuments", true); - return reader.readWSDL(url); - } - - private String invokePojoService(String servicePort) throws UnsupportedOperationException, SOAPException { - String port = System.getProperty("http.port"); - if(port == null) - port = "9000"; - - SOAPConnectionFactory soapConnFactory = - SOAPConnectionFactory.newInstance(); - SOAPConnection connection = soapConnFactory.createConnection(); - - MessageFactory messageFactory = MessageFactory.newInstance(); - SOAPMessage message = messageFactory.createMessage(); - - SOAPPart soapPart = message.getSOAPPart(); - SOAPEnvelope envelope = (SOAPEnvelope) soapPart.getEnvelope(); - SOAPBody body = envelope.getBody(); - - - SOAPElement bodyElement = body.addChildElement(envelope.createName("greetMe")); - SOAPElement strElement = bodyElement.addChildElement("arg0"); - strElement.setValue("JOnAS"); - - message.saveChanges(); - //message.writeTo(System.out); - //System.out.println(); - - URLEndpoint destination = new URLEndpoint("http://localhost:"+ port + servicePort); - SOAPMessage reply = connection.call(message, destination); - - Assert.assertNotNull(reply,"Reply of SimpleService is Null!"); - - String response = null; - try{ - ByteArrayOutputStream os = new ByteArrayOutputStream(); - reply.writeTo(os); - response = new String(os.toByteArray()); - } catch(Exception e) { - e.printStackTrace(); - } - connection.close(); - - return response; - } - - private static String call(InputStream requestInput, HttpURLConnection conn) throws IOException { - conn.setConnectTimeout(30 * 1000); - conn.setReadTimeout(30 * 1000); - conn.setDoInput(true); - conn.setUseCaches(false); - - if (requestInput == null) { - conn.setRequestMethod("GET"); - conn.setRequestProperty("Content-Type", "application/xml"); - - conn.connect(); - } else { - conn.setRequestMethod("POST"); - conn.setDoOutput(true); - conn.setRequestProperty("Content-Type", "application/xml"); - - conn.connect(); - - OutputStream out = conn.getOutputStream(); - - byte[] data = new byte[1024]; - int read = 0; - while ((read = requestInput.read(data, 0, data.length)) != -1) { - out.write(data, 0, read); - } - - requestInput.close(); - - out.flush(); - out.close(); - } - - InputStream is = null; - - try { - is = conn.getInputStream(); - } catch (IOException e) { - is = conn.getErrorStream(); - } - - StringBuffer buf = new StringBuffer(); - BufferedReader in = new BufferedReader(new InputStreamReader(is)); - String inputLine; - while ((inputLine = in.readLine()) != null) { - //System.out.println(inputLine); - buf.append(inputLine); - } - in.close(); - - return buf.toString(); - } - - - private static Document parseMessage(InputSource is) throws Exception { - DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); - dbf.setNamespaceAware(true); - DocumentBuilder db = dbf.newDocumentBuilder(); - - Document doc = db.parse(is); - return doc; - } - - private static Text findText(Element element, String value) { - NodeList list = element.getChildNodes(); - for (int i = 0; i < list.getLength(); i++) { - Node child = (Node)list.item(i); - if (child instanceof Text) { - Text text = (Text)child; - if (text.getData().indexOf(value) != -1) { - return text; - } - } else if (child instanceof Element) { - Element childEl = (Element)child; - Text text = findText(childEl, value); - if (text != null) { - return text; - } - } - } - return null; - } -} diff --git a/jonas_tests/jaxws/jaxws-test-clients/src/main/java/org/ow2/jonas/ws/jaxws/test/util/JWebServicesTestCase.java b/jonas_tests/jaxws/jaxws-test-clients/src/main/java/org/ow2/jonas/ws/jaxws/test/util/JWebServicesTestCase.java deleted file mode 100644 index 9930758deb0fbffc86d272fb1757a79a06b083eb..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-clients/src/main/java/org/ow2/jonas/ws/jaxws/test/util/JWebServicesTestCase.java +++ /dev/null @@ -1,510 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999~2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.util; - -import java.io.IOException; -import java.util.Set; - -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; -import javax.management.remote.JMXConnector; -import javax.management.remote.JMXConnectorFactory; -import javax.management.remote.JMXServiceURL; -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; -import com.meterware.httpunit.WebConversation; - -/** - * Define a class to add useful methods for test the webservices - * - Deploy ear, war and beans - * - Retrieve initial context - * @author Florent Benoit - */ -public class JWebServicesTestCase { - - /** - * Name of the JOnAS server used for tests - */ - private static String jonasName = "jonas"; - - /** - * JONAS_BASE - */ - protected static String jb = null; - - /** - * Initial context used for lookup - */ - protected static Context ictx = null; - - /** - * Connection to the MBeanServer - */ - private static MBeanServerConnection cnx = null; - - /** - * Conversation used for HttpUnit - */ - protected WebConversation wc = null; - - /** - * URL used for the constructor - */ - protected String url = null; - - /** - * Prefix for build URLs - */ - private String prefixUrl = null; - - /** - * Add to the specified url the prefix - * @param url relative URL - * @return absolute path of URL - */ - protected String getAbsoluteUrl (String url) { - return (this.prefixUrl + url); - } - - - /** - * Make an absolute path with the filename. - */ - public String absPath(String name, String extension) { - - String ret = ""; - if ( extension.equals(".jar")) { - ret = jb + "/ejbjars/" + name + ".jar"; - } else if ( extension.equals(".war")) { - ret = jb + "/webapps/" + name + ".war"; - } else if (extension.equals(".ear")) { - ret = jb + "/apps/" + name + ".ear"; - } - return ret; - } - private static JMXServiceURL jmxServerUrl = null; - private static String urlSuffix = "service:jmx:"; - private static String registry = null; - private static String defaultRegistry = "rmi://localhost:19099"; - private static String protocol = null; - private static String defaultProtocol = "jrmp"; - - /* - * Get Connection to the MBean server - * Set the static cnx variable - */ - private void getJmxCnx() { - if (cnx == null) { - try { - if (registry == null) { - registry = defaultRegistry; - } - registry = registry + "/"; - int indx = registry.lastIndexOf(":"); - String st = registry.substring(0, indx); - String serverUrl = urlSuffix + st +"/jndi/"+registry; - - if (protocol == null) { - protocol = defaultProtocol; - } - - String connectorName = protocol.concat("connector_"); - - connectorName = connectorName.concat(jonasName); - serverUrl = serverUrl.concat(connectorName); - - jmxServerUrl = new JMXServiceURL(serverUrl); - JMXConnector cntor = JMXConnectorFactory.connect(jmxServerUrl, null); - cnx = cntor.getMBeanServerConnection(null); - System.out.println("server reached via: "+serverUrl); - } catch (IOException e) { - System.err.println("Can't reach server " + jonasName - + " as couldn't create JMXConnector (" + e.getMessage() - + ")"); - System.err.println("Check name, registry and protocol options."); - System.exit(2); - } - } - } - - /* - * ObjectName of y=the J2eeServerMBean - */ - private static ObjectName j2eeserver = null; - - /* - * Get the ObjectName of the J2eeServerMBean - * @return the ObjectName - */ - private ObjectName getJ2eeServer() { - if (j2eeserver == null) { - try { - ObjectName on = ObjectName.getInstance("*:j2eeType=J2EEServer,name=" + jonasName); - Set j2eeservers = cnx.queryNames(on, null); - if (j2eeservers.isEmpty()) { - System.err.println("Can't admin server " + jonasName + ": didn't found J2EEServer MBean"); - System.exit(2); - } - j2eeserver = (ObjectName) j2eeservers.iterator().next(); - } catch (Exception e) { - System.err.println("Can't invoke mbeanServer: " + e); - } - } - return j2eeserver; - } - - /** - * Initialize the port used by tests and the prefix - * @throws Exception - */ - private void init() throws Exception { - String port = System.getProperty("http.port"); - if (port == null) { - port = "9000"; - } - prefixUrl = "http://localhost:" + port; - setUpProperties(); - } - - /** - * Constructor with a specified name - * @param s the name - * @throws Exception - */ - public JWebServicesTestCase(String s) throws Exception { - init(); - } - /** - * Constructor with a specified name and url - * @param s the name - * @param url the url which can be used - * @throws Exception - */ - public JWebServicesTestCase(String s, String url) throws Exception { - wc = new WebConversation(); - init(); - this.url = getAbsoluteUrl(url); - } - - /** - * Get initialContext - * @return the initialContext - * @throws NamingException if the initial context can't be retrieved - */ - private Context getInitialContext() throws NamingException { - return new InitialContext(); - } - - /** - * Common setUp routine, used for every test. - * @throws Exception if an error occurs - */ - - protected void setUpProperties() throws Exception { - try { - // get InitialContext - if (ictx == null) { - ictx = getInitialContext(); - } - jb = System.getProperty("jonas.base"); - - registry = System.getProperty("registry"); - protocol = System.getProperty("protocol"); - getJmxCnx(); - - } catch (NamingException e) { - System.err.println("Cannot setup test: " + e); - e.printStackTrace(); - } - } - - - /** - * Load an ear file in the jonas server - * @param filename ear file, without ".ear" extension - * @throws Exception if an error occurs - */ - public void useEar(String fname) throws Exception { - String filename = absPath(fname, ".ear"); - try { - // Load ear in JOnAS if not already loaded. - if (!isEarLoaded(filename)) { - loadEar(filename); - } - - } catch (Exception e) { - throw new Exception("Cannot load Ear : " + e.getMessage()); - } - - } - - /** - * Unload an ear file in the jonas server - * @param filename ear file, without ".ear" extension - * @throws Exception if an error occurs - */ - public void unUseEar(String fname) throws Exception { - String filename = absPath(fname, ".ear"); - try { - - if (isEarLoaded(filename)) { - unloadEar(filename); - } - } catch (Exception e) { - throw new Exception("Cannot unload Ear : " + e.getMessage()); - } - } - - /** - * Load a war file in the jonas server - * @param filename war file, without ".war" extension - * @throws Exception if an error occurs - */ - - public void useWar(String fname) throws Exception { - String filename = absPath(fname, ".war"); - try { - // Load war in JOnAS if not already loaded. - if (!isWarLoaded(filename)) { - loadWar(filename); - } - } catch (Exception e) { - throw new Exception("Cannot load War : " + e.getMessage()); - } - } - - /** - * Unload an ear file in the jonas server - * @param filename ear file, without ".ear" extension - * @throws Exception if an error occurs - */ - public void unUseWar(String fname) throws Exception { - String filename = absPath(fname, ".war"); - try { - - if (isWarLoaded(filename)) { - unloadEar(filename); - } - } catch (Exception e) { - throw new Exception("Cannot unload war : " + e.getMessage()); - } - } - - - /** - * Load a bean jar file in the jonas server - * @param filename jar file, without ".jar" extension - * @throws Exception if an error occurs - */ - public void useBeans(String fname) throws Exception { - try { - String filename = absPath(fname, ".jar"); - // Load bean in EJBServer if not already loaded. - - if (!isJarLoaded(filename)) { - addBeans(filename); - } - } catch (Exception e) { - throw new Exception("Cannot load Bean : " + e.getMessage()); - } - } - - - - /** - * Unload a bean jar file in the jonas server - * @param filename jar file, without ".jar" extension - * @throws Exception if an error occurs - */ - public void unUseBeans(String filename) throws Exception { - String fname = absPath(filename, ".jar"); - - try { - - //if (isJarLoaded(fname)) { - unloadBeans(fname); - //} - } catch (Exception e) { - throw new Exception("Cannot unload Bean : " + e.getMessage()); - } - } - - - - /* - * isLoaded remote operation - */ - private boolean isLoaded(String filename) { - boolean ret = false; - String[] params = {filename}; - String[] signature = {"java.lang.String"}; - try { - Boolean r = (Boolean) cnx.invoke(getJ2eeServer(), "isDeployed", params, signature); - ret = r.booleanValue(); - } catch (Exception e) { - System.err.println("Cannot deploy " + filename + ": " + e); - } - return ret; - } - - /** - * isJarLoaded remote operation - * @param filename jar file, with ".jar" extension - */ - private boolean isJarLoaded(String filename) { - boolean ret = false; - try { - return isLoaded(filename); - } catch (Exception e) { - System.err.println("Cannot test bean: " + e); - } - - return ret; - } - public void addBeans(String filename) { - - try { - String[] params = {filename}; - String[] signature = {"java.lang.String"}; - try { - cnx.invoke(getJ2eeServer(), "deploy", params, signature); - } catch (Exception e) { - System.err.println("Cannot deploy " + filename + ": " + e); - } - - } catch (Exception e) { - System.err.println("Cannot load bean: " + e); - } - } - - /** - * loadEar remote operation - * @param filename war file, with ".war" extension - */ - public void loadWar(String filename) { - try { - - String[] params = {filename}; - String[] signature = {"java.lang.String"}; - try { - cnx.invoke(getJ2eeServer(), "deploy", params, signature); - } catch (Exception e) { - System.err.println("Cannot deploy " + filename + ": " + e); - } - - } catch (Exception e) { - System.err.println("Cannot load bean: " + e); - } - } - - /** - * isWarLoaded remote operation - * @param filename war file, with ".war" extension - */ - private boolean isWarLoaded(String filename) { - boolean ret = false; - try { - return isLoaded(filename); - } catch (Exception e) { - System.err.println("Cannot test bean: " + e); - } - - return ret; - } - /** - * isEarLoaded remote operation - * @param filename ear file, with ".ear" extension - */ - private boolean isEarLoaded(String filename) { - boolean ret = false; - try { - return isLoaded(filename); - - } catch (Exception e) { - System.err.println("Cannot test bean: " + e); - } - - return ret; - } - /** - * loadEar remote operation - * @param filename ear file, with ".ear" extension - */ - public void loadEar(String filename) { - try { - - String[] params = {filename}; - String[] signature = {"java.lang.String"}; - try { - cnx.invoke(getJ2eeServer(), "deploy", params, signature); - } catch (Exception e) { - System.err.println("Cannot deploy " + filename + ": " + e); - } - - } catch (Exception e) { - System.err.println("Cannot load bean: " + e); - } - } - - /** - * unloadBean remote operation - * @param filename ear file, with ".ear" extension - */ - public void unloadEar(String filename) { - try { - String[] params = {filename}; - String[] signature = {"java.lang.String"}; - try { - cnx.invoke(getJ2eeServer(), "undeploy", params, signature); - } catch (Exception e) { - System.err.println("Cannot undeploy " + filename + ": " + e); - } - - } catch (Exception e) { - System.err.println("Cannot unload ear: " + e); - } - } - - /** - * unloadBean remote operation - * @param filename jar file, with ".jar" extension - */ - public void unloadBeans(String filename) { - try { - String[] params = {filename}; - String[] signature = {"java.lang.String"}; - try { - cnx.invoke(getJ2eeServer(), "undeploy", params, signature); - } catch (Exception e) { - System.err.println("Cannot undeploy " + filename + ": " + e); - } - - } catch (Exception e) { - System.err.println("Cannot unload bean: " + e); - } - } -} diff --git a/jonas_tests/jaxws/jaxws-test-clients/src/main/java/org/ow2/jonas/ws/jaxws/test/util/SimpleServiceInterface.java b/jonas_tests/jaxws/jaxws-test-clients/src/main/java/org/ow2/jonas/ws/jaxws/test/util/SimpleServiceInterface.java deleted file mode 100644 index 4b0d078fb513c08bc0a6221ae36651457373fefe..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-clients/src/main/java/org/ow2/jonas/ws/jaxws/test/util/SimpleServiceInterface.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2009 Bull S.A.S. - * Contact: jonas-team@ow2.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.ws.jaxws.test.util; - - -import javax.jws.WebMethod; - -public interface SimpleServiceInterface { - - @WebMethod(exclude=false) - public String greetMe(String str); -} diff --git a/jonas_tests/jaxws/jaxws-test-clients/src/main/resources/request1.xml b/jonas_tests/jaxws/jaxws-test-clients/src/main/resources/request1.xml deleted file mode 100644 index ea9019fe059abaceb68b3b945161586e87e4196a..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/jaxws-test-clients/src/main/resources/request1.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - \ No newline at end of file diff --git a/jonas_tests/jaxws/pom.xml b/jonas_tests/jaxws/pom.xml deleted file mode 100644 index 86b86ed43d69b709a81e5f367f5c8027298683fc..0000000000000000000000000000000000000000 --- a/jonas_tests/jaxws/pom.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - org.ow2.jonas - jonas-modules - 5.1.0-RC3-SNAPSHOT - - 4.0.0 - org.ow2.jonas.ws.jaxws - itests - pom - JOnAS :: Tests :: JAXWS - Tests for JAXWS - - - jaxws-test-base - jaxws-test-clients - jaxws-felix - - - - - \ No newline at end of file diff --git a/jonas_tests/jonas5_tests.ipr b/jonas_tests/jonas5_tests.ipr deleted file mode 100644 index d6b6640553a7c996544f3053251f06aa0fa44538..0000000000000000000000000000000000000000 --- a/jonas_tests/jonas5_tests.ipr +++ /dev/null @@ -1,254 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/jonasadmin/.cvsignore b/jonas_tests/jonasadmin/.cvsignore deleted file mode 100644 index 141f2534a0b16d31347c6051b707094a6ec3948f..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -classes -report \ No newline at end of file diff --git a/jonas_tests/jonasadmin/build.xml b/jonas_tests/jonasadmin/build.xml deleted file mode 100644 index 5e115b2262a1938131cf06e36b1bfc29c0e072fe..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/build.xml +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/jonasadmin/resources/jonasAdminTests.properties b/jonas_tests/jonasadmin/resources/jonasAdminTests.properties deleted file mode 100755 index 36ab1e81d3eed4b37aa807cdc7f3f20ead584035..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/resources/jonasAdminTests.properties +++ /dev/null @@ -1,8 +0,0 @@ -# NAVIGATION TESTS -# to test, choose on else off -navigation.mbean=on -navigation.link=on -navigation.contentTitle=on -navigation.selectedItem=on -navigation.titleTomThumb=on -navigation.rarInEar=on \ No newline at end of file diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/catalina/C_JonasAdminCatalina.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/catalina/C_JonasAdminCatalina.java deleted file mode 100755 index fb4b6c82469c93f7e927bc336780731e38ed3aae..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/catalina/C_JonasAdminCatalina.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.catalina; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; - -import com.meterware.httpunit.WebConversation; - -import junit.framework.Test; -import junit.framework.TestSuite; - -/** - * Define a class to test catalina in jonasAdmin - * Test : - connector - * - * @author Paul Kemler - */ -public class C_JonasAdminCatalina extends JonasAdminTestCase { - - /** - * Constructor with a specified name - * @param name the name - */ - public C_JonasAdminCatalina(String name) { - super(name); - } - - /** - * Get a new TestSuite for this class - * It includes all jonasAdmin tests - * @return a new TestSuite for this class - */ - public static Test suite() { - TestSuite suite = new TestSuite(); - suite.addTest(F_JonasAdminConnector.suite()); - return suite; - } - - /** - * Main method - * @param args the arguments - */ - public static void main (String[] args) { - WebConversation wc = new WebConversation(); - junit.textui.TestRunner.run(suite()); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/catalina/ConnectorUtils.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/catalina/ConnectorUtils.java deleted file mode 100755 index 85e05000eacbc37aa42906ee5742b664edca1f4d..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/catalina/ConnectorUtils.java +++ /dev/null @@ -1,565 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.catalina; - -import java.io.IOException; -import java.net.ServerSocket; - -import org.xml.sax.SAXException; - -import com.meterware.httpunit.SubmitButton; -import com.meterware.httpunit.WebConversation; -import com.meterware.httpunit.WebForm; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; - -/** - * Class for using connectors from jonasAdmin, for example create a new connector. - * @author Paul Kemler - * - */ -public class ConnectorUtils { - - /** - * NAME of FRAME content - */ - protected static final String FRAME_CONTENT = "content"; - - /** - * NAME of FRAME tree - */ - protected static final String FRAME_TREE = "tree"; - - /** - * URL of the Catalina connectors - */ - private static final String URL_JONASADMIN_CATALINA_CONNECTOR = "ListCatalinaConnectors.do"; - - /** - * URL for creating a catalina connector - */ - private static final String URL_JONASADMIN_CREATE_CATALINA_CONNECTOR = "CreateCatalinaConnector.do"; - - /** - * Create a new connector - * @param wc logged to jonasAdmin - * @return port of the new connector - * @throws Exception if an error occurs - */ - public static String createNewConnector(WebConversation wc) throws Exception { - // Call method createNewConnector(WebConversation wc, String protocol) - return createNewConnector(wc, "http"); - } - - /** - * Create a new connector - * @param wc logged to jonasAdmin - * @param protocol protocol to create ("http", "https" or "ajp") - * @return port of the new connector - * @throws Exception if an error occurs - */ - public static String createNewConnector(WebConversation wc, String protocol) throws Exception { - WebResponse wr = null; - WebLink link = null; - WebForm form = null; - String portText = null; - - // Go to connector page - wr = getConnectorPage(wc); - - // Go to CreateCatalinaConnector.do?type= - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_CREATE_CATALINA_CONNECTOR + "?type=" - + protocol); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - portText = "" + findPort(); - - if (protocol.equals("http")) { - - form = wr.getForms()[0]; - String maxSpareThreadsText = form.getParameterValue("maxSpareThreadsText"); - String URIEncoding = form.getParameterValue("URIEncoding"); - String minSpareThreadsText = form.getParameterValue("minSpareThreadsText"); - String address = form.getParameterValue("address"); - String tcpNoDelay = form.getParameterValue("tcpNoDelay"); - String maxThreadsText = form.getParameterValue("maxThreadsText"); - String xpoweredBy = form.getParameterValue("xpoweredBy"); - String connectorType = form.getParameterValue("connectorType"); - String objectName = form.getParameterValue("objectName"); - String secure = form.getParameterValue("secure"); - String action = form.getParameterValue("action"); - String save = form.getParameterValue("save"); - String emptySessionPath = form.getParameterValue("emptySessionPath"); - String acceptCountText = form.getParameterValue("acceptCountText"); - String bufferSizeText = form.getParameterValue("bufferSizeText"); - String proxyName = form.getParameterValue("proxyName"); - String useBodyEncodingForURI = form.getParameterValue("useBodyEncodingForURI"); - String connTimeOutText = form.getParameterValue("connTimeOutText"); - String redirectPortText = form.getParameterValue("redirectPortText"); - String enableLookups = form.getParameterValue("enableLookups"); - String allowTrace = form.getParameterValue("allowTrace"); - String proxyPortText = form.getParameterValue("proxyPortText"); - String maxPostSizeText = form.getParameterValue("maxPostSizeText"); - - createNewHttpConnector(form, maxSpareThreadsText, URIEncoding, portText, minSpareThreadsText, address, - tcpNoDelay, maxThreadsText, xpoweredBy, connectorType, objectName, secure, action, save, - emptySessionPath, acceptCountText, bufferSizeText, proxyName, useBodyEncodingForURI, - connTimeOutText, redirectPortText, enableLookups, allowTrace, proxyPortText, maxPostSizeText); - } else if (protocol.equals("https")) { - form = wr.getForms()[0]; - String maxSpareThreadsText = form.getParameterValue("maxSpareThreadsText"); - String keystorePass = form.getParameterValue("keystorePass"); - String URIEncoding = form.getParameterValue("URIEncoding"); - String minSpareThreadsText = form.getParameterValue("minSpareThreadsText"); - String address = form.getParameterValue("address"); - String keystoreType = form.getParameterValue("keystoreType"); - String algorithm = form.getParameterValue("algorithm"); - String tcpNoDelay = form.getParameterValue("tcpNoDelay"); - String maxThreadsText = form.getParameterValue("maxThreadsText"); - String xpoweredBy = form.getParameterValue("xpoweredBy"); - String connectorType = form.getParameterValue("connectorType"); - String sslProtocol = form.getParameterValue("sslProtocol"); - String objectName = form.getParameterValue("objectName"); - String secure = form.getParameterValue("secure"); - String action = form.getParameterValue("action"); - String save = form.getParameterValue("save"); - String emptySessionPath = form.getParameterValue("emptySessionPath"); - String keystoreFile = form.getParameterValue("keystoreFile"); - String acceptCountText = form.getParameterValue("acceptCountText"); - String bufferSizeText = form.getParameterValue("bufferSizeText"); - String proxyName = form.getParameterValue("proxyName"); - String useBodyEncodingForURI = form.getParameterValue("useBodyEncodingForURI"); - String connTimeOutText = form.getParameterValue("connTimeOutText"); - String redirectPortText = form.getParameterValue("redirectPortText"); - String enableLookups = form.getParameterValue("enableLookups"); - String clientAuth = form.getParameterValue("clientAuth"); - String allowTrace = form.getParameterValue("allowTrace"); - String ciphers = form.getParameterValue("ciphers"); - String proxyPortText = form.getParameterValue("proxyPortText"); - String maxPostSizeText = form.getParameterValue("maxPostSizeText"); - - createNewHttpsConnector(form, maxSpareThreadsText, keystorePass, URIEncoding, portText, - minSpareThreadsText, address, keystoreType, algorithm, tcpNoDelay, maxThreadsText, xpoweredBy, - connectorType, sslProtocol, objectName, secure, action, save, emptySessionPath, keystoreFile, - acceptCountText, bufferSizeText, proxyName, useBodyEncodingForURI, connTimeOutText, - redirectPortText, enableLookups, clientAuth, allowTrace, - ciphers, proxyPortText, maxPostSizeText); - } else if (protocol.equals("ajp")) { - form = wr.getForms()[0]; - String maxSpareThreadsText = form.getParameterValue("maxSpareThreadsText"); - String URIEncoding = form.getParameterValue("URIEncoding"); - String minSpareThreadsText = form.getParameterValue("minSpareThreadsText"); - String address = form.getParameterValue("address"); - String tcpNoDelay = form.getParameterValue("tcpNoDelay"); - String maxThreadsText = form.getParameterValue("maxThreadsText"); - String xpoweredBy = form.getParameterValue("xpoweredBy"); - String connectorType = form.getParameterValue("connectorType"); - String objectName = form.getParameterValue("objectName"); - String secure = form.getParameterValue("secure"); - String action = form.getParameterValue("action"); - String save = form.getParameterValue("save"); - String emptySessionPath = form.getParameterValue("emptySessionPath"); - String acceptCountText = form.getParameterValue("acceptCountText"); - String bufferSizeText = form.getParameterValue("bufferSizeText"); - String useBodyEncodingForURI = form.getParameterValue("useBodyEncodingForURI"); - String connTimeOutText = form.getParameterValue("connTimeOutText"); - String redirectPortText = form.getParameterValue("redirectPortText"); - String enableLookups = form.getParameterValue("enableLookups"); - String allowTrace = form.getParameterValue("allowTrace"); - String maxPostSizeText = form.getParameterValue("maxPostSizeText"); - - createNewAjpConnector(form, maxSpareThreadsText, URIEncoding, portText, minSpareThreadsText, address, - tcpNoDelay, maxThreadsText, xpoweredBy, connectorType, objectName, secure, action, save, - emptySessionPath, acceptCountText, bufferSizeText, useBodyEncodingForURI, connTimeOutText, - redirectPortText, enableLookups, allowTrace, maxPostSizeText); - } - return portText; - } - - /** - * Get connector page when it is catalina - * @param wc logged to jonasAdmin with catalina - * @return WebResponse: content frame with list of connectors - * @throws SAXException if an error occurs when link is matched or clicked - * @throws IOException if an error occurs when link is clicked - */ - public static WebResponse getConnectorPage(WebConversation wc) throws SAXException, IOException { - // Go to connector page (ListCatalinaConnectors.do) - WebResponse wr; - WebLink link; - - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_CATALINA_CONNECTOR); - if (link == null) { - throw new IllegalStateException("No link found for link : '" + URL_JONASADMIN_CATALINA_CONNECTOR + "'."); - } - link.click(); - - wr = wc.getFrameContents(FRAME_CONTENT); - return wr; - } - - /** - * Get a free port - * @return number of a free port - * @throws Exception if an error occurs to find a port - */ - private static int findPort() throws Exception { - int port = 0; - - ServerSocket ss; - ss = new ServerSocket(port); // free port if port == 0 - port = ss.getLocalPort(); - ss.close(); - return port; - } - - /** - * Create New Http Connector - * @param form Web Form to create http connector - * @param maxSpareThreadsText a string - * @param URIEncoding a string - * @param portText a string - * @param minSpareThreadsText a string - * @param address a string - * @param tcpNoDelay a string - * @param maxThreadsText a string - * @param xpoweredBy a string - * @param connectorType a string - * @param objectName a string - * @param secure a string - * @param action a string - * @param save a string - * @param emptySessionPath a string - * @param acceptCountText a string - * @param bufferSizeText a string - * @param proxyName a string - * @param useBodyEncodingForURI a string - * @param connTimeOutText a string - * @param redirectPortText a string - * @param enableLookups a string - * @param allowTrace a string - * @param proxyPortText a string - * @param maxPostSizeText a string - * @throws Exception if an error occurs when button is clicked. - */ - public static void createNewHttpConnector(WebForm form, String maxSpareThreadsText, String URIEncoding, - String portText, String minSpareThreadsText, String address, String tcpNoDelay, String maxThreadsText, - String xpoweredBy, String connectorType, String objectName, String secure, String action, String save, - String emptySessionPath, String acceptCountText, String bufferSizeText, String proxyName, - String useBodyEncodingForURI, String connTimeOutText, String redirectPortText, - String enableLookups, String allowTrace, - String proxyPortText, String maxPostSizeText) throws Exception { - - SubmitButton button = null; - - form.setParameter("maxSpareThreadsText", maxSpareThreadsText); - form.setParameter("URIEncoding", URIEncoding); - form.setParameter("portText", portText); - form.setParameter("minSpareThreadsText", minSpareThreadsText); - form.setParameter("address", address); - form.setParameter("tcpNoDelay", tcpNoDelay); - form.setParameter("maxThreadsText", maxThreadsText); - form.setParameter("xpoweredBy", xpoweredBy); - form.setParameter("connectorType", connectorType); - form.setParameter("objectName", objectName); - form.setParameter("secure", secure); - form.setParameter("action", action); - form.setParameter("save", save); - form.setParameter("emptySessionPath", emptySessionPath); - form.setParameter("acceptCountText", acceptCountText); - form.setParameter("bufferSizeText", bufferSizeText); - form.setParameter("proxyName", proxyName); - form.setParameter("useBodyEncodingForURI", useBodyEncodingForURI); - form.setParameter("connTimeOutText", connTimeOutText); - form.setParameter("redirectPortText", redirectPortText); - form.setParameter("enableLookups", enableLookups); - form.setParameter("allowTrace", allowTrace); - form.setParameter("proxyPortText", proxyPortText); - form.setParameter("maxPostSizeText", maxPostSizeText); - - button = form.getSubmitButton("btn_apply"); - button.click(); - } - - /** - * Create New Https Connector - * @param form Web Form to create https connector - * @param maxSpareThreadsText a string - * @param keystorePass a string - * @param URIEncoding a string - * @param portText a string - * @param minSpareThreadsText a string - * @param address a string - * @param keystoreType a string - * @param algorithm a string - * @param tcpNoDelay a string - * @param maxThreadsText a string - * @param xpoweredBy a string - * @param connectorType a string - * @param sslProtocol a string - * @param objectName a string - * @param secure a string - * @param action a string - * @param save a string - * @param emptySessionPath a string - * @param keystoreFile a string - * @param acceptCountText a string - * @param bufferSizeText a string - * @param proxyName a string - * @param useBodyEncodingForURI a string - * @param connTimeOutText a string - * @param redirectPortText a string - * @param enableLookups a string - * @param clientAuth a string - * @param allowTrace a string - * @param ciphers a string - * @param proxyPortText a string - * @param maxPostSizeText a string - * @throws Exception if an error occurs when button is clicked. - */ - public static void createNewHttpsConnector(WebForm form, String maxSpareThreadsText, String keystorePass, - String URIEncoding, String portText, String minSpareThreadsText, String address, String keystoreType, - String algorithm, String tcpNoDelay, String maxThreadsText, String xpoweredBy, String connectorType, - String sslProtocol, String objectName, String secure, String action, String save, String emptySessionPath, - String keystoreFile, String acceptCountText, String bufferSizeText, String proxyName, - String useBodyEncodingForURI, String connTimeOutText, String redirectPortText, - String enableLookups, String clientAuth, String allowTrace, - String ciphers, String proxyPortText, String maxPostSizeText) throws Exception { - - SubmitButton button = null; - - form.setParameter("maxSpareThreadsText", maxSpareThreadsText); - form.setParameter("keystorePass", keystorePass); - form.setParameter("URIEncoding", URIEncoding); - form.setParameter("portText", portText); - form.setParameter("minSpareThreadsText", minSpareThreadsText); - form.setParameter("address", address); - form.setParameter("keystoreType", keystoreType); - form.setParameter("algorithm", algorithm); - form.setParameter("tcpNoDelay", tcpNoDelay); - form.setParameter("maxThreadsText", maxThreadsText); - form.setParameter("xpoweredBy", xpoweredBy); - form.setParameter("connectorType", connectorType); - form.setParameter("sslProtocol", sslProtocol); - form.setParameter("objectName", objectName); - form.setParameter("secure", secure); - form.setParameter("action", action); - form.setParameter("save", save); - form.setParameter("emptySessionPath", emptySessionPath); - form.setParameter("keystoreFile", keystoreFile); - form.setParameter("acceptCountText", acceptCountText); - form.setParameter("bufferSizeText", bufferSizeText); - form.setParameter("proxyName", proxyName); - form.setParameter("useBodyEncodingForURI", useBodyEncodingForURI); - form.setParameter("connTimeOutText", connTimeOutText); - form.setParameter("redirectPortText", redirectPortText); - form.setParameter("enableLookups", enableLookups); - form.setParameter("clientAuth", clientAuth); - form.setParameter("allowTrace", allowTrace); - form.setParameter("ciphers", ciphers); - form.setParameter("proxyPortText", proxyPortText); - form.setParameter("maxPostSizeText", maxPostSizeText); - - button = form.getSubmitButton("btn_apply"); - button.click(); - } - - /** - * Create New Ajp Connector - * @param form Web Form to create ajp connector - * @param maxSpareThreadsText a string - * @param URIEncoding a string - * @param portText a string - * @param minSpareThreadsText a string - * @param address a string - * @param tcpNoDelay a string - * @param maxThreadsText a string - * @param xpoweredBy a string - * @param connectorType a string - * @param objectName a string - * @param secure a string - * @param action a string - * @param save a string - * @param emptySessionPath a string - * @param acceptCountText a string - * @param bufferSizeText a string - * @param useBodyEncodingForURI a string - * @param connTimeOutText a string - * @param redirectPortText a string - * @param enableLookups a string - * @param allowTrace a string - * @param maxPostSizeText a string - * @throws Exception if an error occurs when button is clicked. - */ - public static void createNewAjpConnector(WebForm form, String maxSpareThreadsText, String URIEncoding, - String portText, String minSpareThreadsText, String address, String tcpNoDelay, String maxThreadsText, - String xpoweredBy, String connectorType, String objectName, String secure, String action, String save, - String emptySessionPath, String acceptCountText, String bufferSizeText, String useBodyEncodingForURI, - String connTimeOutText, String redirectPortText, String enableLookups, String allowTrace, String maxPostSizeText) throws Exception { - - SubmitButton button = null; - - form.setParameter("maxSpareThreadsText", maxSpareThreadsText); - form.setParameter("URIEncoding", URIEncoding); - form.setParameter("portText", portText); - form.setParameter("minSpareThreadsText", minSpareThreadsText); - form.setParameter("address", address); - form.setParameter("tcpNoDelay", tcpNoDelay); - form.setParameter("maxThreadsText", maxThreadsText); - form.setParameter("xpoweredBy", xpoweredBy); - form.setParameter("connectorType", connectorType); - form.setParameter("objectName", objectName); - form.setParameter("secure", secure); - form.setParameter("action", action); - form.setParameter("save", save); - form.setParameter("emptySessionPath", emptySessionPath); - form.setParameter("acceptCountText", acceptCountText); - form.setParameter("bufferSizeText", bufferSizeText); - form.setParameter("useBodyEncodingForURI", useBodyEncodingForURI); - form.setParameter("connTimeOutText", connTimeOutText); - form.setParameter("redirectPortText", redirectPortText); - form.setParameter("enableLookups", enableLookups); - form.setParameter("allowTrace", allowTrace); - form.setParameter("maxPostSizeText", maxPostSizeText); - - button = form.getSubmitButton("btn_apply"); - button.click(); - } - - /** - * Remove a connector - * @param wc logged to jonasAdmin - * @param port port number of the connector to remove - * @throws Exception if an error occurs when connector is deleted - */ - public static void deleteConnector(WebConversation wc, String port) throws Exception { - String[] tabPort = {port}; - deleteConnectors(wc, tabPort); - } - - /** - * Remove connectors - * @param wc logged to jonasAdmin - * @param port port number of the connector to remove - * @throws Exception if an error occurs - */ - public static void deleteConnectors(WebConversation wc, String[] tabPort) throws Exception { - WebResponse wr = null; - WebForm form = null; - WebLink link = null; - SubmitButton button = null; - - String action = ""; - - wr = getConnectorPage(wc); - - // Select connectors to remove - form = wr.getForms()[0]; - action = form.getParameterValue("action"); - for (int i = 0; i < tabPort.length; i++) { - form.setCheckbox("selectedItems", "jonas:type=Connector,port=" + tabPort[i], true); - } - - // Choose remove action - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, "remove"); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Confirm - form = wr.getForms()[0]; - button = form.getSubmitButton("btnSubmit"); - button.click(); - } - - /** - * Modify a connector - * @param wc logged to jonasAdmin - * @param port number of the port of the connector to modify - * @param acceptCountText a string - * @param maxPostSizeText a string - * @param connTimeOutText a string - * @param URIEncoding a string - * @param bufferSizeText a string - * @param address a string - * @param redirectPortText a string - * @param maxThreadsText a string - * @param minSpareThreadsText a string - * @param maxSpareThreadsText a string - * @param proxyName a string - * @param proxyPortText a string - * @throws Exception if an error occurs - */ - public static void modifyHttpConnector(WebForm form, String acceptCountText, String maxPostSizeText, - String connTimeOutText, String URIEncoding, String bufferSizeText, String address, String redirectPortText, - String maxThreadsText, String minSpareThreadsText, String maxSpareThreadsText, String proxyName, - String proxyPortText, String allowTrace, String emptySessionPath, String enableLookups, - String useBodyEncodingForURI, String xpoweredBy, String tcpNoDelay) throws Exception { - - SubmitButton button = null; - - String objectName = null; - String action = null; - String save = null; - String connectorType = null; - String portText = null; - - // get hidden params - objectName = form.getParameterValue("objectName"); - action = form.getParameterValue("action"); - save = form.getParameterValue("save"); - connectorType = form.getParameterValue("connectorType"); - portText = form.getParameterValue("portText"); - - form.setParameter("objectName", objectName); - form.setParameter("action", action); - form.setParameter("save", save); - form.setParameter("connectorType", connectorType); - form.setParameter("portText", portText); - form.setParameter("acceptCountText", acceptCountText); - form.setParameter("maxPostSizeText", maxPostSizeText); - form.setParameter("connTimeOutText", connTimeOutText); - form.setParameter("URIEncoding", URIEncoding); - form.setParameter("bufferSizeText", bufferSizeText); - form.setParameter("address", address); - form.setParameter("redirectPortText", redirectPortText); - form.setParameter("maxThreadsText", maxThreadsText); - form.setParameter("minSpareThreadsText", minSpareThreadsText); - form.setParameter("maxSpareThreadsText", maxSpareThreadsText); - form.setParameter("proxyName", proxyName); - form.setParameter("proxyPortText", proxyPortText); - form.setParameter("allowTrace", allowTrace); - form.setParameter("emptySessionPath", emptySessionPath); - form.setParameter("enableLookups", enableLookups); - form.setParameter("useBodyEncodingForURI", useBodyEncodingForURI); - form.setParameter("xpoweredBy", xpoweredBy); - form.setParameter("tcpNoDelay", tcpNoDelay); - - button = form.getSubmitButton("btn_apply"); - button.click(); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/catalina/F_JonasAdminConnector.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/catalina/F_JonasAdminConnector.java deleted file mode 100755 index bd97a252274b3fc997cd181c8ccc9c48b30c3214..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/catalina/F_JonasAdminConnector.java +++ /dev/null @@ -1,572 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.catalina; - -import java.util.Iterator; - -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminUtils; -import org.xml.sax.SAXException; - -import com.meterware.httpunit.HTMLElement; -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.TableCell; -import com.meterware.httpunit.WebConversation; -import com.meterware.httpunit.WebForm; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - -/** - * Define a class to test the JOnAS Admin console Test connectors - * @author Paul Kemler - */ -public class F_JonasAdminConnector extends JonasAdminTestCase { - - /** - * URL of Jonas Logger - */ - private static final String URL_JONASADMIN_JONAS_LOGGER = "/EditLoggingJonas.do"; - - /** - * URL to modify a connector - */ - private static final String URL_JONASADMIN_MODIFY_CONNECTOR = "EditCatalinaConnector.do?select=jonas%3Atype%3DConnector%2Cport%3D"; - - /** - * URL of connectors - */ - private static final String URL_JONASADMIN_CONNECTORS = "ListCatalinaConnectors.do"; - - /** - * INPUT Checkbox - */ - private static final String INPUT_CHECKBOX = "input type=\"checkbox\""; - - /** - * Title port - */ - private static final String TITLE_PORT = "Port"; - - /** - * Title address - */ - private static final String TITLE_ADDRESS = "Address"; - - /** - * Title type - */ - private static final String TITLE_TYPE = "Type"; - - /** - * Button 'Save' - */ - private static final String BUTTON_SAVE = "/EditServletServer.do?forward=ActionListCatalinaConnectors"; - - /** - * SUCCESS CODE - */ - private static final int HTTP_SUCCESS_CODE = 200; - - /** - * A 2nd connection to jonasAdmin - */ - private static WebConversation wc2 = new WebConversation(); - - - /** - * Port of the http connector - */ - String portHttp; - - /** - * Port of the https connector - */ - String portHttps; - - /** - * Port of the ajp connector - */ - String portAjp; - - /** - * Accept Count - */ - private static final String acceptCount = "128"; - /** - * Allow Trace - */ - private static final String allowTrace = "true"; - /** - * Empty Session Path - */ - private static final String emptySessionPath = "true"; - /** - * Enable DNS Lookups - */ - private static final String enableLookups = "true"; - /** - * Max Bytes in a Post - */ - private static final String maxPostSize = "1048576"; - /** - * Connection Timeout - */ - private static final String connTimeOut = "10000"; - /** - * URI Encoding - */ - private static final String URIEncoding = ""; - /** - * Use Body Encoding for URI - */ - private static final String useBodyEncodingForURI = "true"; - /** - * X-Powered-By Generation Enabled - */ - private static final String xpoweredBy = "true"; - /** - * Should we use TCP no delay - */ - private static final String tcpNoDelay = "false"; - /** - * Default Buffer Size - */ - private static final String bufferSize = "2048"; - /** - * IP Address - */ - private static final String address = ""; - /** - * Redirect Port Number - */ - private static final String redirectPort = "9043"; - /** - * Maximum Threads - */ - private static final String maxThreads = "50"; - /** - * Minimum Spare Threads - */ - private static final String minSpareThreads = "10"; - /** - * Maximum Spare Threads - */ - private static final String maxSpareThreads = "25"; - /** - * Proxy Name - */ - private static final String proxyName = ""; - /** - * Proxy Port Number - */ - private static final String proxyPort = "0"; - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminConnector(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminConnector(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminConnector.class); - } - - /** - * Setup need for these tests jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - undeployAllEar(); - undeployAllJar(); - - useEar("autoload/mejb"); - } - - /** - * Test connectors - * @throws Exception if error occurs - */ - public void testConnectors() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebForm form; - - int row; - int portColumn; - int addressColumn; - int typeColumn; - int rowHttp; - int rowHttps; - int rowAjp; - String testUrl; - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - // OPEN A SECOND CONNECTION - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc2, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - - if (jProp.isCatalina()) { - wr = ConnectorUtils.getConnectorPage(wc); - table = utils.getTable(wr, 3); - portColumn = utils.getColumn(TITLE_PORT, table).intValue(); - if (portColumn == -1) { - throw new IllegalThreadStateException("There is no column, which contains '" + TITLE_PORT + "'. "); - } - addressColumn = utils.getColumn(TITLE_ADDRESS, table).intValue(); - if (portColumn == -1) { - throw new IllegalThreadStateException("There is no column, which contains '" + TITLE_ADDRESS + "'. "); - } - typeColumn = utils.getColumn(TITLE_TYPE, table).intValue(); - if (portColumn == -1) { - throw new IllegalThreadStateException("There is no column, which contains '" + TITLE_TYPE + "'. "); - } - - // Verify 'remove' button - if (table.getRowCount() == 2) { - assertFalse("There is a checkbox. ", wr.getText().indexOf(INPUT_CHECKBOX) != -1); - - // Choose remove action - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, "remove"); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - // ERROR: "No connector found !" - assertTrue("There is no error message. ", wr.getText().indexOf("") != -1); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_CONNECTORS); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - } else { - assertTrue("There is no remove button but there is no one and only one connector. ", wr.getText() - .indexOf("'remove'") != -1); - assertTrue("There is no checkbox but there is no one and only one connector. ", wr.getText().indexOf( - INPUT_CHECKBOX) != -1); - } - - // Open connectors branch in the tree to verify if a connector is - // well added. - wr = wc.getFrameContents(FRAME_TREE); - table = wr.getTables()[0]; - int rowConnectors = utils.getFirstRow("Connectors", table, 6).intValue(); - if (rowConnectors == -1) { - throw new IllegalThreadStateException("Connectors was not found in the tree. "); - } - TableCell cell = table.getTableCell(rowConnectors, 4); - HTMLElement[] elements = cell.getElementsWithAttribute("src", "images/tree/node_close_last.gif"); - if (elements.length == 1) { - if (elements[0].getAttribute("src").indexOf("node_close") != -1) { - link = cell.getLinks()[0]; - link.click(); - } - } - - // 1-Create new connectors - portHttp = ConnectorUtils.createNewConnector(wc, "http"); - // Verify - wr = wc.getFrameContents(FRAME_TREE); - assertTrue("The port " + portHttp + " is not found in the tree. ", wr.getText().indexOf(portHttp) != -1); - wr = wc.getFrameContents(FRAME_CONTENT); - assertTrue("It is not the connectors.jsp page. ", wr.getText().indexOf("catalina/connectors.jsp") != -1); - - wr = ConnectorUtils.getConnectorPage(wc); - table = utils.getTable(wr, 3); - form = wr.getForms()[0]; - row = utils.getFirstRow(port, table, portColumn).intValue(); - if (row == -1) { - throw new IllegalThreadStateException("There is no row, which contains '" + port - + "' in the 'Port' column. "); - } - rowHttp = utils.getFirstRow(portHttp, table, portColumn).intValue(); - if (rowHttp == -1) { - throw new IllegalThreadStateException("There is no row, which contains '" + portHttp - + "' in the 'Port' column. "); - } - assertEquals("There is no the correct number of connectors. ", 3, table.getRowCount()); - assertTrue("There is no remove button. ", wr.getText().indexOf("'remove'") != -1); - assertEquals("There is no the correct number of parameters in the form. ", 2, - form.getParameterNames().length); - assertTrue("There is a checkbox for " + port + "port. ", table.getTableCell(row, 0).getElementsWithName( - "selectedItems").length == 0); - assertEquals("There is no checkbox for " + portHttp + "port. ", 1, table.getTableCell(rowHttp, 0) - .getElementsWithName("selectedItems").length); - assertEquals("The connector address is not null. ", "", table.getTableCell(rowHttp, addressColumn) - .getText()); - assertEquals("The connector type is not 'HTTP'. ", "HTTP", table.getTableCell(rowHttp, typeColumn) - .getText()); - testUrl = "http://localhost:" + portHttp + "/jonasAdmin/"; - wr = wc2.getResponse(testUrl); - assertEquals("A code of 200 (success) should be returned. ", HTTP_SUCCESS_CODE, wr.getResponseCode()); - - portHttps = ConnectorUtils.createNewConnector(wc, "https"); - // Verify - wr = ConnectorUtils.getConnectorPage(wc); - table = utils.getTable(wr, 3); - form = wr.getForms()[0]; - row = utils.getFirstRow(port, table, portColumn).intValue(); - if (row == -1) { - throw new IllegalThreadStateException("There is no row, which contains '" + port - + "' in the 'Port' column. "); - } - rowHttps = utils.getFirstRow(portHttps, table, portColumn).intValue(); - if (rowHttps == -1) { - throw new IllegalThreadStateException("There is no row, which contains '" + portHttps - + "' in the 'Port' column. "); - } - assertEquals("There is no the correct number of connectors. ", 4, table.getRowCount()); - assertTrue("There is no remove button. ", wr.getText().indexOf("'remove'") != -1); - assertEquals("There is no the correct number of parameters in the form. ", 2, - form.getParameterNames().length); - assertEquals("There is no checkbox for " + portHttps + "port. ", 1, table.getTableCell(rowHttps, 0) - .getElementsWithName("selectedItems").length); - assertEquals("The connector address is not null. ", "", table.getTableCell(rowHttps, addressColumn) - .getText()); - assertEquals("The connector type is not 'HTTPS'. ", "HTTPS", table.getTableCell(rowHttps, typeColumn) - .getText()); - - portAjp = ConnectorUtils.createNewConnector(wc, "ajp"); - // Verify - wr = ConnectorUtils.getConnectorPage(wc); - table = utils.getTable(wr, 3); - form = wr.getForms()[0]; - row = utils.getFirstRow(port, table, portColumn).intValue(); - if (row == -1) { - throw new IllegalThreadStateException("There is no row, which contains '" + port - + "' in the 'Port' column. "); - } - rowAjp = utils.getFirstRow(portAjp, table, portColumn).intValue(); - if (rowAjp == -1) { - throw new IllegalThreadStateException("There is no row, which contains '" + portAjp - + "' in the 'Port' column. "); - } - assertEquals("There is no the correct number of connectors. ", 5, table.getRowCount()); - assertTrue("There is no remove button. ", wr.getText().indexOf("'remove'") != -1); - assertEquals("There is no the correct number of parameters in the form. ", 2, - form.getParameterNames().length); - assertEquals("There is no checkbox for " + portAjp + "port. ", 1, table.getTableCell(rowAjp, 0) - .getElementsWithName("selectedItems").length); - assertEquals("The connector address is not null. ", "", table.getTableCell(rowAjp, addressColumn).getText()); - assertEquals("The connector type is not 'AJP'. ", "AJP", table.getTableCell(rowAjp, typeColumn).getText()); - - // 2-Modify connectors - // Get form - wr = ConnectorUtils.getConnectorPage(wc); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_MODIFY_CONNECTOR + portHttp); - if (link != null) { - link.click(); - } else { - throw new IllegalThreadStateException("The link " + URL_JONASADMIN_MODIFY_CONNECTOR + portHttp - + " is not found. "); - } - wr = wc.getFrameContents(FRAME_CONTENT); - - table = utils.getTable(wr, 1); - // Verify - assertTrue("The value of 'Type' row is not 'HTTP'", table.getTableCell(0, 2).getText().indexOf("HTTP") != -1); - assertTrue("The value of 'Scheme' row is not 'http'", table.getTableCell(1, 2).getText().indexOf("http") != -1); - assertTrue("The value of 'Coyote Protocol Handler' row is not 'HTTP/1.1'", table.getTableCell(2, 2).getText().indexOf("HTTP/1.1") != -1); - assertTrue("The value of 'Secure (SSL) Connector' row is not 'false'", table.getTableCell(3, 2).getText().indexOf("false") != -1); - - table = utils.getTable(wr, 4); - // Verify - assertTrue("The value of 'Port Number' row is not '"+ portHttp +"'", table.getTableCell(0, 2).getText().indexOf(portHttp) != -1); - - table = utils.getTable(wr, 10); - - form = wr.getForms()[0]; - ConnectorUtils.modifyHttpConnector(form, acceptCount, maxPostSize, connTimeOut, URIEncoding, bufferSize, address, redirectPort, maxThreads, - minSpareThreads, maxSpareThreads, proxyName, proxyPort, allowTrace, emptySessionPath, enableLookups, useBodyEncodingForURI, xpoweredBy, tcpNoDelay); - - // Verify - // Add Go back to the Editor page - // ------------------------------- - wr = ConnectorUtils.getConnectorPage(wc); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_MODIFY_CONNECTOR + portHttp); - if (link != null) { - link.click(); - } else { - throw new IllegalThreadStateException("The link " + URL_JONASADMIN_MODIFY_CONNECTOR + portHttp - + " is not found. "); - } - wr = wc.getFrameContents(FRAME_CONTENT); - verifyConnector(wr, acceptCount, maxPostSize, connTimeOut, URIEncoding, bufferSize, address, redirectPort, maxThreads, - minSpareThreads, maxSpareThreads, proxyName, proxyPort, allowTrace, emptySessionPath, enableLookups, useBodyEncodingForURI, xpoweredBy, tcpNoDelay); - - // 3-Remove connectors - String[] tabPort = {portHttp, portHttps, portAjp}; - ConnectorUtils.deleteConnectors(wc, tabPort); - // Verify - wr = ConnectorUtils.getConnectorPage(wc); - table = utils.getTable(wr, 3); - assertEquals("The number of connectors is not 1. ", 2, table.getRowCount()); - - // 4-Button 'Save' - wr = wc.getFrameContents(FRAME_CONTENT); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, BUTTON_SAVE); - if (link == null) { - throw new IllegalStateException("No link found for button : '" + BUTTON_SAVE + "'."); - } - wr = link.click(); - assertTrue("It is not the servletServer.jsp page. ", - wr.getText().indexOf("jonasserver/servletServer.jsp") != -1); - } - } - - /** - * Verify value of parameters in connector form - * @param wr the content frame - * @param acceptCountText value of the acceptCountText param - * @param maxPostSizeText value of the maxPostSizeText param - * @param connTimeOutText value of the connTimeOutText param - * @param URIEncoding value of the URIEncoding param - * @param bufferSizeText value of the bufferSizeText param - * @param address value of the address param - * @param redirectPortText value of the redirectPortText param - * @param maxThreadsText value of the maxThreadsText param - * @param minSpareThreadsText value of the minSpareThreadsText param - * @param maxSpareThreadsText value of the maxSpareThreadsText param - * @param proxyName value of the proxyName param - * @param proxyPortText value of the proxyPortText param - * @param allowTrace value of the allowTrace param - * @param emptySessionPath value of the emptySessionPath param - * @param enableLookups value of the enableLookups param - * @param useBodyEncodingForURI value of the useBodyEncodingForURI param - * @param xpoweredBy value of the xpoweredBy param - * @param tcpNoDelay value of the tcpNoDelay param - * @throws SAXException if there is not a form. - */ - private void verifyConnector(WebResponse wr, String acceptCountText, - String maxPostSizeText, String connTimeOutText, String URIEncoding, String bufferSizeText, String address, - String redirectPortText, String maxThreadsText, String minSpareThreadsText, String maxSpareThreadsText, - String proxyName, String proxyPortText, String allowTrace, String emptySessionPath, String enableLookups, - String useBodyEncodingForURI, String xpoweredBy, String tcpNoDelay) throws SAXException { - WebForm form = wr.getForms()[0]; - assertEquals("Accept count value is not " + acceptCountText + ". ", acceptCountText, form.getParameterValue("acceptCountText")); - assertEquals("Max Bytes in a Post value is not " + maxPostSizeText + ". ", maxPostSizeText, form.getParameterValue("maxPostSizeText")); - assertEquals("Connection Timeout value is not " + connTimeOutText + ". ", connTimeOutText, form.getParameterValue("connTimeOutText")); - assertEquals("URI Encoding value is not " + URIEncoding + ". ", URIEncoding, form.getParameterValue("URIEncoding")); - assertEquals("Default Buffer Size value is not " + bufferSizeText + ". ", bufferSizeText, form.getParameterValue("bufferSizeText")); - assertEquals("IP Address value is not " + address + ". ", address, form.getParameterValue("address")); - assertEquals("Redirect Port Number value is not " + redirectPortText + ". ", redirectPortText, form.getParameterValue("redirectPortText")); - assertEquals("Maximum Threads value is not " + maxThreadsText + ". ", maxThreadsText, form.getParameterValue("maxThreadsText")); - assertEquals("Minimum Spare Threads value is not " + minSpareThreadsText + ". ", minSpareThreadsText, form.getParameterValue("minSpareThreadsText")); - assertEquals("Maximum Spare Threads value is not " + maxSpareThreadsText + ". ", maxSpareThreadsText, form.getParameterValue("maxSpareThreadsText")); - assertEquals("Proxy Name value is not " + proxyName + ". ", proxyName, form.getParameterValue("proxyName")); - assertEquals("Proxy Port Number value is not " + proxyPortText + ". ", proxyPortText, form.getParameterValue("proxyPortText")); - assertEquals("Allow Trace value is not " + allowTrace + ". ", allowTrace, form.getParameterValue("allowTrace")); - assertEquals("Empty Session Path value is not " + emptySessionPath + ". ", emptySessionPath, form.getParameterValue("emptySessionPath")); - assertEquals("Enable DNS Lookups value is not " + enableLookups + ". ", enableLookups, form.getParameterValue("enableLookups")); - assertEquals("Use Body Encoding for URI value is not " + useBodyEncodingForURI + ". ", useBodyEncodingForURI, form.getParameterValue("useBodyEncodingForURI")); - assertEquals("X-Powered-By Generation Enabled value is not " + xpoweredBy + ". ", xpoweredBy, form.getParameterValue("xpoweredBy")); - assertEquals("Should we use TCP no delay value is not " + tcpNoDelay + ". ", tcpNoDelay, form.getParameterValue("tcpNoDelay")); - } - - /** - * Tear Down - * cleanUp action: remove all connectors except default port connector - */ - public void tearDown() throws Exception { - MBeanServerConnection server = getMBeanServer(); - ObjectName on = ObjectName.getInstance("jonas:type=Connector,*"); - - Iterator connectorList = server.queryNames(on, null).iterator(); - - while (connectorList.hasNext()) { - ObjectName connectorON = (ObjectName) connectorList.next(); - String connectorPort = connectorON.getKeyProperty("port"); - if (!connectorPort.equals(port)) { - server.invoke(connectorON, "destroy", new Object[] {}, new String[] {}); - } - } - super.tearDown(); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/deploy/C_JonasAdminDeploy.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/deploy/C_JonasAdminDeploy.java deleted file mode 100755 index abd0121ebffb1344db351abb4ffc3e156c9a9d01..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/deploy/C_JonasAdminDeploy.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.deploy; - -import junit.framework.Test; -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; - -/** - * Define a class to test deploy in jonasAdmin - * Test : - deploy - * - * @author Paul Kemler - */ -public class C_JonasAdminDeploy extends JonasAdminTestCase { - - /** - * Constructor with a specified name - * @param name the name - */ - public C_JonasAdminDeploy(String name) { - super(name); - } - - /** - * Get a new TestSuite for this class - * It includes all jonasAdmin tests - * @return a new TestSuite for this class - */ - public static Test suite() { - TestSuite suite = new TestSuite(); - suite.addTest(F_JonasAdminDeploy.suite()); - suite.addTest(F_JonasAdminDeployWar.suite()); - suite.addTest(F_JonasAdminDeployRar.suite()); - suite.addTest(F_JonasAdminDeployJar.suite()); - return suite; - } - - /** - * Main method - * @param args the arguments - */ - public static void main (String[] args) { - junit.textui.TestRunner.run(suite()); - } -} - diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/deploy/F_JonasAdminDeploy.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/deploy/F_JonasAdminDeploy.java deleted file mode 100644 index c826e1c6a4ddf525bdc58deba0e6086d1460eceb..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/deploy/F_JonasAdminDeploy.java +++ /dev/null @@ -1,291 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.deploy; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; - -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.TableCell; -import com.meterware.httpunit.WebForm; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - -/** - * Define a class to test the JOnAS Admin console - * Test authentication and deploy/undeploy ears - * @author Florent Benoit - */ -public class F_JonasAdminDeploy extends JonasAdminTestCase { - - /** - * number of tabs when you are in the deployment tabs - */ - private static final int NUMBER_OF_TABS_FOR_DEPLOY = 3; - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminDeploy(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminDeploy.class); - } - - /** - * Setup need for these tests - * jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - } - } - } - - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminDeploy(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Try to authenticate with a bad login/password - * @throws Exception if an error occurs - */ - public void testTryBadAuth() throws Exception { - // login to jonas admin - WebResponse wRes = JonasAdminAuth.doAuth(wc, url, "bad", "bad"); - String txt = wRes.getText(); - - if (txt.indexOf("Invalid username or password") == -1) { - fail("The login/password bad/bad can't be a valid l/p."); - } - } - - /** - * Try to authenticate with a right login/password - * @throws Exception if an error occurs - */ - public void testTryWithGoodAuth() throws Exception { - WebResponse wRes = JonasAdminAuth.doValidAuth(wc, url); - String txt = wRes.getText(); - - if (txt.indexOf("Invalid username or password") != -1) { - fail("The login/password jadmin/jonas must be valid."); - } - } - - /** - * Return the text of the deployed table or the deployable table - * @param wr the WebResponse to use - * @param deployed if true return the text deployed table, if false text of deployable - * @return the text of the deployed table or the deployable table - * @throws Exception if an error occurs - */ - private String getDeployTable(WebResponse wr, boolean deployed) throws Exception { - - //Extract right table - WebTable bigTable = wr.getTables()[0]; - WebTable firstTable = bigTable.getTableCell(1, 0).getTables()[0]; - WebTable cellTable = firstTable.getTableCell(0, 0).getTables()[0]; - WebTable subTable = cellTable.getTableCell(0, 0).getTables()[0]; - - TableCell deployableCell = subTable.getTableCell(1, 0); - TableCell deployedCell = subTable.getTableCell(1, 2); - - if (deployed) { - return deployedCell.getText(); - } else { - return deployableCell.getText(); - } - } - - - /** - * Deploy the ear with the testcase method and then, try to undeploy the ear with jonaAdmin - * If it was undeployed, deploy it again with jonasAdmin - * @param name of the ear (without extension) to test - * @throws Exception if an error occurs - */ - private void unDeployAndDeployEar(String name) throws Exception { - String fileName = name + ".ear"; - String url = URL_JONASADMIN_DEPLOYEAR; - - //First load Ear - useEar(name); - - WebResponse wr = wc.getResponse(getAbsoluteUrl(url)); - - String txt = getDeployTable(wr, true); - - if (txt.indexOf(fileName) == -1) { - fail("The file" + fileName + " was not found as deployed."); - } - - WebForm[] webForms = wr.getForms(); - WebForm webForm = webForms[0]; - - String params = webForm.getParameterValue("undeploy"); - WebForm.Scriptable script = webForm.getScriptableObject(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - - if (params.length() == 0) { - params += fileName; - } else { - params += "," + fileName; - } - - script.setParameterValue("undeploy", params); - - WebResponse submitUndeploy = webForm.submit(); - - // ear is in the table - webForms = submitUndeploy.getForms(); - webForm = webForms[0]; - - WebResponse endResp = webForm.submit(); - - - wr = wc.getResponse(getAbsoluteUrl(url)); - txt = getDeployTable(wr, true); - - if (txt.indexOf(fileName) != -1) { - fail("The jonasAdmin webApp has not removed. " + fileName); - } - - //now deploy - webForms = wr.getForms(); - webForm = webForms[0]; - - params = webForm.getParameterValue("deploy"); - script = webForm.getScriptableObject(); - - if (params.length() == 0) { - params += fileName; - } else { - params += "," + fileName; - } - - script.setParameterValue("deploy", params); - - submitUndeploy = webForm.submit(); - - // ear is in the table - webForms = submitUndeploy.getForms(); - webForm = webForms[0]; - - endResp = webForm.submit(); - - wr = wc.getResponse(getAbsoluteUrl(url)); - txt = getDeployTable(wr, true); - - if (txt.indexOf(fileName) == -1) { - fail("The file " + fileName + " was not found as deployed."); - } - } - - /** - * Deploy the ear with the testcase method and then, try to undeploy the ear with jonaAdmin - * If it was undeployed, deploy it again with jonasAdmin - * Test with ears alarm cmp2 and earsample - * @throws Exception if an error occurs - */ - public void testTryDeployUndeployEars() throws Exception { - // login to jonas admin - if (wc.getCurrentPage().getURL() == null) { - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - - unDeployAndDeployEar("alarm"); - unDeployAndDeployEar("cmp2"); - if (jProp.isResource()) { - unDeployAndDeployEar("earsample"); - } - } - - /** - * Tear Down cleanUp action - * @throws Exception if an error occurs - */ - public void tearDown() throws Exception { - super.tearDown(); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/deploy/F_JonasAdminDeployJar.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/deploy/F_JonasAdminDeployJar.java deleted file mode 100755 index df34fb2ddcbbd675daa7d794a6b55c03742188bc..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/deploy/F_JonasAdminDeployJar.java +++ /dev/null @@ -1,338 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.deploy; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminUtils; - -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.SubmitButton; -import com.meterware.httpunit.TableCell; -import com.meterware.httpunit.WebForm; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - -/** - * Class for testing deploy/undeploy Jars - * @author Paul Kemler - */ -public class F_JonasAdminDeployJar extends JonasAdminTestCase { - - /** - * URL of the deployment of Jars - */ - protected static final String URL_JONASADMIN_DEPLOYJAR = "EditDeploy.do?type=jar"; - - /** - * URL of the deployment - */ - protected static final String URL_JONASADMIN_DEPLOY = "EditDeploy.do"; - - /** - * URL of UPLOAD - */ - protected static final String URL_JONASADMIN_UPLOAD = "EditUpload.do"; - - /** - * URL of REMOVE - */ - protected static final String URL_JONASADMIN_REMOVE = "EditRemove.do"; - - /** - * number of tabs when you are in the deployment tabs - */ - private static final int NUMBER_OF_TABS_FOR_DEPLOYMENT = 3; - - /** - * number of tabs when you are in the CONFIRM tabs - */ - private static final int NUMBER_OF_TABS_FOR_CONFIRM = 4; - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminDeployJar(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminDeployJar(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminDeployJar.class); - } - - /** - * Setup need for these tests jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - } - - /** - * Return the text of the deployed table or the deployable table - * @param wr the WebResponse to use - * @param deployed if true return the text deployed table, if false text of - * deployable - * @return the text of the deployed table or the deployable table - * @throws Exception if an error occurs - */ - private String getDeployTable(WebResponse wr, boolean deployed) throws Exception { - - // Extract right table - JonasAdminUtils utils = new JonasAdminUtils(); - WebTable table = utils.getTable(wr, 0); - - TableCell deployableCell = table.getTableCell(1, 0); - TableCell deployedCell = table.getTableCell(1, 2); - - if (deployed) { - return deployedCell.getText(); - } else { - return deployableCell.getText(); - } - } - - /** - * Deploy the war with the testcase method and then, try to undeploy the jar - * with jonaAdmin If it was undeployed, deploy it again with jonasAdmin Test - * with jar newsamplemdb.jar - * @throws Exception if an error occurs - */ - public void testTryDeployUndeployJars() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - int selectedTab; - /* - * To get some utils for WebTable - */ - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - // First load War - String name = "samplemdb"; - String fileName = name + ".jar"; - useBeans(name); - - // Go to Deployment/WebModules - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_DEPLOYJAR); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 1; - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_DEPLOYMENT, selectedTab, "Problem in 'Deployment' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_UPLOAD + " is not found in the second tab. ", tabTable.getTableCell(0, - 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_UPLOAD)); - assertTrue("The link " + URL_JONASADMIN_REMOVE + " is not found in the third tab. ", tabTable - .getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_REMOVE)); - - String txt = getDeployTable(wr, true); - - if (txt.indexOf(fileName) == -1) { - fail("The file" + fileName + " was not found as deployed."); - } - - // Undeploy - WebForm[] webForms = wr.getForms(); - WebForm webForm = webForms[0]; - - String params = webForm.getParameterValue("undeploy"); - WebForm.Scriptable script = webForm.getScriptableObject(); - if (params.length() == 0) { - params += fileName; - } else { - params += "," + fileName; - } - script.setParameterValue("undeploy", params); - - SubmitButton button = webForm.getSubmitButtons()[0]; - button.click(); - - // Confirm - WebResponse submitUndeploy = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 2; - - // Verify tabs - tabTable = utils.getTabTable(submitUndeploy); - testTabs(tabTable, NUMBER_OF_TABS_FOR_CONFIRM, selectedTab, "Problem in 'Confirm' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_DEPLOY + " is not found in the first tab. ", tabTable.getTableCell(0, - 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_DEPLOY)); - assertTrue("The link " + URL_JONASADMIN_UPLOAD + " is not found in the third tab. ", tabTable.getTableCell(0, - 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_UPLOAD)); - assertTrue("The link " + URL_JONASADMIN_REMOVE + " is not found in the fourth tab. ", tabTable - .getTableCell(0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_REMOVE)); - - webForms = submitUndeploy.getForms(); - webForm = webForms[0]; - - button = webForm.getSubmitButtons()[0]; - button.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_CONFIRM, selectedTab, "Problem in 'Result' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_DEPLOY + " is not found in the first tab. ", tabTable.getTableCell(0, - 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_DEPLOY)); - assertTrue("The link " + URL_JONASADMIN_UPLOAD + " is not found in the third tab. ", tabTable.getTableCell(0, - 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_UPLOAD)); - assertTrue("The link " + URL_JONASADMIN_REMOVE + " is not found in the fourth tab. ", tabTable - .getTableCell(0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_REMOVE)); - - // Go back to Deployment - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_DEPLOY); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 1; - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_DEPLOYMENT, selectedTab, "Problem in 'Deployment' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_UPLOAD + " is not found in the second tab. ", tabTable.getTableCell(0, - 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_UPLOAD)); - assertTrue("The link " + URL_JONASADMIN_REMOVE + " is not found in the third tab. ", tabTable - .getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_REMOVE)); - - - txt = getDeployTable(wr, true); - - if (txt.indexOf(fileName) != -1) { - fail("The jonasAdmin webApp has not removed. " + fileName); - } - - // now deploy - webForms = wr.getForms(); - webForm = webForms[0]; - - params = webForm.getParameterValue("deploy"); - script = webForm.getScriptableObject(); - - if (params.length() == 0) { - params += fileName; - } else { - params += "," + fileName; - } - - script.setParameterValue("deploy", params); - button = webForm.getSubmitButtons()[0]; - button.click(); - - // Confirm - submitUndeploy = wc.getFrameContents(FRAME_CONTENT); - // war is in the table - webForms = submitUndeploy.getForms(); - webForm = webForms[0]; - - button = webForm.getSubmitButtons()[0]; - button.click(); - - // Go back to Deployment - wr = wc.getFrameContents(FRAME_CONTENT); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_DEPLOY); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - txt = getDeployTable(wr, true); - - if (txt.indexOf(fileName) == -1) { - fail("The file " + fileName + " was not found as deployed."); - } - } - - /** - * Tear Down cleanUp action - * @throws Exception if an error occurs - */ - public void tearDown() throws Exception { - super.tearDown(); - } - -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/deploy/F_JonasAdminDeployRar.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/deploy/F_JonasAdminDeployRar.java deleted file mode 100755 index e7ee46a1219de495ad24c6f92f40abe6874c72fa..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/deploy/F_JonasAdminDeployRar.java +++ /dev/null @@ -1,342 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.deploy; - -import java.io.File; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminUtils; - -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.SubmitButton; -import com.meterware.httpunit.TableCell; -import com.meterware.httpunit.WebForm; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - -/** - * Class for testing deploy/undeploy rars - * @author Paul Kemler - */ -public class F_JonasAdminDeployRar extends JonasAdminTestCase { - - /** - * URL of the deployment of RARs - */ - protected static final String URL_JONASADMIN_DEPLOYRAR = "EditDeploy.do?type=rar"; - - /** - * URL of the deployment - */ - protected static final String URL_JONASADMIN_DEPLOY = "EditDeploy.do"; - - /** - * URL of UPLOAD - */ - protected static final String URL_JONASADMIN_UPLOAD = "EditUpload.do"; - - /** - * URL of REMOVE - */ - protected static final String URL_JONASADMIN_REMOVE = "EditRemove.do"; - - /** - * number of tabs when you are in the deployment tabs - */ - private static final int NUMBER_OF_TABS_FOR_DEPLOYMENT = 4; - - /** - * number of tabs when you are in the CONFIRM tabs - */ - private static final int NUMBER_OF_TABS_FOR_CONFIRM = 5; - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminDeployRar(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminDeployRar(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminDeployRar.class); - } - - /** - * Setup need for these tests jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - } - - /** - * Return the text of the deployed table or the deployable table - * @param wr the WebResponse to use - * @param deployed if true return the text deployed table, if false text of - * deployable - * @return the text of the deployed table or the deployable table - * @throws Exception if an error occurs - */ - private String getDeployTable(WebResponse wr, boolean deployed) throws Exception { - - // Extract right table - JonasAdminUtils utils = new JonasAdminUtils(); - WebTable table = utils.getTable(wr, 0); - - TableCell deployableCell = table.getTableCell(1, 0); - TableCell deployedCell = table.getTableCell(1, 2); - - if (deployed) { - return deployedCell.getText(); - } else { - return deployableCell.getText(); - } - } - - /** - * Deploy the war with the testcase method and then, try to undeploy the rar - * with jonaAdmin If it was undeployed, deploy it again with jonasAdmin Test - * with rar ErsatzEIS.rar - * @throws Exception if an error occurs - */ - public void testTryDeployUndeployRars() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - int selectedTab; - /* - * To get some utils for WebTable - */ - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - if (jProp.isResource()) { - // First load Rar - String name = "autoload" + File.separator + "ErsatzEIS"; - String fileName = name + ".rar"; - useRar(name); - - // Go to Deployment/RarModules - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_DEPLOYRAR); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 1; - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_DEPLOYMENT, selectedTab, "Problem in 'Deployment' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_UPLOAD + " is not found in the second tab. ", tabTable.getTableCell(0, - 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_UPLOAD)); - assertTrue("The link " + URL_JONASADMIN_REMOVE + " is not found in the third tab. ", tabTable - .getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_REMOVE)); - - String txt = getDeployTable(wr, true); - - if (txt.indexOf(fileName) == -1) { - fail("The file" + fileName + " was not found as deployed."); - } - - // Undeploy - WebForm[] webForms = wr.getForms(); - WebForm webForm = webForms[0]; - - String params = webForm.getParameterValue("undeploy"); - WebForm.Scriptable script = webForm.getScriptableObject(); - if (params.length() == 0) { - params += fileName; - } else { - params += "," + fileName; - } - script.setParameterValue("undeploy", params); - - SubmitButton button = webForm.getSubmitButtons()[0]; - button.click(); - - // Confirm - WebResponse submitUndeploy = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 2; - - // Verify tabs - tabTable = utils.getTabTable(submitUndeploy); - testTabs(tabTable, NUMBER_OF_TABS_FOR_CONFIRM, selectedTab, "Problem in 'Confirm' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_DEPLOY + " is not found in the first tab. ", tabTable.getTableCell(0, - 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_DEPLOY)); - assertTrue("The link " + URL_JONASADMIN_UPLOAD + " is not found in the third tab. ", tabTable.getTableCell(0, - 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_UPLOAD)); - assertTrue("The link " + URL_JONASADMIN_REMOVE + " is not found in the fourth tab. ", tabTable - .getTableCell(0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_REMOVE)); - - webForms = submitUndeploy.getForms(); - webForm = webForms[0]; - - button = webForm.getSubmitButtons()[0]; - button.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_CONFIRM, selectedTab, "Problem in 'Result' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_DEPLOY + " is not found in the first tab. ", tabTable.getTableCell(0, - 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_DEPLOY)); - assertTrue("The link " + URL_JONASADMIN_UPLOAD + " is not found in the third tab. ", tabTable.getTableCell(0, - 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_UPLOAD)); - assertTrue("The link " + URL_JONASADMIN_REMOVE + " is not found in the fourth tab. ", tabTable - .getTableCell(0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_REMOVE)); - - // Go back to Deployment - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_DEPLOY); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 1; - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_DEPLOYMENT, selectedTab, "Problem in 'Deployment' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_UPLOAD + " is not found in the second tab. ", tabTable.getTableCell(0, - 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_UPLOAD)); - assertTrue("The link " + URL_JONASADMIN_REMOVE + " is not found in the third tab. ", tabTable - .getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_REMOVE)); - - - txt = getDeployTable(wr, true); - - if (txt.indexOf(fileName) != -1) { - fail("The jonasAdmin webApp has not removed. " + fileName); - } - - // now deploy - webForms = wr.getForms(); - webForm = webForms[0]; - - params = webForm.getParameterValue("deploy"); - script = webForm.getScriptableObject(); - - if (params.length() == 0) { - params += fileName; - } else { - params += "," + fileName; - } - - script.setParameterValue("deploy", params); - button = webForm.getSubmitButtons()[0]; - button.click(); - - // Confirm - submitUndeploy = wc.getFrameContents(FRAME_CONTENT); - // war is in the table - webForms = submitUndeploy.getForms(); - webForm = webForms[0]; - - button = webForm.getSubmitButtons()[0]; - button.click(); - - // Go back to Deployment - wr = wc.getFrameContents(FRAME_CONTENT); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_DEPLOY); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - txt = getDeployTable(wr, true); - - if (txt.indexOf(fileName) == -1) { - fail("The file " + fileName + " was not found as deployed."); - } - } - } - - /** - * Tear Down cleanUp action - * @throws Exception if an error occurs - */ - public void tearDown() throws Exception { - super.tearDown(); - } - -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/deploy/F_JonasAdminDeployWar.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/deploy/F_JonasAdminDeployWar.java deleted file mode 100755 index 1c54a1f41ae0217e1ee19c2596355284e3452b6d..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/deploy/F_JonasAdminDeployWar.java +++ /dev/null @@ -1,340 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.deploy; - -import java.io.File; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminUtils; - -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.SubmitButton; -import com.meterware.httpunit.TableCell; -import com.meterware.httpunit.WebForm; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - -/** - * Class for testing deploy/undeploy wars - * @author Paul Kemler - */ -public class F_JonasAdminDeployWar extends JonasAdminTestCase { - - /** - * URL of the deployment of WARs - */ - protected static final String URL_JONASADMIN_DEPLOYWAR = "EditDeploy.do?type=war"; - - /** - * URL of the deployment - */ - protected static final String URL_JONASADMIN_DEPLOY = "EditDeploy.do"; - - /** - * URL of UPLOAD - */ - protected static final String URL_JONASADMIN_UPLOAD = "EditUpload.do"; - - /** - * URL of REMOVE - */ - protected static final String URL_JONASADMIN_REMOVE = "EditRemove.do"; - - /** - * number of tabs when you are in the deployment tabs - */ - private static final int NUMBER_OF_TABS_FOR_DEPLOYMENT = 3; - - /** - * number of tabs when you are in the CONFIRM tabs - */ - private static final int NUMBER_OF_TABS_FOR_CONFIRM = 4; - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminDeployWar(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminDeployWar(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminDeployWar.class); - } - - /** - * Setup need for these tests jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - } - - /** - * Return the text of the deployed table or the deployable table - * @param wr the WebResponse to use - * @param deployed if true return the text deployed table, if false text of - * deployable - * @return the text of the deployed table or the deployable table - * @throws Exception if an error occurs - */ - private String getDeployTable(WebResponse wr, boolean deployed) throws Exception { - - // Extract right table - JonasAdminUtils utils = new JonasAdminUtils(); - WebTable table = utils.getTable(wr, 0); - - TableCell deployableCell = table.getTableCell(1, 0); - TableCell deployedCell = table.getTableCell(1, 2); - - if (deployed) { - return deployedCell.getText(); - } else { - return deployableCell.getText(); - } - } - - /** - * Deploy the war with the testcase method and then, try to undeploy the war - * with jonaAdmin If it was undeployed, deploy it again with jonasAdmin Test - * with war autoload/ctxroot.war - * @throws Exception if an error occurs - */ - public void testTryDeployUndeployWars() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - int selectedTab; - /* - * To get some utils for WebTable - */ - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - // First load War - String name = "autoload" + File.separator + "ctxroot"; - String fileName = name + ".war"; - useWar(name); - - // Go to Deployment/WebModules - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_DEPLOYWAR); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 1; - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_DEPLOYMENT, selectedTab, "Problem in 'Deployment' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_UPLOAD + " is not found in the second tab. ", tabTable.getTableCell(0, - 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_UPLOAD)); - assertTrue("The link " + URL_JONASADMIN_REMOVE + " is not found in the third tab. ", tabTable - .getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_REMOVE)); - - String txt = getDeployTable(wr, true); - - if (txt.indexOf(fileName) == -1) { - fail("The file" + fileName + " was not found as deployed."); - } - - // Undeploy - WebForm[] webForms = wr.getForms(); - WebForm webForm = webForms[0]; - - String params = webForm.getParameterValue("undeploy"); - WebForm.Scriptable script = webForm.getScriptableObject(); - if (params.length() == 0) { - params += fileName; - } else { - params += "," + fileName; - } - script.setParameterValue("undeploy", params); - - SubmitButton button = webForm.getSubmitButtons()[0]; - button.click(); - - // Confirm - WebResponse submitUndeploy = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 2; - - // Verify tabs - tabTable = utils.getTabTable(submitUndeploy); - testTabs(tabTable, NUMBER_OF_TABS_FOR_CONFIRM, selectedTab, "Problem in 'Confirm' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_DEPLOY + " is not found in the first tab. ", tabTable.getTableCell(0, - 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_DEPLOY)); - assertTrue("The link " + URL_JONASADMIN_UPLOAD + " is not found in the third tab. ", tabTable.getTableCell(0, - 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_UPLOAD)); - assertTrue("The link " + URL_JONASADMIN_REMOVE + " is not found in the fourth tab. ", tabTable - .getTableCell(0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_REMOVE)); - - webForms = submitUndeploy.getForms(); - webForm = webForms[0]; - - button = webForm.getSubmitButtons()[0]; - button.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_CONFIRM, selectedTab, "Problem in 'Result' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_DEPLOY + " is not found in the first tab. ", tabTable.getTableCell(0, - 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_DEPLOY)); - assertTrue("The link " + URL_JONASADMIN_UPLOAD + " is not found in the third tab. ", tabTable.getTableCell(0, - 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_UPLOAD)); - assertTrue("The link " + URL_JONASADMIN_REMOVE + " is not found in the fourth tab. ", tabTable - .getTableCell(0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_REMOVE)); - - // Go back to Deployment - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_DEPLOY); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 1; - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_DEPLOYMENT, selectedTab, "Problem in 'Deployment' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_UPLOAD + " is not found in the second tab. ", tabTable.getTableCell(0, - 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_UPLOAD)); - assertTrue("The link " + URL_JONASADMIN_REMOVE + " is not found in the third tab. ", tabTable - .getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_REMOVE)); - - - txt = getDeployTable(wr, true); - - if (txt.indexOf(fileName) != -1) { - fail("The jonasAdmin webApp has not removed. " + fileName); - } - - // now deploy - webForms = wr.getForms(); - webForm = webForms[0]; - - params = webForm.getParameterValue("deploy"); - script = webForm.getScriptableObject(); - - if (params.length() == 0) { - params += fileName; - } else { - params += "," + fileName; - } - - script.setParameterValue("deploy", params); - button = webForm.getSubmitButtons()[0]; - button.click(); - - // Confirm - submitUndeploy = wc.getFrameContents(FRAME_CONTENT); - // war is in the table - webForms = submitUndeploy.getForms(); - webForm = webForms[0]; - - button = webForm.getSubmitButtons()[0]; - button.click(); - - // Go back to Deployment - wr = wc.getFrameContents(FRAME_CONTENT); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_DEPLOY); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - txt = getDeployTable(wr, true); - - if (txt.indexOf(fileName) == -1) { - fail("The file " + fileName + " was not found as deployed."); - } - } - - /** - * Tear Down cleanUp action - * @throws Exception if an error occurs - */ - public void tearDown() throws Exception { - super.tearDown(); - } - -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/domain/C_JonasAdminDomain.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/domain/C_JonasAdminDomain.java deleted file mode 100755 index a66d428029f47a22513d0973db8eace33e810342..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/domain/C_JonasAdminDomain.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.domain; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; - -import com.meterware.httpunit.WebConversation; - -import junit.framework.Test; -import junit.framework.TestSuite; - -/** - * Define a class to test domain in jonasAdmin - * Test : - domain - * - * @author Paul Kemler - */ -public class C_JonasAdminDomain extends JonasAdminTestCase { - - /** - * Constructor with a specified name - * @param name the name - */ - public C_JonasAdminDomain(String name) { - super(name); - } - - /** - * Get a new TestSuite for this class - * It includes all jonasAdmin tests - * @return a new TestSuite for this class - */ - public static Test suite() { - TestSuite suite = new TestSuite(); - suite.addTest(F_JonasAdminDomain.suite()); - suite.addTest(F_JonasAdminDomainAddServer.suite()); - return suite; - } - - /** - * Main method - * @param args the arguments - */ - public static void main (String[] args) { - WebConversation wc = new WebConversation(); - junit.textui.TestRunner.run(suite()); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/domain/F_JonasAdminDomain.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/domain/F_JonasAdminDomain.java deleted file mode 100644 index 71ae4d4cb521e3d3e1fff4dfbef731ced35f5e4c..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/domain/F_JonasAdminDomain.java +++ /dev/null @@ -1,451 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.domain; - - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminUtils; -import org.xml.sax.SAXException; - -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.HttpUnitUtils; -import com.meterware.httpunit.TableCell; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - -/** - * Define a class to add useful methods for test the examples - * - Execute the EditDomainAction - * @author Paul Kemler - */ -public class F_JonasAdminDomain extends JonasAdminTestCase { - /** - * default domain name - */ - private static final String DOMAIN_NAME = "jonas"; - /** - * default server name - */ - private static final String SERVER_NAME = "jonas"; - /** - * default jonas domain description in domain.xml - */ - private static final String DESCRIPTION = "A domain named jonas"; - /** - * - */ - private static final String TITLE_OTHERSERVERS = "Servers in domain"; - /** - * Domain type set to domainForm by EditDomainAction - */ - private static final String TITLE_DOMAIN = "Domain"; - /** - * label.domain.properties - */ - private static final String TITLE_PROPERTIES = "properties"; - /** - * label.domain.servers - */ - private static final String TITLE_SERVERS = "Servers in domain"; - /** - * message.domain.servers.none - */ - private static final String MESSAGE_NO_SERVERS = "No other server in this domain!"; - /** - * label.domain.clusters - */ - private static final String TITLE_CLUSTERS = "Clusters"; - /** - * message.domain.clusters.none - */ - private static final String MESSAGE_NO_CLUSTERS = "No clusters in this domain!"; - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminDomain(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminDomain.class); - } - - /** - * Setup need for these tests - * jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - } - - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminDomain(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Verify if it is the good link of the tree which is selected - * @param wr The WebResponse of the 'tree' frame - * @param name A string with the name of the link - * @return a boolean. True if the name is found in the link, else false. - */ - private boolean treeControlSelected (WebResponse wr, String name) { - boolean isSelected = false; // the result - int nbSelectedLink = 0; // number of selected link - String attribut; // value of class attribut - - // Get all links - WebLink[] links; - try { - links = wr.getLinks(); - - // Search links with the 'tree-control-selected' class attribut - // and increase nbSelectedLink - for (int i = 0; i < links.length; i++) { - attribut = links[i].getAttribute("class"); - if (attribut.indexOf("tree-control-selected") != -1) { - nbSelectedLink++; - } - } - - if (nbSelectedLink == 1) { - WebLink link = wr.getLinkWith(name); - String content = link.getAttribute("class"); - if (content.indexOf("tree-control-selected") != -1) { - isSelected = true; - } - } - } catch (SAXException e) { - fail("No link was found. " + e); - } - - return isSelected; - } - - - /** - * Test Succesful Select - * @throws Exception if it fails - * - */ - public void testSuccessfulSelect() throws Exception { - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - - // Get the frame "tree" - WebResponse treeFrame = wc.getFrameContents(FRAME_TREE); - - // Create a request - WebLink link = treeFrame.getLinkWith("Domain"); - link.click(); - - // Get the frame "tree" - treeFrame = wc.getFrameContents(FRAME_TREE); - - // Verify if the attribut class that values "tree-control-selected" - // it is in a link with "Domain" - if (!treeControlSelected(treeFrame, "Domain")) { - fail("Domain is not selected in the tree."); - } - - // Create a new request for going to another page - link = treeFrame.getLinkWith("Services"); - link.click(); - - // Get the frame "tree" - treeFrame = wc.getFrameContents(FRAME_TREE); - - // Verify if the attribut class that values "tree-control-selected" - // it is NOT in a link with "Domain" - if (treeControlSelected(treeFrame, "Domain")) { - fail("Domain is selected in the tree."); - } - - - // Create a new request for going to another page - link = treeFrame.getLinkWith("Domain"); - link.click(); - - // Get the frame "tree" - treeFrame = wc.getFrameContents(FRAME_TREE); - - // Verify if the attribut class that values "tree-control-selected" - // it is in a link with "Domain" - if (!treeControlSelected(treeFrame, "Domain")) { - fail("Domain is not selected in the tree."); - } - - } - - /** - * Test Succesful Master Server Link - * @throws Exception if it fails - * - */ - public void testSuccesfulServerLink() throws Exception { - - // The expected link - String expectedLink = URL_JONASADMIN + "EditJonasServer.do?select=jonas:j2eeType=J2EEServer,name=jonas"; - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - - // Get the frame "tree" - WebResponse treeFrame = wc.getFrameContents(FRAME_TREE); - - // Create a request - WebLink link = treeFrame.getLinkWith("Domain"); - link.click(); - - // Get the response - WebResponse wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify the link to the JonasAdmin's server (the master) - link = wr.getLinks()[0]; - String actualLink = link.getAttribute("href"); - actualLink = HttpUnitUtils.decode(actualLink); - assertEquals("The link of the JonasAdmin's server is wrong.", expectedLink, actualLink); - } - - /** - * Test if Domain presentation is correct - * @throws Exception if it fails - * - */ - public void testDomainProperties() throws Exception { - JonasAdminUtils utils = new JonasAdminUtils(); - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - - // Get the frame "tree" - WebResponse treeFrame = wc.getFrameContents(FRAME_TREE); - - // Create a request - WebLink link = treeFrame.getLinkWith("Domain"); - link.click(); - - // Get the response - WebResponse wr = wc.getFrameContents(FRAME_CONTENT); - - // Properties table - // - Title table - - // We are expecting "Domain properties" - WebTable table = utils.getTable(wr, 0); - TableCell cell = table.getTableCell(0, 0); - String text = cell.getText(); - boolean found; - if (text.indexOf(TITLE_DOMAIN) == 0 && text.indexOf(TITLE_PROPERTIES) > 0) { - found = true; - } else { - found = false; - } - assertTrue("Can't find title " + TITLE_DOMAIN + " " + TITLE_PROPERTIES, found); - // - Table content - - table = utils.getTable(wr, 1); - // First row Name jonas - cell = table.getTableCell(0, 0); - String propText = cell.getText(); - // step over 2nd cell conataining   - cell = table.getTableCell(0, 2); - String valuText = cell.getText(); - if (propText.indexOf("Name") >= 0 && valuText.indexOf(DOMAIN_NAME) >= 0) { - found = true; - } else { - found = false; - } - assertTrue("The Name property is not " + DOMAIN_NAME, found); - // Next row - cell = table.getTableCell(1, 0); - propText = cell.getText(); - // step over 2nd cell conataining   - cell = table.getTableCell(1, 2); - valuText = cell.getText(); - if (propText.indexOf("Description") >= 0 && valuText.indexOf(DESCRIPTION) >= 0) { - found = true; - } else { - found = false; - } - assertTrue("The Description property is not " + DESCRIPTION, found); - // Next row - cell = table.getTableCell(2, 0); - propText = cell.getText(); - // step over 2nd cell conataining   - cell = table.getTableCell(2, 2); - valuText = cell.getText(); - if (propText.indexOf("Master server") >= 0 && valuText.indexOf(SERVER_NAME) >= 0) { - found = true; - } else { - found = false; - } - assertTrue("The Master server property is not " + SERVER_NAME, found); - - // Servers table - // - Title table - - // We are expecting "Servers in domain" - table = utils.getTable(wr, 3); - cell = table.getTableCell(0, 0); - text = cell.getText(); - if (text.indexOf(TITLE_SERVERS) >= 0) { - found = true; - } else { - found = false; - } - assertTrue("Can't find title " + TITLE_SERVERS, found); - // - Action zone - table = utils.getTable(wr, 4); - cell = table.getTableCell(0, 0); - text = cell.getText(); - if (text.indexOf("Action") >= 0) { - found = true; - } else { - found = false; - } - assertTrue("Can't find Action zone", found); - // Button zone - table = utils.getTable(wr, 5); - cell = table.getTableCell(0, 0); - WebLink[] links = cell.getLinks(); - if (links.length >= 1) { - found = true; - } else { - found = false; - } - assertTrue("Can't find link in Action zone", found); - // Servers list - table = utils.getTable(wr, 7); - cell = table.getTableCell(0, 0); - text = cell.getText(); - if (text.indexOf(MESSAGE_NO_SERVERS) >= 0) { - found = true; - } else { - found = false; - } - assertTrue("Expecting " + MESSAGE_NO_SERVERS + ", found " + text, found); - - // Clusters table - // - Title table - - // We are expecting "Clusters" - table = utils.getTable(wr, 9); - cell = table.getTableCell(0, 0); - text = cell.getText(); - if (text.indexOf(TITLE_CLUSTERS) >= 0) { - found = true; - } else { - found = false; - } - assertTrue("Can't find title " + TITLE_CLUSTERS, found); - // - Action zone - table = utils.getTable(wr, 10); - cell = table.getTableCell(0, 0); - text = cell.getText(); - if (text.indexOf("Action") >= 0) { - found = true; - } else { - found = false; - } - assertTrue("Can't find Action zone", found); - // Button zone - table = utils.getTable(wr, 11); - cell = table.getTableCell(0, 0); - links = cell.getLinks(); - if (links.length >= 1) { - found = true; - } else { - found = false; - } - assertTrue("Can't find link in Action zone", found); - // Clusters list - table = utils.getTable(wr, 13); - cell = table.getTableCell(0, 0); - text = cell.getText(); - if (text.indexOf(MESSAGE_NO_CLUSTERS) >= 0) { - found = true; - } else { - found = false; - } - assertTrue("Expecting " + MESSAGE_NO_CLUSTERS + ", found " + text, found); - } - - /** - * Tear Down cleanUp action - * @throws Exception if an error occurs - */ - public void tearDown() throws Exception { - super.tearDown(); - } - -} \ No newline at end of file diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/domain/F_JonasAdminDomainAddServer.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/domain/F_JonasAdminDomainAddServer.java deleted file mode 100644 index 6ca19ac10fbfc7091f4ae1a0d98984eabbaf7b8b..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/domain/F_JonasAdminDomainAddServer.java +++ /dev/null @@ -1,223 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.domain; - - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminUtils; - -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.SubmitButton; -import com.meterware.httpunit.TableCell; -import com.meterware.httpunit.WebForm; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - -/** - * Test adding a server to the domain. - * @author Adriana Danes - */ -public class F_JonasAdminDomainAddServer extends JonasAdminTestCase { - /** - * message.domain.servers.none - */ - private static final String MESSAGE_NO_SERVERS = "No other server in this domain!"; - /** - * URL of "Create Jms Destination" - */ - private static final String URL_DOMAIN_ADD_SERVER = "CreateJonasServer.do"; - /** - * - */ - private static final String APPLY_SERVERS_CONFIRM = "ApplyJonasServersConfirm.do"; - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminDomainAddServer(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminDomainAddServer.class); - } - - /** - * Setup need for these tests - * jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - } - - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminDomainAddServer(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Test Add server action - * @throws Exception if it fails - * - */ - public void testAddServer() throws Exception { - JonasAdminUtils utils = new JonasAdminUtils(); - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - - // Get the frame "tree" - WebResponse treeFrame = wc.getFrameContents(FRAME_TREE); - - // Create a request and go to the Domain page - WebLink domainLink = treeFrame.getLinkWith("Domain"); - domainLink.click(); - - // Get the response - WebResponse wr = wc.getFrameContents(FRAME_CONTENT); - - // Click to the Add server - WebLink link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_DOMAIN_ADD_SERVER); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - WebForm form = wr.getForms()[0]; - String createdServerName = "j1"; - form.setParameter("serverName", createdServerName); - form.setParameter("serverURL", "url"); - - SubmitButton button = form.getSubmitButtons()[0]; - button.click(); - - // Go back to the Domain page - domainLink.click(); - - // Get the response - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to Servers list - WebTable table = utils.getTable(wr, 7); - // Go to the 2nd column to find the created server name - TableCell cell = table.getTableCell(0, 1); - String actualServerName = cell.getText(); - - assertEquals("The " + createdServerName + " was not found in the Servers list", createdServerName, actualServerName); - - // Remove the added server - WebForm itemsServersForm = wr.getForms()[0]; - SubmitButton[] buttons = itemsServersForm.getSubmitButtons(); - //System.out.println("Nb submit buttons = " + buttons.length); - itemsServersForm.setCheckbox("selectedItems", "jonas:j2eeType=J2EEServer,name=j1", true); - /* - String[] paramNames = itemsServersForm.getParameterNames(); - for (int i = 0; i < paramNames.length; i++) { - System.out.println("- " + paramNames[i]); - }*/ - //itemsServersForm.setParameter("action", "remove"); - buttons[0].click(); - - wr = wc.getFrameContents(FRAME_CONTENT); - table = utils.getTable(wr, 0); - /* - cell = table.getTableCell(0, 0); - text = cell.getText(); - System.out.println("---- " + text);*/ - // Confirm - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, APPLY_SERVERS_CONFIRM); - link.click(); - - // Go to domain page - domainLink.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to Servers list - table = utils.getTable(wr, 7); - cell = table.getTableCell(0, 0); - String text = cell.getText(); - boolean found; - if (text.indexOf(MESSAGE_NO_SERVERS) >= 0) { - found = true; - } else { - found = false; - } - assertTrue("Expecting " + MESSAGE_NO_SERVERS + ", found " + text, found); - } - /** - * Tear Down cleanUp action - * @throws Exception if an error occurs - */ - public void tearDown() throws Exception { - super.tearDown(); - } - -} \ No newline at end of file diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/jonasserver/C_JonasAdminJonasserver.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/jonasserver/C_JonasAdminJonasserver.java deleted file mode 100755 index 9085bb99d065225d124993572d7f7a2872993c53..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/jonasserver/C_JonasAdminJonasserver.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.jonasserver; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; - -import com.meterware.httpunit.WebConversation; - -import junit.framework.Test; -import junit.framework.TestSuite; - -/** - * Define a class to test jonasserver in jonasAdmin - * Test : - jonasserver - * - * @author Paul Kemler - */ -public class C_JonasAdminJonasserver extends JonasAdminTestCase { - - /** - * Constructor with a specified name - * @param name the name - */ - public C_JonasAdminJonasserver(String name) { - super(name); - } - - /** - * Get a new TestSuite for this class - * It includes all jonasAdmin tests - * @return a new TestSuite for this class - */ - public static Test suite() { - TestSuite suite = new TestSuite(); - suite.addTest(F_JonasAdminInfoServer.suite()); - suite.addTest(F_JonasAdminSaveAll.suite()); - return suite; - } - - /** - * Main method - * @param args the arguments - */ - public static void main (String[] args) { - WebConversation wc = new WebConversation(); - junit.textui.TestRunner.run(suite()); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/jonasserver/F_JonasAdminInfoServer.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/jonasserver/F_JonasAdminInfoServer.java deleted file mode 100755 index 8ca4bc5a597389a06f993b8f345000b68dafbedf..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/jonasserver/F_JonasAdminInfoServer.java +++ /dev/null @@ -1,483 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.jonasserver; - -import java.io.IOException; -import java.net.MalformedURLException; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminUtils; -import org.ow2.jonas.Version; -import org.xml.sax.SAXException; - -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.WebConversation; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - -/** - * Class for testing server infos in jonasAdmin - * @author kemlerp - * - */ -public class F_JonasAdminInfoServer extends JonasAdminTestCase { - - /** - * URL of the Server Management - */ - private static final String URL_JONASADMIN_SERVER = "EditJonasServer.do"; - - /** - * URL of the JMX SERVER - */ - private static final String URL_JONASADMIN_JMX_SERVER = "EditJmxServer.do"; - - /** - * URL of the server registry - */ - private static final String URL_JONASADMIN_SERVER_REGISTRY = "ListRegistry.do"; - - /** - * URL of the SERVLET SERVER - */ - private static final String URL_JONASADMIN_SERVLET_SERVER = "EditServletServer.do"; - - /** - * URL of the JVM - */ - private static final String URL_JONASADMIN_JVM = "EditJvm.do"; - - /** - * URL of owner mbeans - */ - private static final String URL_JONASADMIN_OWNER = "/jonasAdmin/ListOwnerMBeans.do"; - - /** - * RMI PROTOCOL - */ - private static final String RMI_PROTOCOL = "rmi/"; - - /** - * Value of select parameter for JVM - */ - private static final String SELECT_JVM_MBEAN = "jonas%3Aj2eeType%3DJVM%2Cname%3Djonas%2CJ2EEServer%3Djonas"; - - /** - * Value of select parameter for MBEAN Server - */ - private static final String SELECT_MBEAN_SERVER_MBEAN = "JMImplementation%3Atype%3DMBeanServerDelegate"; - - /** - * Value of select parameter for Servlet Server - */ - private static final String SELECT_SERVLET_SERVER_MBEAN = "jonas%3Atype%3Dservice%2Cname%3DwebContainers"; - - /** - * Value of select parameter for Catalina Server - */ - private static final String SELECT_CATALINA_SERVER = "Catalina%3Atype%3DServer"; - - /** - * URL of the MBean attributs - */ - private static final String URL_MBEAN_ATTRIBUTS = "/jonasAdmin/ListMBeanAttributes.do?select="; - - /** - * Balise HTML - */ - private static final String END_OF_COLUMN = ""; - - /** - * A 2nd connection to jonasAdmin - */ - private static WebConversation wc2 = new WebConversation(); - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminInfoServer(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminInfoServer(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminInfoServer.class); - } - - /** - * Setup need for these tests - * jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - unUseEar("earsample"); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - } - - /** - * Test JOnAS server infos - * @throws Exception if error occurs - * - */ - public void testInfos() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - String jonasName = null; - String jonasVersion = Version.getNumber(); - String jonasProtocol = RMI_PROTOCOL + jProp.getRegistryProtocol(); - - String mbeanId = null; - String mbeanSpecification = null; - String mbeanSpecVersion = null; - String mbeanSpecVendor = null; - String mbeanImplementation = null; - String mbeanImplVersion = null; - String mbeanImplVendor = null; - - String registryProtocol = jProp.getRegistryProtocol(); - String registryUrl = jProp.getRegistryUrl(); - int jndiNb = 0; - - String servletName = null; - String servletVersion = null; - String servletService = null; - String servletEngine = null; - String servletHost = null; - - String jvmVersion = jProp.getJvmVersion(); - String jvmVendor = jProp.getJvmVendor(); - String jvmNode = null; - - - // OPEN A SECOND CONNECTION - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc2, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - - // TEST JONAS SERVER - // Go to jonas server management - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_SERVER); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Get jonas server name - String text; - text = wr.getText(); - int beginIndex = text.indexOf("Server JOnAS ( "); - int endIndex = text.indexOf(" )", beginIndex); - jonasName = text.substring(beginIndex + "Server JOnAS ( ".length(), endIndex); - - try { - // Get table - table = utils.getTable(wr, 0); - - // Verify - assertEquals("It is not the jonas name. ", jonasName, table.getTableCell(0, 2).getText()); - assertEquals("It is not the jonas version. ", jonasVersion, table.getTableCell(1, 2).getText()); - assertEquals("It is not the jonas protocol. ", jonasProtocol, table.getTableCell(2, 2).getText()); - } catch (SAXException e) { - fail("The jonas table is incorrect."); - } - - - // TEST JMX SERVER - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JMX_SERVER); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - mbeanId = getMBeanAttribut(SELECT_MBEAN_SERVER_MBEAN, "MBeanServerId"); - mbeanSpecification = getMBeanAttribut(SELECT_MBEAN_SERVER_MBEAN, "SpecificationName"); - mbeanSpecVersion = getMBeanAttribut(SELECT_MBEAN_SERVER_MBEAN, "SpecificationVersion"); - mbeanSpecVendor = getMBeanAttribut(SELECT_MBEAN_SERVER_MBEAN, "SpecificationVendor"); - mbeanImplementation = getMBeanAttribut(SELECT_MBEAN_SERVER_MBEAN, "ImplementationName"); - mbeanImplVersion = getMBeanAttribut(SELECT_MBEAN_SERVER_MBEAN, "ImplementationVersion"); - mbeanImplVendor = getMBeanAttribut(SELECT_MBEAN_SERVER_MBEAN, "ImplementationVendor"); - - try { - // Get table - table = utils.getTable(wr, 0); - - // Verify - assertEquals("It is not the mbean server id. ", mbeanId, table.getTableCell(0, 2).getText()); - assertEquals("It is not the mbean server specification name. ", mbeanSpecification, table.getTableCell(1, 2).getText()); - assertEquals("It is not the mbean server specification version. ", mbeanSpecVersion, table.getTableCell(2, 2).getText()); - assertEquals("It is not the mbean server specification vendor. ", mbeanSpecVendor, table.getTableCell(3, 2).getText()); - assertEquals("It is not the mbean server implementation name. ", mbeanImplementation, table.getTableCell(4, 2).getText()); - assertEquals("It is not the mbean server implementation version. ", mbeanImplVersion, table.getTableCell(5, 2).getText()); - assertEquals("It is not the mbean server implementation vendor. ", mbeanImplVendor, table.getTableCell(6, 2).getText()); - } catch (SAXException e) { - fail("The jmx server table is incorrect."); - } - - - // TEST REGISTRY INFOS - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_SERVER_REGISTRY); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - try { - // Get table - table = utils.getTable(wr, 0); - - // Verify - assertEquals("It is not the registry protocol. ", registryProtocol, table.getTableCell(1, 0).getText()); - assertEquals("It is not the registry url. ", registryUrl, table.getTableCell(1, 1).getText()); - } catch (SAXException e) { - fail("The registry table is incorrect."); - } - - try { - //Get table - table = utils.getTable(wr, 3); - int rowNb = table.getRowCount(); - jndiNb = getJndiNb(wr); - text = table.getText(); - - // Verify - if (jndiNb > 0) { - assertEquals("The number of jndi names is not " + jndiNb, rowNb, jndiNb); - } - assertFalse("'EarOpHome' is found. ", text.indexOf("EarOpHome") > -1); - assertFalse("'EarOpHome_L' is found. ", text.indexOf("EarOpHome_L") > -1); - assertFalse("'eisName' is found. ", text.indexOf("eisName") > -1); - } catch (SAXException e) { - fail("The jndi name table is incorrect."); - } - - // Deploy earsample.ear - useEar("earsample"); - - // Refresh - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JVM); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_SERVER_REGISTRY); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - try { - //Get table - table = utils.getTable(wr, 3); - int jndiNb2 = getJndiNb(wr); - text = table.getText(); - - // Verify - if (jProp.isResource()) { - // 3 JNDI NAMES are added: EarOpHome, EarOpHome_L, eisName - assertEquals("The number of JNDI names has not been updated: ", jndiNb + 3, jndiNb2); - assertTrue("'eisName' is not found. ", text.indexOf("eisName") > -1); - } else { - // 2 JNDI NAMES are added: EarOpHome, EarOpHome_L - assertEquals("The number of JNDI names has not been updated: ", jndiNb + 2, jndiNb2); - } - assertTrue("'EarOpHome' is not found. ", text.indexOf("EarOpHome") > -1); - assertTrue("'EarOpHome_L' is not found. ", text.indexOf("EarOpHome_L") > -1); - } catch (SAXException e) { - fail("The jndi name table is incorrect."); - } - - - // TEST SERVLET SERVER - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_SERVLET_SERVER); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - servletName = getMBeanAttribut(SELECT_SERVLET_SERVER_MBEAN, "ServerName"); - servletVersion = getMBeanAttribut(SELECT_SERVLET_SERVER_MBEAN, "ServerVersion"); - // if CATALINA - if (jProp.isCatalina()) { - String selectService = getMBeanAttribut(SELECT_CATALINA_SERVER, "serviceNames"); - if (selectService.indexOf("[ ") == 0) { - if (selectService.indexOf(" ]") == selectService.length()-2) { - selectService = selectService.substring(2, selectService.length()-2); - } else { - selectService = selectService.substring(2); - } - } - servletService = getMBeanAttribut(selectService, "name"); - String selectContainer = getMBeanAttribut(selectService, "containerName"); - servletEngine = getMBeanAttribut(selectContainer, "name"); - servletHost = getMBeanAttribut(selectContainer, "defaultHost"); - } - - try { - // Get table - table = utils.getTable(wr, 0); - - // Verify - assertEquals("It is not the servlet server name. ", servletName, table.getTableCell(0, 2).getText()); - assertEquals("It is not the servlet server version. ", servletVersion, table.getTableCell(1, 2).getText()); - if (jProp.isCatalina()) { - assertEquals("It is not the servlet server service. ", servletService, table.getTableCell(2, 2).getText()); - assertEquals("It is not the servlet server engine. ", servletEngine, table.getTableCell(3, 2).getText()); - assertEquals("It is not the servlet server host. ", servletHost, table.getTableCell(4, 2).getText()); - } - } catch (SAXException e) { - fail("The jmx server table is incorrect."); - } - - - // TEST JVM INFOS - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JVM); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - jvmNode = getMBeanAttribut(SELECT_JVM_MBEAN, "node"); - try { - // Get table - table = utils.getTable(wr, 0); - - // Verify - assertEquals("It is not the jvm version. ", jvmVersion, table.getTableCell(0, 2).getText()); - assertEquals("It is not the jvm vendor. ", jvmVendor, table.getTableCell(1, 2).getText()); - assertEquals("It is not the jvm node. ", jvmNode, table.getTableCell(2, 2).getText()); - } catch (SAXException e) { - fail("The jvm table is incorrect."); - } - - } - - /** - * Get the number of JNDI object - * @param contentFrame the content frame - * @return number of JNDI objects - * @throws SAXException if a table or cell doesn't match. - */ - private int getJndiNb(WebResponse contentFrame) throws SAXException { - JonasAdminUtils utils = new JonasAdminUtils(); - WebTable table = utils.getTable(contentFrame, 2); - - String text = table.getTableCell(0, 0).getText(); - int beginIndex = text.indexOf("("); - int endIndex = text.indexOf(")", beginIndex); - String nb = text.substring(beginIndex + "(".length(), endIndex); - - return Integer.parseInt(nb); - } - - /** - * Get MBean attribut - * @param select value of select param to indicate the chosen MBean - * @param attribut name of attribut - * @return value of the attribut - * @throws MalformedURLException if url is invalid - * @throws IOException if url is not correct - * @throws SAXException if an error is found - */ - private String getMBeanAttribut(String select, String attribut) { - WebResponse wr; - String urlAttributs = prefixUrl + URL_MBEAN_ATTRIBUTS + select; - - try { - wr = wc2.getResponse(urlAttributs); - String attributs = wr.getText(); - int position = attributs.indexOf("" + attribut + ""); - int beginIndex = attributs.indexOf("== ", position); - int endIndex = attributs.indexOf(END_OF_COLUMN, beginIndex); - return attributs.substring(beginIndex + "== ".length(), endIndex); - } catch (MalformedURLException e) { - throw new IllegalStateException("Invalid URL: " + url + ". " + e); - } catch (IOException e) { - throw new IllegalStateException("No response from: " + url + ". " + e); - } catch (SAXException e) { - throw new IllegalStateException("No text found. " + e); - } - } - - /** - * Tear Down cleanUp action - * @throws Exception if an error occurs - */ - public void tearDown() throws Exception { - super.tearDown(); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/jonasserver/F_JonasAdminSaveAll.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/jonasserver/F_JonasAdminSaveAll.java deleted file mode 100755 index 68466afe0d2f8e50abf25a4f06382fb89a86580f..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/jonasserver/F_JonasAdminSaveAll.java +++ /dev/null @@ -1,215 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.jonasserver; - -import java.io.File; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.catalina.ConnectorUtils; -import org.objectweb.jonas.jonasadmin.test.logging.LoggerUtils; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminFiles; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; - -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - - -/** - * Class for testing Save All in jonasAdmin - * @author Paul Kemler - * - */ -public class F_JonasAdminSaveAll extends JonasAdminTestCase { - - /** - * URL of the Server Management - */ - private static final String URL_JONASADMIN_SERVER = "EditJonasServer.do"; - - /** - * URL of the SERVLET SERVER - */ - private static final String URL_JONASADMIN_SERVLET_SERVER = "EditServletServer.do"; - - /** - * URL of the SAVE ALL button - */ - private static final String URL_JONASADMIN_SAVE_ALL = "SaveCatalina.do"; - - /** - * URL of welcome - */ - private static final String URL_WELCOME = "/jonasAdmin/Welcome.do"; - - /** - * Time of beginning testAllLinks - */ - private String beginTime; - - /** - * Time of ending testAllLinks - */ - private String endTime; - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminSaveAll(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminSaveAll(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminSaveAll.class); - } - - /** - * Setup need for these tests - * jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - // Get time - beginTime = getTime(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - } - - /** - * Test Servlet server 'Save all' - * @throws Exception if error occurs - * - */ - public void testSaveAll() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - if (jProp.isCatalina()) { - // Go to jonas server management - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_SERVER); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - // Go to servlet server - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_SERVLET_SERVER); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Create new connector - String port = ConnectorUtils.createNewConnector(wc, "http"); - // Create new logger - LoggerUtils.createNewEngineLogger(wc); - - // Save all - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_SAVE_ALL); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Remove created connector - ConnectorUtils.deleteConnector(wc, port); - // Remove logger - LoggerUtils.deleteLogger(wc, null); - - // Get server.xml and test file. - XMLTest xmlTest = new XMLTest(""); - File serverXml = JonasAdminFiles.getServerXmlFile(); - xmlTest.testServerXml(serverXml, port); - - } - } - - /** - * Tear Down - * cleanUp action - */ - public void tearDown() throws Exception { - super.tearDown(); - // Get time - endTime = getTime(); - - // Recover last server.xml configuration - JonasAdminFiles.recoverServerConf(beginTime, endTime); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/jonasserver/XMLTest.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/jonasserver/XMLTest.java deleted file mode 100755 index 1c4368f87967302483c0a3e0377d2d246432a2d4..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/jonasserver/XMLTest.java +++ /dev/null @@ -1,133 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.jonasserver; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; - -import org.custommonkey.xmlunit.Diff; -import org.custommonkey.xmlunit.DifferenceListener; -import org.custommonkey.xmlunit.IgnoreTextAndAttributeValuesDifferenceListener; -import org.custommonkey.xmlunit.XMLTestCase; -import org.custommonkey.xmlunit.XMLUnit; -import org.w3c.dom.Document; -import org.xml.sax.InputSource; - - -/** - * Class for testing XML format - * @author Paul Kemler - * - */ -public class XMLTest extends XMLTestCase { - - /** - * Constructor - * @param name name of the test - */ - public XMLTest(String name) { - super(name); - } - - /** - * Test server.xml - * @param file $JONAS_BASE/conf/server.xml - * @param port port of the added connector - * @throws Exception if an error occurs - */ - public void testServerXml(File file, String port) throws Exception { - String controlConnector = "" + - ""; - String controlAddedConnector = "" + - ""; - String controlEngine = "" + - "" + - "" + - "" + - "" + - ""; - String controlXml = "" + - "" + - "" + - "" + - "" + - "" + - "" + - controlConnector + - controlAddedConnector + - controlEngine + - "" + - ""; - Document testDocument = XMLUnit.buildTestDocument(new InputSource(new FileReader(file))); - String testText = ""; - - // Transform file into string - BufferedReader read = new BufferedReader(new FileReader(file)); - String temp = read.readLine(); - while (temp != null) { - testText += temp + "\n"; - temp = read.readLine(); - } - read.close(); - - // Verify if the new Connector exists - assertXpathEvaluatesTo("1", "count(//Connector[@port='" + port + "'])", testDocument); - - // Verify the server.xml 'structure' - XMLUnit.setIgnoreWhitespace(true); - DifferenceListener diffListener = new IgnoreTextAndAttributeValuesDifferenceListener(); - Diff diff = new Diff(controlXml, testText); - diff.overrideDifferenceListener(diffListener); - - assertTrue("The control structure:\n" + controlXml + "\nand the server.xml struture:\n" + testText + "\nare not similar: " + diff.toString(), diff.similar()); - - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/joram/C_JonasAdminJoram.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/joram/C_JonasAdminJoram.java deleted file mode 100755 index 68e835a52709d3d3407e7208b98e10e0a02a3135..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/joram/C_JonasAdminJoram.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.joram; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; - -import com.meterware.httpunit.WebConversation; - -import junit.framework.Test; -import junit.framework.TestSuite; - -/** - * Define a class to test joram in jonasAdmin - * Test : - joram - * - * @author Paul Kemler - */ -public class C_JonasAdminJoram extends JonasAdminTestCase { - - /** - * Constructor with a specified name - * @param name the name - */ - public C_JonasAdminJoram(String name) { - super(name); - } - - /** - * Get a new TestSuite for this class - * It includes all jonasAdmin tests - * @param wc WebConversation - * @return a new TestSuite for this class - */ -/* public static Test suite(WebConversation wc) { - TestSuite suite = new TestSuite(); - suite.addTest(F_JonasAdminJoramProperties.suite(wc)); - suite.addTest(F_JonasAdminJoramDestination.suite(wc)); - suite.addTest(F_JonasAdminJoramUser.suite(wc)); - return suite; - }*/ - - /** - * Get a new TestSuite for this class - * It includes all jonasAdmin tests - * @return a new TestSuite for this class - */ - public static Test suite() { - TestSuite suite = new TestSuite(); - suite.addTest(F_JonasAdminJoramProperties.suite()); - suite.addTest(F_JonasAdminJoramDestination.suite()); - suite.addTest(F_JonasAdminJoramUser.suite()); - return suite; - } - - /** - * Main method - * @param args the arguments - */ - public static void main (String[] args) { - WebConversation wc = new WebConversation(); - //junit.textui.TestRunner.run(suite(wc)); - junit.textui.TestRunner.run(suite()); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/joram/F_JonasAdminJoramDestination.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/joram/F_JonasAdminJoramDestination.java deleted file mode 100755 index 24834eaa9001e4b84665aa5c00c803714dd520dc..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/joram/F_JonasAdminJoramDestination.java +++ /dev/null @@ -1,679 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.joram; - -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.service.container.F_JonasAdminEjbContainer; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminUtils; - -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.SubmitButton; -import com.meterware.httpunit.TableCell; -import com.meterware.httpunit.WebForm; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - -/** - * Class for testing JORAM destinations - * @author Paul Kemler - * - */ -public class F_JonasAdminJoramDestination extends JonasAdminTestCase { - - /** - * URL of the Joram Platform - */ - private static final String URL_JONASADMIN_JORAM = "EditJoramPlatform.do"; - - /** - * URL of the Joram Servers - */ - private static final String URL_JONASADMIN_JORAM_SERVERS = "joramplatform/joramservers.jsp"; - - /** - * URL of "Create Jms Destination" - */ - private static final String URL_JONASADMIN_JORAM_CREATE_DESTINATION = "CreateJoramDestination.do"; - - /** - * URL of the Remove Button - */ - private static final String URL_JONASADMIN_JORAM_REMOVE = "RemoveConfirmDestinations.do"; - - /** - * URL of the 'Used By' tab for a topic - */ - private static final String URL_JONASADMIN_TOPIC_USED_BY = "joramplatform/topicUsedBy.jsp"; - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminJoramDestination(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminJoramDestination(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminJoramDestination.class); - } - - /** - * Setup need for these tests - * jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - } - - /** - * Test the creation of a new topic - * @throws Exception if error occurs - * - */ - public void testCreateNewTopic() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - String createDestinationPage; - /* - * To get some utils for WebTable - */ - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - if (jProp.isResource()) { - // Joram platform is in jonas - //if (isRarLoaded("joram_for_jonas_ra")) { - if (isJoramRar()) { - // Go to Joram Platform - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JORAM); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to Joram Servers - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JORAM_SERVERS); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to Local Server - WebTable localTable = utils.getTable(wr, 1); - link = localTable.getTableCell(0, 0).getLinks()[0]; - if (link == null) { - throw new IllegalStateException("No link was found to a local server in the 'Joram servers' page. "); - } - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to Create JMS Destination - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JORAM_CREATE_DESTINATION); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - createDestinationPage = wr.getText(); // For comparing with the forwarded page after the creation - // Find a name - String topicName = "new_topic_"; - int topicId = 0; - boolean found = false; - while (!found) { - if (!isTopic(topicName + topicId)) { - topicName = topicName + topicId; - found = true; - } - topicId++; - } - - // Create a new topic - createTopic(wr, topicName); - - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify topic is created - assertTrue("The '" + topicName + "' topic was not created. ", isTopic(topicName)); - - // Verify the forwarded page - //assertEquals("The 'New Destination' page has changed. ", createDestinationPage, wr.getText()); - // This asserion can't be verified for the moment as the 'New destination' page has th following - // - } - } - - } - - /** - * Test the creation of a new queue - * @throws Exception if error occurs - * - */ - public void testCreateNewQueue() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - String createDestinationPage; - /* - * To get some utils for WebTable - */ - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - - if (jProp.isResource()) { - // Joram platform is in jonas - //if (isRarLoaded("joram_for_jonas_ra")) { - if (isJoramRar()) { - // Go to Joram Platform - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JORAM); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to Joram Servers - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JORAM_SERVERS); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to Local Server - WebTable localTable = utils.getTable(wr, 1); - link = localTable.getTableCell(0, 0).getLinks()[0]; - if (link == null) { - throw new IllegalStateException("No link was found to a local server in the 'Joram servers' page. "); - } - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to Create JMS Destination - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JORAM_CREATE_DESTINATION); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - createDestinationPage = wr.getText(); // For comparing with the forwarded page after the creation - // Find a name - String queueName = "new_queue_"; - int queueId = 0; - boolean found = false; - while (!found) { - if (!isQueue(queueName + queueId)) { - queueName = queueName + queueId; - found = true; - } - queueId++; - } - - // Create a new queue - createQueue(wr, queueName); - - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify queue is created - assertTrue("The '" + queueName + "' queue was not created. ", isQueue(queueName)); - - // Verify the forwarded page - // assertEquals("The 'New Destination' page has changed. ", createDestinationPage, wr.getText()); - // This asserion can't be verified for the moment as the 'New destination' page has th following - // - } else { - - System.out.println("------joram jar not loaded"); - } - } - - } - - /** - * Test to delete a topic - * @throws Exception if error occurs - * - */ - public void testDeleteTopic() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - /* - * To get some utils for WebTable - */ - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - if (jProp.isResource()) { - // Joram platform is in jonas - //if (isRarLoaded("joram_for_jonas_ra")) { - if (isJoramRar()) { - // Find a name - String topicName = "new_topic_"; - int topicId = 0; - boolean found = false; - while (!found) { - if (!isQueue(topicName + topicId)) { - topicName = topicName + topicId; - found = true; - } - topicId++; - } - - // Create a topic - createTopic(topicName, getLocalServerId()); - - // Go to Joram Platform - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JORAM); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to Joram Servers - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JORAM_SERVERS); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to Local Server - WebTable localTable = utils.getTable(wr, 1); - link = localTable.getTableCell(0, 0).getLinks()[0]; - if (link == null) { - throw new IllegalStateException("No link was found to a local server in the 'Joram servers' page. "); - } - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Delete the created JMS Destination - WebForm removeDestinationForm = wr.getForms()[0]; - SubmitButton button = removeDestinationForm.getSubmitButtons()[0]; - removeDestinationForm.setCheckbox("selectedItems", topicName, true); - button.click(); - - wr = wc.getFrameContents(FRAME_CONTENT); - - // Confirm - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JORAM_REMOVE); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify topic is deleted - assertTrue("The '" + topicName + "' topic always exists. ", isTopic(topicName)); - - // Verify console is updated - assertTrue("The '" + topicName + "' topic was found in jonasAdmin after deleting. ", wr.getText().indexOf(topicName) == -1); - } - } - - } - - /** - * Test to delete a queue - * @throws Exception if error occurs - * - */ - public void testDeleteQueue() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - /* - * To get some utils for WebTable - */ - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - if (jProp.isResource()) { - // Joram platform is in jonas - //if (isRarLoaded("joram_for_jonas_ra")) { - if (isJoramRar()) { - // Find a name - String queueName = "new_queue_"; - int queueId = 0; - boolean found = false; - while (!found) { - if (!isQueue(queueName + queueId)) { - queueName = queueName + queueId; - found = true; - } - queueId++; - } - - // Create a queue - createQueue(queueName, getLocalServerId()); - - // Go to Joram Platform - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JORAM); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to Joram Servers - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JORAM_SERVERS); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to Local Server - WebTable localTable = utils.getTable(wr, 1); - link = localTable.getTableCell(0, 0).getLinks()[0]; - if (link == null) { - throw new IllegalStateException("No link was found to a local server in the 'Joram servers' page. "); - } - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Delete the created JMS Destination - WebForm removeDestinationForm = wr.getForms()[0]; - SubmitButton button = removeDestinationForm.getSubmitButtons()[0]; - removeDestinationForm.setCheckbox("selectedItems", queueName, true); - button.click(); - - wr = wc.getFrameContents(FRAME_CONTENT); - - // Confirm - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JORAM_REMOVE); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify queue is deleted - assertTrue("The '" + queueName + "' queue always exists. ", isQueue(queueName)); - - // Verify console is updated - assertTrue("The '" + queueName + "' queue was found in jonasAdmin after deleting. ", wr.getText().indexOf(queueName) == -1); - } - } - - } - - /** - * Test a used topic - * @throws Exception if error occurs - * - */ - public void testUsedTopic() throws Exception { - - - WebResponse wr; - WebLink link; - WebTable table; - String topicName = "mdbTopic"; - /* - * To get some utils for WebTable - */ - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - if (jProp.isResource()) { - // Joram platform is in jonas - //if (isRarLoaded("joram_for_jonas_ra")) { - if (isJoramRar()) { - // Create a topic - createTopic(topicName, getLocalServerId()); - - // Use samplemdb.jar - useBeans("samplemdb"); - - // Go to Joram Platform - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JORAM); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to Joram Servers - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JORAM_SERVERS); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to Local Server - WebTable localTable = utils.getTable(wr, 1); - link = localTable.getTableCell(0, 0).getLinks()[0]; - if (link == null) { - throw new IllegalStateException("No link was found to a local server in the 'Joram servers' page. "); - } - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify there is no checkbox for mdbTopic - table = utils.getTable(wr, 3); - int topicRow = utils.getRow(topicName, table, 1).intValue(); - if (topicRow == -1) { - fail("'" + topicName + "' was not found in the destination list. "); - } - TableCell cell = table.getTableCell(topicRow, 0); - assertEquals("There is an element for the '" + topicName + "'. ", 0, cell.getElementNames().length); // if there is a checkbox, the number of element is 1 - - // Go to topic - link = table.getTableCell(topicRow, 1).getLinks()[0]; - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to 'Used By' tab - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_TOPIC_USED_BY); - if (link == null) { - fail("There is no 'Used By' tab. "); - } - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify there is the Mdb MessageDrivenBean - table = utils.getTable(wr, 0); - int mdbRow = utils.getRow("Mdb", table).intValue(); - if (mdbRow == -1) { - fail("The 'Mdb' EJB was not found in the list of '" + topicName + "' users. "); - } - // Verify the type - assertEquals("In list of '" + topicName + "' users, the type of 'Mdb' is not a MessageDrivenBean", "MessageDrivenBean", table.getTableCell(mdbRow, 1).getText()); - - // Click to go to the Mdb page - link = table.getTableCell(mdbRow, 0).getLinks()[0]; - if (link == null) { - fail("There is no link for 'Mdb' in 'Used By' page. "); - } - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify the link goes to "Domain ( jonas ) > Server JOnAS ( jonas ) > Services > EJB Container > samplemdb.jar" - /* This link is not present as the samplemdb.jar was not deployed with jonasAdmin sa the management - * tree is not refreshed - TableCell contentTitleTomThumbCell = wr.getTables()[0].getTableCell(0, 0); - assertTrue("The link of 'Mdb' in 'Used By' page is maybe wrong. ", contentTitleTomThumbCell.getText().endsWith("> Services > EJB Container > samplemdb.jar")); - */ - - // Verify the Tabs - WebTable tabTable = utils.getTabTable(wr); - /* - for (int i = 0; i < tabTable.getColumnCount(); i++) { - System.out.println("* " + i + " -- " + tabTable.getTableCell(0, i).getText()); - }*/ - int mdbIndex = F_JonasAdminEjbContainer.getMdbTabIndex(); - testTabs(tabTable, - F_JonasAdminEjbContainer.getNumberOfTabsForMdb(), - mdbIndex, - "Problem in 'Mdb' tab."); - int mdbTabIndex = (mdbIndex -1) * 2; - assertEquals("The selected tab is not Mdb", - F_JonasAdminEjbContainer.getMdbTabText(), - tabTable.getTableCell(0, mdbTabIndex).getText()); - } else { - - System.out.println("------joram jar not loaded"); - } - } - } - - /** - * Topic exists - * @param name the name of the topic - * @return true if the topic exists, false else - * @throws Exception if an error occurs - */ - private boolean isTopic(String name) throws Exception { - MBeanServerConnection server = getMBeanServer(); - ObjectName on = ObjectName.getInstance("joramClient:type=topic,name=" + name); - - return server.isRegistered(on); - } - - /** - * Queue exists - * @param name the name of the queue - * @return true if the queue exists, false else - * @throws Exception if an errors occurs - */ - private boolean isQueue(String name) throws Exception { - MBeanServerConnection server = getMBeanServer(); - ObjectName on = ObjectName.getInstance("joramClient:type=queue,name=" + name); - - return server.isRegistered(on); - } - - /** - * Create a topic - * @param wr the content frame in the 'New Destination' page - * @param name the name of the topic - * @throws Exception if an error occurs - */ - private void createTopic(WebResponse wr, String name) throws Exception { - createDestination(wr, name, "topic"); - } - - /** - * Create a queue - * @param wr the content frame in the 'New Destination' page - * @param name the name of the queue - * @throws Exception if an error occurs - */ - private void createQueue(WebResponse wr, String name) throws Exception { - createDestination(wr, name, "queue"); - } - - /** - * Create a jms destination - * @param wr the content frame in the 'New Destination' page - * @param name the name of the destination - * @param type the type of the destination ("topic" or "queue"). - * @throws Exception if an error occurs - */ - private void createDestination(WebResponse wr, String name, String type) throws Exception { - SubmitButton button; - WebForm form = wr.getForms()[0]; - form.setParameter("type", type); - form.setParameter("name", name); - - // Submit - button = form.getSubmitButtons()[0]; - button.click(); - } - - /** - * Get the local server id - * @return id of the local server - * @throws Exception if an errors occurs - */ - private int getLocalServerId() throws Exception { - MBeanServerConnection server = getMBeanServer(); - ObjectName on = ObjectName.getInstance("joramClient:type=JoramAdapter,*"); - ObjectName joramAdapterON = (ObjectName) server.queryNames(on, null).iterator().next(); - - return ((Short) server.getAttribute(joramAdapterON, "ServerId")).intValue(); - } - - /** - * Tear Down cleanUp action - * @throws Exception if an error occurs - */ - public void tearDown() throws Exception { - super.tearDown(); - } - -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/joram/F_JonasAdminJoramProperties.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/joram/F_JonasAdminJoramProperties.java deleted file mode 100755 index 0c2d3263bd794a88898335c9c7354ef7717fd956..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/joram/F_JonasAdminJoramProperties.java +++ /dev/null @@ -1,286 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.joram; - -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminFiles; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminUtils; -import org.xml.sax.SAXException; - -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - - -/** - * Define a class to test the JOnAS Admin console - * Test properties of joram platform - * @author kemlerp - * - */ -public class F_JonasAdminJoramProperties extends JonasAdminTestCase { - - /** - * URL of the Joram Platform - */ - private static final String URL_JONASADMIN_JORAM = "EditJoramPlatform.do"; - - /** - * Name of the file of jonasAdmin test properties - */ - private static final String JONASADMINTEST_PROPERTY_NAME = "jonasAdminTests"; - - /** - * Name of the property joram.version - */ - private static final String JORAM_VERSION = "joram.version"; - - /** - * Name of the property joram.serverId - */ - private static final String JORAM_SERVER_ID = "joram.serverId"; - - /** - * Name of the property joram.serverName - */ - private static final String JORAM_SERVER_NAME = "joram.serverName"; - - /** - * Name of the property joram.collocated - */ - private static final String JORAM_COLLOCATED = "joram.collocated"; - - /** - * Name of the property joram.persistent - */ - private static final String JORAM_PERSISTENT = "joram.persistent"; - - /** - * Name of the property joram.connectingTimer - */ - private static final String JORAM_CONNECTING_TIMER = "joram.connectingTimer"; - - /** - * Name of the property joram.connectionPendingTimer - */ - private static final String JORAM_CONNECTION_PENDING_TIMER = "joram.connectionPendingTimer"; - - /** - * Name of the property joram.transactedSessionMaximumIdleness - */ - private static final String JORAM_TRANSACTED_SESSION_MAXIMUM_IDLENESS = "joram.transactedSessionMaximumIdleness"; - - /** - * Name of the property joram.timeoutToAbortRequest - */ - private static final String JORAM_TIMEOUT_TO_ABORT_REQUEST = "joram.timeoutToAbortRequest"; - - /** - * Name of the property joram.defaultThresholdForDMQ - */ - private static final String JORAM_DEFAULT_THRESHOLD = "joram.defaultThresholdForDMQ"; - - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminJoramProperties(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminJoramProperties(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminJoramProperties.class); - } - - /** - * Setup need for these tests - * jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - } - - /** - * Test properties of joram - * @throws Exception if error occurs - */ - public void testJoramProperties() throws Exception { - - JonasAdminUtils utils = new JonasAdminUtils(); - MBeanServerConnection server = getMBeanServer(); - - if (jProp.isResource()) { - // Joram platform is in jonas - if (isRarLoaded("joram_for_jonas_ra")) { - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - // READ joram properties from MBeans - ObjectName on = ObjectName.getInstance("joramClient:type=JoramAdapter,*"); - ObjectName joramAdapterON = (ObjectName) server.queryNames(on, null).iterator().next(); - - String version = joramAdapterON.getKeyProperty("version"); - String serverId = ((Short) server.getAttribute(joramAdapterON, "ServerId")).toString(); - String serverName = (String) server.getAttribute(joramAdapterON, "ServerName"); - String collocatedServer = "" + jProp.isJMSCollocated(); - String persistentServer = ((Boolean) server.getAttribute(joramAdapterON, "PersistentPlatform")).toString(); - String connectingTimer = ((Integer) server.getAttribute(joramAdapterON, "ConnectingTimer")).toString(); - String connectionPendingTimer = ((Integer) server.getAttribute(joramAdapterON, "CnxPendingTimer")).toString(); - String transactedSessionMaximumIdleness = ((Integer) server.getAttribute(joramAdapterON, "TxPendingTimer")).toString(); - String timeoutToAbortRequest = "" + ((Long) server.getAttribute(joramAdapterON, "TimeOutToAbortRequest")).longValue(); - String hostName =(String) server.getAttribute(joramAdapterON, "HostName"); - String portNumber = ((Integer) server.getAttribute(joramAdapterON, "ServerPort")).toString(); - String fileName =(String) server.getAttribute(joramAdapterON, "AdminFileXML"); - - String defaultThreshold = "Not set"; - Object defaultDMQinstance = server.getAttribute(joramAdapterON, "DefaultDMQ"); - if (defaultDMQinstance != null) { - defaultThreshold = defaultDMQinstance.toString(); - } - // Go to Joram Platform - WebResponse wr = wc.getFrameContents(FRAME_TREE); - WebLink link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JORAM); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Get table - try { - WebTable versionTable = utils.getTable(wr, 0); - WebTable currentJoramTable = utils.getTable(wr, 3); - WebTable timerTable = utils.getTable(wr, 6); - WebTable dmqTable = utils.getTable(wr, 9); - - // Get name of administration task file - //String fileName = currentJoramTable.getTableCell(6, 2).getText(); - - // Get server port from administration task file - //String serverPort = JonasAdminFiles.getJoramServerPort(fileName); - - // Get host name from administration task file - //String hostName = JonasAdminFiles.getJoramHostName(fileName); - - // Verify - assertEquals("It is not the expected joram version. ", version, versionTable.getTableCell(0, 2) - .getText()); - assertEquals("It is not the expected joram local server id. ", serverId, currentJoramTable - .getTableCell(0, 2).getText()); - assertEquals("It is not the expected joram local server name. ", serverName, currentJoramTable - .getTableCell(1, 2).getText()); - assertEquals("It is not the expected joram local host name. ", hostName, currentJoramTable - .getTableCell(2, 2).getText()); - assertEquals("It is not the expected joram local server port. ", portNumber, currentJoramTable - .getTableCell(3, 2).getText()); - assertEquals("It is not the expected value of the collocated server attribut. ", collocatedServer, - currentJoramTable.getTableCell(4, 2).getText()); - assertEquals("It is not the expected value of the persistent server attribut. ", persistentServer, - currentJoramTable.getTableCell(5, 2).getText()); - assertEquals("It is not the expected joram configuration file name. ", fileName, currentJoramTable - .getTableCell(6, 2).getText()); - assertEquals("It is not the expected connecting timer. ", connectingTimer, timerTable - .getTableCell(0, 2).getText()); - assertEquals("It is not the expected connection pending timer. ", connectionPendingTimer, timerTable - .getTableCell(1, 2).getText()); - assertEquals("It is not the expected transacted session maximum idleness. ", - transactedSessionMaximumIdleness, timerTable.getTableCell(2, 2).getText()); - assertEquals("It is not the expected timeout to abort request. ", timeoutToAbortRequest, timerTable - .getTableCell(3, 2).getText()); - assertEquals("It is not the expected default threshold for DMQ. ", defaultThreshold, dmqTable - .getTableCell(1, 2).getText()); - } catch (SAXException e) { - fail("Tables are not correct."); - } - } - } - - } - - /** - * Tear Down cleanUp action - * @throws Exception if an error occurs - */ - public void tearDown() throws Exception { - super.tearDown(); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/joram/F_JonasAdminJoramUser.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/joram/F_JonasAdminJoramUser.java deleted file mode 100755 index ea02f7b4fa1fd5c205063153928003f4f2012d4f..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/joram/F_JonasAdminJoramUser.java +++ /dev/null @@ -1,445 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.joram; - -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; -import javax.management.Query; -import javax.management.QueryExp; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminUtils; - -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.SubmitButton; -import com.meterware.httpunit.WebForm; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - -/** - * Class for testing Joram User - * @author Paul Kemler - * - */ -public class F_JonasAdminJoramUser extends JonasAdminTestCase { - - /** - * URL of the Joram Platform - */ - private static final String URL_JONASADMIN_JORAM = "EditJoramPlatform.do"; - - /** - * URL of the Joram Servers - */ - private static final String URL_JONASADMIN_JORAM_SERVERS = "joramplatform/joramservers.jsp"; - - /** - * URL of the Joram Users - */ - private static final String URL_JONASADMIN_JORAM_USERS = "joramplatform/joramusers.jsp"; - - /** - * URL of "Create Jms User" - */ - private static final String URL_JONASADMIN_JORAM_CREATE_USER = "CreateJoramUser.do"; - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminJoramUser(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminJoramUser(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminJoramUser.class); - } - - /** - * Setup need for these tests - * jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - } - - /** - * Test to create a local user - * @throws Exception if error occurs - * - */ - public void testSuccessfulCreateLocalUser() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - String createUserPage; - /* - * To get some utils for WebTable - */ - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - - if (jProp.isResource()) { - // Joram platform is in jonas - if (isRarLoaded("joram_for_jonas_ra")) { - // Go to Joram Platform - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JORAM); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to Joram Servers - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JORAM_SERVERS); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to Local Server - WebTable localTable = utils.getTable(wr, 1); - link = localTable.getTableCell(0, 0).getLinks()[0]; - if (link == null) { - throw new IllegalStateException("No link was found to a local server in the 'Joram servers' page. "); - } - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to Joram Users - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JORAM_USERS); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to Create JMS User - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JORAM_CREATE_USER); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - createUserPage = wr.getText(); // For comparing with the forwarded page after the creation - // Find a name - String userName = "new_user_"; - int userId = 0; - boolean found = false; - while (!found) { - if (!isUser(userName + userId)) { - userName = userName + userId; - found = true; - } - userId++; - } - - // Create a new user - createUser(wr, userName, userName); - - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify user is created - assertTrue("The '" + userName + "' topic was not created. ", isUser(userName)); - - // Verify the forwarded page - assertEquals("The 'New User' page has changed. ", createUserPage, wr.getText()); - - } - } - - } - - /** - * Test to create a local user that already exists - * @throws Exception if error occurs - * - */ - public void testCreateUserAlreadyExists() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - /* - * To get some utils for WebTable - */ - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - - if (jProp.isResource()) { - // Joram platform is in jonas - if (isRarLoaded("joram_for_jonas_ra")) { - - // Find a name - String userName = "new_user_"; - int userId = 0; - boolean found = false; - while (!found) { - if (!isUser(userName + userId)) { - userName = userName + userId; - found = true; - } - userId++; - } - - // Create Jms User - createLocalJmsUser(userName, userName); - - // Go to Joram Platform - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JORAM); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to Joram Servers - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JORAM_SERVERS); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to Local Server - WebTable localTable = utils.getTable(wr, 1); - link = localTable.getTableCell(0, 0).getLinks()[0]; - if (link == null) { - throw new IllegalStateException("No link was found to a local server in the 'Joram servers' page. "); - } - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to Joram Users - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JORAM_USERS); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to Create JMS User - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JORAM_CREATE_USER); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Create a new user - createUser(wr, userName, "password"); - - wr = wc.getFrameContents(FRAME_CONTENT); - String errorPage = wr.getText(); - // Verify error because user already exists - assertTrue("The value of the body class is not 'errors'. ", errorPage.indexOf("") != -1); - assertTrue("There is no the message: 'User [" + userName + "] already exists but with a different password' in the error page. ", errorPage.indexOf("User [" + userName + "] already exists but with a different password.") != -1); - - } - } - - } - - /** - * Test the user list : - * Create a local user and verify if the user is added to the local user list - * and verify the id of the user. - * @throws Exception if error occurs - * - */ - public void testUserList() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - /* - * To get some utils for WebTable - */ - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - - if (jProp.isResource()) { - // Joram platform is in jonas - if (isRarLoaded("joram_for_jonas_ra")) { - - // Find a name - String userName = "new_user_"; - int userId = 0; - boolean found = false; - while (!found) { - if (!isUser(userName + userId)) { - userName = userName + userId; - found = true; - } - userId++; - } - - // Create Jms User - createLocalJmsUser(userName, userName); - - // Go to Joram Platform - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JORAM); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to Joram Servers - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JORAM_SERVERS); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to Local Server - WebTable localTable = utils.getTable(wr, 1); - link = localTable.getTableCell(0, 0).getLinks()[0]; - if (link == null) { - throw new IllegalStateException("No link was found to a local server in the 'Joram servers' page. "); - } - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to Joram Users - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JORAM_USERS); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify user is in the list - table = utils.getTable(wr, 3); - int userRow = utils.getRow(userName, table).intValue(); - if (userRow == -1) { - fail("'" + userName + "' was not found in the local user list. "); - } - String jmsUserId = getJmsUserId(userName); - assertEquals("", jmsUserId, table.getTableCell(userRow, 1).getText()); - } - } - - } - - /** - * User exists - * @param name the name of the user - * @return true if the user exists, false else - * @throws Exception if an error occurs - */ - private boolean isUser(String name) throws Exception { - MBeanServerConnection server = getMBeanServer(); - ObjectName on = ObjectName.getInstance("joramClient:type=User,*"); - QueryExp exp = Query.match(Query.attr("Name"), Query.value(name)); - - return !server.queryNames(on, exp).isEmpty(); - } - - /** - * Get the id of the Jms User - * @param name the name of the user - * @return the id - * @throws Exception if an error occurs - */ - private String getJmsUserId(String name) throws Exception { - MBeanServerConnection server = getMBeanServer(); - ObjectName on = ObjectName.getInstance("joramClient:type=User,*"); - QueryExp exp = Query.match(Query.attr("Name"), Query.value(name)); - - ObjectName joramUserON = (ObjectName) (server.queryNames(on, exp).iterator().next()); - return (String) server.getAttribute(joramUserON, "ProxyId"); - } - - /** - * Create a jms user - * @param wr the content frame in the 'New User' page - * @param name the name of the user - * @param password the password of the user - * @throws Exception if an error occurs - */ - private void createUser(WebResponse wr, String name, String password) throws Exception { - SubmitButton button; - WebForm form = wr.getForms()[0]; - form.setParameter("password", password); - form.setParameter("name", name); - - // Submit - button = form.getSubmitButtons()[0]; - button.click(); - } - - /** - * Tear Down cleanUp action - * @throws Exception - */ - public void tearDown() throws Exception { - super.tearDown(); - } - -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/logging/C_JonasAdminLogging.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/logging/C_JonasAdminLogging.java deleted file mode 100755 index 9a85ac3b5845012770814a50c07e48347c2527f8..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/logging/C_JonasAdminLogging.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.logging; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; - -import com.meterware.httpunit.WebConversation; - -import junit.framework.Test; -import junit.framework.TestSuite; - -/** - * Define a class to test logging in jonasAdmin - * Test : - logging - * - * @author Paul Kemler - */ -public class C_JonasAdminLogging extends JonasAdminTestCase { - - /** - * Constructor with a specified name - * @param name the name - */ - public C_JonasAdminLogging(String name) { - super(name); - } - - /** - * Get a new TestSuite for this class - * It includes all jonasAdmin tests - * @return a new TestSuite for this class - */ - public static Test suite() { - TestSuite suite = new TestSuite(); - suite.addTest(F_JonasAdminLogger.suite()); - return suite; - } - - /** - * Main method - * @param args the arguments - */ - public static void main (String[] args) { - WebConversation wc = new WebConversation(); - junit.textui.TestRunner.run(suite()); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/logging/F_JonasAdminLogger.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/logging/F_JonasAdminLogger.java deleted file mode 100755 index 08dedd6bdfa916a7942142d6669a90630815aeaf..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/logging/F_JonasAdminLogger.java +++ /dev/null @@ -1,363 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.logging; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminUtils; -import org.xml.sax.SAXException; - -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.SubmitButton; -import com.meterware.httpunit.WebConversation; -import com.meterware.httpunit.WebForm; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - - -/** - * Define a class to test the JOnAS Admin console - * Test logging - * @author Paul Kemler - * - */ -public class F_JonasAdminLogger extends JonasAdminTestCase { - - /** - * URL of Jonas Logger - */ - private static final String URL_JONASADMIN_JONAS_LOGGER = "/EditLoggingJonas.do"; - - /** - * INPUT Checkbox - */ - private static final String INPUT_CHECKBOX = "input type=\"checkbox\""; - - /** - * Title logger type - */ - private static final String TITLE_LOGGER_TYPE = "Logger type"; - - /** - * Title container type - */ - private static final String TITLE_CONTAINER_TYPE = "Container type"; - - /** - * Title container name - */ - private static final String TITLE_CONTAINER_NAME = "Container name (or path)"; - - /** - * A 2nd connection to jonasAdmin - */ - private static WebConversation wc2 = new WebConversation(); - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminLogger(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminLogger(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminLogger.class); - } - - /** - * Setup need for these tests - * jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - } - - /** - * Test creation, modification et removal acces log valves - * @throws Exception if error occurs - * - */ - public void testLoggers() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebForm form; - String host = "localhost"; - int row; - int columnLoggerType; - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - - // OPEN A SECOND CONNECTION - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc2, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - - if (jProp.isCatalina()) { - wr = LoggerUtils.getLoggerPage(wc); - table = utils.getTable(wr, 3); - - if (table.getRowCount() == 2) { - assertFalse("There is a remove button. ", wr.getText().indexOf("'remove'") != -1); - } else { - assertTrue("There is no remove button but there is no one and only one logger. ", wr.getText().indexOf("'remove'") != -1); - } - - // 1-Create new loggers - LoggerUtils.createNewEngineLogger(wc); - // Verify - wr = LoggerUtils.getLoggerPage(wc); - table = utils.getTable(wr, 3); - form = wr.getForms()[0]; - columnLoggerType = utils.getColumn(TITLE_LOGGER_TYPE, table).intValue(); - row = utils.getFirstRow("Access log valve engine", table, columnLoggerType).intValue(); - if (row == -1) { - throw new IllegalThreadStateException("There is no row, which contains 'Access log valve engine'. "); - } - assertEquals("There is no the correct number of loggers. ", 3, table.getRowCount()); - assertTrue("There is no remove button. ", wr.getText().indexOf("'remove'") != -1); - assertEquals("There is no the correct number of parameters in the form. ", 2, form.getParameterNames().length); - assertTrue("There is no checkbox", wr.getText().indexOf(INPUT_CHECKBOX) != -1); - assertEquals("The container type is not 'Engine'. ", "Engine", table.getTableCell(row, utils.getColumn(TITLE_CONTAINER_TYPE, table).intValue()).getText()); - assertEquals("The container name is not 'engine'. ", "engine", table.getTableCell(row, utils.getColumn(TITLE_CONTAINER_NAME, table).intValue()).getText()); - - LoggerUtils.createNewHostLogger(wc); - // Verify - wr = LoggerUtils.getLoggerPage(wc); - table = utils.getTable(wr, 3); - form = wr.getForms()[0]; - row = utils.getFirstRow("Access log valve " + host, table, columnLoggerType).intValue(); - if (row == -1) { - throw new IllegalThreadStateException("There is no row, which contains 'Access log valve " + host + "'. "); - } - assertEquals("There is no the correct number of loggers. ", 4, table.getRowCount()); - assertTrue("There is no remove button. ", wr.getText().indexOf("'remove'") != -1); - assertEquals("There is no the correct number of parameters in the form. ", 2, form.getParameterNames().length); - assertEquals("The container type is not 'Host'. ", "Host", table.getTableCell(row, utils.getColumn(TITLE_CONTAINER_TYPE, table).intValue()).getText()); - assertEquals("The container name is not '" + host + "'. ", host, table.getTableCell(row, utils.getColumn(TITLE_CONTAINER_NAME, table).intValue()).getText()); - - // 2-Modify loggers - LoggerUtils.modifyLogger(wc, null, "dir", "true", "false", ".suffix", "prefix_", "%v"); - // Verify - wr = wc.getFrameContents(FRAME_CONTENT); - verifyAccessLogValve(wr, "dir", "true", "false", ".suffix", "prefix_", "%v"); - - LoggerUtils.modifyLogger(wc, host, "dir", "true", "false", ".suffix", "prefix_", "%v"); - // Verify - wr = wc.getFrameContents(FRAME_CONTENT); - verifyAccessLogValve(wr, "dir", "true", "false", ".suffix", "prefix_", "%v"); - - - // 3-Remove loggers - LoggerUtils.deleteLogger(wc, null); - // Verify - wr = LoggerUtils.getLoggerPage(wc); - table = utils.getTable(wr, 3); - assertEquals("The number of loggers is not 2. ", 3, table.getRowCount()); - - LoggerUtils.deleteLogger(wc, host); - // Verify - wr = LoggerUtils.getLoggerPage(wc); - table = utils.getTable(wr, 3); - assertEquals("The number of loggers is not 1. ", 2, table.getRowCount()); - } - } - - /** - * Test JOnAS logger - * @throws Exception if error occurs - */ - public void testJonasLogger() throws Exception { - - if (jProp.isCatalina()) { - WebResponse wr; - WebLink link; - WebTable table; - WebForm form; - SubmitButton button = null; - int row; - int columnLevels; - int columnTopics; - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - wr = LoggerUtils.getLoggerPage(wc); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JONAS_LOGGER); - if (link != null) { - link.click(); - } else { - throw new IllegalThreadStateException("The link " + URL_JONASADMIN_JONAS_LOGGER + " is not found. "); - } - - // Verify topics - wr = wc.getFrameContents(FRAME_CONTENT); - table = utils.getTable(wr, 3); - form = wr.getForms()[0]; - String[] topics = form.getOptions("topic"); - columnTopics = utils.getColumn("Topics", table).intValue(); - if (columnTopics == -1) { - throw new IllegalThreadStateException("There is no column, which contains 'Topics'. "); - } - assertEquals("Number of topics is not the same in the select menu and in the table.", topics.length, table.getRowCount() - 1); - for (int i = 0; i < topics.length; i++) { - assertEquals("Topic " + topics[i] + " is not found in the table. ", topics[i], table.getTableCell(i+1, columnTopics).getText()); - } - - // Modify level of a topic - columnLevels = utils.getColumn("Levels", table).intValue(); - if (columnLevels == -1) { - throw new IllegalThreadStateException("There is no column, which contains 'Levels'. "); - } - String level = table.getTableCell(topics.length, columnLevels).getText(); - String topic = "org.objectweb.jonas.web"; - if (level.equals("WARN")) { - level = "INFO"; - } else if (level.equals("INFO")) { - level = "ERROR"; - } else if (level.equals("FATAL")) { - level = "INHERIT"; - } else if (level.equals("INHERIT")) { - level = "DEBUG"; - } else if (level.equals("DEBUG")) { - level = "WARN"; - } - - form.setParameter("topic", topic); - form.setParameter("level", level); - - button = form.getSubmitButtons()[0]; - button.click(); - - // Verify topics - wr = wc.getFrameContents(FRAME_CONTENT); - table = utils.getTable(wr, 3); - if (level.equals("ERROR")) { - level = "FATAL"; - } - row = utils.getFirstRow(topic, table, columnTopics).intValue(); - if (row == -1) { - throw new IllegalThreadStateException("There is no row, which contains '" + topic + "' in the topic column. "); - } - assertEquals("The level of " + topic + " is not " + level + ". ", level, table.getTableCell(row, columnLevels).getText()); - } - } - - /** - * Verify access log valve properties - * @param wr Content frame - * @param directory value of the directory parameter - * @param resolveHosts value of the resolveHosts parameter - * @param rotatable value of the rotatable parameter - * @param suffix value of the suffix parameter - * @param prefix value of the prefix parameter - * @param pattern value of the pattern parameter - * @throws SAXException if an error occurs while form is got - */ - private void verifyAccessLogValve(WebResponse wr, String directory, String resolveHosts, - String rotatable, String suffix, String prefix, String pattern) throws SAXException { - WebForm form = wr.getForms()[0]; - assertEquals("Directory value is not" + directory + ". ", directory, form.getParameterValue("directory")); - assertEquals("Resolve hosts value is not" + resolveHosts + ". ", resolveHosts, form.getParameterValue("resolveHosts")); - assertEquals("Rotatable value is not" + rotatable + ". ", rotatable, form.getParameterValue("rotatable")); - assertEquals("Suffix value is not" + suffix + ". ", suffix, form.getParameterValue("suffix")); - assertEquals("Prefix value is not" + prefix + ". ", prefix, form.getParameterValue("prefix")); - assertEquals("Pattern value is not" + pattern + ". ", pattern, form.getParameterValue("pattern")); - } - - /** - * Tear Down cleanUp action - * @throws Exception if an error occurs - */ - public void tearDown() throws Exception { - super.tearDown(); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/logging/LoggerUtils.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/logging/LoggerUtils.java deleted file mode 100755 index fd3e751b7a598b7b8d7d3ce27957c0fdc4de2a4d..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/logging/LoggerUtils.java +++ /dev/null @@ -1,326 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.logging; - -import java.io.IOException; - -import org.xml.sax.SAXException; - -import com.meterware.httpunit.SubmitButton; -import com.meterware.httpunit.WebConversation; -import com.meterware.httpunit.WebForm; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; - -/** - * Class to use logging pages - * @author Paul Kemler - * - */ -public class LoggerUtils { - - /** - * NAME of FRAME content - */ - protected static final String FRAME_CONTENT = "content"; - - /** - * NAME of FRAME tree - */ - protected static final String FRAME_TREE = "tree"; - - /** - * URL of the logger list - */ - private static final String URL_JONASADMIN_LOGGING = "ListLoggers.do"; - - /** - * URL for creating a logger - */ - private static final String URL_JONASADMIN_CREATE_LOGGER = "EditCatalinaAccessLogger.do?action=create"; - - /** - * URL for modifying an engine logger - */ - private static final String URL_JONASADMIN_MODIFY_ENGINE_LOGGER = "EditCatalinaAccessLogger.do?select=jonas%3Atype%3DValve%2Cname%3DAccessLogValve"; - - /** - * URL for modifying a host logger - */ - private static final String URL_JONASADMIN_MODIFY_HOST_LOGGER = "EditCatalinaAccessLogger.do?select=jonas%3Atype%3DValve%2Cname%3DAccessLogValve%2Chost"; - - /** - * Get logger page - * @param wc logged to jonasAdmin - * @return content frame of logger page - * @throws SAXException if an error occurs when link is matched or clicked - * @throws IOException if an error occurs when link is clicked - */ - public static WebResponse getLoggerPage(WebConversation wc) throws SAXException, IOException { - // Go to logger page (ListLoggers.do) - WebResponse wr; - WebLink link; - - wr = wc.getFrameContents(FRAME_TREE); - - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_LOGGING); - if (link != null) { - link.click(); - } else { - throw new IllegalThreadStateException("The link " + URL_JONASADMIN_LOGGING + " is not found. "); - } - - wr = wc.getFrameContents(FRAME_CONTENT); - return wr; - } - - /** - * Create a new engine logger - * @param wc logged to jonasAdmin - * @throws Exception if an error occurs - */ - public static void createNewEngineLogger(WebConversation wc) throws Exception { - createNewLogger(wc, null, null); - } - - /** - * Create a new host logger: container type = Host and container name = localhost - * @param wc logged to jonasAdmin - * @throws Exception if an error occurs - */ - public static void createNewHostLogger(WebConversation wc) throws Exception { - createNewLogger(wc, "Host", "localhost"); - } - - /** - * Create a new logger - * @param wc logged to jonasAdmin - * @throws Exception if an error occurs - */ - public static void createNewLogger(WebConversation wc, String containerType, String containerName) throws Exception { - - WebResponse wr = null; - WebLink link = null; - WebForm form = null; - - String objectName; - String directory; - String action; - String save; - String resolveHosts; - String rotatable; - String suffix; - String prefix; - String pattern; - - wr = getLoggerPage(wc); - - // Verify if 'Access log valve engine' has yet been created - if (wr.getText().indexOf("AccessLogValve,seq") == -1) { - // Go to EditCatalinaAccessLogger.do?action=create - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_CREATE_LOGGER); - if (link != null) { - link.click(); - } else { - throw new IllegalThreadStateException("The link " + URL_JONASADMIN_CREATE_LOGGER + " is not found. "); - } - wr = wc.getFrameContents(FRAME_CONTENT); - - form = wr.getForms()[0]; - - objectName = form.getParameterValue("objectName"); - directory = form.getParameterValue("directory"); - action = form.getParameterValue("action"); - save = form.getParameterValue("save"); - resolveHosts = form.getParameterValue("resolveHosts"); - rotatable = form.getParameterValue("rotatable"); - suffix = form.getParameterValue("suffix"); - prefix = form.getParameterValue("prefix"); - pattern = form.getParameterValue("pattern"); - if (containerType == null) { - containerName = form.getParameterValue("containerName"); - containerType = form.getParameterValue("containerType"); - } - - createNewLogger(form, objectName, directory, action, save, resolveHosts, rotatable, suffix, prefix, - pattern, containerName, containerType); - - } - } - - /** - * Create a new logger - * @param form Web Form to create logger - * @param objectName a string - * @param directory a string - * @param action a string - * @param save a string - * @param resolveHosts a string - * @param rotatable a string - * @param suffix a string - * @param prefix a string - * @param pattern a string - * @param containerName a string - * @param containerType "Engine" or "Host" - * @throws Exception if an error occurs when the button is clicked - */ - public static void createNewLogger(WebForm form, String objectName, String directory, String action, String save, - String resolveHosts, String rotatable, String suffix, String prefix, String pattern, String containerName, - String containerType) throws Exception { - - SubmitButton button = null; - - form.setParameter("objectName", objectName); - form.setParameter("directory", directory); - form.setParameter("action", action); - form.setParameter("save", save); - form.setParameter("resolveHosts", resolveHosts); - form.setParameter("rotatable", rotatable); - form.setParameter("suffix", suffix); - form.setParameter("prefix", prefix); - form.setParameter("pattern", pattern); - form.setParameter("containerName", containerName); - form.setParameter("containerType", containerType); - - button = form.getSubmitButton("btn_apply"); - button.click(); - } - - /** - * Delete logger - * @param wc logged to jonasAdmin - * @param host - * @throws Exception if an error occurs - */ - public static void deleteLogger(WebConversation wc, String host) throws Exception { - WebResponse wr = null; - WebForm form = null; - WebLink link = null; - SubmitButton button = null; - - String action = ""; - - wr = getLoggerPage(wc); - - // Select logger to remove - form = wr.getForms()[0]; - action = form.getParameterValue("action"); - if (host == null) { - form.setCheckbox("selectedItemsArray", "jonas:type=Valve,name=AccessLogValve", true); - } else { - form.setCheckbox("selectedItemsArray", "jonas:type=Valve,name=AccessLogValve,host=" + host, true); - } - - // Choose remove action - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, "remove"); - if (link != null) { - link.click(); - } else { - throw new IllegalThreadStateException("The link " + "remove" + " is not found. "); - } - wr = wc.getFrameContents(FRAME_CONTENT); - - // Confirm - form = wr.getForms()[0]; - button = form.getSubmitButton("btnSubmit"); - button.click(); - - } - - /** - * Modify a logger - * @param wc logged to jonasAdmin - * @param host null if container type is "engine" else container name - * @param directory a string - * @param resolveHosts "true" or "false" - * @param rotatable "true" or "false" - * @param suffix a string - * @param prefix a string - * @param pattern a string - * @throws Exception if an error occurs - */ - public static void modifyLogger(WebConversation wc, String host, String directory, String resolveHosts, - String rotatable, String suffix, String prefix, String pattern) throws Exception { - - WebResponse wr = null; - WebForm form = null; - WebLink link = null; - SubmitButton button = null; - - String objectName = null; - String action = null; - String save = null; - - wr = getLoggerPage(wc); - - // Get form - if (host == null) { - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_MODIFY_ENGINE_LOGGER); - if (link.getURLString().endsWith(URL_JONASADMIN_MODIFY_ENGINE_LOGGER) - || link.getURLString().indexOf("%2Cseq%3D") != -1) { - if (link != null) { - link.click(); - } else { - throw new IllegalThreadStateException("The link " + URL_JONASADMIN_MODIFY_ENGINE_LOGGER - + " is not found. "); - } - wr = wc.getFrameContents(FRAME_CONTENT); - } else { - throw new IllegalThreadStateException("There is not " + URL_JONASADMIN_MODIFY_ENGINE_LOGGER + " link. "); - } - } else { - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_MODIFY_HOST_LOGGER); - if (link != null) { - link.click(); - } else { - throw new IllegalThreadStateException("The link " + URL_JONASADMIN_MODIFY_HOST_LOGGER - + " is not found. "); - } - - wr = wc.getFrameContents(FRAME_CONTENT); - } - form = wr.getForms()[0]; - - // get hidden params - objectName = form.getParameterValue("objectName"); - action = form.getParameterValue("action"); - save = form.getParameterValue("save"); - - form.setParameter("objectName", objectName); - form.setParameter("action", action); - form.setParameter("save", save); - form.setParameter("directory", directory); - form.setParameter("resolveHosts", resolveHosts); - form.setParameter("rotatable", rotatable); - form.setParameter("suffix", suffix); - form.setParameter("prefix", prefix); - form.setParameter("pattern", pattern); - - button = form.getSubmitButton("btn_apply"); - button.click(); - } - -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/monitoring/C_JonasAdminMonitoring.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/monitoring/C_JonasAdminMonitoring.java deleted file mode 100755 index 8e0b475af1b0081000b38d62c2c0827682ffb332..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/monitoring/C_JonasAdminMonitoring.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.monitoring; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; - -import com.meterware.httpunit.WebConversation; - -import junit.framework.Test; -import junit.framework.TestSuite; - -/** - * Define a class to test monitoring in jonasAdmin - * Test : - monitoring - * - * @author Paul Kemler - */ -public class C_JonasAdminMonitoring extends JonasAdminTestCase { - - /** - * Constructor with a specified name - * @param name the name - */ - public C_JonasAdminMonitoring(String name) { - super(name); - } - - /** - * Get a new TestSuite for this class - * It includes all jonasAdmin tests - * @return a new TestSuite for this class - */ - public static Test suite() { - TestSuite suite = new TestSuite(); - suite.addTest(F_JonasAdminActivatedMonitoring.suite()); - suite.addTest(F_JonasAdminNumberOfMeasures.suite()); - suite.addTest(F_JonasAdminRange.suite()); - return suite; - } - - /** - * Main method - * @param args the arguments - */ - public static void main (String[] args) { - WebConversation wc = new WebConversation(); - junit.textui.TestRunner.run(suite()); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/monitoring/F_JonasAdminActivatedMonitoring.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/monitoring/F_JonasAdminActivatedMonitoring.java deleted file mode 100644 index d8a84c1a7a4fb0112e26a01b528b99b2713f1797..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/monitoring/F_JonasAdminActivatedMonitoring.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.monitoring; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; - -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.TableCell; -import com.meterware.httpunit.WebForm; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; - - -/** - * Define a class to test the JOnAS Admin console - * Test monitoring activation - * @author kemlerp - * - */ -public class F_JonasAdminActivatedMonitoring extends JonasAdminTestCase { - - /** - * URL of the deployment of EARs - */ - private static final String URL_JONASADMIN_MONITORING = "/jonasAdmin/EditMonitoring.do"; - - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminActivatedMonitoring(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminActivatedMonitoring(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminActivatedMonitoring.class); - } - - /** - * Setup need for these tests - * jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - } - - /** - * Test activation monitoring - * @throws Exception if error occurs - */ - public void testMonitoringActivation() throws Exception { - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - // Go to Monitoring - WebResponse wr = wc.getResponse(getAbsoluteUrl(URL_JONASADMIN_MONITORING)); - WebForm[] webForms = wr.getForms(); - WebForm webForm = webForms[0]; - - // deactivate monitoring - webForm.setCheckbox("activated", "on", false); - - wr = webForm.submit(); - assertEquals("there is more one tab. ", -1, wr.getText().indexOf("class=\"tab\"")); - - // Go to another page - wr = wc.getResponse(getAbsoluteUrl(URL_JONASADMIN)); - wr = wc.getResponse(getAbsoluteUrl(URL_JONASADMIN_MONITORING)); - assertEquals("there is more one tab. ", -1, wr.getText().indexOf("class=\"tab\"")); - - - // reactivate monitoring - webForms = wr.getForms(); - webForm = webForms[0]; - webForm.setCheckbox("activated", "on", true); - - wr = webForm.submit(); - assertFalse("there is not at least two tabs. ", wr.getText().indexOf("class=\"tab\"") == -1); - - // verify link tab - TableCell cell = wr.getTables()[0].getTableCell(0, 0).getTables()[0].getTableCell(0, 2); - String attribut; - WebLink[] links; - - attribut = cell.getAttribute("class"); - assertEquals("the tab is not in the wanted cell. ", "tab", attribut); - links = cell.getLinks(); - assertNotNull("there is no link", links); - assertEquals("link is not \"/jonasAdmin/EditMemory.do\"", "/jonasAdmin/EditMemory.do", links[0].getAttribute("href")); - - // Go to another page - wr = wc.getResponse(getAbsoluteUrl(URL_JONASADMIN)); - wr = wc.getResponse(getAbsoluteUrl(URL_JONASADMIN_MONITORING)); - assertFalse("there is not at least two tabs. ", wr.getText().indexOf("class=\"tab\"") == -1); - } - - /** - * Tear Down cleanUp action - * @throws Exception if an error occurs - */ - public void tearDown() throws Exception { - super.tearDown(); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/monitoring/F_JonasAdminNumberOfMeasures.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/monitoring/F_JonasAdminNumberOfMeasures.java deleted file mode 100644 index a9ba5ad917f552c48355d410648aee489ba7e9f3..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/monitoring/F_JonasAdminNumberOfMeasures.java +++ /dev/null @@ -1,272 +0,0 @@ -/* - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.monitoring; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; - -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.WebForm; -import com.meterware.httpunit.WebImage; -import com.meterware.httpunit.WebResponse; - - -/** - * Test the modification of the number of measures - * @author kemlerp - * - */ -public class F_JonasAdminNumberOfMeasures extends JonasAdminTestCase { - - /** - * URL of the deployment of EARs - */ - private static final String URL_JONASADMIN_MEMORY = "/jonasAdmin/EditMemory.do"; - - /** - * CONSTANT which is used to calculate the width of the Memory image - */ - private static final int CONSTANT = 190; - - /** - * - */ - private static final String INITIAL_NB_MEASURES = "120"; - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminNumberOfMeasures(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminNumberOfMeasures(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminNumberOfMeasures.class); - } - - /** - * Setup need for these tests - * jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - } - - /** - * Setup need for these tests - * jonasAdmin is required - * @throws Exception if it fails - */ - public void tearDown() throws Exception { - - super.tearDown(); - - WebResponse wr = wc.getResponse(getAbsoluteUrl(URL_JONASADMIN_MEMORY)); - WebForm[] webForms = wr.getForms(); - WebForm webForm = webForms[0]; - - webForm.setParameter("numberOfMeasures", INITIAL_NB_MEASURES); - wr = webForm.submit(); - } - - /** - * Test image width with a good value - * @throws Exception if error occurs - */ - public void testValidNbMeasures() throws Exception { - - String nbMeasures = "300"; - WebResponse wr; - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - // Modify number of measures - wr = modifyNbMeasures(nbMeasures); - - // Verify image width - WebImage imageMemory = wr.getImageWithName("memory"); - assertEquals("the width of the Memory image is wrong. ", "" + calculateWidth(nbMeasures), imageMemory.getAttribute("width")); - - } - - /** - * Test image width with a number of measures is not an integer - * @throws Exception if error occurs - */ - public void testNotIntegerNbMeasures() throws Exception { - - String nbMeasures = "100.2"; - WebResponse wr; - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - // Modify number of measures - wr = modifyNbMeasures(nbMeasures); - - // Verify no image - assertNull("there is the Memory image. ", wr.getImageWithName("memory")); - - // Verify error message - assertTrue("there is not error message. ", wr.getText().indexOf("
  • ") != -1); - } - - /** - * Test image width with a number of measures is 1 - * @throws Exception if error occurs - */ - public void testNbMeasuresLessThanOne() throws Exception { - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - - String nbMeasures = "1"; - WebResponse wr; - - // Modify number of measures - wr = modifyNbMeasures(nbMeasures); - // Verify no image - assertNull("there is the Memory image. ", wr.getImageWithName("memory")); - // Verify error message - assertTrue("there is not error message. ", wr.getText().indexOf("
  • ") != -1); - - - nbMeasures = "0"; - - // Modify number of measures - wr = modifyNbMeasures(nbMeasures); - // Verify no image - assertNull("there is the Memory image. ", wr.getImageWithName("memory")); - // Verify error message - assertTrue("there is not error message. ", wr.getText().indexOf("
  • ") != -1); - - - nbMeasures = "-1"; - - // Modify number of measures - wr = modifyNbMeasures(nbMeasures); - // Verify no image - assertNull("there is the Memory image. ", wr.getImageWithName("memory")); - // Verify error message - assertTrue("there is not error message. ", wr.getText().indexOf("
  • ") != -1); - - - nbMeasures = "-99999"; - - // Modify number of measures - wr = modifyNbMeasures(nbMeasures); - // Verify no image - assertNull("there is the Memory image. ", wr.getImageWithName("memory")); - // Verify error message - assertTrue("there is not error message. ", wr.getText().indexOf("
  • ") != -1); - } - - /** - * Calculate the width of Memory image - * @param nbMeasures number of measures - * @return width - */ - public int calculateWidth(String nbMeasures) { - return Integer.parseInt(nbMeasures) * 2 + CONSTANT; - } - - /** - * Modify number of measures - * @param nbMeasures number of measures - * @return response - * @throws Exception if error occurs - */ - public WebResponse modifyNbMeasures(String nbMeasures) throws Exception { - - // Go to Monitoring Memory - WebResponse wr = wc.getResponse(getAbsoluteUrl(URL_JONASADMIN_MEMORY)); - WebForm[] webForms = wr.getForms(); - WebForm webForm = webForms[0]; - - webForm.setParameter("numberOfMeasures", nbMeasures); - return wr = webForm.submit(); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/monitoring/F_JonasAdminRange.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/monitoring/F_JonasAdminRange.java deleted file mode 100755 index 0befd8a498fa12fd9948e82b92088b91f4bd498f..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/monitoring/F_JonasAdminRange.java +++ /dev/null @@ -1,263 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.monitoring; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; - -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.WebForm; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; - - -public class F_JonasAdminRange extends JonasAdminTestCase { - - /** - * URL of the Monitoring - */ - private static final String URL_JONASADMIN_MONITORING = "EditMonitoring.do"; - - /** - * URL of the Memory - */ - private static final String URL_JONASADMIN_MEMORY = "/jonasAdmin/EditMemory.do"; - - /** - * CONSTANT which is used to calculate the timer Graphic - */ - private static final int CONSTANT = 2; - - /** - * INITIAL RANGE VALUE - */ - private static final String INITIAL_RANGE = "10"; - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminRange(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminRange(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminRange.class); - } - - /** - * Setup need for these tests - * jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - } - - /** - * Test monitoring range with a correct value - * @throws Exception if error occurs - * - */ - public void testSuccessful() throws Exception { - - String range = "22"; - WebResponse wr; - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - // Modify number of measures - wr = modifyNbMeasures(range); - - // Verify range - String text = wr.getText(); - int start = text.indexOf("function refresh()"); - int end = text.indexOf("}", start); - // Get script - String refreshScript = text.substring(start, end); - - // Get value - start = refreshScript.indexOf("setTimeout(\"refresh()\", ") + "setTimeout(\"refresh()\", ".length(); - end = refreshScript.indexOf(");", start); - String value = refreshScript.substring(start, end); - - // Verify refresh value in javascript function - assertEquals("the range of the Memory image is wrong. ", "" + calculateTimerGraphic(range), value); - - // Verify error message - assertFalse("there is an error message. ", wr.getElementsWithAttribute("class", "errors").length > 0); - } - - /** - * Test monitoring range with too small value - * @throws Exception if error occurs - * - */ - public void testTooSmallValue() throws Exception { - - String range = "9"; - WebResponse wr; - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - // Modify number of measures - wr = modifyNbMeasures(range); - - // Verify error message - assertTrue("there is not error message. ", wr.getElementsWithAttribute("class", "errors").length > 0); - } - - /** - * Test the memory servlet - * @throws Exception if error occurs - * - */ - public void testMemoryServlet() throws Exception { - WebResponse wr; - WebLink link; - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - // Go to Monitoring - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_MONITORING); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to Memory - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_MEMORY); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Refresh the image - String servletUrl = prefixUrl + "/jonasAdmin/MemoryGraphServlet?1"; - WebResponse imgResponse = wc.getResponse(servletUrl); - - // Verify image - assertEquals("'" + servletUrl + "' doesn't send a png image. ", "image/png", imgResponse.getHeaderField("CONTENT-TYPE")); - - } - - /** - * Calculate the timer graphic - * @param range range - * @return timer graphic - */ - public int calculateTimerGraphic(String range) { - return (Integer.parseInt(range) + CONSTANT) * 1000; - } - - /** - * Modify range - * @param range range - * @return response - * @throws Exception if error occurs - */ - public WebResponse modifyNbMeasures(String range) throws Exception { - - // Go to Monitoring Memory - WebResponse wr = wc.getResponse(getAbsoluteUrl(URL_JONASADMIN_MEMORY)); - - WebForm[] webForms = wr.getForms(); - WebForm webForm = webForms[0]; - - webForm.setParameter("range", range); - return wr = webForm.submit(); - } - - /** - * Tear Down - * cleanUp action - */ - public void tearDown() throws Exception { - super.tearDown(); - WebResponse wr = wc.getResponse(getAbsoluteUrl(URL_JONASADMIN_MEMORY)); - WebForm[] webForms = wr.getForms(); - WebForm webForm = webForms[0]; - - webForm.setParameter("range", INITIAL_RANGE); - wr = webForm.submit(); - } -} \ No newline at end of file diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/navigation/C_JonasAdminNavigation.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/navigation/C_JonasAdminNavigation.java deleted file mode 100755 index 8e31ca084e7e623b64f28fd0f2f33976d75d2999..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/navigation/C_JonasAdminNavigation.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.navigation; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; - -import com.meterware.httpunit.WebConversation; - -import junit.framework.Test; -import junit.framework.TestSuite; - -/** - * Define a class to test navigation in jonasAdmin - * Test : - navigation - * - * @author Paul Kemler - */ -public class C_JonasAdminNavigation extends JonasAdminTestCase { - - /** - * Constructor with a specified name - * @param name the name - */ - public C_JonasAdminNavigation(String name) { - super(name); - } - - /** - * Get a new TestSuite for this class - * It includes all jonasAdmin tests - * @return a new TestSuite for this class - */ - public static Test suite() { - TestSuite suite = new TestSuite(); - suite.addTest(F_JonasAdminNavigation.suite()); - suite.addTest(F_JonasAdminLogout.suite()); - return suite; - } - - /** - * Main method - * @param args the arguments - */ - public static void main (String[] args) { - WebConversation wc = new WebConversation(); - junit.textui.TestRunner.run(suite()); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/navigation/F_JonasAdminLogout.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/navigation/F_JonasAdminLogout.java deleted file mode 100755 index 1a49d2641b3628993d4f88fa1eff8c880f2ac06f..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/navigation/F_JonasAdminLogout.java +++ /dev/null @@ -1,173 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.navigation; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; - -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; - -/** - * Class to test jonasAdmin log out - * @author kemlerp - * - */ -public class F_JonasAdminLogout extends JonasAdminTestCase { - - /** - * URL of log out - */ - private static final String URL_JONASADMIN_LOGOUT = "logOut.do"; - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminLogout(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminLogout(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminLogout.class); - } - - /** - * Setup need for these tests - * jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - } - - /** - * - * @throws Exception if error occurs - * - */ - public void testLogout() throws Exception { - - WebResponse wr; - WebResponse topFrame; - WebLink link; - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - // Get the frame "top" - topFrame = wc.getFrameContents(FRAME_TOP); - - link = topFrame.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_LOGOUT); - wr = link.click(); - - assertTrue("It is not the login page. ", wr.getText().indexOf("login.jsp") != -1); - try { - wc.getFrameContents(FRAME_TREE); - fail("There is tree frame. "); - } catch (Exception e){ - // It is OK - } - - - // Go to Welcome.do - wc.getResponse(getAbsoluteUrl(URL_JONASADMIN + "/Welcome.do")); - - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - - try { - assertNotNull("There is not tree frame. ", wc.getFrameContents(FRAME_TREE)); - } catch (Exception e) { - fail("There is not tree frame. "); - } - } - - /** - * Tear Down cleanUp action - * @throws Exception if an error occurs - */ - public void tearDown() throws Exception { - super.tearDown(); - } -} \ No newline at end of file diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/navigation/F_JonasAdminNavigation.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/navigation/F_JonasAdminNavigation.java deleted file mode 100755 index 1718de84f581706bac40b8d3d7c3a01d14aa5093..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/navigation/F_JonasAdminNavigation.java +++ /dev/null @@ -1,759 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.navigation; - -import java.io.IOException; -import java.util.Vector; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminFiles; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTree; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminUtils; -import org.xml.sax.SAXException; - -import com.meterware.httpunit.HttpException; -import com.meterware.httpunit.HttpNotFoundException; -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.TableCell; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - -/** - * Define a class to test the JOnAS Admin console - * Test all links, content title, selected tree item - * @author kemlerp - * - */ -public class F_JonasAdminNavigation extends JonasAdminTestCase { - - /** - * SUCCESS CODE - */ - private static final int HTTP_SUCCESS_CODE = 200; - - /** - * NAME OF THE EAR LINK - */ - private static final String EAR_LINK_NAME = "Applications (EAR)"; - - /** - * URL of the bean alarm record - */ - private static final String URL_JONASADMIN_ALARM_RECORD = "/jonasAdmin/EditEjbEnt.do?select=jonas:j2eeType=EntityBean,name=AlarmRecord,EJBModule=alarm,J2EEApplication=alarm,J2EEServer=jonas"; - - /** - * URL of the synchronize button - */ - private static final String URL_JONASADMIN_SYNCHRONIZE = "/jonasAdmin/ExecuteEjb.do?action=synchronize"; - - /** - * URL of the reduce instance button - */ - private static final String URL_JONASADMIN_REDUCE = "/jonasAdmin/ExecuteEjb.do?action=reduceCache"; - - /** - * URL of the reduce pool instance button - */ - private static final String URL_JONASADMIN_REDUCE_POOL = "/jonasAdmin/ExecuteEjb.do?action=reducePool"; - - /** - * URL of the new group instance button - */ - private static final String URL_JONASADMIN_NEW_GROUP = "/jonasAdmin/EditNewGroupMemoryRealm.do?action=create"; - - /** - * URL of the new user instance button - */ - private static final String URL_JONASADMIN_NEW_USER = "/jonasAdmin/EditNewUserMemoryRealm.do?action=create"; - - /** - * Class value of the selected tree control - */ - private static final String CLASS_TREE_CONTROL_SELECTED = "tree-control-selected"; - - /** - * Name of the property navigation.mbean - */ - private static final String NAVIGATION_MBEAN = "navigation.mbean"; - - /** - * Name of the property navigation.link - */ - private static final String NAVIGATION_LINK = "navigation.link"; - - /** - * Name of the property navigation.contentTitle - */ - private static final String NAVIGATION_CONTENT_TITLE = "navigation.contentTitle"; - - /** - * Name of the property navigation.selectedItem - */ - private static final String NAVIGATION_SELECTED_ITEM = "navigation.selectedItem"; - - /** - * Name of the property navigation.titleTomThumb - */ - private static final String NAVIGATION_TITLE_TOM_THUMB = "navigation.titleTomThumb"; - - /** - * Name of the property navigation.rarInEar - */ - private static final String NAVIGATION_RAR_IN_EAR = "navigation.rarInEar"; - - /** - * Time of beginning testAllLinks - */ - private String beginTime; - - /** - * Time of ending testAllLinks - */ - private String endTime; - - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminNavigation(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminNavigation(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminNavigation.class); - } - - /** - * Setup need for these tests - * jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - // Get time - beginTime = getTime(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - undeployAllEar(); - undeployAllJar(); - - useEar("autoload/mejb"); - } - - /** - * Test all about the navigation - * @throws Exception if error occurs - * - */ - public void testAll() throws Exception { - - Vector viewedURLs = new Vector(); - WebResponse wr; - - viewedURLs.add(URL_JONASADMIN); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - // add links - // deploy ear - if (jProp.isEar()) { - useEar("alarm"); - if (jProp.isResource()) { - if (configFile != null) { - if (configFile.get(NAVIGATION_RAR_IN_EAR).equals("on")) { - useEar("earsample"); - } - } else { - useEar("earsample"); - } - } - // Reload the page - wc.getResponse(getAbsoluteUrl(URL_JONASADMIN)); - } - - // Get the frame "tree" - WebResponse treeFrame = wc.getFrameContents(FRAME_TREE); - - // Open tree - try { - treeFrame = JonasAdminTree.openTree(treeFrame, wc); - } catch (IOException e) { - fail("failed to open tree. " + e); - } - - // When EJB service is actived - if (jProp.isEjb()) { - // Particular cases because of values of the session do not correspond at the page - // 1-"/jonasAdmin/ExecuteEjb.do?action=synchronize" - testParticularCase("name=AlarmRecord", "synchronize", URL_JONASADMIN_SYNCHRONIZE, viewedURLs); - - // 2-"/jonasAdmin/ExecuteEjb.do?action=reduceCache" - testParticularCase("name=AlarmRecord", "reduceCache", URL_JONASADMIN_REDUCE, viewedURLs); - - // 3-"/jonasAdmin/ExecuteEjb.do?action=reducePool" - testParticularCase("EditEjbSbl.do?select=jonas:j2eeType=StatelessSessionBean,name=MEJB,EJBModule=mejb,J2EEApplication=mejb,J2EEServer=jonas", "reducePool", URL_JONASADMIN_REDUCE_POOL, viewedURLs); - } - - // 4-"/jonasAdmin/EditNewGroupMemoryRealm.do?action=create" - testParticularCase("memrlm_1", "Groups.do", "action=create", URL_JONASADMIN_NEW_GROUP, viewedURLs); - - // 5-"/jonasAdmin/EditNewUserMemoryRealm.do?action=create" - testParticularCase("memrlm_1", "Users.do", "action=create", URL_JONASADMIN_NEW_USER, viewedURLs); - - // Verify all links are not viewTree.do - try { - verifyLinks(treeFrame, viewedURLs); - } catch (IOException e) { - throw new IllegalStateException("Problem to verify all links. " + e); - } catch (Exception e) { - throw new IllegalStateException("Problem to verify all links. " + e); - } - - // Test MBean - if (configFile.get(NAVIGATION_MBEAN).equals("on")) { - testMBean(viewedURLs); - } - } - - /** - * Verify all links in frame - * @param frame The frame - * @param viewedURLs All URLs have just been viewed - * @throws IOException if error occurs to get response - * @throws Exception if error occurs to get response - */ - public void verifyLinks(WebResponse frame, Vector viewedURLs) throws Exception, IOException { - - WebLink[] links = null; - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - // Get links - links = frame.getLinks(); - WebResponse wr; - - for (int i = 0; i < links.length; i++) { - // Verify all links are not viewTree.do and don't contain "://" - if (links[i].getURLString().indexOf("viewTree.do") == -1 && links[i].getURLString().indexOf("ListMBeanDetails.do") == -1 && links[i].getURLString().indexOf("://") == -1) { - if (!viewedURLs.contains(links[i].getURLString())) { - executeTests(frame, links[i], viewedURLs); - - // Verify content frame links - WebResponse contentFrame = wc.getFrameContents(FRAME_CONTENT); - verifyLinks(contentFrame, viewedURLs); - } - } - } - } - - /** - * Test links and content titles for a particular case - * @param treeLink the link of the tree frame to click - * @param contentLink the link of the content frame to click - * @param url the url to test - * @param viewedURLs All URLs have just been viewed - * @throws Exception if an error occurs - */ - private void testParticularCase(String treeLink, String contentLink, String url, Vector viewedURLs) throws Exception { - WebLink link; - WebResponse wr; - WebResponse frame; - - frame = wc.getFrameContents(FRAME_TREE); - link = frame.getFirstMatchingLink( WebLink.MATCH_URL_STRING, treeLink); - if (link == null) { - throw new IllegalStateException("No link found for treelink : '" + treeLink + "'."); - } - wr = link.click(); - - frame = wc.getFrameContents(FRAME_CONTENT); - link = frame.getFirstMatchingLink( WebLink.MATCH_URL_STRING, contentLink); - - if (link == null) { - throw new IllegalStateException("No link found for treelink : '" + treeLink + "'."); - } - executeTests(frame, link, viewedURLs); - } - - /** - * Test links and content titles for a particular case - * @param treeLink the link of the tree frame to click - * @param contentLink the link of the content frame to click - * @param contentLink2 the second link of the content frame to click - * @param url the url to test - * @param viewedURLs All URLs have just been viewed - * @throws Exception if an error occurs - */ - private void testParticularCase(String treeLink, String contentLink, String contentLink2, String url, Vector viewedURLs) throws Exception { - - WebLink link; - WebResponse wr; - WebResponse frame; - - frame = wc.getFrameContents(FRAME_TREE); - link = frame.getFirstMatchingLink(WebLink.MATCH_URL_STRING, treeLink); - if (link == null) { - throw new IllegalStateException("No link found for treelink : '" + treeLink + "'."); - } - wr = link.click(); - - frame = wc.getFrameContents(FRAME_CONTENT); - link = frame.getFirstMatchingLink(WebLink.MATCH_URL_STRING, contentLink); - if (link == null) { - throw new IllegalStateException("No link found for contentLink : '" + contentLink + "'."); - } - wr = link.click(); - - frame = wc.getFrameContents(FRAME_CONTENT); - link = frame.getFirstMatchingLink(WebLink.MATCH_URL_STRING, contentLink2); - if (link == null) { - throw new IllegalStateException("No link found for contentLink2 : '" + contentLink2 + "'."); - } - - executeTests(frame, link, viewedURLs); - } - - /** - * call the tests - * @param frame The frame where the link is - * @param link A no null link - * @param viewedURLs All URLs have just been viewed - * @throws SAXException If an error occurs - */ - private void executeTests(WebResponse frame, WebLink link, Vector viewedURLs) throws SAXException { - - WebResponse wr; - try { - wr = link.click(); - // To check if the link is correct - if (configFile.get(NAVIGATION_LINK).equals("on")) { - testLinks(wr); - } - } catch (HttpNotFoundException e) { - if (configFile.get(NAVIGATION_LINK).equals("on")) { - fail("failed to click : link = " + link.getText() + ", URL = " + link.getURLString() + ", page = " + viewedURLs.lastElement() + ". " + e); - } - } catch (HttpException e) { - if (configFile.get(NAVIGATION_LINK).equals("on")) { - fail("failed to click : link = " + link.getText() + ", URL = " + link.getURLString() + ", page = " + viewedURLs.lastElement() + ". " + e); - } - } catch (IOException e) { - if (configFile.get(NAVIGATION_LINK).equals("on")) { - fail("failed to click : link = " + link.getText() + ", URL = " + link.getURLString() + ", page = " + viewedURLs.lastElement() + ". " + e); - } - } - - // To check if the content title is correct - if (configFile.get(NAVIGATION_CONTENT_TITLE).equals("on")) { - testContentTitle(link.getURLString()); - } - - // To check if the selected item is correct for links of the tree frame - if (frame.getFrameName().equalsIgnoreCase(FRAME_TREE)) { - if (configFile.get(NAVIGATION_SELECTED_ITEM).equals("on")) { - testTreeSelected(link.getURLString()); - } - } - - // To check if the title tom thumb is correct - if (configFile.get(NAVIGATION_TITLE_TOM_THUMB).equals("on")) { - testTitleTomThumb(link.getURLString()); - } - - // Add URL to viewed URLs - viewedURLs.add(link.getURLString()); - } - - /** - * Test if the response is a success - * @param wr - */ - private void testLinks(WebResponse wr) { - assertEquals("a code of 200 (success) should be returned. ", HTTP_SUCCESS_CODE, wr.getResponseCode()); - } - - /** - * Test jonasAdmin content titles - * @param url The url of the link that was clicked - * @throws SAXException if an error occurs when getElementsWithAttribute is called - */ - private void testContentTitle(String url) throws SAXException { - - WebResponse tree = null; - WebResponse content = null; - String treeTitle = null; - String contentTitle = null; - - // Verify content title of the content frame - content = wc.getFrameContents(FRAME_CONTENT); - tree = wc.getFrameContents(FRAME_TREE); - - // Get title from the tree frame - if (tree.getElementsWithAttribute("class", CLASS_TREE_CONTROL_SELECTED).length == 1) { - treeTitle = new String(tree.getElementsWithAttribute("class", CLASS_TREE_CONTROL_SELECTED)[0].getText()); - } - - // Get title from the content frame - if (content.getElementsWithAttribute("class", "contentTitle").length == 1) { - contentTitle = new String(content.getElementsWithAttribute("class", "contentTitle")[0].getText()); - } - if (treeTitle != null && contentTitle != null) { - assertEquals("The content title (" + contentTitle + ") is different of the link name (" + treeTitle + "). Clicked link was " + url, treeTitle, contentTitle); - } else { - if (!url.equals(URL_JONASADMIN)) { - if (treeTitle != null) { - try { - fail("Content title is null. Name of the selected link was " + treeTitle + ". Link URL: " + url + " Content frame: " + content.getText()); - } catch (IOException e) { - fail("Content title is null. Name of the selected link was " + treeTitle + ". Link URL: " + url + " Error to get content frame text"); - } - } else { - if (contentTitle != null) { - fail("No link is selected. Content title was " + contentTitle); - } else { - try { - fail("No link and no content title are found. Tree frame: " + tree.getText() + ". Content frame: " + content.getText()); - } catch (IOException e) { - fail("No link and no content title are found because there is a problem in tree frame or content frame. "); - } - } - } - } - } - - // To free memory - content = null; - tree = null; - } - - /** - * Test jonasAdmin selection of tree items - * @param selectedLink The url of the link that was clicked - */ - private void testTreeSelected(String selectedLink) { - - WebResponse tree = null; - - // Verify tree frame - tree = wc.getFrameContents(FRAME_TREE); - - try { - if (!JonasAdminTree.treeControlSelected(tree, selectedLink)) { - fail("The name of the link " + selectedLink + " is not selected in the tree."); - } - } catch (SAXException sax) { - fail("" + sax); - } - - tree = null; - } - - /** - * Test the jonasAdmin title tom thumb - * @param url The url of the link that was clicked - */ - private void testTitleTomThumb(String url) { - WebResponse contentFrame = wc.getFrameContents(FRAME_CONTENT); - WebResponse treeFrame = wc.getFrameContents(FRAME_TREE); - WebTable thumbTable = null; - WebTable treeTable = null; - TableCell thumbCell = null; - TableCell treeCell = null; - String text = null; - String[] thumbs = null; - String[] treeThumbs = null; - JonasAdminUtils utils = new JonasAdminUtils(); - int row; - int column; - - try { - thumbTable = contentFrame.getTables()[0]; - } catch (SAXException e) { - fail("There is no table in content frame: " + e); - } - - thumbCell = thumbTable.getTableCell(0, 0); - text = thumbCell.getText(); - thumbs = text.split(" > "); - - - try { - treeTable = treeFrame.getTables()[0]; - } catch (SAXException e) { - fail("There is no table in tree frame: " + e); - } - JonasAdminUtils.CoordCell coord = utils.getSelectedItemRow(treeTable); - - if (!url.equals(URL_JONASADMIN)) { - row = coord.getRow().intValue(); - column = coord.getColumn().intValue(); - // get parents of the selected item - treeThumbs = new String[thumbs.length]; - int i = thumbs.length; - while (row > 0 && column > 3 && i > 0) { - boolean found = false; - column--; - i--; - // get the row parent - int nextRow = row; - while (nextRow > 0 && !found) { - nextRow--; - treeCell = treeTable.getTableCell(nextRow, column-2); - if (treeCell.getElementsWithAttribute("src", "images/tree/node_open_middle.gif").length == 1) { - treeCell = treeTable.getTableCell(nextRow, column); - treeThumbs[i] = treeCell.getText(); - found = true; - assertEquals("For the link " + url, treeThumbs[i], thumbs[i]); - } else if (treeCell.getElementsWithAttribute("src", "images/tree/node_open_last.gif").length == 1) { - treeCell = treeTable.getTableCell(nextRow, column); - treeThumbs[i] = treeCell.getText(); - found = true; - assertEquals("For the link " + url, treeThumbs[i], thumbs[i]); - } else if (treeCell.getElementsWithAttribute("src", "images/tree/node_open_first.gif").length == 1) { - treeCell = treeTable.getTableCell(nextRow, column); - treeThumbs[i] = treeCell.getText(); - found = true; - assertEquals("For the link " + url, treeThumbs[i], thumbs[i]); - } else if (treeCell.getElementsWithAttribute("src", "images/tree/node_open.gif").length == 1) { - treeCell = treeTable.getTableCell(nextRow, column); - treeThumbs[i] = treeCell.getText(); - found = true; - assertEquals("For the link " + url, treeThumbs[i], thumbs[i]); - } - } - row = nextRow; - } - } - } - - /** - * Test links, content titles, selected tree of mbeans - * @throws Exception if an error occurs - */ - private void testMBean(Vector viewedURLs) throws Exception { - WebResponse wr = wc.getFrameContents(FRAME_TREE); - WebLink link; - - // Open MBean branch - if (wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, "viewTree.do?tree=domain*mbeans*j2ee") == null) { - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, "viewTree.do?tree=domain*mbeans"); - if (link == null) { - throw new IllegalStateException("The link viewTree.do?domain*mbeans is not found in tree. "); - } - wr = link.click(); - } - // J2EE MBeans - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, "viewTree.do?tree=domain*mbeans*j2ee"); - if (link == null) { - throw new IllegalStateException("The link viewTree.do?domain*mbeans*j2ee is not found in tree. "); - } - wr = link.click(); - - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, "viewTree.do?tree=domain*mbeans*j2ee*"); - if (link == null) { - throw new IllegalStateException("The link viewTree.do?domain*mbeans*j2ee* is not found in tree. "); - } - wr = link.click(); - - link = wr.getMatchingLinks(WebLink.MATCH_URL_STRING, "viewTree.do?tree=domain*mbeans*j2ee*")[1]; - if (link == null) { - throw new IllegalStateException("The 2nd link viewTree.do?domain*mbeans*j2ee* is not found in tree. "); - } - wr = link.click(); - // OWNER MBeans - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, "viewTree.do?tree=domain*mbeans*owner"); - if (link == null) { - throw new IllegalStateException("The link viewTree.do?domain*mbeans*owner is not found in tree. "); - } - wr = link.click(); - - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, "viewTree.do?tree=domain*mbeans*owner*"); - if (link == null) { - throw new IllegalStateException("The link viewTree.do?domain*mbeans*owner* is not found in tree. "); - } - wr = link.click(); - - link = wr.getMatchingLinks(WebLink.MATCH_URL_STRING, "viewTree.do?tree=domain*mbeans*owner*")[1]; - if (link == null) { - throw new IllegalStateException("The 2nd link viewTree.do?domain*mbeans*owner* is not found in tree. "); - } - wr = link.click(); - - // OTHER MBeans - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, "viewTree.do?tree=domain*mbeans*unknown"); - if (link == null) { - throw new IllegalStateException("The link viewTree.do?domain*mbeans*unknow is not found in tree. "); - } - wr = link.click(); - - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, "viewTree.do?tree=domain*mbeans*unknown*"); - if (link == null) { - throw new IllegalStateException("The link viewTree.do?domain*mbeans*unknow* is not found in tree. "); - } - wr = link.click(); - - link = wr.getMatchingLinks(WebLink.MATCH_URL_STRING, "viewTree.do?tree=domain*mbeans*unknown*")[1]; - if (link == null) { - throw new IllegalStateException("The 2nd link viewTree.do?domain*mbeans*unknow* is not found in tree. "); - } - wr = link.click(); - - // Tests - ListMBeans.do - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, "ListMBeans.do"); - if (link == null) { - throw new IllegalStateException("ListMBeans.do was not found in tree. "); - } - executeTests(wr, link, viewedURLs); - - // Tests - ListJ2eeMBeans.do - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, "ListJ2eeMBeans.do"); - if (link == null) { - throw new IllegalStateException("ListJ2eeMBeans.do was not found in tree. "); - } - executeTests(wr, link, viewedURLs); - - // Tests - ListOwnerMBeans.do - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, "ListOwnerMBeans.do"); - if (link == null) { - throw new IllegalStateException("ListOwnerMBeans.do was not found in tree. "); - } - executeTests(wr, link, viewedURLs); - - // Tests - ListUnknownMBeans.do - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, "ListUnknownMBeans.do"); - if (link == null) { - throw new IllegalStateException("ListUnknownMBeans.do was not found in tree. "); - } - executeTests(wr, link, viewedURLs); - - // Tests - ListMBeanDetails.do - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, "ListMBeanDetails.do"); - if (link == null) { - throw new IllegalStateException("ListMBeanDetails.do was not found in tree. "); - } - executeTests(wr, link, viewedURLs); - - // Tests - ListMBeanAttributes.do - wr = wc.getFrameContents(FRAME_CONTENT); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, "ListMBeanAttributes.do"); - if (link == null) { - throw new IllegalStateException("ListMBeansAttributes.do was not found in tree. "); - } - executeTests(wr, link, viewedURLs); - - // Tests - ListMBeanOperations.do - wr = wc.getFrameContents(FRAME_CONTENT); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, "ListMBeanOperations.do"); - if (link == null) { - throw new IllegalStateException("ListMBeansOperations.do was not found in tree. "); - } - executeTests(wr, link, viewedURLs); - - // Tests - ListMBeanProperties.do - wr = wc.getFrameContents(FRAME_CONTENT); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, "ListMBeanProperties.do"); - if (link == null) { - throw new IllegalStateException("ListMBeansProperties.do was not found in tree. "); - } - executeTests(wr, link, viewedURLs); - } - - /** - * Tear Down cleanUp action - * @throws Exception if an error occurs for close JMX connection - */ - public void tearDown() throws Exception { - super.tearDown(); - // Get time - endTime = getTime(); - - // Delete created files: server.xml - JonasAdminFiles.recoverServerConf(beginTime, endTime); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/resource/C_JonasAdminResource.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/resource/C_JonasAdminResource.java deleted file mode 100755 index c703190edba7763c600292754011563d569c0b2d..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/resource/C_JonasAdminResource.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.resource; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; - -import com.meterware.httpunit.WebConversation; - -import junit.framework.Test; -import junit.framework.TestSuite; - -/** - * Define a class to test Resource in jonasAdmin - * Test : - Resource - * - * @author Paul Kemler - */ -public class C_JonasAdminResource extends JonasAdminTestCase { - - /** - * Constructor with a specified name - * @param name the name - */ - public C_JonasAdminResource(String name) { - super(name); - } - - /** - * Get a new TestSuite for this class - * It includes all jonasAdmin tests - * @return a new TestSuite for this class - */ - public static Test suite() { - TestSuite suite = new TestSuite(); - suite.addTest(F_JonasAdminResourceDatasource.suite()); - suite.addTest(F_JonasAdminResourceMail.suite()); - - return suite; - } - - /** - * Main method - * @param args the arguments - */ - public static void main (String[] args) { - WebConversation wc = new WebConversation(); - junit.textui.TestRunner.run(suite()); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/resource/F_JonasAdminResourceDatasource.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/resource/F_JonasAdminResourceDatasource.java deleted file mode 100755 index c5cc4c37536f0b86edaf6b9e908bbc4e0d1c094d..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/resource/F_JonasAdminResourceDatasource.java +++ /dev/null @@ -1,592 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.resource; - -import java.util.Properties; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminFiles; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminUtils; - -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.SubmitButton; -import com.meterware.httpunit.TableCell; -import com.meterware.httpunit.WebForm; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - -/** - * Class for testing datasource Resource - * @author Paul Kemler - */ -public class F_JonasAdminResourceDatasource extends JonasAdminTestCase { - - /** - * URL of datasource resource - */ - private static final String URL_JONASADMIN_DATASOURCE = "EditDeploy.do?type=datasource"; - - /** - * URL of datasource resource - */ - private static final String URL_JONASADMIN_LIST_DATASOURCES = "ListDatasources.do"; - - /** - * URL of deploy - */ - private static final String URL_JONASADMIN_DEPLOY = "EditDeploy.do"; - - /** - * URL of create datasource - */ - private static final String URL_JONASADMIN_CREATE_DATASOURCE = "EditDatasourceProperties.do?action=create"; - - /** - * URL of Datasource resource viewTree - */ - private static final String URL_JONASADMIN_VIEW_DATASOURCE = "viewTree.do?tree=domain*jonas*resources"; - - /** - * number of tabs when you are in the datasource tabs - */ - private static final int NUMBER_OF_TABS_FOR_DATASOURCE = 2; - - /** - * number of tabs when you are in the CONFIRM tabs - */ - private static final int NUMBER_OF_TABS_FOR_CONFIRM = 3; - - /** - * number of tabs when you are in the 'new datasource' tabs - */ - private static final int NUMBER_OF_TABS_FOR_NEW_DATASOURCE = 3; - - /** - * name of the datasource - */ - private String name = ""; - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminResourceDatasource(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminResourceDatasource(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminResourceDatasource.class); - } - - /** - * Setup need for these tests jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - } - - /** - * Test to deploy and undeploy a datasource - * @throws Exception if error occurs - */ - public void testUndeployDeployDatasource() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - int selectedTab; - /* - * To get some utils for WebTable - */ - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - if (jProp.isDbm()) { - // Add datasource - name = "new_datasource"; - Properties properties = new Properties(); - properties.put("datasource.name", name); - properties.put("datasource.url", "jdbc:hsqldb:hsql://localhost:9001/db_jonas"); - properties.put("datasource.classname", "org.hsqldb.jdbcDriver"); - properties.put("datasource.username", "jonas"); - properties.put("datasource.password", "jonas"); - properties.put("datasource.mapper", "rdb.hsql"); - properties.put("jdbc.connchecklevel", "0"); - properties.put("jdbc.connmaxage", "1440"); - properties.put("jdbc.maxopentime", "60"); - properties.put("jdbc.connteststmt", "select 1"); - properties.put("jdbc.minconpool", "10"); - properties.put("jdbc.maxconpool", "30"); - properties.put("jdbc.samplingperiod", "30"); - properties.put("jdbc.maxwaittime", "5"); - properties.put("jdbc.maxwaiters", "100"); - - useDatasource(name, properties); - - // Go to database - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_DATASOURCE); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 1; - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_DATASOURCE, selectedTab, "Problem in 'Deployment' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_LIST_DATASOURCES + " is not found in the second tab. ", tabTable - .getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_LIST_DATASOURCES)); - - String txt = getDeployTable(wr, true); - - if (txt.indexOf(name) == -1) { - fail("The file" + name + " was not found as deployed."); - } - - // Undeploy datasource - WebForm[] webForms = wr.getForms(); - WebForm webForm = webForms[0]; - - String params = webForm.getParameterValue("undeploy"); - WebForm.Scriptable script = webForm.getScriptableObject(); - if (params.length() == 0) { - params += name; - } else { - params += "," + name; - } - script.setParameterValue("undeploy", params); - - SubmitButton button = webForm.getSubmitButtons()[0]; - button.click(); - - // Confirm - WebResponse submitUndeploy = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 2; - - // Verify tabs - tabTable = utils.getTabTable(submitUndeploy); - testTabs(tabTable, NUMBER_OF_TABS_FOR_CONFIRM, selectedTab, "Problem in 'Confirm' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_DEPLOY + " is not found in the first tab. ", tabTable.getTableCell( - 0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_DEPLOY)); - assertTrue("The link " + URL_JONASADMIN_LIST_DATASOURCES + " is not found in the third tab. ", tabTable - .getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_LIST_DATASOURCES)); - - webForms = submitUndeploy.getForms(); - webForm = webForms[0]; - - button = webForm.getSubmitButtons()[0]; - button.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_CONFIRM, selectedTab, "Problem in 'Result' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_DEPLOY + " is not found in the first tab. ", tabTable.getTableCell( - 0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_DEPLOY)); - assertTrue("The link " + URL_JONASADMIN_LIST_DATASOURCES + " is not found in the third tab. ", tabTable - .getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_LIST_DATASOURCES)); - - // Go back to Deployment - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_DEPLOY); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 1; - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_DATASOURCE, selectedTab, "Problem in 'Deployment' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_LIST_DATASOURCES + " is not found in the second tab. ", tabTable - .getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_LIST_DATASOURCES)); - - txt = getDeployTable(wr, true); - - if (txt.indexOf(name) != -1) { - fail("The jonasAdmin webApp has not removed. " + name); - } - - // now deploy - webForms = wr.getForms(); - webForm = webForms[0]; - - params = webForm.getParameterValue("deploy"); - script = webForm.getScriptableObject(); - - if (params.length() == 0) { - params += name; - } else { - params += "," + name; - } - - script.setParameterValue("deploy", params); - button = webForm.getSubmitButtons()[0]; - button.click(); - - // Confirm - submitUndeploy = wc.getFrameContents(FRAME_CONTENT); - // war is in the table - webForms = submitUndeploy.getForms(); - webForm = webForms[0]; - - button = webForm.getSubmitButtons()[0]; - button.click(); - - // Go back to Deployment - wr = wc.getFrameContents(FRAME_CONTENT); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_DEPLOY); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - txt = getDeployTable(wr, true); - - if (txt.indexOf(name) == -1) { - fail("The file " + name + " was not found as deployed."); - } - } - } - - /** - * Test to create a new datasource - * @throws Exception if error occurs - */ - public void testCreateNewDatasource() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - int selectedTab; - // Name of the datasource - name = "new_datasource_"; - // JNDI name The JNDI name to use the datasource - String jndiName = ""; - // Description Description of the datasource - String descr = ""; - // URL URL to access to the database - String urlDatasource = "jdbc:hsqldb:hsql://localhost:9001/db_jonas"; - // JDBC Driver JDBC driver class name to access to the database - String driver = "org.hsqldb.jdbcDriver"; - // User name User name or login to log in the database - String user = "jonas"; - // User password User password to log in the database - String password = "jonas"; - // Mapper Mapper used for the datasource - String mapper = "rdb.hsql"; - - /* - * To get some utils for WebTable - */ - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - if (jProp.isDbm()) { - // Go to database - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_DATASOURCE); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 1; - - // Go to datasources - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_LIST_DATASOURCES); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 2; - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_DATASOURCE, selectedTab, "Problem in 'Datasources' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_DEPLOY + " is not found in the first tab. ", tabTable.getTableCell( - 0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_DEPLOY)); - - // Find a new name - boolean found = false; - int i = 0; - while (!found) { - if ((wr.getText().indexOf(name + i) == -1)) { - name = name + i; - jndiName = name; - found = true; - } - i++; - } - - // Create a new datasource - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_CREATE_DATASOURCE); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 3; - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_NEW_DATASOURCE, selectedTab, "Problem in 'New Datasource' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_DEPLOY + " is not found in the first tab. ", tabTable.getTableCell( - 0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_DEPLOY)); - assertTrue("The link " + URL_JONASADMIN_LIST_DATASOURCES + " is not found in the third tab. ", tabTable - .getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_LIST_DATASOURCES)); - - WebForm form = wr.getForms()[0]; - createNewDatasource(form, name, jndiName, descr, urlDatasource, driver, user, password, mapper); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify if the datasource is deployed - assertTrue("The created datasource ('" + name + "') is not deployed. ", isLoadedDatasource(name)); - table = utils.getTable(wr, 3); - int datasourceRow = utils.getRow(name, table, 1).intValue(); - if (datasourceRow == -1) { - fail("The datasource '" + name + "' is not found in datasource table. Restart jonas and try again. "); - } else { - // Verify if there is an image to indicate that the datasource is deployed - TableCell cell = table.getTableCell(datasourceRow, 0); - assertEquals("There is no a image to indicate that '" + name + "' datasource is deployed. ", 1, cell.getImages().length); - } - } - - } - - /** - * Test to view empty value error message - * @throws Exception if error occurs - */ - public void testCreateDatasourceWithEmptyValue() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - int selectedTab; - // Name Name of the datasource - name = ""; - // JNDI name The JNDI name to use the datasource - String jndiName = ""; - // Description Description of the datasource - String descr = ""; - // URL URL to access to the database - String urlDatasource = ""; - // JDBC Driver JDBC driver class name to access to the database - String driver = ""; - // User name User name or login to log in the database - String user = ""; - // User password User password to log in the database - String password = ""; - // Mapper Mapper used for the datasource - String mapper = ""; - - /* - * To get some utils for WebTable - */ - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - if (jProp.isDbm()) { - // Go to database - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_DATASOURCE); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 1; - - // Go to datasources - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_LIST_DATASOURCES); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 2; - - // Create a new datasource - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_CREATE_DATASOURCE); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 3; - - WebForm form = wr.getForms()[0]; - createNewDatasource(form, name, jndiName, descr, urlDatasource, driver, user, password, mapper); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify error messages - table = utils.getTable(wr, 0); - TableCell cell = table.getTableCell(0, 0); - - // class errors - assertEquals("The value of the class attribut of the cell is not 'errors'. ", "errors", cell.getAttribute("class")); - // Name cannot be empty - String emptyName = "Name cannot be empty"; - assertTrue("The message '" + emptyName + "' is not found. ", cell.getText().indexOf(emptyName) != -1); - // JNDI name cannot be empty - String emptyJndiName = "JNDI name cannot be empty"; - assertTrue("The message '" + emptyJndiName + "' is not found. ", cell.getText().indexOf(emptyJndiName) != -1); - // JDBC Driver cannot be empty - String emptyJdbcDriver = "JDBC Driver cannot be empty"; - assertTrue("The message '" + emptyJdbcDriver + "' is not found. ", cell.getText().indexOf(emptyJdbcDriver) != -1); - } - - } - - /** - * Tear Down - * cleanUp action - */ - public void tearDown() throws Exception { - - if (jProp.isDbm()) { - // remove created datasource file - if (!name.equals("")) { - // Undeploy datasource - unUseDatasource(name); - // Delete file - JonasAdminFiles.deleteConfigFile(name + ".properties"); - name = ""; - } - } - - super.tearDown(); - } - - - /** - * Return the text of the deployed table or the deployable table - * @param wr the WebResponse to use - * @param deployed if true return the text deployed table, if false text of - * deployable - * @return the text of the deployed table or the deployable table - * @throws Exception if an error occurs - */ - private String getDeployTable(WebResponse wr, boolean deployed) throws Exception { - - // Extract right table - JonasAdminUtils utils = new JonasAdminUtils(); - WebTable table = utils.getTable(wr, 0); - - TableCell deployableCell = table.getTableCell(1, 0); - TableCell deployedCell = table.getTableCell(1, 2); - - if (deployed) { - return deployedCell.getText(); - } else { - return deployableCell.getText(); - } - } - - /** - * Create a new datasource in jonasAdmin - * @param form datasource form - * @param name the name of the datasource - * @param datasourceName JNDI name - * @param datasourceDescription the description of the datasource - * @param datasourceUrl url to access to the databse - * @param datasourceClassname JDBC driver class name to access to the - * database - * @param datasourceUsername User name or login to log in the database - * @param datasourcePassword User password to log in the database - * @param datasourceMapper Mapper used for the datasource - * @throws Exception if an error occurs when button is clicked. - */ - private void createNewDatasource(WebForm form, String name, String datasourceName, String datasourceDescription, - String datasourceUrl, String datasourceClassname, String datasourceUsername, String datasourcePassword, - String datasourceMapper) throws Exception { - SubmitButton button = form.getSubmitButtons()[0]; - - form.setParameter("name", name); - form.setParameter("datasourceName", datasourceName); - form.setParameter("datasourceDescription", datasourceDescription); - form.setParameter("datasourceUrl", datasourceUrl); - form.setParameter("datasourceClassname", datasourceClassname); - form.setParameter("datasourceUsername", datasourceUsername); - form.setParameter("datasourcePassword", datasourcePassword); - form.setParameter("datasourceMapper", datasourceMapper); - - button.click(); - } -} \ No newline at end of file diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/resource/F_JonasAdminResourceMail.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/resource/F_JonasAdminResourceMail.java deleted file mode 100755 index 41abde74ef00c898ab890d080ca5b6b21f9c905f..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/resource/F_JonasAdminResourceMail.java +++ /dev/null @@ -1,731 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.resource; - -import java.util.Properties; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminFiles; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminUtils; - -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.SubmitButton; -import com.meterware.httpunit.TableCell; -import com.meterware.httpunit.WebForm; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - -/** - * Class for testing Resource - * @author Paul Kemler - * - */ -public class F_JonasAdminResourceMail extends JonasAdminTestCase { - - /** - * URL of mail service - */ - private static final String URL_JONASADMIN_MAIL_SERVICE = "EditMailService.do"; - - /** - * URL of Mail resource - */ - private static final String URL_JONASADMIN_MAIL = "EditDeploy.do?type=mail"; - - /** - * URL of list mail factories - */ - private static final String URL_JONASADMIN_LIST_MAIL_FACTORIES = "ListMailFactories.do"; - - /** - * URL of deploy - */ - private static final String URL_JONASADMIN_DEPLOY = "EditDeploy.do"; - - /** - * URL of create mail factory - */ - private static final String URL_JONASADMIN_CREATE_MAIL_FACTORY = "EditMailFactoryProperties.do?action=create"; - - /** - * URL of Mail resource viewTree - */ - private static final String URL_JONASADMIN_VIEW_MAIL = "viewTree.do?tree=domain*jonas*resources"; - - /** - * number of tabs when you are in the mail tabs - */ - private static final int NUMBER_OF_TABS_FOR_MAIL = 2; - - /** - * number of tabs when you are in the CONFIRM tabs - */ - private static final int NUMBER_OF_TABS_FOR_CONFIRM = 2; - - /** - * number of tabs when you are in the 'new mail factory' tabs - */ - private static final int NUMBER_OF_TABS_FOR_NEW_MAIL_FACTORY = 3; - - /** - * name of the mail factory - */ - private String name = ""; - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminResourceMail(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminResourceMail(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminResourceMail.class); - } - - /** - * Setup need for these tests - * jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - } - - /** - * Test to deploy and undeploy a mail factory - * @throws Exception if error occurs - */ - public void testUndeployDeployMailFactory() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - int selectedTab; - /* - * To get some utils for WebTable - */ - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - if (jProp.isMail()) { - // Add mail factory - name = "new_mailFactory"; - Properties properties = new Properties(); - // mail.authentication.password= - properties.put("mail.authentication.password", ""); - // mail.factory.type=javax.mail.Session - properties.put("mail.factory.type", "javax.mail.Session"); - // mail.authentication.username= - properties.put("mail.authentication.username", ""); - // mail.host= - properties.put("mail.host", ""); - // mail.factory.name= name - properties.put("mail.factory.name", name); - - // Add a mail factory - if (isInMailFactoryList(name)) { - - // remove mail factory - unBindMailFactory(name); - } - createMailFactory(name, properties); - - // Go to Mail - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_MAIL); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 1; - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_MAIL, selectedTab, "Problem in 'Deployment' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_LIST_MAIL_FACTORIES + " is not found in the second tab. ", tabTable - .getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_LIST_MAIL_FACTORIES)); - - String txt = getDeployTable(wr, true); - - if (txt.indexOf(name) == -1) { - fail("The file" + name + " was not found as deployed."); - } - - // Undeploy mail factory - WebForm[] webForms = wr.getForms(); - WebForm webForm = webForms[0]; - - String params = webForm.getParameterValue("undeploy"); - WebForm.Scriptable script = webForm.getScriptableObject(); - if (params.length() == 0) { - params += name; - } else { - params += "," + name; - } - script.setParameterValue("undeploy", params); - - SubmitButton button = webForm.getSubmitButtons()[0]; - button.click(); - - // Confirm - WebResponse submitUndeploy = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 2; - - // Verify tabs - tabTable = utils.getTabTable(submitUndeploy); - testTabs(tabTable, NUMBER_OF_TABS_FOR_CONFIRM, selectedTab, "Problem in 'Confirm' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_DEPLOY + " is not found in the first tab. ", tabTable.getTableCell( - 0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_DEPLOY)); - webForms = submitUndeploy.getForms(); - webForm = webForms[0]; - - button = webForm.getSubmitButtons()[0]; - button.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_CONFIRM, selectedTab, "Problem in 'Result' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_DEPLOY + " is not found in the first tab. ", tabTable.getTableCell( - 0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_DEPLOY)); - - // Go back to Deployment - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_DEPLOY); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 1; - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_MAIL, selectedTab, "Problem in 'Deployment' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_LIST_MAIL_FACTORIES + " is not found in the second tab. ", tabTable - .getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_LIST_MAIL_FACTORIES)); - - txt = getDeployTable(wr, true); - - if (txt.indexOf(name) != -1) { - fail("The jonasAdmin webApp has not removed " + name); - } - - // now deploy - webForms = wr.getForms(); - webForm = webForms[0]; - - params = webForm.getParameterValue("deploy"); - script = webForm.getScriptableObject(); - - if (params.length() == 0) { - params += name; - } else { - params += "," + name; - } - - script.setParameterValue("deploy", params); - button = webForm.getSubmitButtons()[0]; - button.click(); - - // Confirm - submitUndeploy = wc.getFrameContents(FRAME_CONTENT); - // war is in the table - webForms = submitUndeploy.getForms(); - webForm = webForms[0]; - - button = webForm.getSubmitButtons()[0]; - button.click(); - - // Go back to Deployment - wr = wc.getFrameContents(FRAME_CONTENT); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_DEPLOY); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - txt = getDeployTable(wr, true); - - if (txt.indexOf(name) == -1) { - fail("The file " + name + " was not found as deployed."); - } - } - } - - /** - * Test to create a new mail factory - * @throws Exception if error occurs - */ - public void testCreateNewSessionMailFactory() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - int selectedTab; - // Name of the mail factory - name = "new_mailFactory_"; - String username = ""; - String password = ""; - String sessionProps = ""; - String to = ""; - String subject = ""; - String cc = ""; - String bcc = ""; - - /* - * To get some utils for WebTable - */ - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - if (jProp.isMail()) { - - // Go to mail - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_MAIL); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 1; - - // Go to mail factories - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_LIST_MAIL_FACTORIES); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 2; - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_MAIL, selectedTab, "Problem in 'Mail Factories' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_DEPLOY + " is not found in the first tab. ", tabTable.getTableCell( - 0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_DEPLOY)); - - // Find a new name - boolean found = false; - int i = 0; - while (!found) { - if ((wr.getText().indexOf(name + i) == -1)) { - name = name + i; - found = true; - } - i++; - } - - // Create a new Session Mail Factory - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_CREATE_MAIL_FACTORY); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 3; - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_NEW_MAIL_FACTORY, selectedTab, "Problem in 'New mail factory' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_DEPLOY + " is not found in the first tab. ", tabTable.getTableCell( - 0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_DEPLOY)); - assertTrue("The link " + URL_JONASADMIN_LIST_MAIL_FACTORIES + " is not found in the third tab. ", tabTable - .getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_LIST_MAIL_FACTORIES)); - - WebForm form = wr.getForms()[0]; - - createSessionFactory(form, name, name, username, password, sessionProps, to, subject, cc, bcc); - - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify if the mail factory is deployed - assertTrue("The created mail factory ('" + name + "') is not deployed. Restart jonas and try again. ", isInMailFactoryList(name)); - table = utils.getTable(wr, 3); - int mailFactoryRow = utils.getRow(name, table, 1).intValue(); - if (mailFactoryRow == -1) { - fail("The mail factory '" + name + "' is not found in mail factory table. Restart jonas and try again. "); - } else { - // Verify if there is an image to indicate that the mail factory is deployed - TableCell cell = table.getTableCell(mailFactoryRow, 0); - assertEquals("There is no a image to indicate that '" + name + "' mail factory is deployed. ", 1, cell.getImages().length); - } - } - } - - /** - * Test to create a new MimePartDatasource mail factory - * @throws Exception if error occurs - */ - public void testCreateNewMimePartDSMailFactory() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - int selectedTab; - // Name of the mail factory - name = "new_mimePartDS_mailFactory_"; - String username = ""; - String password = ""; - String sessionProps = ""; - String to = ""; - String subject = ""; - String cc = ""; - String bcc = ""; - - /* - * To get some utils for WebTable - */ - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - if (jProp.isMail()) { - - // Go to mail - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_MAIL); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 1; - - // Go to mail factories - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_LIST_MAIL_FACTORIES); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 2; - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_MAIL, selectedTab, "Problem in 'Mail Factories' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_DEPLOY + " is not found in the first tab. ", tabTable.getTableCell( - 0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_DEPLOY)); - - // Find a new name - boolean found = false; - int i = 0; - while (!found) { - if ((wr.getText().indexOf(name + i) == -1)) { - name = name + i; - found = true; - } - i++; - } - - // Create a new MimePartDataSource Mail Factory - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_CREATE_MAIL_FACTORY); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 3; - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_NEW_MAIL_FACTORY, selectedTab, "Problem in 'New mail factory' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_DEPLOY + " is not found in the first tab. ", tabTable.getTableCell( - 0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_DEPLOY)); - assertTrue("The link " + URL_JONASADMIN_LIST_MAIL_FACTORIES + " is not found in the third tab. ", tabTable - .getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_LIST_MAIL_FACTORIES)); - - WebForm form = wr.getForms()[0]; - - createMimePartDataSourceFactory(form, name, name, username, password, sessionProps, to, subject, cc, bcc); - - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify if the mail factory is deployed - assertTrue("The created mail factory ('" + name + "') is not deployed. Restart jonas and try again. ", isInMailFactoryList(name)); - table = utils.getTable(wr, 3); - int mailFactoryRow = utils.getRow(name, table, 1).intValue(); - if (mailFactoryRow == -1) { - fail("The mail factory '" + name + "' is not found in mail factory table. Restart jonas and try again. "); - } else { - // Verify if there is an image to indicate that the mail factory is deployed - TableCell cell = table.getTableCell(mailFactoryRow, 0); - assertEquals("There is no a image to indicate that '" + name + "' mail factory is deployed. ", 1, cell.getImages().length); - } - } - } - - /** - * Test to view empty value error message - * @throws Exception if error occurs - */ - public void testCreateMailFactoryWithEmptyValue() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - int selectedTab; - - /* - * To get some utils for WebTable - */ - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - if (jProp.isMail()) { - // Go to mail - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_MAIL); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 1; - - // Go to mail factories - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_LIST_MAIL_FACTORIES); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 2; - - // Create a new mail factory - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_CREATE_MAIL_FACTORY); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 3; - - WebForm form = wr.getForms()[0]; - createNewEmptyMailFactory(form); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify error messages - table = utils.getTable(wr, 0); - TableCell cell = table.getTableCell(0, 0); - - // class errors - assertEquals("The value of the class attribut of the cell is not 'errors'. ", "errors", cell.getAttribute("class")); - // Can't accept empty Jndi name - String emptyJndiName = "Can't accept empty Jndi name"; - assertTrue("The message '" + emptyJndiName + "' is not found. ", cell.getText().indexOf(emptyJndiName) != -1); - // Can't accept empty factory name - String emptyFactoryName = "Can't accept empty factory name"; - assertTrue("The message '" + emptyFactoryName + "' is not found. ", cell.getText().indexOf(emptyFactoryName) != -1); - // Please check in the type - String emptyType = "Can't accept empty factory name"; - assertTrue("The message '" + emptyType + "' is not found. ", cell.getText().indexOf(emptyType) != -1); - } - - } - - /** - * Tear Down - * cleanUp action - */ - public void tearDown() throws Exception { - if (jProp.isMail()) {// remove created mail factory file - if (!name.equals("")) { - if (isInMailFactoryList(name)) { - // remove mail factory - unBindMailFactory(name); - // Delete file - JonasAdminFiles.deleteConfigFile(name + ".properties"); - name = ""; - } - } - } - super.tearDown(); - } - - /** - * Create a new session Mail Factory - * @param form the form - * @param mailFactoryName the name - * @param type "Session" or "MimePartDataSource" - * @param jndiName the Jndi name - * @param username username - * @param password password - * @param sessionProps Mail session configuration - * @param to MimePartDataSource configuration - * @param subject MimePartDataSource configuration - * @param cc MimePartDataSource configuration - * @param bcc MimePartDataSource configuration - * @throws Exception if an error occurs - */ - private void createSessionFactory(WebForm form, String mailFactoryName, String jndiName, - String username, String password, String sessionProps, String to, String subject, String cc, String bcc) - throws Exception { - - form.setParameter("mailFactoryName", mailFactoryName); - form.setParameter("type", "javax.mail.Session"); - form.setParameter("jndiName", jndiName); - form.setParameter("username", username); - form.setParameter("password", password); - form.setParameter("sessionProps", sessionProps); - form.setParameter("to", to); - form.setParameter("subject", subject); - form.setParameter("cc", cc); - form.setParameter("bcc", bcc); - - SubmitButton button = form.getSubmitButtons()[0]; - button.click(); - } - - /** - * Create a new session Mail Factory - * @param form the form - * @param mailFactoryName the name - * @param type "Session" or "MimePartDataSource" - * @param jndiName the Jndi name - * @param username username - * @param password password - * @param sessionProps Mail session configuration - * @param to MimePartDataSource configuration - * @param subject MimePartDataSource configuration - * @param cc MimePartDataSource configuration - * @param bcc MimePartDataSource configuration - * @throws Exception if an error occurs - */ - private void createMimePartDataSourceFactory(WebForm form, String mailFactoryName, String jndiName, - String username, String password, String sessionProps, String to, String subject, String cc, String bcc) - throws Exception { - - form.setParameter("mailFactoryName", mailFactoryName); - form.setParameter("type", "javax.mail.internet.MimePartDataSource"); - form.setParameter("jndiName", jndiName); - form.setParameter("username", username); - form.setParameter("password", password); - form.setParameter("sessionProps", sessionProps); - form.setParameter("to", to); - form.setParameter("subject", subject); - form.setParameter("cc", cc); - form.setParameter("bcc", bcc); - - SubmitButton button = form.getSubmitButtons()[0]; - button.click(); - } - - /** - * Create an empty Mail Factory - * @param form the form - * @throws Exception if an error occurs - */ - private void createNewEmptyMailFactory(WebForm form) - throws Exception { - - form.setParameter("mailFactoryName", ""); - form.setParameter("jndiName", ""); - form.setParameter("username", ""); - form.setParameter("password", ""); - form.setParameter("sessionProps", ""); - form.setParameter("to", ""); - form.setParameter("subject", ""); - form.setParameter("cc", ""); - form.setParameter("bcc", ""); - - SubmitButton button = form.getSubmitButtons()[0]; - button.click(); - } - - - /** - * Return the text of the deployed table or the deployable table - * @param wr the WebResponse to use - * @param deployed if true return the text deployed table, if false text of - * deployable - * @return the text of the deployed table or the deployable table - * @throws Exception if an error occurs - */ - private String getDeployTable(WebResponse wr, boolean deployed) throws Exception { - - // Extract right table - JonasAdminUtils utils = new JonasAdminUtils(); - WebTable table = utils.getTable(wr, 0); - - TableCell deployableCell = table.getTableCell(1, 0); - TableCell deployedCell = table.getTableCell(1, 2); - - if (deployed) { - return deployedCell.getText(); - } else { - return deployableCell.getText(); - } - } - -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/container/C_JonasAdminContainer.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/container/C_JonasAdminContainer.java deleted file mode 100755 index f36d0b4cc0b7154682ffee43f5b77638615b7afc..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/container/C_JonasAdminContainer.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.service.container; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; - -import com.meterware.httpunit.WebConversation; - -import junit.framework.Test; -import junit.framework.TestSuite; - -/** - * Define a class to test containers - * Test : - application container - * - ejb container - * - web container - * - * @author Paul Kemler - */ -public class C_JonasAdminContainer extends JonasAdminTestCase { - - /** - * Constructor with a specified name - * @param name the name - */ - public C_JonasAdminContainer(String name) { - super(name); - } - - /** - * Get a new TestSuite for this class - * It includes all jonasAdmin tests - * @return a new TestSuite for this class - */ - public static Test suite() { - TestSuite suite = new TestSuite(); - suite.addTest(F_JonasAdminEjbContainer.suite()); - suite.addTest(F_JonasAdminWebContainer.suite()); - suite.addTest(F_JonasAdminApplicationContainer.suite()); - return suite; - } - - /** - * Main method - * @param args the arguments - */ - public static void main (String[] args) { - WebConversation wc = new WebConversation(); - junit.textui.TestRunner.run(suite()); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/container/F_JonasAdminApplicationContainer.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/container/F_JonasAdminApplicationContainer.java deleted file mode 100755 index 1d1d2e9b9afc891856c885649106b310f02ba3d6..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/container/F_JonasAdminApplicationContainer.java +++ /dev/null @@ -1,461 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.service.container; - -import java.io.File; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminUtils; - -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.TableCell; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - -/** - * Class for testing application container in jonasAdmin - * @author Paul Kemler - * - */ -public class F_JonasAdminApplicationContainer extends JonasAdminTestCase { - - /** - * URL of Application container - */ - private static final String URL_JONASADMIN_APP_CONTAINER = "ListAppContainers.do"; - - /** - * URL of the ear tab - */ - private static final String URL_JONASADMIN_EAR = "/jonasAdmin/EditEar.do"; - - /** - * URL of the web tab - */ - private static final String URL_JONASADMIN_WEB = "/jonasAdmin/service/earWars.jsp"; - - /** - * URL of the ejb tab - */ - private static final String URL_JONASADMIN_JAR = "/jonasAdmin/service/earJars.jsp"; - - /** - * URL of the resource adapter tab - */ - private static final String URL_JONASADMIN_RAR = "/jonasAdmin/service/earRars.jsp"; - - /** - * URL of the deployment descriptor tab - */ - private static final String URL_JONASADMIN_XML = "/jonasAdmin/service/earXmlDeployment.jsp"; - - /** - * number of tabs with war, jar and rar in the ear - */ - private static final int NUMBER_OF_TABS_WITH_WAR_JAR_RAR = 6; - - /** - * number of tabs without rar in the ear - */ - private static final int NUMBER_OF_TABS_WITHOUT_RAR = 5; - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminApplicationContainer(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminApplicationContainer(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminApplicationContainer.class); - } - - /** - * Setup need for these tests - * jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - } - - /** - * Test application container when an ear with a war, a jar and a rar is deployed - * @throws Exception if error occurs - * - */ - public void testAddEarWithWarJarAndRar() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - TableCell selectedCell; - TableCell cell; - String ear = "earsample"; - int selectedTab; - int code; - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - // Test only if there are services ear, ejb and resource - if (jProp.isEar() && jProp.isEjb() && jProp.isResource()) { - // Add earsample.ear - useEar(ear); - - // Go to application container - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_APP_CONTAINER); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to earsample page - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, ear); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 2; - - // Verify infos - try { - table = utils.getTable(wr, 0); - cell = table.getTableCell(0,2); - // File - assertEquals("It is not the name of the ear file. ", ear + ".ear", cell.getText()); - // Path - String path = System.getProperty("jonas.base") + File.separator + "apps" + File.separator + ear + ".ear"; - assertEquals("It is not the path of the ear file. ", path, table.getTableCell(1,2).getText()); - } catch (ArrayIndexOutOfBoundsException e) { - throw new IllegalStateException("Cannot find a table in the content frame. "); - } - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_WITH_WAR_JAR_RAR, selectedTab, "Problem in 'earsample.ear' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_APP_CONTAINER + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_APP_CONTAINER)); - assertTrue("The link " + URL_JONASADMIN_WEB + " is not found in the third tab. ", - tabTable.getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_WEB)); - assertTrue("The link " + URL_JONASADMIN_JAR + " is not found in the fourth tab. ", - tabTable.getTableCell(0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_JAR)); - assertTrue("The link " + URL_JONASADMIN_RAR + " is not found in the fifth tab. ", - tabTable.getTableCell(0, 8).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_RAR)); - assertTrue("The link " + URL_JONASADMIN_XML + " is not found in the sixth tab. ", - tabTable.getTableCell(0, 10).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_XML)); - - - // Go to the Web tab - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_WEB); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 3; - - // Verify infos - table = utils.getTable(wr, 0); - - // File - cell = table.getTableCell(1, 0); - if (cell.getText().equals("")) { - if (jProp.isCatalina()) { - fail("It is not the name of the war file of 'earsample'. "); - } else { - throw new IllegalStateException("Not implemented: JETTY. "); - } - } else { - assertEquals("It is not the name of the war file. ", "earsample", cell.getText()); - // Link - link = cell.getLinks()[0]; - code = wc.sendRequest(link.getRequest()).getResponseCode(); - assertTrue("The file link does not contain 'EditWebApp.do?on='. ", link.getURLString().indexOf("EditWebApp.do?on=") != -1); - assertEquals("The link " + link.getURLString() + " is not found. ", 200, code); - } - - // Path - cell = table.getTableCell(1, 1); - assertTrue("It is not the path of the war file. ", cell.getText().endsWith("earsample.war")); - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_WITH_WAR_JAR_RAR, selectedTab, "Problem in 'Web' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_APP_CONTAINER + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_APP_CONTAINER)); - assertTrue("The link " + URL_JONASADMIN_EAR + " is not found in the second tab. ", - tabTable.getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_EAR)); - assertTrue("The link " + URL_JONASADMIN_JAR + " is not found in the fourth tab. ", - tabTable.getTableCell(0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_JAR)); - assertTrue("The link " + URL_JONASADMIN_RAR + " is not found in the fifth tab. ", - tabTable.getTableCell(0, 8).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_RAR)); - assertTrue("The link " + URL_JONASADMIN_XML + " is not found in the sixth tab. ", - tabTable.getTableCell(0, 10).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_XML)); - - - // Go to the Ejb tab - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_JAR); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 4; - - // Verify infos - table = utils.getTable(wr, 0); - cell = table.getTableCell(1, 0); - // File - assertEquals("It is not the name of the war file. ", "secusb", cell.getText()); - // Link - link = cell.getLinks()[0]; - code = wc.sendRequest(link.getRequest()).getResponseCode(); - assertTrue("The file link does not contain 'EditContainer.do?select='. ", cell.getLinks()[0].getURLString().indexOf("EditContainer.do?select=") != -1); - assertEquals("The link " + link.getURLString() + " is not found. ", 200, code); - - // Path - cell = table.getTableCell(1, 1); - assertTrue("It is not the path of the war file. ", cell.getText().endsWith("secusb.jar")); - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_WITH_WAR_JAR_RAR, selectedTab, "Problem in 'Ejb' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_APP_CONTAINER + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_APP_CONTAINER)); - assertTrue("The link " + URL_JONASADMIN_EAR + " is not found in the second tab. ", - tabTable.getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_EAR)); - assertTrue("The link " + URL_JONASADMIN_WEB + " is not found in the third tab. ", - tabTable.getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_WEB)); - assertTrue("The link " + URL_JONASADMIN_RAR + " is not found in the fifth tab. ", - tabTable.getTableCell(0, 8).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_RAR)); - assertTrue("The link " + URL_JONASADMIN_XML + " is not found in the sixth tab. ", - tabTable.getTableCell(0, 10).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_XML)); - - - // Go to the RA tab - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_RAR); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 5; - - // Verify infos - table = utils.getTable(wr, 0); - cell = table.getTableCell(1, 0); - // File - assertEquals("It is not the name of the rar file. ", "earsample.ra-sample", cell.getText()); - // Link - link = cell.getLinks()[0]; - code = wc.sendRequest(link.getRequest()).getResponseCode(); - assertTrue("The file link does not contain 'EditResourceAdapter.do?select='. ", cell.getLinks()[0].getURLString().indexOf("EditResourceAdapter.do?select=") != -1); - assertEquals("The link " + link.getURLString() + " is not found. ", 200, code); - - // Path - cell = table.getTableCell(1, 1); - assertTrue("It is not the path of the rar file. ", cell.getText().endsWith("ra-sample.rar")); - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_WITH_WAR_JAR_RAR, selectedTab, "Problem in 'Resource Adapter' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_APP_CONTAINER + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_APP_CONTAINER)); - assertTrue("The link " + URL_JONASADMIN_EAR + " is not found in the second tab. ", - tabTable.getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_EAR)); - assertTrue("The link " + URL_JONASADMIN_WEB + " is not found in the third tab. ", - tabTable.getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_WEB)); - assertTrue("The link " + URL_JONASADMIN_JAR + " is not found in the fourth tab. ", - tabTable.getTableCell(0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_JAR)); - assertTrue("The link " + URL_JONASADMIN_XML + " is not found in the sixth tab. ", - tabTable.getTableCell(0, 10).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_XML)); - - - // Go to the deployement descriptor tab - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_XML); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 6; - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_WITH_WAR_JAR_RAR, selectedTab, "Problem in 'Deployment descriptor' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_APP_CONTAINER + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_APP_CONTAINER)); - assertTrue("The link " + URL_JONASADMIN_EAR + " is not found in the second tab. ", - tabTable.getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_EAR)); - assertTrue("The link " + URL_JONASADMIN_WEB + " is not found in the third tab. ", - tabTable.getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_WEB)); - assertTrue("The link " + URL_JONASADMIN_JAR + " is not found in the fourth tab. ", - tabTable.getTableCell(0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_JAR)); - assertTrue("The link " + URL_JONASADMIN_RAR + " is not found in the fifth tab. ", - tabTable.getTableCell(0, 8).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_RAR)); - } - } - - /** - * Test application container without a deployed rar - * @throws Exception if error occurs - * - */ - public void testAddEarWithoutRar() throws Exception { - - WebResponse wr; - WebLink link; - WebTable tabTable; - String ear = "alarm"; - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - // Test only if there are services ear and ejb - if (jProp.isEar() && jProp.isEjb()) { - // Add alarm.ear - useEar(ear); - - // Go to application container - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_APP_CONTAINER); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to alarm page - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, ear); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify tabs - try { - tabTable = utils.getTabTable(wr); - }catch (ArrayIndexOutOfBoundsException e) { - throw new IllegalStateException("annot find the tab table. "); - } - // - number of tabs - assertEquals("There are not " + NUMBER_OF_TABS_WITHOUT_RAR + " tabs. ", - NUMBER_OF_TABS_WITHOUT_RAR, (tabTable.getColumnCount() + 1) / 2); - - - // Go to the Web tab - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_WEB); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify tabs - tabTable = utils.getTabTable(wr); - - // - number of tabs - assertEquals("There are not " + NUMBER_OF_TABS_WITHOUT_RAR + " tabs. ", - NUMBER_OF_TABS_WITHOUT_RAR, (tabTable.getColumnCount() + 1) / 2); - - - // Go to the Ejb tab - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_JAR); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify tabs - tabTable = utils.getTabTable(wr); - // - number of tabs - assertEquals("There are not " + NUMBER_OF_TABS_WITHOUT_RAR + " tabs. ", - NUMBER_OF_TABS_WITHOUT_RAR, (tabTable.getColumnCount() + 1) / 2); - - - // Go to the deployement descriptor tab - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_XML); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify tabs - tabTable = utils.getTabTable(wr); - // - number of tabs - assertEquals("There are not " + NUMBER_OF_TABS_WITHOUT_RAR + " tabs. ", - NUMBER_OF_TABS_WITHOUT_RAR, (tabTable.getColumnCount() + 1) / 2); - } - } - - /** - * Tear Down cleanUp action - * @throws Exception if an error occurs - */ - public void tearDown() throws Exception { - super.tearDown(); - } - -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/container/F_JonasAdminEjbContainer.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/container/F_JonasAdminEjbContainer.java deleted file mode 100755 index dcdd3c915a028aff5cf6a7bdf28cc9457041ca5f..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/container/F_JonasAdminEjbContainer.java +++ /dev/null @@ -1,1304 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.service.container; - -import java.io.File; -import java.util.Iterator; - -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminUtils; - -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.TableCell; -import com.meterware.httpunit.WebConversation; -import com.meterware.httpunit.WebForm; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - -/** - * Class for testing ejb container in jonasAdmin - * @author Paul Kemler - * - */ -public class F_JonasAdminEjbContainer extends JonasAdminTestCase { - - /** - * URL of Ejb container - */ - private static final String URL_JONASADMIN_EJB_CONTAINER = "ListContainers.do"; - - /** - * URL of the container tab - */ - private static final String URL_JONASADMIN_CONTAINER = "/ViewContainer.do"; - - /** - * URL of the container jsp - */ - private static final String URL_JONASADMIN_CONTAINER_JSP = "/jonasAdmin/service/container.jsp"; - - /** - * URL of the statistic tab - */ - private static final String URL_JONASADMIN_STATISTICS = "/EditContainerStatistic.do"; - - /** - * URL of the ejb container's' statistics tab - */ - private static final String URL_JONASADMIN_CONTAINERS_STATISTICS = "EditEjbContainersStatistic.do"; - - /** - * URL of the view ejb container tab - */ - private static final String URL_JONASADMIN_VIEW_EJB = "/ViewContainerEjbs.do"; - - /** - * URL of the mdb tab - */ - private static final String URL_JONASADMIN_MDB = "/jonasAdmin/service/ejbMessage.jsp"; - - /** - * URL of the entity bean tab - */ - private static final String URL_JONASADMIN_EB = "/jonasAdmin/service/ejbEntity.jsp"; - - /** - * URL of the view ejb container jsp - */ - private static final String URL_JONASADMIN_VIEW_EJB_JSP = "/jonasAdmin/service/containerEjbs.jsp"; - - /** - * URL of the ejb dependency jsp - */ - private static final String URL_JONASADMIN_DEPENDENCIES = "/jonasAdmin/service/ejbDependency.jsp"; - - /** - * URL of the synchronize button - */ - private static final String URL_JONASADMIN_SYNCHRONIZE = "ExecuteEjb.do?action=synchronize"; - - /** - * URL of the reduce button - */ - private static final String URL_JONASADMIN_REDUCE = "ExecuteEjb.do?action=reduceCache"; - - /** - * number of tabs when you are in the jar page - */ - private static final int NUMBER_OF_TABS_FOR_JAR = 4; - - /** - * number of tabs when you are in the MDB page - */ - private static final int NUMBER_OF_TABS_FOR_MDB = 6; - - /** - * number of tabs when you are in the EntityBean page when using dbm - */ - private static final int NUMBER_OF_TABS_FOR_ENTITY_DBM = 6; - /** - * number of tabs when you are in the EntityBean page when using the RAR - * (there is no Dependency tab in this case) - */ - private static final int NUMBER_OF_TABS_FOR_ENTITY_RAR = 5; - - /** - * index of the Mdb tab - */ - private static final int MDB_TAB_INDEX = 5; - - /** - * Name of Mdb tab - */ - private static final String TDB_TAB_TEXT = "Mdb"; - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminEjbContainer(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminEjbContainer(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminEjbContainer.class); - } - - /** - * Setup need for these tests - * jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - } - - /** - * Test ejb container with alarm.ear - * @throws Exception if error occurs - * - */ - public void testEjbContainer() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - TableCell selectedCell; - TableCell cell; - String ear = "alarm"; - int selectedTab; - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - if (jProp.isEar() && jProp.isEjb()) { - // Add alarm.ear - useEar(ear); - - // Go to ejb container - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_EJB_CONTAINER); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to alarm.jar page - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, ear); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 2; - - // Verify infos - table = utils.getTable(wr, 0); - cell = table.getTableCell(0,2); - // Name - assertEquals("It is not the name of the jar. ", ear, cell.getText()); - // Path - cell = table.getTableCell(1, 2); - assertTrue("It is not the path of the jar file. ", cell.getText().endsWith(File.separator + "alarm.jar")); - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_JAR, selectedTab, "Problem in 'alarm.jar' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_EJB_CONTAINER + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_EJB_CONTAINER)); - assertTrue("The link " + URL_JONASADMIN_STATISTICS + " is not found in the third tab. ", - tabTable.getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_STATISTICS)); - assertTrue("The link " + URL_JONASADMIN_VIEW_EJB + " is not found in the fourth tab. ", - tabTable.getTableCell(0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_VIEW_EJB)); - - - // Go to the statistic tab - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_STATISTICS); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 3; - - // Verify stats - table = utils.getTable(wr, 1); - - int alarmBMP = Integer.parseInt(table.getTableCell(1, 2).getText()); - int alarmCMP = Integer.parseInt(table.getTableCell(2, 2).getText()); - int alarmStateful = Integer.parseInt(table.getTableCell(3, 2).getText()); - int alarmStateless = Integer.parseInt(table.getTableCell(4, 2).getText()); - int alarmMDB = Integer.parseInt(table.getTableCell(5, 2).getText()); - int alarmTotal = Integer.parseInt(table.getTableCell(0, 2).getText()); - - assertEquals("It is not the number of Entity with Bean-Managed Persistence in alarm.jar. ", 0, alarmBMP); - assertEquals("It is not the number of Entity with Container-Managed Persistence in alarm.jar. ", 1, alarmCMP); - assertEquals("It is not the number of Stateful Session Bean in alarm.jar. ", 1, alarmStateful); - assertEquals("It is not the number of Stateless Session Bean in alarm.jar. ", 0, alarmStateless); - assertEquals("It is not the number of Message Driven Bean in alarm.jar. ", 1, alarmMDB); - assertEquals("It is not the number of EJBs in alarm.jar. ", 3, alarmTotal); - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_JAR, selectedTab, "Problem in 'statistic' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_EJB_CONTAINER + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_EJB_CONTAINER)); - assertTrue("The link " + URL_JONASADMIN_CONTAINER_JSP + " is not found in the second tab. ", - tabTable.getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_CONTAINER_JSP)); - assertTrue("The link " + URL_JONASADMIN_VIEW_EJB_JSP + " is not found in the fourth tab. ", - tabTable.getTableCell(0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_VIEW_EJB_JSP)); - - - // Go to the Ejb tab - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_VIEW_EJB_JSP); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 4; - - // Verify infos - table = utils.getTable(wr, 0); - // Name - cell = table.getTableCell(1, 0); - assertEquals("It is not the name of the EJB. ", "AlarmListener", cell.getText()); - cell = table.getTableCell(2, 0); - assertEquals("It is not the name of the EJB. ", "AlarmRecord", cell.getText()); - cell = table.getTableCell(3, 0); - assertEquals("It is not the name of the EJB. ", "View", cell.getText()); - // Type - cell = table.getTableCell(1, 2); - assertEquals("It is not the type of the AlarmListener EJB. ", "MessageDrivenBean", cell.getText()); - cell = table.getTableCell(2, 2); - assertEquals("It is not the type of the AlarmRecord EJB. ", "EntityBean", cell.getText()); - cell = table.getTableCell(3, 2); - assertEquals("It is not the type of the View EJB. ", "StatefulSessionBean", cell.getText()); - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_JAR, selectedTab, "Problem in 'EJBs' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_EJB_CONTAINER + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_EJB_CONTAINER)); - assertTrue("The link " + URL_JONASADMIN_CONTAINER + " is not found in the second tab. ", - tabTable.getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_CONTAINER)); - assertTrue("The link " + URL_JONASADMIN_STATISTICS + " is not found in the third tab. ", - tabTable.getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_STATISTICS)); - } - - - } - - /** - * Test the message driven bean management - * @throws Exception if error occurs - */ - public void testMessageDrivenBean() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - TableCell selectedCell; - TableCell cell; - String ear = "alarm"; - int selectedTab; - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - if (jProp.isEar() && jProp.isEjb()) { - // Add alarm.ear - useEar(ear); - - // Go to ejb container - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_EJB_CONTAINER); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to alarm.jar page - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, ear); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 2; - - // Go to the Ejb tab - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_VIEW_EJB); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 4; - - table = utils.getTable(wr, 0); - - // Get links - int nbLink = table.getRowCount() -1; - WebLink[] links = new WebLink[nbLink]; - WebResponse[] responses = new WebResponse[nbLink]; - for (int i = 0; i < nbLink; i++) { - links[i] = table.getTableCell(i + 1, 0).getLinks()[0]; - } - - /* - * Verify the MessageDrivenBean: AlarmListener - */ - links[0].click(); - responses[0] = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 5; - table = utils.getTable(responses[0], 1); - // Name AlarmListener - assertEquals("It is not the name of the MessageDrivenBean. ", "AlarmListener", table.getTableCell(0, 2).getText()); - // File .../alarm.jar - assertTrue("It is not the file of the MessageDrivenBean. ", table.getTableCell(1, 2).getText().endsWith("alarm.jar")); - - // Naming and Classes - table = utils.getTable(responses[0], 4); - // EJB class org.objectweb.alarm.beans.AlarmListenerBean - assertEquals("It is not the EJB class of the MessageDrivenBean. ", "org.objectweb.alarm.beans.AlarmListenerBean", table.getTableCell(0, 2).getText()); - // EJB JNDI Name AlarmListenerHome - assertEquals("It is not the EJB JNDI Name of the MessageDrivenBean. ", "AlarmListenerHome", table.getTableCell(1, 2).getText()); - // EJB HomeClass - assertEquals("It is not the EJB HomeClass of the MessageDrivenBean. ", "", table.getTableCell(2, 2).getText()); - // EJB RemoteClass - assertEquals("It is not the EJB RemoteClass of the MessageDrivenBean. ", "", table.getTableCell(3, 2).getText()); - // EJB LocalHomeClass - assertEquals("It is not the EJB LocalHomeClass of the MessageDrivenBean. ", "", table.getTableCell(4, 2).getText()); - // EJB LocalClass - assertEquals("It is not the EJB LocalClass of the MessageDrivenBean. ", "", table.getTableCell(5, 2).getText()); - - // Mdb Configuration - table = utils.getTable(responses[0], 7); - // JMS Destination name AlarmTopic - assertEquals("It is not the JMS Destination name of the MessageDrivenBean. ", "AlarmTopic", table.getTableCell(0, 2).getText()); - - // Verify tabs - tabTable = utils.getTabTable(responses[0]); - testTabs(tabTable, NUMBER_OF_TABS_FOR_MDB, selectedTab, "Problem in 'AlarmListener' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_EJB_CONTAINER + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_EJB_CONTAINER)); - assertTrue("The link " + URL_JONASADMIN_CONTAINER + " is not found in the second tab. ", - tabTable.getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_CONTAINER)); - assertTrue("The link " + URL_JONASADMIN_STATISTICS + " is not found in the third tab. ", - tabTable.getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_STATISTICS)); - assertTrue("The link " + URL_JONASADMIN_VIEW_EJB + " is not found in the fourth tab. ", - tabTable.getTableCell(0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_VIEW_EJB)); - assertTrue("The link " + URL_JONASADMIN_DEPENDENCIES + " is not found in the sixth tab. ", - tabTable.getTableCell(0, 10).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_DEPENDENCIES)); - - // Go to Dependency - link = responses[0].getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_DEPENDENCIES); - link.click(); - responses[0] = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 6; - - // JMS Destination - table = utils.getTable(responses[0], 0); - assertEquals("The title of table is not 'JMS Destinastion'. ", "JMS Destination", table.getTableCell(0, 0).getText()); - // Topic AlarmTopic - table = utils.getTable(responses[0], 1); - assertEquals("The JMS destination is not 'AlarmTopic'. ", "AlarmTopic", table.getTableCell(0, 0).getText()); - - - // Verify tabs - tabTable = utils.getTabTable(responses[0]); - testTabs(tabTable, NUMBER_OF_TABS_FOR_MDB, selectedTab, "Problem in 'Dependency' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_EJB_CONTAINER + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_EJB_CONTAINER)); - assertTrue("The link " + URL_JONASADMIN_CONTAINER + " is not found in the second tab. ", - tabTable.getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_CONTAINER)); - assertTrue("The link " + URL_JONASADMIN_STATISTICS + " is not found in the third tab. ", - tabTable.getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_STATISTICS)); - assertTrue("The link " + URL_JONASADMIN_VIEW_EJB + " is not found in the fourth tab. ", - tabTable.getTableCell(0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_VIEW_EJB)); - assertTrue("The link " + URL_JONASADMIN_MDB + " is not found in the sixth tab. ", - tabTable.getTableCell(0, 8).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_MDB)); - } - } - - - /** - * Test the entity bean management - * @throws Exception if error occurs - */ - public void testEntityBean() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - TableCell selectedCell; - TableCell cell; - String ear = "alarm"; - int selectedTab; - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - if (jProp.isEar() && jProp.isEjb()) { - // Add alarm.ear - useEar(ear); - - // Go to ejb container - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_EJB_CONTAINER); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to alarm.jar page - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, ear); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 2; - - // Go to the Ejb tab - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_VIEW_EJB); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 4; - - table = utils.getTable(wr, 0); - - // Get links - int nbLink = table.getRowCount() -1; - WebLink[] links = new WebLink[nbLink]; - WebResponse[] responses = new WebResponse[nbLink]; - for (int i = 0; i < nbLink; i++) { - links[i] = table.getTableCell(i + 1, 0).getLinks()[0]; - } - - /* - * Verify the EntityBean: AlarmRecord - */ - links[1].click(); - responses[1] = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 5; - // EntityBean - table = utils.getTable(responses[1], 3); - assertEquals("The title of table is not 'EntityBean'. ", "EntityBean", table.getTableCell(0, 0).getText()); - - table = utils.getTable(responses[1], 4); - // Name AlarmRecord - assertEquals("It is not the name of the EntityBean. ", "AlarmRecord", table.getTableCell(0, 2).getText()); - // File .../alarm.jar - assertTrue("It is not the file of the EntityBean. ", table.getTableCell(1, 2).getText().endsWith("alarm.jar")); - - // Naming and Classes - table = utils.getTable(responses[1], 7); - // EJB class org.objectweb.alarm.beans.AlarmRecordBean - assertEquals("It is not the EJB class of the EntityBean. ", "org.objectweb.alarm.beans.AlarmRecordBean", table.getTableCell(0, 2).getText()); - // EJB JNDI Name alarmrecord - assertEquals("It is not the EJB JNDI Name of the EntityBean. ", "alarmrecord", table.getTableCell(1, 2).getText()); - // EJB HomeClass org.objectweb.alarm.beans.AlarmRecordHome - assertEquals("It is not the EJB HomeClass of the EntityBean. ", "org.objectweb.alarm.beans.AlarmRecordHome", table.getTableCell(2, 2).getText()); - // EJB RemoteClass org.objectweb.alarm.beans.AlarmRecord - assertEquals("It is not the EJB RemoteClass of the EntityBean. ", "org.objectweb.alarm.beans.AlarmRecord", table.getTableCell(3, 2).getText()); - // EJB LocalHomeClass - assertEquals("It is not the EJB LocalHomeClass of the EntityBean. ", "", table.getTableCell(4, 2).getText()); - // EJB LocalClass - assertEquals("It is not the EJB LocalClass of the EntityBean. ", "", table.getTableCell(5, 2).getText()); - - // Entity Configuration - table = utils.getTable(responses[1], 10); - // Persistency Container-Managed Type of Persistency (CMP/BMP) - assertEquals("It is not the persistency of the EntityBean. ", "Container-Managed", table.getTableCell(0, 2).getText()); - // Passivation Timeout 0 Value in seconds - assertEquals("It is not the passivation timeout of the EntityBean. ", "0", table.getTableCell(1, 2).getText()); - // Inactivity Timeout 0 Maximum time of inactivity (in sec.) before freeing objects - assertEquals("It is not the inactivity timeout of the EntityBean. ", "0", table.getTableCell(2, 2).getText()); - // Lock Policy container-serialized one among CS/CRC/CRU/DB - assertEquals("It is not the lock policy of the EntityBean. ", "container-serialized", table.getTableCell(3, 2).getText()); - // Shared false True if bean accessed outside this ejb server. - assertEquals("It is not the shared value of the EntityBean. ", "false", table.getTableCell(4, 2).getText()); - // Prefetch false True if prefetch optimization wanted. - assertEquals("It is not the prefetch value of the EntityBean. ", "false", table.getTableCell(5, 2).getText()); - // HardLimit false True if hard limit optimization wanted. - assertEquals("It is not the hard limit value of the EntityBean. ", "false", table.getTableCell(6, 2).getText()); - // Initial Pool size 0 Nb of instances preallocated - assertEquals("It is not the initial pool size of the EntityBean. ", "0", table.getTableCell(7, 2).getText()); - // Max number of instances 20 Max nb of instances in memory - assertEquals("It is not the max number of instances of the EntityBean. ", "20", table.getTableCell(8, 2).getText()); - - // Memory Management - int currentPoolSize; - int usedInTX; - int usedOutsideTX; - int unusedButReady; - int markedRemoved; - int currentNbInstances; - int pkNumber; - int passivated; - int total; - // Create instances - createInstances(); - // Synchronize - link = responses[1].getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_SYNCHRONIZE); - link.click(); - responses[1] = wc.getFrameContents(FRAME_CONTENT); - table = utils.getTable(responses[1], 13); - currentPoolSize = Integer.parseInt(table.getTableCell(0, 2).getText()); - usedInTX = Integer.parseInt(table.getTableCell(1, 2).getText()); - usedOutsideTX = Integer.parseInt(table.getTableCell(2, 2).getText()); - unusedButReady = Integer.parseInt(table.getTableCell(3, 2).getText()); - markedRemoved = Integer.parseInt(table.getTableCell(4, 2).getText()); - currentNbInstances = Integer.parseInt(table.getTableCell(5, 2).getText()); - pkNumber = Integer.parseInt(table.getTableCell(6, 2).getText()); - passivated = Integer.parseInt(table.getTableCell(7, 2).getText()); - total = currentPoolSize + usedInTX + usedOutsideTX + unusedButReady + markedRemoved; - // Current number of instances - assertEquals("The current number of instances doesn't correspond to the sum of instances. ", total, currentNbInstances); - assertEquals("It is not the current number of instances. ", getAlarmRecordCurrentNbInstances(), currentNbInstances); - assertEquals("The number of passivated instances is not '" + getAlarmRecordPassivatedInstances() + "' . ", getAlarmRecordPassivatedInstances(), passivated); - assertEquals("The number of PK is not '" + getAlarmRecordPkNumber() + "' . ", getAlarmRecordPkNumber(), pkNumber); - // Reduce - link = responses[1].getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_REDUCE); - link.click(); - // Here we should verify that Reduce instances worked. - // This test is done currently in testEntityBeanReduceInstances method. - - // Verify tabs - tabTable = utils.getTabTable(responses[1]); - if(isDatabaseService()) { - testTabs(tabTable, NUMBER_OF_TABS_FOR_ENTITY_DBM, selectedTab, "Problem in 'AlarmRecord' tab."); - assertTrue("The link " + URL_JONASADMIN_DEPENDENCIES + " is not found in the sixth tab. ", - tabTable.getTableCell(0, 10).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_DEPENDENCIES)); - } else { - testTabs(tabTable, NUMBER_OF_TABS_FOR_ENTITY_RAR, selectedTab, "Problem in 'AlarmRecord' tab."); - } - // - links - assertTrue("The link " + URL_JONASADMIN_EJB_CONTAINER + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_EJB_CONTAINER)); - assertTrue("The link " + URL_JONASADMIN_CONTAINER + " is not found in the second tab. ", - tabTable.getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_CONTAINER)); - assertTrue("The link " + URL_JONASADMIN_STATISTICS + " is not found in the third tab. ", - tabTable.getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_STATISTICS)); - assertTrue("The link " + URL_JONASADMIN_VIEW_EJB + " is not found in the fourth tab. ", - tabTable.getTableCell(0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_VIEW_EJB)); - - if(isDatabaseService()) { - // dbm started, check for dependency - link = responses[1].getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_DEPENDENCIES); - link.click(); - responses[1] = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 6; - - // Datasource - table = utils.getTable(responses[1], 0); - assertEquals("The title of table is not 'Datasource'. ", "Datasource", table.getTableCell(0, 0).getText()); - // jdbc_1 postgres - table = utils.getTable(responses[1], 1); - assertEquals("It is not 'jdbc_1'. ", "jdbc_1", table.getTableCell(0, 0).getText()); - // Here check getDataSourceName() maybe no datasource deployed ... - String datasourceName = getDataSourceName(); - if (datasourceName != null) { - assertEquals("The datasource is not '" + getDataSourceName() + "'. ", getDataSourceName(), table.getTableCell(0, 2).getText()); - link = table.getTableCell(0, 2).getLinks()[0]; - assertTrue("It is not the correct URL. ", link.getURLString().endsWith("EditDatasource.do?name=" + datasourceName)); - assertEquals("The link is not correct. ", 200, wc.sendRequest(link.getRequest()).getResponseCode()); - // Verify tabs - tabTable = utils.getTabTable(responses[1]); - testTabs(tabTable, NUMBER_OF_TABS_FOR_MDB, selectedTab, "Problem in 'Dependency' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_EJB_CONTAINER + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_EJB_CONTAINER)); - assertTrue("The link " + URL_JONASADMIN_CONTAINER + " is not found in the second tab. ", - tabTable.getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_CONTAINER)); - assertTrue("The link " + URL_JONASADMIN_STATISTICS + " is not found in the third tab. ", - tabTable.getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_STATISTICS)); - assertTrue("The link " + URL_JONASADMIN_VIEW_EJB + " is not found in the fourth tab. ", - tabTable.getTableCell(0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_VIEW_EJB)); - assertTrue("The link " + URL_JONASADMIN_EB + " is not found in the fifth tab. ", - tabTable.getTableCell(0, 8).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_EB)); - } - } - } - } - - /** - * Test the entity bean management - reduce instances function - * @throws Exception if error occurs - */ - public void testEntityBeanReduceInstances() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - TableCell selectedCell; - TableCell cell; - String ear = "alarm"; - int selectedTab; - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - if (jProp.isEar() && jProp.isEjb()) { - // Add alarm.ear - useEar(ear); - - // Go to ejb container - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_EJB_CONTAINER); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to alarm.jar page - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, ear); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 2; - - // Go to the Ejb tab - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_VIEW_EJB); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 4; - - table = utils.getTable(wr, 0); - - // Get links - int nbLink = table.getRowCount() -1; - WebLink[] links = new WebLink[nbLink]; - WebResponse[] responses = new WebResponse[nbLink]; - for (int i = 0; i < nbLink; i++) { - links[i] = table.getTableCell(i + 1, 0).getLinks()[0]; - } - - // Verify the EntityBean: AlarmRecord - links[1].click(); - responses[1] = wc.getFrameContents(FRAME_CONTENT); - - selectedTab = 5; - // EntityBean - table = utils.getTable(responses[1], 3); - assertEquals("The title of table is not 'EntityBean'. ", "EntityBean", table.getTableCell(0, 0).getText()); - - table = utils.getTable(responses[1], 4); - // Name AlarmRecord - assertEquals("It is not the name of the EntityBean. ", "AlarmRecord", table.getTableCell(0, 2).getText()); - // File .../alarm.jar - assertTrue("It is not the file of the EntityBean. ", table.getTableCell(1, 2).getText().endsWith("alarm.jar")); - - // Memory Management - int unusedButReady; - int currentNbInstances; - int passivated; - // Create instances - createInstances(); - // Synchronize - link = responses[1].getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_SYNCHRONIZE); - link.click(); - responses[1] = wc.getFrameContents(FRAME_CONTENT); - table = utils.getTable(responses[1], 13); - unusedButReady = Integer.parseInt(table.getTableCell(3, 2).getText()); - currentNbInstances = Integer.parseInt(table.getTableCell(5, 2).getText()); - passivated = Integer.parseInt(table.getTableCell(7, 2).getText()); - if (unusedButReady == 0) { - // there is nothing to reduce - return; - } - // Reduce - link = responses[1].getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_REDUCE); - link.click(); - responses[1] = wc.getFrameContents(FRAME_CONTENT); - table = utils.getTable(responses[1], 13); - // Current number of instances is less big than previous number of instances - int previousNbInstances = currentNbInstances; - assertTrue("The number of instances doesn't decrease when reduce button is clicked. ", previousNbInstances > currentNbInstances); - currentNbInstances = Integer.parseInt(table.getTableCell(5, 2).getText()); - passivated = Integer.parseInt(table.getTableCell(7, 2).getText()); - assertTrue("The number of passivated instances is not positif. ", passivated > 0); - } - } - - /** - * Test the stateful session bean management - * @throws Exception if error occurs - */ - public void testStatefulSessionBean() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - TableCell selectedCell; - TableCell cell; - String ear = "alarm"; - int selectedTab; - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - if (jProp.isEar() && jProp.isEjb()) { - // Add alarm.ear - useEar(ear); - - // Go to ejb container - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_EJB_CONTAINER); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to alarm.jar page - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, ear); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 2; - - // Go to the Ejb tab - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_VIEW_EJB); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 4; - - table = utils.getTable(wr, 0); - - // Get links - int nbLink = table.getRowCount() -1; - WebLink[] links = new WebLink[nbLink]; - WebResponse[] responses = new WebResponse[nbLink]; - for (int i = 0; i < nbLink; i++) { - links[i] = table.getTableCell(i + 1, 0).getLinks()[0]; - } - - /* - * Verify the StatefulSessionBean: View - */ - links[2].click(); - responses[2] = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 5; - // StatefulSessionBean - table = utils.getTable(responses[2], 0); - assertEquals("The title of table is not 'StatefulSessionBean'. ", "StatefulSessionBean", table.getTableCell(0, 0).getText()); - - table = utils.getTable(responses[2], 1); - // Name AlarmListener - assertEquals("It is not the name of the StatefulSessionBean. ", "View", table.getTableCell(0, 2).getText()); - // File .../alarm.jar - assertTrue("It is not the file of the StatefulSessionBean. ", table.getTableCell(1, 2).getText().endsWith("alarm.jar")); - - // Naming and Classes - table = utils.getTable(responses[2], 4); - // EJB class org.objectweb.alarm.beans.ViewBean - assertEquals("It is not the EJB class of the StatefulSessionBean. ", "org.objectweb.alarm.beans.ViewBean", table.getTableCell(0, 2).getText()); - // EJB JNDI Name viewhome - assertEquals("It is not the EJB JNDI Name of the StatefulSessionBean. ", "viewhome", table.getTableCell(1, 2).getText()); - // EJB HomeClass org.objectweb.alarm.beans.ViewHome - assertEquals("It is not the EJB HomeClass of the StatefulSessionBean. ", "org.objectweb.alarm.beans.ViewHome", table.getTableCell(2, 2).getText()); - // EJB RemoteClass org.objectweb.alarm.beans.View - assertEquals("It is not the EJB RemoteClass of the StatefulSessionBean. ", "org.objectweb.alarm.beans.View", table.getTableCell(3, 2).getText()); - // EJB LocalHomeClass - assertEquals("It is not the EJB LocalHomeClass of the StatefulSessionBean. ", "", table.getTableCell(4, 2).getText()); - // EJB LocalClass - assertEquals("It is not the EJB LocalClass of the StatefulSessionBean. ", "", table.getTableCell(5, 2).getText()); - - // Session Configuration - WebForm form = responses[2].getForms()[0]; - // sessionTimeOut = 0 - form.setParameter("sessionTimeOut", "0"); - responses[2] = form.submit(); - form = responses[2].getForms()[0]; - assertTrue("The value of sessionTimeOut is not 'no limit'/'pas de limite'. ", form.getParameterValue("sessionTimeOut").indexOf("limit") != -1); - // sessionTimeOut = 10 - form.setParameter("sessionTimeOut", "10"); - responses[2] = form.submit(); - form = responses[2].getForms()[0]; - assertEquals("The value of sessionTimeOut is not '10'. ", "10", form.getParameterValue("sessionTimeOut")); - // empty - form.setParameter("sessionTimeOut", ""); - responses[2] = form.submit(); - form = responses[2].getForms()[0]; - table = utils.getTable(responses[2], 0); - cell = table.getTableCell(0, 0); - assertEquals("There is not an error. ", "errors", cell.getAttribute("class")); - assertEquals("The message is not 'Session timeout cannot be empty'. ", "Session timeout cannot be empty", cell.getText()); - // not a valid integer - form.setParameter("sessionTimeOut", "10.5"); - responses[2] = form.submit(); - form = responses[2].getForms()[0]; - table = utils.getTable(responses[2], 0); - cell = table.getTableCell(0, 0); - assertEquals("There is not an error. ", "errors", cell.getAttribute("class")); - assertEquals("The message is not 'Session timeout not a valid integer !'. ", "Session timeout not a valid integer !", cell.getText()); - // negative value - form.setParameter("sessionTimeOut", "-1"); - responses[2] = form.submit(); - table = utils.getTable(responses[2], 0); - cell = table.getTableCell(0, 0); - assertEquals("There is not an error. ", "errors", cell.getAttribute("class")); - assertFalse("An error was found but there is no text for a negative value for 'Current session TimeOut'. ", cell.getText().equals("")); - } - } - - - /** - * Test the stateless session bean management - * @throws Exception if error occurs - */ - public void testStatelessSessionBean() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - TableCell selectedCell; - TableCell cell; - String ear = "olstore"; - int selectedTab; - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - if (jProp.isEar() && jProp.isEjb()) { - // Add olstore.ear - useEar(ear); - - // Go to ejb container - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_EJB_CONTAINER); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to olstoreejb.jar page - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, ear); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 2; - - // Go to the Ejb tab - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_VIEW_EJB); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 4; - - table = utils.getTable(wr, 0); - - // Get a link to a StatelessSessionBean - int rowLastStatelessSB = utils.getRow("StatelessSessionBean", table, 2).intValue(); - if (rowLastStatelessSB == -1) { - fail("No Stateless Session Bean found for the ear '" + ear + "'. "); - } - String sbName = table.getTableCell(rowLastStatelessSB, 0).getText(); - link = table.getTableCell(rowLastStatelessSB, 0).getLinks()[0]; - if (link == null) { - fail("No link found for the StatelessSessionBean '" + sbName + "'. "); - } - - /* - * verify the StatelessSessionBean - */ - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 5; - // StatelessSessionBean - table = utils.getTable(wr, 0); - assertEquals("The title of table is not 'StatelessSessionBean'. ", "StatelessSessionBean", table.getTableCell(0, 0).getText()); - - table = utils.getTable(wr, 1); - // Name UserHelper - assertEquals("It is not the name of the StatelessSessionBean. ", sbName, table.getTableCell(0, 2).getText()); - // File .../olstoreejb.jar - assertTrue("It is not the file of the StatelessSessionBean. ", table.getTableCell(1, 2).getText().endsWith("olstoreejb.jar")); - - // Naming and Classes - String ejbClass = getStatelessSBClassName(sbName, "ejbClass"); - if (ejbClass == null) { - ejbClass = ""; - } - String jndiName = getStatelessSBClassName(sbName, "jndiName"); - if (jndiName == null) { - jndiName = ""; - } - String homeClass = getStatelessSBClassName(sbName, "homeClass"); - if (homeClass == null) { - homeClass = ""; - } - String remoteClass = getStatelessSBClassName(sbName, "remoteClass"); - if (remoteClass == null) { - remoteClass = ""; - } - String localHomeClass = getStatelessSBClassName(sbName, "localHomeClass"); - if (localHomeClass == null) { - localHomeClass = ""; - } - String localClass = getStatelessSBClassName(sbName, "localClass"); - if (localClass == null) { - localClass = ""; - } - table = utils.getTable(wr, 4); - // EJB class olstore.session.helper.UserHelperSession - assertEquals("It is not the EJB class of the StatelessSessionBean. ", ejbClass, table.getTableCell(0, 2).getText()); - // EJB JNDI Name UserHelperLocal - assertEquals("It is not the EJB JNDI Name of the StatelessSessionBean. ", jndiName, table.getTableCell(1, 2).getText()); - // EJB HomeClass - assertEquals("It is not the EJB HomeClass of the StatelessSessionBean. ", homeClass, table.getTableCell(2, 2).getText()); - // EJB RemoteClass - assertEquals("It is not the EJB RemoteClass of the StatelessSessionBean. ", remoteClass, table.getTableCell(3, 2).getText()); - // EJB LocalHomeClass olstore.session.helper.UserHelperLocalHome - assertEquals("It is not the EJB LocalHomeClass of the StatelessSessionBean. ", localHomeClass, table.getTableCell(4, 2).getText()); - // EJB LocalClass olstore.session.helper.UserHelperLocal - assertEquals("It is not the EJB LocalClass of the StatelessSessionBean. ", localClass, table.getTableCell(5, 2).getText()); - - // Instances - int poolSize = getStatelessSBInstance(sbName, "poolSize"); - int cacheSize = getStatelessSBInstance(sbName, "cacheSize"); - table = utils.getTable(wr, 7); - // - assertEquals("It is not the correct Pool size of the StatelessSessionBean. ", "" + poolSize, table.getTableCell(0, 2).getText()); - assertEquals("It is not the correct Cache size of the StatelessSessionBean. ", "" + cacheSize, table.getTableCell(1, 2).getText()); - - // Session Configuration - int minPoolSize = getStatelessSBInstance(sbName, "minPoolSize"); - int maxCacheSize = getStatelessSBInstance(sbName, "maxCacheSize"); - table = utils.getTable(wr, 10); - assertEquals("It is not the correct Min Pool size of the StatelessSessionBean. ", "" + minPoolSize, table.getTableCell(0, 2).getText()); - assertEquals("It is not the correct Max Cache size of the StatelessSessionBean. ", "" + maxCacheSize, table.getTableCell(1, 2).getText()); - - WebForm form = wr.getForms()[0]; - // sessionTimeOut = 0 - form.setParameter("sessionTimeOut", "0"); - wr = form.submit(); - form = wr.getForms()[0]; - assertTrue("The value of sessionTimeOut is not 'no limit'/'pas de limite'. ", form.getParameterValue("sessionTimeOut").indexOf("limit") != -1); - // sessionTimeOut = 10 - form.setParameter("sessionTimeOut", "10"); - wr = form.submit(); - form = wr.getForms()[0]; - assertEquals("The value of sessionTimeOut is not '10'. ", "10", form.getParameterValue("sessionTimeOut")); - // empty - form.setParameter("sessionTimeOut", ""); - wr = form.submit(); - form = wr.getForms()[0]; - table = utils.getTable(wr, 0); - cell = table.getTableCell(0, 0); - assertEquals("There is not an error. ", "errors", cell.getAttribute("class")); - assertEquals("The message is not 'Session timeout cannot be empty'. ", "Session timeout cannot be empty", cell.getText()); - // not a valid integer - form.setParameter("sessionTimeOut", "10.5"); - wr = form.submit(); - form = wr.getForms()[0]; - table = utils.getTable(wr, 0); - cell = table.getTableCell(0, 0); - assertEquals("There is not an error. ", "errors", cell.getAttribute("class")); - assertEquals("The message is not 'Session timeout not a valid integer !'. ", "Session timeout not a valid integer !", cell.getText()); - // negative value - form.setParameter("sessionTimeOut", "-1"); - wr = form.submit(); - table = utils.getTable(wr, 0); - cell = table.getTableCell(0, 0); - assertEquals("There is not an error. ", "errors", cell.getAttribute("class")); - assertFalse("An error was found but there is no text for a negative value for 'Current session TimeOut'. ", cell.getText().equals("")); - } - - - } - - /** - * Test statistic - * @throws Exception if error occurs - * - */ - public void testStatistics() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - TableCell selectedCell; - TableCell cell; - String ear = "alarm"; - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - if (jProp.isEar() && jProp.isEjb()) { - // Add alarm.ear - useEar(ear); - - // Go to ejb container - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_EJB_CONTAINER); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Get jar Links - table = utils.getTable(wr, 0); - int nbLink = table.getRowCount() -1; - WebLink[] links = new WebLink[nbLink]; - WebResponse[] responses = new WebResponse[nbLink]; - WebTable tableStat; - int[] jarBMP = new int[nbLink]; - int[] jarCMP = new int[nbLink]; - int[] jarStateful = new int[nbLink]; - int[] jarStateless = new int[nbLink]; - int[] jarMDB = new int[nbLink]; - int[] jarTotal = new int[nbLink]; - - int totalBMP = 0; - int totalCMP = 0; - int totalStateful = 0; - int totalStateless = 0; - int totalMDB = 0; - int totalTotal = 0; - - int allBMP; - int allCMP; - int allStateful; - int allStateless; - int allMDB; - int allTotal; - - // Go to statistics - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_CONTAINERS_STATISTICS); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - tableStat = utils.getTable(wr, 1); - allBMP = Integer.parseInt(tableStat.getTableCell(1, 2).getText()); - allCMP = Integer.parseInt(tableStat.getTableCell(2, 2).getText()); - allStateful = Integer.parseInt(tableStat.getTableCell(3, 2).getText()); - allStateless = Integer.parseInt(tableStat.getTableCell(4, 2).getText()); - allMDB = Integer.parseInt(tableStat.getTableCell(5, 2).getText()); - allTotal = Integer.parseInt(tableStat.getTableCell(0, 2).getText()); - int total = allBMP + allCMP + allStateful + allStateless + allMDB; - assertEquals("It is not the number of EJBs in all EJB containers. ", total, allTotal); - - for (int i = 0; i < nbLink; i++) { - links[i] = table.getTableCell(i + 1, 0).getLinks()[0]; - links[i].click(); - responses[i] = wc.getFrameContents(FRAME_CONTENT); - - // Go to the statistic tab - link = responses[i].getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_STATISTICS); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - // Verify stats - tableStat = utils.getTable(wr, 1); - - jarBMP[i] = Integer.parseInt(tableStat.getTableCell(1, 2).getText()); - jarCMP[i] = Integer.parseInt(tableStat.getTableCell(2, 2).getText()); - jarStateful[i] = Integer.parseInt(tableStat.getTableCell(3, 2).getText()); - jarStateless[i] = Integer.parseInt(tableStat.getTableCell(4, 2).getText()); - jarMDB[i] = Integer.parseInt(tableStat.getTableCell(5, 2).getText()); - jarTotal[i] = Integer.parseInt(tableStat.getTableCell(0, 2).getText()); - total = jarBMP[i] + jarCMP[i] + jarStateful[i] +jarStateless[i] + jarMDB[i]; - assertEquals("It is not the number of EJBs in " + links[i].getText(), total, jarTotal[i]); - - tableStat = utils.getTable(wr, 4); - int allTmpBMP = Integer.parseInt(tableStat.getTableCell(1, 2).getText()); - int allTmpCMP = Integer.parseInt(tableStat.getTableCell(2, 2).getText()); - int allTmpStateful = Integer.parseInt(tableStat.getTableCell(3, 2).getText()); - int allTmpStateless = Integer.parseInt(tableStat.getTableCell(4, 2).getText()); - int allTmpMDB = Integer.parseInt(tableStat.getTableCell(5, 2).getText()); - int allTmpTotal = Integer.parseInt(tableStat.getTableCell(0, 2).getText()); - - assertEquals("It is not the number of BMP in all EJB containers for the jar " + links[i].getText() + ". ", allBMP, allTmpBMP); - assertEquals("It is not the number of CMP in all EJB containers for the jar " + links[i].getText() + ". ", allCMP, allTmpCMP); - assertEquals("It is not the number of Stateful SB in all EJB containers for the jar " + links[i].getText() + ". ", allStateful, allTmpStateful); - assertEquals("It is not the number of Stateless SB in all EJB containers for the jar " + links[i].getText() + ". ", allStateless, allTmpStateless); - assertEquals("It is not the number of MDB in all EJB containers for the jar " + links[i].getText() + ". ", allMDB, allTmpMDB); - assertEquals("It is not the number of all EJBs in all EJB containers for the jar " + links[i].getText() + ". ", allTotal, allTmpTotal); - - totalBMP += jarBMP[i]; - totalCMP += jarCMP[i]; - totalStateful += jarStateful[i]; - totalStateless += jarStateless[i]; - totalMDB += jarMDB[i]; - totalTotal += jarTotal[i]; - } - - assertEquals("It is not the number of all BMPs. ", totalBMP, allBMP); - assertEquals("It is not the number of all CMPs. ", totalCMP, allCMP); - assertEquals("It is not the number of all stateful SBs. ", totalStateful, allStateful); - assertEquals("It is not the number of all stateless SBs. ", totalStateless, allStateless); - assertEquals("It is not the number of all MDBs. ", totalMDB, allMDB); - assertEquals("It is not the number of all EJBs. ", totalTotal, allTotal); - } - } - - /** - * Use Alarm Demo for creating instances - * @throws Exception if an error occurs - */ - private void createInstances() throws Exception { - WebConversation wc2 = new WebConversation(); - String urlAlarm = prefixUrl + "/alarm/secured/list.jsp"; - // Start the alarm demo - wc2.setAuthorization("jonas", "jonas"); - WebResponse wr = wc2.getResponse(urlAlarm); - } - - /** - * Get the current number of instances of Alarm Record - * @return the current number of instances - * @throws Exception if an error occurs - */ - private int getAlarmRecordCurrentNbInstances() throws Exception { - MBeanServerConnection server = getMBeanServer(); - ObjectName on = ObjectName.getInstance("jonas:j2eeType=EntityBean,name=AlarmRecord,EJBModule=alarm,J2EEApplication=alarm,J2EEServer=jonas"); - - return ((Integer) server.getAttribute(on, "cacheSize")).intValue(); - } - - /** - * Get the current number of instances of Alarm Record - * @return the current number of instances - * @throws Exception if an error occurs - */ - private int getAlarmRecordPassivatedInstances() throws Exception { - MBeanServerConnection server = getMBeanServer(); - ObjectName on = ObjectName.getInstance("jonas:j2eeType=EntityBean,name=AlarmRecord,EJBModule=alarm,J2EEApplication=alarm,J2EEServer=jonas"); - - Integer[] nbInstanceList = (Integer[]) server.getAttribute(on, "entityCounters"); - return ((Integer) nbInstanceList[3]).intValue(); - } - - /** - * Get the pk number for Alarm Record - * @return the nmber of pk in memory - * @throws Exception if an error occurs - */ - private int getAlarmRecordPkNumber() throws Exception { - MBeanServerConnection server = getMBeanServer(); - ObjectName on = ObjectName.getInstance("jonas:j2eeType=EntityBean,name=AlarmRecord,EJBModule=alarm,J2EEApplication=alarm,J2EEServer=jonas"); - - Integer[] nbInstanceList = (Integer[]) server.getAttribute(on, "entityCounters"); - return ((Integer) nbInstanceList[5]).intValue(); - } - - /** - * Get the name of the datasource - * @return name of the datasource - * @throws Exception if an error occurs - */ - private String getDataSourceName() throws Exception { - String name = null; - MBeanServerConnection server = getMBeanServer(); - ObjectName on = ObjectName.getInstance("jonas:j2eeType=JDBCDataSource,*"); - Iterator it = server.queryNames(on, null).iterator(); - if (it.hasNext()) { - ObjectName jdbcDataSourceON = (ObjectName) it.next(); - name = (String) server.getAttribute(jdbcDataSourceON, "name"); - } - return name; - } - - /** - * Get the class name of a StatelessSessionBean - * @param sbName name of the StatelessSessionBean - * @param attributName {"ejbClass", "jndiName", "homeClass", "remoteClass", "localHomeClass", "localClass"} - * @return name of the class - * @throws Exception if an error occurs - */ - private String getStatelessSBClassName(String sbName, String attributName) throws Exception { - MBeanServerConnection server = getMBeanServer(); - ObjectName on = ObjectName.getInstance("jonas:j2eeType=StatelessSessionBean,name=" + sbName + ",EJBModule=olstoreejb,J2EEApplication=olstore,J2EEServer=jonas"); - String name = (String) server.getAttribute(on, attributName); - return name; - } - - /** - * Get number of instances of a StatelessSessionBean - * @param sbName name of the StatelessSessionBean - * @param attributName {"nbInstances", "minPoolSize", "maxPoolSize"} - * @return name of the class - * @throws Exception if an error occurs - */ - private int getStatelessSBInstance(String sbName, String attributName) throws Exception { - MBeanServerConnection server = getMBeanServer(); - ObjectName on = ObjectName.getInstance("jonas:j2eeType=StatelessSessionBean,name=" + sbName + ",EJBModule=olstoreejb,J2EEApplication=olstore,J2EEServer=jonas"); - Integer nb = (Integer) server.getAttribute(on, attributName); - return nb.intValue(); - } - - /** - * Tear Down cleanUp action - * @throws Exception if an error occurs - */ - public void tearDown() throws Exception { - super.tearDown(); - } - - public static int getNumberOfTabsForMdb() { - return NUMBER_OF_TABS_FOR_MDB; - } - - public static int getMdbTabIndex() { - return MDB_TAB_INDEX; - } - - public static String getMdbTabText() { - return TDB_TAB_TEXT; - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/container/F_JonasAdminWebContainer.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/container/F_JonasAdminWebContainer.java deleted file mode 100755 index 6857c42773c34d2ec178ed1c5361e5855fd57d0b..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/container/F_JonasAdminWebContainer.java +++ /dev/null @@ -1,733 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.service.container; - -import java.io.File; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminFiles; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminUtils; - -import com.meterware.httpunit.Button; -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.TableCell; -import com.meterware.httpunit.WebConversation; -import com.meterware.httpunit.WebForm; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - -/** - * Class for testing web container in jonasAdmin - * @author Paul Kemler - * - */ -public class F_JonasAdminWebContainer extends JonasAdminTestCase { - - /** - * URL of Web containers - */ - private static final String URL_JONASADMIN_WEB_CONTAINERS = "ListWebContainers.do"; - - /** - * URL of Web Container - */ - private static final String URL_JONASADMIN_WEBAPP = "EditWebApp.do"; - - /** - * URL of edit war - */ - private static final String URL_JONASADMIN_EDIT_WAR = "EditWar.do"; - - /** - * URL of servlets - */ - private static final String URL_JONASADMIN_SERVLETS = "warServlets.jsp"; - - /** - * URL of web.xml - */ - private static final String URL_JONASADMIN_WEB_XML = "warWebXml.jsp"; - - /** - * URL of web.xml - */ - private static final String URL_JONASADMIN_JONAS_XML = "warJonasXml.jsp"; - - /** - * URL of web container: ALARM - */ - private static final String URL_JONASADMIN_WEBAPP_ALARM = "alarm"; - - /** - * URL of the cancel button - */ - private static final String BUTTON_SERVLET_CANCEL = "EditWebAppCatalina.do"; - - /** - * URL of the save all button - */ - private static final String BUTTON_SERVLET_SAVE_ALL = "SaveCatalina.do"; - - /** - * URL of the stop button - */ - private static final String BUTTON_WEBAPP_STOP = "javascript:submitHidden('webAppCatalinaForm','action','stop')"; - - /** - * URL of the start button - */ - private static final String BUTTON_WEBAPP_START = "javascript:submitHidden('webAppCatalinaForm','action','start')"; - - /** - * URL of the reload button - */ - private static final String BUTTON_WEBAPP_RELOAD = "javascript:submitHidden('webAppCatalinaForm','action','reload')"; - - /** - * number of tabs when you are in web containers - */ - private static final int NUMBER_OF_TABS_FOR_WEB_CONTAINERS = 1; - - /** - * number of tabs when you are in ROOT container - */ - private static final int NUMBER_OF_TABS_FOR_ROOT = 6; - - /** - * number of tabs when you are in stopped ROOT container - */ - private static final int NUMBER_OF_TABS_FOR_STOPPED_ROOT = 4; - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminWebContainer(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminWebContainer(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminWebContainer.class); - } - - /** - * Setup need for these tests - * jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - } - - /** - * Test a Web Container that it is not in an ear - * @throws Exception if error occurs - * - */ - public void testWebContainerNoInEar() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - TableCell cell; - int selectedTab; - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - // Go to web containers - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_WEB_CONTAINERS); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 1; - - // Verify there is a link for each context - table = utils.getTable(wr, 0); - for (int i = 1; i < table.getRowCount(); i++) { - cell = table.getTableCell(i, 0); - assertEquals("There is no one link for the context : " + cell.getText(), 1, cell.getLinks().length); - } - - // Verify there is 1 tab - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_WEB_CONTAINERS, selectedTab, "Problem in 'Web Containers' tab."); - - // Go to ROOT - int rowRoot = utils.getFirstRow("ROOT", table, 0).intValue(); - if (rowRoot == -1) { - fail("'ROOT' is not found in the table of Web Containers page. "); - } - link = table.getTableCell(rowRoot, 0).getLinks()[0]; - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 2; - - // Verify CONTEXT - if (jProp.isCatalina()) { - table = utils.getTable(wr, 4); - testContextTableCatalina(table, "/", "localhost"); - } else { - table = utils.getTable(wr, 1); - testContextTableJetty(table, "/", "JOnAS Package index", "true"); - } - - // Verify tabs - tabTable = utils.getTabTable(wr); - if (!jProp.isCatalina()) { - if (NUMBER_OF_TABS_FOR_ROOT != (tabTable.getColumnCount() + 1) / 2) { - // There is not Servlet tab. - throw new IllegalStateException("Not implemented: JETTY. "); - } - } - testTabs(tabTable, NUMBER_OF_TABS_FOR_ROOT, selectedTab, "Problem in 'ROOT' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_WEB_CONTAINERS + " is not found in the first tab. ", tabTable - .getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_WEB_CONTAINERS)); - assertTrue("The link " + URL_JONASADMIN_EDIT_WAR + " is not found in the third tab. ", tabTable.getTableCell(0, - 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_EDIT_WAR)); - assertTrue("The link " + URL_JONASADMIN_SERVLETS + " is not found in the fourth tab. ", tabTable.getTableCell( - 0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_SERVLETS)); - assertTrue("The link " + URL_JONASADMIN_WEB_XML + " is not found in the fifth tab. ", tabTable.getTableCell(0, - 8).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_WEB_XML)); - assertTrue("The link " + URL_JONASADMIN_JONAS_XML + " is not found in the sixth tab. ", tabTable.getTableCell( - 0, 10).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_JONAS_XML)); - - if (jProp.isCatalina()) { - // Verify Save button - wr = testSaveButton(wr); - - // Verify settings - wr = testModifySettings(wr); - - // Verify actions - wr = testActions(wr, utils); - } - - // Go to EditWar - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_EDIT_WAR); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 3; - - // Verify Web container - table = utils.getTable(wr, 1); - testWebContainerTable(table, "", "localhost", "ctxroot.war", "true"); - - // Verify it is not 'In application container' - try { - table = utils.getTable(wr, 3); - fail("There is the 'In application container' table. "); - } catch (Exception e) { - // It is ok - } - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_ROOT, selectedTab, "Problem in 'autoload/ctxroot.war' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_WEB_CONTAINERS + " is not found in the first tab. ", tabTable - .getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_WEB_CONTAINERS)); - assertTrue("The link " + URL_JONASADMIN_WEBAPP + " is not found in the second tab. ", tabTable.getTableCell(0, - 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_WEBAPP)); - assertTrue("The link " + URL_JONASADMIN_SERVLETS + " is not found in the fourth tab. ", tabTable.getTableCell( - 0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_SERVLETS)); - assertTrue("The link " + URL_JONASADMIN_WEB_XML + " is not found in the fifth tab. ", tabTable.getTableCell(0, - 8).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_WEB_XML)); - assertTrue("The link " + URL_JONASADMIN_JONAS_XML + " is not found in the sixth tab. ", tabTable.getTableCell( - 0, 10).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_JONAS_XML)); - - // Go to Servlet tab - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_SERVLETS); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 4; - - // Verify servlets - wr = testServlet(wr, utils); - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_ROOT, selectedTab, "Problem in 'Servlets' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_WEB_CONTAINERS + " is not found in the first tab. ", tabTable - .getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_WEB_CONTAINERS)); - assertTrue("The link " + URL_JONASADMIN_WEBAPP + " is not found in the second tab. ", tabTable.getTableCell(0, - 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_WEBAPP)); - assertTrue("The link " + URL_JONASADMIN_EDIT_WAR + " is not found in the third tab. ", tabTable.getTableCell(0, - 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_EDIT_WAR)); - assertTrue("The link " + URL_JONASADMIN_WEB_XML + " is not found in the fifth tab. ", tabTable.getTableCell(0, - 8).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_WEB_XML)); - assertTrue("The link " + URL_JONASADMIN_JONAS_XML + " is not found in the sixth tab. ", tabTable.getTableCell( - 0, 10).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_JONAS_XML)); - - // Go to Web.xml tab - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_WEB_XML); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 5; - - // Verify Web Xml - // TODO - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_ROOT, selectedTab, "Problem in 'Web xml' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_WEB_CONTAINERS + " is not found in the first tab. ", tabTable - .getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_WEB_CONTAINERS)); - assertTrue("The link " + URL_JONASADMIN_WEBAPP + " is not found in the second tab. ", tabTable.getTableCell(0, - 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_WEBAPP)); - assertTrue("The link " + URL_JONASADMIN_EDIT_WAR + " is not found in the third tab. ", tabTable.getTableCell(0, - 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_EDIT_WAR)); - assertTrue("The link " + URL_JONASADMIN_SERVLETS + " is not found in the fourth tab. ", tabTable.getTableCell( - 0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_SERVLETS)); - assertTrue("The link " + URL_JONASADMIN_JONAS_XML + " is not found in the sixth tab. ", tabTable.getTableCell( - 0, 10).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_JONAS_XML)); - - // Go to Jonas Xml tab - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_JONAS_XML); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 6; - - // Verify jonas.xml - // TODO - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_ROOT, selectedTab, "Problem in 'JOnAS xml' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_WEB_CONTAINERS + " is not found in the first tab. ", tabTable - .getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_WEB_CONTAINERS)); - assertTrue("The link " + URL_JONASADMIN_WEBAPP + " is not found in the second tab. ", tabTable.getTableCell(0, - 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_WEBAPP)); - assertTrue("The link " + URL_JONASADMIN_EDIT_WAR + " is not found in the third tab. ", tabTable.getTableCell(0, - 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_EDIT_WAR)); - assertTrue("The link " + URL_JONASADMIN_SERVLETS + " is not found in the fourth tab. ", tabTable.getTableCell( - 0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_SERVLETS)); - assertTrue("The link " + URL_JONASADMIN_WEB_XML + " is not found in the fifth tab. ", tabTable.getTableCell(0, - 8).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_WEB_XML)); - - } - - /** - * Test a Web Container that it is in an ear - * @throws Exception if error occurs - * - */ - public void testWebContainerInEar() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - TableCell cell; - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - // Add alarm.ear - useEar("alarm"); - - // Go to web containers - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_WEB_CONTAINERS); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to ALARM - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_WEBAPP_ALARM); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to EditWar - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_EDIT_WAR); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify 'In application container' - table = utils.getTable(wr, 1); - try { - table = utils.getTable(wr, 4); - } catch (Exception e) { - fail("There is not the 'In application container' table. "); - } - testInApplicationContainer(table); - - } - - /** - * Test path and host in the context table - * @param table the context table - * @param path the expected value of the path - * @param host the expected value of the host - * @throws Exception if an error occurs for going to the url - */ - private void testContextTableCatalina(WebTable table, String path, String host) throws Exception { - WebConversation wc2 = new WebConversation(); - // Path / - assertEquals("It is not the expected path. ", path, table.getTableCell(0, 2).getText()); - String urlRoot = prefixUrl + path; - int code = wc2.getResponse(urlRoot).getResponseCode(); - assertEquals("The page " + urlRoot + " is not found. ", 200, code); - // Host localhost - assertEquals("It is not the expected host. ", host, table.getTableCell(1, 2).getText()); - } - - /** - * Test path and host in the context table - * @param table the context table - * @param path the expected value of the path - * @param name the expected value of the context name - * @param started the expected value of 'Started' - * @throws Exception if an error occurs for going to the url - */ - private void testContextTableJetty(WebTable table, String path, String name, String started) throws Exception { - WebConversation wc2 = new WebConversation(); - // Path / - assertEquals("It is not the expected path. ", path, table.getTableCell(0, 2).getText()); - String urlRoot = prefixUrl + path; - int code = wc2.getResponse(urlRoot).getResponseCode(); - assertEquals("The page " + urlRoot + " is not found. ", 200, code); - // Name JOnAS Package index - assertEquals("It is not the expected name of the context. ", name, table.getTableCell(1, 2).getText()); - // Started true - assertEquals("It is not the expected value of 'Started'. ", started, table.getTableCell(2, 2).getText()); - } - - /** - * Test context root, host name, path and Java 2 delegation model in the web container table - * @param table the web container table - * @param contextRoot the expected value of the context root - * @param hostName the expected value of the host name - * @param path the end of the path value - * @param model the expected value of the Java 2 delegation model - */ - private void testWebContainerTable(WebTable table, String contextRoot, String hostName, String path, String model) { - // Context root - assertEquals("It is not the context root. ", contextRoot, table.getTableCell(0, 2).getText()); - // Host name localhost - assertEquals("It is not the host name. ", hostName, table.getTableCell(1, 2).getText()); - // Path /home/kemlerp/base/jonas/webapps/autoload/ctxroot.war - assertTrue("It is not the end of the path. ", table.getTableCell(2, 2).getText().endsWith(path)); - // Java 2 delegation model true - assertEquals("It is not the Java 2 delegation model value. ", model, table.getTableCell(3, 2).getText()); - } - - /** - * Test if the save button goes to the servlet server page and if save all and cancel buttons return to the previous page - * @param wr the content frame in the WebApp tab and catalina is used. - * @return wr the content frame in the WebApp tab. - * @throws Exception if an error occurs. - */ - private WebResponse testSaveButton(WebResponse wr) throws Exception { - String beginTime; - String endTime; - WebLink link; - WebForm form = wr.getForms()[0]; - String previousPage = wr.getElementsWithAttribute("class", "contentTitle")[0].getText(); - // Get the 3rd button : 'btnSave' - Button button = form.getButtons()[2]; - button.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - assertTrue("The save button doesn't go to 'jonasserver/servletServer.jsp'. ", wr.getText().indexOf( - "jonasserver/servletServer.jsp") != -1); - // Get time - beginTime = getTime(); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, BUTTON_SERVLET_SAVE_ALL); - WebResponse wrSaveAll = wc.sendRequest(link.getRequest()); - // Get time - endTime = getTime(); - // Delete created files: server.xml - JonasAdminFiles.recoverServerConf(beginTime, endTime); - assertEquals("The cancel button of the servlet server page doesn't go back to '" + previousPage + "' page. !", - previousPage, wrSaveAll.getElementsWithAttribute("class", "contentTitle")[0].getText()); - - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, BUTTON_SERVLET_CANCEL); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - assertEquals("The cancel button of the servlet server page doesn't go back to '" + previousPage + "' page. !", - previousPage, wr.getElementsWithAttribute("class", "contentTitle")[0].getText()); - - return wr; - } - - /** - * Test modification of settings - * @param wr the content frame in the WebApp tab. - * @return wr the content frame in the WebApp tab. - * @throws Exception if an error occurs. - */ - private WebResponse testModifySettings(WebResponse wr) throws Exception { - WebForm form = wr.getForms()[0]; - form.setParameter("cookies", "false"); - form.setParameter("reloadable", "true"); - form.setParameter("swallowOutput", "true"); - Button button = form.getSubmitButton("btn_apply"); - button.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - form = wr.getForms()[0]; - String cookies = form.getParameterValue("cookies"); - String reloadable = form.getParameterValue("reloadable"); - String swallowOutput = form.getParameterValue("swallowOutput"); - - assertEquals("The value of the cookie parameter is not 'false'. ", "false", cookies); - assertEquals("The value of the reloadable parameter is not 'true'. ", "true", reloadable); - assertEquals("The value of the swallowOutput parameter is not 'true'. ", "true", swallowOutput); - - return wr; - } - - /** - * Test actions Start, Stop and Reload - * @param wr the content frame in the WebApp tab. - * @param selectedTab the selected Tab. - * @return the content frame in the WebApp tab. - * @throws Exception if an error occurs. - */ - private WebResponse testActions(WebResponse wr, JonasAdminUtils utils) throws Exception { - WebLink link; - TableCell reloadCell; - TableCell startCell; - TableCell stopCell; - WebTable tabTable; - WebConversation wc2 = new WebConversation(); - int selectedTab = 2; - WebTable table = utils.getTable(wr, 1).getTableCell(0, 0).getTables()[0]; - startCell = table.getTableCell(0, 1); - // No link for start button - assertEquals("There is a link for the 'Start' button. ", 0, startCell.getLinks().length); - // Disabled button - assertEquals("The 'Start' button is not grey. ", 1, - startCell.getElementsWithAttribute("class", "btnDisabled").length); - - // Stop action - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, BUTTON_WEBAPP_STOP); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - table = utils.getTable(wr, 1).getTableCell(0, 0).getTables()[0]; - reloadCell = table.getTableCell(0, 0); - startCell = table.getTableCell(0, 1); - stopCell = table.getTableCell(0, 2); - // No link for stop button and reload button - assertEquals("There is a link for the 'Reload' button. ", 0, reloadCell.getLinks().length); - assertEquals("There is a link for the 'Stop' button. ", 0, stopCell.getLinks().length); - // Disabled button - assertEquals("The 'Reload' button is not grey. ", 1, reloadCell - .getElementsWithAttribute("class", "btnDisabled").length); - assertEquals("The 'Start' button is grey. ", 0, - startCell.getElementsWithAttribute("class", "btnDisabled").length); - assertEquals("The 'Stop' button is not grey. ", 1, - stopCell.getElementsWithAttribute("class", "btnDisabled").length); - // Verify URL - String urlRoot = prefixUrl + "/"; - int code = wc2.getResponse(urlRoot).getResponseCode(); - assertTrue("The page " + urlRoot + " is found. ", code != 200); - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_STOPPED_ROOT, selectedTab, "Problem in 'ROOT' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_WEB_CONTAINERS + " is not found in the first tab. ", tabTable - .getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_WEB_CONTAINERS)); - assertTrue("The link " + URL_JONASADMIN_EDIT_WAR + " is not found in the second tab. ", tabTable.getTableCell( - 0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_EDIT_WAR)); - assertTrue("The link " + URL_JONASADMIN_JONAS_XML + " is not found in the sixth tab. ", tabTable.getTableCell( - 0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_JONAS_XML)); - - // Start action - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, BUTTON_WEBAPP_START); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - table = utils.getTable(wr, 1).getTableCell(0, 0).getTables()[0]; - reloadCell = table.getTableCell(0, 0); - startCell = table.getTableCell(0, 1); - stopCell = table.getTableCell(0, 2); - // No link for start button - assertEquals("There is a link for the 'Start' button. ", 0, startCell.getLinks().length); - // Disabled button - assertEquals("The 'Reload' button is grey. ", 0, - reloadCell.getElementsWithAttribute("class", "btnDisabled").length); - assertEquals("The 'Start' button is not grey. ", 1, - startCell.getElementsWithAttribute("class", "btnDisabled").length); - assertEquals("The 'Stop' button is grey. ", 0, stopCell.getElementsWithAttribute("class", "btnDisabled").length); - // Verify URL - code = wc2.getResponse(urlRoot).getResponseCode(); - assertEquals("The page " + urlRoot + " is not found. ", 200, code); - - // Reload action - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, BUTTON_WEBAPP_RELOAD); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - table = utils.getTable(wr, 1).getTableCell(0, 0).getTables()[0]; - reloadCell = table.getTableCell(0, 0); - startCell = table.getTableCell(0, 1); - stopCell = table.getTableCell(0, 2); - // No link for start button - assertEquals("There is a link for the 'Start' button. ", 0, startCell.getLinks().length); - // Disabled button - assertEquals("The 'Reload' button is grey. ", 0, - reloadCell.getElementsWithAttribute("class", "btnDisabled").length); - assertEquals("The 'Start' button is not grey. ", 1, - startCell.getElementsWithAttribute("class", "btnDisabled").length); - assertEquals("The 'Stop' button is grey. ", 0, stopCell.getElementsWithAttribute("class", "btnDisabled").length); - // Verify URL - code = wc2.getResponse(urlRoot).getResponseCode(); - assertEquals("The page " + urlRoot + " is not found. ", 200, code); - - return wr; - } - - /** - * Test servlet infos - * @param wr the content frame in the Servlet tab. - * @param utils jonasAdmin utils - * @return WebResponse the content frame - * @throws Exception if an error occurs - */ - private WebResponse testServlet(WebResponse wr, JonasAdminUtils utils) throws Exception { - WebLink link; - WebTable table; - table = utils.getTable(wr, 0); - int nbServlets = Integer.parseInt(table.getTableCell(0, 2).getText()); - - table = utils.getTable(wr, 2); - // Number of rows = number of servlets - assertEquals("There are not '" + nbServlets + "' rows in the 'Name' table. ", nbServlets, table.getRowCount()); - - // Verify Servlets with a MBean link - for (int i = 0; i < nbServlets; i++) { - String name = table.getTableCell(i, 0).getText(); - int code = wc.getResponse(prefixUrl + "/jonasAdmin/ListMBeanDetails.do?select=" + name).getResponseCode(); - assertEquals("The MBean details for '" + name + "' are not found. ", 200, code); - } - - wc.getResponse(urlWelcome); - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_WEB_CONTAINERS); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - table = utils.getTable(wr, 0); - int rowRoot = utils.getFirstRow("ROOT", table, 0).intValue(); - if (rowRoot != -1) { - link = table.getTableCell(rowRoot, 0).getLinks()[0]; - link.click(); - } else { - fail("The WebContainer 'ROOT' was not found in the web container list. "); - } - wr = wc.getFrameContents(FRAME_CONTENT); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_SERVLETS); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - return wr; - } - - private void testInApplicationContainer(WebTable table) throws Exception { - // Verify path - String path = table.getTableCell(0, 2).getText(); - assertTrue("The path doesn't end with 'apps" + File.separator + "alarm.ear'. ", path.endsWith("apps" - + File.separator + "alarm.ear")); - - // Verify link - String name = table.getTableCell(0, 0).getText(); - assertEquals("The name of the application container is not 'alarm.ear'. ", "alarm.ear", name); - WebLink link = table.getTableCell(0, 0).getLinks()[0]; - try { - int code = wc.sendRequest(link.getRequest()).getResponseCode(); - assertEquals("The page 'alarm.ear' is not found (link = '" + link.getURLString() + "'). ", 200, code); - } catch (Exception e) { - fail("The link '" + link.getURLString() + "' creates an error. "); - } - } - - /** - * Tear Down cleanUp action - * @throws Exception if an error occurs - */ - public void tearDown() throws Exception { - super.tearDown(); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/database/C_JonasAdminServiceDatabase.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/database/C_JonasAdminServiceDatabase.java deleted file mode 100755 index a1940d1172a63479161551130d1ab13a2b355d62..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/database/C_JonasAdminServiceDatabase.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.service.database; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; - -import com.meterware.httpunit.WebConversation; - -import junit.framework.Test; -import junit.framework.TestSuite; - -/** - * Define a class to test database service - * Test : - database service - * - * @author Paul Kemler - */ -public class C_JonasAdminServiceDatabase extends JonasAdminTestCase { - - /** - * Constructor with a specified name - * @param name the name - */ - public C_JonasAdminServiceDatabase(String name) { - super(name); - } - - /** - * Get a new TestSuite for this class - * It includes all jonasAdmin tests - * @return a new TestSuite for this class - */ - public static Test suite() { - TestSuite suite = new TestSuite(); - suite.addTest(F_JonasAdminDatabase.suite()); - - return suite; - } - - /** - * Main method - * @param args the arguments - */ - public static void main (String[] args) { - WebConversation wc = new WebConversation(); - junit.textui.TestRunner.run(suite()); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/database/F_JonasAdminDatabase.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/database/F_JonasAdminDatabase.java deleted file mode 100755 index a9972894f1e5b307953f526692087a0516ea17f3..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/database/F_JonasAdminDatabase.java +++ /dev/null @@ -1,500 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.service.database; - -import java.util.Properties; - -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; -import javax.management.Query; -import javax.management.QueryExp; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminFiles; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminUtils; - -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.WebForm; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - -/** - * Class for testing database service - * @author Paul Kemler - * - */ -public class F_JonasAdminDatabase extends JonasAdminTestCase { - - /** - * URL of database service - */ - private static final String URL_JONASADMIN_SERVICE_DATABASE = "ListDatabases.do"; - - /** - * URL of datasource statistics - */ - private static final String URL_JONASADMIN_EDIT = "EditDatasource.do"; - - /** - * URL of datasource statistics - */ - private static final String URL_JONASADMIN_STATISTICS = "EditDatasourceStat.do"; - - /** - * URL of database service - */ - private static final String URL_JONASADMIN_USED_BY = "datasourceUsedBy.jsp"; - - /** - * number of tabs when you are in the datasource tab - */ - private static final int NUMBER_OF_TABS_FOR_DATASOURCE = 1; - - /** - * number of tabs when the datasource is not used - */ - private static final int NUMBER_OF_TABS_FOR_DATASOURCE_NOT_USED = 3; - - /** - * number of tabs when the datasource is used - */ - private static final int NUMBER_OF_TABS_FOR_DATASOURCE_USED = 4; - - /** - * name of the datasource - */ - private String name = ""; - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminDatabase(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminDatabase(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminDatabase.class); - } - - /** - * Setup need for these tests - * jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - } - - /** - * Test information of a JDBC - * @throws Exception if error occurs - * - */ - public void testJDBCInfo() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - int selectedTab; - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - if (jProp.isDbm()) { - // Add datasource - name = "new_datasource_info"; - String datasourceName = name; - String datasourceUrl = "jdbc:hsqldb:hsql://localhost:9001/db_jonas"; - String datasourceClassname = "org.hsqldb.jdbcDriver"; - String datasourceUsername = "jonas"; - String datasourcePassword = "jonas"; - String datasourceMapper = "rdb.hsql"; - String jdbcConnchecklevel = "0"; - String jdbcConnmaxage = "1440"; - String jdbcMaxopentime = "60"; - String jdbcConnteststmt = "select 1"; - String jdbcMinconpool = "10"; - String jdbcMaxconpool = "30"; - String jdbcSamplingperiod = "30"; - String jdbcMaxwaittime = "5"; - String jdbcMaxwaiters = "100"; - - Properties properties = new Properties(); - properties.put("datasource.name", datasourceName); - properties.put("datasource.url", datasourceUrl); - properties.put("datasource.classname", datasourceClassname); - properties.put("datasource.username", datasourceUsername); - properties.put("datasource.password", datasourcePassword); - properties.put("datasource.mapper", datasourceMapper); - properties.put("jdbc.connchecklevel", jdbcConnchecklevel); - properties.put("jdbc.connmaxage", jdbcConnmaxage); - properties.put("jdbc.maxopentime", jdbcMaxopentime); - properties.put("jdbc.connteststmt", jdbcConnteststmt); - properties.put("jdbc.minconpool", jdbcMinconpool); - properties.put("jdbc.maxconpool", jdbcMaxconpool); - properties.put("jdbc.samplingperiod", jdbcSamplingperiod); - properties.put("jdbc.maxwaittime", jdbcMaxwaittime); - properties.put("jdbc.maxwaiters", jdbcMaxwaiters); - - useDatasource(name, properties); - - // Use alarm.ear for adding opened connections - useEar("alarm"); - - // Go to service database - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_SERVICE_DATABASE); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 1; - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_DATASOURCE, selectedTab, "Problem in 'Datasources' tab."); - - // Verify JNDI Name - table = utils.getTable(wr, 0); - int rowNewDatasource = utils.getRow(name, table).intValue(); - if (rowNewDatasource == -1) { - fail("'" + name + "' was not found in the table. "); - } - int columnJNDI = 1; - assertEquals("It is not the JNDI name of '" + name + "'. ", datasourceName, table.getTableCell(rowNewDatasource, columnJNDI).getText()); - - // Verify JDBC Connection - int columnJDBCConnection = 2; - int currentOpenedConnection = getCurrentOpenedConnection(datasourceName); - assertEquals("It is not the number of opened connection for '" + name + "'. ", currentOpenedConnection, Integer.parseInt(table.getTableCell(rowNewDatasource, columnJDBCConnection).getText())); - - // Go to "new_datasource_info" database - link = wr.getLinkWith(name); - if (link == null) { - fail("No link was found for '" + name + "'in the page. "); - } - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 2; - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_DATASOURCE_NOT_USED, selectedTab, "Problem in the datasource tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_SERVICE_DATABASE + " is not found in the first tab. ", tabTable - .getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_SERVICE_DATABASE)); - assertTrue("The link " + URL_JONASADMIN_STATISTICS + " is not found in the third tab. ", tabTable - .getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_STATISTICS)); - - // Verify information - // JDBC Datasource configuration - table = utils.getTable(wr, 1); - // JNDI name - assertEquals("It is not the JNDI name of '" + name + "'. ", datasourceName, table.getTableCell(0, 2).getText()); - // Description no desc - assertEquals("It is not the description of '" + name + "'. ", "no desc", table.getTableCell(1, 2).getText()); - // URL jdbc:hsqldb:hsql://localhost:9001/db_jonas - assertEquals("It is not the URL of '" + name + "'. ", datasourceUrl, table.getTableCell(2, 2).getText()); - // User name jonas - assertEquals("It is not the user name of '" + name + "'. ", datasourceUsername, table.getTableCell(3, 2).getText()); - // User password jonas - assertEquals("It is not the user password of '" + name + "'. ", datasourcePassword, table.getTableCell(4, 2).getText()); - // Mapper rdb.hsql - assertEquals("It is not the mapper of '" + name + "'. ", datasourceMapper, table.getTableCell(5, 2).getText()); - - // JDBC Driver configuration - table = utils.getTable(wr, 4); - // Driver class name org.hsqldb.jdbcDriver - assertEquals("It is not the driver class name of '" + name + "'. ", datasourceClassname, table.getTableCell(0, 2).getText()); - - // JDBC connection configuration - WebForm form = wr.getForms()[0]; - // Maximum age - assertEquals("It is not the maximum age of '" + name + "'. ", jdbcConnmaxage, form.getParameterValue("jdbcConnMaxAge")); - // Maximum open time - assertEquals("It is not the maximum open time of '" + name + "'. ", jdbcMaxopentime, form.getParameterValue("jdbcMaxOpenTime")); - // Checking level - assertEquals("It is not the checking level of '" + name + "'. ", jdbcConnchecklevel, form.getParameterValue("jdbcConnCheckLevel")); - // Test - assertEquals("It is not the test of '" + name + "'. ", jdbcConnteststmt, form.getParameterValue("jdbcTestStatement")); - // Pool minimum - assertEquals("It is not the pool minimum of '" + name + "'. ", jdbcMinconpool, form.getParameterValue("jdbcMinConnPool")); - // Pool maximum - assertEquals("It is not the pool maximum time of '" + name + "'. ", jdbcMaxconpool, form.getParameterValue("jdbcMaxConnPool")); - // Max Wait Time - assertEquals("It is not the maximum wait time of '" + name + "'. ", jdbcMaxwaittime, form.getParameterValue("jdbcMaxWaitTime")); - // Max Waiters - assertEquals("It is not the maximum waiters of '" + name + "'. ", jdbcMaxwaiters, form.getParameterValue("jdbcMaxWaiters")); - // Sampling Period - assertEquals("It is not the sampling Period of '" + name + "'. ", jdbcSamplingperiod, form.getParameterValue("jdbcSamplingPeriod")); - - } - } - - /** - * Test Used By Tab of database service - * @throws Exception if error occurs - * - */ - public void testJDBCUsedBy() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - int selectedTab; - String jdbc1Datasource = ""; - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - if (jProp.isDbm()) { - - // Go to service database - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_SERVICE_DATABASE); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 1; - - // Search if there is a datasource with 'jdbc_1' as JNDI name - table = utils.getTable(wr, 0); - int columnJNDI = 1; - int rowJDBC1 = utils.getRow("jdbc_1", table, columnJNDI).intValue(); - if (rowJDBC1 == -1) { - // Add datasource - name = "new_datasource_used_by"; - String datasourceName = "jdbc_1"; - String datasourceUrl = "jdbc:hsqldb:hsql://localhost:9001/db_jonas"; - String datasourceClassname = "org.hsqldb.jdbcDriver"; - String datasourceUsername = "jonas"; - String datasourcePassword = "jonas"; - String datasourceMapper = "rdb.hsql"; - String jdbcConnchecklevel = "0"; - String jdbcConnmaxage = "1440"; - String jdbcMaxopentime = "60"; - String jdbcConnteststmt = "select 1"; - String jdbcMinconpool = "10"; - String jdbcMaxconpool = "30"; - String jdbcSamplingperiod = "30"; - String jdbcMaxwaittime = "5"; - String jdbcMaxwaiters = "100"; - - Properties properties = new Properties(); - properties.put("datasource.name", datasourceName); - properties.put("datasource.url", datasourceUrl); - properties.put("datasource.classname", datasourceClassname); - properties.put("datasource.username", datasourceUsername); - properties.put("datasource.password", datasourcePassword); - properties.put("datasource.mapper", datasourceMapper); - properties.put("jdbc.connchecklevel", jdbcConnchecklevel); - properties.put("jdbc.connmaxage", jdbcConnmaxage); - properties.put("jdbc.maxopentime", jdbcMaxopentime); - properties.put("jdbc.connteststmt", jdbcConnteststmt); - properties.put("jdbc.minconpool", jdbcMinconpool); - properties.put("jdbc.maxconpool", jdbcMaxconpool); - properties.put("jdbc.samplingperiod", jdbcSamplingperiod); - properties.put("jdbc.maxwaittime", jdbcMaxwaittime); - properties.put("jdbc.maxwaiters", jdbcMaxwaiters); - - useDatasource(name, properties); - - jdbc1Datasource = name; - } else { - jdbc1Datasource = table.getTableCell(rowJDBC1, 0).getText(); - } - - // Use alarm.ear - useEar("alarm"); - - // Reload service database page - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_SERVICE_DATABASE); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 1; - - // Verify JDBC Connection is positif - rowJDBC1 = utils.getRow("jdbc_1", table, columnJNDI).intValue(); - int columnJDBCConnection = 2; - int currentOpenedConnection = getCurrentOpenedConnection("jdbc_1"); - assertEquals("It is not the number of opened connection for 'jdbc_1'. ", currentOpenedConnection, Integer.parseInt(table.getTableCell(rowJDBC1, columnJDBCConnection).getText())); - assertTrue("There is no opened connection for 'jdbc_1' JNDI name. ", currentOpenedConnection > 0); - - // Go to database - link = wr.getLinkWith(jdbc1Datasource); - if (link == null) { - fail("No link was found for '" + name + "'in the page. "); - } - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 2; - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_DATASOURCE_USED, selectedTab, "Problem in the datasource tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_SERVICE_DATABASE + " is not found in the first tab. ", tabTable - .getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_SERVICE_DATABASE)); - assertTrue("The link " + URL_JONASADMIN_STATISTICS + " is not found in the third tab. ", tabTable - .getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_STATISTICS)); - assertTrue("The link " + URL_JONASADMIN_USED_BY + " is not found in the third tab. ", tabTable - .getTableCell(0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_USED_BY)); - - // Go to "Used by" tab - link = wr.getFirstMatchingLink(WebLink.MATCH_URL_STRING, URL_JONASADMIN_USED_BY); - if (link == null) { - fail("No link was found for '" + name + "'in the page. "); - } - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 4; - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_DATASOURCE_USED, selectedTab, "Problem in the datasource tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_SERVICE_DATABASE + " is not found in the first tab. ", tabTable - .getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_SERVICE_DATABASE)); - assertTrue("The link " + URL_JONASADMIN_EDIT + " is not found in the third tab. ", tabTable - .getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_EDIT)); - assertTrue("The link " + URL_JONASADMIN_STATISTICS + " is not found in the third tab. ", tabTable - .getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_STATISTICS)); - - // Verify there is Alarm Record EJB - table = utils.getTable(wr, 0); - int rowEJB = utils.getRow("AlarmRecord", table).intValue(); - if (rowEJB == -1) { - fail("There is not 'Alarm Record' in the 'Used By' table. " + table.getText()); - } - - // Verify type - assertEquals("The EJB type is not EntityBean. ", "EntityBean", table.getTableCell(rowEJB, 1).getText()); - - // Verify link - link = table.getTableCell(rowEJB, 0).getLinks()[0]; - if (link == null) { - fail("No link was found for '" + name + "'in the page. "); - } - int code = wc.sendRequest(link.getRequest()).getResponseCode(); - assertEquals("Fail to go to '" + link.getURLString() + "'. ", 200, code); - - } - } - - /** - * Tear Down - * cleanUp action - */ - public void tearDown() throws Exception { - - if (jProp.isDbm()) { - // remove created datasource file - if (!name.equals("")) { - // Undeploy datasource - unUseDatasource(name); - // Delete file - JonasAdminFiles.deleteConfigFile(name + ".properties"); - name = ""; - } - } - super.tearDown(); - } - - /** - * Get current opened connection - * @return number of current opened connection - * @throws Exception if an error occurs - */ - private int getCurrentOpenedConnection(String jndiName) throws Exception { - MBeanServerConnection server = getMBeanServer(); - ObjectName on = ObjectName.getInstance("*:j2eeType=JDBCDataSource,*"); - - QueryExp exp = Query.match(Query.attr("jndiName"), Query.value(jndiName)); - - ObjectName dataSourceON = (ObjectName) server.queryNames(on, exp).iterator().next(); - Integer currentOpenedConnection = (Integer) server.getAttribute(dataSourceON, "currentOpened"); - - return currentOpenedConnection.intValue(); - } - -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/discovery/C_JonasAdminServiceDiscovery.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/discovery/C_JonasAdminServiceDiscovery.java deleted file mode 100755 index d43f713e1f24b7b10a1926878335d7cd9d172354..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/discovery/C_JonasAdminServiceDiscovery.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.service.discovery; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; - -import com.meterware.httpunit.WebConversation; - -import junit.framework.Test; -import junit.framework.TestSuite; - -/** - * Define a class to test discovery service - * Test : - service/discovery - * - * @author Paul Kemler - */ -public class C_JonasAdminServiceDiscovery extends JonasAdminTestCase { - - /** - * Constructor with a specified name - * @param name the name - */ - public C_JonasAdminServiceDiscovery(String name) { - super(name); - } - - /** - * Get a new TestSuite for this class - * It includes all jonasAdmin tests - * @return a new TestSuite for this class - */ - public static Test suite() { - TestSuite suite = new TestSuite(); - suite.addTest(F_JonasAdminDiscovery.suite()); - - return suite; - } - - /** - * Main method - * @param args the arguments - */ - public static void main (String[] args) { - WebConversation wc = new WebConversation(); - junit.textui.TestRunner.run(suite()); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/discovery/F_JonasAdminDiscovery.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/discovery/F_JonasAdminDiscovery.java deleted file mode 100755 index dfe59671c79bd11e6c98844e95bd1c35093e7468..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/discovery/F_JonasAdminDiscovery.java +++ /dev/null @@ -1,217 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.service.discovery; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminUtils; - -import com.meterware.httpunit.HTMLElement; -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - -/** - * Class for testing discovery service - * @author Paul Kemler - * - */ -public class F_JonasAdminDiscovery extends JonasAdminTestCase { - - /** - * URL of discovery service - */ - private static final String URL_JONASADMIN_DISCOVERY = "EditServiceDiscovery.do"; - - /** - * number of tabs when you are in discovery - */ - private static final int NUMBER_OF_TABS_FOR_DISCOVERY = 1; - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminDiscovery(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminDiscovery(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminDiscovery.class); - } - - /** - * Setup need for these tests - * jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - } - - /** - * Test discovery table - * @throws Exception if error occurs - * - */ - public void testDiscovery() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - int selectedTab; - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - // Test only if the discovery service is enabled - if (jProp.isDiscovery()) { - - // Go to discovery service - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_DISCOVERY); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 1; - - // Verify multicast infos - table = utils.getTable(wr, 0); - // Multicast address - String address = jProp.getPropertiesEnv().getProperty("jonas.service.discovery.multicast.address"); - assertEquals("It is not the expected multicast address. ", address, table.getTableCell(0, 2).getText()); - // Multicast port - String port = jProp.getPropertiesEnv().getProperty("jonas.service.discovery.multicast.port"); - assertEquals("It is not the expected multicast port. ", port, table.getTableCell(1, 2).getText()); - - // Verify action - String master = table.getTableCell(2, 2).getText(); - table = utils.getTable(wr, 3); - if (master.equals("true")) { - // class="btnDisabled" - HTMLElement[] btnDisabled = table.getTableCell(0, 0).getElementsWithAttribute("class", "btnDisabled"); - assertEquals("The class of the Start button is not 'btnDisabled'. ", 1, btnDisabled.length); - - // No link - WebLink[] btnLink = table.getTableCell(0, 0).getLinks(); - assertEquals("There is a link on the Start button. ", 0, btnLink.length); - } else { - // No class="btnDisabled" - HTMLElement[] btnDisabled = table.getTableCell(0, 0).getElementsWithAttribute("class", "btnDisabled"); - assertEquals("The class of the Start button is not 'btnDisabled'. ", 0, btnDisabled.length); - - // link=/DiscoveryServiceStartMaster.do - WebLink[] btnLink = table.getTableCell(0, 0).getLinks(); - assertEquals("There is no link on the Start button. ", 1, btnLink.length); - assertTrue("It is not the expected URL of the Start button. ", btnLink[0].getURLString().endsWith("/DiscoveryServiceStartMaster.do")); - - // Start Master - btnLink[0].click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify is master - table = utils.getTable(wr, 0); - master = table.getTableCell(2, 2).getText(); - assertEquals("It is not master. ", "true", master); - table = utils.getTable(wr, 3); - // class="btnDisabled" - btnDisabled = table.getTableCell(0, 0).getElementsWithAttribute("class", "btnDisabled"); - assertEquals("The class of the Start button is not 'btnDisabled'. ", 1, btnDisabled.length); - - // No link - btnLink = table.getTableCell(0, 0).getLinks(); - assertEquals("There is a link on the Start button. ", 0, btnLink.length); - } - - // Verify there is 1 tab - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_DISCOVERY, selectedTab, "Problem in 'Discovery' tab."); - } - } - - /** - * Tear Down cleanUp action - * @throws Exception if an error occurs - */ - public void tearDown() throws Exception { - super.tearDown(); - } - -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/jtm/C_JonasAdminServiceTransaction.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/jtm/C_JonasAdminServiceTransaction.java deleted file mode 100755 index 9b2b0e578a352f3b5b9c496a0224ea1918d81d9b..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/jtm/C_JonasAdminServiceTransaction.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.service.jtm; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; - -import com.meterware.httpunit.WebConversation; - -import junit.framework.Test; -import junit.framework.TestSuite; - -/** - * Define a class to test transaction service - * Test : - service/transaction - * - * @author Paul Kemler - */ -public class C_JonasAdminServiceTransaction extends JonasAdminTestCase { - - /** - * Constructor with a specified name - * @param name the name - */ - public C_JonasAdminServiceTransaction(String name) { - super(name); - } - - /** - * Get a new TestSuite for this class - * It includes all jonasAdmin tests - * @return a new TestSuite for this class - */ - public static Test suite() { - TestSuite suite = new TestSuite(); - suite.addTest(F_JonasAdminServiceTransaction.suite()); - - return suite; - } - - /** - * Main method - * @param args the arguments - */ - public static void main (String[] args) { - WebConversation wc = new WebConversation(); - junit.textui.TestRunner.run(suite()); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/jtm/F_JonasAdminServiceTransaction.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/jtm/F_JonasAdminServiceTransaction.java deleted file mode 100755 index f7a3b7cb06aeb13db00805129828f6eb093d1e52..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/jtm/F_JonasAdminServiceTransaction.java +++ /dev/null @@ -1,640 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.service.jtm; - -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminUtils; - -import com.meterware.httpunit.Button; -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.WebConversation; -import com.meterware.httpunit.WebForm; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - -/** - * Class for testing transaction service - * @author Paul Kemler - * - */ -public class F_JonasAdminServiceTransaction extends JonasAdminTestCase { - - /** - * URL of transaction - */ - private static final String URL_JONASADMIN_TRANSACTION = "EditJtmService.do"; - - /** - * URL of transaction Statistics - */ - private static final String URL_JONASADMIN_TRANSACTION_STATISTICS = "EditTransactionStatistic.do"; - - /** - * URL of transaction Monitor - */ - private static final String URL_JONASADMIN_TRANSACTION_MONITOR = "EditTransactionMonitor.do"; - - /** - * URL of transaction Recovery - */ - private static final String URL_JONASADMIN_TRANSACTION_RECOVERY = "EditTransactionRecovery.do"; - - /** - * URL of reset button - */ - private static final String URL_JONASADMIN_TRANSACTION_RESET = "ResetCounters.do"; - - /** - * number of tabs when you are in the transaction tabs - */ - private static final int NUMBER_OF_TABS_FOR_TRANSACTION = 4; - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminServiceTransaction(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminServiceTransaction(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminServiceTransaction.class); - } - - /** - * Setup need for these tests - * jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - } - - /** - * Test Transaction Manager infos - * @throws Exception if error occurs - * - */ - public void testTransactionManagerInfos() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - int selectedTab; - String location; - String hostName; - String port; - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - // Test only if the transaction service is enabled - if (jProp.isJtm()) { - - // Go to transaction - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_TRANSACTION); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 1; - - // Verify transaction manager infos - table = utils.getTable(wr, 0); - location = getLocation(); - hostName = getHostName(); - port = getPortNumber(); - if (port.equals("0")) { - port = "undefined"; - } - // Location collocated - assertEquals("It is not the expected location value. ", location, table.getTableCell(0, 2).getText()); - // Host name mururoa.frec.bull.fr - assertEquals("It is not the expected host name value. ", hostName, table.getTableCell(1, 2).getText()); - // Port number undefined - assertEquals("It is not the expected port number. ", port, table.getTableCell(2, 2).getText()); - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_TRANSACTION, selectedTab, "Problem in 'alarm.jar' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_TRANSACTION_STATISTICS + " is not found in the second tab. ", - tabTable.getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_TRANSACTION_STATISTICS)); - assertTrue("The link " + URL_JONASADMIN_TRANSACTION_MONITOR + " is not found in the third tab. ", - tabTable.getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_TRANSACTION_MONITOR)); - assertTrue("The link " + URL_JONASADMIN_TRANSACTION_RECOVERY + " is not found in the fourth tab. ", - tabTable.getTableCell(0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_TRANSACTION_RECOVERY)); - - } - } - - /** - * Test to modify time-out - * @throws Exception if an error occurs. - */ - public void testTransactionTimeOut() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - // Test only if the transaction service is enabled - if (jProp.isJtm()) { - - // Go to transaction - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_TRANSACTION); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Modify time-out - WebForm form = wr.getForms()[0]; - form.setParameter("timeOutText", "0"); - - // Apply - Button button = form.getButtons()[0]; - button.click(); - - // Verify "timeOutText" value - wr = wc.getFrameContents(FRAME_CONTENT); - form = wr.getForms()[0]; - assertEquals("The Transaction time-out is not '0'. ", "0", form.getParameterValue("timeOutText")); - } - } - - /** - * Test transaction statistics with transactions of the cmp2.ear example. - * @throws Exception if an error occurs. - */ - public void testTransactionStatistics() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - int selectedTab; - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - // Test only if the transaction service is enabled - if (jProp.isJtm() && jProp.isEar()) { - - // Add cmp2.ear - useEar("cmp2"); - - // Go to transaction - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_TRANSACTION); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 1; - - // Go to Statistics - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_TRANSACTION_STATISTICS); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 2; - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_TRANSACTION, selectedTab, "Problem in 'statistics' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_TRANSACTION + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_TRANSACTION)); - assertTrue("The link " + URL_JONASADMIN_TRANSACTION_MONITOR + " is not found in the third tab. ", - tabTable.getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_TRANSACTION_MONITOR)); - assertTrue("The link " + URL_JONASADMIN_TRANSACTION_RECOVERY + " is not found in the fourth tab. ", - tabTable.getTableCell(0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_TRANSACTION_RECOVERY)); - - // Create transactions - executeCMP2Example2(); - - // Refresh - wc.sendRequest(wr.getRefreshRequest()); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify statistics - table = utils.getTable(wr, 3); - // Current number of transactions - int currentNbTransaction = Integer.parseInt(table.getTableCell(0, 2).getText()); - // Number of begun transactions - int nbBegunTransaction = Integer.parseInt(table.getTableCell(1, 2).getText()); - // Number of commited transactions - int nbCommitedTransaction = Integer.parseInt(table.getTableCell(2, 2).getText()); - // Number of rolledback transactions - int nbRolledbackTransaction = Integer.parseInt(table.getTableCell(3, 2).getText()); - // Number of transactions with expired time-out - int nbTransactionExpiredTimeOut = Integer.parseInt(table.getTableCell(4, 2).getText()); - - // nbBegunTransaction > 0 - assertTrue("'Number of begun transactions' is not positif. ", nbBegunTransaction > 0); - // currentNbTransaction + nbCommitedTransaction + nbRolledbackTransaction > 0 - assertTrue("The sum of 'Number of begun transactions', 'Number of commited transactions' and 'Number of rolledback transactions' is not positif. ", currentNbTransaction + nbCommitedTransaction + nbRolledbackTransaction > 0); - - // 0 <= nbTransactionExpiredTimeOut - assertTrue("'Number of transactions with expired time-out' is not positif. ", nbTransactionExpiredTimeOut >= 0); - } - } - - /** - * Test the 'Reset Counters' button in statistics. - * @throws Exception if an error occurs - */ - public void testResetCounters() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - // Test only if the transaction service is enabled - if (jProp.isJtm() && jProp.isEar()) { - - // Add cmp2.ear - useEar("cmp2"); - - // Go to transaction - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_TRANSACTION); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to Statistics - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_TRANSACTION_STATISTICS); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Create transactions - executeCMP2Example1(); - - // Refresh - wc.sendRequest(wr.getRefreshRequest()); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify statistics - table = utils.getTable(wr, 3); - // Current number of transactions - int currentNbTransaction = Integer.parseInt(table.getTableCell(0, 2).getText()); - // Number of begun transactions - int nbBegunTransaction = Integer.parseInt(table.getTableCell(1, 2).getText()); - // Number of commited transactions - int nbCommitedTransaction = Integer.parseInt(table.getTableCell(2, 2).getText()); - // Number of rolledback transactions - int nbRolledbackTransaction = Integer.parseInt(table.getTableCell(3, 2).getText()); - // Number of transactions with expired time-out - int nbTransactionExpiredTimeOut = Integer.parseInt(table.getTableCell(4, 2).getText()); - int total = currentNbTransaction + nbBegunTransaction + nbCommitedTransaction + nbRolledbackTransaction + nbTransactionExpiredTimeOut; - // total > 0 - assertTrue("Counters are all at '0' after executing cmp2 example.", total > 0); - - // Reset counters - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_TRANSACTION_RESET); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify statistics - table = utils.getTable(wr, 3); - // Current number of transactions - currentNbTransaction = Integer.parseInt(table.getTableCell(0, 2).getText()); - // Number of begun transactions - nbBegunTransaction = Integer.parseInt(table.getTableCell(1, 2).getText()); - // Number of commited transactions - nbCommitedTransaction = Integer.parseInt(table.getTableCell(2, 2).getText()); - // Number of rolledback transactions - nbRolledbackTransaction = Integer.parseInt(table.getTableCell(3, 2).getText()); - // Number of transactions with expired time-out - nbTransactionExpiredTimeOut = Integer.parseInt(table.getTableCell(4, 2).getText()); - - // currentNbTransaction = 0 - assertEquals("'Current number of transactions' is not '0'", 0, currentNbTransaction); - // nbBegunTransaction = 0 - assertEquals("'Number of begun transactions' is not '0'", 0, nbBegunTransaction); - // nbCommitedTransaction = 0 - assertEquals("'Number of commited transactions' is not '0'", 0, nbCommitedTransaction); - // nbRolledbackTransaction = 0 - assertEquals("'Number of rolledback transactions' is not '0'", 0, nbRolledbackTransaction); - // nbTransactionExpiredTimeOut = 0 - assertEquals("'Number of transactions with expired time-out' is not '0'", 0, nbTransactionExpiredTimeOut); - - // Create transactions - executeCMP2Example1(); - - // Refresh - wc.sendRequest(wr.getRefreshRequest()); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify statistics - table = utils.getTable(wr, 3); - // Current number of transactions - currentNbTransaction = Integer.parseInt(table.getTableCell(0, 2).getText()); - // Number of begun transactions - nbBegunTransaction = Integer.parseInt(table.getTableCell(1, 2).getText()); - // Number of commited transactions - nbCommitedTransaction = Integer.parseInt(table.getTableCell(2, 2).getText()); - // Number of rolledback transactions - nbRolledbackTransaction = Integer.parseInt(table.getTableCell(3, 2).getText()); - // Number of transactions with expired time-out - nbTransactionExpiredTimeOut = Integer.parseInt(table.getTableCell(4, 2).getText()); - total = currentNbTransaction + nbBegunTransaction + nbCommitedTransaction + nbRolledbackTransaction + nbTransactionExpiredTimeOut; - // total > 0 - assertTrue("Counters are all at '0' after re-executing cmp2 example.", total > 0); - } - } - - /** - * Test transaction Monitor - * @throws Exception if an error occurs - */ - public void testTransactionMonitor() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - int selectedTab; - String location; - String hostName; - String port; - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - // Test only if the transaction service is enabled - if (jProp.isJtm()) { - - // Go to transaction - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_TRANSACTION); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to 'Monitor' - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_TRANSACTION_MONITOR); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 3; - - // Verify 'Monitor' table - table = utils.getTable(wr, 0); - if (!table.getTableCell(0, 0).getText().equals("Date")) { - // No Transactions in Execution ! - assertEquals("There is not the message: 'No Transactions in Execution !'. ", "No Transactions in Execution !", table.getTableCell(0, 0).getText()); - } else { - // There is one transaction (or more) - assertTrue("There is no text for the date. ", table.getTableCell(1, 0).getText().length() > 0); - assertTrue("There is no text for the transaction. ", table.getTableCell(1, 1).getText().length() > 0); - assertTrue("There is no text for the resource. ", table.getTableCell(1, 2).getText().length() > 0); - assertTrue("There is no text for the state. ", table.getTableCell(1, 3).getText().length() > 0); - } - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_TRANSACTION, selectedTab, "Problem in 'Monitor' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_TRANSACTION + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_TRANSACTION)); - assertTrue("The link " + URL_JONASADMIN_TRANSACTION_STATISTICS + " is not found in the second tab. ", - tabTable.getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_TRANSACTION_STATISTICS)); - assertTrue("The link " + URL_JONASADMIN_TRANSACTION_RECOVERY + " is not found in the fourth tab. ", - tabTable.getTableCell(0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_TRANSACTION_RECOVERY)); - } - } - - /** - * Test transaction Recovery - * @throws Exception if an error occurs - */ - public void testTransactionRecovery() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - int selectedTab; - String location; - String hostName; - String port; - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - // Test only if the transaction service is enabled - if (jProp.isJtm()) { - - // Go to transaction - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_TRANSACTION); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to 'Recovery' - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_TRANSACTION_RECOVERY); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 4; - - // Verify 'Recovery' table - table = utils.getTable(wr, 0); - // No Transactions in Execution ! - assertEquals("There is not the message: 'No Transactions to Recover !'. ", "No Transactions to Recover !", table.getTableCell(0, 0).getText()); - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_TRANSACTION, selectedTab, "Problem in 'Monitor' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_TRANSACTION + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_TRANSACTION)); - assertTrue("The link " + URL_JONASADMIN_TRANSACTION_STATISTICS + " is not found in the second tab. ", - tabTable.getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_TRANSACTION_STATISTICS)); - assertTrue("The link " + URL_JONASADMIN_TRANSACTION_MONITOR + " is not found in the third tab. ", - tabTable.getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_TRANSACTION_MONITOR)); - } - } - - /** - * Get jtm location - * @return "collocated" or "Remote" - * @throws Exception if an error occurs - */ - private String getLocation() throws Exception { - MBeanServerConnection server; - String location = ""; - boolean localJtm; - server = getMBeanServer(); - ObjectName on = new ObjectName("jonas:j2eeType=JTAResource,name=JTAResource,J2EEServer=jonas"); - localJtm = ((Boolean) server.getAttribute(on, "localJtm")).booleanValue(); - if (localJtm) { - location = "collocated"; - } else { - location = "Remote"; - } - return location; - } - - /** - * Get jtm Host Name - * @return jtm host name - * @throws Exception if an error occurs - */ - private String getHostName() throws Exception { - MBeanServerConnection server = getMBeanServer(); - String hostName = ""; - ObjectName on = new ObjectName("jonas:j2eeType=JTAResource,name=JTAResource,J2EEServer=jonas"); - hostName = (String) server.getAttribute(on, "hostName"); - return hostName; - } - - /** - * Get jtm port number - * @return jtm port number - * @throws Exception if an error occurs - */ - private String getPortNumber() throws Exception { - MBeanServerConnection server = getMBeanServer(); - String port = "0"; - ObjectName on = new ObjectName("jonas:j2eeType=JTAResource,name=JTAResource,J2EEServer=jonas"); - port = ((Integer) server.getAttribute(on, "portNumber")).toString(); - return port; - } - - /** - * Execute the test1 of cmp2 - * @throws Exception if an error occurs - */ - private void executeCMP2Example1() throws Exception { - WebConversation wc2 = new WebConversation(); - String urlExample1 = prefixUrl + "/cmp2/test1?"; - WebResponse wr = wc2.getResponse(urlExample1); - } - - /** - * Execute the test2 of cmp2 - * @throws Exception if an error occurs - */ - private void executeCMP2Example2() throws Exception { - WebConversation wc2 = new WebConversation(); - String urlExample2 = prefixUrl + "/cmp2/test2?"; - WebResponse wr = wc2.getResponse(urlExample2); - } - - /** - * Execute the test3 of cmp2 - * @throws Exception if an error occurs - */ - private void executeCMP2Example3() throws Exception { - WebConversation wc2 = new WebConversation(); - String urlExample3 = prefixUrl + "/cmp2/test3?"; - WebResponse wr = wc2.getResponse(urlExample3); - } - - /** - * Tear Down cleanUp action - * @throws Exception if an error occurs - */ - public void tearDown() throws Exception { - super.tearDown(); - } - -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/mail/C_JonasAdminServiceMail.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/mail/C_JonasAdminServiceMail.java deleted file mode 100755 index d9f5f5a7ea6708186a8ceba9c102e54c86540a4e..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/mail/C_JonasAdminServiceMail.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.service.mail; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; - -import com.meterware.httpunit.WebConversation; - -import junit.framework.Test; -import junit.framework.TestSuite; - -/** - * Define a class to test mail service - * Test : - mail service - * - * @author Paul Kemler - */ -public class C_JonasAdminServiceMail extends JonasAdminTestCase { - - /** - * Constructor with a specified name - * @param name the name - */ - public C_JonasAdminServiceMail(String name) { - super(name); - } - - /** - * Get a new TestSuite for this class - * It includes all jonasAdmin tests - * @return a new TestSuite for this class - */ - public static Test suite() { - TestSuite suite = new TestSuite(); - suite.addTest(F_JonasAdminServiceMail.suite()); - - return suite; - } - - /** - * Main method - * @param args the arguments - */ - public static void main (String[] args) { - WebConversation wc = new WebConversation(); - junit.textui.TestRunner.run(suite()); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/mail/F_JonasAdminServiceMail.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/mail/F_JonasAdminServiceMail.java deleted file mode 100755 index 7ae86b95046d7fb63b52d3ac09e6f2e83f62d7f4..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/mail/F_JonasAdminServiceMail.java +++ /dev/null @@ -1,565 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.service.mail; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminUtils; - -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.WebConversation; -import com.meterware.httpunit.WebForm; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - -/** - * Class for testing ... - * @author Paul Kemler - * - */ -public class F_JonasAdminServiceMail extends JonasAdminTestCase { - - /** - * URL of mail service - */ - private static final String URL_JONASADMIN_MAIL_SERVICE = "EditMailService.do"; - - /** - * URL of Mail resource - */ - private static final String URL_JONASADMIN_MAIL = "EditDeploy.do?type=mail"; - - /** - * URL of Mail resource viewTree - */ - private static final String URL_JONASADMIN_VIEW_MAIL = "viewTree.do?tree=domain*jonas*resources"; - - /** - * URL of Session Mail Factories - */ - private static final String URL_JONASADMIN_SESSION_MF = "ListSessionMailFactories.do"; - - /** - * URL of Mime part datasource Mail Factories - */ - private static final String URL_JONASADMIN_MIME_PART_DATASOURCE_MF = "ListMimePartMailFactories.do"; - - /** - * number of tabs when you are in the mail tabs - */ - private static final int NUMBER_OF_TABS_FOR_MAIL = 3; - - /** - * number of tabs when you are in the Session Mail Factory tab - */ - private static final int NUMBER_OF_TABS_FOR_SESSION = 4; - - /** - * number of tabs when you are in the MimePartDS Mail Factory tab - */ - private static final int NUMBER_OF_TABS_FOR_MIME_PART_DS = 4; - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminServiceMail(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminServiceMail(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminServiceMail.class); - } - - /** - * Setup need for these tests - * jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - } - - /** - * Test mail service without mail factory - * @throws Exception if error occurs - * - */ - public void testNoDeployedMailFactory() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - int selectedTab; - /* - * To get some utils for WebTable - */ - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - if (jProp.isMail()) { - - // Undeploy mail factories - undeployMailFactories(wc); - - // Go to mail service - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_MAIL_SERVICE); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 1; - - // Verify numbers - table = utils.getTable(wr, 1); - int sessionMF = Integer.parseInt(table.getTableCell(0, 2).getText()); - int mimePartDatasourceMF = Integer.parseInt(table.getTableCell(1, 2).getText()); - int total = Integer.parseInt(table.getTableCell(2, 2).getText()); - - // Session factories 0 - assertEquals("The number of Session Factories is not '0'. ", 0, sessionMF); - // MimePartDataSource 0 - assertEquals("The number of MimePartDataSource is not '0'. ", 0, mimePartDatasourceMF); - // total = sessionMF + mimePartDatasourceMF - assertEquals("The total is not the sum of Session factories and MimePartDataSource. ", sessionMF + mimePartDatasourceMF, total); - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_MAIL, selectedTab, "Problem in 'Mail' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_SESSION_MF + " is not found in the second tab. ", - tabTable.getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_SESSION_MF)); - assertTrue("The link " + URL_JONASADMIN_MIME_PART_DATASOURCE_MF + " is not found in the third tab. ", - tabTable.getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_MIME_PART_DATASOURCE_MF)); - - - // Go to Session factories - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_SESSION_MF); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify tree - WebResponse tree = wc.getFrameContents(FRAME_TREE); - assertTrue("The node 'Session Factories' is not found in the tree. ", tree.getText().indexOf("Session Factories") != -1); - - // Verify Message : "No Session mail factories !" - table = utils.getTable(wr, 0); - assertEquals("There is not 1 row in the 'Session Mail Factories' table. ", 1, table.getRowCount()); - - String messageNoSessionMF = "No Session mail factories !"; - assertEquals("There is not the expected message: '" + messageNoSessionMF + "'. ", messageNoSessionMF, table.getTableCell(0, 0).getText()); - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_MAIL, selectedTab, "Problem in 'Session Mail Factories' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_MAIL_SERVICE + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_MAIL_SERVICE)); - assertTrue("The link " + URL_JONASADMIN_MIME_PART_DATASOURCE_MF + " is not found in the third tab. ", - tabTable.getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_MIME_PART_DATASOURCE_MF)); - - - // Go to MimePartDataSource Mail Factories - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_MIME_PART_DATASOURCE_MF); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify Message : "No MimePartDataSource mail factories !" - table = utils.getTable(wr, 0); - assertEquals("There is not 1 row in the 'Session Mail Factories' table. ", 1, table.getRowCount()); - - String messageNoMimePartMF = "No MimePartDataSource mail factories !"; - assertEquals("There is not the expected message: '" + messageNoMimePartMF + "'. ", messageNoMimePartMF, table.getTableCell(0, 0).getText()); - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_MAIL, selectedTab, "Problem in 'MimePartDataSource Mail Factories' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_MAIL_SERVICE + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_MAIL_SERVICE)); - assertTrue("The link " + URL_JONASADMIN_SESSION_MF + " is not found in the second tab. ", - tabTable.getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_SESSION_MF)); - - } - - } - - /** - * Test mail service with mail factories - * @throws Exception if error occurs - * - */ - public void testDeployedMailFactory() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - int selectedTab; - /* - * To get some utils for WebTable - */ - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - if (jProp.isMail()) { - - // Deploy mail factories - deployMailFactories(wc); - - // Go to mail service - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_MAIL_SERVICE); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 1; - - // Verify numbers - table = utils.getTable(wr, 1); - int sessionMF = Integer.parseInt(table.getTableCell(0, 2).getText()); - int mimePartDatasourceMF = Integer.parseInt(table.getTableCell(1, 2).getText()); - int total = Integer.parseInt(table.getTableCell(2, 2).getText()); - - // Session factories > 0 - assertTrue("The number of Session Factories is not positif. ", sessionMF > 0); - // MimePartDataSource > 0 - assertTrue("The number of MimePartDataSource is not positif. ", mimePartDatasourceMF > 0); - // total = sessionMF + mimePartDatasourceMF - assertEquals("The total is not the sum of Session factories and MimePartDataSource. ", sessionMF + mimePartDatasourceMF, total); - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_MAIL, selectedTab, "Problem in 'Mail' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_SESSION_MF + " is not found in the second tab. ", - tabTable.getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_SESSION_MF)); - assertTrue("The link " + URL_JONASADMIN_MIME_PART_DATASOURCE_MF + " is not found in the third tab. ", - tabTable.getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_MIME_PART_DATASOURCE_MF)); - - - // Go to Session factories - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_SESSION_MF); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify tree - WebResponse tree = wc.getFrameContents(FRAME_TREE); - assertTrue("The node 'Session Factories' is not found in the tree. ", tree.getText().indexOf("Session Factories") != -1); - - // Verify Session mail factories table - table = utils.getTable(wr, 0); - assertTrue("There are not more than 1 row in the 'Session Mail Factories' table. ", 1 < table.getRowCount()); - int rowMailSession = utils.getFirstRow("mailSession_1", table, 0).intValue(); - if (rowMailSession == -1) { - throw new IllegalStateException("'mailSession_1' is not found in the table. "); - } - // JNDI name mailSession_1 - assertEquals("It is not the JNDI name of 'mailSession_1'. ", "mailSession_1", table.getTableCell(rowMailSession, 1).getText()); - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_MAIL, selectedTab, "Problem in 'Session Mail Factories' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_MAIL_SERVICE + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_MAIL_SERVICE)); - assertTrue("The link " + URL_JONASADMIN_MIME_PART_DATASOURCE_MF + " is not found in the third tab. ", - tabTable.getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_MIME_PART_DATASOURCE_MF)); - - // Go to url of the link - link = table.getTableCell(rowMailSession, 0).getLinks()[0]; - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify tree - tree = wc.getFrameContents(FRAME_TREE); - assertTrue("The node 'mailSession_1' is not found in the tree.", tree.getText().indexOf("mailSession_1") != -1); - - // Verify number of tables - try { - table = utils.getTable(wr, 9); - } catch (Exception e) { - fail("There are not enough tables in 'mailSession_1' page."); - } - try { - table = utils.getTable(wr, 10); - fail("There are not too tables in 'mailSession_1' page."); - } catch (Exception e) { - // ok - } - - // Type Session - table = utils.getTable(wr, 1); - assertEquals("It is not the expected type of 'mailSession_1'. ", "Session", table.getTableCell(0, 2).getText()); - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_SESSION, selectedTab, "Problem in 'mailSession_1' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_MAIL_SERVICE + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_MAIL_SERVICE)); - assertTrue("The link " + URL_JONASADMIN_SESSION_MF + " is not found in the second tab. ", - tabTable.getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_SESSION_MF)); - assertTrue("The link " + URL_JONASADMIN_MIME_PART_DATASOURCE_MF + " is not found in the fourth tab. ", - tabTable.getTableCell(0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_MIME_PART_DATASOURCE_MF)); - - - // Go to MimePartDataSource Mail Factories - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_MIME_PART_DATASOURCE_MF); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify MimePartDatasource mail factories table - table = utils.getTable(wr, 0); - assertTrue("There are not more than 1 row in the 'MimePartDatasource Mail Factories' table. ", 1 < table.getRowCount()); - int rowMailMime = utils.getFirstRow("mailMimePartDS_1", table, 0).intValue(); - if (rowMailMime == -1) { - throw new IllegalStateException("'mailMimePartDS_1' is not found in the table. "); - } - // JNDI name mailMimePartDS_1 - assertEquals("It is not the JNDI name of 'mailMimePartDS_1'. ", "mailMimePartDS_1", table.getTableCell(rowMailMime, 1).getText()); - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_MAIL, selectedTab, "Problem in 'MimePartDataSource Mail Factories' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_MAIL_SERVICE + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_MAIL_SERVICE)); - assertTrue("The link " + URL_JONASADMIN_SESSION_MF + " is not found in the second tab. ", - tabTable.getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_SESSION_MF)); - - // Go to url of the link - link = table.getTableCell(rowMailMime, 0).getLinks()[0]; - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Verify tree - tree = wc.getFrameContents(FRAME_TREE); - assertTrue("The node 'mailMimePartDS_1' is not found in the tree.", tree.getText().indexOf("mailMimePartDS_1") != -1); - - // Verify number of tables - try { - table = utils.getTable(wr, 12); - } catch (Exception e) { - fail("There are not enough tables in 'mailMimePartDS_1' page."); - } - try { - table = utils.getTable(wr, 13); - fail("There are not too tables in 'mailMimePartDS_1' page."); - } catch (Exception e) { - // ok - } - - // Type MimePartDataSource - table = utils.getTable(wr, 1); - assertEquals("It is not the expected type of 'mailMimePartDS_1'. ", "MimePartDataSource", table.getTableCell(0, 2).getText()); - - // Verify tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_MIME_PART_DS, selectedTab, "Problem in 'mailMimePartDS_1' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_MAIL_SERVICE + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_MAIL_SERVICE)); - assertTrue("The link " + URL_JONASADMIN_SESSION_MF + " is not found in the second tab. ", - tabTable.getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_SESSION_MF)); - assertTrue("The link " + URL_JONASADMIN_MIME_PART_DATASOURCE_MF + " is not found in the fourth tab. ", - tabTable.getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_MIME_PART_DATASOURCE_MF)); - - } - - } - - - /** - * Undeploy all mail factories - * @param wc The jonasAdmin connexion - * @throws Exception if an error occurs - */ - private void undeployMailFactories(WebConversation wc) throws Exception { - WebLink link = null; - - // Go to Mail - WebResponse wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_MAIL); - if (link != null) { - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - } else { - // branch is not opened - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_VIEW_MAIL); - if (link != null) { - link.click(); - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_MAIL); - if (link == null) { - throw new IllegalStateException("The link " + URL_JONASADMIN_MAIL + " is not found in tree. "); - } - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - } else { - throw new IllegalStateException("The link " + URL_JONASADMIN_MAIL + " is not found in tree. "); - } - } - - // Undeploy all Mail Factories - WebForm[] webForms = wr.getForms(); - WebForm webForm = webForms[0]; - - String params = webForm.getParameterValue("deploy"); - WebForm.Scriptable script = webForm.getScriptableObject(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - - script.setParameterValue("undeploy", params); - - WebResponse submitUndeploy = webForm.submit(); - - webForms = submitUndeploy.getForms(); - webForm = webForms[0]; - - WebResponse endResp = webForm.submit(); - } - - - /** - * Deploy all mail factories - * @param wc The jonasAdmin connexion - * @throws Exception if an error occurs - */ - private void deployMailFactories(WebConversation wc) throws Exception { - WebLink link = null; - - // Go to Mail - WebResponse wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_MAIL); - if (link != null) { - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - } else { - // branch is not opened - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_VIEW_MAIL); - if (link != null) { - link.click(); - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_MAIL); - if (link == null) { - throw new IllegalStateException("The link " + URL_JONASADMIN_MAIL + " is not found in tree. "); - } - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - } else { - throw new IllegalStateException("The link " + URL_JONASADMIN_MAIL + " is not found in tree. "); - } - } - - // Undeploy all Mail Factories - WebForm[] webForms = wr.getForms(); - WebForm webForm = webForms[0]; - - String params = webForm.getParameterValue("undeploy"); - WebForm.Scriptable script = webForm.getScriptableObject(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - - script.setParameterValue("deploy", params); - - WebResponse submitUndeploy = webForm.submit(); - - webForms = submitUndeploy.getForms(); - webForm = webForms[0]; - - WebResponse endResp = webForm.submit(); - } - - /** - * Tear Down cleanUp action - * @throws Exception if an error occurs - */ - public void tearDown() throws Exception { - super.tearDown(); - } - -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/resource/C_JonasAdminServiceResource.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/resource/C_JonasAdminServiceResource.java deleted file mode 100755 index 7a3958b0873af507175c2bb4cdc0c9a1253dd7a0..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/resource/C_JonasAdminServiceResource.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.service.resource; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; - -import com.meterware.httpunit.WebConversation; - -import junit.framework.Test; -import junit.framework.TestSuite; - -/** - * Define a class to test resource service - * Test : - resource service - * - * @author Paul Kemler - */ -public class C_JonasAdminServiceResource extends JonasAdminTestCase { - - /** - * Constructor with a specified name - * @param name the name - */ - public C_JonasAdminServiceResource(String name) { - super(name); - } - - /** - * Get a new TestSuite for this class - * It includes all jonasAdmin tests - * @return a new TestSuite for this class - */ - public static Test suite() { - TestSuite suite = new TestSuite(); - suite.addTest(F_JonasAdminResource.suite()); - - return suite; - } - - /** - * Main method - * @param args the arguments - */ - public static void main (String[] args) { - WebConversation wc = new WebConversation(); - junit.textui.TestRunner.run(suite()); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/resource/F_JonasAdminResource.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/resource/F_JonasAdminResource.java deleted file mode 100755 index 968fabcb56937a5e61e13c97840496d46774134e..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/resource/F_JonasAdminResource.java +++ /dev/null @@ -1,881 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.service.resource; - -import java.io.File; - -import javax.management.ObjectName; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminUtils; - -import com.meterware.httpunit.Button; -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.TableCell; -import com.meterware.httpunit.WebConversation; -import com.meterware.httpunit.WebForm; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - -/** - * Class for testing resource service - * @author Paul Kemler - * - */ -public class F_JonasAdminResource extends JonasAdminTestCase { - - /** - * URL of Resource Adapters - */ - private static final String URL_JONASADMIN_RESOURCE = "ListResourceAdapters.do"; - - /** - * URL of earsample.ra-sample - */ - private static final String URL_JONASADMIN_RA_SAMPLE = "earsample.ra-sample"; - - /** - * URL of db_access_jdbc1 - */ - private static final String URL_JONASADMIN_JONAS_JDBC = "db_access_jdbc1"; - - /** - * URL of Statistics tab - */ - private static final String URL_JONASADMIN_STATISTICS = "EditResourceAdapterStat.do"; - - /** - * URL of Used by - */ - private static final String URL_JONASADMIN_USED_BY = "rarUsedBy"; - - /** - * URL of ErsatzEIS - */ - private static final String URL_JONASADMIN_ERSATZ = "ErsatzEIS"; - - /** - * URL of connection factories - */ - private static final String URL_JONASADMIN_CONNECTION_FACTORIES = "service/rar15CFs.jsp"; - - /** - * URL of activationSpecs - */ - private static final String URL_JONASADMIN_ACTIVATION_SPECS = "service/rar15ASs.jsp"; - - /** - * URL of CF Statistics - */ - private static final String URL_JONASADMIN_STATISTICS_CF = "EditResourceAdapterCFStat.do"; - - /** - * URL of Resource Adapter - */ - private static final String URL_JONASADMIN_RA = "EditResourceAdapter.do"; - - /** - * URL of Resource Adapter CF - */ - private static final String URL_JONASADMIN_RA_CF = "EditResourceAdapterCF.do"; - - /** - * number of tabs when you are in resource - */ - private static final int NUMBER_OF_TABS_FOR_RESOURCE = 1; - - /** - * number of tabs when you are in earsample.ra-sample - */ - private static final int NUMBER_OF_TABS_FOR_RA_SAMPLE = 2; - - /** - * number of tabs when you are in 'db_access_jdbc1' tab - */ - private static final int NUMBER_OF_TABS_FOR_JDBC = 4; - - /** - * number of tabs when you are in 'ErsatzEIS' - */ - private static final int NUMBER_OF_TABS_RA15 = 4; - - /** - * number of tabs for a connection factory - */ - private static final int NUMBER_OF_TABS_CF = 6; - - /** - * number of tabs for a activation spec - */ - private static final int NUMBER_OF_TABS_AS = 5; - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminResource(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminResource(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminResource.class); - } - - /** - * Setup need for these tests - * jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - } - - /** - * Test Resource service with rar in an ear. - * @throws Exception if error occurs - * - */ - public void testResourceInEar() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - int selectedTab; - String name; - String file = null; - String path = null; - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - // Test only if the resource service is enabled - if (jProp.isResource()) { - - // Add earsample.ear - useEar("earsample"); - - // Go to resource adapters - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_RESOURCE); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 1; - - // Verify 'Resource Adapters' page - table = utils.getTable(wr, 0); - testResourceAdapterNames(table); - name = "earsample.ra-sample"; - int rowRASample = utils.getFirstRow(name, table, 0).intValue(); - if (rowRASample != -1) { - // Verify File - file = table.getTableCell(rowRASample, 1).getText(); - assertEquals("It is not the name of the file of the 'earsample.ra-sample'. ", "ra-sample.rar", file); - // Verify Path - path = table.getTableCell(rowRASample, 2).getText(); - assertTrue("It is not the end of the path of the 'earsample.ra-sample'. ", path.endsWith(File.separator + "ra-sample.rar")); - } else { - fail("The RA 'earsample.ra-sample' is not found in the " + table.getTableCell(0, 0).getText() + ". "); - } - - // Verify there is 1 tab - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_RESOURCE, selectedTab, "Problem in 'Resource Adapter' tab."); - - - // Go to 'earsample.ra-sample' - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_RA_SAMPLE); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 2; - - // Verify Resource Adapter Infos - table = utils.getTable(wr, 1); - testRAInfos(table, name, file, path); - - // Verify 'In application' - table = utils.getTable(wr, 4); - testInApplication(table); - - // Verify 'Properties' - table = utils.getTable(wr, 7); - testEarSampleProperties(table); - - // Verify there are 2 tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_RA_SAMPLE, selectedTab, "Problem in 'earsample.ra-sample' tab."); - } - - } - - /** - * Test Resource service with a JONAS_jdbc rar. - * @throws Exception if error occurs - * - */ - public void testResource10Jdbc() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - int selectedTab; - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - // Test only if the resource service is enabled - if (jProp.isResource()) { - // Add db_access_jdbc1 - useRar("db_access_jdbc1"); - - // Add alarm.ear to add the 4th tab "used by" - unUseEar("alarm"); - useEar("alarm"); - - // Go to resource adapters - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_RESOURCE); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to 'db_access_jdbc1' - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_JONAS_JDBC); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 2; - - // Verify PoolProperties - testPoolProperties(wr, wc); - - // Verify there are 4 tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_JDBC, selectedTab, "Problem in 'db_access_jdbc1' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_RESOURCE + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_RESOURCE)); - assertTrue("The link " + URL_JONASADMIN_STATISTICS + " is not found in the third tab. ", - tabTable.getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_STATISTICS)); - assertTrue("The link " + URL_JONASADMIN_USED_BY + " is not found in the fourth tab. ", - tabTable.getTableCell(0, 6).getLinks()[0].getURLString().indexOf(URL_JONASADMIN_USED_BY) != -1); - - - // Go to 'Statistics' - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_STATISTICS); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 3; - - // Verify Connections Pool State - table = utils.getTable(wr, 1); - testConnectionsPoolState(table); - - // Verify Statistics on getConnection operations - table = utils.getTable(wr, 4); - testStatisticsOnGetConnectionOperations(table, wr, wc, utils); - - // Verify Statistics on waiters - table = utils.getTable(wr, 7); - testStatisticsOnWaiters(table); - - // Verify Connection to database statistics - table = utils.getTable(wr, 10); - testConnectionToDatabaseStatistics(table); - - // Verify there are 4 tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_JDBC, selectedTab, "Problem in 'Statistics' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_RESOURCE + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_RESOURCE)); - assertTrue("The link " + URL_JONASADMIN_RA + " is not found in the second tab. ", - tabTable.getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_RA)); - assertTrue("The link " + URL_JONASADMIN_USED_BY + " is not found in the fourth tab. ", - tabTable.getTableCell(0, 6).getLinks()[0].getURLString().indexOf(URL_JONASADMIN_USED_BY) != -1); - - - // Go to 'Used by' - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_USED_BY); - if (link == null) { - throw new IllegalStateException("The link " + URL_JONASADMIN_USED_BY + " is not found from 'Statistics' tab. "); - } - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 4; - - // Verify 'Used by' - table = utils.getTable(wr, 0); - testUsedBy(table); - - // Verify there are 4 tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_JDBC, selectedTab, "Problem in 'Used by' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_RESOURCE + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_RESOURCE)); - assertTrue("The link " + URL_JONASADMIN_RA + " is not found in the second tab. ", - tabTable.getTableCell(0, 2).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_RA)); - assertTrue("The link " + URL_JONASADMIN_STATISTICS + " is not found in the third tab. ", - tabTable.getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_STATISTICS)); - } - } - - /** - * Test Resource Adapter 1.5 with ErsatzEIS.rar - * @throws Exception if an error occurs - */ - public void testResource15() throws Exception { - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - int selectedTab; - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - // Test only if the resource service is enabled - if (jProp.isResource()) { - // Add ErsatzEIS.rar - useRar("ErsatzEIS"); - - // Go to resource adapters - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_RESOURCE); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - - // Go to 'ErsatzEIS.rar' - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_ERSATZ); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 2; - - // Verify there are 4 tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_RA15, selectedTab, "Problem in 'ErsatzEIS' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_RESOURCE + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_RESOURCE)); - assertTrue("The link " + URL_JONASADMIN_CONNECTION_FACTORIES + " is not found in the third tab. ", - tabTable.getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_CONNECTION_FACTORIES)); - assertTrue("The link " + URL_JONASADMIN_ACTIVATION_SPECS + " is not found in the fourth tab. ", - tabTable.getTableCell(0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_ACTIVATION_SPECS)); - - - // Go to 'Connection Factories' - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_CONNECTION_FACTORIES); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 3; - - // Verify there are 4 tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_RA15, selectedTab, "Problem in 'Connection Factories' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_RESOURCE + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_RESOURCE)); - assertTrue("The link " + URL_JONASADMIN_RA + " is not found in the second tab. ", - tabTable.getTableCell(0, 2).getLinks()[0].getURLString().indexOf(URL_JONASADMIN_RA) != -1); - assertTrue("The link " + URL_JONASADMIN_ACTIVATION_SPECS + " is not found in the fourth tab. ", - tabTable.getTableCell(0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_ACTIVATION_SPECS)); - - // Test 'Connection Factories' - table = utils.getTable(wr, 0); - testConnectionFactories(table, wc, utils); - - - // Go to 'ActivationSpecs' - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_ACTIVATION_SPECS); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 4; - - // Verify there are 4 tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_RA15, selectedTab, "Problem in 'ActivationSpecs' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_RESOURCE + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_RESOURCE)); - assertTrue("The link " + URL_JONASADMIN_RA + " is not found in the second tab. ", - tabTable.getTableCell(0, 2).getLinks()[0].getURLString().indexOf(URL_JONASADMIN_RA) != -1); - assertTrue("The link " + URL_JONASADMIN_CONNECTION_FACTORIES + " is not found in the third tab. ", - tabTable.getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_CONNECTION_FACTORIES)); - - // Test 'ActivationSpecs' - table = utils.getTable(wr, 0); - testActivationSpecs(table, wc, utils); - } - } - - /** - * Test 'Resource Adapters' table - * @param table the 'Resource Adapters' table - */ - private void testResourceAdapterNames(WebTable table) { - TableCell cell; - - for (int i = 1; i < table.getRowCount(); i++) { - // Verify there is a link for each name - cell = table.getTableCell(i, 0); - assertEquals("There is no one link for the context : " + cell.getText(), 1, cell.getLinks().length); - } - } - - /** - * Test the RA infos - * @param table the RA info table - * @param name the RA name - * @param file the RA file - * @param path the RA path - */ - private void testRAInfos(WebTable table, String name, String file, String path) { - assertEquals("It is not the name of the Resource Adapter. ", name, table.getTableCell(0, 2).getText()); - assertEquals("It is not the file of the Resource Adapter. ", file, table.getTableCell(1, 2).getText()); - assertEquals("It is not the path of the Resource Adapter. ", path, table.getTableCell(2, 2).getText()); - } - - /** - * Test 'In Application' table - * @param table 'In Application' table - */ - private void testInApplication(WebTable table) { - TableCell cell = table.getTableCell(0, 0); - // There is 1 link - assertEquals("There is not 1 link in 'In Application' table. ", 1, cell.getLinks().length); - // earsample.ear - assertEquals("There is not 'earsample.ear' in 'In Application' table. ", "earsample.ear", cell.getText()); - - cell = table.getTableCell(0, 2); - // path - assertTrue("It is not the end of the path. ", cell.getText().endsWith(File.separator + "earsample.ear")); - } - - /** - * Test earsample.ra-sample properties - * @param table the property table - */ - private void testEarSampleProperties(WebTable table) { - // EisURL EIS_URL - TableCell cell = table.getTableCell(0, 0); - assertEquals("It is not the name of the 1st property. ", "EisURL", cell.getText()); - cell = table.getTableCell(0, 2); - assertEquals("It is not the value of the 1st property. ", "EIS_URL", cell.getText()); - - // jndiName eisName - cell = table.getTableCell(1, 0); - assertEquals("It is not the name of the 2nd property. ", "jndiName", cell.getText()); - cell = table.getTableCell(1, 2); - assertEquals("It is not the value of the 2nd property. ", "eisName", cell.getText()); - } - - /** - * Test pool properties - * @param wr the content frame of Resource Adapter page - * @param wc the jonasAdmin WebConversation - * @throws Exception if an error occurs - */ - private void testPoolProperties(WebResponse wr, WebConversation wc) throws Exception { - WebForm form = wr.getForms()[0]; - String jdbcConnCheckLevel = "0"; - String connMaxAge = "0"; - String maxOpentime = "0"; - String jdbcTestStatement = ""; - String maxSize = "-1"; - String minSize = "0"; - String maxWaitTime = "0"; - String maxWaiters = "0"; - String samplingPeriod = "30"; - - ResourceUtils.modifyPoolProperties(form, jdbcConnCheckLevel, connMaxAge, - maxOpentime, jdbcTestStatement, maxSize, minSize, maxWaitTime, - maxWaiters, samplingPeriod); - - wr = wc.getFrameContents(FRAME_CONTENT); - form = wr.getForms()[0]; - assertEquals("The value of 'Pool maximum' is not '-1'. ", maxSize, form.getParameterValue("maxSize")); - assertEquals("The value of 'Maximum age' is not '" + connMaxAge + "'. ", connMaxAge, form.getParameterValue("connMaxAge")); - assertEquals("The value of 'Maximum open time' is not '" + maxOpentime + "'. ", maxOpentime, form.getParameterValue("maxOpentime")); - assertEquals("The value of 'Test' is not '" + jdbcTestStatement + "'. ", jdbcTestStatement, form.getParameterValue("jdbcTestStatement")); - assertEquals("The value of 'Pool minimum' is not '" + minSize + "'. ", minSize, form.getParameterValue("minSize")); - assertEquals("The value of 'Max Wait Time' is not '" + maxWaitTime + "'. ", maxWaitTime, form.getParameterValue("maxWaitTime")); - assertEquals("The value of 'Max Waiters' is not '" + maxWaiters + "'. ", maxWaiters, form.getParameterValue("maxWaiters")); - assertEquals("The value of 'Sampling Period' is not '" + samplingPeriod + "'. ", samplingPeriod, form.getParameterValue("samplingPeriod")); - assertEquals("The value of 'Checking level' is not '" + jdbcConnCheckLevel + "'. ", jdbcConnCheckLevel, form.getParameterValue("jdbcConnCheckLevel")); - } - - /** - * Test Connections Pool State - * @param table The connection pool state table - */ - private void testConnectionsPoolState(WebTable table) throws Exception { - ObjectName jcaConnFactOn = getJCAConnectionFactory("jdbc_1", "db_access_jdbc1"); - // Current pool size - Integer val = getIntegerMBeanAttribute(jcaConnFactOn, "currentOpened"); - String currentPoolsize = val.toString(); - //assertEquals("It is not the expected value of 'Current pool size'. ", "1", table.getTableCell(0, 2).getText()); - assertEquals("It is not the expected value of 'Current pool size'. ", currentPoolsize, table.getTableCell(0, 2).getText()); - // Busy connections - val = getIntegerMBeanAttribute(jcaConnFactOn, "currentBusy"); - //assertEquals("It is not the expected value of 'Busy connections'. ", "0", table.getTableCell(1, 2).getText()); - assertEquals("It is not the expected value of 'Busy connections'. ", val.toString(), table.getTableCell(1, 2).getText()); - // Busy in transactions - val = getIntegerMBeanAttribute(jcaConnFactOn, "currentInTx"); - //assertEquals("It is not the expected value of 'Busy in transactions'. ", "0", table.getTableCell(2, 2).getText()); - assertEquals("It is not the expected value of 'Busy in transactions'. ", val.toString(), table.getTableCell(2, 2).getText()); - // Min busy in last period - val = getIntegerMBeanAttribute(jcaConnFactOn, "busyMin"); - //assertEquals("It is not the expected value of 'Min busy in last period'. ", "0", table.getTableCell(3, 2).getText()); - assertEquals("It is not the expected value of 'Min busy in last period'. ", val.toString(), table.getTableCell(3, 2).getText()); - // Max busy in last period - val = getIntegerMBeanAttribute(jcaConnFactOn, "busyMax"); - //assertEquals("It is not the expected value of 'Max busy in last period'. ", "0", table.getTableCell(4, 2).getText()); - assertEquals("It is not the expected value of 'Max busy in last period'. ", val.toString(), table.getTableCell(4, 2).getText()); - // Connection leaks - val = getIntegerMBeanAttribute(jcaConnFactOn, "connectionLeaks"); - //assertEquals("It is not the expected value of 'Connection leaks'. ", "0", table.getTableCell(5, 2).getText()); - assertEquals("It is not the expected value of 'Connection leaks'. ", val.toString(), table.getTableCell(5, 2).getText()); - } - - /** - * Test Statistics On GetConnection Operations - * @param table The 'Statistics on getConnection operations' table - * @param wr the content frame - * @param wc the jonasAdmin connection - * @param utils jonasAdmin utils - * @throws Exception if an error occurs - */ - private void testStatisticsOnGetConnectionOperations(WebTable table, WebResponse wr, WebConversation wc, JonasAdminUtils utils) throws Exception { - Button button; - int servedConnections = Integer.parseInt(table.getTableCell(0, 2).getText()); - // Create connections - createConnections(); - //Refresh - wc.sendRequest(wr.getRefreshRequest()); - wr = wc.getFrameContents(FRAME_CONTENT); - table = utils.getTable(wr, 4); - - // Served connections have increased - assertTrue("The 'Served connections' number has not increased. ",servedConnections < Integer.parseInt(table.getTableCell(0, 2).getText())); - // Rejected connections 0 - assertEquals("The value of 'Rejected connections' is not '0'. ", "0", table.getTableCell(1, 2).getText()); - // By waiter overflow 0 - assertEquals("The value of 'By waiter overflow' is not '0'. ", "0", table.getTableCell(2, 2).getText()); - // By waiter timeout 0 - assertEquals("The value of 'By waiter timeout' is not '0'. ", "0", table.getTableCell(3, 2).getText()); - // By any other reason 0 - assertEquals("The value of 'By any other reason' is not '0'. ", "0", table.getTableCell(4, 2).getText()); - } - - /** - * Test 'Used By' infos and link - * @param table the 'Used by' table - * @throws Exception if an error occurs to send request. - */ - private void testUsedBy(WebTable table) throws Exception { - WebLink link; - // Ejb AlarmRecord - assertEquals("It is not used by 'AlarmRecord'. ", "AlarmRecord", table.getTableCell(1, 0).getText()); - link = table.getTableCell(1, 0).getLinks()[0]; - int code = wc.sendRequest(link.getRequest()).getResponseCode(); - assertEquals("The '" + link.getURLString() + "' link creates a '" + code + "' error. ", 200, code); - // Type EntityBean - assertEquals("It is not the Type of AlarmRecord. ", "EntityBean", table.getTableCell(1, 1).getText()); - } - - /** - * Test Statistics On Waiters - * @param table the 'Statistics On Waiters' table - * @throws Exception if an error occurs. - */ - private void testStatisticsOnWaiters(WebTable table) throws Exception { - // Current number of waiters 0 - int nbWaiters = Integer.parseInt(table.getTableCell(0, 2).getText()); - // Max waiters 0 - int maxWaiters = Integer.parseInt(table.getTableCell(1, 2).getText()); - // Max waiters in last period 0 - int maxWaitersLastPeriod = Integer.parseInt(table.getTableCell(2, 2).getText()); - // Total waiters 0 - int totalWaiters = Integer.parseInt(table.getTableCell(3, 2).getText()); - // Max waiting time 0 - int maxWaitingTime = Integer.parseInt(table.getTableCell(4, 2).getText()); - // Max waiting in last period 0 - int maxWaitingLastPeriod = Integer.parseInt(table.getTableCell(5, 2).getText()); - // Total waiting 0 - int totalWaiting = Integer.parseInt(table.getTableCell(6, 2).getText()); - - // 0 < nbWaiters < maxWaitersLastPeriod < maxWaiters < totalWaiters - assertTrue("The current number of waiters is not positif. ", 0 <= nbWaiters); - assertTrue("Current number of waiters > Max waiters. ", nbWaiters <= maxWaitersLastPeriod); - assertTrue("Max waiters > Max waiters in last period. ", maxWaitersLastPeriod <= maxWaiters); - assertTrue("Max waiters in last period > Total waiters. ", maxWaiters <= totalWaiters); - - // 0 < maxWaitingLastPeriod < maxWaitingTime < totalWaiting - assertTrue("Max waiting in last period < 0. ", 0 <= maxWaitingLastPeriod); - assertTrue("Max waiting time < Max waiting in last period. ", maxWaitingLastPeriod <= maxWaitingTime); - assertTrue("Max waiting time > Total waiting. ", maxWaitingTime <= totalWaiting); - } - - /** - * Test Connection To Database Statistics - * @param table the 'Connection To Database Statistics' table - */ - private void testConnectionToDatabaseStatistics(WebTable table) { - // Number of connections > 0 - int nbConnections = Integer.parseInt(table.getTableCell(0, 2).getText()); - // Number of failures 0 - int nbFailures = Integer.parseInt(table.getTableCell(1, 2).getText()); - - assertTrue("The number of connections is not positif. ", 0 < nbConnections); - assertEquals("The expected number of failures was '0'. ", 0, nbFailures); - } - - /** - * Test connection factories - * @param table the 'connection factories' table - * @param wc the jonasAdmin connection - * @param utils the jonasAdmin utils - * @throws Exception if an error occurs - */ - private void testConnectionFactories(WebTable table, WebConversation wc, JonasAdminUtils utils) throws Exception { - WebResponse wr; - WebLink link; - WebTable tabTable; - TableCell cell; - int selectedTab; - - cell = table.getTableCell(1,0); - // Name eis/ErsatzEIS - assertEquals("It is not the expeted name of Connection Factory", "eis/ErsatzEIS", cell.getText()); - - // Go to 'eis/ErsatzEIS' - link = cell.getLinks()[0]; - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 5; - - // Verify there are 6 tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_CF, selectedTab, "Problem in 'Connection Factory' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_RESOURCE + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_RESOURCE)); - assertTrue("The link " + URL_JONASADMIN_RA + " is not found in the second tab. ", - tabTable.getTableCell(0, 2).getLinks()[0].getURLString().indexOf(URL_JONASADMIN_RA) != -1); - assertTrue("The link " + URL_JONASADMIN_CONNECTION_FACTORIES + " is not found in the third tab. ", - tabTable.getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_CONNECTION_FACTORIES)); - assertTrue("The link " + URL_JONASADMIN_ACTIVATION_SPECS + " is not found in the fourth tab. ", - tabTable.getTableCell(0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_ACTIVATION_SPECS)); - assertTrue("The link " + URL_JONASADMIN_STATISTICS_CF + " is not found in the sixth tab. ", - tabTable.getTableCell(0, 10).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_STATISTICS_CF)); - - // Verify there are 10 tables - try { - // Try to get the last table with 'Apply' button. - table = utils.getTable(wr, 9); - } catch (ArrayIndexOutOfBoundsException e) { - fail("The number of tables is too little in the content frame of the connection factory page. "); - } - try { - // Try to get the eleventh table that doesn't exist. - table = utils.getTable(wr, 10); - fail("The number of tables is too big in the content frame of the connection factory page. "); - } catch (ArrayIndexOutOfBoundsException e) { - // ok - } - - // Go to 'Statistics' - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_STATISTICS_CF); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 6; - - // Verify there are 6 tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_CF, selectedTab, "Problem in CF 'Statistics' tab. "); - // - links - assertTrue("The link " + URL_JONASADMIN_RESOURCE + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_RESOURCE)); - assertTrue("The link " + URL_JONASADMIN_RA + " is not found in the second tab. ", - tabTable.getTableCell(0, 2).getLinks()[0].getURLString().indexOf(URL_JONASADMIN_RA) != -1); - assertTrue("The link " + URL_JONASADMIN_CONNECTION_FACTORIES + " is not found in the third tab. ", - tabTable.getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_CONNECTION_FACTORIES)); - assertTrue("The link " + URL_JONASADMIN_ACTIVATION_SPECS + " is not found in the fourth tab. ", - tabTable.getTableCell(0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_ACTIVATION_SPECS)); - assertTrue("The link " + URL_JONASADMIN_RA_CF + " is not found in the fifth tab. ", - tabTable.getTableCell(0, 8).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_RA_CF)); - - // Verify there are 13 tables - try { - // Try to get the last table with 'Apply' button. - table = utils.getTable(wr, 12); - } catch (ArrayIndexOutOfBoundsException e) { - fail("The number of tables is too little in the content frame of the CF statistic page. "); - } - try { - // Try to get the fourteenth table that doesn't exist. - table = utils.getTable(wr, 13); - fail("The number of tables is too big in the content frame of the CF statistic page. "); - } catch (ArrayIndexOutOfBoundsException e) { - // ok - } - - } - - /** - * Test Activation Specs - * @param table the 'ActivationSpecs' table - * @param wc the jonasAdmin connection - * @param utils the jonasAdmin utils - * @throws Exception if an error occurs - */ - private void testActivationSpecs(WebTable table, WebConversation wc, JonasAdminUtils utils) throws Exception { - WebResponse wr; - WebLink link; - WebTable tabTable; - TableCell cell; - int selectedTab; - - cell = table.getTableCell(1,0); - // Name eis/ErsatzAS - assertEquals("It is not the expeted name of ActivationSpec", "eis/ErsatzAS", cell.getText()); - - // Go to 'eis/ErsatzAS' - link = cell.getLinks()[0]; - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 5; - - // Verify there are 5 tabs - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_AS, selectedTab, "Problem in 'ActivationSpecs' tab."); - // - links - assertTrue("The link " + URL_JONASADMIN_RESOURCE + " is not found in the first tab. ", - tabTable.getTableCell(0, 0).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_RESOURCE)); - assertTrue("The link " + URL_JONASADMIN_RA + " is not found in the second tab. ", - tabTable.getTableCell(0, 2).getLinks()[0].getURLString().indexOf(URL_JONASADMIN_RA) != -1); - assertTrue("The link " + URL_JONASADMIN_CONNECTION_FACTORIES + " is not found in the third tab. ", - tabTable.getTableCell(0, 4).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_CONNECTION_FACTORIES)); - assertTrue("The link " + URL_JONASADMIN_ACTIVATION_SPECS + " is not found in the fourth tab. ", - tabTable.getTableCell(0, 6).getLinks()[0].getURLString().endsWith(URL_JONASADMIN_ACTIVATION_SPECS)); - - // Verify there are 5 tables - try { - // Try to get the last table with required properties. - table = utils.getTable(wr, 4); - } catch (ArrayIndexOutOfBoundsException e) { - fail("The number of tables is too little in the content frame of the activation spec page. "); - } - try { - // Try to get the eleventh table that doesn't exist. - table = utils.getTable(wr, 5); - fail("The number of tables is too big in the content frame of the activation spec page. "); - } catch (ArrayIndexOutOfBoundsException e) { - // ok - } - } - - /** - * Use Alarm Demo for creating connections - * @throws Exception if an error occurs - */ - private void createConnections() throws Exception { - WebConversation wc2 = new WebConversation(); - String urlAlarm = prefixUrl + "/alarm/secured/list.jsp"; - // Start the alarm demo - wc2.setAuthorization("jonas", "jonas"); - WebResponse wr = wc2.getResponse(urlAlarm); - } - - /** - * Tear Down cleanUp action - * @throws Exception if an error occurs - */ - public void tearDown() throws Exception { - super.tearDown(); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/resource/ResourceUtils.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/resource/ResourceUtils.java deleted file mode 100755 index 16b06bf5e0397abd2e867a095cae453bfe368d58..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/resource/ResourceUtils.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.service.resource; - -import com.meterware.httpunit.Button; -import com.meterware.httpunit.WebForm; - -/** - * Class for filling resource forms. - * @author Paul Kemler - */ -public class ResourceUtils { - - /** - * Modify pool properties - * @param form the pool property form - * @param jdbcConnCheckLevel the value of Checking level - * @param connMaxAge the value of Maximum age - * @param maxOpentime the value of Maximum open time - * @param jdbcTestStatement SQL query for test statement - * @param maxSize the value of Pool maximum - * @param minSize the value of Pool minimum - * @param maxWaitTime the value of Max Wait Time - * @param maxWaiters the value of Max Waiters - * @param samplingPeriod the value of Sampling Period - * @throws Exception if an error occurs when button is clicked - */ - public static void modifyPoolProperties(WebForm form, String jdbcConnCheckLevel, String connMaxAge, - String maxOpentime, String jdbcTestStatement, String maxSize, String minSize, String maxWaitTime, - String maxWaiters, String samplingPeriod) throws Exception { - - Button button = null; - - form.setParameter("jdbcConnCheckLevel", jdbcConnCheckLevel); - form.setParameter("connMaxAge", connMaxAge); - form.setParameter("maxOpentime", maxOpentime); - form.setParameter("jdbcTestStatement", jdbcTestStatement); - form.setParameter("maxSize", maxSize); - form.setParameter("minSize", minSize); - form.setParameter("maxWaitTime", maxWaitTime); - form.setParameter("maxWaiters", maxWaiters); - form.setParameter("samplingPeriod", samplingPeriod); - - button = form.getButtons()[0]; - button.click(); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/security/C_JonasAdminServiceSecurity.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/security/C_JonasAdminServiceSecurity.java deleted file mode 100755 index 8aeb04fa7985373c591541176399f271e4c6a4cb..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/security/C_JonasAdminServiceSecurity.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.service.security; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; - -import com.meterware.httpunit.WebConversation; - -import junit.framework.Test; -import junit.framework.TestSuite; - -/** - * Define a class to test security service - * Test : - service/security - * - * @author Paul Kemler - */ -public class C_JonasAdminServiceSecurity extends JonasAdminTestCase { - - /** - * Constructor with a specified name - * @param name the name - */ - public C_JonasAdminServiceSecurity(String name) { - super(name); - } - - /** - * Get a new TestSuite for this class - * It includes all jonasAdmin tests - * @return a new TestSuite for this class - */ - public static Test suite() { - TestSuite suite = new TestSuite(); - suite.addTest(F_JonasAdminServiceSecurity.suite()); - - return suite; - } - - /** - * Main method - * @param args the arguments - */ - public static void main (String[] args) { - WebConversation wc = new WebConversation(); - junit.textui.TestRunner.run(suite()); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/security/F_JonasAdminServiceSecurity.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/security/F_JonasAdminServiceSecurity.java deleted file mode 100755 index efccabccb4a387ab7012e7b198910f9d2d526f44..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/service/security/F_JonasAdminServiceSecurity.java +++ /dev/null @@ -1,241 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.service.security; - -import java.io.File; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminUtils; - -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - -/** - * Class for testing security service - * @author Paul Kemler - * - */ -public class F_JonasAdminServiceSecurity extends JonasAdminTestCase { - - /** - * URL of security service - */ - private static final String URL_JONASADMIN_SECURITY = "EditServiceSecurity.do"; - - /** - * number of tabs when you are in security - */ - private static final int NUMBER_OF_TABS_FOR_SECURITY = 1; - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminServiceSecurity(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_JonasAdminServiceSecurity(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - return new TestSuite(F_JonasAdminServiceSecurity.class); - } - - /** - * Setup need for these tests - * jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - } - - /** - * Test realms table - * @throws Exception if error occurs - * - */ - public void testRealms() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - WebTable tabTable; - int selectedTab; - String name; - String type; - String path; - boolean used; - JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - // Test only if the security service is enabled - if (jProp.isSecurity()) { - - // Go to security service - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_SECURITY); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - selectedTab = 1; - - // Verify 'Realms' - path = File.separator + "jonasAdmin"; - name = "memrlm_1"; - type = "memory"; - used = true; - try { - table = utils.getTable(wr, 0); - int rowJonasAdmin = utils.getFirstRow(path, table, 2).intValue(); - if (rowJonasAdmin != -1) { - testRealmRow(table, rowJonasAdmin, name, type, path, used); - } - } catch (Exception e) { - if (jProp.isCatalina()) { - fail("The realm security table is not found. "); - } else { - throw new IllegalStateException("Not implemented: JETTY. "); - } - } - - // "Olstore": type=datasource and not used - if (jProp.isEar()) { - useEar("olstore"); - - path = File.separator + "olstore"; - name = "olstorerlm_1"; - type = "datasource"; - used = false; - wr = wc.getFrameContents(FRAME_TREE); - link = wr.getFirstMatchingLink( WebLink.MATCH_URL_STRING, URL_JONASADMIN_SECURITY); - link.click(); - wr = wc.getFrameContents(FRAME_CONTENT); - table = utils.getTable(wr, 0); - int rowDatasourceType = utils.getFirstRow(path, table, 2).intValue(); - if (rowDatasourceType != -1) { - testRealmRow(table, rowDatasourceType, name, type, path, used); - } else { - if (jProp.isCatalina()) { - fail("The realm security for the context path '" + path + "' is not found. "); - } else { - throw new IllegalStateException("Not implemented: JETTY. "); - } - } - } - - - // Verify there is 1 tab - tabTable = utils.getTabTable(wr); - testTabs(tabTable, NUMBER_OF_TABS_FOR_SECURITY, selectedTab, "Problem in 'Realms' tab."); - } - } - - /** - * Test infos of a realm row - * @param table the table of realms - * @param row the row to test - * @param name the value of the name - * @param type the value of the type - * @param path the value of the path - * @param used the value of 'used' - */ - private void testRealmRow(WebTable table, int row, String name, String type, String path, boolean used) { - // Verify Name - assertEquals("It is not the name for the context path '" + path + "' . ", name, table.getTableCell(row, 0).getText()); - // Verify Type - assertEquals("It is not the type for the context path '" + path + "' . ", type, table.getTableCell(row, 1).getText()); - // Verify Used - if (used) { - assertEquals("It is not the value of 'used' for the context path '" + path + "' . ", used, table.getTableCell(row, 3).getImages()[0].getSource().endsWith("images/icon/tag_blue.gif")); - } else { - assertEquals("It is not the value of 'used' for the context path '" + path + "' . ", 0, table.getTableCell(row, 3).getImages().length); - } - } - - /** - * Tear Down cleanUp action - * @throws Exception if an error occurs - */ - public void tearDown() throws Exception { - super.tearDown(); - } - -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/suite/C_JonasAdmin.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/suite/C_JonasAdmin.java deleted file mode 100755 index 245957eb6c168d9d59f2c5006df6903ec45dd741..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/suite/C_JonasAdmin.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.suite; - -import junit.framework.Test; -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.catalina.C_JonasAdminCatalina; -import org.objectweb.jonas.jonasadmin.test.deploy.C_JonasAdminDeploy; -import org.objectweb.jonas.jonasadmin.test.domain.C_JonasAdminDomain; -import org.objectweb.jonas.jonasadmin.test.jonasserver.C_JonasAdminJonasserver; -import org.objectweb.jonas.jonasadmin.test.joram.C_JonasAdminJoram; -import org.objectweb.jonas.jonasadmin.test.logging.C_JonasAdminLogging; -import org.objectweb.jonas.jonasadmin.test.monitoring.C_JonasAdminMonitoring; -import org.objectweb.jonas.jonasadmin.test.navigation.C_JonasAdminNavigation; -import org.objectweb.jonas.jonasadmin.test.resource.C_JonasAdminResource; -import org.objectweb.jonas.jonasadmin.test.service.container.C_JonasAdminContainer; -import org.objectweb.jonas.jonasadmin.test.service.database.C_JonasAdminServiceDatabase; -import org.objectweb.jonas.jonasadmin.test.service.discovery.C_JonasAdminServiceDiscovery; -import org.objectweb.jonas.jonasadmin.test.service.jtm.C_JonasAdminServiceTransaction; -import org.objectweb.jonas.jonasadmin.test.service.mail.C_JonasAdminServiceMail; -import org.objectweb.jonas.jonasadmin.test.service.resource.C_JonasAdminServiceResource; -import org.objectweb.jonas.jonasadmin.test.service.security.C_JonasAdminServiceSecurity; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; - -/** - * Define a class to test jonasAdmin - * Test : - catalina - * - deploy - * - domain - * - jonasserver - * - joram - * - logging - * - monitoring - * - 'navigation' - * - service/container - * - service/resource - * - service/transaction - * - service/security - * - service/mail - * - service/discovery - * - service/database - * - resource - * @author Paul Kemler - */ - -public class C_JonasAdmin extends JonasAdminTestCase { - - /** - * Constructor with a specified name - * @param name the name - */ - public C_JonasAdmin(String name) { - super(name); - } - - /** - * Get a new TestSuite for this class - * It includes all jonasAdmin tests - * @return a new TestSuite for this class - */ - public static Test suite() { - TestSuite suite = new TestSuite(); - suite.addTest(C_JonasAdminCatalina.suite()); - suite.addTest(C_JonasAdminDeploy.suite()); - suite.addTest(C_JonasAdminDomain.suite()); - suite.addTest(C_JonasAdminJonasserver.suite()); - suite.addTest(C_JonasAdminJoram.suite()); - suite.addTest(C_JonasAdminLogging.suite()); - suite.addTest(C_JonasAdminMonitoring.suite()); - suite.addTest(C_JonasAdminNavigation.suite()); - suite.addTest(C_JonasAdminContainer.suite()); - suite.addTest(C_JonasAdminServiceResource.suite()); - suite.addTest(C_JonasAdminServiceTransaction.suite()); - suite.addTest(C_JonasAdminServiceSecurity.suite()); - suite.addTest(C_JonasAdminServiceMail.suite()); - suite.addTest(C_JonasAdminServiceDiscovery.suite()); - suite.addTest(C_JonasAdminServiceDatabase.suite()); - suite.addTest(C_JonasAdminResource.suite()); - return suite; - } - - /** - * Main method - * @param args the arguments - */ - public static void main (String[] args) { - junit.textui.TestRunner.run(suite()); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/template/C_JonasAdminTemplate.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/template/C_JonasAdminTemplate.java deleted file mode 100755 index b6c3348d7716d76a1581c4fcd59bca6f33844224..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/template/C_JonasAdminTemplate.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.template; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; - -import com.meterware.httpunit.WebConversation; - -import junit.framework.Test; -import junit.framework.TestSuite; - -/** - * Define a class to test ... - * Test : - ... - * - * @author Paul Kemler - */ -public class C_JonasAdminTemplate extends JonasAdminTestCase { - - /** - * Constructor with a specified name - * @param name the name - */ - public C_JonasAdminTemplate(String name) { - super(name); - } - - /** - * Get a new TestSuite for this class - * It includes all jonasAdmin tests - * @return a new TestSuite for this class - */ - public static Test suite() { - TestSuite suite = new TestSuite(); - /* - * Add test cases - * TODO : replace F_JonasAdminTemplate - */ - suite.addTest(F_JonasAdminTemplate.suite()); - - return suite; - } - - /** - * Main method - * @param args the arguments - */ - public static void main (String[] args) { - WebConversation wc = new WebConversation(); - junit.textui.TestRunner.run(suite()); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/template/F_JonasAdminTemplate.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/template/F_JonasAdminTemplate.java deleted file mode 100755 index a68eecd507990b095122cb7fe09f96a5ade281f1..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/template/F_JonasAdminTemplate.java +++ /dev/null @@ -1,154 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.template; - -import junit.framework.TestSuite; - -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminAuth; -import org.objectweb.jonas.jonasadmin.test.util.JonasAdminTestCase; - -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - -/** - * Class for testing ... - * @author Paul Kemler - * - */ -public class F_JonasAdminTemplate extends JonasAdminTestCase { - - /** - * Constructor with a specified name - * @param s name - */ - public F_JonasAdminTemplate(String s) { - super(s, URL_JONASADMIN); - } - - /** - * Main method - * @param args the arguments - */ - public static void main(String[] args) { - - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String sArg = args[argn]; - if (sArg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - /* - * TODO : replace F_JonasAdminTemplate - */ - junit.textui.TestRunner.run(new F_JonasAdminTemplate(testtorun)); - } - } - - /** - * Get a new TestSuite for this class - * @return a new TestSuite for this class - */ - public static TestSuite suite() { - /* - * TODO : replace F_JonasAdminTemplate - */ - return new TestSuite(F_JonasAdminTemplate.class); - } - - /** - * Setup need for these tests - * jonasAdmin is required - * @throws Exception if it fails - */ - protected void setUp() throws Exception { - super.setUp(); - - if (wc.getCurrentPage().getURL() == null) { - useWar("jonasAdmin"); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception e) { - fail("authentification failed : " + e); - } - } else { - // if there was an error, the connection must be restablished - try { - wc.getFrameContents(FRAME_TREE); - } catch (Exception e) { - wc.getResponse(urlLogOut); - // login to jonas admin - try { - JonasAdminAuth.doValidAuth(wc, url); - } catch (Exception auth) { - fail("authentification failed : " + auth); - } - } - } - } - - /** - * Test ... - * @throws Exception if error occurs - * - */ - public void testTemplate() throws Exception { - - WebResponse wr; - WebLink link; - WebTable table; - /* - * To get some utils for WebTable - */ - // JonasAdminUtils utils = new JonasAdminUtils(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - /* - * TODO : ADD YOUR CODE HERE - */ - - } - - /** - * Tear Down - * cleanUp action - */ - public void tearDown() throws Exception { - super.tearDown(); - } - -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/util/JProperties.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/util/JProperties.java deleted file mode 100644 index a8b4fe9b6277f36c43155dea613717416b6917ec..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/util/JProperties.java +++ /dev/null @@ -1,533 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.util; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.util.Properties; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; -import javax.rmi.PortableRemoteObject; - -import org.ow2.jonas.adm.AdmInterface; - -/** - * JOnAS property accessor - * @author kemlerp - */ -public class JProperties { - - /** - * Name of the JOnAS server used for tests - */ - private static String jonasName = "jonas"; - - /** - * Initial context used for lookup - */ - private static Context ictx = null; - - /** - * JOnAS admin used for communicate via JMX to JOnAS - */ - private static AdmInterface admI = null; - - /** - * System properties - */ - private static Properties systEnv = System.getProperties(); - - /** - * Separator of file - */ - private static String fileSeparator = systEnv.getProperty("file.separator"); - - /** - * -Djonas.test property - */ - private static final String JONAS_TEST = "jonas.test"; - - /** - * JONAS_TEST - */ - private static String jonasTest = systEnv.getProperty(JONAS_TEST); - - /** - * -Djonas.base property - */ - private static final String JONAS_BASE = "jonas.base"; - - /** - * JONAS_BASE - */ - private static String jonasBase = systEnv.getProperty(JONAS_BASE); - - /** - * resource directory name - */ - private static final String RESOURCE_DIR = "resources"; - - /** - * conf directory name - */ - private static final String CONF_DIR = "conf"; - - /** - * Get initialContext - * @return the initialContext - * @throws NamingException if the initial context can't be retrieved - */ - private Context getInitialContext() throws NamingException { - return new InitialContext(); - } - - /** - * Get list environnement - * @return JOnAS protperties - * @throws Exception if list environnement cannot be got - */ - public Properties getPropertiesEnv() throws Exception { - Properties prop = null; - - try { - if (ictx == null) { - ictx = getInitialContext(); - } - if (admI == null) { - admI = (AdmInterface) PortableRemoteObject.narrow(ictx.lookup(jonasName + "_Adm"), AdmInterface.class); - } - prop = admI.listEnv(); - } catch (Exception e) { - throw new Exception("Cannot get list environnement : " + e.getMessage()); - } - - return prop; - } - - /** - * Get services in jonas properties - * @return A table of string with services in jonas properties - * @throws Exception if properties cannot be got - */ - public String[] getServices() throws Exception { - Properties propertiesEnv = getPropertiesEnv(); - String services = propertiesEnv.getProperty("jonas.services"); - return services.split(","); - } - - /** - * Search a service in services - * @param service The string that is searched - * @return true if there is the service in services else false - * @throws Exception if services cannot be got - */ - public boolean searchService(String service) throws Exception { - String[] services = getServices(); - boolean found = false; - int i = 0; - - while (!found && i < services.length) { - if (services[i].equals(service)) { - found = true; - } - i++; - } - - return found; - } - - /** - * Db in service property - * @return True if db is a value of service property - * @throws Exception if service property cannot be got - */ - public boolean isDb() throws Exception { - boolean exist = false; - try { - if (searchService("db")) { - exist = true; - } - } catch (Exception e) { - throw new Exception("Cannot get services : " + e.getMessage()); - } - return exist; - } - - /** - * Dbm in service property - * @return True if dbm is a value of service property - * @throws Exception if service property cannot be got - */ - public boolean isDbm() throws Exception { - boolean exist = false; - try { - if (searchService("dbm")) { - exist = true; - } - } catch (Exception e) { - throw new Exception("Cannot get services : " + e.getMessage()); - } - return exist; - } - - /** - * Discovery in service property - * @return True if discovery is a value of service property - * @throws Exception if service property cannot be got - */ - public boolean isDiscovery() throws Exception { - boolean exist = false; - try { - if (searchService("discovery")) { - exist = true; - } - } catch (Exception e) { - throw new Exception("Cannot get services : " + e.getMessage()); - } - return exist; - } - - /** - * Ear in service property - * @return True if ear is a value of service property - * @throws Exception if service property cannot be got - */ - public boolean isEar() throws Exception { - boolean exist = false; - try { - if (searchService("ear")) { - exist = true; - } - } catch (Exception e) { - throw new Exception("Cannot get services : " + e.getMessage()); - } - return exist; - } - - /** - * Ejb in service property - * @return True if ejb is a value of service property - * @throws Exception if service property cannot be got - */ - public boolean isEjb() throws Exception { - boolean exist = false; - try { - if (searchService("ejb")) { - exist = true; - } - } catch (Exception e) { - throw new Exception("Cannot get services : " + e.getMessage()); - } - return exist; - } - - /** - * Jms in service property - * @return True if jms is a value of service property - * @throws Exception if service property cannot be got - */ - public boolean isJms() throws Exception { - boolean exist = false; - try { - if (searchService("jms")) { - exist = true; - } - } catch (Exception e) { - throw new Exception("Cannot get services : " + e.getMessage()); - } - return exist; - } - - /** - * Jmx in service property - * @return True if Jmx is a value of service property - * @throws Exception if service property cannot be got - */ - public boolean isJmx() throws Exception { - boolean exist = false; - try { - if (searchService("jmx")) { - exist = true; - } - } catch (Exception e) { - throw new Exception("Cannot get services : " + e.getMessage()); - } - return exist; - } - - /** - * Jtm in service property - * @return True if jtm is a value of service property - * @throws Exception if service property cannot be got - */ - public boolean isJtm() throws Exception { - boolean exist = false; - try { - if (searchService("jtm")) { - exist = true; - } - } catch (Exception e) { - throw new Exception("Cannot get services : " + e.getMessage()); - } - return exist; - } - - /** - * Mail in service property - * @return True if db is a value of service property - * @throws Exception if service property cannot be got - */ - public boolean isMail() throws Exception { - boolean exist = false; - try { - if (searchService("mail")) { - exist = true; - } - } catch (Exception e) { - throw new Exception("Cannot get services : " + e.getMessage()); - } - return exist; - } - - /** - * Registry in service property - * @return True if registry is a value of service property - * @throws Exception if service property cannot be got - */ - public boolean isRegistry() throws Exception { - boolean exist = false; - try { - if (searchService("registry")) { - exist = true; - } - } catch (Exception e) { - throw new Exception("Cannot get services : " + e.getMessage()); - } - return exist; - } - - /** - * Resource in service property - * @return True if resource is a value of service property - * @throws Exception if service property cannot be got - */ - public boolean isResource() throws Exception { - boolean exist = false; - try { - if (searchService("resource")) { - exist = true; - } - } catch (Exception e) { - throw new Exception("Cannot get services : " + e.getMessage()); - } - return exist; - } - - /** - * Security in service property - * @return True if security is a value of service property - * @throws Exception if service property cannot be got - */ - public boolean isSecurity() throws Exception { - boolean exist = false; - try { - if (searchService("security")) { - exist = true; - } - } catch (Exception e) { - throw new Exception("Cannot get services : " + e.getMessage()); - } - return exist; - } - - /** - * Web in service property - * @return True if web is a value of service property - * @throws Exception if service property cannot be got - */ - public boolean isWeb() throws Exception { - boolean exist = false; - try { - if (searchService("web")) { - exist = true; - } - } catch (Exception e) { - throw new Exception("Cannot get services : " + e.getMessage()); - } - return exist; - } - - /** - * Ws in service property - * @return True if ws is a value of service property - * @throws Exception if service property cannot be got - */ - public boolean isWs() throws Exception { - boolean exist = false; - try { - if (searchService("ws")) { - exist = true; - } - } catch (Exception e) { - throw new Exception("Cannot get services : " + e.getMessage()); - } - return exist; - } - - /** - * JMS service location - * @return True if it is collocated, else False - * @throws Exception if property cannot be got - */ - public boolean isJMSCollocated() throws Exception { - Properties propertiesEnv = getPropertiesEnv(); - boolean collocated = Boolean.valueOf(propertiesEnv.getProperty("jonas.service.jms.collocated")).booleanValue(); - return collocated; - } - - /** - * Catalina in jonas properties - * @return True if Catalina is the web service, else false - * @throws Exception if property cannot be got - */ - public boolean isCatalina() throws Exception { - Properties propertiesEnv = getPropertiesEnv(); - String webClass = propertiesEnv.getProperty("jonas.service.web.class"); - return webClass.endsWith("CatalinaJWebContainerServiceWrapper"); - } - - /** - * Jtm location - * @return True if jtm is remote, False if it is collocated - * @throws Exception if property cannot be got - */ - public boolean isJtmRemote() throws Exception { - Properties propertiesEnv = getPropertiesEnv(); - boolean remote = Boolean.valueOf(propertiesEnv.getProperty("jonas.service.jtm.remote")).booleanValue(); - return remote; - } - - /** - * Get properties from a file in resources directory. - * @param fileName name of the property file with ".properties". - * @return Properties. - * @throws Exception if the file is not found. - */ - public Properties getProperties(String fileName) throws Exception { - // Get ClassLoader - ClassLoader cl = Thread.currentThread().getContextClassLoader(); - URL url = cl.getResource(fileName); - InputStream is = cl.getResourceAsStream(fileName); - Properties configFile = new Properties(); - configFile.load(is); - return configFile; - } - - /** - * Get properties from a file in $JONAS_TEST/jonasadmin directory. - * @param fileName name of the property file without ".properties". - * @return Properties. - * @throws FileNotFoundException if the file is not found. - */ - private Properties getCarolProperties() throws FileNotFoundException { - // ${jonas.base}/conf/carol.properties - if (jonasBase.equalsIgnoreCase("${myenv.JONAS_BASE}")) { - throw new FileNotFoundException("You must add JONAS_BASE in your environnement variables. "); - } else { - String propFileName = jonasBase + fileSeparator + CONF_DIR + fileSeparator + "carol" + ".properties"; - - File f = null; - Properties configFile = new Properties(); - try { - f = new File(propFileName); - FileInputStream is = new FileInputStream(f); - configFile.load(is); - } catch (FileNotFoundException e) { - throw new FileNotFoundException("Cannot find properties for " + propFileName); - } catch (IOException e) { - System.err.println(e); - } - return configFile; - } - } - - /** - * Get registry protocol - * @return protocol name (jrmp, iiop, cmi) - */ - public String getRegistryProtocol() { - String protocol = null; - try { - protocol = getCarolProperties().getProperty("carol.protocols"); - } catch (FileNotFoundException e) { - e.printStackTrace(); - } - return protocol; - } - - /** - * Get registry url - * @return url of the registry - */ - public String getRegistryUrl() { - String protocol = null; - String url = null; - try { - protocol = getCarolProperties().getProperty("carol.protocols"); - - try { - url = getCarolProperties().getProperty("carol." + protocol + ".url"); - } catch (FileNotFoundException e) { - e.printStackTrace(); - } - } catch (FileNotFoundException e) { - e.printStackTrace(); - } - return url; - } - - /** - * Get Jvm Version - * @return the java version - */ - public String getJvmVersion() { - return systEnv.getProperty("java.version"); - } - - /** - * Get Jvm vendor - * @return value of the property java.vm.specification.vendor - */ - public String getJvmVendor() { - return systEnv.getProperty("java.vm.specification.vendor"); - } -} \ No newline at end of file diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/util/JonasAdminAuth.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/util/JonasAdminAuth.java deleted file mode 100644 index 955fddf89b9dd413fe9bcd29631d4acc35bf03a4..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/util/JonasAdminAuth.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.util; - -import com.meterware.httpunit.WebConversation; -import com.meterware.httpunit.WebForm; -import com.meterware.httpunit.WebResponse; - -/** - * JonasAdmin authentification - * @author kemlerp - * - */ -public class JonasAdminAuth { - - /** - * Constructor - * - */ - private JonasAdminAuth() { - super(); - } - /** - * Authenticate with a valid login/password - * @param wc Web Conversation to use - * @param url url to use - * @return the response - * @throws Exception if an error occurs - */ - public static WebResponse doValidAuth(WebConversation wc, String url) throws Exception { - return doAuth(wc, url, "jonas", "jonas"); - } - - /** - * Authenticate with the specified login/password - * @param wc Web Conversation to use - * @param url url to use - * @param login login to use - * @param password password to use - * @return the response after authentication - * @throws Exception if an error occurs - */ - public static WebResponse doAuth(WebConversation wc, String url, String login, String password) throws Exception { - WebResponse wr = wc.getResponse(url); - WebForm[] webForms = wr.getForms(); - WebForm webForm = webForms[0]; - - webForm.setParameter("j_username", login); - webForm.setParameter("j_password", password); - return webForm.submit(); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/util/JonasAdminConnexion.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/util/JonasAdminConnexion.java deleted file mode 100755 index 0b81143eadff27bd2f2f9c07cbe33cc52e06b316..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/util/JonasAdminConnexion.java +++ /dev/null @@ -1,78 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.util; - -import com.meterware.httpunit.WebConversation; - -/** - * Class shares the connexion object - * Needs to use the same JVM => fork=no - * @author kemlerp - * - */ -public class JonasAdminConnexion { - - /** - * Conversation used for HttpUnit - */ - private static WebConversation wc = null; - - /** - * Constructor - * - */ - private JonasAdminConnexion() { - super(); - } - - - /** - * Get the connexion object, wc - * @return null or a WebConversation to JonasAdmin - */ - public static WebConversation getWc() { - return wc; - } - - - /** - * Set the connexion object, wc - * @param wc a WebConversation to JonasAdmin - */ - public static void setWc(WebConversation wc) { - JonasAdminConnexion.wc = wc; - } - - /** - * Create the connexion object, wc - * @return JonasAdminConnexion.wc - */ - public static WebConversation createWc() { - JonasAdminConnexion.wc = new WebConversation(); - return JonasAdminConnexion.wc; - } - -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/util/JonasAdminFiles.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/util/JonasAdminFiles.java deleted file mode 100755 index 81289b18be7cd1a2a7c8e964e52ba4217512a546..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/util/JonasAdminFiles.java +++ /dev/null @@ -1,259 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.util; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileOutputStream; -import java.io.FileReader; -import java.io.IOException; -import java.util.Properties; -import java.util.Vector; - -import org.apache.tools.ant.BuildException; - -/** - * Class to use jonas files - * @author kemlerp - * - */ -public class JonasAdminFiles { - - /** - * Get "server.xml" created files by the test - * @return The table of created files - */ - private static Vector getCreatedFiles(String beginTime, String endTime) { - Vector createdFiles = new Vector(); - - // Get JONAS_BASE path - String jonasBase = System.getProperty("jonas.base"); - - // Get JONAS_BASE/conf path - String conf = jonasBase + File.separator + "conf"; - - // Get JONAS_BASE/conf directory - File directory = new File(conf); - - // Get JONAS_BASE conf files - File[] files = directory.listFiles(); - - // First name of file to compare - String beginName = "server.xml." + beginTime; - - // End name of file to compare - String endName = "server.xml." + endTime; - - // Get the created files by the test - for (int i = 0; i < files.length; i++) { - if (files[i].getName().compareTo(beginName) >= 0) { - if (files[i].getName().compareTo(endName) <= 0) { - createdFiles.add(files[i]); - } - } - } - return createdFiles; - } - - /** - * Delete files - * @param beginTime begin time of the test - * @param endTime end time of the test - */ - public static void deleteCreatedFiles(String beginTime, String endTime) { - Vector files = getCreatedFiles(beginTime, endTime); - - for (int i = 0; i < files.size(); i++) { - // Delete file - ((File) files.get(i)).delete(); - } - } - - /** - * Delete file in $JONAS_BASE/conf directory - * @param fileName name of the file - */ - public static void deleteConfigFile(String fileName) { - - // Get JONAS_BASE path - String jonasBase = System.getProperty("jonas.base"); - - // Get JONAS_BASE/conf/... path - String serverConfPath = jonasBase + File.separator + "conf" + File.separator + fileName; - - // Get file - File file = new File(serverConfPath); - - // delete file - file.delete(); - } - - /** - * Replace server.xml by previous configuration file and remove created files - * @param beginTime begin time of the test - * @param endTime end time of the test - */ - public static void recoverServerConf(String beginTime, String endTime) { - Vector files = getCreatedFiles(beginTime, endTime); - - if (files.size() > 0) { - // Get server.xml file - File serverConf = getServerXmlFile(); - // Get the older copied configuration file - File copiedFile = (File) files.get(0); - - // Rename previous configuration file to "server.xml" - if (serverConf.canWrite()) { - copiedFile.renameTo(serverConf); - } - - // Delete other created files - for (int i = 0; i < files.size(); i++) { - ((File) files.get(i)).delete(); - } - } - } - - - /** - * Get server.xml file - * @return File server.xml - */ - public static File getServerXmlFile() { - // Get JONAS_BASE path - String jonasBase = System.getProperty("jonas.base"); - - // Get JONAS_BASE/conf/server.xml path - String serverConfPath = jonasBase + File.separator + "conf" + File.separator + "server.xml"; - - // Get server.xml file - return new File(serverConfPath); - } - - /** - * Get previous server.xml file - * @param beginTime begin time of the test - * @param endTime end time of the test - * @return File - */ - public static File getPreviousServerXmlFile(String beginTime, String endTime) { - Vector files = getCreatedFiles(beginTime, endTime); - return (File) files.get(files.size() - 1); - } - - /** - * Get local joram server port - * @param fileName name of the administration task file: joram-admin.cfg (in JONAS_BASE/conf directory) - * @return port number - * @throws IOException if an error occurs while file is read - */ - public static String getJoramServerPort(String fileName) throws IOException { - String port = null; - - // Get JONAS_BASE path - String jonasBase = System.getProperty("jonas.base"); - - // Get JONAS_BASE/conf/server.xml path - String serverConfPath = jonasBase + File.separator + "conf" + File.separator + fileName; - - // Get server.xml file - File file = new File(serverConfPath); - - // Transform file into string - BufferedReader read = new BufferedReader(new FileReader(file)); - String line = read.readLine(); - while (line != null) { - if (line.startsWith("Port")) { - // Get port - port = line.substring("Port\t".length()); - } - line = read.readLine(); - } - read.close(); - - return port; - } - - /** - * Get local joram server host name - * @param fileName name of the administration task file: joram-admin.cfg (in JONAS_BASE/conf directory) - * @return host name - * @throws IOException if an error occurs while file is read - */ - public static String getJoramHostName(String fileName) throws IOException { - String hostName = null; - - // Get JONAS_BASE path - String jonasBase = System.getProperty("jonas.base"); - - // Get JONAS_BASE/conf/server.xml path - String serverConfPath = jonasBase + File.separator + "conf" + File.separator + fileName; - - // Get server.xml file - File file = new File(serverConfPath); - - // Transform file into string - BufferedReader read = new BufferedReader(new FileReader(file)); - String line = read.readLine(); - while (line != null) { - if (line.startsWith("Host")) { - // Get port - hostName = line.substring("Host\t".length()); - } - line = read.readLine(); - } - read.close(); - - return hostName; - } - - public static void writeConfigFile(String fileName, Properties properties) throws IOException { - - // Get JONAS_BASE path - String jonasBase = System.getProperty("jonas.base"); - - // Get JONAS_BASE/conf/... path - String serverConfPath = jonasBase + File.separator + "conf" + File.separator + fileName; - - // Get file - File file = new File(serverConfPath); - - // Write the properties file back out - FileOutputStream output = null; - - try { - output = new FileOutputStream(file); - - final String header = "File was created by jonasAdmin test suite."; - - properties.store(output, header); - } catch (final IOException ioe) { - final String message = "Error while writing " + file; - throw new BuildException(message, ioe); - } - - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/util/JonasAdminTestCase.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/util/JonasAdminTestCase.java deleted file mode 100644 index bece60e2883385acb1b1fd3727b4613b29e3a971..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/util/JonasAdminTestCase.java +++ /dev/null @@ -1,909 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999-2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.util; - -import java.io.File; -import java.lang.reflect.Method; -import java.net.MalformedURLException; -import java.net.URI; -import java.net.URL; -import java.net.URLClassLoader; -import java.text.SimpleDateFormat; -import java.util.Calendar; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Properties; - -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; -import javax.management.remote.JMXConnector; -import javax.management.remote.JMXConnectorFactory; -import javax.management.remote.JMXServiceURL; -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; -import javax.rmi.PortableRemoteObject; - -import junit.framework.TestCase; - -import org.ow2.jonas.adm.AdmInterface; -import org.ow2.jonas.lib.management.javaee.J2eeObjectName; -import org.omg.CORBA.ORB; - -import com.meterware.httpunit.HttpUnitOptions; -import com.meterware.httpunit.TableCell; -import com.meterware.httpunit.WebConversation; -import com.meterware.httpunit.WebForm; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - -/** - * Define a class to add useful methods for test the examples - * - Deploy ear, war and beans - * - Retrieve initial context - * @author Florent Benoit - */ -public class JonasAdminTestCase extends TestCase { - - /** - * URL of the login page - * - */ - protected static final String URL_JONASADMIN = "/jonasAdmin/"; - - /** - * NAME of FRAME content - */ - protected static final String FRAME_CONTENT = "content"; - - /** - * NAME of FRAME tree - */ - protected static final String FRAME_TREE = "tree"; - - /** - * NAME of FRAME top - */ - protected static final String FRAME_TOP = "top"; - - /** - * URL of the deployment of EARs - */ - protected static final String URL_JONASADMIN_DEPLOYEAR = "/jonasAdmin/EditDeploy.do?type=ear"; - - /** - * URL of the deployment of JARs - */ - protected static final String URL_JONASADMIN_DEPLOYJAR = "/jonasAdmin/EditDeploy.do?type=jar"; - - /** - * Name of the property file of jonasAdmin tests - */ - private static final String JONASADMINTEST_PROPERTY_NAME = "jonasAdminTests.properties"; - /** - * JoramAdmin MBean's OBJECT_NAME - */ - private static final String JORAM_ADMIN_ON = "joramClient:type=JoramAdmin"; - /** - * Name of the JOnAS server used for tests - */ - private static String jonasName = "jonas"; - /** - * Name of the domain - */ - private static String domainName = "jonas"; - /** - * Initial context used for lookup - */ - private static Context ictx = null; - - /** - * JOnAS admin used for communicate via JMX to JOnAS - */ - private static AdmInterface admI = null; - - /** - * JMX connector - */ - private static JMXConnector connector = null; - - /** - * MBean Server Connection - */ - private static MBeanServerConnection currentServerConnection = null; - - /** - * Client ORB - */ - private static ORB orb =null; - - /** - * Conversation used for HttpUnit - */ - protected static WebConversation wc = null; - - /** - * URL used for the constructor - */ - protected String url = null; - - /** - * URL used to return to Welcome.jsp - */ - protected String urlWelcome = null; - - /** - * URL used to log out - */ - protected String urlLogOut = null; - - - /** - * Prefix for build URLs - */ - protected String prefixUrl = null; - - /** - * JOnAS and jonasAdmin properties - */ - protected JProperties jProp = null; - - /** - * jonasAdmin test properties - */ - protected Properties configFile; - - /** - * jonasAdmin port - */ - protected String port; - - /** - * Add to the specified url the prefix - * @param url relative URL - * @return absolute path of URL - */ - protected String getAbsoluteUrl (String url) { - return (this.prefixUrl + url); - } - - /** - * Initialize the port used by tests and the prefix - */ - private void init() { - // Port - port = System.getProperty("http.port"); - if (port == null) { - port = "9000"; - } - - // urls - prefixUrl = "http://localhost:" + port; - urlWelcome = prefixUrl + "/jonasAdmin/Welcome.do"; - urlLogOut = prefixUrl + "/jonasAdmin/logOut.do"; - - // Properties - jProp = new JProperties(); - - try { - configFile = jProp.getProperties(JONASADMINTEST_PROPERTY_NAME); - } catch (Exception e) { - System.err.println("Cannot find file : " + JONASADMINTEST_PROPERTY_NAME + ". " + e); - e.printStackTrace(); - } - - } - - /** - * Constructor with a specified name - * @param s the name - */ - public JonasAdminTestCase(String s) { - super(s); - init(); - } - - /** - * Constructor with a specified name and url - * @param s the name - * @param url the url which can be used - */ - public JonasAdminTestCase(String s, String url) { - super(s); - init(); - this.url = getAbsoluteUrl(url); - } - - /** - * Get initialContext - * @return the initialContext - * @throws NamingException if the initial context can't be retrieved - */ - private Context getInitialContext() throws NamingException { - return new InitialContext(); - } - - /** - * Common setUp routine, used for every test. - * @throws Exception if an error occurs - */ - protected void setUp() throws Exception { - - // WebConversation to jonasAdmin - wc = JonasAdminConnexion.getWc(); - if (wc == null) { - wc = JonasAdminConnexion.createWc(); - } - - try { - // get InitialContext - if (ictx == null) { - ictx = getInitialContext(); - } - if (admI == null) { - admI = (AdmInterface) PortableRemoteObject.narrow(ictx.lookup(jonasName + "_Adm"), AdmInterface.class); - } - - } catch (NamingException e) { - System.err.println("Cannot setup test: " + e); - e.printStackTrace(); - } - - // Get a MBean Server connection and set currentServerConnection variable - initMBeanServer(); - } - - - /** - * Load an ear file in the jonas server - * @param filename ear file, without ".ear" extension - * @throws Exception if an error occurs - */ - public void useEar(String filename) throws Exception { - - try { - // Load ear in JOnAS if not already loaded. - if (ictx == null) { - ictx = getInitialContext(); - } - - if (admI == null) { - admI = (AdmInterface) PortableRemoteObject.narrow(ictx.lookup(jonasName + "_Adm"), AdmInterface.class); - } - - //Test in both directories (apps/ and apps/autoload) - String appsFileName = filename + ".ear"; - String autoloadAppsFileName = "autoload" + File.separator + filename + ".ear"; - if (!admI.isEarLoaded(appsFileName) && !admI.isEarLoaded(autoloadAppsFileName)) { - //if the file was in autoload, it was loaded - admI.addEar(appsFileName); - } - - } catch (Exception e) { - throw new Exception("Cannot load Ear : " + e.getMessage()); - } - } - - - /** - * Unload a ear file in the jonas server - * @param filename ear file, without ".ear" extension - * @throws Exception if an error occurs - */ - public void unUseEar(String filename) throws Exception { - try { - // Unload ear in EARServer if not already loaded. - if (ictx == null) { - ictx = getInitialContext(); - } - if (admI == null) { - admI = (AdmInterface) PortableRemoteObject.narrow(ictx.lookup(jonasName + "_Adm"), AdmInterface.class); - } - if (admI.isEarLoaded(filename + ".ear")) { - admI.removeEar(filename + ".ear"); - } - } catch (Exception e) { - throw new Exception("Cannot unload Bean : " + e.getMessage()); - } - } - - /** - * Load a war file in the jonas server - * @param filename war file, without ".war" extension - * @throws Exception if an error occurs - */ - public void useWar(String filename) throws Exception { - - try { - // Load war in JOnAS if not already loaded. - if (ictx == null) { - ictx = getInitialContext(); - } - - if (admI == null) { - admI = (AdmInterface) PortableRemoteObject.narrow(ictx.lookup(jonasName + "_Adm"), AdmInterface.class); - } - - //Test in both directories (apps/ and apps/autoload) - String webappsFileName = filename + ".war"; - String autoloadWebappsFileName = "autoload" + File.separator + filename + ".war"; - if (!admI.isWarLoaded(webappsFileName) && !admI.isWarLoaded(autoloadWebappsFileName)) { - //if the file was in autoload, it was loaded - admI.addWar(webappsFileName); - } - - } catch (Exception e) { - throw new Exception("Cannot load War : " + e.getMessage()); - } - } - - /** - * Load a bean jar file in the jonas server - * @param filename jar file, without ".jar" extension - * @throws Exception if an error occurs - */ - public void useBeans(String filename) throws Exception { - try { - // Load bean in EJBServer if not already loaded. - if (ictx == null) { - ictx = getInitialContext(); - } - if (admI == null) { - admI = (AdmInterface) PortableRemoteObject.narrow(ictx.lookup(jonasName + "_Adm"), AdmInterface.class); - } - if (!admI.isLoaded(filename + ".jar")) { - admI.addBeans(filename + ".jar"); - } - } catch (Exception e) { - throw new Exception("Cannot load Bean : " + e.getMessage()); - } - } - - - /** - * Unload a bean jar file in the jonas server - * @param filename jar file, without ".jar" extension - * @throws Exception if an error occurs - */ - public void unUseBeans(String filename) throws Exception { - try { - // Load bean in EJBServer if not already loaded. - if (ictx == null) { - ictx = getInitialContext(); - } - if (admI == null) { - admI = (AdmInterface) PortableRemoteObject.narrow(ictx.lookup(jonasName + "_Adm"), AdmInterface.class); - } - if (admI.isLoaded(filename + ".jar")) { - admI.removeBeans(filename + ".jar"); - } - } catch (Exception e) { - throw new Exception("Cannot unload Bean : " + e.getMessage()); - } - } - - - /** - * Load a rar file in the jonas server - * @param filename rar file, without ".rar" extension - * @throws Exception if an error occurs - */ - public void useRar(String filename) throws Exception { - - try { - // Load rar in JOnAS if not already loaded. - if (ictx == null) { - ictx = getInitialContext(); - } - - if (admI == null) { - admI = (AdmInterface) PortableRemoteObject.narrow(ictx.lookup(jonasName + "_Adm"), AdmInterface.class); - } - - //Test in both directories (rars/ and rars/autoload) - String raFileName = filename + ".rar"; - String autoloadRaFileName = "autoload" + File.separator + filename + ".rar"; - if (!admI.isRarLoaded(raFileName) && !admI.isRarLoaded(autoloadRaFileName)) { - //if the file was in autoload, it was loaded - admI.addRar(raFileName); - } - - } catch (Exception e) { - throw new Exception("Cannot load Rar : " + e.getMessage()); - } - } - - - /** - * Rar is loaded in the jonas server - * @param filename rar file, without ".rar" extension - * @return true if the rar is loaded, else false - * @throws Exception if an error occurs - */ - public boolean isRarLoaded(String filename) throws Exception { - - boolean found = false; - - try { - // Load rar in JOnAS if not already loaded. - if (ictx == null) { - ictx = getInitialContext(); - } - - if (admI == null) { - admI = (AdmInterface) PortableRemoteObject.narrow(ictx.lookup(jonasName + "_Adm"), AdmInterface.class); - } - - //Test in both directories (rars/ and rars/autoload) - String raFileName = filename + ".rar"; - String autoloadRaFileName = "autoload" + File.separator + filename + ".rar"; - if (admI.isRarLoaded(raFileName) || admI.isRarLoaded(autoloadRaFileName)) { - //if the file was in autoload, it was loaded - found = true; - } - - } catch (Exception e) { - throw new Exception("Cannot load Rar : " + e.getMessage()); - } - - return found; - } - - /** - * Create a mail factory in jonas server - * @param mail factory name of the datasource - * @param properties properties of the mail factory - * @throws Exception if an error occurs - */ - protected void createMailFactory(String mailFactory, Properties properties) throws Exception { - MBeanServerConnection server = getMBeanServer(); - ObjectName on = ObjectName.getInstance("jonas:type=service,name=mail"); - - // add properties in 'datasource'.properties - JonasAdminFiles.writeConfigFile(mailFactory + ".properties", properties); - - Object[] params = new Object[] {mailFactory, properties, new Boolean(true)}; - server.invoke(on, "createMailFactoryMBean", params, new String[] {String.class.getName(), Properties.class.getName(), Boolean.class.getName()}); - - } - - /** - * Unbind a mail factory in jonas server - * @param mailFactory name of the mail factory - * @throws Exception if an error occurs - */ - protected void unBindMailFactory(String mailFactory) throws Exception { - MBeanServerConnection server = getMBeanServer(); - ObjectName on = ObjectName.getInstance("jonas:type=service,name=mail"); - - Object[] params = new Object[] {mailFactory}; - server.invoke(on, "unbindMailFactoryMBean", params, new String[] {String.class.getName()}); - } - - /** - * Return if the mail factory is in mail factory list - * @param mailFactory the name of the mail factory - * @return true if the mail factory is in list, false else. - * @throws Exception if an error occurs. - */ - protected boolean isInMailFactoryList(String mailFactory) throws Exception { - MBeanServerConnection server = getMBeanServer(); - ObjectName on = ObjectName.getInstance("jonas:type=service,name=mail"); - - List list = (List) server.getAttribute(on, "MailFactoryPropertiesFiles"); - - return list.contains(mailFactory); - } - - /** - * Load a datasource in jonas server - * @param datasource name of the datasource - * @param properties properties of the datasource - * @throws Exception if an error occurs - */ - protected void useDatasource(String datasource, Properties properties) throws Exception { - MBeanServerConnection server = getMBeanServer(); - ObjectName on = ObjectName.getInstance("jonas:type=service,name=database"); - - if (!((Boolean) server.invoke(on, "isLoadedDataSource", new Object[] {datasource}, new String[] {String.class.getName()})).booleanValue()) { - // add properties in 'datasource'.properties - JonasAdminFiles.writeConfigFile(datasource + ".properties", properties); - - Object[] params = new Object[] {datasource, properties, new Boolean(true)}; - server.invoke(on, "loadDataSource", params, new String[] {String.class.getName(), Properties.class.getName(), Boolean.class.getName()}); - } - } - - /** - * Check if database service is started (dbm) - * @return true if dbm started - * @throws Exception if an error occurs - */ - protected boolean isDatabaseService() throws Exception { - boolean result = false; - MBeanServerConnection server = getMBeanServer(); - ObjectName on = ObjectName.getInstance("jonas:type=service,name=database"); - if (server.isRegistered(on)) { - result = true; - } - return result; - } - - /** - * Check if the Joram RAR is deplyed - * @return true if dbm started - * @throws Exception if an error occurs - */ - protected boolean isJoramRar() throws Exception { - boolean result = false; - MBeanServerConnection server = getMBeanServer(); - ObjectName on = ObjectName.getInstance(JORAM_ADMIN_ON); - if (server.isRegistered(on)) { - result = true; - } - return result; - } - - /** - * Unload a datasource in jonas server - * @param datasource name of the datasource - * @throws Exception if an error occurs - */ - protected void unUseDatasource(String datasource) throws Exception { - MBeanServerConnection server = getMBeanServer(); - ObjectName on = ObjectName.getInstance("jonas:type=service,name=database"); - - if (((Boolean) server.invoke(on, "isLoadedDataSource", new Object[] {datasource}, new String[] {String.class.getName()})).booleanValue()) { - - Object[] params = new Object[] {datasource}; - server.invoke(on, "unloadDataSource", params, new String[] {String.class.getName()}); - } - } - - /** - * Load a datasource in jonas server - * @param datasource name of the datasource - * @return boolean true if the datasource is loaded, false else - * @throws Exception if an error occurs - */ - protected boolean isLoadedDatasource(String datasource) throws Exception { - MBeanServerConnection server = getMBeanServer(); - ObjectName on = ObjectName.getInstance("jonas:type=service,name=database"); - - return ((Boolean) server.invoke(on, "isLoadedDataSource", new Object[] {datasource}, new String[] {String.class.getName()})).booleanValue(); - } - - /** - * Create a topic in a joram server - * @param name name of the topic - * @param idString id of the current joram server - * @throws Exception if an error occurs - */ - protected void createTopic(String name, int idString) throws Exception { - MBeanServerConnection server = getMBeanServer(); - ObjectName on = ObjectName.getInstance("joramClient:type=JoramAdapter,*"); - ObjectName joramAdapterON = (ObjectName) server.queryNames(on, null).iterator().next(); - - Object[] params = new Object[] {new Integer(idString), name}; - server.invoke(joramAdapterON, "createTopic", params, new String[] {"int", String.class.getName()}); - } - - /** - * Create a queue in a joram server - * @param name name of the queue - * @param idString id of the current joram server - * @throws Exception if an error occurs - */ - protected void createQueue(String name, int idString) throws Exception { - MBeanServerConnection server = getMBeanServer(); - ObjectName on = ObjectName.getInstance("joramClient:type=JoramAdapter,*"); - ObjectName joramAdapterON = (ObjectName) server.queryNames(on, null).iterator().next(); - - Object[] params = new Object[] {new Integer(idString), name}; - server.invoke(joramAdapterON, "createQueue", params, new String[] {"int", String.class.getName()}); - } - - /** - * Create a user in a joram server - * @param name name of the user - * @param password password of the user - * @throws Exception if an error occurs - */ - protected void createLocalJmsUser(String name, String password) throws Exception { - MBeanServerConnection server = getMBeanServer(); - ObjectName on = ObjectName.getInstance("joramClient:type=JoramAdapter,*"); - ObjectName joramAdapterON = (ObjectName) server.queryNames(on, null).iterator().next(); - - Object[] params = new Object[] {name, password}; - server.invoke(joramAdapterON, "createUser", params, new String[] {"java.lang.String", "java.lang.String"}); - } - - - /** - * Call the main method of a specific class with empty args - * @param classToLoad name of class which contains the main method - * @throws Exception if it fails - */ - protected void callMainMethod(String classToLoad) throws Exception { - callMainMethod(classToLoad, new String[]{}); - } - - - /** - * Call the main method of a specific class and the specific args - * @param classToLoad name of class which contains the main method - * @param args args to give to the main method - * @throws Exception if it fails - */ - protected void callMainMethod(String classToLoad, String[] args) throws Exception { - //Build classloader - ClassLoader cl = Thread.currentThread().getContextClassLoader(); - URL[] urls = new URL[1]; - urls[0] = new File(System.getProperty("jonas.root") + File.separator + "examples" + File.separator + "classes").toURL(); - URLClassLoader loader = new URLClassLoader(urls); - Thread.currentThread().setContextClassLoader(loader); - Class clazz = loader.loadClass(classToLoad); - Class[] argList = new Class[] {args.getClass()}; - Method meth = clazz.getMethod("main", argList); - Object appli = meth.invoke(null, new Object[]{args}); - } - - /** - * Get current time - * @return A String Time with the format yyyy-MM-dd.HH-mm-ss - */ - protected String getTime() { - Calendar cal = Calendar.getInstance(); - Date date = cal.getTime(); - SimpleDateFormat formatter; - formatter = new SimpleDateFormat("yyyy-MM-dd.HH-mm-ss"); - return formatter.format(date); - } - - /** - * Undeploy an EAR - * @param name String of EAR Name - * @throws Exception if error occurs - */ - protected void undeployEar(String name) throws Exception { - String fileName = name + ".ear"; - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - WebResponse wr = wc.getResponse(getAbsoluteUrl(URL_JONASADMIN_DEPLOYEAR)); - WebForm[] webForms = wr.getForms(); - WebForm webForm = webForms[0]; - - String params = webForm.getParameterValue("undeploy"); - WebForm.Scriptable script = webForm.getScriptableObject(); - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - - if (params.length() == 0) { - params += fileName; - } else { - params += "," + fileName; - } - - script.setParameterValue("undeploy", params); - - WebResponse submitUndeploy = webForm.submit(); - - webForms = submitUndeploy.getForms(); - webForm = webForms[0]; - - WebResponse endResp = webForm.submit(); - } - - /** - * Undeploy all EAR - * @throws Exception if error occurs - */ - protected void undeployAllEar() throws Exception { - WebResponse wr = wc.getResponse(getAbsoluteUrl(URL_JONASADMIN_DEPLOYEAR)); - undeployAll(wr); - } - - /** - * Undeploy all Jars - * @throws Exception if error occurs - */ - protected void undeployAllJar() throws Exception { - WebResponse wr = wc.getResponse(getAbsoluteUrl(URL_JONASADMIN_DEPLOYJAR)); - undeployAll(wr); - } - - /** - * Undeploy all - * @throws Exception if error occurs - */ - protected void undeployAll(WebResponse wr) throws Exception { - - WebForm[] webForms = wr.getForms(); - WebForm webForm = webForms[0]; - - // Disable errors of javascript - HttpUnitOptions.setExceptionsThrownOnScriptError(false); - // Disable exception thrown on error status - HttpUnitOptions.setExceptionsThrownOnErrorStatus(false); - - String params = webForm.getParameterValue("deploy"); - WebForm.Scriptable script = webForm.getScriptableObject(); - - if (params.length() == 0) { - params += webForm.getParameterValue("undeploy"); - } else { - params += "," + webForm.getParameterValue("undeploy"); - } - - script.setParameterValue("undeploy", params); - - WebResponse submitUndeploy = webForm.submit(); - - webForms = submitUndeploy.getForms(); - webForm = webForms[0]; - - WebResponse endResp = webForm.submit(); - - wc.getResponse(getAbsoluteUrl(URL_JONASADMIN)); - } - - /** - * Verify number of tabs and the selected tab - * @param tabTable the tab table - * @param nbTabs number of tabs - * @param selectedTab the numero of the selected tab - */ - protected void testTabs(WebTable tabTable, int nbTabs, int selectedTab, String msg) { - TableCell selectedCell; - // - number of tabs - assertEquals("There are not " + nbTabs + " tabs. " + msg, - nbTabs, (tabTable.getColumnCount() + 1) / 2); - // - selected tab - selectedCell = tabTable.getTableCell(1, (selectedTab * 2) - 2); - assertEquals("It is not the selected tab. ", 1, selectedCell.getElementsWithAttribute("src", "/jonasAdmin/images/dot.gif").length); - } - - /** - * Get MBean Server connection - * @throws Exception if an error occurs - */ - private void initMBeanServer() throws Exception { - String sCarolURL = jProp.getRegistryUrl(); - String carolProtocol = jProp.getRegistryProtocol(); - URI carolURL = new URI(sCarolURL); - int portNb = carolURL.getPort(); - String port = String.valueOf(portNb); - String url = null; - Map env = null; - if (carolProtocol.equals("jrmp")) { - // Treat JRMP case - url = "service:jmx:rmi:///jndi/rmi://localhost:" + port + "/jrmpconnector_" + jonasName; - } else if (carolProtocol.equals("iiop")) { - // Treat IIOP case - url = "service:jmx:iiop:///jndi/iiop://localhost:" + port + "/iiopconnector_" + jonasName; - env = new HashMap(); - if (orb == null) { - initORB(); - } - env.put("java.naming.corba.orb", orb); - } else if (carolProtocol.equals("cmi")) { - // Treat CMI - url = "service:jmx:rmi:///jndi/cmi://localhost:" + port + "/cmiconnector_" + jonasName; - } - - JMXServiceURL connURL = null; - try { - connURL = new JMXServiceURL(url); - } catch (MalformedURLException e) { - throw new Exception("Can't create JMXServiceURL with string: " + url); - } - - try { - connector = JMXConnectorFactory.newJMXConnector(connURL, env); - } catch (MalformedURLException e1) { - throw new Exception("there is no provider for the protocol in " + url); - } catch (java.io.IOException e) { - throw new Exception("Connector client cannot be made because of a communication problem (used URL: " + url + ")"); - } - try { - connector.connect(env); - currentServerConnection = connector.getMBeanServerConnection(); - } catch (java.io.IOException ioe) { - throw new Exception("connection could not be made because of a communication problem"); - } - } - - /** - * Get MBean Server connection - * @return a MBeanServer Connection - * @throws Exception if an error occurs - */ - protected MBeanServerConnection getMBeanServer() throws Exception { - return currentServerConnection; - } - - /** - * Close MBean Server connection - * @throws Exception if an error occurs - */ - protected void closeMBeanServer() throws Exception { - - try { - if (connector != null) { - connector.close(); - } - } catch (Exception e) { - throw new Exception("connection could not be close because of a communication problem."); - } - } - - /** - * Create an orb for the client - * - */ - private static void initORB() { - orb = ORB.init(new String[0], null); - } - - /** - * Tear Down cleanUp action - * @throws Exception - */ - public void tearDown() throws Exception { - // Close MBean Server Connection - closeMBeanServer(); - } - - /** - * Print a debug message - * @param msg The message - */ - public void debug(String msg) { - System.out.println("DEBUG: " + msg); - } - - protected ObjectName getJCAConnectionFactory(String name, String jcaResourceName) { - ObjectName on = J2eeObjectName.getJCAConnectionFactory(domainName, jcaResourceName, jonasName, name); - return on; - } - - protected String getStringMBeanAttribute(ObjectName on, String attName) throws Exception { - MBeanServerConnection server = getMBeanServer(); - return (String) server.getAttribute(on, attName); - } - - protected Integer getIntegerMBeanAttribute(ObjectName on, String attName) throws Exception { - MBeanServerConnection server = getMBeanServer(); - return (Integer) server.getAttribute(on, attName); - } -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/util/JonasAdminTree.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/util/JonasAdminTree.java deleted file mode 100755 index ad2b8e3b8ced7c3baa6c4bb4a8b319209ef5720b..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/util/JonasAdminTree.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.util; - -import org.xml.sax.SAXException; - -import com.meterware.httpunit.WebConversation; -import com.meterware.httpunit.WebImage; -import com.meterware.httpunit.WebLink; -import com.meterware.httpunit.WebResponse; - -/** - * Define a class to manipulate the tree frame of JonasAdmin - * @author kemlerp - * - */ -public class JonasAdminTree { - - /** - * NAME of FRAME tree - */ - private static final String FRAME_TREE = "tree"; - - /** - * Verify if it is the good link of the tree which is selected - * @param wr The WebResponse of the 'tree' frame - * @param name A string with the name of the link - * @return a boolean. True if the name is found in the link, else false. - */ - public static boolean treeControlSelected (WebResponse wr, String selectedLink) throws SAXException { - boolean isSelected = false; // the result - int nbSelectedLink = 0; // number of selected link - String attribut; // value of class attribut - String linkUrl = null; // url of selected attribut - - // Get all links - WebLink[] links; - try { - links = wr.getLinks(); - - // Search links with the 'tree-control-selected' class attribut - // and increase nbSelectedLink - for (int i = 0; i < links.length; i++) { - attribut = links[i].getAttribute("class"); - if (attribut.indexOf("tree-control-selected") != -1) { - linkUrl = links[i].getURLString(); - nbSelectedLink++; - } - } - - if (nbSelectedLink == 1) { - if (selectedLink.equals(linkUrl)) { - isSelected = true; - } - } - } catch (SAXException e) { - throw new SAXException("No link was found : " + e); - } - - return isSelected; - } - - /** - * Open tree - * @param wr Tree Frame Web Response - * @return Tree Frame Web Response with opened tree - * @throws Exception if an error occurs - */ - public static WebResponse openTree(WebResponse wr, WebConversation wc) throws Exception { - WebImage[] frameTreeImages = wr.getImages(); - for (int i = 0; i < frameTreeImages.length; i++) { - if (frameTreeImages[i].getSource().indexOf("node_close") != -1) { - if (!frameTreeImages[i].getLink().getURLString().endsWith("*mbeans")) { - frameTreeImages[i].getLink().click(); - // get frame tree response - wr = wc.getFrameContents(FRAME_TREE); - // update frameTreeImages - frameTreeImages = wr.getImages(); - } - } - } - return wr; - } - -} diff --git a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/util/JonasAdminUtils.java b/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/util/JonasAdminUtils.java deleted file mode 100755 index 8d3c2c83d788263a72e830e0f461fbd7299b0096..0000000000000000000000000000000000000000 --- a/jonas_tests/jonasadmin/src/org/objectweb/jonas/jonasadmin/test/util/JonasAdminUtils.java +++ /dev/null @@ -1,242 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jonasadmin.test.util; - -import org.xml.sax.SAXException; - -import com.meterware.httpunit.TableCell; -import com.meterware.httpunit.WebResponse; -import com.meterware.httpunit.WebTable; - -/** - * Utils - * @author kemlerp - * - */ -public class JonasAdminUtils { - - /** - * A class which represents the row and the column of a cell - * @author kemlerp - * - */ - public class CoordCell { - - /** - * Row of the cell - */ - private Integer row = null; - - /** - * Column of the cell - */ - private Integer column = null; - - /** - * Constructor - * @param row a positive integer - * @param column a positive integer - */ - public CoordCell (Integer row, Integer column) { - this.row = row; - this.column = column; - } - - /** - * Get column - * @return column number - */ - public Integer getColumn() { - return column; - } - - /** - * Set column - * @param column a positive integer - */ - public void setColumn(Integer column) { - this.column = column; - } - - /** - * Get row - * @return row number - */ - public Integer getRow() { - return row; - } - - /** - * Set row - * @param row a positive integer - */ - public void setRow(Integer row) { - this.row = row; - } - } - - /** - * Get the last row of table where text is found in the first column - * @param text title of the row - * @param table the table which contains text - * @return -1 if the text was not found in the first column else an integer - */ - public Integer getRow(String text, WebTable table) { - Integer row = new Integer(-1); - TableCell cell; - for (int i = 0; i < table.getRowCount(); i++) { - cell = table.getTableCell(i, 0); - if (cell.getText().indexOf(text) != -1) { - row = new Integer(i); - } - } - return row; - } - - /** - * Get the first row of table where text is found in the given column - * @param text title of the row - * @param table the table which contains text - * @param column the column - * @return -1 if the text was not found in the first column else an integer - */ - public Integer getFirstRow(String text, WebTable table, int column) { - boolean found = false; - Integer row = new Integer(-1); - TableCell cell; - int i = 0; - while (i < table.getRowCount() && !found) { - cell = table.getTableCell(i, column); - if (cell != null && cell.getText().indexOf(text) != -1) { - row = new Integer(i); - found = true; - } - i++; - } - return row; - } - - /** - * Get the last row of table where text is found in the given column - * @param text title of the row - * @param table the table which contains text - * @param column the column - * @return -1 if the text was not found in the first column else an integer - */ - public Integer getRow(String text, WebTable table, int column) { - Integer row = new Integer(-1); - TableCell cell; - for (int i = 0; i < table.getRowCount(); i++) { - cell = table.getTableCell(i, column); - if (cell.getText().indexOf(text) != -1) { - row = new Integer(i); - } - } - return row; - } - - /** - * Get the last column of table where text is found in the first row - * @param text title of the column - * @param table the table which contains text - * @return -1 if the text was not found in the first row else an integer - */ - public Integer getColumn(String text, WebTable table) { - Integer column = new Integer(-1); - TableCell cell; - for (int i = 0; i < table.getColumnCount(); i++) { - cell = table.getTableCell(0, i); - if (cell.getText().indexOf(text) != -1) { - column = new Integer(i); - } - } - return column; - } - - /** - * Get the row and the column of the cell which contains selected item - * @param table tree Table - * @return Null if no item is selected, else the row and the column - */ - public CoordCell getSelectedItemRow(WebTable table) { - Integer row = null; - Integer column = null; - TableCell cell = null; - CoordCell coord = null; - String attribut; - boolean found = false; - int i = 0; - int j = 0; - - while (i < table.getRowCount() && !found) { - j = 0; - while (j < table.getColumnCount() && !found) { - cell = table.getTableCell(i, j); - if (cell.getElementsWithAttribute("class", "tree-control-selected").length == 1) { - found = true; - row = new Integer(i); - column = new Integer(j); - coord = new CoordCell(row, column); - } - j++; - } - i++; - } - return coord; - } - - /** - * Get table num - * @param contentFrame the content frame - * @param num integer between 0 and number of tables in the cell - * @return table - * @throws SAXException if a table or a cell doesn't match. - */ - public WebTable getTable(WebResponse contentFrame, int num) throws SAXException { - WebTable table = contentFrame.getTables()[1]; - TableCell cell = table.getTableCell(1, 0); - table = cell.getTables()[0]; - cell = table.getTableCell(0, 0); - table = cell.getTables()[0]; - cell = table.getTableCell(0, 0); - // Get the (num+1)th table - table = cell.getTables()[num]; - return table; - } - - /** - * Get table of tabs - * @param contentFrame the content frame - * @return table of tabs - * @throws SAXException if a table or a cell doesn't match. - */ - public WebTable getTabTable(WebResponse contentFrame) throws SAXException { - WebTable table = contentFrame.getTables()[1]; - TableCell cell = table.getTableCell(0, 0); - table = cell.getTables()[0]; - return table; - } -} diff --git a/jonas_tests/junit.bat b/jonas_tests/junit.bat deleted file mode 100644 index c1afc6f1ee818de01ae4e51d01c53ab04eaa950d..0000000000000000000000000000000000000000 --- a/jonas_tests/junit.bat +++ /dev/null @@ -1,142 +0,0 @@ -@Echo off -Rem --------------------------------------------------------------------------- -Rem JOnAS: Java(TM) Open Application Server -Rem Copyright (C) 1999 Bull S.A. -Rem Contact: jonas-team@objectweb.org -Rem -Rem This library is free software; you can redistribute it and/or -Rem modify it under the terms of the GNU Lesser General Public -Rem License as published by the Free Software Foundation; either -Rem version 2.1 of the License, or any later version. -Rem -Rem This library is distributed in the hope that it will be useful, -Rem -Rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Rem Lesser General Public License for more details. -Rem -Rem You should have received a copy of the GNU Lesser General Public -Rem License along with this library; if not, write to the Free Software -Rem Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -Rem USA -Rem -Rem Initial developer(s): Philippe Durieux -Rem Contributor(s): -Rem --------------------------------------------------------------------------- -Rem $Id$ -Rem --------------------------------------------------------------------------- - -Rem Usage: junit [ test-type [ dir-name [ suite-name [ test-name ] ] ] ] -Rem -Rem This script allows to run the jonas-test all the tests or a sub-set of the tests: -Rem - the tests of the given directory -Rem - the tests of the given suite of the given directory -Rem - only the given test of the given suite of the given directory -Rem for each type test (conformance, stress or ws) -Rem -setlocal ENABLEDELAYEDEXPANSION - -set TYPE=conf -set PACK=org.objectweb.jonas.jtests.clients -set DIR=suite -set SUITE=C_suite -set TEST= -set CLIENT_OPTS= -set TEST_CLASSES=%TEST_BASE%\conformance\classes;%TEST_BASE%\examples\classes - -if ["%JONAS_BASE%"]==[""] goto set_jonas_base -set CLIENT_OPTS=%CLIENT_OPTS% -Djonas.base="%JONAS_BASE%" - -:set_jonas_base -set CLIENT_OPTS=%CLIENT_OPTS% -Djonas.base="%JONAS_ROOT%" -if ["%REGISTRY%"]==[] goto set_registry -set CLIENT_OPTS=%CLIENT_OPTS% -Dregistry="%REGISTRY%" -:set_registry -set CLIENT_OPTS=%CLIENT_OPTS% -Dregistry="rmi://localhost:1099" -if ["%PROTOCOL%"]==[] goto set_protocol -set CLIENT_OPTS=%CLIENT_OPTS% -Dprotocol="%PROTOCOL%" -:set_protocol -set CLIENT_OPTS=%CLIENT_OPTS% -Dprotocol=jrmp - -if [%HTTP_PORT%]==[] set HTTP_PORT=9000 -if not [%1]==[] goto loop_on_args -:loop_on_args - - -if [%1]==[] goto endargs -if ["%1"]==["-debug"] goto debug_arg -set TYPE=%1 -shift -if [%1]==[] goto endargs -set DIR=%1 -set SUITE=C_%DIR% -shift -if [%1]==[] goto endargs -set SUITE=%1 -shift -if [%1%]==[] goto varinit -set TEST=-n %1 -goto varinit - - - -:debug_arg -set DEBUG_OPTS=%DEBUG_OPTS% %1 -shift -if not ["%1"]==["-p"] goto debug_usage -set DEBUG_OPTS=%DEBUG_OPTS% %1 -shift -set DEBUG_OPTS=%DEBUG_OPTS% %1 -shift -if ["%1"]==["-s"] goto set_debug_opts -goto loop_on_args - -:set_debug_opts -set DEBUG_OPTS=%DEBUG_OPTS% %1 -shift -set DEBUG_OPTS=%DEBUG_OPTS% %1 -shift -goto loop_on_args - -:debug_usage -echo -debug option parameters are : "-debug -p [-s ]" -goto :EOF - -:endargs -echo %TYPE% -echo %DIR% -echo %SUITE% -echo %DEBUG_OPTS% - -:varinit -if [%TYPE%]==[stress] goto varstress -if [%TYPE%]==[ws] goto varws -if [%TYPE%]==[examples] goto varexa -:varconf -set PACK=org.objectweb.jonas.jtests.clients -set TEST_CLASSES=%TEST_BASE%\conformance\classes -goto calllabel -:varstress -set PACK=org.objectweb.jonas.stests -set TEST_CLASSES=%TEST_BASE%\stress\classes -goto calllabel -:varws -set PACK=org.objectweb.ws.clients -set TEST_CLASSES=%TEST_BASE%\ws\classes -set JAVA_OPTS=%JAVA_OPTS% -Dhttp.port=%HTTP_PORT% -Daddressbook.dir=%TEST_BASE%\ws\src\org\objectweb\ws\ab_web -Dordering.dir=%TEST_BASE%\ws\src\org\objectweb\ws\ordering_app -goto calllabel -:varexa -set PACK=org.objectweb.jonas.examples.clients -set TEST_CLASSES=%TEST_BASE%\examples\classes -goto calllabel - -:calllabel - -Set JONAS_CLASSPATH=%TEST_CLASSES%;%ANT_HOME%\lib\junit.jar;%HTTPUNIT_HOME%\lib\httpunit.jar;%HTTPUNIT_HOME%\jars\nekohtml.jar;%HTTPUNIT_HOME%\jars\js.jar;%JONAS_ROOT%\examples\classes - -echo on -call jclient %PROPS% %PACK%.%DIR%.%SUITE% %TEST% -security %CLIENT_OPTS% %DEBUG_OPTS% - - - - - diff --git a/jonas_tests/junit.sh b/jonas_tests/junit.sh deleted file mode 100755 index f34c90161792e7305718051740daf21fead8a64e..0000000000000000000000000000000000000000 --- a/jonas_tests/junit.sh +++ /dev/null @@ -1,154 +0,0 @@ -#!/bin/sh -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 1999 Bull S.A. -# Contact: jonas-team@objectweb.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -# -# Usage: junit [ test-type [ dir-name [ suite-name [ test-name ] ] ] ] -# -# This script allows to run the jonas-test all the tests or a sub-set of the tests: -# - the tests of the given directory -# - the tests of the given suite of the given directory -# - only the given test of the given suite of the given directory -# for each type test (conformance, examples or ws) -#set -x -TYPE=conf -PACK=org.objectweb.jonas.jtests.clients -DIR=suite -SUITE=C_suite -TEST= - -# Try to find the directory where the jonas tests are -[ -d $PROJ_BASE/jonas_tests ] && TEST_BASE=$PROJ_BASE/jonas_tests -[ -d $JPROJ_BASE/jonas_tests ] && TEST_BASE=$JPROJ_BASE/jonas_tests - -TEST_CLASSES=$TEST_BASE/conformance/classes - -PROPS= - -# variable needed for ws tests -if [ -z "$HTTP_PORT" ] -then - HTTP_PORT=9000 -fi - -# registry url for JMX access -if [ -z "$REGISTRY" ] -then - REGISTRY=rmi://localhost:1099 -fi -# protocol used -if [ -z "$PROTOCOL" ] -then - PROTOCOL=jrmp -fi -if [ $# -gt 0 ] -then - TYPE=$1 - shift -fi - -case "$TYPE" in -"conf") - ;; -"stress") - TEST_CLASSES=$TEST_BASE/stress/classes - PACK=org.objectweb.jonas.stests - ;; -"ws") - TEST_CLASSES=$TEST_BASE/ws/classes - PROPS="-Dhttp.port=$HTTP_PORT" - PROPS="$PROPS -Daddressbook.dir=$TEST_BASE/ws/src/org/objectweb/ws/ab_web" - PROPS="$PROPS -Dordering.dir=$TEST_BASE/ws/src/org/objectweb/ws/ordering_app" - PROPS="$PROPS -Djonas.base.client=$JONAS_BASE -Djonas.root=$JONAS_ROOT" - - ;; -"examples") - TEST_CLASSES=$TEST_BASE/examples/classes:$TEST_BASE/examples/base/examples/classes - PACK=org.objectweb.jonas.examples.clients - PROPS="-Dhttp.port=$HTTP_PORT" - PROPS="$PROPS -Daddressbook.dir=$TEST_BASE/ws/src/org/objectweb/ws/ab_web" - PROPS="$PROPS -Dordering.dir=$TEST_BASE/ws/src/org/objectweb/ws/ordering_app" - - - ;; -*) - echo "USAGE : $0 [ test-type [ dir-name [ suite-name [ test-name ] ] ] ]" - exit - ;; -esac - -if [ $# -gt 0 ] -then - DIR=$1 - SUITE=C_$DIR - shift -fi - -if [ $# -gt 0 ] -then - SUITE=$1 - shift -fi - -if [ $# -gt 0 ] -then - PREFIX=`echo "$SUITE" | cut -b 1-2` - if [ "$PREFIX" != "F_" ] && [ "$PREFIX" != "G_" ] - then - echo "ERROR: a test-name may be specified only for a final suite (F_xxx)or (G_xxx)" - exit 2 - fi - case $1 in - -*) - TEST=$1 - ;; - *) - TEST="-n $1" - ;; - esac - shift -fi - - -# update classpath for junit tests and httpunit -# update the following lines depending on your own environment -for CLS in \ -$ANT_HOME/lib/junit.jar \ -$HTTPUNIT_HOME/lib/httpunit.jar \ -$HTTPUNIT_HOME/jars/nekohtml.jar \ -$HTTPUNIT_HOME/jars/js.jar \ -$TEST_CLASSES -do - echo $JONAS_CLASSPATH | grep $CLS >/dev/null || JONAS_CLASSPATH=$JONAS_CLASSPATH:$CLS -done - -# important to be seen in jclient script -export JONAS_CLASSPATH - - -echo $CLASSPATH -echo "Running junit test : $TYPE $DIR/$SUITE $TEST" - -jclient $PROPS $PACK.$DIR.$SUITE $TEST -security -Djonas.base=$JONAS_BASE -Dregistry=$REGISTRY -Dprotocol=$PROTOCOL -#jclient -debug -p 4142 -s y $PROPS $PACK.$DIR.$SUITE $TEST -security -Djonas.base=$JONAS_BASE -Dregistry=$REGISTRY -Dprotocol=$PROTOCOL diff --git a/jonas_tests/junitime.sh b/jonas_tests/junitime.sh deleted file mode 100755 index 6cb96b9b11b4b611f944d75cea39814fbb5bb394..0000000000000000000000000000000000000000 --- a/jonas_tests/junitime.sh +++ /dev/null @@ -1,134 +0,0 @@ -#!/bin/sh -# --------------------------------------------------------------------------- -# JOnAS: Java(TM) Open Application Server -# Copyright (C) 1999 Bull S.A. -# Contact: jonas-team@objectweb.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# --------------------------------------------------------------------------- -# $Id$ -# --------------------------------------------------------------------------- - -# -# Usage: junitime.sh dir-name suite-name perfs -# -# This script allows to run a sub-set of the conformance tests resumed in a perfs method: -# -# for the moment only some final suites(F_) are updated in session and entity directory -# -# call: junitime.sh session F_ClientViewNoTxSL perfs -# -# it logs the results in a file LOGPATH/SUITE_$$ -# -# use of awk to format output -# -# awkcat concatenes on the same line the informations of one test and removes all dots and Failures - -awkcat() -{ -awk '/^Running.*/ { - n=split($0,a,"\t") # to get the name - s = a[1] - } - -/^Time:/ {s= s"|"$0} - -/^OK/{ s= s"|"$0;printf("%s\n",s); s=""} - -/^FAILURES/{printf("%s|FAILURES\n",a[1]); s=""} - -/^--/{print $0} - -{next} -' -} -# to get unit times per function and keep them -awkunit() -{ -awk ' -BEGIN {printf ("function \t\t\t\t iterations \t unit time \n") - printf ("------------------------------------------------------------\n") - } -/^--.*/{ print $0;next} - { - k=split($0,a,"|") - n=split (a[1],b," ")#a[1]= running names - nom=b[n]#b[n]=function name - nomclass=b[n-1]#b[n-1]= class name - n=split(a[2],c," ")#time part - temps=c[n]#time value - split(a[3],d,"(")#OK (nb tests) - split(d[2],e," ") - nb=e[1] - if ( a[k]=="FAILURES") {temps =" NOK"} else {temps=temps/nb} - printf ("%s %s %s %s\n",nomclass,nom,nb,temps) - } -' -} - -TYPE=conf -PACK=org.objectweb.jonas.jtests.clients -DIR=suite -SUITE=P_suite -TEST= -CLASS= - -# You must put here the directory where the jonas tests are -# TEST_BASE=$PROJ_BASE/jonas_tests -TEST_BASE=$PROJ_BASE/tests - -TEST_CLASSES=$TEST_BASE/conformance/classes -LOGPATH=$TEST_BASE/conformance/log -PROPS= - - -if [ $# -gt 0 ] -then - DIR=$1 - SUITE=P_$DIR - shift -fi - -if [ $# -gt 0 ] -then - SUITE=$1 - TEST="-n perfs" - shift -fi - - -# update classpath for junit tests -# update the following lines depending on your own environment -for CLS in \ -$ANT_HOME/lib/junit.jar \ -$TEST_CLASSES -do - echo $CLASSPATH | grep $CLS >/dev/null || CLASSPATH=$CLASSPATH:$CLS -done - -# important to be seen in jclient script -export CLASSPATH - - -echo "Running junit tests for time : $TYPE $DIR/$SUITE $TEST" - - -#jclient $PROPS $PACK.$DIR.$SUITE $TEST - -jclient $PROPS $PACK.$DIR.$SUITE $TEST|awkcat|awkunit|tee $LOGPATH/${SUITE}_$$ - - diff --git a/jonas_tests/pom.xml b/jonas_tests/pom.xml deleted file mode 100644 index 8dbee2dde4e3a59c45ba0e0ee818298bfd501977..0000000000000000000000000000000000000000 --- a/jonas_tests/pom.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - 4.0.0 - - ow2 - org.ow2 - 1.3 - - - org.ow2.jonas - assembly-downloader-for-jonas-tests - 1.0.0-SNAPSHOT - - JOnAS assembly downloader for JOnAS tests - pom - - - - - org.codehaus.mojo - properties-maven-plugin - 1.0-alpha-2 - - - initialize - - read-project-properties - - - - ${basedir}/build.properties - - - - - - - maven-dependency-plugin - - - initialize - - copy - - - - - org.ow2.jonas.assemblies.profiles - jonas-full - ${jonas.version} - bin - zip - - - - - - - - - - diff --git a/jonas_tests/protocols/README b/jonas_tests/protocols/README deleted file mode 100644 index b79ea408f458a04732fe8137e3888a3259ba0abe..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/README +++ /dev/null @@ -1,60 +0,0 @@ -Overview --------------- - -This application aims at providing a protocols test. Initially it was written for assessing the CMI protocol performance and for doing a comparison between CMI and JRMP. It can be used for any others protocols measurements. - -The test's invocation chain is : - -EJB client -> SSB/MyService -> SSB/BackA1 ; SSB/BackA2 - -Call processing time is evaluated both at the client and ejb sides. The EJBs logic is quite light and contains : -- the code for accessing to the others EJBs in the case of MyService -- the code for performing the measurements for all - -The client implements a loop defined by the command parameters. - -Each iteration contain : -- an invocation which can be (according the cmd parameters) either a 'Lookup+Create+Remote' or 'Create+Remote' or 'Remote' or 'MetaData' -- a think time -- statistics update - -2 kinds of client are provided multi and multiserial. The first one performs the call with a simple string as parameter whereas the second one performs the call with a complex structure. The serialization cost is higher in the second case. - -Results --------------- -During the test, the client prints on the console some statistics in a CSV format. -A the end of the test, the client prints the average values. -Main indicators are : -- responseTime : global return time at the client side that embedds the invocation time plus the EJB logic processing time (inFacadeMethod). -- inFacadeMethod : EJB logic processing time - -Configuration --------------- -the client configuration must be updated in the clientConfig directory. The carol.properties file specifies the connection url to the JOnAS server. - -Command usage --------------- - -scripts/client.sh with - -- multi|multiserial : specifies which type of parameters are passed in to the call : either a simple String or a more complex structure -- threadsNb : threads number in the client program -- iterationsNb : loop iterations number -- thinkTime : pause at each iteration -- invocationType : specifies the type of invocation to do at each iteration. Possibles values are : - + LookupCreateRemote : - + CreateRemote - + Remote - + MetaData - -Ex : scripts/client.sh multi 5 100 0 Remote - -Reporting --------------- - -Some scripts are provided for generating reporting : -- suiteMulti.sh : launches a suite of tests with the multi client, with all kinds of invocation and different thread numbers. The results are stored in the sub directory 'report'. Ex : suite.sh 200 JR485Cmi multi -- suiteMultiSerial.sh : same as suiteMulti with multiserial client -- synth.sh : Provides some statistics by comparing different reports. Output format is CSV. Ex : synt.sh JR484CmiSingleton JR485CmiSingleton - - diff --git a/jonas_tests/protocols/build.properties b/jonas_tests/protocols/build.properties deleted file mode 100644 index 1eab60a9ef28adaff9fb46e42544f7430af5901e..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/build.properties +++ /dev/null @@ -1 +0,0 @@ -opt.javac.debug=true \ No newline at end of file diff --git a/jonas_tests/protocols/build.xml b/jonas_tests/protocols/build.xml deleted file mode 100644 index 4e66b497613a017b3b1d603f24c06ee0127fc062..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/build.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/protocols/clientconf/carol.properties b/jonas_tests/protocols/clientconf/carol.properties deleted file mode 100644 index 1f023e8ec60f16e8e10c353e4f230b5e7b32f2bd..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/clientconf/carol.properties +++ /dev/null @@ -1,140 +0,0 @@ -# Copyright (C) 2002-2005 ObjectWeb -# -# CAROL: Common Architecture for RMI ObjectWeb Layer -# -# This library is developed inside the ObjectWeb Consortium, -# http://www.objectweb.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA -# -# -------------------------------------------------------------------------- -# $Id$ -# -------------------------------------------------------------------------- - -# jonas rmi activation (iiop, irmi, jrmp, cmi) -carol.protocols=cmi - -# RMI IRMI URL -carol.irmi.url=rmi://localhost:1098 - -# RMI JRMP URL -carol.jrmp.url=rmi://localhost:2043 - -# RMI IIOP URL -carol.iiop.url=iiop://localhost:2001 - - -###################################################################### -# Configuration for CMI (clustering) -###################################################################### - -# java.naming.provider.url property -# For a server : the URL on which the registry will be started -# For clients : lists the registries available -#carol.cmi.url=cmi://129.183.148.75:2002,129.183.148.75:2202 -#carol.cmi.url=cmi://frecb000650:2002,frecb000650:2202 -carol.cmi.url=cmi://localhost:1951 - -# JGroups configuration file -carol.cmi.jgroups.conf=jgroups-cmi-tcp.xml -#carol.cmi.jgroups.conf=jgroups-cmi.xml - -# Multicast address used by the registries in the cluster -# !!! Deprecated - Not used if carol.cmi.jgroups.conf is set -#carol.cmi.multicast.address=224.0.0.35:35467 - -# IP address or network mask of the local network interface to use to send -# multicast messages -# Needed only when the server has several network interfaces and the multicast -# messages do not go through to interface you want them to use -# Works only on JDK 1.4 -# !!! Deprecated - Not used if carol.cmi.jgroups.conf is set -#carol.cmi.multicast.itf 192.168.25.0/24 - -# Groupname for Javagroups. No need to change if don't know. -carol.cmi.multicast.groupname=G1 - -# Factor used for this server in wheighted round robin algorithms -carol.cmi.rr.factor=100 - -# If enabled, cluster stubs will print messages on some error cases -carol.cmi.stub.debug=false - - -###################################################################### -# Advanced Configuration for IRMI -###################################################################### -# Exported objects will listen on this port for remote method -# invocations. -#A value of 0 will cause a random port to be selected. -# This is the default value. -# Warning : if the port is set (not 0) with the value 'n', be aware that -# the port 'n + 1' will be used by the JMX server. -# So, for the firewall configuration, you have to open the port numbers 'n' -# and 'n+1'. -carol.irmi.server.port=0 - -# Use only a single interface when creating the registry -# (specified in carol.irmi.url property) -# Use all interfaces available [default configuration = false] -carol.irmi.interfaces.bind.single=false - -###################################################################### -# Advanced Configuration for JRMP -###################################################################### -# If true, local call with jrmp are optimized. If you get "ClassCastException -# with 2 beans in different jars, you should set it at "false". -carol.jvm.rmi.local.call=false - -# If true a local Naming context is used (to be used only with a collocated registry) -carol.jvm.rmi.local.registry=false - -# The value of this port is used to set the port of the objects listener. -# This allow to use this port for a firewall configuration. -# If registry and server are on same host, the two ports to open are the following and the registry port. -# 0 means random port [default configuration = 0] -carol.jrmp.server.port=0 - -# Use only a single interface when creating the registry -# (specified in carol.jrmp.url property) -# Use all interfaces available [default configuration = false] -carol.jrmp.interfaces.bind.single=false - - -###################################################################### -# Advanced Configuration for IIOP -###################################################################### -# The value of this port is used to set the port of the objects listener. -# This allow to use this port for a firewall configuration. -# If registry and server are on same host, the two ports to open are the following and the registry port. -# 0 means random port [default configuration = 0] -carol.iiop.server.port=0 - -# The value of this port is used to set the SSL port of the objects listener. -# Note that this port musn't not be set to 0 as it is used for CsiV2. -# but this port is used only if SSL mode is enable. -# So by default, there is no listener on this port -# [default configuration = not used] -carol.iiop.server.sslport=2003 - -# Delegate used by JOnAS for rmi-iiop protocol -carol.iiop.PortableRemoteObjectClass=org.ow2.jonas.lib.naming.JacORBPRODelegate - - -###################################################################### -# Advanced JNDI Configuration -###################################################################### -carol.jndi.java.naming.factory.url.pkgs=org.ow2.jonas.lib.naming diff --git a/jonas_tests/protocols/clientconf/traceclient.properties b/jonas_tests/protocols/clientconf/traceclient.properties deleted file mode 100644 index e924727b757b5f11b4a8d09f9eca9adfa11e74fa..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/clientconf/traceclient.properties +++ /dev/null @@ -1,46 +0,0 @@ -# ----------------------------------------------------------------------- -# This is a default configuration file for monolog. -# -# Patterns for each handler may include these possible values : -# %h the thread name -# %O{1} the Class name (basename only) -# %M the method name -# %L the line number -# %d the date -# %l the level -# %m the message itself -# %n a new line -# -# Each logger inherits from its parent for properties not defined. -# The root logger is "root". It must always be defined. -# -# Each logger is associated with a level that can be one of : -# ERROR | WARN | INFO | DEBUG -# -# -> More info on http://www.objectweb.org/monolog/doc.html -# ----------------------------------------------------------------------- -# -# Define which wrapper to use (= javaLog) -# ----------------------------------------------------------------------- -# For Log4j you need to add log4j.jar -# log.config.classname org.objectweb.util.monolog.wrapper.log4j.MonologLoggerFactory -log.config.classname org.objectweb.util.monolog.wrapper.javaLog.LoggerFactory - -# ----------------------------------------------------------------------- -# tty : console handler -# ----------------------------------------------------------------------- -handler.tty.type Console -handler.tty.output System.out -#handler.tty.pattern %O{1}.%M : %m%n -handler.tty.pattern %d : %l : %h : %O{1}.%M : %m%n - -# ----------------------------------------------------------------------- -# logger definitions -# ----------------------------------------------------------------------- -logger.root.handler.0 tty - -logger.root.level ERROR -logger.org.ow2.jonas.client.level ERROR -#logger.org.ow2.carol.cmi.level DEBUG - - diff --git a/jonas_tests/protocols/modules/appli/META-INF/application.xml b/jonas_tests/protocols/modules/appli/META-INF/application.xml deleted file mode 100644 index ad19ade1fc51df9e19762f82ddb10198999fdd35..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/modules/appli/META-INF/application.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - Protocols test EAR file - - Protocols test EAR - - ejbs.jar - - - client.jar - - diff --git a/jonas_tests/protocols/modules/appli/build/build.xml b/jonas_tests/protocols/modules/appli/build/build.xml deleted file mode 100644 index 4daa31c12d9abe1c4f0fd24d9f0e0d398f0a259f..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/modules/appli/build/build.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - JONAS_ROOT=${jonas.root} - JONAS_BASE=${jonas.base} - - - - - - - - - diff --git a/jonas_tests/protocols/modules/client/META-INF/application-client.xml b/jonas_tests/protocols/modules/client/META-INF/application-client.xml deleted file mode 100644 index 86703e03d19fba853710d449372b429480784a06..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/modules/client/META-INF/application-client.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - Protocols test client - - - - - ejb/MyService - Session - org.ow2.jonas.protocols.test.ejbs.MyServiceHome - org.ow2.jonas.protocols.test.ejbs.MyService - ejbs.jar#MyService - - - - - diff --git a/jonas_tests/protocols/modules/client/META-INF/jonas-client.xml b/jonas_tests/protocols/modules/client/META-INF/jonas-client.xml deleted file mode 100644 index 11c7850aba15993df544794957725b60ef65995a..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/modules/client/META-INF/jonas-client.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - diff --git a/jonas_tests/protocols/modules/client/build/build.xml b/jonas_tests/protocols/modules/client/build/build.xml deleted file mode 100644 index 07c8a0dc63ac8500344ef2c0ecf58f66fb3d7f86..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/modules/client/build/build.xml +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/protocols/modules/client/resources/jaas.config b/jonas_tests/protocols/modules/client/resources/jaas.config deleted file mode 100644 index 37efc0391705d1fa2b954249682ab0156f00a631..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/modules/client/resources/jaas.config +++ /dev/null @@ -1,16 +0,0 @@ -JMSLoader { - // Login Module to use for AppliGeneve. - - //First, use a LoginModule for the authentication - // Use the resource memrlm_1 - org.ow2.jonas.security.auth.spi.JResourceLoginModule required - resourceName="memrlm_1" - serverName="mqjca" - ; - - // Use the login module to propagate security to the JOnAS server - org.ow2.jonas.security.auth.spi.ClientLoginModule required - globalCtx="true" - - ; -}; \ No newline at end of file diff --git a/jonas_tests/protocols/modules/client/src/org/ow2/jonas/protocols/test/client/AnyClient.java b/jonas_tests/protocols/modules/client/src/org/ow2/jonas/protocols/test/client/AnyClient.java deleted file mode 100644 index d94626dc2fd58794bfed72f65710dfef8a681e1a..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/modules/client/src/org/ow2/jonas/protocols/test/client/AnyClient.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Protocols test - * Copyright (C) 2007 Bull S.A.S. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.protocols.test.client; - -public class AnyClient { - - /** - * @param args - */ - public static void main(String[] args) { - - int client = 0; - if (args.length > 0) { - if ("-help".equalsIgnoreCase(args[0])) { - printUsage(); - System.exit(0); - } - // a bit of serialization - if ("multi".equalsIgnoreCase(args[0])) client = 0; - // a lot of serialization - if ("multiserial".equalsIgnoreCase(args[0])) client = 1; - if (args.length > 1 ) { - nargs = new String[args.length - 1]; - for (int i = 0; i < nargs.length; i++) nargs[i] = args[i + 1]; - } - } - - switch (client) { - case 0: - MyClient.main(nargs); - break; - case 1: - MyClient01.main(nargs); - break; - } - - } - - private static void printUsage() { - System.out.println ("OPTIONS:"); - System.out.println ("- multi/multiserial"); - System.out.println ("- multi clients iterations thinktime"); - System.out.println ("- multiserial clients iterations thinktime [ Remote | CreateRemote | LookupCreateRemote ]"); - } - - private static String[] nargs = new String[] { }; -} diff --git a/jonas_tests/protocols/modules/client/src/org/ow2/jonas/protocols/test/client/Measure.java b/jonas_tests/protocols/modules/client/src/org/ow2/jonas/protocols/test/client/Measure.java deleted file mode 100644 index e77ca5c74d49c1039e7324c693854f78d9d63f31..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/modules/client/src/org/ow2/jonas/protocols/test/client/Measure.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Protocols test - * Copyright (C) 2007 Bull S.A.S. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.protocols.test.client; - -import org.ow2.jonas.protocols.test.ejbs.Request; - -/** - * Measure class - * @author Francois Waeselynck - */ -public class Measure { - - - public Measure(String source, long timestamp, double responseTime, double inEJB) { - this.source = source; - this.timestamp = timestamp; - this.responseTime = responseTime; - this.inEJB = inEJB; - } - - public Measure(String source,long timestamp, double responseTime, Request request, double inEJB) { - this.source = source; - this.timestamp = timestamp; - this.responseTime = responseTime; - this.request = request; - this.inEJB = inEJB; - } - - public String getSource() { - return source; - } - public double getResponseTime() { - return responseTime; - } - - public void setResponseTime(long responseTime) { - this.responseTime = responseTime; - } - - public long getTimestamp() { - return timestamp; - } - - public void setTimestamp(long timestamp) { - this.timestamp = timestamp; - } - - public Request getRequest() { - return request; - } - - public void setRequest(Request request) { - this.request = request; - } - - public double getInEJB() { - return inEJB; - } - - String source = "nobody"; - long timestamp = 0; - double responseTime = 0; - Request request = null; - double inEJB = 0; -} diff --git a/jonas_tests/protocols/modules/client/src/org/ow2/jonas/protocols/test/client/MyClient.java b/jonas_tests/protocols/modules/client/src/org/ow2/jonas/protocols/test/client/MyClient.java deleted file mode 100644 index e445f8125b4f91b6a8fe0c205b2f7cb5a377e5e6..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/modules/client/src/org/ow2/jonas/protocols/test/client/MyClient.java +++ /dev/null @@ -1,422 +0,0 @@ -/** - * Protocols test - * Copyright (C) 2007 Bull S.A.S. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.protocols.test.client; - -import java.lang.reflect.InvocationTargetException; -import java.rmi.RemoteException; - -import javax.ejb.EJBMetaData; -import javax.naming.InitialContext; -import javax.naming.NamingException; -import javax.rmi.PortableRemoteObject; - -import org.ow2.jonas.protocols.test.ejbs.MyService; -import org.ow2.jonas.protocols.test.ejbs.MyServiceHome; - - -/** - * client program - * @author Francois Waeselynck - */ -public class MyClient implements Runnable { - - /* - * (non-Javadoc) - * - * @see java.lang.Runnable#run() - */ - public void run() { - status = RUNNING; - // System.err.println("Client " + clientName + " running."); - int count = 0; - long tb = 0; - long te = 0; - long deltaT = 0; - long result = 0; - - while ((count <= iteration) && !Thread.currentThread().isInterrupted()) { - - /* - * Compute statistics every PERIOD calls - * Stored in measures[] - */ - if ((count % PERIOD) == 0) { - if (tb != 0) { - te = System.currentTimeMillis(); - deltaT = te - tb; - chrono += deltaT; - - measures[count / PERIOD - 1] = new Measure(clientName, te, - 1.0 * deltaT / PERIOD, 1.0 * (result - lastResult) / PERIOD); - tb = te; - lastResult = result; - } else { - tb = System.currentTimeMillis(); - te = 0; - } - } - - /* - * Call facade EJB - */ - try { - result += callFacadeEJB(); - } catch (RemoteException e) { - // TODO Auto-generated catch block - e.printStackTrace(System.err); - } catch (NamingException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - count++; - - /* - * Sleep for a while - */ - if (thinktime > 0) { - try { - Thread.sleep(thinktime); - } catch (InterruptedException e) { - // nothing to do - } - } - - } - status = COMPLETE; - } - - /** - * invoke the EJB - * @return - * @throws NamingException - * @throws RemoteException - */ - private long callFacadeEJB() throws NamingException, RemoteException { - - long result = 0; - if (isLookupCreateRemote) { - InitialContext ctx = new InitialContext(); - optHome = (MyServiceHome) PortableRemoteObject - .narrow(ctx.lookup("java:comp/env/ejb/MyService"), - MyServiceHome.class); - optService = optHome.create(); - result = optService.call("LookupCreateRemote"); - } else if (isCreateRemote) { - optService = optHome.create(); - result = optService.optHomeCall("CreateRemote"); - } else if (isRemoteOnly) { - result = optService.optCall("Remote"); - } else if (isMetaData) { - optService = (MyService) callFacadeEJBMetaData(); - result = optService.callMetaData("MetaData"); - } - return result; - } - - /** - * Uses the getEJBMetaData() method for getting the home and remote interface - * and performs the invocation - * @return - * @throws NamingException - * @throws RemoteException - */ - private static Object callFacadeEJBMetaData() throws NamingException, RemoteException { - - Object im = null; - - InitialContext ctx = new InitialContext(); - optHome = (MyServiceHome) PortableRemoteObject - .narrow(ctx.lookup("java:comp/env/ejb/MyService"), - MyServiceHome.class); - - // Identify the home & remote class - EJBMetaData meta=null; - try { - meta = optHome.getEJBMetaData(); - } catch (RemoteException e) { - e.printStackTrace(System.err); - } - - // Narrow for the right type - Class homeClass = meta.getHomeInterfaceClass(); - Object imHome = PortableRemoteObject.narrow(optHome, homeClass); - - // Invoke the create method - try { - im = homeClass.getMethod("create", (java.lang.Class[]) null).invoke(imHome, (java.lang.Object[]) null); - } catch (IllegalArgumentException e) { - e.printStackTrace(System.err); - } catch (SecurityException e) { - e.printStackTrace(System.err); - } catch (IllegalAccessException e) { - e.printStackTrace(System.err); - } catch (InvocationTargetException e) { - e.printStackTrace(System.err); - } catch (NoSuchMethodException e) { - e.printStackTrace(System.err); - } - - // Try a narrow on the "remoteAble" class - Class remoteClass = meta.getRemoteInterfaceClass(); - String imAbleClassName = remoteClass.getName() + "Able"; - - ClassLoader cloader = Thread.currentThread().getContextClassLoader(); - try { - Class imAbleClass = cloader.loadClass(imAbleClassName); - if (!imAbleClass.isAssignableFrom(im.getClass())) { - im = PortableRemoteObject.narrow(im, imAbleClass); - - } - } catch (Exception ex) { - //ex.printStackTrace(System.err); - } - return im; - - } - - /** - * Thread initialization - * - */ - public void init() { - - if (isInitialized) - return; - - try { - InitialContext ctx = new InitialContext(); - optHome = (MyServiceHome) PortableRemoteObject - .narrow(ctx.lookup("java:comp/env/ejb/MyService"), - MyServiceHome.class); - optService = optHome.create(); - measures = new Measure[iteration / PERIOD]; - isInitialized = true; - } catch (NamingException e) { - // TODO Auto-generated catch block - e.printStackTrace(System.err); - } catch (RemoteException e) { - // TODO Auto-generated catch block - e.printStackTrace(System.err); - } - - } - - /** - * Constructor - * @param name - * @param iterations - * @param thinkTime - */ - public MyClient(String name, int iterations, long thinkTime) { - int q = iterations / PERIOD; - int r = iterations % PERIOD; - iteration = (q + (r != 0 ? 1 : 0)) * PERIOD; - this.thinktime = thinkTime; - this.clientName = name; - } - - public int getIterations() { - return iteration; - } - - public static int targetIterations(int iter) { - int q = iter / PERIOD; - int r = iter % PERIOD; - return (q + (r != 0 ? 1 : 0)) * PERIOD; - - } - - public static void process(int nbClients, int iterations, long thinkTime) { - - /* - * clients initialization - */ - MyClient[] clients = new MyClient[nbClients]; - boolean initOK = true; - for (int i = 1; i <= nbClients; i++) { - clients[i - 1] = new MyClient("cl-" + Integer.toString(i), - iterations, thinkTime); - clients[i - 1].init(); - initOK = initOK && clients[i - 1].isInitialized; - } - if (!initOK) - return; - - /* - * Run clients - */ - Thread[] th = new Thread[nbClients]; - for (int i = 0; i < nbClients; i++) { - th[i] = new Thread(clients[i]); - th[i].setDaemon(true); - th[i].start(); - try { - Thread.sleep(100); - } catch (InterruptedException e) { - } - } - - /* - * Wait for completion - */ - boolean goOn = true; - while (goOn) { - try { - Thread.sleep(1000); - } catch (InterruptedException e) { - } - boolean complete = true; - for (int i = 0; i < nbClients; i++) { - complete = complete && (clients[i].getStatus() == COMPLETE); - } - goOn = !complete; - } - - /* - * Print statistics - */ - System.out.println("time;source;responseTime;inFacadeMethod"); - double sumClient=0; - double sumEjb=0; - int measureNb = 0; - for (int i = 0; i < nbClients; i++) { - Measure[] dots = clients[i].getMeasures(); - - for (int j = 0; j < dots.length; j++) { - measureNb++; - sumClient+=dots[j].getResponseTime() - thinkTime; - sumEjb+=dots[j].getInEJB(); - - System.out.println(dots[j].getTimestamp() + ";" - + dots[j].getSource() + ";" - + (dots[j].getResponseTime() - thinkTime) + ";" - + dots[j].getInEJB()); - } - } - System.err.println("responseTime;inFacadeMethod"); - System.err.println(sumClient/measureNb + ";"+ sumEjb/measureNb); - - } - - /** - * @param args - */ - public static void main(String[] args) { - // TODO Auto-generated method stub - - int iterations = 128; - int nbCl = 1; - long thinktime = 0; - - if (args.length > 0) { - nbCl = Integer.parseInt(args[0]); - } - - if (args.length > 1) { - iterations = Integer.parseInt(args[1]); - } - - if (args.length > 2) { - thinktime = Long.parseLong(args[2]); - } - - - if (args.length > 3) { - if ("Remote".equalsIgnoreCase(args[3])) { - isRemoteOnly = true; - isCreateRemote = false; - isLookupCreateRemote = false; - } - if ("CreateRemote".equalsIgnoreCase(args[3])) { - isRemoteOnly = false; - isCreateRemote = true; - isLookupCreateRemote = false; - } - if ("LookupCreateRemote".equalsIgnoreCase(args[3])) { - isRemoteOnly = false; - isCreateRemote = false; - isLookupCreateRemote = true; - } - if ("MetaData".equalsIgnoreCase(args[3])) { - isRemoteOnly = false; - isCreateRemote = false; - isLookupCreateRemote = false; - isMetaData = true; - } - } - - System.err.println("clients: " + nbCl); - System.err.println("iterations: " + targetIterations(iterations)); - System.err.println("think: " + thinktime); - - process(nbCl, iterations, thinktime); - - } - - public Measure[] getMeasures() { - return measures; - } - - public int getStatus() { - return status; - } - - public static final int CREATED = 1; - - public static final int RUNNING = 2; - - public static final int COMPLETE = 4; - - private static MyServiceHome optHome = null; - - private static MyService optService = null; - - private boolean isInitialized = false; - - private long chrono = 0; - - private long lastResult = 0; - - private int iteration = 0; - - private long thinktime = 0; - - private String clientName = "client"; - - private Measure[] measures = null; - - private int status = CREATED; - - /* - * cardinality of sample set for statistics - */ - private static int PERIOD = 16; - - private static boolean isRemoteOnly = false; - - private static boolean isCreateRemote = false; - - private static boolean isLookupCreateRemote = true; - private static boolean isMetaData = false; -} diff --git a/jonas_tests/protocols/modules/client/src/org/ow2/jonas/protocols/test/client/MyClient01.java b/jonas_tests/protocols/modules/client/src/org/ow2/jonas/protocols/test/client/MyClient01.java deleted file mode 100644 index 9192926ab64bb9a2d91db01147db560e49c7c352..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/modules/client/src/org/ow2/jonas/protocols/test/client/MyClient01.java +++ /dev/null @@ -1,322 +0,0 @@ -/** - * Protocols test - * Copyright (C) 2007 Bull S.A.S. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.protocols.test.client; - -import java.rmi.RemoteException; - -import javax.naming.InitialContext; -import javax.naming.NamingException; -import javax.rmi.PortableRemoteObject; - -import org.ow2.jonas.protocols.test.ejbs.MyService; -import org.ow2.jonas.protocols.test.ejbs.MyServiceHome; -import org.ow2.jonas.protocols.test.ejbs.Request; - -/** - * @author waeselyf - * - */ -public class MyClient01 implements Runnable { - - public int getIterations() { - return iteration; - } - - public static int targetIterations(int iter) { - int q = iter / PERIOD; - int r = iter % PERIOD; - return (q + (r != 0 ? 1 : 0)) * PERIOD; - - } - - /* (non-Javadoc) - * @see java.lang.Runnable#run() - */ - public void run() { - status = RUNNING; - //System.err.println("Client " + clientName + " running."); - int count = 0; - long tb = 0; - long te = 0; - long deltaT = 0; - Request r = null; - int progressIncr = iteration/4; - int progressTreshold = progressIncr; - while ((count <= iteration) && !Thread.currentThread().isInterrupted()) { - - if ( (count % progressTreshold) == 0) { - progressTreshold += progressIncr; - //System.err.println(clientName + " - " + count + "/" + iteration); - } - /* - * Compute statistics every PERIOD calls - */ - if ( (count % PERIOD) == 0) { - if (tb != 0 ) { - te = System.currentTimeMillis(); - deltaT = te - tb; - chrono += deltaT; - r.addStamp(clientName, "client done"); - measures[count/PERIOD - 1] = new Measure(clientName,te,1.0*deltaT/PERIOD,r,0.0); - tb = te; - } else { - tb = System.currentTimeMillis(); - te = 0; - } - r = new Request("optCall"); - } - - /* - * Call facade EJB - */ - try { - r = callFacadeEJB(r); - } catch (RemoteException e) { - // TODO Auto-generated catch block - e.printStackTrace(System.err); - } catch (NamingException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - count++; - /* - * Sleep for a while - */ - if (thinktime > 0 ) { - try { - Thread.sleep(thinktime); - } catch (InterruptedException e) { - // nothing to do - } - } - - } - status = COMPLETE; - System.err.println(clientName + ";complete;" + (1.0 * chrono/(count-1) - thinktime)); - } - - private Request callFacadeEJB(Request r) throws NamingException, RemoteException { - - Request req = null; - if (isLookupCreateRemote) { - InitialContext ctx = new InitialContext(); - optHome = (MyServiceHome) PortableRemoteObject - .narrow(ctx.lookup("java:comp/env/ejb/MyService"), - MyServiceHome.class); - optService = optHome.create(); - req = optService.call(r); - } else if (isCreateRemote) { - optService = optHome.create(); - req = optService.optHomeCall(r); - } else if (isRemoteOnly) { - req = optService.optCall(r); - } - return req; - } - - public void init() { - - if (isInitialized) return; - - try { - InitialContext ctx = new InitialContext(); - optHome = (MyServiceHome) PortableRemoteObject.narrow( - ctx.lookup("java:comp/env/ejb/MyService"), - MyServiceHome.class); - optService = optHome.create(); - measures = new Measure[iteration / PERIOD]; - isInitialized = true; - } catch (NamingException e) { - // TODO Auto-generated catch block - e.printStackTrace(System.err); - } catch (RemoteException e) { - // TODO Auto-generated catch block - e.printStackTrace(System.err); - } - - } - - public MyClient01(String name, int iterations, long thinkTime) { - int q = iterations/PERIOD; - int r = iterations%PERIOD; - iteration = ( q + (r != 0 ? 1 : 0)) * PERIOD; - this.thinktime = thinkTime; - this.clientName = name; - } - - public static void process(int nbClients, int iterations, long thinkTime) { - - /* - * Initialise clients - */ - MyClient01[] clients = new MyClient01[nbClients]; - boolean initOK = true; - for (int i = 1; i <= nbClients ; i ++) { - clients[ i - 1 ] = new MyClient01("cl-" + Integer.toString(i), iterations,thinkTime); - clients[ i - 1 ].init(); - initOK = initOK && clients[ i - 1 ].isInitialized; - } - if (! initOK) return; - - /* - * Run clients - */ - Thread[] th = new Thread[nbClients]; - for (int i = 0 ; i < nbClients ; i++) { - th[i] = new Thread(clients[i]); - th[i].setDaemon(true); - th[i].start(); - try { - Thread.sleep(100); - } catch (InterruptedException e) { - } - } - - /* - * Wait for completion - */ - boolean goOn = true; - while (goOn) { - try { - Thread.sleep(1000); - } catch (InterruptedException e) { - } - boolean complete = true; - for (int i = 0; i < nbClients; i ++) { - complete = complete && (clients[i].getStatus() == COMPLETE); - } - goOn = !complete; - } - - /* - * Print statistics - */ - System.out.println("time;source;responseTime;inFacadeMethod"); - double sumClient=0; - double sumEjb=0; - int measureNb = 0; - for (int i = 0; i < nbClients; i++) { - Measure[] dots = clients[i].getMeasures(); - - for (int j = 0; j < dots.length; j++) { - measureNb++; - sumClient+=dots[j].getResponseTime() - thinkTime; - sumEjb+=dots[j].getInEJB(); - - System.out.println(dots[j].getTimestamp() + ";" - + dots[j].getSource() + ";" - + (dots[j].getResponseTime() - thinkTime) + ";" - + dots[j].getInEJB()); - } - } - System.err.println("responseTime;inFacadeMethod"); - System.err.println(sumClient/measureNb + ";"+ sumEjb/measureNb); - - } - - - /** - * @param args - */ - public static void main(String[] args) { - // TODO Auto-generated method stub - - int iterations = 128; - int nbCl = 1; - long thinktime = 0; - - if (args.length > 0) { - nbCl = Integer.parseInt(args[0]); - } - - if (args.length > 1) { - iterations = Integer.parseInt(args[1]); - } - - if (args.length > 2) { - thinktime = Long.parseLong(args[2]); - } - - - if (args.length > 3) { - if ("Remote".equalsIgnoreCase(args[3])) { - isRemoteOnly = true; - isCreateRemote = false; - isLookupCreateRemote = false; - } - if ("CreateRemote".equalsIgnoreCase(args[3])) { - isRemoteOnly = false; - isCreateRemote = true; - isLookupCreateRemote = false; - } - if ("LookupCreateRemote".equalsIgnoreCase(args[3])) { - isRemoteOnly = false; - isCreateRemote = false; - isLookupCreateRemote = true; - } - } - - System.err.println("clients: " + nbCl); - System.err.println("iterations: " + targetIterations(iterations)); - System.err.println("think: " + thinktime); - - process(nbCl, iterations, thinktime); - } - - public Measure[] getMeasures() { - return measures; - } - - public int getStatus() { - return status; - } - - public static final int CREATED = 1; - public static final int RUNNING = 2; - public static final int COMPLETE = 4; - - private static MyServiceHome optHome = null; - private static MyService optService = null; - - private boolean isInitialized = false; - private long chrono = 0; - private int iteration = 0; - private long thinktime = 0; - private String clientName = "client"; - private Measure[] measures = null; - private int status = CREATED; - - /* - * cardinality of sample set for statistics - */ - private static int PERIOD = 16; - - private static boolean isRemoteOnly = false; - - private static boolean isCreateRemote = false; - - private static boolean isLookupCreateRemote = true; -} - diff --git a/jonas_tests/protocols/modules/ejbs/META-INF/ejb-jar.xml b/jonas_tests/protocols/modules/ejbs/META-INF/ejb-jar.xml deleted file mode 100644 index a7475a49934f54c78e0c58f516c40be09f667bf3..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/modules/ejbs/META-INF/ejb-jar.xml +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - Deployment descriptor for the protocols test application - - Protocols test ejb-jar - - - - MyService - MyService - org.ow2.jonas.protocols.test.ejbs.MyServiceHome - org.ow2.jonas.protocols.test.ejbs.MyService - org.ow2.jonas.protocols.test.ejbs.MyServiceEJB - Stateless - Container - - params/myTag - java.lang.String - service - - - ejb/backA1 - Session - org.ow2.jonas.protocols.test.ejbs.BackAHome - org.ow2.jonas.protocols.test.ejbs.BackServiceA - BackA1 - - - ejb/backA2 - Session - org.ow2.jonas.protocols.test.ejbs.BackAHome - org.ow2.jonas.protocols.test.ejbs.BackServiceA - BackA2 - - - - - BackA1 - BackA1 - org.ow2.jonas.protocols.test.ejbs.BackAHome - org.ow2.jonas.protocols.test.ejbs.BackServiceA - org.ow2.jonas.protocols.test.ejbs.BackA1EJB - Stateless - Container - - params/myTag - java.lang.String - backA1 - - - params/wait - java.lang.Long - 20 - - - - - BackA2 - BackA2 - org.ow2.jonas.protocols.test.ejbs.BackAHome - org.ow2.jonas.protocols.test.ejbs.BackServiceA - org.ow2.jonas.protocols.test.ejbs.BackA2EJB - Stateless - Container - - params/myTag - java.lang.String - backA2 - - - params/wait - java.lang.Long - 20 - - - - - - - - - MyService - * - - Required - - - - BackA1 - * - - Required - - - - BackA2 - * - - Required - - - - diff --git a/jonas_tests/protocols/modules/ejbs/META-INF/jonas-ejb-jar.xml b/jonas_tests/protocols/modules/ejbs/META-INF/jonas-ejb-jar.xml deleted file mode 100644 index b2a0cb3501fe8bd3f22e7fb454fcf5db7a39d673..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/modules/ejbs/META-INF/jonas-ejb-jar.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - MyService - ejb/MyService - 10 - true - - - BackA1 - ejb/BackA1 - 10 - true - - - BackA2 - ejb/BackA2 - 10 - true - - - \ No newline at end of file diff --git a/jonas_tests/protocols/modules/ejbs/build/build.xml b/jonas_tests/protocols/modules/ejbs/build/build.xml deleted file mode 100644 index 3a0575a47e9d4c3a1e62db9c1aec5a95b00ab986..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/modules/ejbs/build/build.xml +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/protocols/modules/ejbs/src/org/ow2/jonas/protocols/test/ejbs/BackA1EJB.java b/jonas_tests/protocols/modules/ejbs/src/org/ow2/jonas/protocols/test/ejbs/BackA1EJB.java deleted file mode 100644 index 7bb8ca35b0860e1fa6d28a10ce2314fe06a9b9ed..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/modules/ejbs/src/org/ow2/jonas/protocols/test/ejbs/BackA1EJB.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Protocols test - * Copyright (C) 2007 Bull S.A.S. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.protocols.test.ejbs; - -/** - * @author Francois Waeselynck - */ -public class BackA1EJB extends BackAEJB { - - /** - * - */ - private static final long serialVersionUID = 0L; - -} diff --git a/jonas_tests/protocols/modules/ejbs/src/org/ow2/jonas/protocols/test/ejbs/BackA2EJB.java b/jonas_tests/protocols/modules/ejbs/src/org/ow2/jonas/protocols/test/ejbs/BackA2EJB.java deleted file mode 100644 index 2ca5f5d24a5dcdfcfa4ac6a98de4397367423eeb..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/modules/ejbs/src/org/ow2/jonas/protocols/test/ejbs/BackA2EJB.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Protocols test - * Copyright (C) 2007 Bull S.A.S. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.protocols.test.ejbs; - -/** - * @author Francois Waeselynck - */ -public class BackA2EJB extends BackAEJB { - - /** - * - */ - private static final long serialVersionUID = 0L; - -} diff --git a/jonas_tests/protocols/modules/ejbs/src/org/ow2/jonas/protocols/test/ejbs/BackAEJB.java b/jonas_tests/protocols/modules/ejbs/src/org/ow2/jonas/protocols/test/ejbs/BackAEJB.java deleted file mode 100644 index c4418252613c7b41ece1e1df60083fa108e8e3fe..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/modules/ejbs/src/org/ow2/jonas/protocols/test/ejbs/BackAEJB.java +++ /dev/null @@ -1,168 +0,0 @@ -/** - * Protocols test - * Copyright (C) 2007 Bull S.A.S. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.protocols.test.ejbs; - -import java.rmi.RemoteException; - -import javax.ejb.CreateException; -import javax.ejb.EJBException; -import javax.ejb.EJBHome; -import javax.ejb.EJBObject; -import javax.ejb.Handle; -import javax.ejb.RemoveException; -import javax.ejb.SessionBean; -import javax.ejb.SessionContext; -import javax.naming.InitialContext; -import javax.naming.NamingException; - - -/** - * @author Francois Waeselynck - */ -public class BackAEJB implements BackServiceA, SessionBean { - - /** - * - */ - private static final long serialVersionUID = 0L; - /* (non-Javadoc) - * @see org.ow2.jonas.protocols.test.ejbs.BackServiceA#call(java.lang.String) - */ - public long call(String comment) throws RemoteException { - if (delay != 0) { - try { - Thread.sleep(delay); - } catch (InterruptedException e) { - // nothing to do - } - } - return System.currentTimeMillis(); - } - - public Request call(Request r) throws RemoteException { - r.addStamp(id, "call IN"); - if (delay != 0) { - try { - Thread.sleep(delay); - } catch (InterruptedException e) { - // nothing to do - } - } - r.addStamp(id, "call OUT"); - return r; - } - - - /* (non-Javadoc) - * @see javax.ejb.EJBObject#getEJBHome() - */ - public EJBHome getEJBHome() throws RemoteException { - // TODO Auto-generated method stub - return null; - } - - /* (non-Javadoc) - * @see javax.ejb.EJBObject#getHandle() - */ - public Handle getHandle() throws RemoteException { - // TODO Auto-generated method stub - return null; - } - - /* (non-Javadoc) - * @see javax.ejb.EJBObject#getPrimaryKey() - */ - public Object getPrimaryKey() throws RemoteException { - // TODO Auto-generated method stub - return null; - } - - /* (non-Javadoc) - * @see javax.ejb.EJBObject#isIdentical(javax.ejb.EJBObject) - */ - public boolean isIdentical(EJBObject arg0) throws RemoteException { - // TODO Auto-generated method stub - return false; - } - - /* (non-Javadoc) - * @see javax.ejb.EJBObject#remove() - */ - public void remove() throws RemoteException, RemoveException { - // TODO Auto-generated method stub - - } - - /* (non-Javadoc) - * @see javax.ejb.SessionBean#ejbActivate() - */ - public void ejbActivate() throws EJBException, RemoteException { - // TODO Auto-generated method stub - - } - - /* (non-Javadoc) - * @see javax.ejb.SessionBean#ejbPassivate() - */ - public void ejbPassivate() throws EJBException, RemoteException { - // TODO Auto-generated method stub - - } - - /* (non-Javadoc) - * @see javax.ejb.SessionBean#ejbRemove() - */ - public void ejbRemove() throws EJBException, RemoteException { - // TODO Auto-generated method stub - - } - - /* (non-Javadoc) - * @see javax.ejb.SessionBean#setSessionContext(javax.ejb.SessionContext) - */ - public void setSessionContext(SessionContext sessionContext) throws EJBException, - RemoteException { - ejbContext = sessionContext; - } - - public void ejbCreate() throws CreateException { - try { - InitialContext ictx = new InitialContext(); - String tag = (String) ictx.lookup("java:comp/env/params/myTag"); - id = (tag == null ? id : tag); - Long delay = (Long) ictx.lookup("java:comp/env/params/wait"); - if (delay != null) { - this.delay = delay.longValue(); - } - } catch (NamingException e) { - e.printStackTrace(); - System.exit(2); - } - } - - - private SessionContext ejbContext = null; - private String id = "BackAService"; - private long delay = 0; -} diff --git a/jonas_tests/protocols/modules/ejbs/src/org/ow2/jonas/protocols/test/ejbs/BackAHome.java b/jonas_tests/protocols/modules/ejbs/src/org/ow2/jonas/protocols/test/ejbs/BackAHome.java deleted file mode 100644 index d7a8585d88644fcde07263572ea76947310aa2c6..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/modules/ejbs/src/org/ow2/jonas/protocols/test/ejbs/BackAHome.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Protocols test - * Copyright (C) 2007 Bull S.A.S. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.protocols.test.ejbs; - -import java.rmi.RemoteException; - -import javax.ejb.EJBHome; - -/** - * @author Francois Waeselynck - */ - -public interface BackAHome extends EJBHome { - - public BackServiceA create() throws RemoteException; - -} diff --git a/jonas_tests/protocols/modules/ejbs/src/org/ow2/jonas/protocols/test/ejbs/BackServiceA.java b/jonas_tests/protocols/modules/ejbs/src/org/ow2/jonas/protocols/test/ejbs/BackServiceA.java deleted file mode 100644 index 1ed631f366c8f18e0e2577e4cb89c2ebda154a34..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/modules/ejbs/src/org/ow2/jonas/protocols/test/ejbs/BackServiceA.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Protocols test - * Copyright (C) 2007 Bull S.A.S. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.protocols.test.ejbs; - -import java.rmi.RemoteException; - -import javax.ejb.EJBObject; - - -/** - * @author Francois Waeselynck - */ -public interface BackServiceA extends EJBObject { - - public long call(String comment) throws RemoteException; - - public Request call(Request r) throws RemoteException; - -} diff --git a/jonas_tests/protocols/modules/ejbs/src/org/ow2/jonas/protocols/test/ejbs/MyService.java b/jonas_tests/protocols/modules/ejbs/src/org/ow2/jonas/protocols/test/ejbs/MyService.java deleted file mode 100644 index 144f4957dbcae74a5fa7aca90b0c9cc437773ddc..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/modules/ejbs/src/org/ow2/jonas/protocols/test/ejbs/MyService.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Protocols test - * Copyright (C) 2007 Bull S.A.S. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.protocols.test.ejbs; - -import java.rmi.RemoteException; - -import javax.ejb.EJBObject; - - -/** - * @author Francois Waeselynck - */ -public interface MyService extends EJBObject { - - public long call(String s)throws RemoteException; - - public long callMetaData(String s) throws RemoteException; - - public Request call(Request r)throws RemoteException; - - public long optCall(String s)throws RemoteException; - - public Request optCall(Request r)throws RemoteException; - - public long optHomeCall(String s)throws RemoteException; - - public Request optHomeCall(Request r)throws RemoteException; -} diff --git a/jonas_tests/protocols/modules/ejbs/src/org/ow2/jonas/protocols/test/ejbs/MyServiceEJB.java b/jonas_tests/protocols/modules/ejbs/src/org/ow2/jonas/protocols/test/ejbs/MyServiceEJB.java deleted file mode 100644 index af0284498d539e35252e7fff4e6b822539f4558a..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/modules/ejbs/src/org/ow2/jonas/protocols/test/ejbs/MyServiceEJB.java +++ /dev/null @@ -1,449 +0,0 @@ -/** - * Protocols test - * Copyright (C) 2007 Bull S.A.S. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.ow2.jonas.protocols.test.ejbs; - -import java.lang.reflect.InvocationTargetException; -import java.rmi.RemoteException; - -import javax.ejb.CreateException; -import javax.ejb.EJBException; -import javax.ejb.EJBHome; -import javax.ejb.EJBMetaData; -import javax.ejb.EJBObject; -import javax.ejb.Handle; -import javax.ejb.RemoveException; -import javax.ejb.SessionBean; -import javax.ejb.SessionContext; -import javax.naming.InitialContext; -import javax.naming.NamingException; -import javax.rmi.PortableRemoteObject; - - -/** - * @author Francois Waeselynck - */ -public class MyServiceEJB implements SessionBean, MyService { - - /** - * - */ - private static final long serialVersionUID = 0L; - - - public void ejbActivate() throws EJBException, RemoteException { - // TODO Auto-generated method stub - - } - - public void ejbPassivate() throws EJBException, RemoteException { - // TODO Auto-generated method stub - - } - - public void ejbRemove() throws EJBException, RemoteException { - // TODO Auto-generated method stub - - } - - public void setSessionContext(SessionContext sessionContext) - throws EJBException, RemoteException { - ejbContext = sessionContext; - - } - - public long call(String s) throws RemoteException { - long tb = System.currentTimeMillis(); - /* - * Find the EJBs ten call them - */ - //long t = ba1.call(s); - - long t; - - try { - - InitialContext ctx = new InitialContext(); - - /* - * find BackA1 - */ - BackAHome aHome = (BackAHome) PortableRemoteObject.narrow( - ctx.lookup("java:comp/env/ejb/backA1"), - BackAHome.class); - BackServiceA ba = aHome.create(); - t = ba.call(s); - ba.remove(); - - /* - * find BackA2 - */ - aHome = (BackAHome) PortableRemoteObject.narrow( - ctx.lookup("java:comp/env/ejb/backA2"), - BackAHome.class); - ba = aHome.create(); - t = ba.call(s); - ba.remove(); - - } catch (NamingException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (RemoteException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (RemoveException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - return System.currentTimeMillis() - tb; - } - - private long callBackHome(BackAHome aHome, String s) throws RemoteException{ - Object im = null; - EJBMetaData meta=null; - - long t; - - try { - - try { - meta = aHome.getEJBMetaData(); - } catch (RemoteException e) { - e.printStackTrace(System.err); - } - - // Do a narrow on the right type - Class homeClass = meta.getHomeInterfaceClass(); - Object imHome = PortableRemoteObject.narrow(aHome, homeClass); - - // Invoke create method - try { - im = homeClass.getMethod("create", (java.lang.Class[]) null).invoke(imHome, (java.lang.Object[]) null); - } catch (IllegalArgumentException e) { - e.printStackTrace(System.err); - } catch (SecurityException e) { - e.printStackTrace(System.err); - } catch (IllegalAccessException e) { - e.printStackTrace(System.err); - } catch (InvocationTargetException e) { - e.printStackTrace(System.err); - } catch (NoSuchMethodException e) { - e.printStackTrace(System.err); - } - - // Try a narrow on the "remoteAble" method - Class remoteClass = meta.getRemoteInterfaceClass(); - String imAbleClassName = remoteClass.getName() + "Able"; - - ClassLoader cloader = Thread.currentThread().getContextClassLoader(); - try { - Class imAbleClass = cloader.loadClass(imAbleClassName); - if (!imAbleClass.isAssignableFrom(im.getClass())) { - im = PortableRemoteObject.narrow(im, imAbleClass); - - } - } catch (Exception ex) { - //ex.printStackTrace(System.err); - } - BackServiceA ba = (BackServiceA) im; - - t = ba.call(s); - ba.remove(); - return t; - - } catch (RemoteException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - return 0; - } catch (RemoveException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - return 0; - } - } - public long callMetaData(String s) throws RemoteException { - long tb = System.currentTimeMillis(); - /* - * Find the EJBs ten call them - */ - //long t = ba1.call(s); - - long t; - - try { - - InitialContext ctx = new InitialContext(); - - - /* - * find BackA1 - */ - BackAHome aHome = (BackAHome) PortableRemoteObject.narrow( - ctx.lookup("java:comp/env/ejb/backA1"), - BackAHome.class); - - t = callBackHome(aHome, s); - - - - /* - * find BackA2 - */ - aHome = (BackAHome) PortableRemoteObject.narrow( - ctx.lookup("java:comp/env/ejb/backA2"), - BackAHome.class); - - t = callBackHome(aHome, s); - - - - } catch (NamingException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (RemoteException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return System.currentTimeMillis() - tb; - } - - public long optCall(String s) throws RemoteException { - long tb = System.currentTimeMillis(); - /* - * Use the cached ba1 and ba2 EJBs - */ - long t = ba1.call(s); - t = ba2.call(s); - return System.currentTimeMillis() - tb; - } - - - public long optHomeCall(String s) throws RemoteException { - long tb = System.currentTimeMillis(); - long t = 0; - try { - - BackServiceA ba = ha1.create(); - t = ba.call(s); - ba.remove(); - - /* - * find BackA2 - */ - ba = ha2.create(); - t = ba.call(s); - ba.remove(); - - } catch (RemoteException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (RemoveException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - return System.currentTimeMillis() - tb; - } - - public EJBHome getEJBHome() throws RemoteException { - // TODO Auto-generated method stub - return null; - } - - public Handle getHandle() throws RemoteException { - // TODO Auto-generated method stub - return null; - } - - public Object getPrimaryKey() throws RemoteException { - // TODO Auto-generated method stub - return null; - } - - public boolean isIdentical(EJBObject arg0) throws RemoteException { - // TODO Auto-generated method stub - return false; - } - - public void remove() throws RemoteException, RemoveException { - // TODO Auto-generated method stub - - } - - public void ejbCreate() throws CreateException { - try { - - InitialContext ctx = new InitialContext(); - String tag = (String) ctx.lookup("java:comp/env/params/myTag"); - id = (tag == null ? id : tag); - } catch (NamingException e) { - e.printStackTrace(); - } - initForOptCall(); - } - - public void initForOptCall() { - try { - ictx = new InitialContext(); - - /* - * find BackA1 - */ - ha1 = (BackAHome) PortableRemoteObject.narrow( - ictx.lookup("java:comp/env/ejb/backA1"), - BackAHome.class); - ba1 = ha1.create(); - - /* - * find BackA2 - */ - ha2 = (BackAHome) PortableRemoteObject.narrow( - ictx.lookup("java:comp/env/ejb/backA2"), - BackAHome.class); - ba2 = ha2.create(); - - } catch (NamingException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (RemoteException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } finally { - - } - System.out.println("FWA - ba1 : " + ba1 + " ; ba2 : " + ba2); - } - - private SessionContext ejbContext = null; - private String id = "MyService"; - - /* - * Fields for - */ - private InitialContext ictx = null; - private BackAHome ha1 = null; - private BackAHome ha2 = null; - private BackServiceA ba1 = null; - private BackServiceA ba2 = null; - - - public Request call(Request r) throws RemoteException { - /* - * Find the EJBs ten call them - */ - r.addStamp(id, "IN call"); - try { - - InitialContext ctx = new InitialContext(); - - /* - * find BackA1 - */ - BackAHome aHome = (BackAHome) PortableRemoteObject.narrow( - ctx.lookup("java:comp/env/ejb/backA1"), - BackAHome.class); - r.addStamp(id, "A1 LOOKUP"); - BackServiceA ba = aHome.create(); - r.addStamp(id, "A1 CREATE"); - r = ba.call(r); - r.addStamp(id, "A1 call"); - ba.remove(); - r.addStamp(id, "A1 REMOVE"); - - /* - * find BackA2 - */ - aHome = (BackAHome) PortableRemoteObject.narrow( - ctx.lookup("java:comp/env/ejb/backA2"), - BackAHome.class); - r.addStamp(id, "A2 LOOKUP"); - ba = aHome.create(); - r.addStamp(id, "A2 CREATE"); - r = ba.call(r); - r.addStamp(id, "A2 call"); - ba.remove(); - r.addStamp(id, "A2 REMOVE"); - - } catch (NamingException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (RemoteException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (RemoveException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - r.addStamp(id, "OUT call"); - return r; - } - - - public Request optCall(Request r) throws RemoteException { - - /* - * Use the cached ba1 and ba2 EJBs - */ - r.addStamp(id, "IN optCall"); - r = ba1.call(r); - r.addStamp(id, "A1 < x < A2"); - r = ba2.call(r); - r.addStamp(id, "OUT optCall"); - return r; - } - - public Request optHomeCall(Request r) throws RemoteException { - /* - * Find the EJBs ten call them - */ - r.addStamp(id, "IN optHomeCall"); - try { - - BackServiceA ba = ha1.create(); - r.addStamp(id, "A1 CREATE"); - r = ba.call(r); - r.addStamp(id, "A1 call"); - ba.remove(); - r.addStamp(id, "A1 REMOVE"); - - /* - * find BackA2 - */ - ba = ha2.create(); - r.addStamp(id, "A2 CREATE"); - r = ba.call(r); - r.addStamp(id, "A2 call"); - ba.remove(); - r.addStamp(id, "A2 REMOVE"); - - } catch (RemoteException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (RemoveException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - r.addStamp(id, "OUT optHomeCall"); - return r; - } -} diff --git a/jonas_tests/protocols/modules/ejbs/src/org/ow2/jonas/protocols/test/ejbs/MyServiceHome.java b/jonas_tests/protocols/modules/ejbs/src/org/ow2/jonas/protocols/test/ejbs/MyServiceHome.java deleted file mode 100644 index cf076a2075b80c60948cb06dce94834fb1a89961..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/modules/ejbs/src/org/ow2/jonas/protocols/test/ejbs/MyServiceHome.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Protocols test - * Copyright (C) 2007 Bull S.A.S. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.protocols.test.ejbs; - -import java.rmi.RemoteException; - -import javax.ejb.EJBHome; - -/** - * @author Francois Waeselynck - */ -public interface MyServiceHome extends EJBHome { - - public MyService create() throws RemoteException; -} diff --git a/jonas_tests/protocols/modules/ejbs/src/org/ow2/jonas/protocols/test/ejbs/Request.java b/jonas_tests/protocols/modules/ejbs/src/org/ow2/jonas/protocols/test/ejbs/Request.java deleted file mode 100644 index fc3b649e82033b7bd7004b90fc57c14943a96164..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/modules/ejbs/src/org/ow2/jonas/protocols/test/ejbs/Request.java +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Protocols test - * Copyright (C) 2007 Bull S.A.S. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.ow2.jonas.protocols.test.ejbs; - -import java.io.Serializable; -import java.util.Date; -import java.util.HashMap; - -/** - * @author Francois Waeselynck - */ -public class Request implements Serializable { - - /** - * - */ - private static final long serialVersionUID = 1L; - - public Request(String root) { - id = root - + "-" + Long.toString(System.currentTimeMillis()) - + "-" + Thread.currentThread().getName(); - } - - public String getId() { - return id; - } - - public void addStamp(String name,String progress) { - String s = name + ":" + progress; - map.put(s, s + "-" + new Date().toString()); - } - - public String getStamp(String stamp) { - return (String) map.get(stamp); - } - - public HashMap getStamps() { - return (HashMap) map.clone(); - } - - public String toString() { - StringBuffer buf = new StringBuffer(1024); - buf.append("\n"); - buf.append(id); - buf.append("\n"); - buf.append("\n\n"); - buf.append(map.toString()); - buf.append("\n\n"); - return buf.toString(); - - } - - - private String id = null; - private HashMap map = new HashMap(); -} diff --git a/jonas_tests/protocols/scripts/client.cmd b/jonas_tests/protocols/scripts/client.cmd deleted file mode 100644 index b3cec901a948f44871907e910d1456dbe3ce2c28..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/scripts/client.cmd +++ /dev/null @@ -1,30 +0,0 @@ -REM --------------------------------------------------------------------------- -REM JOnAS: Java(TM) Open Application Server -REM Copyright (C) 2006 Bull S.A.S. -REM Contact: jonas-team@objectweb.org -REM -REM This library is free software; you can redistribute it and/or -REM modify it under the terms of the GNU Lesser General Public -REM License as published by the Free Software Foundation; either -REM version 2.1 of the License, or (at option) any later version. -REM -REM This library is distributed in the hope that it will be useful, -REM but WITHOUT ANY WARRANTY; without even the implied warranty of -REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -REM Lesser General Public License for more details. -REM -REM You should have received a copy of the GNU Lesser General Public -REM License along with this library; if not, write to the Free Software -REM Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -REM -REM --------------------------------------------------------------------------- -REM $Id$ -REM --------------------------------------------------------------------------- - -REM Launches a simple test -REM Usage : client.sh multi|multiserial 0 with -REM clientnb : the threads nb -REM iterationNb : the loop nb -REM type : the sort of test among Remote CreateRemote LookupCreateRemote MetaData -REM ex : client.cmd 10 10000 0 LookupCreateRemote -java %JAVA_OPTS% -jar %JONAS_ROOT%\lib\client.jar -carolFile client\carol.properties -traceFile client\traceclient.properties %JONAS_BASE%\apps\autoload\applicall.ear %* \ No newline at end of file diff --git a/jonas_tests/protocols/scripts/client.sh b/jonas_tests/protocols/scripts/client.sh deleted file mode 100755 index edb5201d5d4aa7de681c31bac99e13d5394d0641..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/scripts/client.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# --------------------------------------------------------------------------- -# Protocols test -# Copyright (C) 2007 Bull S.A.S. -# Contact: jonas-team@objectweb.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -# -# --------------------------------------------------------------------------- -# $Id: $ -# --------------------------------------------------------------------------- - -# Launches a simple test -# Usage : client.sh multi 0 with -# clientnb : the threads nb -# iterationNb : the loop nb -# type : the sort of test among Remote CreateRemote LookupCreateRemote MetaData -# Ex : client.sh multi 5 200 0 Remote - -java -version -export JAVA_OPTS="-Dmonolog.wrappers=org.ow2.carol.cmi.configuration.TraceCmi $JAVA_OPTS" -export APPLI=$JONAS_BASE/apps/autoload/applicall.ear -java $JAVA_OPTS -jar $JONAS_ROOT/lib/client.jar -carolFile ./clientconf/carol.properties -traceFile ./clientconf/traceclient.properties $APPLI $* diff --git a/jonas_tests/protocols/scripts/suiteMulti.sh b/jonas_tests/protocols/scripts/suiteMulti.sh deleted file mode 100755 index 20c776875e085205cf0751bd944599a2925de025..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/scripts/suiteMulti.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -# --------------------------------------------------------------------------- -# Protocols test -# Copyright (C) 2007 Bull S.A.S. -# Contact: jonas-team@objectweb.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -# -# --------------------------------------------------------------------------- -# $Id: $ -# --------------------------------------------------------------------------- - -iterationNb=$1 -prefix=$2 - -if [[ "${iterationNb}" = "" || "${prefix}" = "" ]] -then - echo "Usage : $0 "; - echo "Example : $0 200 JR484Cmi"; -fi - -# Launches a tests suite - -rootdir=`dirname $0` - -mkdir report 2>/dev/null - -for j in Remote CreateRemote LookupCreateRemote MetaData -do -type=$j -for i in 1 5 10 20 -do - - file="report/${prefix}_${type}_${i}_${iterationNb}_0.report" - cmd="${rootdir}/client.sh multi ${i} ${iterationNb} 0 ${type} 2>${file}" - echo "$cmd"; - $cmd 1>/dev/null 2>${file} - -done -done diff --git a/jonas_tests/protocols/scripts/suiteMultiSerial.sh b/jonas_tests/protocols/scripts/suiteMultiSerial.sh deleted file mode 100755 index dc85b8e6c09c8c4a6c484413268ba8d54e1cd97a..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/scripts/suiteMultiSerial.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -# --------------------------------------------------------------------------- -# Protocols test -# Copyright (C) 2007 Bull S.A.S. -# Contact: jonas-team@objectweb.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -# -# --------------------------------------------------------------------------- -# $Id: $ -# --------------------------------------------------------------------------- - -iterationNb=$1 -prefix=$2 - -if [[ "${iterationNb}" = "" || "${prefix}" = "" ]] -then - echo "Usage : $0 "; - echo "Example : $0 200 JR484Cmi"; -fi - -# Launches a tests suite - -rootdir=`dirname $0` - -mkdir report 2>/dev/null - -for j in Remote CreateRemote LookupCreateRemote -do -type=$j -for i in 1 5 10 20 -do - - file="report/${prefix}_${type}_${i}_${iterationNb}_0.report" - cmd="${rootdir}/client.sh multiserial ${i} ${iterationNb} 0 ${type} 2>${file}" - echo "$cmd"; - $cmd 1>/dev/null 2>${file} - -done -done diff --git a/jonas_tests/protocols/scripts/synt.sh b/jonas_tests/protocols/scripts/synt.sh deleted file mode 100755 index 0e0e0744eea572b18a07014598b5bda8efd5dc13..0000000000000000000000000000000000000000 --- a/jonas_tests/protocols/scripts/synt.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh -# --------------------------------------------------------------------------- -# Protocols test -# Copyright (C) 2007 Bull S.A.S. -# Contact: jonas-team@objectweb.org -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -# -# --------------------------------------------------------------------------- -# $Id: $ -# --------------------------------------------------------------------------- - - -# Generates a report that gives a global comparison. Output format is CSV -# Usage : synt.sh JR484CmiSingleton JR485CmiSingleton JR485Cmi JR485JrmpSingleton JR485CmiSingletonSerial JR485JrmpSingletonSerial - -patternList=$* - -echo "testType;cltNb;iter;testName;responseTime;inFacadeMethod" -for i in LookupCreateRemote CreateRemote Remote MetaData -do - for j in 1 5 10 20 - do - - for k in 20 -# for k in 200 500 - do - #echo . - #echo "TEST=${i} CLT=${j} ITER=${k}" - #echo "----------------------------------" - - for l in ${patternList} - do - reportname="${l}_${i}_${j}_${k}_0.report" - res=`tail -1 report/${reportname} 2>/dev/null` - if (( $? == 0 )) - then - echo "${i};${j};${k};${l};${res}" - fi - done - done - done -done diff --git a/jonas_tests/samplehttp/README b/jonas_tests/samplehttp/README deleted file mode 100644 index b556b2e9ec685732f232ffd9dde34576d7c2a1ca..0000000000000000000000000000000000000000 --- a/jonas_tests/samplehttp/README +++ /dev/null @@ -1,37 +0,0 @@ -This test may be used to do load tests for servlet+ejb -Structure: - - beans: sample bean session stateless with method void process(long timetowait) - - client: client code - - servlet: servlet SampleServlet code - - - -For building and packaging the application --> ant install - -With the default configuration of jonas.properties JOnAS and Tomcat are running in the same JVM - -Running the server -jonas start -jonas admin -a samplehttp.ear - -In order to test the web application is well deployed after having running JOnAS: -http://:/samplehttp/SampleServlet - - -Running a scenario: -Usage: jclient -cp /samplehttp/classes samplehttp.client.SampleClient -with: - -h hostname - -p port number - -n number of client threads - -t treatment time in servlet or in EJB's method - -w time to wait in thread client between 2 requests - -l nb loops in each thread client - -ejb call ejb in servlet (mode pure servlet if not set) - -ejbl call ejb in servlet via local interface. -Examples: -jclient -cp $PROJ_BASE/objectweb/jonas_tests/samplehttp/classes samplehttp.client.SampleClient -h localhost -p 19510 -n 50 -t 10 -l 100 -w 1000 -ejb - -jclient -cp $PROJ_BASE/objectweb/jonas_tests/samplehttp/classes samplehttp.client.SampleClient -h localhost -p 19510 -n 5 -t 10 -l 10 -w 1000 -ejbc - - diff --git a/jonas_tests/samplehttp/beans/Sess.java b/jonas_tests/samplehttp/beans/Sess.java deleted file mode 100644 index 3faa3ad0e89edc80ee79c0ca45b4b932ac2c35e7..0000000000000000000000000000000000000000 --- a/jonas_tests/samplehttp/beans/Sess.java +++ /dev/null @@ -1,14 +0,0 @@ -// Sess.java - -package samplehttp.beans; - -import java.rmi.RemoteException; -import javax.ejb.EJBObject; - -/** - * Sess remote interface - */ -public interface Sess extends EJBObject { - public void process(long time) throws RemoteException; - public void processwithconn(long time) throws RemoteException; -} diff --git a/jonas_tests/samplehttp/beans/SessClient.java b/jonas_tests/samplehttp/beans/SessClient.java deleted file mode 100644 index ca775620e166cba5fe154edce3afcf866b2d3cce..0000000000000000000000000000000000000000 --- a/jonas_tests/samplehttp/beans/SessClient.java +++ /dev/null @@ -1,42 +0,0 @@ -// SessClient.java -// mini Client for accessing bean Sess - -package samplehttp.beans; - -import java.rmi.RemoteException; -import java.util.Collection; -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; -import javax.rmi.PortableRemoteObject; - -/** - * - */ -public class SessClient { - - static Context ctx = null; - static SessHome home = null; - - public static void main(String[] arg) { - - // Get InitialContext - try { - ctx = new InitialContext(); - } catch (NamingException e) { - e.printStackTrace(); - System.exit(2); - } - - // Lookup bean home - String bName = "sessSessSLRHome"; - try { - home = (SessHome) PortableRemoteObject.narrow(ctx.lookup(bName), SessHome.class); - } catch(Exception e) { - e.printStackTrace(); - System.exit(2); - } - - // ... - } -} diff --git a/jonas_tests/samplehttp/beans/SessHome.java b/jonas_tests/samplehttp/beans/SessHome.java deleted file mode 100644 index 0302b80a8b480b83b47d3fe830b73237b0a599ae..0000000000000000000000000000000000000000 --- a/jonas_tests/samplehttp/beans/SessHome.java +++ /dev/null @@ -1,16 +0,0 @@ -// SessHome.java - -package samplehttp.beans; - -import java.rmi.RemoteException; -import java.util.Collection; -import javax.ejb.CreateException; -import javax.ejb.EJBHome; -import javax.ejb.FinderException; - -/** - * Home interface for the bean Sess - */ -public interface SessHome extends EJBHome { - Sess create() throws CreateException, RemoteException; -} diff --git a/jonas_tests/samplehttp/beans/SessLocal.java b/jonas_tests/samplehttp/beans/SessLocal.java deleted file mode 100644 index a2b55839afb2715523ecc2c263d8a38f76270eb9..0000000000000000000000000000000000000000 --- a/jonas_tests/samplehttp/beans/SessLocal.java +++ /dev/null @@ -1,13 +0,0 @@ -// SessLocal.java - -package samplehttp.beans; - - -import javax.ejb.EJBLocalObject; - -/** - * Sess remote interface - */ -public interface SessLocal extends EJBLocalObject { - public void process(long time); -} diff --git a/jonas_tests/samplehttp/beans/SessLocalHome.java b/jonas_tests/samplehttp/beans/SessLocalHome.java deleted file mode 100644 index eb62e727ca48820ed0f4626ff05478d65d6fb3f3..0000000000000000000000000000000000000000 --- a/jonas_tests/samplehttp/beans/SessLocalHome.java +++ /dev/null @@ -1,15 +0,0 @@ -// SessHome.java - -package samplehttp.beans; - - -import javax.ejb.CreateException; -import javax.ejb.EJBLocalHome; - - -/** - * Home interface for the bean Sess - */ -public interface SessLocalHome extends EJBLocalHome { - SessLocal create() throws CreateException; -} diff --git a/jonas_tests/samplehttp/beans/SessSLR.java b/jonas_tests/samplehttp/beans/SessSLR.java deleted file mode 100644 index 8401b4b93486936ff297f0bebcb8efbbcb0bdd7a..0000000000000000000000000000000000000000 --- a/jonas_tests/samplehttp/beans/SessSLR.java +++ /dev/null @@ -1,151 +0,0 @@ -// SessSLR.java -// Stateless Session bean - -package samplehttp.beans; - -import java.rmi.RemoteException; -import java.sql.Connection; -import java.sql.SQLException; -import java.sql.Statement; -import javax.ejb.CreateException; -import javax.ejb.EJBException; -import javax.ejb.RemoveException; -import javax.ejb.EJBObject; -import javax.ejb.SessionBean; -import javax.ejb.SessionContext; -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; -import javax.sql.DataSource; - -import org.objectweb.jonas.common.Log; -import org.objectweb.util.monolog.api.Logger; -import org.objectweb.util.monolog.api.BasicLevel; - - -/** - * - */ -public class SessSLR implements SessionBean { - - static private Logger logger = null; - SessionContext ejbContext; - private DataSource dataSource = null; - - - - - private Connection getConnection() throws EJBException, SQLException { - if (dataSource == null) { - // Finds DataSource from JNDI - Context initialContext = null; - try { - initialContext = new InitialContext(); - dataSource = (DataSource)initialContext.lookup("java:comp/env/jdbc/SessDs"); - } catch (Exception e) { - System.out.println("Cannot lookup dataSource"+e); - throw new javax.ejb.EJBException("Cannot lookup dataSource "); - } - } - return dataSource.getConnection(); - } - - - // ------------------------------------------------------------------ - // SessionBean implementation - // ------------------------------------------------------------------ - - /** - * Set the associated session context. The container calls this method - * after the instance creation. - * The enterprise Bean instance should store the reference to the context - * object in an instance variable. - * This method is called with no transaction context. - * - * @param sessionContext A SessionContext interface for the instance. - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - */ - public void setSessionContext(SessionContext ctx) { - if (logger == null) { - logger = Log.getLogger("org.objectweb.jonas_tests"); - } - logger.log(BasicLevel.DEBUG, ""); - ejbContext = ctx; - } - - /** - * A container invokes this method before it ends the life of the session object. - * This happens as a result of a client's invoking a remove operation, or when a - * container decides to terminate the session object after a timeout. - * This method is called with no transaction context. - * - * @throws EJBException Thrown by the method to indicate a failure caused by - * a system-level error. - */ - public void ejbRemove() { - logger.log(BasicLevel.DEBUG, ""); - } - - /** - * The Session bean must define 1 or more ejbCreate methods. - * - * @throws CreateException Failure to create a session EJB object. - */ - public void ejbCreate() throws CreateException { - logger.log(BasicLevel.DEBUG, ""); - } - - - /** - * A container invokes this method on an instance before the instance - * becomes disassociated with a specific EJB object. - */ - public void ejbPassivate() { - logger.log(BasicLevel.DEBUG, ""); - } - - /** - * A container invokes this method when the instance is taken out of - * the pool of available instances to become associated with a specific - * EJB object. - */ - public void ejbActivate() { - logger.log(BasicLevel.DEBUG, ""); - } - - // ------------------------------------------------------------------ - // Sess implementation - // ------------------------------------------------------------------ - - /** - * process - * @ param long treatment time - */ - public void process(long time) { - logger.log(BasicLevel.DEBUG, "treatment time = "+time); - try { - Thread.currentThread().sleep(time); - } catch (InterruptedException e) { - System.out.println("sleep:"+e); - } - } - - /** - * process - * @ param long treatment time - */ - public void processwithconn(long time) { - logger.log(BasicLevel.DEBUG, "treatment time = "+time); - try { - Connection conn = getConnection(); - Thread.currentThread().sleep(time); - conn.close(); - } catch (InterruptedException e) { - System.out.println("sleep:"+e); - } catch (Exception e) { - System.out.println("exception caught: "+e); - } - } - -} diff --git a/jonas_tests/samplehttp/beans/jonas-sess.xml b/jonas_tests/samplehttp/beans/jonas-sess.xml deleted file mode 100644 index 58bb1196d2c4200f7d243cd864894313ce4b8804..0000000000000000000000000000000000000000 --- a/jonas_tests/samplehttp/beans/jonas-sess.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - SessSLR - SessHome - - jdbc/SessDs - jdbc_1 - - 20 - 10 - - - diff --git a/jonas_tests/samplehttp/beans/sess.xml b/jonas_tests/samplehttp/beans/sess.xml deleted file mode 100644 index 599e6026e4fc45955e1c19020885c8a40aa576f7..0000000000000000000000000000000000000000 --- a/jonas_tests/samplehttp/beans/sess.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - Describe here the content of this file - sess - - - - Describe here the session bean Sess - sess/SessSLR - SessSLR - samplehttp.beans.SessHome - samplehttp.beans.Sess - samplehttp.beans.SessLocalHome - samplehttp.beans.SessLocal - samplehttp.beans.SessSLR - Stateless - Container - - jdbc/SessDs - javax.sql.DataSource - Container - - - - - - - - - SessSLR - * - - Supports - - - - - diff --git a/jonas_tests/samplehttp/build.xml b/jonas_tests/samplehttp/build.xml deleted file mode 100644 index a264deb4d172524138752c0039728c07d51158db..0000000000000000000000000000000000000000 --- a/jonas_tests/samplehttp/build.xml +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/samplehttp/client/SampleClient.java b/jonas_tests/samplehttp/client/SampleClient.java deleted file mode 100644 index 3ff2bc99386f713c84bd0a3f5d222c7fcf85e3fe..0000000000000000000000000000000000000000 --- a/jonas_tests/samplehttp/client/SampleClient.java +++ /dev/null @@ -1,162 +0,0 @@ - -package samplehttp.client; - -//Import statements -import java.io.*; - -import java.net.*; - - - - - -class SenderThread extends Thread { - - private String m_host; - private int m_port; - private String m_treattime; - private int m_loops; - private long m_wait; - private long m_time; - private int m_fejb; - - public SenderThread(String host, int port, String treattime, String wait, int loops, int fejb){ - m_host = host; - m_port = port; - m_treattime = treattime; - Long w = new Long(wait.trim()); - m_wait = w.longValue(); - m_loops = loops; - m_fejb = fejb; - } - - public void run() { - System.out.println("Running a SenderThread..."); - long d_begin = System.currentTimeMillis(); - Sender s = new Sender(m_host,"samplehttp/SampleServlet", m_port, m_treattime, m_fejb ); - try{ - for (int l = 0; l < m_loops; l++) { - s.execute(); - Thread.currentThread().sleep(m_wait); - } - }catch(Exception e) { - System.out.println(">>> SenderThread. Exception caught = "+e); - } - long d_end = System.currentTimeMillis(); - m_time = d_end - d_begin; - } - - public long getTime(){ - return m_time; - } -} - -public class SampleClient { - - - private static final int m_MAXTHREADS = 500; - private static int poolsize = 1; - private static int port; - private static int loops = 1; - private static String wait = "1000"; // Wait between 2 requests default = 1second - private static String treattime = "10"; // Treatment time in servlet default = 10 ms - private static String host; - private static int flgejb = 0; - - public static void main(String args[]) { - - // Get command args - for (int argn = 0; argn < args.length; argn++) { - String s_arg = args[argn]; - String sarg; - Integer i_arg; - - if ((argn+1"); - System.out.println(" -h hostname"); - System.out.println(" -p port number "); - System.out.println(" -n number of client threads"); - System.out.println(" -t treatment time in servlet"); - System.out.println(" -w time to wait in thread client"); - System.out.println(" -l nb loops in each thread client"); - System.out.println(" -ejb call ejb in servlet"); - System.out.println(" -ejbl call ejb via local interface in servlet"); - System.out.println(" -ejbc call ejb + getconnectionin servlet"); - - } - -} - diff --git a/jonas_tests/samplehttp/client/Sender.java b/jonas_tests/samplehttp/client/Sender.java deleted file mode 100644 index 93996b7b13670a2411187499deda9b70c83509ca..0000000000000000000000000000000000000000 --- a/jonas_tests/samplehttp/client/Sender.java +++ /dev/null @@ -1,116 +0,0 @@ - -package samplehttp.client; - -//Import statements -import java.io.*; - -import java.net.*; -import java.util.*; - - - -/** - * This is the class for non https communication - */ -public class Sender { - - - String hostname; - String servlet; - int port; - String timetowait; - int flgejb; - - final String HTTP = "HTTP/1.1"; - final String METHOD = "POST "; - final String CONTENT_TYPE = "Content-type: application/x-www-form-urlencoded"; - final String CONTENT_LENGTH = "Content-length: "; - - - /** - * Constructor Sender - * - * - * @param hostname - * @param servlet - * @param port - * - */ - public Sender(String hostname, String servlet, - int port, String timetowait, int flgejb) { - - this.hostname = hostname; - this.servlet = servlet; - this.port = port; - this.timetowait = timetowait; - this.flgejb = flgejb; - } - - /** - * execute: connect to a servlet and send something - */ - public void execute() throws IOException{ - - StringBuffer b = new StringBuffer("http://"); - - b.append(hostname); - b.append(':'); - b.append(port); - b.append('/'); - b.append(servlet); - - URL url = new URL(b.toString()); - HttpURLConnection conn = (HttpURLConnection) url.openConnection(); - - - conn.setRequestProperty("Connection","Close"); - conn.setDoOutput(true); - conn.setDoInput(true); - conn.setRequestMethod("POST"); - - PrintWriter stream = new PrintWriter(conn.getOutputStream(), - true); - - // Send - - stream.println("param= " + timetowait+ " "+flgejb ); - System.out.println("timetowait "+timetowait); - - stream.close(); - - BufferedReader reader = - new BufferedReader(new InputStreamReader(conn - .getInputStream())); - - // Check for response "200 OK" - boolean ok = false; - - System.err.println("Reading response"); - StringBuffer response = new StringBuffer(); - String r = null; - - for (;;) { - r = reader.readLine(); - - if (r == null) { - break; - } - - response.append(r); - if (r.indexOf("OK") != -1) { - ok = true; - - break; - } - } - - System.err.println("Response received"); - reader.close(); - System.err.println("Connection closed"); - if (!ok) { - System.out.println(">> Non OK"); - } - - } -} - diff --git a/jonas_tests/samplehttp/etc/application.xml b/jonas_tests/samplehttp/etc/application.xml deleted file mode 100644 index 6d14c96b2620e68cf591c562373f091773836cda..0000000000000000000000000000000000000000 --- a/jonas_tests/samplehttp/etc/application.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - samplehttp - samplehttp - - sess.jar - - - - - samplehttp.war - samplehttp - - - diff --git a/jonas_tests/samplehttp/etc/web.xml b/jonas_tests/samplehttp/etc/web.xml deleted file mode 100644 index b06fa8bd1f3fa68bfba2cc03a12ea1d420bd9544..0000000000000000000000000000000000000000 --- a/jonas_tests/samplehttp/etc/web.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - SampleServlet - samplehttp.servlet.SampleServlet - - - - SampleServlet - /SampleServlet - - - - ejb/Sess - Session - samplehttp.beans.SessHome - samplehttp.beans.Sess - sess.jar#SessSLR - - - - ejb/SessLocal - Session - samplehttp.beans.SessLocalHome - samplehttp.beans.SessLocal - sess.jar#SessSLR - - - diff --git a/jonas_tests/samplehttp/servlet/SampleServlet.java b/jonas_tests/samplehttp/servlet/SampleServlet.java deleted file mode 100644 index 4f55ee29aca8ede4e37fb8d15a688c88d2dff872..0000000000000000000000000000000000000000 --- a/jonas_tests/samplehttp/servlet/SampleServlet.java +++ /dev/null @@ -1,140 +0,0 @@ -package samplehttp.servlet; - -//import java -import java.io.IOException; -import java.io.PrintWriter; -import java.util.StringTokenizer; - -//import javax -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.rmi.PortableRemoteObject; -import samplehttp.beans.SessHome; -import samplehttp.beans.Sess; -import samplehttp.beans.SessLocalHome; -import samplehttp.beans.SessLocal; - -/** - * - */ -public class SampleServlet extends HttpServlet { - - /** - * Called by the server (via the service method) to allow a servlet to - * handle a GET request. - * @param request an HttpServletRequest object that contains the request - * the client has made of the servlet - * @param response an HttpServletResponse object that contains the - * response the servlet sends to the client - * @throws IOException if an input or output error is detected when the - * servlet handles the GET request - * @throws ServletException if the request for the GET could not be handled - */ - public void doGet(HttpServletRequest request, HttpServletResponse response) - throws IOException, ServletException { - //System.out.println(Thread.currentThread().getName()+" SampleServlet doGet"); - response.setContentType("text/html"); - PrintWriter out = response.getWriter(); - out.println(""); - out.println(""); - out.println(""); - out.println("Sample Servlet "); - out.println(""); - out.println(""); - out.println("

    Sample Servlet accessing a protected EJB"); - - out.println("

    Initial context / UserTransaction

    "); - out.println("
      "); - Context initialContext = null; - try { - initialContext = new InitialContext(); - out.println("
    • Initial context OK
    • "); - } catch (Exception e) { - out.print("
    • Cannot get initial context for JNDI: "); - out.println(e + "
    • "); - return; - } - - } - public void doPost(HttpServletRequest request, HttpServletResponse response) - throws IOException, ServletException { - - //System.out.println(Thread.currentThread().getName()+" SampleServlet doPost"); - StringTokenizer st = new StringTokenizer(request.getParameter("param")); - String timetowait = (String)st.nextElement(); - String flag = (String)st.nextElement(); - //System.out.println("timetowait = "+timetowait); - Long lg = new Long(timetowait.trim()); - long twait = lg.longValue(); - - int ejbflg = new Integer(flag).intValue(); - // ejbflg = 0 ---> no ejb - // ejbflg = 1 ---> ejb via remote interface - // ejbflg = 2 ---> ejb via local interface - // ejbflg = 3 ---> ejb via remote interface + getConnection - - //System.out.println("waiting : "+twait +" ejb = "+ejbflg); - if( ejbflg == 0 ) { - //System.out.println("No ejb"); - try { - Thread.currentThread().sleep(twait); - } catch (InterruptedException e) { - //System.out.println("sleep:"+e); - } - - } else { - - Context initialContext = null; - try { - initialContext = new InitialContext(); - - } catch (Exception e) { - System.err.println("Cannot get initial context for JNDI: "+e); - return; - } if( ejbflg == 2) { - // ejbflg = 2 ---> ejb via local interface - SessLocalHome sh = null; - SessLocal s = null; - try { - sh = (SessLocalHome) initialContext.lookup("java:comp/env/ejb/SessLocal"); - s = sh.create(); - s.process(twait); - s.remove(); - } catch (Exception e) { - System.err.println("Exception caught: " + e ); - return; - } - } else { - // ejbflg = 1 or 3 ---> ejb via remote interface - SessHome sh = null; - Sess s = null; - try { - sh = (SessHome) PortableRemoteObject.narrow(initialContext.lookup("java:comp/env/ejb/Sess"), SessHome.class); - s = sh.create(); - if( ejbflg == 1) { - // ejbflg = 1 ---> ejb via remote interface - s.process(twait); - } else { - // ejbflg = 3 ---> ejb business method + getConnection - s.processwithconn(twait); - } - s.remove(); - } catch (Exception e) { - System.err.println("Exception caught: " + e ); - return; - } - } - } - String okmsg = "OK\n"; - response.setContentLength(okmsg.length()); - PrintWriter out = response.getWriter(); - out.print(okmsg); - - - } - -} diff --git a/jonas_tests/ws/.cvsignore b/jonas_tests/ws/.cvsignore deleted file mode 100644 index bb8c50e8d066c2bf94a549250e64cbd1a6f9c909..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -classes -output -temp -velocity.log -report diff --git a/jonas_tests/ws/README b/jonas_tests/ws/README deleted file mode 100644 index 636b766a0623f3c84e3d4231f77a30516a774819..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/README +++ /dev/null @@ -1,64 +0,0 @@ -####################################################### -# Web Services Tests # -####################################################### - -General description : --------------------- - -This application is made of : - -- 2 Web service endpoints : - - AdressBook service : a JAX-RPC endpoint ( a class running on a web container) - providing operations to enter and find adresses. ==> adressbook.war - - Ordering service : a Stateless Session Bean providing operations to submit and get - an order. ==> ordering.ear - -- for each endpoints : - - 2 Web service clients implemented by EJB : - - one using generated classes (AXIS) to encapsulate Web Service Call object. - - the other using a Dynamic Invocation Interface (Call object). - - 2 Web service clients implemented by classes, using Stub (generated classes) and DII too. - -Many different architectures are possible : - -- 1 jonas server with all components (Web service endpoints, clients ...), -- 1 jonas server for each Web service endpoints, one other for Web service clients. -(all server on the same host because "localhost" is hardcoded) -- ... - - -WARNING: -To compile or/and run the tests, the JONAS_ROOT must contains -a JOnAS-Tomcat or a JOnAS-jetty package. - - -How to compile and to run the test: ------------------------------------ - -You must follow some simple rules in order tu run successfully this TestSuite : - -1. You must have an environment variable named HTTP_PORT containing the port - where your webcontainer is listening -2. The tests are running on localhost -3. The JOnAS Server must be named jonas (same as for conformance tests) -4. You must have the "web" service (tomcat or jetty) launched - -Steps : -------- - -1. Launch a JOnAS server in a terminal -jonas start - -2. Open another terminal - -3. Set the HTTP_PORT variable (see your $JONAS_BASE/conf/server.xml) -export HTTP_PORT=9000 - -4. Compile the tests -cd $PROJ_BASE/jonas_tests/ws -ant install - -5. Launch the suite -cd $PROJ_BASE/jonas_tests/ws -ant report - diff --git a/jonas_tests/ws/build.xml b/jonas_tests/ws/build.xml deleted file mode 100644 index 74eb02f3873eedb303a510ba62bbc4a5f317fa44..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/build.xml +++ /dev/null @@ -1,400 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Running JUnit Client: 'jonas.base=${jonas.base}' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/ws/etc/apps/port-component-link.xml b/jonas_tests/ws/etc/apps/port-component-link.xml deleted file mode 100644 index a37b3a9e69fcc3d731bc4f78bf99d0e9bd3f3af0..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/apps/port-component-link.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - port-component-link tests between - 2 webapps, the first one webendpoint exposing a webservices - and the seconf one using this service without previous knowledge - about the location. - - port-component-link tests - - - - webendpoint.war - endpoint - - - - - - webportlink.war - portlink - - - - diff --git a/jonas_tests/ws/etc/apps/time-test.xml b/jonas_tests/ws/etc/apps/time-test.xml deleted file mode 100644 index f494d3dd24631e56fdfe737493ba1a925cd29d7e..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/apps/time-test.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - time endpoint tests - - - time-client.jar - - - - time.jar - - - diff --git a/jonas_tests/ws/etc/clients/application-client.xml b/jonas_tests/ws/etc/clients/application-client.xml deleted file mode 100644 index ea592b114362733c5aef825142a6ee98e4b4236c..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/clients/application-client.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - Client of the time WS EJB - Client of the time WS EJB - - - service/time - javax.xml.rpc.Service - META-INF/wsdl/TimePort.wsdl - META-INF/timeMapping.xml - - org.objectweb.jonas.jtests.beans.time.TimeEndpoint - time.jar#TimePort - - - TimeClientHandler - org.objectweb.jonas.jtests.appclients.timeclient.TimeClientHandler - - jonas.test.client.handler - JOnAS - - TimePort - - - - diff --git a/jonas_tests/ws/etc/clients/jonas-client.xml b/jonas_tests/ws/etc/clients/jonas-client.xml deleted file mode 100644 index 87131bc5b94d282fd59770d8c8bc69a252086dca..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/clients/jonas-client.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - service/time - JOnAS_Unused - - - diff --git a/jonas_tests/ws/etc/clients/timeMapping.xml b/jonas_tests/ws/etc/clients/timeMapping.xml deleted file mode 100644 index 2b413463ad7cd6680b825f2ed81255e7a8e4b3b0..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/clients/timeMapping.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - org.objectweb.jonas.jtests.appclients.timeclient.time - jonas:Time - - diff --git a/jonas_tests/ws/etc/clients/wsdl/TimePort.wsdl b/jonas_tests/ws/etc/clients/wsdl/TimePort.wsdl deleted file mode 100644 index 474f76e4e2f26619a27a5a05ea79945d807a571c..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/clients/wsdl/TimePort.wsdl +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/ws/etc/ejbjars/mcontext/META-INF/ejb-jar.xml b/jonas_tests/ws/etc/ejbjars/mcontext/META-INF/ejb-jar.xml deleted file mode 100644 index 09e24ae9b7dde6c1dca87b540cbceb0cfb30473c..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/ejbjars/mcontext/META-INF/ejb-jar.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - Describe here the content of this file - mcontext - - - - Describe here the session bean TestMC1 - mcontext/TestMC1SLL - TestMC1SLL - org.objectweb.jonas.jtests.beans.mcontext.TestMC1LocalHome - org.objectweb.jonas.jtests.beans.mcontext.TestMC1Local - org.objectweb.jonas.jtests.beans.mcontext.TestMC1Endpoint - org.objectweb.jonas.jtests.beans.mcontext.TestMC1SLL - Stateless - Container - - - Describe here the session bean TestMC2 - mcontext2/TestMC2SLR - TestMC2SLR - org.objectweb.jonas.jtests.beans.mcontext.TestMC2Home - org.objectweb.jonas.jtests.beans.mcontext.TestMC2 - org.objectweb.jonas.jtests.beans.mcontext.TestMC2Endpoint - org.objectweb.jonas.jtests.beans.mcontext.TestMC2SLR - Stateless - Container - - - Describe here the session bean BeanAccessor - accessor/BeanAccessorSLR - BeanAccessorSLR - org.objectweb.jonas.jtests.beans.mcontext.BeanAccessorHome - org.objectweb.jonas.jtests.beans.mcontext.BeanAccessor - org.objectweb.jonas.jtests.beans.mcontext.BeanAccessorSLR - Stateless - Container - - - - - - - - TestMC1SLL - * - - Supports - - - - - TestMC2SLR - * - - Supports - - - - - BeanAccessorSLR - * - - Supports - - - - - diff --git a/jonas_tests/ws/etc/ejbjars/mcontext/META-INF/jonas-ejb-jar.xml b/jonas_tests/ws/etc/ejbjars/mcontext/META-INF/jonas-ejb-jar.xml deleted file mode 100644 index 9357e0555a45774e4b7d14ccd4211b5de9f49cdf..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/ejbjars/mcontext/META-INF/jonas-ejb-jar.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - TestMC1SLL - TestMC1Home - - - - TestMC2SLR - TestMC2Home - - - - BeanAccessorSLR - BeanAccessorHome - - - diff --git a/jonas_tests/ws/etc/ejbjars/mcontext/META-INF/mappingMCT.xml b/jonas_tests/ws/etc/ejbjars/mcontext/META-INF/mappingMCT.xml deleted file mode 100644 index d5f185ff56410ff953e38e20d5b167c5ddc385cd..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/ejbjars/mcontext/META-INF/mappingMCT.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - org.objectweb.jonas.jtests.beans.mcontext - jonas:MessageContextTest - - diff --git a/jonas_tests/ws/etc/ejbjars/mcontext/META-INF/webservices.xml b/jonas_tests/ws/etc/ejbjars/mcontext/META-INF/webservices.xml deleted file mode 100644 index 612194ab65a5b215b77e58a099df4e7fecc43088..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/ejbjars/mcontext/META-INF/webservices.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - MessageContextTest WebService - - MessageContextWS - META-INF/wsdl/MessageContext.wsdl - META-INF/mappingMCT.xml - - - local interfaces bean - LocalMContextPort - mc:LocalMContextPort - org.objectweb.jonas.jtests.beans.mcontext.TestMC1Local - - TestMC1SLL - - - - - remote interfaces bean - RemoteMContextPort - mc:RemoteMContextPort - org.objectweb.jonas.jtests.beans.mcontext.TestMC2 - - TestMC2SLR - - - - diff --git a/jonas_tests/ws/etc/ejbjars/mcontext/META-INF/wsdl/MessageContext.wsdl b/jonas_tests/ws/etc/ejbjars/mcontext/META-INF/wsdl/MessageContext.wsdl deleted file mode 100644 index 6e8e3ac5e0af4d27dd8f6d91ec8e37878bb4fcb2..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/ejbjars/mcontext/META-INF/wsdl/MessageContext.wsdl +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/ws/etc/ejbjars/time/META-INF/ejb-jar.xml b/jonas_tests/ws/etc/ejbjars/time/META-INF/ejb-jar.xml deleted file mode 100644 index 5c9a0a74aa5c741ca78c40fd3397424ab7cb5bc6..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/ejbjars/time/META-INF/ejb-jar.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - Describe here the content of this file - time - - - - Describe here the session bean TimeBean - time/TimeBeanSLR - TimeBeanSLR - org.objectweb.jonas.jtests.beans.time.TimeEndpoint - org.objectweb.jonas.jtests.beans.time.TimeBeanSLR - Stateless - Container - - - - - - - - TimeBeanSLR - - ServiceEndpoint - * - - Supports - - - - - diff --git a/jonas_tests/ws/etc/ejbjars/time/META-INF/jonas-ejb-jar.xml b/jonas_tests/ws/etc/ejbjars/time/META-INF/jonas-ejb-jar.xml deleted file mode 100644 index e66fb88eb465d48e281992c6e285505d00722b27..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/ejbjars/time/META-INF/jonas-ejb-jar.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - TimeBeanSLR - TimeBeanHome - - - diff --git a/jonas_tests/ws/etc/ejbjars/time/META-INF/mapping.xml b/jonas_tests/ws/etc/ejbjars/time/META-INF/mapping.xml deleted file mode 100644 index 1e0acb402e28e65bf618c3c2d4f714cabdfde879..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/ejbjars/time/META-INF/mapping.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - org.objectweb.jonas.jtests.beans.time - jonas:Time - - diff --git a/jonas_tests/ws/etc/ejbjars/time/META-INF/webservices.xml b/jonas_tests/ws/etc/ejbjars/time/META-INF/webservices.xml deleted file mode 100644 index 88f628d07ac7a18a1df6fbbc5ba967a2b4527906..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/ejbjars/time/META-INF/webservices.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - Time WebService - TimeWebService - META-INF/wsdl/TimePort.wsdl - META-INF/mapping.xml - - port component description - TimePort - time:TimePort - - org.objectweb.jonas.jtests.beans.time.TimeEndpoint - - TimeBeanSLR - - - TimeBeanHandler - org.objectweb.jonas.jtests.beans.time.TimeBeanHandler - - jonas.test.server.handler - JOnAS - - - - - - diff --git a/jonas_tests/ws/etc/ejbjars/time/META-INF/wsdl/AddressBook.xsd b/jonas_tests/ws/etc/ejbjars/time/META-INF/wsdl/AddressBook.xsd deleted file mode 100644 index a3c86df36c74c05857833a2904949dedbdf8d253..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/ejbjars/time/META-INF/wsdl/AddressBook.xsd +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/ws/etc/ejbjars/time/META-INF/wsdl/AddressBookPort.wsdl b/jonas_tests/ws/etc/ejbjars/time/META-INF/wsdl/AddressBookPort.wsdl deleted file mode 100644 index 05c860ab1ce5045b4e5ae19be1184c7e9d2f1696..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/ejbjars/time/META-INF/wsdl/AddressBookPort.wsdl +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/ws/etc/ejbjars/time/META-INF/wsdl/Time.wsdl b/jonas_tests/ws/etc/ejbjars/time/META-INF/wsdl/Time.wsdl deleted file mode 100644 index c6a370170888a58e704b8264021f7d46de5c63c4..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/ejbjars/time/META-INF/wsdl/Time.wsdl +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/jonas_tests/ws/etc/ejbjars/time/META-INF/wsdl/TimePort.wsdl b/jonas_tests/ws/etc/ejbjars/time/META-INF/wsdl/TimePort.wsdl deleted file mode 100644 index 7c270cfc3d48da61180006572306167f3126e733..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/ejbjars/time/META-INF/wsdl/TimePort.wsdl +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/ws/etc/ejbjars/wsclient/META-INF/XMethodsMapping.xml b/jonas_tests/ws/etc/ejbjars/wsclient/META-INF/XMethodsMapping.xml deleted file mode 100644 index 7a14fdf641d0b7c61265eb6a2d0a74a702315d82..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/ejbjars/wsclient/META-INF/XMethodsMapping.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - org.objectweb.jonas.jtests.gen.xmethods - http://www.xmethods.net/interfaces/query.wsdl - - - org.objectweb.jonas.jtests.gen.xmethods - http://www.xmethods.net/interfaces/query - - - org.objectweb.jonas.jtests.gen.xmethods - http://www.xmethods.net/interfaces/query.xsd - - - - - org.objectweb.jonas.jtests.gen.xmethods.IDNamePair - qxsd:IDNamePair - complexType - - - org.objectweb.jonas.jtests.gen.xmethods.IDNamePair[] - qxsd:ArrayOfIDNamePair - complexType - - - - - org.objectweb.jonas.jtests.gen.xmethods.ServiceSummary - qxsd:ServiceSummary - complexType - - - org.objectweb.jonas.jtests.gen.xmethods.ServiceSummary[] - qxsd:ArrayOfServiceSummary - complexType - - - - - org.objectweb.jonas.jtests.gen.xmethods.ServiceDetail - qxsd:ServiceDetail - complexType - - - diff --git a/jonas_tests/ws/etc/ejbjars/wsclient/META-INF/ejb-jar.xml b/jonas_tests/ws/etc/ejbjars/wsclient/META-INF/ejb-jar.xml deleted file mode 100644 index c39b04e1b462fcc72afb2274d4d11c5dbfdffbbe..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/ejbjars/wsclient/META-INF/ejb-jar.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - Describe here the content of this file - wsclient - - - - Describe here the session bean WsClient1 - wsclient/WsClient1SLR - WsClient1SLR - org.objectweb.jonas.jtests.beans.wsclient.WsClient1Home - org.objectweb.jonas.jtests.beans.wsclient.WsClient1 - org.objectweb.jonas.jtests.beans.wsclient.WsClient1SLR - Stateless - Container - - service/XMethods - javax.xml.rpc.Service - META-INF/wsdl/query.wsdl - META-INF/XMethodsMapping.xml - - xm:XMethodsQuery - - - - - - - - - - - WsClient1SLR - * - - Supports - - - - - diff --git a/jonas_tests/ws/etc/ejbjars/wsclient/META-INF/jonas-ejb-jar.xml b/jonas_tests/ws/etc/ejbjars/wsclient/META-INF/jonas-ejb-jar.xml deleted file mode 100644 index ce9312c28b0c4b6d94ad3691090e63952d9923c6..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/ejbjars/wsclient/META-INF/jonas-ejb-jar.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - WsClient1SLR - WsClient1Home - - service/XMethods - ws/XMethodsService - - - - diff --git a/jonas_tests/ws/etc/ejbjars/wsclient/META-INF/wsdl/query.wsdl b/jonas_tests/ws/etc/ejbjars/wsclient/META-INF/wsdl/query.wsdl deleted file mode 100644 index 70740807a574c0c964709c5a2240c1b17d170020..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/ejbjars/wsclient/META-INF/wsdl/query.wsdl +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - XMethods query service - - - - - diff --git a/jonas_tests/ws/etc/ejbjars/wsclient/META-INF/wsdl/query.xsd b/jonas_tests/ws/etc/ejbjars/wsclient/META-INF/wsdl/query.xsd deleted file mode 100644 index dbc09ecbc6ad3e88df907dae7a809bd1405ba7e9..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/ejbjars/wsclient/META-INF/wsdl/query.xsd +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/jonas_tests/ws/etc/webapps/alone/jonas-webservices.xml b/jonas_tests/ws/etc/webapps/alone/jonas-webservices.xml deleted file mode 100644 index 8a7304030807ec2a9f8f4849f88c9759a9ad3490..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/webapps/alone/jonas-webservices.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - AddressBookWS - - - AddressBookPort - /addressbook - - file:/tmp/ab-ws-wsdl - - diff --git a/jonas_tests/ws/etc/webapps/alone/mapping.xml b/jonas_tests/ws/etc/webapps/alone/mapping.xml deleted file mode 100644 index bed5482c510d2e25ee5bcadc84010a8454630c1b..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/webapps/alone/mapping.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - org.objectweb.jonas.jtests.servlets.endpoint - jonas:AddressBook - - - org.objectweb.jonas.jtests.servlets.endpoint.Address - ab:Address - complexType - - - org.objectweb.jonas.jtests.servlets.endpoint.AddressBookException - ab:AddressBookException - complexType - - diff --git a/jonas_tests/ws/etc/webapps/alone/web.xml b/jonas_tests/ws/etc/webapps/alone/web.xml deleted file mode 100644 index 693a25e1953aa7f57d0e5c12b17328227e368e98..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/webapps/alone/web.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - AddressBook - org.objectweb.jonas.jtests.servlets.endpoint.AddressBookImpl - - \ No newline at end of file diff --git a/jonas_tests/ws/etc/webapps/alone/webservices.xml b/jonas_tests/ws/etc/webapps/alone/webservices.xml deleted file mode 100644 index ddea0f53f89a247f1e569ce2ba6ff579fe7375df..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/webapps/alone/webservices.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - AddressBook WebService - - AddressBookWS - WEB-INF/wsdl/AddressBookPort.wsdl - WEB-INF/mapping.xml - - port component description - AddressBookPort - ab:AddressBookPort - org.objectweb.jonas.jtests.servlets.endpoint.AddressBook - - AddressBook - - - - \ No newline at end of file diff --git a/jonas_tests/ws/etc/webapps/alone/wsdl/AddressBook.xsd b/jonas_tests/ws/etc/webapps/alone/wsdl/AddressBook.xsd deleted file mode 100644 index 7655a1b00dd0245742cdc1b73e0b03348af69352..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/webapps/alone/wsdl/AddressBook.xsd +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/jonas_tests/ws/etc/webapps/alone/wsdl/AddressBookPort.wsdl b/jonas_tests/ws/etc/webapps/alone/wsdl/AddressBookPort.wsdl deleted file mode 100644 index 1fd027badb1c0a47876bad8fdceee06b26452f3f..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/webapps/alone/wsdl/AddressBookPort.wsdl +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/ws/etc/webapps/portlink/AdressBook.xml b/jonas_tests/ws/etc/webapps/portlink/AdressBook.xml deleted file mode 100644 index 874eae89dd767c750952a6dc3d8f2765bd6136ae..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/webapps/portlink/AdressBook.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - org.objectweb.jonas.jtests.servlets.portlink - jonas:AddressBook - - - org.objectweb.jonas.jtests.servlets.portlink.Address - ns:Address - complexType - - - org.objectweb.jonas.jtests.servlets.portlink.AddressBookException - ns:AddressBookException - complexType - - \ No newline at end of file diff --git a/jonas_tests/ws/etc/webapps/portlink/jonas-web.xml b/jonas_tests/ws/etc/webapps/portlink/jonas-web.xml deleted file mode 100644 index 638ad2b2917ce3c912090ced9216fcb215e19cc0..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/webapps/portlink/jonas-web.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - service/AddressBook - ws/AddressBook - - - diff --git a/jonas_tests/ws/etc/webapps/portlink/web.xml b/jonas_tests/ws/etc/webapps/portlink/web.xml deleted file mode 100644 index b54630be75649b32d061353c45e354f534bbb849..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/webapps/portlink/web.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - service/AddressBook - javax.xml.rpc.Service - WEB-INF/wsdl/AddressBookPort.wsdl - WEB-INF/AdressBook.xml - ab:AddressBookService - - org.objectweb.jonas.jtests.servlets.portlink.AddressBook - webendpoint.war#AddressBookPort - - - \ No newline at end of file diff --git a/jonas_tests/ws/etc/webapps/portlink/web/index.jsp b/jonas_tests/ws/etc/webapps/portlink/web/index.jsp deleted file mode 100644 index 3c92d3a38019db12585581287082908ebdc13d8b..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/webapps/portlink/web/index.jsp +++ /dev/null @@ -1,124 +0,0 @@ - - - - Port Component Link Test - - - -

      Port Component Link Test

      - - <%@ page contentType="text/html" %> - <%@ page import="javax.naming.InitialContext" %> - <%@ page import="javax.xml.rpc.Service" %> - <%@ page import="javax.xml.rpc.Call" %> - <%@ page import="javax.xml.rpc.Stub" %> - <%@ page import="java.rmi.Remote" %> - <%@ page import="javax.xml.namespace.QName" %> - <%@ page import="org.objectweb.jonas.jtests.servlets.portlink.Address" %> - <% - - // new InitialContext - InitialContext ic = new InitialContext(); - - // Lookup - Service s = (Service) ic.lookup("java:comp/env/service/AddressBook"); - - // QNames preparation - QName port = new QName("jonas:AddressBook", "AddressBookPort"); - QName opReset = new QName("jonas:AddressBook", "reset"); - QName opAddAddress = new QName("jonas:AddressBook", "addAddress"); - QName opGetAddresses = new QName("jonas:AddressBook", "getAddresses"); - QName opGetAddress = new QName("jonas:AddressBook", "getAddress"); - QName opIsPresent = new QName("jonas:AddressBook", "isPresent"); - - // Call creation - Call call = s.createCall(port); - call.setProperty(Call.SESSION_MAINTAIN_PROPERTY, new Boolean(true)); - - - Remote remote = s.getPort(org.objectweb.jonas.jtests.servlets.portlink.AddressBook.class); - - %> -
      - Config :
      - - get.getTargetEndpointAddress() : '<%= call.getTargetEndpointAddress() %>' - - - getPort return a Stub : '<%= (remote instanceof Stub) %>'
      -
      - <% - - // preInvoke - // reset the base - call.setOperationName(opReset); - call.invoke(new Object[] {}); - - // Call execution - // 1: getAddress - call.setOperationName(opGetAddress); - Address jonas = (Address) call.invoke(new Object[] {"JOnAS"}); - - // 2: addAddress - Address jonasTeam = new Address(); - jonasTeam.setName("JOnAS-Team"); - jonasTeam.setCompany("ObjectWeb Consortium"); - jonasTeam.setVersion(1.0f); - call.setOperationName(opAddAddress); - call.invoke(new Object[] {jonasTeam}); - - // 3: getAddresses - call.setOperationName(opGetAddresses); - // return a Address[] but ClassCastException is thrown when direct casting - Object[] objects = (Object[]) call.invoke(new Object[] {}); - - // So we cast Addresses one by one in a new Array. - Address[] addresses = new Address[objects.length]; - for (int i = 0; i < objects.length; i++ ) { - addresses[i] = (Address) objects[i]; - } - %> - - return type : <%= addresses[0].getClass().getName() %> - - <% - - // 4: isPresent - call.setOperationName(opIsPresent); - Boolean presence = (Boolean) call.invoke(new Object[] {jonasTeam.getName()}); - %> -
      -
      - Results :
      -
      - - getAddress("JOnAS") :
      - name : '<%= jonas.getName() %>'
      - company : '<%= jonas.getCompany() %>'
      - version : '<%= jonas.getVersion() %>'
      -
      - - - getAddresses() length : <%= addresses.length %>
      - <% - for (int i = 0; i < addresses.length; i++) { - out.println("
      "); - %> - - - name[<%= i %>] : '<%= addresses[i].getName() %>'
      - company[<%= i %>] : '<%= addresses[i].getCompany() %>'
      - version[<%= i %>] : '<%= addresses[i].getVersion() %>'
      -
      - <% - } - %> - - -
      - - isPresent("JOnAS-Team") : '<%= presence %>'
      -
      - - - diff --git a/jonas_tests/ws/etc/webapps/portlink/wsdl/AddressBookPort.wsdl b/jonas_tests/ws/etc/webapps/portlink/wsdl/AddressBookPort.wsdl deleted file mode 100644 index 7e7454214f980ad0ba42d99419146c351d2a7efa..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/webapps/portlink/wsdl/AddressBookPort.wsdl +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/ws/etc/webapps/secured/jonas-webservices.xml b/jonas_tests/ws/etc/webapps/secured/jonas-webservices.xml deleted file mode 100644 index b984fbb197af847c0fb9ba769dfcb8342e5ad59a..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/webapps/secured/jonas-webservices.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - AddressBookWS - - - AddressBookPort - /addressbook - - file:/tmp/ab-ws-wsdl - - - - AddressBookWS2 - - AddressBookPort2 - /addressbook2 - - file:/tmp/ab-ws-wsdl - - - - - - addressbook - /addressbook - /addressbook2 - - - jonas-admin - - - - - - BASIC - WS Example Authentication Area - - - - - jonas-admin - - - - memrlm_1 - - - WS Example Authentication Area - - diff --git a/jonas_tests/ws/etc/webapps/secured/mapping.xml b/jonas_tests/ws/etc/webapps/secured/mapping.xml deleted file mode 100644 index bed5482c510d2e25ee5bcadc84010a8454630c1b..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/webapps/secured/mapping.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - org.objectweb.jonas.jtests.servlets.endpoint - jonas:AddressBook - - - org.objectweb.jonas.jtests.servlets.endpoint.Address - ab:Address - complexType - - - org.objectweb.jonas.jtests.servlets.endpoint.AddressBookException - ab:AddressBookException - complexType - - diff --git a/jonas_tests/ws/etc/webapps/secured/web.xml b/jonas_tests/ws/etc/webapps/secured/web.xml deleted file mode 100644 index 5b263accd073a283bb08edf68b7923974b5cd5b2..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/webapps/secured/web.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - AddressBook - org.objectweb.jonas.jtests.servlets.endpoint.AddressBookImpl - - - AddressBook2 - org.objectweb.jonas.jtests.servlets.endpoint.AddressBookImpl - - \ No newline at end of file diff --git a/jonas_tests/ws/etc/webapps/secured/webservices.xml b/jonas_tests/ws/etc/webapps/secured/webservices.xml deleted file mode 100644 index 00247b7125850176a298d902ee30113e97dcd3d6..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/webapps/secured/webservices.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - AddressBook WebService - - AddressBookWS - WEB-INF/wsdl/AddressBookPort.wsdl - WEB-INF/mapping.xml - - port component description - AddressBookPort - ab:AddressBookPort - org.objectweb.jonas.jtests.servlets.endpoint.AddressBook - - AddressBook - - - - - - AddressBookWS2 - WEB-INF/wsdl/AddressBookPort.wsdl - WEB-INF/mapping.xml - - port component description - AddressBookPort2 - ab:AddressBookPort - org.objectweb.jonas.jtests.servlets.endpoint.AddressBook - - AddressBook2 - - - - \ No newline at end of file diff --git a/jonas_tests/ws/etc/webapps/secured/wsdl/AddressBook.xsd b/jonas_tests/ws/etc/webapps/secured/wsdl/AddressBook.xsd deleted file mode 100644 index 7655a1b00dd0245742cdc1b73e0b03348af69352..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/webapps/secured/wsdl/AddressBook.xsd +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/jonas_tests/ws/etc/webapps/secured/wsdl/AddressBookPort.wsdl b/jonas_tests/ws/etc/webapps/secured/wsdl/AddressBookPort.wsdl deleted file mode 100644 index 1fd027badb1c0a47876bad8fdceee06b26452f3f..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/etc/webapps/secured/wsdl/AddressBookPort.wsdl +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/ws/resources/call-props-empty-j2ee.xml b/jonas_tests/ws/resources/call-props-empty-j2ee.xml deleted file mode 100644 index 13d5aecf02c90258c95dba0b7e1c0e6d5b381226..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/call-props-empty-j2ee.xml +++ /dev/null @@ -1,12 +0,0 @@ - - service/Service - javax.xml.rpc.Service - wsdl/oneService.wsdl - mapping/AxisServiceTest.xml - - org.objectweb.jonas.jtests.hello.HelloWs - - - org.objectweb.jonas.jtests.hello.HelloWs2 - - \ No newline at end of file diff --git a/jonas_tests/ws/resources/call-props-empty-jonas.xml b/jonas_tests/ws/resources/call-props-empty-jonas.xml deleted file mode 100644 index 393580239047fbc21f4311a9d87698eb52e53e2f..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/call-props-empty-jonas.xml +++ /dev/null @@ -1,12 +0,0 @@ - - service/Service - empty - - org.objectweb.jonas.jtests.hello.HelloWs - ns:HelloPortComponent - - - org.objectweb.jonas.jtests.hello.HelloWs2 - ns:HelloPortComponent2 - - \ No newline at end of file diff --git a/jonas_tests/ws/resources/call-props-j2ee.xml b/jonas_tests/ws/resources/call-props-j2ee.xml deleted file mode 100644 index 13d5aecf02c90258c95dba0b7e1c0e6d5b381226..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/call-props-j2ee.xml +++ /dev/null @@ -1,12 +0,0 @@ - - service/Service - javax.xml.rpc.Service - wsdl/oneService.wsdl - mapping/AxisServiceTest.xml - - org.objectweb.jonas.jtests.hello.HelloWs - - - org.objectweb.jonas.jtests.hello.HelloWs2 - - \ No newline at end of file diff --git a/jonas_tests/ws/resources/call-props-jonas.xml b/jonas_tests/ws/resources/call-props-jonas.xml deleted file mode 100644 index 973b2210f933fc1af038f2b60ddf6452027d34f8..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/call-props-jonas.xml +++ /dev/null @@ -1,28 +0,0 @@ - - service/Service - empty - - org.objectweb.jonas.jtests.hello.HelloWs - ns:HelloPortComponent - - my.test.property - test.value - - - my.test.property.2 - test.value.2 - - - - org.objectweb.jonas.jtests.hello.HelloWs2 - ns:HelloPortComponent2 - - other.test.property - test.value - - - other.test.property.2 - test.value.2 - - - \ No newline at end of file diff --git a/jonas_tests/ws/resources/call-props-null-j2ee.xml b/jonas_tests/ws/resources/call-props-null-j2ee.xml deleted file mode 100644 index b5b86d183c2ccb6410651320be57336fc2299546..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/call-props-null-j2ee.xml +++ /dev/null @@ -1,6 +0,0 @@ - - service/Service - javax.xml.rpc.Service - wsdl/oneService.wsdl - mapping/AxisServiceTest.xml - \ No newline at end of file diff --git a/jonas_tests/ws/resources/call-props-null-jonas.xml b/jonas_tests/ws/resources/call-props-null-jonas.xml deleted file mode 100644 index b0d6b56e4693a4ab4418fa9cfbd319a52cece805..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/call-props-null-jonas.xml +++ /dev/null @@ -1,4 +0,0 @@ - - service/Service - empty - \ No newline at end of file diff --git a/jonas_tests/ws/resources/mapping/AxisServiceTest.xml b/jonas_tests/ws/resources/mapping/AxisServiceTest.xml deleted file mode 100644 index 0b1dc6a622342ec129d6307b55f2741851a804ea..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/mapping/AxisServiceTest.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - org.objectweb.jonas.jtests.hello - http://hello.simple - - \ No newline at end of file diff --git a/jonas_tests/ws/resources/no-port2wsdl-map-j2ee.xml b/jonas_tests/ws/resources/no-port2wsdl-map-j2ee.xml deleted file mode 100644 index b5b86d183c2ccb6410651320be57336fc2299546..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/no-port2wsdl-map-j2ee.xml +++ /dev/null @@ -1,6 +0,0 @@ - - service/Service - javax.xml.rpc.Service - wsdl/oneService.wsdl - mapping/AxisServiceTest.xml - \ No newline at end of file diff --git a/jonas_tests/ws/resources/no-port2wsdl-map-jonas.xml b/jonas_tests/ws/resources/no-port2wsdl-map-jonas.xml deleted file mode 100644 index b0d6b56e4693a4ab4418fa9cfbd319a52cece805..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/no-port2wsdl-map-jonas.xml +++ /dev/null @@ -1,4 +0,0 @@ - - service/Service - empty - \ No newline at end of file diff --git a/jonas_tests/ws/resources/no-wsdd-specified-j2ee.xml b/jonas_tests/ws/resources/no-wsdd-specified-j2ee.xml deleted file mode 100644 index a15316821dcb24d89b61e0a9a7aa9237c07093dd..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/no-wsdd-specified-j2ee.xml +++ /dev/null @@ -1,4 +0,0 @@ - - service/Service - javax.xml.rpc.Service - \ No newline at end of file diff --git a/jonas_tests/ws/resources/no-wsdd-specified-jonas.xml b/jonas_tests/ws/resources/no-wsdd-specified-jonas.xml deleted file mode 100644 index b0d6b56e4693a4ab4418fa9cfbd319a52cece805..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/no-wsdd-specified-jonas.xml +++ /dev/null @@ -1,4 +0,0 @@ - - service/Service - empty - \ No newline at end of file diff --git a/jonas_tests/ws/resources/port-name-list-empty-j2ee.xml b/jonas_tests/ws/resources/port-name-list-empty-j2ee.xml deleted file mode 100644 index b5b86d183c2ccb6410651320be57336fc2299546..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/port-name-list-empty-j2ee.xml +++ /dev/null @@ -1,6 +0,0 @@ - - service/Service - javax.xml.rpc.Service - wsdl/oneService.wsdl - mapping/AxisServiceTest.xml - \ No newline at end of file diff --git a/jonas_tests/ws/resources/port-name-list-empty-jonas.xml b/jonas_tests/ws/resources/port-name-list-empty-jonas.xml deleted file mode 100644 index b0d6b56e4693a4ab4418fa9cfbd319a52cece805..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/port-name-list-empty-jonas.xml +++ /dev/null @@ -1,4 +0,0 @@ - - service/Service - empty - \ No newline at end of file diff --git a/jonas_tests/ws/resources/port-name-list-j2ee.xml b/jonas_tests/ws/resources/port-name-list-j2ee.xml deleted file mode 100644 index 13d5aecf02c90258c95dba0b7e1c0e6d5b381226..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/port-name-list-j2ee.xml +++ /dev/null @@ -1,12 +0,0 @@ - - service/Service - javax.xml.rpc.Service - wsdl/oneService.wsdl - mapping/AxisServiceTest.xml - - org.objectweb.jonas.jtests.hello.HelloWs - - - org.objectweb.jonas.jtests.hello.HelloWs2 - - \ No newline at end of file diff --git a/jonas_tests/ws/resources/port-name-list-jonas.xml b/jonas_tests/ws/resources/port-name-list-jonas.xml deleted file mode 100644 index 973b2210f933fc1af038f2b60ddf6452027d34f8..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/port-name-list-jonas.xml +++ /dev/null @@ -1,28 +0,0 @@ - - service/Service - empty - - org.objectweb.jonas.jtests.hello.HelloWs - ns:HelloPortComponent - - my.test.property - test.value - - - my.test.property.2 - test.value.2 - - - - org.objectweb.jonas.jtests.hello.HelloWs2 - ns:HelloPortComponent2 - - other.test.property - test.value - - - other.test.property.2 - test.value.2 - - - \ No newline at end of file diff --git a/jonas_tests/ws/resources/port2wsdl-map-j2ee.xml b/jonas_tests/ws/resources/port2wsdl-map-j2ee.xml deleted file mode 100644 index 13d5aecf02c90258c95dba0b7e1c0e6d5b381226..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/port2wsdl-map-j2ee.xml +++ /dev/null @@ -1,12 +0,0 @@ - - service/Service - javax.xml.rpc.Service - wsdl/oneService.wsdl - mapping/AxisServiceTest.xml - - org.objectweb.jonas.jtests.hello.HelloWs - - - org.objectweb.jonas.jtests.hello.HelloWs2 - - \ No newline at end of file diff --git a/jonas_tests/ws/resources/port2wsdl-map-jonas.xml b/jonas_tests/ws/resources/port2wsdl-map-jonas.xml deleted file mode 100644 index 393580239047fbc21f4311a9d87698eb52e53e2f..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/port2wsdl-map-jonas.xml +++ /dev/null @@ -1,12 +0,0 @@ - - service/Service - empty - - org.objectweb.jonas.jtests.hello.HelloWs - ns:HelloPortComponent - - - org.objectweb.jonas.jtests.hello.HelloWs2 - ns:HelloPortComponent2 - - \ No newline at end of file diff --git a/jonas_tests/ws/resources/service-qname-auto-j2ee.xml b/jonas_tests/ws/resources/service-qname-auto-j2ee.xml deleted file mode 100644 index b5b86d183c2ccb6410651320be57336fc2299546..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/service-qname-auto-j2ee.xml +++ /dev/null @@ -1,6 +0,0 @@ - - service/Service - javax.xml.rpc.Service - wsdl/oneService.wsdl - mapping/AxisServiceTest.xml - \ No newline at end of file diff --git a/jonas_tests/ws/resources/service-qname-auto-jonas.xml b/jonas_tests/ws/resources/service-qname-auto-jonas.xml deleted file mode 100644 index b0d6b56e4693a4ab4418fa9cfbd319a52cece805..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/service-qname-auto-jonas.xml +++ /dev/null @@ -1,4 +0,0 @@ - - service/Service - empty - \ No newline at end of file diff --git a/jonas_tests/ws/resources/service-qname-explicit-j2ee.xml b/jonas_tests/ws/resources/service-qname-explicit-j2ee.xml deleted file mode 100644 index a45ccd71dc93343207f40b349d17bb543545a232..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/service-qname-explicit-j2ee.xml +++ /dev/null @@ -1,7 +0,0 @@ - - service/Service - javax.xml.rpc.Service - ns:HelloWsService2 - wsdl/twoService.wsdl - mapping/AxisServiceTest.xml - \ No newline at end of file diff --git a/jonas_tests/ws/resources/service-qname-explicit-jonas.xml b/jonas_tests/ws/resources/service-qname-explicit-jonas.xml deleted file mode 100644 index b0d6b56e4693a4ab4418fa9cfbd319a52cece805..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/service-qname-explicit-jonas.xml +++ /dev/null @@ -1,4 +0,0 @@ - - service/Service - empty - \ No newline at end of file diff --git a/jonas_tests/ws/resources/stub-props-empty-j2ee.xml b/jonas_tests/ws/resources/stub-props-empty-j2ee.xml deleted file mode 100644 index 13d5aecf02c90258c95dba0b7e1c0e6d5b381226..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/stub-props-empty-j2ee.xml +++ /dev/null @@ -1,12 +0,0 @@ - - service/Service - javax.xml.rpc.Service - wsdl/oneService.wsdl - mapping/AxisServiceTest.xml - - org.objectweb.jonas.jtests.hello.HelloWs - - - org.objectweb.jonas.jtests.hello.HelloWs2 - - \ No newline at end of file diff --git a/jonas_tests/ws/resources/stub-props-empty-jonas.xml b/jonas_tests/ws/resources/stub-props-empty-jonas.xml deleted file mode 100644 index 393580239047fbc21f4311a9d87698eb52e53e2f..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/stub-props-empty-jonas.xml +++ /dev/null @@ -1,12 +0,0 @@ - - service/Service - empty - - org.objectweb.jonas.jtests.hello.HelloWs - ns:HelloPortComponent - - - org.objectweb.jonas.jtests.hello.HelloWs2 - ns:HelloPortComponent2 - - \ No newline at end of file diff --git a/jonas_tests/ws/resources/stub-props-j2ee.xml b/jonas_tests/ws/resources/stub-props-j2ee.xml deleted file mode 100644 index 13d5aecf02c90258c95dba0b7e1c0e6d5b381226..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/stub-props-j2ee.xml +++ /dev/null @@ -1,12 +0,0 @@ - - service/Service - javax.xml.rpc.Service - wsdl/oneService.wsdl - mapping/AxisServiceTest.xml - - org.objectweb.jonas.jtests.hello.HelloWs - - - org.objectweb.jonas.jtests.hello.HelloWs2 - - \ No newline at end of file diff --git a/jonas_tests/ws/resources/stub-props-jonas.xml b/jonas_tests/ws/resources/stub-props-jonas.xml deleted file mode 100644 index 1c6d91f2235c3604dc06350610ed54caeea2a7c7..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/stub-props-jonas.xml +++ /dev/null @@ -1,28 +0,0 @@ - - service/Service - empty - - org.objectweb.jonas.jtests.hello.HelloWs - ns:HelloPortComponent - - my.test.property - test.value - - - my.test.property.2 - test.value.2 - - - - org.objectweb.jonas.jtests.hello.HelloWs2 - ns:HelloPortComponent2 - - other.test.property - test.value - - - other.test.property.2 - test.value.2 - - - \ No newline at end of file diff --git a/jonas_tests/ws/resources/stub-props-null-j2ee.xml b/jonas_tests/ws/resources/stub-props-null-j2ee.xml deleted file mode 100644 index b5b86d183c2ccb6410651320be57336fc2299546..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/stub-props-null-j2ee.xml +++ /dev/null @@ -1,6 +0,0 @@ - - service/Service - javax.xml.rpc.Service - wsdl/oneService.wsdl - mapping/AxisServiceTest.xml - \ No newline at end of file diff --git a/jonas_tests/ws/resources/stub-props-null-jonas.xml b/jonas_tests/ws/resources/stub-props-null-jonas.xml deleted file mode 100644 index b0d6b56e4693a4ab4418fa9cfbd319a52cece805..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/stub-props-null-jonas.xml +++ /dev/null @@ -1,4 +0,0 @@ - - service/Service - empty - \ No newline at end of file diff --git a/jonas_tests/ws/resources/wsdd-specified-j2ee.xml b/jonas_tests/ws/resources/wsdd-specified-j2ee.xml deleted file mode 100644 index a15316821dcb24d89b61e0a9a7aa9237c07093dd..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/wsdd-specified-j2ee.xml +++ /dev/null @@ -1,4 +0,0 @@ - - service/Service - javax.xml.rpc.Service - \ No newline at end of file diff --git a/jonas_tests/ws/resources/wsdd-specified-jonas.xml b/jonas_tests/ws/resources/wsdd-specified-jonas.xml deleted file mode 100644 index 849f4aa042635e6280c6ad69666878a05c41ccd8..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/wsdd-specified-jonas.xml +++ /dev/null @@ -1,8 +0,0 @@ - - service/Service - empty - - axis.clientConfigFile - wsdd/deploy.wsdd - - \ No newline at end of file diff --git a/jonas_tests/ws/resources/wsdd/deploy.wsdd b/jonas_tests/ws/resources/wsdd/deploy.wsdd deleted file mode 100644 index ee7aaf010377e49c0e0bb8336605c5440611fcdb..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/wsdd/deploy.wsdd +++ /dev/null @@ -1,5 +0,0 @@ - - - \ No newline at end of file diff --git a/jonas_tests/ws/resources/wsdl-url-default-j2ee.xml b/jonas_tests/ws/resources/wsdl-url-default-j2ee.xml deleted file mode 100644 index b5b86d183c2ccb6410651320be57336fc2299546..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/wsdl-url-default-j2ee.xml +++ /dev/null @@ -1,6 +0,0 @@ - - service/Service - javax.xml.rpc.Service - wsdl/oneService.wsdl - mapping/AxisServiceTest.xml - \ No newline at end of file diff --git a/jonas_tests/ws/resources/wsdl-url-default-jonas.xml b/jonas_tests/ws/resources/wsdl-url-default-jonas.xml deleted file mode 100644 index b0d6b56e4693a4ab4418fa9cfbd319a52cece805..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/wsdl-url-default-jonas.xml +++ /dev/null @@ -1,4 +0,0 @@ - - service/Service - empty - \ No newline at end of file diff --git a/jonas_tests/ws/resources/wsdl-url-override-j2ee.xml b/jonas_tests/ws/resources/wsdl-url-override-j2ee.xml deleted file mode 100644 index e24fcc2ece9bc64fed40b9c6dfed303b8aeb48bc..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/wsdl-url-override-j2ee.xml +++ /dev/null @@ -1,7 +0,0 @@ - - service/Service - javax.xml.rpc.Service - ns:HelloWsService - wsdl/oneService.wsdl - mapping/AxisServiceTest.xml - \ No newline at end of file diff --git a/jonas_tests/ws/resources/wsdl-url-override-jonas.xml b/jonas_tests/ws/resources/wsdl-url-override-jonas.xml deleted file mode 100644 index 1fef22b56b54679657101c8c937cd4a6bbf60d73..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/wsdl-url-override-jonas.xml +++ /dev/null @@ -1,5 +0,0 @@ - - service/Service - empty - @@RESOURCES_DIR@@/wsdl/twoService.wsdl - \ No newline at end of file diff --git a/jonas_tests/ws/resources/wsdl/oneService.wsdl b/jonas_tests/ws/resources/wsdl/oneService.wsdl deleted file mode 100644 index 1a25c8cdc171c08cd5e409c392f0a202a88decaf..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/wsdl/oneService.wsdl +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/ws/resources/wsdl/twoService.wsdl b/jonas_tests/ws/resources/wsdl/twoService.wsdl deleted file mode 100644 index 22b459f51b478a03baddbe4c56f43f3d0a91f793..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/resources/wsdl/twoService.wsdl +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/appclients/timeclient/StaticPassValue.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/appclients/timeclient/StaticPassValue.java deleted file mode 100644 index 0701b38bee3bd75f1db6877237eaef7ce0d70340..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/appclients/timeclient/StaticPassValue.java +++ /dev/null @@ -1,91 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.objectweb.jonas.jtests.appclients.timeclient; - - -/** - * - * - * @author Guillaume Sauthier - */ -public class StaticPassValue { - - private static StaticPassValue instance = null; - private String init = null; - private String request = null; - private String response = null; - /** - * - */ - private StaticPassValue() { - } - - public static StaticPassValue getInstance() { - if (instance == null) { - instance = new StaticPassValue(); - } - return instance; - } - - /** - * @param val - */ - public void setInitValue(String val) { - init = val; - } - - /** - * @param string - */ - public void setRequestValue(String val) { - request = val; - } - - /** - * @return Returns the init. - */ - public String getInit() { - return init; - } - /** - * @return Returns the request. - */ - public String getRequest() { - return request; - } - - /** - * @return Returns the response. - */ - public String getResponse() { - return response; - } - /** - * @param response The response to set. - */ - public void setResponseValue(String response) { - this.response = response; - } -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/appclients/timeclient/TimeClient.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/appclients/timeclient/TimeClient.java deleted file mode 100644 index 43a660123108ac196f7a54a19f64d27b51b775f3..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/appclients/timeclient/TimeClient.java +++ /dev/null @@ -1,118 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.objectweb.jonas.jtests.appclients.timeclient; - -import javax.naming.InitialContext; -import javax.naming.NamingException; -import javax.xml.namespace.QName; -import javax.xml.rpc.Call; -import javax.xml.rpc.Service; - -/** - * @author Guillaume Sauthier - */ -public class TimeClient { - - /** - * Service Ref Name - */ - private static final String SERVICE_REF_NAME = "java:comp/env/service/time"; - - /** - * InitialContext - */ - private InitialContext ic; - - /** - * - */ - public TimeClient() throws Exception { - init(); - } - - /** - * - */ - private void init() throws NamingException { - ic = new InitialContext(); - } - - public boolean hasBindedService() throws NamingException { - Object o = lookupService(); - if (o != null) { - if (o instanceof Service) { - return true; - } - } - return false; - } - - /* - public boolean isServiceWellConfigured() throws NamingException { - Service s = (Service) lookupService(); - if (s instanceof XXX) { - return true; - } - return false; - } - */ - - private Object lookupService() throws NamingException { - return ic.lookup(SERVICE_REF_NAME); - } - - public static void main(String[] args) throws Exception { - TimeClient tc = new TimeClient(); - - if (!tc.hasBindedService()) { - throw new Exception("TimeClient should have a Service instance binded to '" + SERVICE_REF_NAME + "'"); - } - - tc.handlersInvoked(); - } - - /** - * @return - */ - private boolean handlersInvoked() throws Exception { - Service s = (Service) lookupService(); - Call call = s.createCall(new QName("TimePort"), new QName("jonas:Time", "getDate")); - call.invoke(new Object[] {}); - StaticPassValue spv = StaticPassValue.getInstance(); - String init = spv.getInit(); - String req = spv.getRequest(); - String resp = spv.getResponse(); - if (init == null) { - throw new Exception("Handler.init not invoked"); - } - if (req == null) { - throw new Exception("Handler.handleRequest not invoked"); - } - if (resp == null) { - throw new Exception("Handler.handlerResponse not invoked"); - } - return true; - } -} \ No newline at end of file diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/appclients/timeclient/TimeClientHandler.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/appclients/timeclient/TimeClientHandler.java deleted file mode 100644 index fae24ebcffec26d14574025ab62e4262990f189e..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/appclients/timeclient/TimeClientHandler.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.objectweb.jonas.jtests.appclients.timeclient; - -import javax.xml.namespace.QName; -import javax.xml.rpc.handler.GenericHandler; -import javax.xml.rpc.handler.HandlerInfo; -import javax.xml.rpc.handler.MessageContext; - - - -/** - * - * - * @author Guillaume Sauthier - */ -public class TimeClientHandler extends GenericHandler { - - /* (non-Javadoc) - * @see javax.xml.rpc.handler.Handler#init(javax.xml.rpc.handler.HandlerInfo) - */ - public void init(HandlerInfo hinfo) { - String val = (String) hinfo.getHandlerConfig().get("jonas.test.client.handler"); - StaticPassValue spv = StaticPassValue.getInstance(); - spv.setInitValue(val); - } - - - /* (non-Javadoc) - * @see javax.xml.rpc.handler.Handler#handleRequest(javax.xml.rpc.handler.MessageContext) - */ - public boolean handleRequest(MessageContext mc) { - StaticPassValue spv = StaticPassValue.getInstance(); - spv.setRequestValue("handlerRequest-Invoked"); - return true; - } - - /* (non-Javadoc) - * @see javax.xml.rpc.handler.Handler#handleRequest(javax.xml.rpc.handler.MessageContext) - */ - public boolean handleResponse(MessageContext mc) { - StaticPassValue spv = StaticPassValue.getInstance(); - spv.setResponseValue("handleResponse-Invoked"); - return true; - } - - /* (non-Javadoc) - * @see javax.xml.rpc.handler.Handler#getHeaders() - */ - public QName[] getHeaders() { - return new QName[0]; - } -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/BeanAccessor.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/BeanAccessor.java deleted file mode 100644 index 2a5650fbe7809fdf289dcffc751d031ec8d666da..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/BeanAccessor.java +++ /dev/null @@ -1,14 +0,0 @@ -// BeanAccessor.java - -package org.objectweb.jonas.jtests.beans.mcontext; - -import java.rmi.RemoteException; -import javax.ejb.EJBObject; - -/** - * BeanAccessor remote interface - */ -public interface BeanAccessor extends EJBObject { - public boolean localBeanHasMessageContext() throws RemoteException; - -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/BeanAccessorHome.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/BeanAccessorHome.java deleted file mode 100644 index 765e00931925b692c90627dad5083f4912c5b4c3..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/BeanAccessorHome.java +++ /dev/null @@ -1,15 +0,0 @@ -// BeanAccessorHome.java - -package org.objectweb.jonas.jtests.beans.mcontext; - -import java.rmi.RemoteException; - -import javax.ejb.CreateException; -import javax.ejb.EJBHome; - -/** - * Home interface for the bean BeanAccessor - */ -public interface BeanAccessorHome extends EJBHome { - BeanAccessor create() throws CreateException, RemoteException; -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/BeanAccessorSLR.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/BeanAccessorSLR.java deleted file mode 100644 index 66c33eabd1a1e050d047d42721369f51ca7be40b..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/BeanAccessorSLR.java +++ /dev/null @@ -1,77 +0,0 @@ -// BeanAccessorSLR.java -// Stateless Session bean - -package org.objectweb.jonas.jtests.beans.mcontext; - -import javax.ejb.CreateException; -import javax.ejb.SessionBean; -import javax.ejb.SessionContext; -import javax.naming.Context; -import javax.naming.InitialContext; - -import org.ow2.jonas.lib.util.Log; -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; - - -/** - * - */ -public class BeanAccessorSLR implements SessionBean { - - static private Logger logger = null; - SessionContext ejbContext; - - // ------------------------------------------------------------------ - // SessionBean implementation - // ------------------------------------------------------------------ - - - public void setSessionContext(SessionContext ctx) { - if (logger == null) { - logger = Log.getLogger("org.objectweb.jonas_tests"); - } - logger.log(BasicLevel.DEBUG, ""); - ejbContext = ctx; - } - - - public void ejbRemove() { - logger.log(BasicLevel.DEBUG, ""); - } - - - public void ejbCreate() throws CreateException { - logger.log(BasicLevel.DEBUG, ""); - } - - public void ejbPassivate() { - logger.log(BasicLevel.DEBUG, ""); - } - - public void ejbActivate() { - logger.log(BasicLevel.DEBUG, ""); - } - - // ------------------------------------------------------------------ - // BeanAccessor implementation - // ------------------------------------------------------------------ - - /** - * method1 - */ - public boolean localBeanHasMessageContext() { - logger.log(BasicLevel.DEBUG, ""); - try { - Context ctx = new InitialContext(); - TestMC1LocalHome home = (TestMC1LocalHome) ctx.lookup("TestMC1Home_L"); - TestMC1Local mc1 = home.create(); - return mc1.localMethodHasMessageContext(); - } catch (Exception e) { - logger.log(BasicLevel.WARN, "Something goes wrong"); - } - return true; - } - -} - diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/TestMC1Endpoint.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/TestMC1Endpoint.java deleted file mode 100644 index 94e5c1393e79acbe3b74d806cd05d809cf68139c..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/TestMC1Endpoint.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.objectweb.jonas.jtests.beans.mcontext; - -import java.rmi.Remote; -import java.rmi.RemoteException; - - -/** - * - * - * @author Guillaume Sauthier - */ -public interface TestMC1Endpoint extends Remote { - public boolean serviceEndpointMethodHasMessageContext() throws RemoteException; -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/TestMC1Local.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/TestMC1Local.java deleted file mode 100644 index b2e2478cfbbacb3f9b1e54618977e9527c6915bd..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/TestMC1Local.java +++ /dev/null @@ -1,13 +0,0 @@ -// TestMC1.java - -package org.objectweb.jonas.jtests.beans.mcontext; - -import javax.ejb.EJBLocalObject; - -/** - * TestMC1 local interface - */ -public interface TestMC1Local extends EJBLocalObject { - - public boolean localMethodHasMessageContext(); -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/TestMC1LocalHome.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/TestMC1LocalHome.java deleted file mode 100644 index 52369584de972459bb7e0e68d7329ef8a85228d2..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/TestMC1LocalHome.java +++ /dev/null @@ -1,13 +0,0 @@ -// TestMC1Home.java - -package org.objectweb.jonas.jtests.beans.mcontext; - -import javax.ejb.CreateException; -import javax.ejb.EJBLocalHome; - -/** - * Local Home interface for the bean TestMC1 - */ -public interface TestMC1LocalHome extends EJBLocalHome { - TestMC1Local create() throws CreateException; -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/TestMC1SLL.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/TestMC1SLL.java deleted file mode 100644 index e39aceb27a44b431e974dcf5d557a877aebb719a..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/TestMC1SLL.java +++ /dev/null @@ -1,83 +0,0 @@ -// TestMC1SLL.java -// Stateless Session bean - -package org.objectweb.jonas.jtests.beans.mcontext; - -import javax.ejb.CreateException; -import javax.ejb.SessionBean; -import javax.ejb.SessionContext; -import javax.xml.rpc.handler.MessageContext; - -import org.ow2.jonas.lib.util.Log; -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; - - -/** - * - */ -public class TestMC1SLL implements SessionBean { - - static private Logger logger = null; - SessionContext ejbContext; - - // ------------------------------------------------------------------ - // SessionBean implementation - // ------------------------------------------------------------------ - - - public void setSessionContext(SessionContext ctx) { - if (logger == null) { - logger = Log.getLogger("org.objectweb.jonas_tests"); - } - logger.log(BasicLevel.DEBUG, ""); - ejbContext = ctx; - } - - - public void ejbRemove() { - logger.log(BasicLevel.DEBUG, ""); - } - - - public void ejbCreate() throws CreateException { - logger.log(BasicLevel.DEBUG, ""); - } - - public void ejbPassivate() { - logger.log(BasicLevel.DEBUG, ""); - } - - public void ejbActivate() { - logger.log(BasicLevel.DEBUG, ""); - } - - // ------------------------------------------------------------------ - // TestMC1 implementation - // ------------------------------------------------------------------ - - public boolean serviceEndpointMethodHasMessageContext() { - logger.log(BasicLevel.DEBUG, ""); - return hasMessageContext(); - } - - public boolean localMethodHasMessageContext() { - logger.log(BasicLevel.DEBUG, ""); - return hasMessageContext(); - } - - private boolean hasMessageContext() { - try { - MessageContext mc = ejbContext.getMessageContext(); - if (mc != null) { - return true; - } else { - return false; - } - } catch(IllegalStateException ise) { - return false; - } - } - -} - diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/TestMC2.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/TestMC2.java deleted file mode 100644 index 4eaf18109ac90579bf65e8df82406a6819c5b90f..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/TestMC2.java +++ /dev/null @@ -1,14 +0,0 @@ -// TestMC2.java - -package org.objectweb.jonas.jtests.beans.mcontext; - -import java.rmi.RemoteException; -import javax.ejb.EJBObject; - -/** - * TestMC2 remote interface - */ -public interface TestMC2 extends EJBObject { - public boolean remoteMethodHasMessageContext() throws RemoteException; - -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/TestMC2Endpoint.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/TestMC2Endpoint.java deleted file mode 100644 index 6ea2a077e2a9ed9c39a9c68ae352f70f47dc1394..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/TestMC2Endpoint.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.objectweb.jonas.jtests.beans.mcontext; - -import java.rmi.Remote; -import java.rmi.RemoteException; - -/** - * @author Guillaume Sauthier - */ -public interface TestMC2Endpoint extends Remote { - - public boolean serviceEndpointMethodHasMessageContext() throws RemoteException; -} \ No newline at end of file diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/TestMC2Home.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/TestMC2Home.java deleted file mode 100644 index b129d73449b3e3a8a4b77c45361d061d1850f39a..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/TestMC2Home.java +++ /dev/null @@ -1,15 +0,0 @@ -// TestMC2Home.java - -package org.objectweb.jonas.jtests.beans.mcontext; - -import java.rmi.RemoteException; - -import javax.ejb.CreateException; -import javax.ejb.EJBHome; - -/** - * Home interface for the bean TestMC2 - */ -public interface TestMC2Home extends EJBHome { - TestMC2 create() throws CreateException, RemoteException; -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/TestMC2SLR.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/TestMC2SLR.java deleted file mode 100644 index 89685eeb374198cb35610cb3f8f1822a4f9a636d..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/mcontext/TestMC2SLR.java +++ /dev/null @@ -1,83 +0,0 @@ -// TestMC2SLR.java -// Stateless Session bean - -package org.objectweb.jonas.jtests.beans.mcontext; - -import javax.ejb.CreateException; -import javax.ejb.SessionBean; -import javax.ejb.SessionContext; -import javax.xml.rpc.handler.MessageContext; - -import org.ow2.jonas.lib.util.Log; -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; - - -/** - * - */ -public class TestMC2SLR implements SessionBean { - - static private Logger logger = null; - SessionContext ejbContext; - - // ------------------------------------------------------------------ - // SessionBean implementation - // ------------------------------------------------------------------ - - - public void setSessionContext(SessionContext ctx) { - if (logger == null) { - logger = Log.getLogger("org.objectweb.jonas_tests"); - } - logger.log(BasicLevel.DEBUG, ""); - ejbContext = ctx; - } - - - public void ejbRemove() { - logger.log(BasicLevel.DEBUG, ""); - } - - - public void ejbCreate() throws CreateException { - logger.log(BasicLevel.DEBUG, ""); - } - - public void ejbPassivate() { - logger.log(BasicLevel.DEBUG, ""); - } - - public void ejbActivate() { - logger.log(BasicLevel.DEBUG, ""); - } - - // ------------------------------------------------------------------ - // TestMC2 implementation - // ------------------------------------------------------------------ - - public boolean serviceEndpointMethodHasMessageContext() { - logger.log(BasicLevel.DEBUG, ""); - return hasMessageContext(); - } - - public boolean remoteMethodHasMessageContext() { - logger.log(BasicLevel.DEBUG, ""); - return hasMessageContext(); - } - - private boolean hasMessageContext() { - try { - MessageContext mc = ejbContext.getMessageContext(); - if (mc != null) { - return true; - } else { - return false; - } - } catch(IllegalStateException ise) { - return false; - } - } - -} - diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/time/StaticPassValue.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/time/StaticPassValue.java deleted file mode 100644 index ac61e45c5978ed149faf946c5725950b738fe74c..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/time/StaticPassValue.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.objectweb.jonas.jtests.beans.time; - - -/** - * - * - * @author Guillaume Sauthier - */ -public class StaticPassValue { - - private static StaticPassValue instance = null; - private String init = null; - private String request = null; - /** - * - */ - private StaticPassValue() { - } - - public static StaticPassValue getInstance() { - if (instance == null) { - instance = new StaticPassValue(); - } - return instance; - } - - /** - * @param val - */ - public void setInitValue(String val) { - init = val; - } - - /** - * @param string - */ - public void setRequestValue(String val) { - request = val; - } - - /** - * @return Returns the init. - */ - public String getInit() { - return init; - } - /** - * @return Returns the request. - */ - public String getRequest() { - return request; - } -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/time/TimeBeanHandler.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/time/TimeBeanHandler.java deleted file mode 100644 index 7aa749d2e6e37451da2241f17b9ea0dfdd1ba051..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/time/TimeBeanHandler.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.objectweb.jonas.jtests.beans.time; - -import javax.xml.namespace.QName; -import javax.xml.rpc.handler.GenericHandler; -import javax.xml.rpc.handler.HandlerInfo; -import javax.xml.rpc.handler.MessageContext; - -import org.ow2.jonas.lib.util.Log; -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; - - -/** - * - * - * @author Guillaume Sauthier - */ -public class TimeBeanHandler extends GenericHandler { - - private Logger logger = null; - - /** - * The init method to enable the Handler instance to - * initialize itself. - * @param config handler configuration - */ - public void init(HandlerInfo hinfo) { - if (logger == null) { - logger = Log.getLogger("org.objectweb.jonas_tests"); - } - logger.log(BasicLevel.DEBUG, ""); - String val = (String) hinfo.getHandlerConfig().get("jonas.test.server.handler"); - StaticPassValue spv = StaticPassValue.getInstance(); - spv.setInitValue(val); - } - - /** - * The destroy method indicates the end of lifecycle - * for a Handler instance. - */ - public void destroy() { - logger.log(BasicLevel.DEBUG, ""); - } - - /** - * The handleRequest method processes the request - * SOAP message. The default implementation of this method returns - * true. This indicates that the handler chain - * should continue processing of the request SOAP message. - * @param context the message context - * @return true/false - */ - public boolean handleRequest(MessageContext mc) { - logger.log(BasicLevel.DEBUG, ""); - StaticPassValue spv = StaticPassValue.getInstance(); - spv.setRequestValue("handlerRequest-Invoked"); - return true; - } - - /** - * The handleResponse method processes the response - * message. The default implementation of this method returns - * true. This indicates that the handler chain - * should continue processing of the response SOAP message. - * @param context the message context - * @return true/false - */ - public boolean handleResponse(MessageContext context) { - logger.log(BasicLevel.DEBUG, ""); - return true; - } - - /** - * The handleFault method processes the SOAP faults - * based on the SOAP message processing model. The default - * implementation of this method returns true. This - * indicates that the handler chain should continue processing - * of the SOAP fault. - * @param context the message context - * @return true/false - */ - public boolean handleFault(MessageContext context) { - logger.log(BasicLevel.DEBUG, ""); - return true; - } - - /** - * Gets the header blocks processed by this Handler instance. - * - * @return Array of QNames of header blocks processed by this handler instance. - * QName is the qualified name of the outermost element of the Header block. - */ - public QName[] getHeaders() { - logger.log(BasicLevel.DEBUG, ""); - return new QName[0]; - } - -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/time/TimeBeanSLR.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/time/TimeBeanSLR.java deleted file mode 100644 index d3f41a201eef12803618573333c9bbeaf0852689..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/time/TimeBeanSLR.java +++ /dev/null @@ -1,77 +0,0 @@ -// TimeBeanSLR.java -// Stateless Session bean - -package org.objectweb.jonas.jtests.beans.time; - -import java.util.Date; - -import javax.ejb.CreateException; -import javax.ejb.SessionBean; -import javax.ejb.SessionContext; - -import org.ow2.jonas.lib.util.Log; -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; - -/** - * - */ -public class TimeBeanSLR implements SessionBean { - - static private Logger logger = null; - SessionContext ejbContext; - - // ------------------------------------------------------------------ - // SessionBean implementation - // ------------------------------------------------------------------ - - - public void setSessionContext(SessionContext ctx) { - if (logger == null) { - logger = Log.getLogger("org.objectweb.jonas_tests"); - } - logger.log(BasicLevel.DEBUG, ""); - ejbContext = ctx; - } - - - public void ejbRemove() { - logger.log(BasicLevel.DEBUG, ""); - } - - - public void ejbCreate() throws CreateException { - logger.log(BasicLevel.DEBUG, ""); - } - - public void ejbPassivate() { - logger.log(BasicLevel.DEBUG, ""); - } - - public void ejbActivate() { - logger.log(BasicLevel.DEBUG, ""); - } - - // ------------------------------------------------------------------ - // TimeBean implementation - // ------------------------------------------------------------------ - - public long getDateAsLong() { - logger.log(BasicLevel.DEBUG, ""); - return new Date().getTime(); - } - - public Date getDate() { - logger.log(BasicLevel.DEBUG, ""); - return new Date(); - } - - public boolean isHandlerInitRequestInvoked() { - logger.log(BasicLevel.DEBUG, ""); - StaticPassValue spv = StaticPassValue.getInstance(); - String init = spv.getInit(); - String req = spv.getRequest(); - return (init != null && req != null); - } -} - diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/time/TimeEndpoint.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/time/TimeEndpoint.java deleted file mode 100644 index c335b162c1702307fd4d02e53a3a44d8b6e94078..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/time/TimeEndpoint.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.objectweb.jonas.jtests.beans.time; - -import java.rmi.Remote; -import java.rmi.RemoteException; -import java.util.Date; - - -/** - * TimeBean service-endpoint interface - * Methods exposed a webservices - * - * @author Guillaume Sauthier - */ -public interface TimeEndpoint extends Remote { - long getDateAsLong() throws RemoteException; - Date getDate() throws RemoteException; - boolean isHandlerInitRequestInvoked() throws RemoteException; -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/wsclient/WsClient1.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/wsclient/WsClient1.java deleted file mode 100644 index 08ca6eb9a9a35e0f00d21281d80eb4ef75fe4e4d..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/wsclient/WsClient1.java +++ /dev/null @@ -1,16 +0,0 @@ -// WsClient1.java - -package org.objectweb.jonas.jtests.beans.wsclient; - -import java.rmi.RemoteException; -import javax.ejb.EJBObject; -import javax.xml.rpc.ServiceException; - -/** - * WsClient1 remote interface - */ -public interface WsClient1 extends EJBObject { - public boolean lookupServiceJNDI() throws RemoteException; - public boolean lookupServiceName() throws RemoteException; - public void getAllServiceNames() throws RemoteException, ServiceException; -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/wsclient/WsClient1Home.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/wsclient/WsClient1Home.java deleted file mode 100644 index 5d12b9cd276f8541ebd16f19435e6f0f07aa8c08..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/wsclient/WsClient1Home.java +++ /dev/null @@ -1,15 +0,0 @@ -// WsClient1Home.java - -package org.objectweb.jonas.jtests.beans.wsclient; - -import java.rmi.RemoteException; - -import javax.ejb.CreateException; -import javax.ejb.EJBHome; - -/** - * Home interface for the bean WsClient1 - */ -public interface WsClient1Home extends EJBHome { - WsClient1 create() throws CreateException, RemoteException; -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/wsclient/WsClient1SLR.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/wsclient/WsClient1SLR.java deleted file mode 100644 index 5684d7d7bd7fe0d7601e4d97562864eaed98d79c..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/beans/wsclient/WsClient1SLR.java +++ /dev/null @@ -1,105 +0,0 @@ -// WsClient1SLR.java -// Stateless Session bean - -package org.objectweb.jonas.jtests.beans.wsclient; - - - -import java.rmi.RemoteException; -import javax.ejb.CreateException; -import javax.ejb.SessionBean; -import javax.ejb.SessionContext; -import javax.naming.InitialContext; -import javax.naming.NamingException; -import javax.xml.namespace.QName; -import javax.xml.rpc.Call; -import javax.xml.rpc.Service; -import javax.xml.rpc.ServiceException; -import org.ow2.jonas.lib.util.Log; -import org.objectweb.util.monolog.api.BasicLevel; -import org.objectweb.util.monolog.api.Logger; - - -/** - * - */ -public class WsClient1SLR implements SessionBean { - - static private Logger logger = null; - SessionContext ejbContext; - - Service service; - - // ------------------------------------------------------------------ - // SessionBean implementation - // ------------------------------------------------------------------ - - - public void setSessionContext(SessionContext ctx) { - if (logger == null) { - logger = Log.getLogger("org.objectweb.jonas_tests"); - } - logger.log(BasicLevel.DEBUG, ""); - ejbContext = ctx; - } - - - public void ejbRemove() { - logger.log(BasicLevel.DEBUG, ""); - } - - - public void ejbCreate() throws CreateException { - logger.log(BasicLevel.DEBUG, ""); - } - - public void ejbPassivate() { - logger.log(BasicLevel.DEBUG, ""); - } - - public void ejbActivate() { - logger.log(BasicLevel.DEBUG, ""); - } - - // ------------------------------------------------------------------ - // WsClient1 implementation - // ------------------------------------------------------------------ - - public boolean lookupServiceJNDI() { - logger.log(BasicLevel.DEBUG, "lookupServiceJNDI"); - service = null; - try { - InitialContext ic = new InitialContext(); - service = (Service) ic.lookup("ws/XMethodsService"); - } catch (NamingException ne) { - logger.log(BasicLevel.ERROR, "looking ws/XMethodsService : " + ne.getMessage()); - return false; - } - return (service != null); - } - - public boolean lookupServiceName() { - logger.log(BasicLevel.DEBUG, "lookupServiceName"); - service = null; - try { - InitialContext ic = new InitialContext(); - service = (Service) ic.lookup("java:comp/env/service/XMethods"); - } catch (NamingException ne) { - logger.log(BasicLevel.ERROR, "looking java:comp/env/service/XMethods : " + ne.getMessage()); - return false; - } - return (service != null); - } - - public void getAllServiceNames() throws ServiceException, RemoteException { - logger.log(BasicLevel.DEBUG, "getAllServiceNames"); - - lookupServiceName(); - Call call = service.createCall(new QName("XMethodsQuerySoap"), - new QName("getAllServiceNames")); - call.invoke(new Object[] {}); - - logger.log(BasicLevel.DEBUG, "Call is OK"); - } -} - diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/endpoint/C_endpoint.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/endpoint/C_endpoint.java deleted file mode 100644 index 8cb7ee09bfaca4c5d6650bf66e0cc4bcdcecfc8e..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/endpoint/C_endpoint.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.objectweb.jonas.jtests.clients.endpoint; - -import junit.framework.Test; -import junit.framework.TestSuite; - -import org.objectweb.jonas.jtests.util.JWebServicesTestCase; - - -/** - * - * - * @author Guillaume Sauthier - */ -public class C_endpoint extends JWebServicesTestCase { - - public C_endpoint(String name) { - super(name); - } - - /** - * This suite run WsGen test cases - */ - public static Test suite() { - TestSuite suite = new TestSuite(); - suite.addTest(F_TimeEndpoint.suite()); - return suite; - } - - public static void main (String args[]) { - junit.textui.TestRunner.run(suite()); - } - -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/endpoint/F_TimeEndpoint.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/endpoint/F_TimeEndpoint.java deleted file mode 100644 index 7e1ad637347abba435b2864a265d5e32913c5de4..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/endpoint/F_TimeEndpoint.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.objectweb.jonas.jtests.clients.endpoint; - -import java.io.File; -import java.util.Calendar; - -import javax.wsdl.Definition; -import javax.wsdl.Import; -import javax.wsdl.factory.WSDLFactory; -import javax.wsdl.xml.WSDLReader; -import javax.xml.namespace.QName; -import javax.xml.rpc.Call; -import javax.xml.rpc.Service; -import javax.xml.rpc.ServiceFactory; - -import junit.framework.Test; -import junit.framework.TestSuite; - -import org.ow2.jonas.lib.util.Cmd; - -import org.objectweb.jonas.jtests.util.JWebServicesTestCase; - -/** - * @author Guillaume Sauthier - */ -public class F_TimeEndpoint extends JWebServicesTestCase { - - private static final String TIMEPORT_URL = "/time/TimePort/TimePort"; - - /** - * @param s - */ - public F_TimeEndpoint(String s) { - super(s); - } - - public static Test suite() { - return new TestSuite(F_TimeEndpoint.class); - } - - public void setUp() throws Exception { - super.setUp(); - - useEar("time-test"); - } - - public void tearDown() throws Exception { - super.tearDown(); - } - - public void testTimeEndpoint() throws Exception { - String port = System.getProperty("http.port"); - - Service service = ServiceFactory.newInstance().createService(new QName("jonas:Time", "TimeBeanService")); - Call call = service.createCall(new QName("TimePort"), new QName("getDate")); - call.setTargetEndpointAddress("http://localhost:" + port + TIMEPORT_URL); - Calendar cal = (Calendar) call.invoke(new Object[] {}); - - assertNotNull("ServiceEndpoint performed succesfully", cal); - } - - public void testTimeEndpointServerHandler() throws Exception { - String port = System.getProperty("http.port"); - - Service service = ServiceFactory.newInstance().createService(new QName("jonas:Time", "TimeBeanService")); - Call call = service.createCall(new QName("TimePort"), new QName("isHandlerInitRequestInvoked")); - call.setTargetEndpointAddress("http://localhost:" + port + TIMEPORT_URL); - Boolean b = (Boolean) call.invoke(new Object[] {}); - - assertTrue("Handler were not invoked successfully", b.booleanValue()); - } - - public void testTimeEndpointFromAppClient() throws Exception { - - String javaHomeBin = System.getProperty("java.home") + File.separator + "bin" + File.separator; - String jonasRoot = System.getProperty("jonas.root"); - String jonasBase = System.getProperty("jonas.base.client"); - - Cmd cmd = new Cmd(javaHomeBin + "java"); - - cmd.addArgument("-Djava.endorsed.dirs=" + jonasRoot + File.separator + "lib" + File.separator + "endorsed"); - - // classpath - cmd.addArgument("-classpath"); - - String jonasBaseConf = jonasBase + File.separator + "conf"; - String clientJarPath = jonasBase + File.separator + "conf" + File.pathSeparator + jonasRoot + File.separator + "lib" - + File.separator + "client.jar"; - String jonasClientJarPath = jonasRoot + File.separator + "lib" + File.separator + "jonas-client.jar"; - cmd.addArgument(jonasBaseConf + File.pathSeparator + clientJarPath + File.pathSeparator + jonasClientJarPath); - cmd.addArgument("org.ow2.jonas.client.ClientContainer"); - // ear - cmd.addArgument(jonasBase + File.separator + "apps" + File.separator + "time-test.ear"); - - if (!cmd.run()) { - fail("Client fail see output for informations"); - } - } - - - public void testTimeEndpointURLPublication() throws Exception { - String port = System.getProperty("http.port"); - - String url = "http://localhost:" + port + TIMEPORT_URL + "?JWSDL"; - WSDLFactory factory = WSDLFactory.newInstance(); - WSDLReader reader = factory.newWSDLReader(); - reader.setFeature("javax.wsdl.importDocuments", true); - Definition def = reader.readWSDL(url); - - Import imp = (Import) def.getImports("jonas:Time").get(0); - assertEquals("wsdl:import[@location] not updated !", url + "&filename=Time.wsdl&context=.", imp.getLocationURI()); - } - -} \ No newline at end of file diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/mbeans/C_mbeans.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/mbeans/C_mbeans.java deleted file mode 100644 index b65f9ebf08c5f462f4bf956e456f6d7c9e54fd69..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/mbeans/C_mbeans.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.objectweb.jonas.jtests.clients.mbeans; - -import junit.framework.Test; -import junit.framework.TestSuite; - -public class C_mbeans { - - public C_mbeans() { - super(); - // TODO Auto-generated constructor stub - } - - /** - * This suite run BMP + CMP test cases - */ - public static Test suite() { - TestSuite suite = new TestSuite(); - suite.addTest(F_WebServicesMBeans.suite()); - return suite; - } - - public static void main (String args[]) { - junit.textui.TestRunner.run(suite()); - } -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/mbeans/F_WebServicesMBeans.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/mbeans/F_WebServicesMBeans.java deleted file mode 100644 index caf67b6b1fa3a5d9a0bb70bf6d0ee5debcc4c983..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/mbeans/F_WebServicesMBeans.java +++ /dev/null @@ -1,296 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2005 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.objectweb.jonas.jtests.clients.mbeans; - -import java.util.Properties; - -import javax.management.ObjectName; -import javax.management.j2ee.Management; -import javax.management.j2ee.ManagementHome; -import javax.naming.InitialContext; -import javax.rmi.PortableRemoteObject; -import javax.security.auth.login.LoginContext; -import javax.security.auth.callback.CallbackHandler; - -import junit.framework.Test; -import junit.framework.TestSuite; - -import org.objectweb.jonas.jtests.util.JWebServicesTestCase; -import org.ow2.jonas.security.auth.callback.NoInputCallbackHandler; - -/** - * Test WebServices MBeans (WebServices, Service, PortComponent and Handler). - * - * @author Guillaume Sauthier - */ -public class F_WebServicesMBeans extends JWebServicesTestCase { - - /** - * MEJB instance - */ - private Management mejb = null; - - /** - * Service of Time Sample's ObjectName - */ - private static final String SERVICE_MBEAN_ON = "jonas:type=WebService,name=TimeWebService,J2EEServer=jonas,J2EEApplication=time-test,EJBModule=time"; - - /** - * PortComponent of Time Sample's ObjectName - */ - private static final String PC_MBEAN_ON = "jonas:type=WebServicePortComponent,name=TimePort,WebService=TimeWebService,J2EEServer=jonas,EJBModule=time,J2EEApplication=time-test"; - - /** - * Handler of Time Sample's ObjectName - */ - private static final String HANDLER_MBEAN_ON = "jonas:type=WebServiceHandler,name=TimeBeanHandler,WebServicePortComponent=TimePort,EJBModule=time,J2EEServer=jonas,J2EEApplication=time-test,WebService=TimeWebService"; - - /** - * SessionBean realizing the Time Service - */ - private static final String SSB_MBEAN_ON = "jonas:j2eeType=StatelessSessionBean,name=TimeBeanSLR,EJBModule=time,J2EEApplication=time-test,J2EEServer=jonas"; - - // =================== Attributes pre-filling ====================================== - - /** - * Service.portComponents - */ - private static final String[] SERVICE_PCS_ATT = new String[] { PC_MBEAN_ON }; - - /** - * PortComponent.handlers - */ - private static final String[] PC_HANDLERS_ATT = new String[] { HANDLER_MBEAN_ON }; - - /** - * Handler.soapHeaders - */ - private static final String[] SOAP_HEADERS = new String[] { }; - - /** - * Handler.soapRoles - */ - private static final String[] SOAP_ROLES = new String[] { }; - - /** - * Handler.initParams - */ - private static Properties INIT_PARAMS = null; - - /** - * Inner static class used to store tests expected results - * - * @author Guillaume Sauthier - */ - private static class WsTest { - /** - * MBean attribute name - */ - public String name; - - /** - * MBean attribute type - */ - public Class type; - - /** - * Expected result - */ - public Object expected; - - /** - * does the String represents an ObjectName ? - */ - public boolean isObjectName; - - /** - * WsTest Constructor - * @param name att name - * @param type att type - * @param expected att value - */ - public WsTest(String name, Class type, Object expected) { - this(name, type, expected, false); - } - - /** - * WsTest Constructor - * @param name att name - * @param type att type - * @param expected att value - */ - public WsTest(String name, Class type, Object expected, boolean on) { - super(); - this.name = name; - this.type = type; - this.expected = expected; - this.isObjectName = on; - } - } - - /** - * Tests values for Service MBean - */ - private WsTest[] SERVICE_TEST = null; - - /** - * Tests values for PortComponent MBean - */ - private WsTest[] PORT_TEST = null; - - /** - * Tests values for Handler MBean - */ - private WsTest[] HANDLER_TEST = null; - - /** - * Are the tables init ? - */ - private boolean initialized = false; - - /** - * The LoginContext to be used for security. - */ - private LoginContext context; - - public F_WebServicesMBeans(String s) { - super(s); - } - - public static Test suite() { - return new TestSuite(F_WebServicesMBeans.class); - } - - public void setUp() throws Exception { - super.setUp(); - useEar("time-test"); - CallbackHandler handler = new NoInputCallbackHandler("jonas", "jonas"); - context = new LoginContext("test", handler); - context.login(); - - mejb = getMEJB(); - if (!initialized) { - initTestsTables(); - initialized = true; - } - } - - /** - * init tables - */ - private void initTestsTables() { - - INIT_PARAMS = new Properties(); - INIT_PARAMS.put("jonas.test.server.handler", "JOnAS"); - - SERVICE_TEST = new WsTest[] { - new WsTest("name", java.lang.String.class, "TimeWebService"), - new WsTest("portComponents", java.lang.String[].class, SERVICE_PCS_ATT, true), - new WsTest("wsdlURL", java.lang.String.class, getAbsoluteUrl("/time/TimePort/TimePort?JWSDL")), - new WsTest("mappingFilename", java.lang.String.class, "META-INF/mapping.xml"), - new WsTest("wsdlFilename", java.lang.String.class, "META-INF/wsdl/TimePort.wsdl") }; - - PORT_TEST = new WsTest[] { - new WsTest("name", java.lang.String.class, "TimePort"), - new WsTest("handlers", java.lang.String[].class, PC_HANDLERS_ATT, true), - new WsTest("wsdlPort", java.lang.String.class, "{jonas:Time}TimePort"), - new WsTest("serviceEndpointInterface", java.lang.String.class, "org.objectweb.jonas.jtests.beans.time.TimeEndpoint"), - new WsTest("endpoint", java.lang.String.class, getAbsoluteUrl("/time/TimePort/TimePort")), - new WsTest("implementationBean", java.lang.String.class, SSB_MBEAN_ON, true) }; - - HANDLER_TEST = new WsTest[] { - new WsTest("name", java.lang.String.class, "TimeBeanHandler"), - new WsTest("classname", java.lang.String.class, "org.objectweb.jonas.jtests.beans.time.TimeBeanHandler"), - new WsTest("soapHeaders", java.lang.String[].class, SOAP_HEADERS), - new WsTest("soapRoles", java.lang.String[].class, SOAP_ROLES), - new WsTest("initParams", java.util.Properties.class, INIT_PARAMS) }; - - } - - - private Management getMEJB() throws Exception { - InitialContext ic = new InitialContext(); - Object o = ic.lookup("ejb/mgmt/MEJB"); - ManagementHome home = (ManagementHome) PortableRemoteObject.narrow(o, ManagementHome.class); - return home.create(); - } - - public void tearDown() throws Exception { - mejb = null; - context.logout(); - super.tearDown(); - } - - public void testWebServiceMBean() throws Exception { - checkMBean(SERVICE_MBEAN_ON, SERVICE_TEST); - } - - public void testPortComponentMBean() throws Exception { - checkMBean(PC_MBEAN_ON, PORT_TEST); - // check that the implementationBean is live - String se = (String) mejb.getAttribute(new ObjectName(PC_MBEAN_ON), "implementationBean"); - assertTrue("implementationBean MBean must be registered", mejb.isRegistered(new ObjectName(se))); - } - - public void testHandlerMBean() throws Exception { - checkMBean(HANDLER_MBEAN_ON, HANDLER_TEST); - } - - private void checkMBean(String onStr, WsTest[] tests) throws Exception { - ObjectName on = ObjectName.getInstance(onStr); - assertTrue("ObjectName not registered " + on, mejb.isRegistered(on)); - - for (int i = 0; i < tests.length; i++) { - - boolean isObjectName = tests[i].isObjectName; - - Object o = mejb.getAttribute(on, tests[i].name); - assertNotNull("Cannot retrieve attribute '" + tests[i].name - + "' from " + on, o); - assertEquals("Expecting type " + tests[i].type + " for attribute " - + tests[i].name, tests[i].type, o.getClass()); - if (tests[i].type.isArray()) { - Object[] a1 = (Object[]) o; - Object[] a2 = (Object[]) tests[i].expected; - assertEquals("'" + tests[i].name + "' Array size error", a2.length, a1.length); - - for (int j = 0; j < a1.length; j++) { - if (isObjectName) { - assertEquals("'" + tests[i].name + "[" + j + "]' mismatch", new ObjectName((String) a2[j]), new ObjectName((String) a1[j])); - } else { - assertEquals("'" + tests[i].name + "[" + j + "]' mismatch", a2[j], a1[j]); - } - } - } else { - if (isObjectName) { - assertEquals("'" + tests[i].name + "' mismatch", new ObjectName((String) tests[i].expected), new ObjectName((String) o)); - } else { - assertEquals("'" + tests[i].name + "' mismatch", tests[i].expected, o); - } - } - } - } - -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/mcontext/F_MessageContext.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/mcontext/F_MessageContext.java deleted file mode 100644 index 9bb28a5ff466b60d008137176b7f0d0da318a924..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/mcontext/F_MessageContext.java +++ /dev/null @@ -1,126 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jtests.clients.mcontext; - -import javax.xml.namespace.QName; -import javax.xml.rpc.Call; -import javax.xml.rpc.Service; -import javax.xml.rpc.ServiceFactory; - -import junit.framework.Test; -import junit.framework.TestSuite; - -import org.objectweb.jonas.jtests.beans.mcontext.BeanAccessor; -import org.objectweb.jonas.jtests.beans.mcontext.BeanAccessorHome; -import org.objectweb.jonas.jtests.beans.mcontext.TestMC2; -import org.objectweb.jonas.jtests.beans.mcontext.TestMC2Home; -import org.objectweb.jonas.jtests.util.JWebServicesTestCase; - -/** - * test case for MessageContext use between web & ejb container - */ -public class F_MessageContext extends JWebServicesTestCase { - - public F_MessageContext(String name) { - super(name); - } - - public static Test suite() { - return new TestSuite(F_MessageContext.class); - } - - public void setUp() throws Exception { - super.setUp(); - - useEar("mcontext"); - } - - public void tearDown() throws Exception { - super.tearDown(); - } - - - public void testWSCallLocal() throws Exception { - String port = System.getProperty("http.port"); - - Service service = ServiceFactory.newInstance().createService(new QName("jonas:MessageContextTest", - "MessageContextTestService")); - Call call = service.createCall(new QName("LocalMContextPort"), - new QName("serviceEndpointMethodHasMessageContext")); - call.setTargetEndpointAddress("http://localhost:" + port + "/mcontext/MessageContextWS/LocalMContextPort"); - Boolean b = (Boolean) call.invoke(new Object[]{}); - - assertTrue("ServiceEndpoint invokation cannot access the MessageContext", - b.booleanValue()); - } - - public void testWSCallRemote() throws Exception { - String port = System.getProperty("http.port"); - - Service service = ServiceFactory.newInstance().createService(new QName("jonas:MessageContextTest", - "MessageContextTestService")); - Call call = service.createCall(new QName("RemoteMContextPort"), - new QName("serviceEndpointMethodHasMessageContext")); - call.setTargetEndpointAddress("http://localhost:" + port + "/mcontext/MessageContextWS/RemoteMContextPort"); - Boolean b = (Boolean) call.invoke(new Object[]{}); - - assertTrue("ServiceEndpoint invokation cannot access the MessageContext", - b.booleanValue()); - } - - public void testEJBCallLocal() throws Exception { - BeanAccessorHome home = (BeanAccessorHome) ictx.lookup("BeanAccessorHome"); - BeanAccessor accessor = home.create(); - assertFalse("ejb call have access to the MessageContext.", - accessor.localBeanHasMessageContext()); - } - - public void testEJBCallRemote() throws Exception { - Object obj = ictx.lookup("TestMC2Home"); - TestMC2Home home = (TestMC2Home) javax.rmi.PortableRemoteObject.narrow(obj, TestMC2Home.class); - TestMC2 mc2 = home.create(); - assertFalse("ejb call have access to the MessageContext.", - mc2.remoteMethodHasMessageContext()); - } - - public static void main (String args[]) { - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String s_arg = args[argn]; - Integer i_arg; - if (s_arg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_MessageContext(testtorun)); - } - } - -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/service/A_ServiceUsage.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/service/A_ServiceUsage.java deleted file mode 100644 index ae8fb49ac391cbfd45c1897c6eadb9eb500fb95b..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/service/A_ServiceUsage.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jtests.clients.service; - -import org.objectweb.jonas.jtests.util.JWebServicesTestCase; - -/** - * abstract test case for web service usage (client side) - */ -public abstract class A_ServiceUsage extends JWebServicesTestCase { - - public A_ServiceUsage(String name) { - super(name); - } - - public void setUp() throws Exception { - super.setUp(); - useBeans("wsclient"); - } - - public void tearDown() throws Exception { - super.tearDown(); - unUseBeans("wsclient"); - } - -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/service/C_service.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/service/C_service.java deleted file mode 100644 index 51978a54a0c1f8ca1e4f88f228dabad8e6beccfc..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/service/C_service.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jtests.clients.service; - -import junit.framework.Test; -import junit.framework.TestSuite; -import org.objectweb.jonas.jtests.util.JWebServicesTestCase; - -public class C_service extends JWebServicesTestCase { - - public C_service(String name) { - super(name); - } - - /** - * This suite run BMP + CMP test cases - */ - public static Test suite() { - TestSuite suite = new TestSuite(); - suite.addTest(F_AxisService.suite()); - return suite; - } - - public static void main (String args[]) { - junit.textui.TestRunner.run(suite()); - } -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/service/F_AgnosticServiceUsage.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/service/F_AgnosticServiceUsage.java deleted file mode 100644 index 1fb72017487edf5996d6443b5abcb5c49c1582fd..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/service/F_AgnosticServiceUsage.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jtests.clients.service; - -import javax.rmi.PortableRemoteObject; - -import junit.framework.Test; -import junit.framework.TestSuite; - -import org.objectweb.jonas.jtests.beans.wsclient.WsClient1; -import org.objectweb.jonas.jtests.beans.wsclient.WsClient1Home; - -/** - * test case for web service usage (client side) - */ -public class F_AgnosticServiceUsage extends A_ServiceUsage { - - protected static final String BEAN_HOME = "WsClient1Home"; - protected WsClient1Home home = null; - - public F_AgnosticServiceUsage(String name) { - super(name); - } - - public static Test suite() { - return new TestSuite(F_AgnosticServiceUsage.class); - } - - public void setUp() throws Exception { - super.setUp(); - } - - public void tearDown() throws Exception { - super.tearDown(); - } - - protected WsClient1Home getHome() throws Exception { - if (home == null) { - home = (WsClient1Home) PortableRemoteObject.narrow(ictx.lookup(BEAN_HOME),WsClient1Home.class) ; - } - assertTrue(home != null); - return home; - } - - public void testJNDILookupWithJNDIName() throws Exception { - WsClient1 wsc = getHome().create(); - assertFalse("lookup with jndi name must fail", wsc.lookupServiceJNDI()); - wsc.remove(); - } - - public void testJNDILookupWithServiceRefName() throws Exception { - WsClient1 wsc = getHome().create(); - assertTrue("lookup with service-ref-name fail", wsc.lookupServiceName()); - wsc.remove(); - } - - public static void main (String args[]) { - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String s_arg = args[argn]; - if (s_arg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_AgnosticServiceUsage(testtorun)); - } - } - -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/service/F_AxisService.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/service/F_AxisService.java deleted file mode 100644 index f50844a982f18474c81db17f8515adb518a3cb3d..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/service/F_AxisService.java +++ /dev/null @@ -1,408 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.objectweb.jonas.jtests.clients.service; - -import java.io.BufferedReader; -import java.io.File; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Reader; -import java.io.StringReader; -import java.io.StringWriter; -import java.net.URL; -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; - -import javax.naming.RefAddr; -import javax.naming.Reference; -import javax.naming.StringRefAddr; -import javax.xml.namespace.QName; - -import junit.framework.Test; -import junit.framework.TestSuite; - -import org.custommonkey.xmlunit.Diff; -import org.custommonkey.xmlunit.XMLAssert; -import org.custommonkey.xmlunit.XMLUnit; -import org.objectweb.jonas.jtests.util.JWebServicesTestCase; -import org.ow2.jonas.deployment.common.digester.JDigester; -import org.ow2.jonas.deployment.common.rules.JonasServiceRefRuleSet; -import org.ow2.jonas.deployment.common.rules.ServiceRefRuleSet; -import org.ow2.jonas.deployment.ws.ServiceRefDesc; -import org.ow2.jonas.lib.util.JNDIUtils; -import org.ow2.jonas.ws.axis.JAxisServiceFactory; -import org.ow2.jonas.ws.jaxrpc.factory.JServiceFactory; - -/** - * test case for axis service instanciation - */ -public class F_AxisService extends JWebServicesTestCase { - private String resources = null; - - private JServiceFactory jfactory = null; - - public F_AxisService(String name) { - super(name); - } - - public static Test suite() { - return new TestSuite(F_AxisService.class); - } - - public void setUp() throws Exception { - super.setUp(); - resources = System.getProperty("ws.resources"); - jfactory = new JAxisServiceFactory(); - } - - public void tearDown() throws Exception { - jfactory = null; - super.tearDown(); - } - - public void testClientWSDDDefaultWhenWSDDNotSpecified() throws Exception { - String expected = "\n" - + "\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + "\n"; - Reference ref = createServiceReference("no-wsdd-specified-j2ee.xml", - "no-wsdd-specified-jonas.xml"); - assertNotNull("Shouldn't have a wsdd", ref.get(JAxisServiceFactory.REF_CLIENT_CONFIG)); - - String returned = (String) ref.get(JAxisServiceFactory.REF_CLIENT_CONFIG).getContent(); - XMLUnit.setIgnoreWhitespace(true); - Diff diff = XMLUnit.compareXML(expected, returned); - XMLAssert.assertXMLEqual("WSDD are not equivalent", diff, true); - } - - public void testClientWSDDMergingWhenWSDDSpecified() throws Exception { - String expected = "\n" - + "\n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" - + " \n" + "\n"; - Reference ref = createServiceReference("wsdd-specified-j2ee.xml", - "wsdd-specified-jonas.xml"); - - String returned = (String) ref.get(JAxisServiceFactory.REF_CLIENT_CONFIG).getContent(); - XMLUnit.setIgnoreWhitespace(true); - Diff diff = XMLUnit.compareXML(expected, returned); - XMLAssert.assertXMLEqual("WSDD are not equivalent", diff, true); - } - - public void testWSDLUrlWithNoWSDLOverride() throws Exception { - Reference ref = createServiceReference("wsdl-url-default-j2ee.xml", - "wsdl-url-default-jonas.xml"); - URL urlMatching = new File(new File(resources, "wsdl"), "oneService.wsdl").toURL(); - assertEquals("WSDL URL is not set appropriately", - urlMatching.toString(), - ref.get(JAxisServiceFactory.REF_SERVICE_WSDL).getContent()); - } - - public void testWSDLUrlWithWSDLOverride() throws Exception { - Reference ref = createServiceReference("wsdl-url-override-j2ee.xml", - "wsdl-url-override-jonas.xml"); - // create matching URL - URL urlMatching = new File(new File(resources, "wsdl"), "twoService.wsdl").toURL(); - assertEquals( - "WSDL URL is not set appropriately", - urlMatching.toString(), - ref.get(JAxisServiceFactory.REF_SERVICE_WSDL).getContent()); - } - - public void testServiceQNameWhenNotSpecified() throws Exception { - Reference ref = createServiceReference("service-qname-auto-j2ee.xml", - "service-qname-auto-jonas.xml"); - QName exp = new QName("http://hello.simple", "HelloWsService"); - QName auto = (QName) JNDIUtils.getObjectFromBytes((byte[]) ref.get( - JAxisServiceFactory.REF_SERVICE_QNAME).getContent()); - assertEquals("Service QName is incorrect", exp, auto); - } - - public void testServiceQNameWhenExplicitelySet() throws Exception { - Reference ref = createServiceReference( - "service-qname-explicit-j2ee.xml", - "service-qname-explicit-jonas.xml"); - QName exp = new QName("http://hello.simple", "HelloWsService2"); - QName auto = (QName) JNDIUtils.getObjectFromBytes((byte[]) ref.get( - JAxisServiceFactory.REF_SERVICE_QNAME).getContent()); - assertEquals("Service QName is incorrect", exp, auto); - } - - public void testPort2WSDLMapWhenNoPortComponentRefSpecified() - throws Exception { - Reference ref = createServiceReference("no-port2wsdl-map-j2ee.xml", - "no-port2wsdl-map-jonas.xml"); - assertNull("Shouldn't have a Port2WSDL Map", ref - .get(JAxisServiceFactory.REF_SERVICE_PORT2WSDL)); - } - - public void testPort2WSDLMapWithMultiplePortComponent() throws Exception { - Reference ref = createServiceReference("port2wsdl-map-j2ee.xml", - "port2wsdl-map-jonas.xml"); - Map exp = new HashMap(); - exp.put("org.objectweb.jonas.jtests.hello.HelloWs", new QName( - "http://hello.simple", "HelloPortComponent")); - exp.put("org.objectweb.jonas.jtests.hello.HelloWs2", new QName( - "http://hello.simple", "HelloPortComponent2")); - Map returned = (Map) JNDIUtils.getObjectFromBytes((byte[]) ref.get( - JAxisServiceFactory.REF_SERVICE_PORT2WSDL).getContent()); - assertEquals("Map are not identical", exp, returned); - } - - public void testStubPropertiesNull() throws Exception { - Reference ref = createServiceReference("stub-props-null-j2ee.xml", - "stub-props-null-jonas.xml"); - assertNull("Stub properties should be null", ref - .get(JAxisServiceFactory.REF_SERVICE_STUB_PROPS - + "_HelloPortComponent")); - } - - public void testStubPropertiesEmpty() throws Exception { - Reference ref = createServiceReference("stub-props-empty-j2ee.xml", - "stub-props-empty-jonas.xml"); - RefAddr ra = ref.get(JAxisServiceFactory.REF_SERVICE_STUB_PROPS - + "_HelloPortComponent"); - assertNull("RefAddr " + JAxisServiceFactory.REF_SERVICE_STUB_PROPS - + "_HelloPortComponent" + " must be null", ra); - RefAddr ra2 = ref.get(JAxisServiceFactory.REF_SERVICE_STUB_PROPS - + "_HelloPortComponent2"); - assertNull("RefAddr " + JAxisServiceFactory.REF_SERVICE_STUB_PROPS - + "_HelloPortComponent2" + " must be null", ra2); - } - - public void testStubPropertiesForGivenPortName() throws Exception { - Reference ref = createServiceReference("stub-props-j2ee.xml", - "stub-props-jonas.xml"); - // port #1 - RefAddr ra = ref.get(JAxisServiceFactory.REF_SERVICE_STUB_PROPS - + "_HelloPortComponent"); - assertNotNull("RefAddr " + JAxisServiceFactory.REF_SERVICE_STUB_PROPS - + "_HelloPortComponent" + " must be not null", ra); - Map returned = (Map) JNDIUtils.getObjectFromBytes((byte[]) ra - .getContent()); - assertFalse("Stub properties shouldn't be empty", returned.isEmpty()); - Properties exp = new Properties(); - exp.setProperty("my.test.property", "test.value"); - exp.setProperty("my.test.property.2", "test.value.2"); - assertEquals( - "Stub Properties for port 'HelloPortComponent' not identical", - exp, returned); - // port #2 - RefAddr ra2 = ref.get(JAxisServiceFactory.REF_SERVICE_STUB_PROPS - + "_HelloPortComponent2"); - assertNotNull("RefAddr " + JAxisServiceFactory.REF_SERVICE_STUB_PROPS - + "_HelloPortComponent2" + " must be not null", ra2); - Map returned2 = (Map) JNDIUtils.getObjectFromBytes((byte[]) ra2 - .getContent()); - assertFalse("Stub properties shouldn't be empty", returned2.isEmpty()); - Properties exp2 = new Properties(); - exp2.setProperty("other.test.property", "test.value"); - exp2.setProperty("other.test.property.2", "test.value.2"); - assertEquals( - "Stub Properties for port 'HelloPortComponent' not identical", - exp2, returned2); - } - - public void testCallPropertiesNull() throws Exception { - Reference ref = createServiceReference("call-props-null-j2ee.xml", - "call-props-null-jonas.xml"); - assertNull("Call properties should be null", ref - .get(JAxisServiceFactory.REF_SERVICE_CALL_PROPS - + "_HelloPortComponent")); - } - - public void testCallPropertiesEmpty() throws Exception { - Reference ref = createServiceReference("call-props-empty-j2ee.xml", - "call-props-empty-jonas.xml"); - RefAddr ra = ref.get(JAxisServiceFactory.REF_SERVICE_CALL_PROPS - + "_HelloPortComponent"); - assertNull("RefAddr " + JAxisServiceFactory.REF_SERVICE_CALL_PROPS - + "_HelloPortComponent" + " must be null", ra); - RefAddr ra2 = ref.get(JAxisServiceFactory.REF_SERVICE_CALL_PROPS - + "_HelloPortComponent2"); - assertNull("RefAddr " + JAxisServiceFactory.REF_SERVICE_CALL_PROPS - + "_HelloPortComponent2" + " must be null", ra2); - } - - public void testCallPropertiesForGivenPortName() throws Exception { - Reference ref = createServiceReference("call-props-j2ee.xml", - "call-props-jonas.xml"); - // port #1 - RefAddr ra = ref.get(JAxisServiceFactory.REF_SERVICE_CALL_PROPS - + "_HelloPortComponent"); - assertNotNull("RefAddr " + JAxisServiceFactory.REF_SERVICE_CALL_PROPS - + "_HelloPortComponent" + " must be not null", ra); - Map returned = (Map) JNDIUtils.getObjectFromBytes((byte[]) ra - .getContent()); - assertFalse("Stub properties shouldn't be empty", returned.isEmpty()); - Properties exp = new Properties(); - exp.setProperty("my.test.property", "test.value"); - exp.setProperty("my.test.property.2", "test.value.2"); - assertEquals( - "Stub Properties for port 'HelloPortComponent' not identical", - exp, returned); - // port #2 - RefAddr ra2 = ref.get(JAxisServiceFactory.REF_SERVICE_CALL_PROPS - + "_HelloPortComponent2"); - assertNotNull("RefAddr " + JAxisServiceFactory.REF_SERVICE_CALL_PROPS - + "_HelloPortComponent2" + " must be not null", ra2); - Map returned2 = (Map) JNDIUtils.getObjectFromBytes((byte[]) ra2 - .getContent()); - assertFalse("Call properties shouldn't be empty", returned2.isEmpty()); - Properties exp2 = new Properties(); - exp2.setProperty("other.test.property", "test.value"); - exp2.setProperty("other.test.property.2", "test.value.2"); - assertEquals( - "Call Properties for port 'HelloPortComponent' not identical", - exp2, returned2); - } - - public void testPortNameListEmpty() throws Exception { - Reference ref = createServiceReference("port-name-list-empty-j2ee.xml", - "port-name-list-empty-jonas.xml"); - assertNull(JAxisServiceFactory.REF_SERVICE_WSDL_PORT_LIST - + " should be null", ref - .get(JAxisServiceFactory.REF_SERVICE_WSDL_PORT_LIST)); - } - - public void testPortNameListWithMultiplePortComponent() throws Exception { - Reference ref = createServiceReference("port-name-list-j2ee.xml", - "port-name-list-jonas.xml"); - RefAddr ra = ref.get(JAxisServiceFactory.REF_SERVICE_WSDL_PORT_LIST); - assertNotNull(JAxisServiceFactory.REF_SERVICE_WSDL_PORT_LIST - + " shouldn't be null", ra); - assertEquals("portname list incorrect", - "HelloPortComponent,HelloPortComponent2", ra.getContent()); - } - - private Reference createServiceReference(String standard, String specific) - throws Exception { - // Get a ServiceRef for the test - ServiceRefDesc sr = createServiceRefDesc(standard, specific); - ClassLoader cl = Thread.currentThread().getContextClassLoader(); - return jfactory.getServiceReference(sr, cl); - } - - public void testGetObjectInstance() throws Exception { - String cfg = "" - + "" - + "" - + "" - + "" - + ""; - Reference ref = new Reference( - "org.objectweb.jonas.jtests.hello.HelloWsServiceLocator", - jfactory.getClass().getName(), null); - ref.add(new StringRefAddr(JAxisServiceFactory.REF_CLIENT_CONFIG, cfg)); - try { - jfactory.getObjectInstance(ref, null, null, null); - } catch (Exception e) { - fail("JAxisServiceFactory.getObjectInstance has failed " + e); - } - // cannot success when using Proxies - } - - private ServiceRefDesc createServiceRefDesc(String srFilename, - String jsrFilename) throws Exception { - // Get Context ClassLoader - ClassLoader cl = Thread.currentThread().getContextClassLoader(); - ServiceRefTLE srTopLevel = new ServiceRefTLE(); - // Load ServiceRef Object - //----------------------------- - // Create Digester - JDigester serviceRefDigester = new JDigester(new ServiceRefRuleSet(""), - false, true, null, null); - // Get Reader - Reader r = new InputStreamReader(cl.getResourceAsStream(srFilename)); - // Parse - serviceRefDigester.parse(r, srFilename, srTopLevel); - // Load JonasServiceRef Object - //----------------------------- - // Create Digester - JDigester jonasServiceRefDigester = new JDigester( - new JonasServiceRefRuleSet(""), false, true, null, null); - - // Read xml file and modify path containing RESOURCES_DIR - InputStream contentIs = cl.getResourceAsStream(jsrFilename); - BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(contentIs)); - StringWriter stringWriter = new StringWriter(); - String line = null; - while (((line = bufferedReader.readLine()) != null)) { - if (line.indexOf("@@RESOURCES_DIR@@") != -1) { - line = line.replaceAll("@@RESOURCES_DIR@@", "file://" + resources); - } - stringWriter.write(line); - } - - - - // Get Reader - r = new StringReader(stringWriter.toString()); - bufferedReader.close(); - stringWriter.close(); - // Parse - jonasServiceRefDigester.parse(r, jsrFilename, srTopLevel); - ServiceRefDesc sr = new ServiceRefDesc(cl, srTopLevel.getServiceRef(), - srTopLevel.getJonasServiceRef(), resources); - - return sr; - } - - public static void main(String args[]) { - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String s_arg = args[argn]; - if (s_arg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_AxisService(testtorun)); - } - } -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/service/F_PortComponentLink.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/service/F_PortComponentLink.java deleted file mode 100644 index 657d6bd4244d9ca9ca06458e3245ce5c67c5fa77..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/service/F_PortComponentLink.java +++ /dev/null @@ -1,137 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jtests.clients.service; - -import org.objectweb.jonas.jtests.util.JWebServicesTestCase; - -import junit.framework.Test; -import junit.framework.TestSuite; - -import com.meterware.httpunit.*; - -/** - * test case for port component link (service-ref on a colocated webservices instance) - * Client doesn't know the ws location in advance. - */ -public class F_PortComponentLink extends JWebServicesTestCase { - - protected static final String CONTEXT = "/portlink/"; - - public F_PortComponentLink(String name) { - super(name, CONTEXT); - } - - public static Test suite() { - return new TestSuite(F_PortComponentLink.class); - } - - public void setUp() throws Exception { - super.setUp(); - useEar("port-component-link"); - } - - public void tearDown() throws Exception { - super.tearDown(); - } - - public void testConfiguration() throws Exception { - WebResponse wr = wc.getResponse(url + "index.jsp"); - - // check endpoint URL - WebLink loc = wr.getLinkWithID("location"); - assertNotNull(loc); - String link = loc.asText(); - String url = "http://localhost:" - + System.getProperty("http.port") - + "/endpoint/addressbook"; - int index = link.indexOf(url); - System.out.println("expected URL :" + url); - System.out.println("current URL :" + link); - assertTrue("endpoint not updated", -1 != index); - - // check Stub creation - WebLink stub = wr.getLinkWithID("stub"); - assertNotNull("no stub", stub); - link = stub.asText(); - index = link.indexOf("'true'"); - assertTrue("stub not returned", -1 != index); - - } - - public void testResults() throws Exception { - WebResponse wr = wc.getResponse(url + "index.jsp"); - - // check return type - WebLink type = wr.getLinkWithID("classname"); - assertNotNull(type); - String link = type.asText(); - int index = link.indexOf("org.objectweb.jonas.jtests.servlets.portlink.Address"); - assertTrue("bad return type", -1 != index); - - // check getAddress return - WebLink get = wr.getLinkWithID("get"); - assertNotNull(get); - link = get.asText(); - index = link.indexOf("name : 'JOnAS'"); - assertTrue("bad name returned", -1 != index); - index = link.indexOf("company : 'ObjectWeb Consortium'"); - assertTrue("bad company returned", -1 != index); - index = link.indexOf("version : '4.0'"); - assertTrue("bad version returned", -1 != index); - - // check getAddresses return - WebLink getAll = wr.getLinkWithID("getAll"); - assertNotNull(getAll); - link = getAll.asText(); - index = link.indexOf("getAddresses() length : 2"); - assertTrue("bad length", -1 != index); - - // check isPresent return - WebLink pres = wr.getLinkWithID("present"); - assertNotNull(pres); - link = pres.asText(); - index = link.indexOf("isPresent(\"JOnAS-Team\") : 'true'"); - assertTrue("JOnAS Team not found", -1 != index); - - } - - public static void main (String args[]) { - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String s_arg = args[argn]; - if (s_arg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_PortComponentLink(testtorun)); - } - } - -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/service/ServiceRefTLE.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/service/ServiceRefTLE.java deleted file mode 100644 index 400f4b755effae178fc3a355b877b2a6006ca939..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/service/ServiceRefTLE.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.objectweb.jonas.jtests.clients.service; - -import org.ow2.jonas.deployment.common.xml.TopLevelElement; -import org.ow2.jonas.deployment.common.xml.ServiceRef; -import org.ow2.jonas.deployment.common.xml.JonasServiceRef; - -public class ServiceRefTLE implements TopLevelElement { - - private ServiceRef sr = null; - private JonasServiceRef jsr = null; - - public void addServiceRef(ServiceRef sr) { - this.sr = sr; - } - - public void addJonasServiceRef(JonasServiceRef jsr) { - this.jsr = jsr; - } - - public ServiceRef getServiceRef() { - return sr; - } - - public JonasServiceRef getJonasServiceRef() { - return jsr; - } - -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/wsgen/A_WsGen.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/wsgen/A_WsGen.java deleted file mode 100644 index 35937ae83826513a5388f2d0e4108992df6c01c8..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/wsgen/A_WsGen.java +++ /dev/null @@ -1,123 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jtests.clients.wsgen; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.Enumeration; -import java.util.jar.JarFile; -import java.util.zip.ZipEntry; - -import org.objectweb.jonas.jtests.util.JWebServicesTestCase; - -public abstract class A_WsGen extends JWebServicesTestCase { - private String jonasbase = null; - private String resources = null; - private String basedir = null; - - public A_WsGen(String name) { - super(name); - } - - public void setUp() throws Exception { - super.setUp(); - - jonasbase = System.getProperty("jonas.base.client"); - resources = System.getProperty("ws.resources"); - basedir = System.getProperty("basedir"); - - } - - public void tearDown() throws Exception { - super.tearDown(); - } - - protected String getJonasBaseFile(String path) { - return jonasbase + File.separator + path; - } - - protected String getResourceFile(String path) { - return resources + File.separator + path; - } - - protected String getTestFile(String path) { - return basedir + File.separator + path; - } - - protected static boolean deleteDirectory(String dir) throws IOException { - File file = new File(dir); - boolean isDestroy = true; - if (file.isDirectory()) { - // destroy all childs - File[] childs = file.listFiles(); - for (int i = 0; i < childs.length; i++) { - isDestroy &= deleteDirectory(childs[i].getAbsolutePath()); - } - } - return isDestroy && file.delete(); - - } - - protected static String unpackJar(JarFile file) throws IOException { - String tmp = createTempDir(); - - for (Enumeration e = file.entries(); e.hasMoreElements();) { - ZipEntry ze = (ZipEntry) e.nextElement(); - - // If is not a directory - if (!ze.getName().endsWith("/")) { - String newFilename = tmp + File.separator + ze.getName(); - File entryFile = new File(newFilename); - - entryFile.getParentFile().mkdirs(); - FileOutputStream fos = new FileOutputStream(entryFile); - InputStream is = file.getInputStream(ze); - - int n = 0; - byte[] buffer = new byte[1024]; - - while ((n = is.read(buffer)) > 0) { - fos.write(buffer, 0, n); - } - - fos.close(); - is.close(); - } - } - - return tmp; - } - - protected static String createTempDir() throws IOException { - File tmpDir = File.createTempFile("wsgen-tests", null, null); - tmpDir.delete(); - tmpDir.mkdir(); - return tmpDir.getAbsolutePath(); - } - -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/wsgen/C_wsgen.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/wsgen/C_wsgen.java deleted file mode 100644 index cf0628e0609da50a7791869b57de34c741d36c32..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/wsgen/C_wsgen.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jtests.clients.wsgen; - -import junit.framework.Test; -import junit.framework.TestSuite; -import org.objectweb.jonas.jtests.util.JWebServicesTestCase; - -public class C_wsgen extends JWebServicesTestCase { - - public C_wsgen(String name) { - super(name); - } - - /** - * This suite run WsGen test cases - */ - public static Test suite() { - TestSuite suite = new TestSuite(); - suite.addTest(F_WsGen.suite()); - return suite; - } - - public static void main (String args[]) { - junit.textui.TestRunner.run(suite()); - } -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/wsgen/F_Generate.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/wsgen/F_Generate.java deleted file mode 100644 index 1685da3d4af49a58fee7ae77ccf86194bbc93d60..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/wsgen/F_Generate.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jtests.clients.wsgen; - -import junit.framework.Test; -import junit.framework.TestSuite; - - -/** - * test case for WsGen - */ -public class F_Generate extends A_WsGen { - - public F_Generate(String name) { - super(name); - } - - public static Test suite() { - return new TestSuite(F_Generate.class); - } - - public void setUp() throws Exception { - super.setUp(); - } - - public void tearDown() throws Exception { - super.tearDown(); - } - - public void testWebappEndpointAlone() throws Exception { - // TODO use Cmd to test WsGen call - //String[] args = new String[] {"-help"}; - //WsGen.main(args); - } - - public void testWsClientEjb() throws Exception { - // TODO use Cmd to test WsGen call - //String[] args = new String[] {"-help"}; - //WsGen.main(args); - } - - public void testTimeEndpoint() throws Exception { - // TODO use Cmd to test WsGen call - //String[] args = new String[] {"-help"}; - //WsGen.main(args); - } - - public static void main (String args[]) { - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String s_arg = args[argn]; - if (s_arg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_Generate(testtorun)); - } - } - -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/wsgen/F_WsGen.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/wsgen/F_WsGen.java deleted file mode 100644 index 31bb364f1792e55bdbfa42eed83c84cea8fa8bcf..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/wsgen/F_WsGen.java +++ /dev/null @@ -1,177 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jtests.clients.wsgen; - -import java.io.File; -import java.util.Enumeration; -import java.util.jar.JarFile; -import java.util.zip.ZipEntry; - -import junit.framework.Test; -import junit.framework.TestSuite; - - -/** - * test case for WsGen - */ -public class F_WsGen extends A_WsGen { - - public F_WsGen(String name) { - super(name); - } - - public static Test suite() { - return new TestSuite(F_WsGen.class); - } - - public void setUp() throws Exception { - super.setUp(); - } - - public void tearDown() throws Exception { - super.tearDown(); - } - - /* - * Tests : - * - webapps (endpoint, clients, both, none) (various Schemas, DTD) - * - ejbjars (endpoint, clients, both, none) (various Schemas, DTD) - * - apps (combine above examples) + () - */ - - public void testWebappEndpointAlone() throws Exception { - - // Check entries in JarFile - String [] entries = new String[] { "META-INF/MANIFEST.MF", - "WEB-INF/wsdl/AddressBookPort.wsdl", - "WEB-INF/wsdl/AddressBook.xsd", - "WEB-INF/web.xml", - "WEB-INF/webservices.xml", - "WEB-INF/jonas-webservices.xml", - "WEB-INF/mapping.xml", - "WEB-INF/classes/org/objectweb/jonas/jtests/servlets/endpoint/Address.class", - "WEB-INF/classes/org/objectweb/jonas/jtests/servlets/endpoint/AddressBook.class", - "WEB-INF/classes/org/objectweb/jonas/jtests/servlets/endpoint/AddressBookImpl.class", - "WEB-INF/classes/org/objectweb/jonas/jtests/servlets/endpoint/AddressBookException.class"}; - - JarFile alone = new JarFile(getJonasBaseFile("webapps" + File.separator + "webendpoint.war")); - - checkEntries(entries, alone); - - assertEquals("entries number doesn't match", entries.length, countEntries(alone)); - - } - - public void testWsClientEjb() throws Exception { - - // Check entries in JarFile - String path = "org/objectweb/jonas/jtests/beans/wsclient/"; - String [] entries = new String[] { "META-INF/MANIFEST.MF", - "META-INF/jonas-ejb-jar.xml", - "META-INF/ejb-jar.xml", - "META-INF/wsdl/query.wsdl"}; - - JarFile wsclient = new JarFile(getJonasBaseFile("ejbjars" + File.separator + "wsclient.jar")); - - checkEntries(entries, wsclient); - - } - - public void testTimeEndpoint() throws Exception { - // Check entries in JarFile (Wrapping Application) - String [] entries = new String[] { "META-INF/application.xml", - "META-INF/MANIFEST.MF", - "time.war", - "time.jar", - "time-client.jar"}; - - JarFile time = new JarFile(getJonasBaseFile("apps" + File.separator + "time-test.ear")); - - checkEntries(entries, time); - - assertEquals("entries number doesn't match", 5, countEntries(time)); - - // Check entries in JarFile (Wrapped WebApp) - String tmp = unpackJar(time); - - // Check war correctly created - JarFile web = new JarFile(tmp + File.separator - + "time.war"); - String [] webEntries = new String[] { "META-INF/MANIFEST.MF", - "WEB-INF/web.xml", - "WEB-INF/web-jetty.xml", - "META-INF/context.xml", - "WEB-INF/sources/deploy-server-0.wsdd", - "WEB-INF/deploy-server-0.wsdd"}; - - // TODO should improve entries check : deploy-server-0 may be deploy-server-25 !! - //checkEntries(webEntries, web); - assertEquals("web entries number doesn't match", webEntries.length, countEntries(web)); - - deleteDirectory(tmp); - - } - - public void checkEntries(String [] entries, JarFile file) { - - for (int i = 0; i < entries.length; i++) { - ZipEntry ze = file.getEntry(entries[i]); - assertNotNull("missing entry '" + entries[i] + "' in '" + file.getName() + "'", ze); - } - } - - public int countEntries(JarFile file) { - Enumeration e = file.entries(); - int count = 0; - while (e.hasMoreElements()) { - ZipEntry ze = (ZipEntry) e.nextElement(); - // not a directory - if (!ze.getName().endsWith("/")) { - count++; - } - - } - return count; - } - - - public static void main (String args[]) { - String testtorun = null; - // Get args - for (int argn = 0; argn < args.length; argn++) { - String s_arg = args[argn]; - if (s_arg.equals("-n")) { - testtorun = args[++argn]; - } - } - if (testtorun == null) { - junit.textui.TestRunner.run(suite()); - } else { - junit.textui.TestRunner.run(new F_WsGen(testtorun)); - } - } - -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/wssecured/C_wssecured.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/wssecured/C_wssecured.java deleted file mode 100644 index 531e28d44a40c6b2d355eb782d9c395db9dd90cf..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/wssecured/C_wssecured.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.objectweb.jonas.jtests.clients.wssecured; - -import junit.framework.Test; -import junit.framework.TestSuite; - -import org.objectweb.jonas.jtests.util.JWebServicesTestCase; - - -/** - * - * - * @author Guillaume Sauthier - */ -public class C_wssecured extends JWebServicesTestCase { - - public C_wssecured(String name) { - super(name); - } - - /** - * This suite run WsGen test cases - */ - public static Test suite() { - TestSuite suite = new TestSuite(); - suite.addTest(F_WsSecuredMultipleEndpoint.suite()); - return suite; - } - - public static void main (String args[]) { - junit.textui.TestRunner.run(suite()); - } - -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/wssecured/F_WsSecuredMultipleEndpoint.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/wssecured/F_WsSecuredMultipleEndpoint.java deleted file mode 100644 index cd072d5b9c72e20826383ee79fd1da311038085d..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/clients/wssecured/F_WsSecuredMultipleEndpoint.java +++ /dev/null @@ -1,131 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 2006 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ -package org.objectweb.jonas.jtests.clients.wssecured; - -import java.rmi.RemoteException; - -import javax.xml.namespace.QName; -import javax.xml.rpc.Call; -import javax.xml.rpc.Service; -import javax.xml.rpc.ServiceFactory; - -import junit.framework.Test; -import junit.framework.TestSuite; - -import org.objectweb.jonas.jtests.util.JWebServicesTestCase; - -/** - * Test secured endpoints. - * @author Guillaume Sauthier - */ -public class F_WsSecuredMultipleEndpoint extends JWebServicesTestCase { - - /** - * First proectedt endpoint. - */ - private static final String ADDRESSBOOK_URL = "/ws-secured/addressbook"; - - /** - * Seconf protected endpoint. - */ - private static final String ADDRESSBOOK2_URL = "/ws-secured/addressbook2"; - - /** - * HTTP port to use (default to 9000). - */ - private String port = "9000"; - - /** - * @param s - */ - public F_WsSecuredMultipleEndpoint(String s) { - super(s); - } - - public static Test suite() { - return new TestSuite(F_WsSecuredMultipleEndpoint.class); - } - - public void setUp() throws Exception { - super.setUp(); - port = System.getProperty("http.port"); - useWar("ws-secured"); - } - - public void tearDown() throws Exception { - super.tearDown(); - } - - public void testAuthorizedAddressBookEndpoint1() throws Exception { - - Service service = ServiceFactory.newInstance().createService(new QName("jonas:AddressBook", "AddressBookService")); - Call call = service.createCall(new QName("AddressBookPort"), new QName("isPresent")); - call.setTargetEndpointAddress("http://localhost:" + port + ADDRESSBOOK_URL); - call.setProperty(Call.USERNAME_PROPERTY, "jonas"); - call.setProperty(Call.PASSWORD_PROPERTY, "jonas"); - Boolean present = (Boolean) call.invoke(new Object[] {"JOnAS"}); - - assertNotNull("ServiceEndpoint performed succesfully", present); - } - - public void testUnauthorizedAddressBookEndpoint1() throws Exception { - - Service service = ServiceFactory.newInstance().createService(new QName("jonas:AddressBook", "AddressBookService")); - Call call = service.createCall(new QName("AddressBookPort"), new QName("isPresent")); - call.setTargetEndpointAddress("http://localhost:" + port + ADDRESSBOOK_URL); - try { - call.invoke(new Object[] {"JOnAS"}); - fail("AddressBookService was not URL protected !"); - } catch (RemoteException re) { - // expected Exception - } - } - - public void testAuthorizedAddressBookEndpoint2() throws Exception { - - Service service = ServiceFactory.newInstance().createService(new QName("jonas:AddressBook", "AddressBookService")); - Call call = service.createCall(new QName("AddressBookPort"), new QName("isPresent")); - call.setTargetEndpointAddress("http://localhost:" + port + ADDRESSBOOK2_URL); - call.setProperty(Call.USERNAME_PROPERTY, "jonas"); - call.setProperty(Call.PASSWORD_PROPERTY, "jonas"); - Boolean present = (Boolean) call.invoke(new Object[] {"JOnAS"}); - - assertNotNull("ServiceEndpoint performed succesfully", present); - } - - public void testUnauthorizedAddressBookEndpoint2() throws Exception { - - Service service = ServiceFactory.newInstance().createService(new QName("jonas:AddressBook", "AddressBookService")); - Call call = service.createCall(new QName("AddressBookPort"), new QName("isPresent")); - call.setTargetEndpointAddress("http://localhost:" + port + ADDRESSBOOK2_URL); - try { - call.invoke(new Object[] {"JOnAS"}); - fail("AddressBookService was not URL protected !"); - } catch (RemoteException re) { - // expected Exception - } - } - -} \ No newline at end of file diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/gen/xmethods/IDNamePair.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/gen/xmethods/IDNamePair.java deleted file mode 100644 index 214783862c0d2786cc2c484b55605b9ca791e027..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/gen/xmethods/IDNamePair.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * IDNamePair.java - * - * This file was auto-generated from WSDL - * by the Apache Axis 1.2beta Mar 31, 2004 (12:47:03 EST) WSDL2Java emitter. - */ - -package org.objectweb.jonas.jtests.gen.xmethods; - -public class IDNamePair implements java.io.Serializable { - private java.lang.String id; - private java.lang.String name; - - public IDNamePair() { - } - - - /** - * Gets the id value for this IDNamePair. - * - * @return id - */ - public java.lang.String getId() { - return id; - } - - - /** - * Sets the id value for this IDNamePair. - * - * @param id - */ - public void setId(java.lang.String id) { - this.id = id; - } - - - /** - * Gets the name value for this IDNamePair. - * - * @return name - */ - public java.lang.String getName() { - return name; - } - - - /** - * Sets the name value for this IDNamePair. - * - * @param name - */ - public void setName(java.lang.String name) { - this.name = name; - } -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/gen/xmethods/ServiceDetail.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/gen/xmethods/ServiceDetail.java deleted file mode 100644 index 5eece3018f27de9f36a85fcf28e5c4030fba93e9..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/gen/xmethods/ServiceDetail.java +++ /dev/null @@ -1,287 +0,0 @@ -/** - * ServiceDetail.java - * - * This file was auto-generated from WSDL - * by the Apache Axis 1.2beta Mar 31, 2004 (12:47:03 EST) WSDL2Java emitter. - */ - -package org.objectweb.jonas.jtests.gen.xmethods; - -public class ServiceDetail implements java.io.Serializable { - private java.lang.String name; - private java.lang.String id; - private java.lang.String shortDescription; - private java.lang.String description; - private java.lang.String implementationID; - private java.lang.String email; - private java.lang.String wsdlURL; - private java.lang.String infoURL; - private java.lang.String discussionURL; - private java.lang.String notes; - private java.lang.String tmodelID; - private java.lang.String publisherID; - private java.lang.String uuid; - - public ServiceDetail() { - } - - - /** - * Gets the name value for this ServiceDetail. - * - * @return name - */ - public java.lang.String getName() { - return name; - } - - - /** - * Sets the name value for this ServiceDetail. - * - * @param name - */ - public void setName(java.lang.String name) { - this.name = name; - } - - - /** - * Gets the id value for this ServiceDetail. - * - * @return id - */ - public java.lang.String getId() { - return id; - } - - - /** - * Sets the id value for this ServiceDetail. - * - * @param id - */ - public void setId(java.lang.String id) { - this.id = id; - } - - - /** - * Gets the shortDescription value for this ServiceDetail. - * - * @return shortDescription - */ - public java.lang.String getShortDescription() { - return shortDescription; - } - - - /** - * Sets the shortDescription value for this ServiceDetail. - * - * @param shortDescription - */ - public void setShortDescription(java.lang.String shortDescription) { - this.shortDescription = shortDescription; - } - - - /** - * Gets the description value for this ServiceDetail. - * - * @return description - */ - public java.lang.String getDescription() { - return description; - } - - - /** - * Sets the description value for this ServiceDetail. - * - * @param description - */ - public void setDescription(java.lang.String description) { - this.description = description; - } - - - /** - * Gets the implementationID value for this ServiceDetail. - * - * @return implementationID - */ - public java.lang.String getImplementationID() { - return implementationID; - } - - - /** - * Sets the implementationID value for this ServiceDetail. - * - * @param implementationID - */ - public void setImplementationID(java.lang.String implementationID) { - this.implementationID = implementationID; - } - - - /** - * Gets the email value for this ServiceDetail. - * - * @return email - */ - public java.lang.String getEmail() { - return email; - } - - - /** - * Sets the email value for this ServiceDetail. - * - * @param email - */ - public void setEmail(java.lang.String email) { - this.email = email; - } - - - /** - * Gets the wsdlURL value for this ServiceDetail. - * - * @return wsdlURL - */ - public java.lang.String getWsdlURL() { - return wsdlURL; - } - - - /** - * Sets the wsdlURL value for this ServiceDetail. - * - * @param wsdlURL - */ - public void setWsdlURL(java.lang.String wsdlURL) { - this.wsdlURL = wsdlURL; - } - - - /** - * Gets the infoURL value for this ServiceDetail. - * - * @return infoURL - */ - public java.lang.String getInfoURL() { - return infoURL; - } - - - /** - * Sets the infoURL value for this ServiceDetail. - * - * @param infoURL - */ - public void setInfoURL(java.lang.String infoURL) { - this.infoURL = infoURL; - } - - - /** - * Gets the discussionURL value for this ServiceDetail. - * - * @return discussionURL - */ - public java.lang.String getDiscussionURL() { - return discussionURL; - } - - - /** - * Sets the discussionURL value for this ServiceDetail. - * - * @param discussionURL - */ - public void setDiscussionURL(java.lang.String discussionURL) { - this.discussionURL = discussionURL; - } - - - /** - * Gets the notes value for this ServiceDetail. - * - * @return notes - */ - public java.lang.String getNotes() { - return notes; - } - - - /** - * Sets the notes value for this ServiceDetail. - * - * @param notes - */ - public void setNotes(java.lang.String notes) { - this.notes = notes; - } - - - /** - * Gets the tmodelID value for this ServiceDetail. - * - * @return tmodelID - */ - public java.lang.String getTmodelID() { - return tmodelID; - } - - - /** - * Sets the tmodelID value for this ServiceDetail. - * - * @param tmodelID - */ - public void setTmodelID(java.lang.String tmodelID) { - this.tmodelID = tmodelID; - } - - - /** - * Gets the publisherID value for this ServiceDetail. - * - * @return publisherID - */ - public java.lang.String getPublisherID() { - return publisherID; - } - - - /** - * Sets the publisherID value for this ServiceDetail. - * - * @param publisherID - */ - public void setPublisherID(java.lang.String publisherID) { - this.publisherID = publisherID; - } - - - /** - * Gets the uuid value for this ServiceDetail. - * - * @return uuid - */ - public java.lang.String getUuid() { - return uuid; - } - - - /** - * Sets the uuid value for this ServiceDetail. - * - * @param uuid - */ - public void setUuid(java.lang.String uuid) { - this.uuid = uuid; - } -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/gen/xmethods/ServiceSummary.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/gen/xmethods/ServiceSummary.java deleted file mode 100644 index 93e85465f437c8f833d534f341f2127d42c8f392..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/gen/xmethods/ServiceSummary.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * ServiceSummary.java - * - * This file was auto-generated from WSDL - * by the Apache Axis 1.2beta Mar 31, 2004 (12:47:03 EST) WSDL2Java emitter. - */ - -package org.objectweb.jonas.jtests.gen.xmethods; - -public class ServiceSummary implements java.io.Serializable { - private java.lang.String name; - private java.lang.String id; - private java.lang.String shortDescription; - private java.lang.String wsdlURL; - private java.lang.String publisherID; - - public ServiceSummary() { - } - - - /** - * Gets the name value for this ServiceSummary. - * - * @return name - */ - public java.lang.String getName() { - return name; - } - - - /** - * Sets the name value for this ServiceSummary. - * - * @param name - */ - public void setName(java.lang.String name) { - this.name = name; - } - - - /** - * Gets the id value for this ServiceSummary. - * - * @return id - */ - public java.lang.String getId() { - return id; - } - - - /** - * Sets the id value for this ServiceSummary. - * - * @param id - */ - public void setId(java.lang.String id) { - this.id = id; - } - - - /** - * Gets the shortDescription value for this ServiceSummary. - * - * @return shortDescription - */ - public java.lang.String getShortDescription() { - return shortDescription; - } - - - /** - * Sets the shortDescription value for this ServiceSummary. - * - * @param shortDescription - */ - public void setShortDescription(java.lang.String shortDescription) { - this.shortDescription = shortDescription; - } - - - /** - * Gets the wsdlURL value for this ServiceSummary. - * - * @return wsdlURL - */ - public java.lang.String getWsdlURL() { - return wsdlURL; - } - - - /** - * Sets the wsdlURL value for this ServiceSummary. - * - * @param wsdlURL - */ - public void setWsdlURL(java.lang.String wsdlURL) { - this.wsdlURL = wsdlURL; - } - - - /** - * Gets the publisherID value for this ServiceSummary. - * - * @return publisherID - */ - public java.lang.String getPublisherID() { - return publisherID; - } - - - /** - * Sets the publisherID value for this ServiceSummary. - * - * @param publisherID - */ - public void setPublisherID(java.lang.String publisherID) { - this.publisherID = publisherID; - } -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/gen/xmethods/XMethodsQuery.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/gen/xmethods/XMethodsQuery.java deleted file mode 100644 index 163d25de99317fa892d1329b849a4402a6506c73..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/gen/xmethods/XMethodsQuery.java +++ /dev/null @@ -1,20 +0,0 @@ -/** - * XMethodsQuery.java - * - * This file was auto-generated from WSDL by the Apache Axis 1.2beta Mar 31, - * 2004 (12:47:03 EST) WSDL2Java emitter. - */ -package org.objectweb.jonas.jtests.gen.xmethods; - -public interface XMethodsQuery extends javax.xml.rpc.Service { - /** - * XMethods query service - */ - public java.lang.String getXMethodsQuerySoapAddress(); - - public org.objectweb.jonas.jtests.gen.xmethods.XMethodsQuerySoapPortType getXMethodsQuerySoap() - throws javax.xml.rpc.ServiceException; - - public org.objectweb.jonas.jtests.gen.xmethods.XMethodsQuerySoapPortType getXMethodsQuerySoap( - java.net.URL portAddress) throws javax.xml.rpc.ServiceException; -} \ No newline at end of file diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/gen/xmethods/XMethodsQuerySoapPortType.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/gen/xmethods/XMethodsQuerySoapPortType.java deleted file mode 100644 index 76f9b6853ceb4cae585c3e3c8add9d77b7f03ed5..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/gen/xmethods/XMethodsQuerySoapPortType.java +++ /dev/null @@ -1,24 +0,0 @@ -/** - * XMethodsQuerySoapPortType.java - * - * This file was auto-generated from WSDL by the Apache Axis 1.2beta Mar 31, - * 2004 (12:47:03 EST) WSDL2Java emitter. - */ -package org.objectweb.jonas.jtests.gen.xmethods; - -public interface XMethodsQuerySoapPortType extends java.rmi.Remote { - public org.objectweb.jonas.jtests.gen.xmethods.ServiceSummary[] getServiceSummariesByPublisher( - java.lang.String publisherID) throws java.rmi.RemoteException; - - public org.objectweb.jonas.jtests.gen.xmethods.ServiceSummary[] getAllServiceSummaries() - throws java.rmi.RemoteException; - - public org.objectweb.jonas.jtests.gen.xmethods.IDNamePair[] getAllServiceNames() - throws java.rmi.RemoteException; - - public org.objectweb.jonas.jtests.gen.xmethods.IDNamePair[] getServiceNamesByPublisher( - java.lang.String publisherID) throws java.rmi.RemoteException; - - public org.objectweb.jonas.jtests.gen.xmethods.ServiceDetail getServiceDetail( - java.lang.String id) throws java.rmi.RemoteException; -} \ No newline at end of file diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/gen/zip/IODCODESPOSTAUX.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/gen/zip/IODCODESPOSTAUX.java deleted file mode 100644 index 505953198da99c7fe8e92911a2928d40e0793d6f..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/gen/zip/IODCODESPOSTAUX.java +++ /dev/null @@ -1,18 +0,0 @@ -/** - * IODCODESPOSTAUX.java - * - * This file was auto-generated from WSDL - * by the Apache Axis 1.2dev nov. 26, 2003 (03:17:19 CET) WSDL2Java emitter. - */ - -package org.objectweb.jonas.jtests.gen.zip; - -public interface IODCODESPOSTAUX extends java.rmi.Remote { - public java.lang.String getDepartmentForCode(java.lang.String depCode) throws java.rmi.RemoteException; - public java.lang.String getDepartmentAdminCenterForCode(java.lang.String depCode) throws java.rmi.RemoteException; - public java.lang.String getDepartmentList(java.lang.String separator) throws java.rmi.RemoteException; - public java.lang.String getTownForZip(java.lang.String zipCode, java.lang.String separator) throws java.rmi.RemoteException; - public java.lang.String getZipForTown(java.lang.String town, java.lang.String separator, boolean exactMatch) throws java.rmi.RemoteException; - public java.lang.String getTownsForSoundex(java.lang.String searchFor, java.lang.String separator) throws java.rmi.RemoteException; - public void reportErrorInFile(java.lang.String yourName, java.lang.String yourMail, java.lang.String yourMessage) throws java.rmi.RemoteException; -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/gen/zip/IODCODESPOSTAUXservice.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/gen/zip/IODCODESPOSTAUXservice.java deleted file mode 100644 index 57a7713514642b2a7db76205fa9912508bbe7fa5..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/gen/zip/IODCODESPOSTAUXservice.java +++ /dev/null @@ -1,16 +0,0 @@ -/** - * IODCODESPOSTAUXservice.java - * - * This file was auto-generated from WSDL - * by the Apache Axis 1.2dev nov. 26, 2003 (03:17:19 CET) WSDL2Java emitter. - */ - -package org.objectweb.jonas.jtests.gen.zip; - -public interface IODCODESPOSTAUXservice extends javax.xml.rpc.Service { - public java.lang.String getIODCODESPOSTAUXPortAddress(); - - public org.objectweb.jonas.jtests.gen.zip.IODCODESPOSTAUX getIODCODESPOSTAUXPort() throws javax.xml.rpc.ServiceException; - - public org.objectweb.jonas.jtests.gen.zip.IODCODESPOSTAUX getIODCODESPOSTAUXPort(java.net.URL portAddress) throws javax.xml.rpc.ServiceException; -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/hello/HelloPortComponentSoapBindingStub.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/hello/HelloPortComponentSoapBindingStub.java deleted file mode 100644 index 1623136d41136eb469ccf37dd06ef40132710056..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/hello/HelloPortComponentSoapBindingStub.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * HelloPortComponentSoapBindingStub.java - * - * This file was auto-generated from WSDL - * by the Apache Axis WSDL2Java emitter. - */ - -package org.objectweb.jonas.jtests.hello; - -public class HelloPortComponentSoapBindingStub extends org.apache.axis.client.Stub implements org.objectweb.jonas.jtests.hello.HelloWs { - private java.util.Vector cachedSerClasses = new java.util.Vector(); - private java.util.Vector cachedSerQNames = new java.util.Vector(); - private java.util.Vector cachedSerFactories = new java.util.Vector(); - private java.util.Vector cachedDeserFactories = new java.util.Vector(); - - static org.apache.axis.description.OperationDesc [] _operations; - - static { - _operations = new org.apache.axis.description.OperationDesc[1]; - org.apache.axis.description.OperationDesc oper; - oper = new org.apache.axis.description.OperationDesc(); - oper.setName("sayHello"); - oper.addParameter(new javax.xml.namespace.QName("", "in0"), new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, org.apache.axis.description.ParameterDesc.IN, false, false); - oper.setReturnType(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string")); - oper.setReturnClass(java.lang.String.class); - oper.setReturnQName(new javax.xml.namespace.QName("", "return")); - oper.setStyle(org.apache.axis.constants.Style.RPC); - oper.setUse(org.apache.axis.constants.Use.ENCODED); - _operations[0] = oper; - - } - - public HelloPortComponentSoapBindingStub() throws org.apache.axis.AxisFault { - this(null); - } - - public HelloPortComponentSoapBindingStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault { - this(service); - super.cachedEndpoint = endpointURL; - } - - public HelloPortComponentSoapBindingStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault { - if (service == null) { - super.service = new org.apache.axis.client.Service(); - } else { - super.service = service; - } - } - - private org.apache.axis.client.Call createCall() throws java.rmi.RemoteException { - try { - org.apache.axis.client.Call _call = - (org.apache.axis.client.Call) super.service.createCall(); - if (super.maintainSessionSet) { - _call.setMaintainSession(super.maintainSession); - } - if (super.cachedUsername != null) { - _call.setUsername(super.cachedUsername); - } - if (super.cachedPassword != null) { - _call.setPassword(super.cachedPassword); - } - if (super.cachedEndpoint != null) { - _call.setTargetEndpointAddress(super.cachedEndpoint); - } - if (super.cachedTimeout != null) { - _call.setTimeout(super.cachedTimeout); - } - if (super.cachedPortName != null) { - _call.setPortName(super.cachedPortName); - } - java.util.Enumeration keys = super.cachedProperties.keys(); - while (keys.hasMoreElements()) { - java.lang.String key = (java.lang.String) keys.nextElement(); - _call.setProperty(key, super.cachedProperties.get(key)); - } - return _call; - } - catch (java.lang.Throwable t) { - throw new org.apache.axis.AxisFault("Failure trying to get the Call object", t); - } - } - - public java.lang.String sayHello(java.lang.String in0) throws java.rmi.RemoteException { - if (super.cachedEndpoint == null) { - throw new org.apache.axis.NoEndPointException(); - } - org.apache.axis.client.Call _call = createCall(); - _call.setOperation(_operations[0]); - _call.setUseSOAPAction(true); - _call.setSOAPActionURI(""); - _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); - _call.setOperationName(new javax.xml.namespace.QName("http://hello.simple", "sayHello")); - - setRequestHeaders(_call); - setAttachments(_call); - java.lang.Object _resp = _call.invoke(new java.lang.Object[] {in0}); - - if (_resp instanceof java.rmi.RemoteException) { - throw (java.rmi.RemoteException)_resp; - } - else { - extractAttachments(_call); - try { - return (java.lang.String) _resp; - } catch (java.lang.Exception _exception) { - return (java.lang.String) org.apache.axis.utils.JavaUtils.convert(_resp, java.lang.String.class); - } - } - } - -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/hello/HelloWs.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/hello/HelloWs.java deleted file mode 100644 index c275a202d8393178c8c7fb925fc76fac55035547..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/hello/HelloWs.java +++ /dev/null @@ -1,12 +0,0 @@ -/** - * HelloWs.java - * - * This file was auto-generated from WSDL - * by the Apache Axis WSDL2Java emitter. - */ - -package org.objectweb.jonas.jtests.hello; - -public interface HelloWs extends java.rmi.Remote { - public java.lang.String sayHello(java.lang.String in0) throws java.rmi.RemoteException; -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/hello/HelloWs2.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/hello/HelloWs2.java deleted file mode 100644 index 97383baf238ae69cfac84d04c62d00794e7d1116..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/hello/HelloWs2.java +++ /dev/null @@ -1,12 +0,0 @@ -/** - * HelloWs.java - * - * This file was auto-generated from WSDL - * by the Apache Axis WSDL2Java emitter. - */ - -package org.objectweb.jonas.jtests.hello; - -public interface HelloWs2 extends java.rmi.Remote { - public java.lang.String sayHello(java.lang.String in0) throws java.rmi.RemoteException; -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/hello/HelloWsService.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/hello/HelloWsService.java deleted file mode 100644 index 95c98d5d29174d7ae959971b1b9625f64a009cb9..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/hello/HelloWsService.java +++ /dev/null @@ -1,16 +0,0 @@ -/** - * HelloWsService.java - * - * This file was auto-generated from WSDL - * by the Apache Axis WSDL2Java emitter. - */ - -package org.objectweb.jonas.jtests.hello; - -public interface HelloWsService extends javax.xml.rpc.Service { - public java.lang.String getHelloPortComponentAddress(); - - public org.objectweb.jonas.jtests.hello.HelloWs getHelloPortComponent() throws javax.xml.rpc.ServiceException; - - public org.objectweb.jonas.jtests.hello.HelloWs getHelloPortComponent(java.net.URL portAddress) throws javax.xml.rpc.ServiceException; -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/hello/HelloWsServiceLocator.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/hello/HelloWsServiceLocator.java deleted file mode 100644 index 93a4a2236f04ab7b00b072cc2acd601aeac62436..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/hello/HelloWsServiceLocator.java +++ /dev/null @@ -1,111 +0,0 @@ -/** - * HelloWsServiceLocator.java - * - * This file was auto-generated from WSDL - * by the Apache Axis WSDL2Java emitter. - */ - -package org.objectweb.jonas.jtests.hello; - -import javax.xml.namespace.QName; - -public class HelloWsServiceLocator extends org.ow2.jonas.ws.axis.JService implements org.objectweb.jonas.jtests.hello.HelloWsService { - - public HelloWsServiceLocator(String name, QName qname) { - - } - - // Use to get a proxy class for HelloPortComponent - private final java.lang.String HelloPortComponent_address = "http://dummy_location/HelloPortComponent"; - - public java.lang.String getHelloPortComponentAddress() { - return HelloPortComponent_address; - } - - // The WSDD service name defaults to the port name. - private java.lang.String HelloPortComponentWSDDServiceName = "HelloPortComponent"; - - public java.lang.String getHelloPortComponentWSDDServiceName() { - return HelloPortComponentWSDDServiceName; - } - - public void setHelloPortComponentWSDDServiceName(java.lang.String name) { - HelloPortComponentWSDDServiceName = name; - } - - public org.objectweb.jonas.jtests.hello.HelloWs getHelloPortComponent() throws javax.xml.rpc.ServiceException { - java.net.URL endpoint; - try { - endpoint = new java.net.URL(HelloPortComponent_address); - } - catch (java.net.MalformedURLException e) { - throw new javax.xml.rpc.ServiceException(e); - } - return getHelloPortComponent(endpoint); - } - - public org.objectweb.jonas.jtests.hello.HelloWs getHelloPortComponent(java.net.URL portAddress) throws javax.xml.rpc.ServiceException { - try { - org.objectweb.jonas.jtests.hello.HelloPortComponentSoapBindingStub _stub = new org.objectweb.jonas.jtests.hello.HelloPortComponentSoapBindingStub(portAddress, this); - _stub.setPortName(getHelloPortComponentWSDDServiceName()); - return _stub; - } - catch (org.apache.axis.AxisFault e) { - return null; - } - } - - /** - * For the given interface, get the stub implementation. - * If this service has no port for the given interface, - * then ServiceException is thrown. - */ - public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException { - try { - if (org.objectweb.jonas.jtests.hello.HelloWs.class.isAssignableFrom(serviceEndpointInterface)) { - org.objectweb.jonas.jtests.hello.HelloPortComponentSoapBindingStub _stub = new org.objectweb.jonas.jtests.hello.HelloPortComponentSoapBindingStub(new java.net.URL(HelloPortComponent_address), this); - _stub.setPortName(getHelloPortComponentWSDDServiceName()); - return _stub; - } - } - catch (java.lang.Throwable t) { - throw new javax.xml.rpc.ServiceException(t); - } - throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface: " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName())); - } - - /** - * For the given interface, get the stub implementation. - * If this service has no port for the given interface, - * then ServiceException is thrown. - */ - public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException { - if (portName == null) { - return getPort(serviceEndpointInterface); - } - String inputPortName = portName.getLocalPart(); - if ("HelloPortComponent".equals(inputPortName)) { - return getHelloPortComponent(); - } - else { - java.rmi.Remote _stub = getPort(serviceEndpointInterface); - ((org.apache.axis.client.Stub) _stub).setPortName(portName); - return _stub; - } - } - - public javax.xml.namespace.QName getServiceName() { - return new javax.xml.namespace.QName("http://hello.simple", "HelloWsService"); - } - - private java.util.HashSet ports = null; - - public java.util.Iterator getPorts() { - if (ports == null) { - ports = new java.util.HashSet(); - ports.add(new javax.xml.namespace.QName("HelloPortComponent")); - } - return ports.iterator(); - } - -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/servlets/endpoint/Address.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/servlets/endpoint/Address.java deleted file mode 100644 index c4eedffd758d2986c7bf538aa9492043b176ee27..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/servlets/endpoint/Address.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.objectweb.jonas.jtests.servlets.endpoint; - -public class Address { - - private String name; - private String company; - private float version; - - public Address() { - } - - public void setName(String name) { - this.name = name; - } - - public void setCompany(String company) { - this.company = company; - } - - public void setVersion(float version) { - this.version = version; - } - - public String getName() { - return name; - } - - public String getCompany() { - return company; - } - - public float getVersion() { - return version; - } - - public String toString() { - return "Address {name='" + getName() - + "', company='" + getCompany() - + "', version='" + getVersion() + "'}"; - } -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/servlets/endpoint/AddressBook.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/servlets/endpoint/AddressBook.java deleted file mode 100644 index 70f4236adb82cbde5bffb19262c452e9a58c4580..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/servlets/endpoint/AddressBook.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.objectweb.jonas.jtests.servlets.endpoint; - - -public interface AddressBook { - - public void addAddress(Address addr) throws AddressBookException; - public Address getAddress(String name); - public Address[] getAddresses(); - public boolean isPresent(String name); - - public void reset(); - -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/servlets/endpoint/AddressBookException.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/servlets/endpoint/AddressBookException.java deleted file mode 100644 index 859e87a76e6ed274d209dfeefdbef50b2eb04646..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/servlets/endpoint/AddressBookException.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.objectweb.jonas.jtests.servlets.endpoint; - -public class AddressBookException extends Exception { - - public AddressBookException(String msg) { - super(msg); - } -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/servlets/endpoint/AddressBookImpl.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/servlets/endpoint/AddressBookImpl.java deleted file mode 100644 index 4a22b2995820a3de58e41407cced08e801d47391..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/servlets/endpoint/AddressBookImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.objectweb.jonas.jtests.servlets.endpoint; - -import java.util.Hashtable; -import java.util.Map; - -public class AddressBookImpl implements AddressBook { - - /** - * Hack !! used to keep a state in this ws ! - */ - private static Map addresses = null; - - private static void initAddresses() { - addresses = new Hashtable(); - Address a = new Address(); - a.setName("JOnAS"); - a.setCompany("ObjectWeb Consortium"); - a.setVersion(4.0f); - addresses.put(a.getName(), a); - } - - public AddressBookImpl() { - if (addresses == null) { - initAddresses(); - } - } - - public void addAddress(Address addr) throws AddressBookException { - if (isPresent(addr.getName())) { - throw new AddressBookException("Address " + addr + " already present in Book"); - } - - addresses.put(addr.getName(), addr); - } - - public Address getAddress(String name) { - return (Address) addresses.get(name); - } - - public Address[] getAddresses() { - Address[] exported = new Address[addresses.size()]; - return (Address[]) addresses.values().toArray(exported); - } - - public boolean isPresent(String name) { - return (getAddress(name) != null); - } - - public void reset() { - addresses = null; - } -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/servlets/portlink/Address.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/servlets/portlink/Address.java deleted file mode 100644 index a0531011d3b79913e00294872068f651c5820d6f..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/servlets/portlink/Address.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.objectweb.jonas.jtests.servlets.portlink; - -public class Address { - - private String name; - private String company; - private float version; - - public Address() { - } - - public void setName(String name) { - this.name = name; - } - - public void setCompany(String company) { - this.company = company; - } - - public void setVersion(float version) { - this.version = version; - } - - public String getName() { - return name; - } - - public String getCompany() { - return company; - } - - public float getVersion() { - return version; - } - - public String toString() { - return "Address {name='" + getName() - + "', company='" + getCompany() - + "', version='" + getVersion() + "'}"; - } -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/servlets/portlink/AddressBook.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/servlets/portlink/AddressBook.java deleted file mode 100644 index b22bae5a587ef0535629c3be1ea04da345c266a9..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/servlets/portlink/AddressBook.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.objectweb.jonas.jtests.servlets.portlink; - -import java.rmi.RemoteException; - -/** - * Remote interface used for Dynamix Proxy Generation - */ -public interface AddressBook extends java.rmi.Remote { - - public void addAddress(Address addr) throws RemoteException, AddressBookException; - public Address getAddress(String name) throws RemoteException; - public Address[] getAddresses() throws RemoteException; - public boolean isPresent(String name) throws RemoteException; - -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/servlets/portlink/AddressBookException.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/servlets/portlink/AddressBookException.java deleted file mode 100644 index 8ac4c46676b023407fc196bcab540f5becd92889..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/servlets/portlink/AddressBookException.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.objectweb.jonas.jtests.servlets.portlink; - -public class AddressBookException extends Exception { - - public AddressBookException(String msg) { - super(msg); - } -} diff --git a/jonas_tests/ws/src/org/objectweb/jonas/jtests/util/JWebServicesTestCase.java b/jonas_tests/ws/src/org/objectweb/jonas/jtests/util/JWebServicesTestCase.java deleted file mode 100644 index c9d203c1a2ead46c0556b04019b197a78bf680e5..0000000000000000000000000000000000000000 --- a/jonas_tests/ws/src/org/objectweb/jonas/jtests/util/JWebServicesTestCase.java +++ /dev/null @@ -1,454 +0,0 @@ -/** - * JOnAS: Java(TM) Open Application Server - * Copyright (C) 1999 Bull S.A. - * Contact: jonas-team@objectweb.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or 1any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - * - * Initial developer: Florent BENOIT - * -------------------------------------------------------------------------- - * $Id$ - * -------------------------------------------------------------------------- - */ - -package org.objectweb.jonas.jtests.util; - -import java.io.File; -import java.io.IOException; -import java.util.Set; - -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; -import javax.management.remote.JMXConnector; -import javax.management.remote.JMXConnectorFactory; -import javax.management.remote.JMXServiceURL; -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; -import javax.rmi.PortableRemoteObject; - -import junit.framework.TestCase; - -import com.meterware.httpunit.WebConversation; - -/** - * Define a class to add useful methods for test the webservices - * - Deploy ear, war and beans - * - Retrieve initial context - * @author Florent Benoit - */ -public class JWebServicesTestCase extends TestCase { - - /** - * Name of the JOnAS server used for tests - */ - private static String jonasName = "jonas"; - - /* - * JONAS_BASE - */ - protected static String jb = null; - - /** - * Initial context used for lookup - */ - protected static Context ictx = null; - - /** - * Connection to the MBeanServer - */ - private static MBeanServerConnection cnx = null; - - /** - * Conversation used for HttpUnit - */ - protected WebConversation wc = null; - - /** - * URL used for the constructor - */ - protected String url = null; - - /** - * Prefix for build URLs - */ - private String prefixUrl = null; - - /** - * Add to the specified url the prefix - * @param url relative URL - * @return absolute path of URL - */ - protected String getAbsoluteUrl (String url) { - return (this.prefixUrl + url); - } - - - /** - * Make an absolute path with the filename. - */ - public String absPath(String name, String extension) { - - String ret = ""; - if ( extension.equals(".jar")) { - ret = jb + "/ejbjars/" + name + ".jar"; - } else if ( extension.equals(".war")) { - ret = jb + "/webapps/" + name + ".war"; - } else if (extension.equals(".ear")) { - ret = jb + "/apps/" + name + ".ear"; - } - return ret; - } - private static JMXServiceURL jmxServerUrl = null; - private static String urlSuffix = "service:jmx:"; - private static String registry = null; - private static String defaultRegistry = "rmi://localhost:1099"; - private static String protocol = null; - private static String defaultProtocol = "jrmp"; - - /* - * Get Connection to the MBean server - * Set the static cnx variable - */ - private void getJmxCnx() { - if (cnx == null) { - try { - if (registry == null) { - registry = defaultRegistry; - } - registry = registry + "/"; - int indx = registry.lastIndexOf(":"); - String st = registry.substring(0, indx); - String serverUrl = urlSuffix + st +"/jndi/"+registry; - if (protocol == null) { - protocol = defaultProtocol; - } - String connectorName = protocol.concat("connector_"); - connectorName = connectorName.concat(jonasName); - serverUrl = serverUrl.concat(connectorName); - jmxServerUrl = new JMXServiceURL(serverUrl); - JMXConnector cntor = JMXConnectorFactory.connect(jmxServerUrl, null); - cnx = cntor.getMBeanServerConnection(null); - System.out.println("server reached via: "+serverUrl); - } catch (IOException e) { - System.err.println("Can't reach server " + jonasName - + " as couldn't create JMXConnector (" + e.getMessage() - + ")"); - System.err.println("Check name, registry and protocol options."); - System.exit(2); - } - } - } - - /* - * ObjectName of y=the J2eeServerMBean - */ - private static ObjectName j2eeserver = null; - - /* - * Get the ObjectName of the J2eeServerMBean - * @return the ObjectName - */ - private ObjectName getJ2eeServer() { - if (j2eeserver == null) { - try { - ObjectName on = ObjectName.getInstance("*:j2eeType=J2EEServer,name=" + jonasName); - Set j2eeservers = cnx.queryNames(on, null); - if (j2eeservers.isEmpty()) { - System.err.println("Can't admin server " + jonasName + ": didn't found J2EEServer MBean"); - System.exit(2); - } - j2eeserver = (ObjectName) j2eeservers.iterator().next(); - } catch (Exception e) { - System.err.println("Can't invoke mbeanServer: " + e); - } - } - return j2eeserver; - } - - /** - * Initialize the port used by tests and the prefix - */ - private void init() { - String port = System.getProperty("http.port"); - if (port == null) { - port = "9000"; - } - - prefixUrl = "http://localhost:" + port; - } - - /** - * Constructor with a specified name - * @param s the name - */ - public JWebServicesTestCase(String s) { - super(s); - init(); - } - /** - * Constructor with a specified name and url - * @param s the name - * @param url the url which can be used - */ - public JWebServicesTestCase(String s, String url) { - super(s); - wc = new WebConversation(); - init(); - this.url = getAbsoluteUrl(url); - } - - /** - * Get initialContext - * @return the initialContext - * @throws NamingException if the initial context can't be retrieved - */ - private Context getInitialContext() throws NamingException { - return new InitialContext(); - } - - /** - * Common setUp routine, used for every test. - * @throws Exception if an error occurs - */ - - protected void setUp() throws Exception { - try { - // get InitialContext - if (ictx == null) { - ictx = getInitialContext(); - } - jb = System.getProperty("jonas.base"); - registry = System.getProperty("registry"); - protocol = System.getProperty("protocol"); - getJmxCnx(); - - } catch (NamingException e) { - System.err.println("Cannot setup test: " + e); - e.printStackTrace(); - } - } - - - /** - * Load an ear file in the jonas server - * @param filename ear file, without ".ear" extension - * @throws Exception if an error occurs - */ - public void useEar(String fname) throws Exception { - String filename = absPath(fname, ".ear"); - try { - // Load ear in JOnAS if not already loaded. - if (!isEarLoaded(filename)) { - loadEar(filename); - } - - } catch (Exception e) { - throw new Exception("Cannot load Ear : " + e.getMessage()); - } - - } - - /** - * Load a war file in the jonas server - * @param filename war file, without ".war" extension - * @throws Exception if an error occurs - */ - - public void useWar(String fname) throws Exception { - String filename = absPath(fname, ".war"); - try { - // Load war in JOnAS if not already loaded. - if (!isWarLoaded(filename)) { - loadWar(filename); - } - } catch (Exception e) { - throw new Exception("Cannot load War : " + e.getMessage()); - } - } - - - - /** - * Load a bean jar file in the jonas server - * @param filename jar file, without ".jar" extension - * @throws Exception if an error occurs - */ - public void useBeans(String fname) throws Exception { - try { - String filename = absPath(fname, ".jar"); - // Load bean in EJBServer if not already loaded. - if (!isJarLoaded(filename)) { - addBeans(filename); - } - } catch (Exception e) { - throw new Exception("Cannot load Bean : " + e.getMessage()); - } - } - - - - /** - * Unload a bean jar file in the jonas server - * @param filename jar file, without ".jar" extension - * @throws Exception if an error occurs - */ - public void unUseBeans(String filename) throws Exception { - try { - - if (isJarLoaded(filename + ".jar")) { - unloadBeans(filename + ".jar"); - } - } catch (Exception e) { - throw new Exception("Cannot unload Bean : " + e.getMessage()); - } - } - - - - /* - * isLoaded remote operation - */ - private boolean isLoaded(String filename) { - boolean ret = false; - String[] params = {filename}; - String[] signature = {"java.lang.String"}; - try { - Boolean r = (Boolean) cnx.invoke(getJ2eeServer(), "isDeployed", params, signature); - ret = r.booleanValue(); - } catch (Exception e) { - System.err.println("Cannot deploy " + filename + ": " + e); - } - return ret; - } - - /** - * isJarLoaded remote operation - * @param filename jar file, with ".jar" extension - */ - private boolean isJarLoaded(String filename) { - boolean ret = false; - try { - return isLoaded(filename); - } catch (Exception e) { - System.err.println("Cannot test bean: " + e); - } - - return ret; - } - public void addBeans(String filename) { - - try { - String[] params = {filename}; - String[] signature = {"java.lang.String"}; - try { - cnx.invoke(getJ2eeServer(), "deploy", params, signature); - } catch (Exception e) { - System.err.println("Cannot deploy " + filename + ": " + e); - } - - } catch (Exception e) { - System.err.println("Cannot load bean: " + e); - } - } - - /** - * loadEar remote operation - * @param filename war file, with ".war" extension - */ - public void loadWar(String filename) { - try { - - String[] params = {filename}; - String[] signature = {"java.lang.String"}; - try { - cnx.invoke(getJ2eeServer(), "deploy", params, signature); - } catch (Exception e) { - System.err.println("Cannot deploy " + filename + ": " + e); - } - - } catch (Exception e) { - System.err.println("Cannot load bean: " + e); - } - } - - /** - * isWarLoaded remote operation - * @param filename war file, with ".war" extension - */ - private boolean isWarLoaded(String filename) { - boolean ret = false; - try { - return isLoaded(filename); - } catch (Exception e) { - System.err.println("Cannot test bean: " + e); - } - - return ret; - } - /** - * isEarLoaded remote operation - * @param filename ear file, with ".ear" extension - */ - private boolean isEarLoaded(String filename) { - boolean ret = false; - try { - return isLoaded(filename); - - } catch (Exception e) { - System.err.println("Cannot test bean: " + e); - } - - return ret; - } - /** - * loadEar remote operation - * @param filename ear file, with ".ear" extension - */ - public void loadEar(String filename) { - try { - - String[] params = {filename}; - String[] signature = {"java.lang.String"}; - try { - cnx.invoke(getJ2eeServer(), "deploy", params, signature); - } catch (Exception e) { - System.err.println("Cannot deploy " + filename + ": " + e); - } - - } catch (Exception e) { - System.err.println("Cannot load bean: " + e); - } - } - /** - * unloadBean remote operation - * @param filename jar file, with ".jar" extension - */ - public void unloadBeans(String filename) { - try { - String[] params = {filename}; - String[] signature = {"java.lang.String"}; - try { - cnx.invoke(getJ2eeServer(), "undeploy", params, signature); - } catch (Exception e) { - System.err.println("Cannot undeploy " + filename + ": " + e); - } - - } catch (Exception e) { - System.err.println("Cannot unload bean: " + e); - } - } -} diff --git a/jonas_doc/olddoc/Admin.html b/olddoc/Admin.html similarity index 100% rename from jonas_doc/olddoc/Admin.html rename to olddoc/Admin.html diff --git a/jonas_doc/olddoc/Cmi.html b/olddoc/Cmi.html similarity index 100% rename from jonas_doc/olddoc/Cmi.html rename to olddoc/Cmi.html diff --git a/jonas_doc/olddoc/Deployer.html b/olddoc/Deployer.html similarity index 100% rename from jonas_doc/olddoc/Deployer.html rename to olddoc/Deployer.html diff --git a/jonas_doc/olddoc/Domain.html b/olddoc/Domain.html similarity index 100% rename from jonas_doc/olddoc/Domain.html rename to olddoc/Domain.html diff --git a/jonas_doc/olddoc/JOnASWP.html b/olddoc/JOnASWP.html similarity index 100% rename from jonas_doc/olddoc/JOnASWP.html rename to olddoc/JOnASWP.html diff --git a/jonas_doc/olddoc/JOnASWebServices.html b/olddoc/JOnASWebServices.html similarity index 100% rename from jonas_doc/olddoc/JOnASWebServices.html rename to olddoc/JOnASWebServices.html diff --git a/jonas_doc/olddoc/MBeans.html b/olddoc/MBeans.html similarity index 100% rename from jonas_doc/olddoc/MBeans.html rename to olddoc/MBeans.html diff --git a/jonas_doc/olddoc/PG_Client.html b/olddoc/PG_Client.html similarity index 100% rename from jonas_doc/olddoc/PG_Client.html rename to olddoc/PG_Client.html diff --git a/jonas_doc/olddoc/PG_Connector.html b/olddoc/PG_Connector.html similarity index 100% rename from jonas_doc/olddoc/PG_Connector.html rename to olddoc/PG_Connector.html diff --git a/jonas_doc/olddoc/PG_Deployment.html b/olddoc/PG_Deployment.html similarity index 100% rename from jonas_doc/olddoc/PG_Deployment.html rename to olddoc/PG_Deployment.html diff --git a/jonas_doc/olddoc/PG_EarDeployment.html b/olddoc/PG_EarDeployment.html similarity index 100% rename from jonas_doc/olddoc/PG_EarDeployment.html rename to olddoc/PG_EarDeployment.html diff --git a/jonas_doc/olddoc/PG_Entity.html b/olddoc/PG_Entity.html similarity index 100% rename from jonas_doc/olddoc/PG_Entity.html rename to olddoc/PG_Entity.html diff --git a/jonas_doc/olddoc/PG_Environment.html b/olddoc/PG_Environment.html similarity index 100% rename from jonas_doc/olddoc/PG_Environment.html rename to olddoc/PG_Environment.html diff --git a/jonas_doc/olddoc/PG_J2eeApps.html b/olddoc/PG_J2eeApps.html similarity index 100% rename from jonas_doc/olddoc/PG_J2eeApps.html rename to olddoc/PG_J2eeApps.html diff --git a/jonas_doc/olddoc/PG_JmsGuide.html b/olddoc/PG_JmsGuide.html similarity index 100% rename from jonas_doc/olddoc/PG_JmsGuide.html rename to olddoc/PG_JmsGuide.html diff --git a/jonas_doc/olddoc/PG_LogModules.html b/olddoc/PG_LogModules.html similarity index 100% rename from jonas_doc/olddoc/PG_LogModules.html rename to olddoc/PG_LogModules.html diff --git a/jonas_doc/olddoc/PG_MsgDrvBean.html b/olddoc/PG_MsgDrvBean.html similarity index 100% rename from jonas_doc/olddoc/PG_MsgDrvBean.html rename to olddoc/PG_MsgDrvBean.html diff --git a/jonas_doc/olddoc/PG_Packaging.html b/olddoc/PG_Packaging.html similarity index 100% rename from jonas_doc/olddoc/PG_Packaging.html rename to olddoc/PG_Packaging.html diff --git a/jonas_doc/olddoc/PG_Security.html b/olddoc/PG_Security.html similarity index 100% rename from jonas_doc/olddoc/PG_Security.html rename to olddoc/PG_Security.html diff --git a/jonas_doc/olddoc/PG_Session.html b/olddoc/PG_Session.html similarity index 100% rename from jonas_doc/olddoc/PG_Session.html rename to olddoc/PG_Session.html diff --git a/jonas_doc/olddoc/PG_Transaction.html b/olddoc/PG_Transaction.html similarity index 100% rename from jonas_doc/olddoc/PG_Transaction.html rename to olddoc/PG_Transaction.html diff --git a/jonas_doc/olddoc/PG_War.html b/olddoc/PG_War.html similarity index 100% rename from jonas_doc/olddoc/PG_War.html rename to olddoc/PG_War.html diff --git a/jonas_doc/olddoc/Services.html b/olddoc/Services.html similarity index 100% rename from jonas_doc/olddoc/Services.html rename to olddoc/Services.html diff --git a/jonas_doc/olddoc/ant-ejbjar.html b/olddoc/ant-ejbjar.html similarity index 100% rename from jonas_doc/olddoc/ant-ejbjar.html rename to olddoc/ant-ejbjar.html diff --git a/jonas_doc/olddoc/clusterd.html b/olddoc/clusterd.html similarity index 100% rename from jonas_doc/olddoc/clusterd.html rename to olddoc/clusterd.html diff --git a/jonas_doc/olddoc/clustering.html b/olddoc/clustering.html similarity index 100% rename from jonas_doc/olddoc/clustering.html rename to olddoc/clustering.html diff --git a/jonas_doc/olddoc/common.css b/olddoc/common.css similarity index 100% rename from jonas_doc/olddoc/common.css rename to olddoc/common.css diff --git a/jonas_doc/olddoc/howto/Clustering.html b/olddoc/howto/Clustering.html similarity index 100% rename from jonas_doc/olddoc/howto/Clustering.html rename to olddoc/howto/Clustering.html diff --git a/jonas_doc/olddoc/howto/Firewall.html b/olddoc/howto/Firewall.html similarity index 100% rename from jonas_doc/olddoc/howto/Firewall.html rename to olddoc/howto/Firewall.html diff --git a/jonas_doc/olddoc/howto/JMSClustering.html b/olddoc/howto/JMSClustering.html similarity index 100% rename from jonas_doc/olddoc/howto/JMSClustering.html rename to olddoc/howto/JMSClustering.html diff --git a/jonas_doc/olddoc/howto/JORAMdistributed_JOnAS_4_1.html b/olddoc/howto/JORAMdistributed_JOnAS_4_1.html similarity index 100% rename from jonas_doc/olddoc/howto/JORAMdistributed_JOnAS_4_1.html rename to olddoc/howto/JORAMdistributed_JOnAS_4_1.html diff --git a/jonas_doc/olddoc/howto/JSR160_support.html b/olddoc/howto/JSR160_support.html similarity index 100% rename from jonas_doc/olddoc/howto/JSR160_support.html rename to olddoc/howto/JSR160_support.html diff --git a/jonas_doc/olddoc/howto/JonasArchi.html b/olddoc/howto/JonasArchi.html similarity index 100% rename from jonas_doc/olddoc/howto/JonasArchi.html rename to olddoc/howto/JonasArchi.html diff --git a/jonas_doc/olddoc/howto/JonasMBeansHowTo.html b/olddoc/howto/JonasMBeansHowTo.html similarity index 100% rename from jonas_doc/olddoc/howto/JonasMBeansHowTo.html rename to olddoc/howto/JonasMBeansHowTo.html diff --git a/jonas_doc/olddoc/howto/WebSphereMQ.html b/olddoc/howto/WebSphereMQ.html similarity index 100% rename from jonas_doc/olddoc/howto/WebSphereMQ.html rename to olddoc/howto/WebSphereMQ.html diff --git a/jonas_doc/olddoc/howto/Win32Service.html b/olddoc/howto/Win32Service.html similarity index 100% rename from jonas_doc/olddoc/howto/Win32Service.html rename to olddoc/howto/Win32Service.html diff --git a/jonas_doc/olddoc/howto/clusterdetails/AutomaticClusterConfiguration.html b/olddoc/howto/clusterdetails/AutomaticClusterConfiguration.html similarity index 100% rename from jonas_doc/olddoc/howto/clusterdetails/AutomaticClusterConfiguration.html rename to olddoc/howto/clusterdetails/AutomaticClusterConfiguration.html diff --git a/jonas_doc/olddoc/howto/clusterdetails/ManualClusterConfiguration.html b/olddoc/howto/clusterdetails/ManualClusterConfiguration.html similarity index 100% rename from jonas_doc/olddoc/howto/clusterdetails/ManualClusterConfiguration.html rename to olddoc/howto/clusterdetails/ManualClusterConfiguration.html diff --git a/jonas_doc/olddoc/howto/clusterdetails/c-jdbc.html b/olddoc/howto/clusterdetails/c-jdbc.html similarity index 100% rename from jonas_doc/olddoc/howto/clusterdetails/c-jdbc.html rename to olddoc/howto/clusterdetails/c-jdbc.html diff --git a/jonas_doc/olddoc/howto/clusterdetails/director.html b/olddoc/howto/clusterdetails/director.html similarity index 100% rename from jonas_doc/olddoc/howto/clusterdetails/director.html rename to olddoc/howto/clusterdetails/director.html diff --git a/jonas_doc/olddoc/howto/clusterdetails/mod_jk2-to-mod_jk.html b/olddoc/howto/clusterdetails/mod_jk2-to-mod_jk.html similarity index 100% rename from jonas_doc/olddoc/howto/clusterdetails/mod_jk2-to-mod_jk.html rename to olddoc/howto/clusterdetails/mod_jk2-to-mod_jk.html diff --git a/jonas_doc/olddoc/howto/clusterdetails/mod_jk2_embeddedtomcat.html b/olddoc/howto/clusterdetails/mod_jk2_embeddedtomcat.html similarity index 100% rename from jonas_doc/olddoc/howto/clusterdetails/mod_jk2_embeddedtomcat.html rename to olddoc/howto/clusterdetails/mod_jk2_embeddedtomcat.html diff --git a/jonas_doc/olddoc/howto/clusterdetails/mod_jk_embeddedtomcat.html b/olddoc/howto/clusterdetails/mod_jk_embeddedtomcat.html similarity index 100% rename from jonas_doc/olddoc/howto/clusterdetails/mod_jk_embeddedtomcat.html rename to olddoc/howto/clusterdetails/mod_jk_embeddedtomcat.html diff --git a/jonas_doc/olddoc/howto/clusterdetails/sequoia.html b/olddoc/howto/clusterdetails/sequoia.html similarity index 100% rename from jonas_doc/olddoc/howto/clusterdetails/sequoia.html rename to olddoc/howto/clusterdetails/sequoia.html diff --git a/jonas_doc/olddoc/howto/common.css b/olddoc/howto/common.css similarity index 100% rename from jonas_doc/olddoc/howto/common.css rename to olddoc/howto/common.css diff --git a/jonas_doc/olddoc/howto/emb-images/emb-component.png b/olddoc/howto/emb-images/emb-component.png similarity index 100% rename from jonas_doc/olddoc/howto/emb-images/emb-component.png rename to olddoc/howto/emb-images/emb-component.png diff --git a/jonas_doc/olddoc/howto/emb-images/emb-deps.png b/olddoc/howto/emb-images/emb-deps.png similarity index 100% rename from jonas_doc/olddoc/howto/emb-images/emb-deps.png rename to olddoc/howto/emb-images/emb-deps.png diff --git a/jonas_doc/olddoc/howto/emb-images/mfb.png b/olddoc/howto/emb-images/mfb.png similarity index 100% rename from jonas_doc/olddoc/howto/emb-images/mfb.png rename to olddoc/howto/emb-images/mfb.png diff --git a/jonas_doc/olddoc/howto/emb-images/src/emb-component.svg b/olddoc/howto/emb-images/src/emb-component.svg similarity index 100% rename from jonas_doc/olddoc/howto/emb-images/src/emb-component.svg rename to olddoc/howto/emb-images/src/emb-component.svg diff --git a/jonas_doc/olddoc/howto/emb-images/src/emb-deps.svg b/olddoc/howto/emb-images/src/emb-deps.svg similarity index 100% rename from jonas_doc/olddoc/howto/emb-images/src/emb-deps.svg rename to olddoc/howto/emb-images/src/emb-deps.svg diff --git a/jonas_doc/olddoc/howto/emb-images/src/mfb.svg b/olddoc/howto/emb-images/src/mfb.svg similarity index 100% rename from jonas_doc/olddoc/howto/emb-images/src/mfb.svg rename to olddoc/howto/emb-images/src/mfb.svg diff --git a/jonas_doc/olddoc/howto/images/JOnASJMX.gif b/olddoc/howto/images/JOnASJMX.gif similarity index 100% rename from jonas_doc/olddoc/howto/images/JOnASJMX.gif rename to olddoc/howto/images/JOnASJMX.gif diff --git a/jonas_doc/olddoc/howto/images/cluster1.gif b/olddoc/howto/images/cluster1.gif similarity index 100% rename from jonas_doc/olddoc/howto/images/cluster1.gif rename to olddoc/howto/images/cluster1.gif diff --git a/jonas_doc/olddoc/howto/images/clusterfiles/Apache.jpg b/olddoc/howto/images/clusterfiles/Apache.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/clusterfiles/Apache.jpg rename to olddoc/howto/images/clusterfiles/Apache.jpg diff --git a/jonas_doc/olddoc/howto/images/clusterfiles/Archi1.jpg b/olddoc/howto/images/clusterfiles/Archi1.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/clusterfiles/Archi1.jpg rename to olddoc/howto/images/clusterfiles/Archi1.jpg diff --git a/jonas_doc/olddoc/howto/images/clusterfiles/Archi2.jpg b/olddoc/howto/images/clusterfiles/Archi2.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/clusterfiles/Archi2.jpg rename to olddoc/howto/images/clusterfiles/Archi2.jpg diff --git a/jonas_doc/olddoc/howto/images/clusterfiles/Archi3.jpg b/olddoc/howto/images/clusterfiles/Archi3.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/clusterfiles/Archi3.jpg rename to olddoc/howto/images/clusterfiles/Archi3.jpg diff --git a/jonas_doc/olddoc/howto/images/clusterfiles/Archi4.jpg b/olddoc/howto/images/clusterfiles/Archi4.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/clusterfiles/Archi4.jpg rename to olddoc/howto/images/clusterfiles/Archi4.jpg diff --git a/jonas_doc/olddoc/howto/images/clusterfiles/Archi5.jpg b/olddoc/howto/images/clusterfiles/Archi5.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/clusterfiles/Archi5.jpg rename to olddoc/howto/images/clusterfiles/Archi5.jpg diff --git a/jonas_doc/olddoc/howto/images/clusterfiles/Architecture.jpg b/olddoc/howto/images/clusterfiles/Architecture.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/clusterfiles/Architecture.jpg rename to olddoc/howto/images/clusterfiles/Architecture.jpg diff --git a/jonas_doc/olddoc/howto/images/clusterfiles/EJBCont.jpg b/olddoc/howto/images/clusterfiles/EJBCont.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/clusterfiles/EJBCont.jpg rename to olddoc/howto/images/clusterfiles/EJBCont.jpg diff --git a/jonas_doc/olddoc/howto/images/clusterfiles/FullJOnAS.jpg b/olddoc/howto/images/clusterfiles/FullJOnAS.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/clusterfiles/FullJOnAS.jpg rename to olddoc/howto/images/clusterfiles/FullJOnAS.jpg diff --git a/jonas_doc/olddoc/howto/images/clusterfiles/JOnASEJB.jpg b/olddoc/howto/images/clusterfiles/JOnASEJB.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/clusterfiles/JOnASEJB.jpg rename to olddoc/howto/images/clusterfiles/JOnASEJB.jpg diff --git a/jonas_doc/olddoc/howto/images/clusterfiles/JOnASWeb.jpg b/olddoc/howto/images/clusterfiles/JOnASWeb.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/clusterfiles/JOnASWeb.jpg rename to olddoc/howto/images/clusterfiles/JOnASWeb.jpg diff --git a/jonas_doc/olddoc/howto/images/clusterfiles/Node.jpg b/olddoc/howto/images/clusterfiles/Node.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/clusterfiles/Node.jpg rename to olddoc/howto/images/clusterfiles/Node.jpg diff --git a/jonas_doc/olddoc/howto/images/clusterfiles/Thumbs.db b/olddoc/howto/images/clusterfiles/Thumbs.db similarity index 100% rename from jonas_doc/olddoc/howto/images/clusterfiles/Thumbs.db rename to olddoc/howto/images/clusterfiles/Thumbs.db diff --git a/jonas_doc/olddoc/howto/images/clusterfiles/WebCont.jpg b/olddoc/howto/images/clusterfiles/WebCont.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/clusterfiles/WebCont.jpg rename to olddoc/howto/images/clusterfiles/WebCont.jpg diff --git a/jonas_doc/olddoc/howto/images/clusterfiles/common.css b/olddoc/howto/images/clusterfiles/common.css similarity index 100% rename from jonas_doc/olddoc/howto/images/clusterfiles/common.css rename to olddoc/howto/images/clusterfiles/common.css diff --git a/jonas_doc/olddoc/howto/images/clusterfiles/sampleCluster2Screen.GIF b/olddoc/howto/images/clusterfiles/sampleCluster2Screen.GIF similarity index 100% rename from jonas_doc/olddoc/howto/images/clusterfiles/sampleCluster2Screen.GIF rename to olddoc/howto/images/clusterfiles/sampleCluster2Screen.GIF diff --git a/jonas_doc/olddoc/howto/images/jmsclustering/JmsClustering-queues.jpg b/olddoc/howto/images/jmsclustering/JmsClustering-queues.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/jmsclustering/JmsClustering-queues.jpg rename to olddoc/howto/images/jmsclustering/JmsClustering-queues.jpg diff --git a/jonas_doc/olddoc/howto/images/jmsclustering/JmsClustering-topics.jpg b/olddoc/howto/images/jmsclustering/JmsClustering-topics.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/jmsclustering/JmsClustering-topics.jpg rename to olddoc/howto/images/jmsclustering/JmsClustering-topics.jpg diff --git a/jonas_doc/olddoc/howto/images/jmsclustering/joram.jpg b/olddoc/howto/images/jmsclustering/joram.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/jmsclustering/joram.jpg rename to olddoc/howto/images/jmsclustering/joram.jpg diff --git a/jonas_doc/olddoc/howto/images/jmsclustering/joram_ha.jpg b/olddoc/howto/images/jmsclustering/joram_ha.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/jmsclustering/joram_ha.jpg rename to olddoc/howto/images/jmsclustering/joram_ha.jpg diff --git a/jonas_doc/olddoc/howto/images/jmsclustering/mdb.jpg b/olddoc/howto/images/jmsclustering/mdb.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/jmsclustering/mdb.jpg rename to olddoc/howto/images/jmsclustering/mdb.jpg diff --git a/jonas_doc/olddoc/howto/images/jmsclustering/mdb_config.jpg b/olddoc/howto/images/jmsclustering/mdb_config.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/jmsclustering/mdb_config.jpg rename to olddoc/howto/images/jmsclustering/mdb_config.jpg diff --git a/jonas_doc/olddoc/howto/images/jmsclustering/queue.jpg b/olddoc/howto/images/jmsclustering/queue.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/jmsclustering/queue.jpg rename to olddoc/howto/images/jmsclustering/queue.jpg diff --git a/jonas_doc/olddoc/howto/images/jmsclustering/topic.jpg b/olddoc/howto/images/jmsclustering/topic.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/jmsclustering/topic.jpg rename to olddoc/howto/images/jmsclustering/topic.jpg diff --git a/jonas_doc/olddoc/howto/images/jonas_cmp.gif b/olddoc/howto/images/jonas_cmp.gif similarity index 100% rename from jonas_doc/olddoc/howto/images/jonas_cmp.gif rename to olddoc/howto/images/jonas_cmp.gif diff --git a/jonas_doc/olddoc/howto/images/jonasarch.gif b/olddoc/howto/images/jonasarch.gif similarity index 100% rename from jonas_doc/olddoc/howto/images/jonasarch.gif rename to olddoc/howto/images/jonasarch.gif diff --git a/jonas_doc/olddoc/howto/images/jonastransactionrecoveryhowto/recovimg1.jpg b/olddoc/howto/images/jonastransactionrecoveryhowto/recovimg1.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/jonastransactionrecoveryhowto/recovimg1.jpg rename to olddoc/howto/images/jonastransactionrecoveryhowto/recovimg1.jpg diff --git a/jonas_doc/olddoc/howto/images/jonastransactionrecoveryhowto/recovimg2.jpg b/olddoc/howto/images/jonastransactionrecoveryhowto/recovimg2.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/jonastransactionrecoveryhowto/recovimg2.jpg rename to olddoc/howto/images/jonastransactionrecoveryhowto/recovimg2.jpg diff --git a/jonas_doc/olddoc/howto/images/jonastransactionrecoveryhowto/recovimg3.jpg b/olddoc/howto/images/jonastransactionrecoveryhowto/recovimg3.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/jonastransactionrecoveryhowto/recovimg3.jpg rename to olddoc/howto/images/jonastransactionrecoveryhowto/recovimg3.jpg diff --git a/jonas_doc/olddoc/howto/images/jonastransactionrecoveryhowto/recovimg4.jpg b/olddoc/howto/images/jonastransactionrecoveryhowto/recovimg4.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/jonastransactionrecoveryhowto/recovimg4.jpg rename to olddoc/howto/images/jonastransactionrecoveryhowto/recovimg4.jpg diff --git a/jonas_doc/olddoc/howto/images/jonastransactionrecoveryhowto/recovimg5.jpg b/olddoc/howto/images/jonastransactionrecoveryhowto/recovimg5.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/jonastransactionrecoveryhowto/recovimg5.jpg rename to olddoc/howto/images/jonastransactionrecoveryhowto/recovimg5.jpg diff --git a/jonas_doc/olddoc/howto/images/jonastransactionrecoveryhowto/recovimg6.jpg b/olddoc/howto/images/jonastransactionrecoveryhowto/recovimg6.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/jonastransactionrecoveryhowto/recovimg6.jpg rename to olddoc/howto/images/jonastransactionrecoveryhowto/recovimg6.jpg diff --git a/jonas_doc/olddoc/howto/images/jonastransactionrecoveryhowto/recovimg7.jpg b/olddoc/howto/images/jonastransactionrecoveryhowto/recovimg7.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/jonastransactionrecoveryhowto/recovimg7.jpg rename to olddoc/howto/images/jonastransactionrecoveryhowto/recovimg7.jpg diff --git a/jonas_doc/olddoc/howto/images/jonastransactionrecoveryhowto/recovimg8.jpg b/olddoc/howto/images/jonastransactionrecoveryhowto/recovimg8.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/jonastransactionrecoveryhowto/recovimg8.jpg rename to olddoc/howto/images/jonastransactionrecoveryhowto/recovimg8.jpg diff --git a/jonas_doc/olddoc/howto/images/logo_jonas.jpg b/olddoc/howto/images/logo_jonas.jpg similarity index 100% rename from jonas_doc/olddoc/howto/images/logo_jonas.jpg rename to olddoc/howto/images/logo_jonas.jpg diff --git a/jonas_doc/olddoc/howto/install_j2ee.html b/olddoc/howto/install_j2ee.html similarity index 100% rename from jonas_doc/olddoc/howto/install_j2ee.html rename to olddoc/howto/install_j2ee.html diff --git a/jonas_doc/olddoc/howto/install_jonas.html b/olddoc/howto/install_jonas.html similarity index 100% rename from jonas_doc/olddoc/howto/install_jonas.html rename to olddoc/howto/install_jonas.html diff --git a/jonas_doc/olddoc/howto/ws/sample-deploy.wsdd b/olddoc/howto/ws/sample-deploy.wsdd similarity index 100% rename from jonas_doc/olddoc/howto/ws/sample-deploy.wsdd rename to olddoc/howto/ws/sample-deploy.wsdd diff --git a/jonas_doc/olddoc/howto/ws/sample-server-config.wsdd b/olddoc/howto/ws/sample-server-config.wsdd similarity index 100% rename from jonas_doc/olddoc/howto/ws/sample-server-config.wsdd rename to olddoc/howto/ws/sample-server-config.wsdd diff --git a/jonas_doc/olddoc/howto/ws/sample-web.xml b/olddoc/howto/ws/sample-web.xml similarity index 100% rename from jonas_doc/olddoc/howto/ws/sample-web.xml rename to olddoc/howto/ws/sample-web.xml diff --git a/jonas_doc/olddoc/images/AreaGraph.png b/olddoc/images/AreaGraph.png similarity index 100% rename from jonas_doc/olddoc/images/AreaGraph.png rename to olddoc/images/AreaGraph.png diff --git a/jonas_doc/olddoc/images/JonasAdmin.gif b/olddoc/images/JonasAdmin.gif similarity index 100% rename from jonas_doc/olddoc/images/JonasAdmin.gif rename to olddoc/images/JonasAdmin.gif diff --git a/jonas_doc/olddoc/images/JonasAreas.png b/olddoc/images/JonasAreas.png similarity index 100% rename from jonas_doc/olddoc/images/JonasAreas.png rename to olddoc/images/JonasAreas.png diff --git a/jonas_doc/olddoc/images/WP_distr.gif b/olddoc/images/WP_distr.gif similarity index 100% rename from jonas_doc/olddoc/images/WP_distr.gif rename to olddoc/images/WP_distr.gif diff --git a/jonas_doc/olddoc/images/classloaders.png b/olddoc/images/classloaders.png similarity index 100% rename from jonas_doc/olddoc/images/classloaders.png rename to olddoc/images/classloaders.png diff --git a/jonas_doc/olddoc/images/cluster1.gif b/olddoc/images/cluster1.gif similarity index 100% rename from jonas_doc/olddoc/images/cluster1.gif rename to olddoc/images/cluster1.gif diff --git a/jonas_doc/olddoc/images/clusterd.gif b/olddoc/images/clusterd.gif similarity index 100% rename from jonas_doc/olddoc/images/clusterd.gif rename to olddoc/images/clusterd.gif diff --git a/jonas_doc/olddoc/images/clustering.gif b/olddoc/images/clustering.gif similarity index 100% rename from jonas_doc/olddoc/images/clustering.gif rename to olddoc/images/clustering.gif diff --git a/jonas_doc/olddoc/images/cmi-cluster-stub.gif b/olddoc/images/cmi-cluster-stub.gif similarity index 100% rename from jonas_doc/olddoc/images/cmi-cluster-stub.gif rename to olddoc/images/cmi-cluster-stub.gif diff --git a/jonas_doc/olddoc/images/cmi-jndi.gif b/olddoc/images/cmi-jndi.gif similarity index 100% rename from jonas_doc/olddoc/images/cmi-jndi.gif rename to olddoc/images/cmi-jndi.gif diff --git a/jonas_doc/olddoc/images/cmi.gif b/olddoc/images/cmi.gif similarity index 100% rename from jonas_doc/olddoc/images/cmi.gif rename to olddoc/images/cmi.gif diff --git a/jonas_doc/olddoc/images/domain_new.gif b/olddoc/images/domain_new.gif similarity index 100% rename from jonas_doc/olddoc/images/domain_new.gif rename to olddoc/images/domain_new.gif diff --git a/jonas_doc/olddoc/images/eb_img_31.gif b/olddoc/images/eb_img_31.gif similarity index 100% rename from jonas_doc/olddoc/images/eb_img_31.gif rename to olddoc/images/eb_img_31.gif diff --git a/jonas_doc/olddoc/images/favicon.ico b/olddoc/images/favicon.ico similarity index 100% rename from jonas_doc/olddoc/images/favicon.ico rename to olddoc/images/favicon.ico diff --git a/jonas_doc/olddoc/images/j2ee.gif b/olddoc/images/j2ee.gif similarity index 100% rename from jonas_doc/olddoc/images/j2ee.gif rename to olddoc/images/j2ee.gif diff --git a/jonas_doc/olddoc/images/jcaarch.gif b/olddoc/images/jcaarch.gif similarity index 100% rename from jonas_doc/olddoc/images/jcaarch.gif rename to olddoc/images/jcaarch.gif diff --git a/jonas_doc/olddoc/images/jconsole.png b/olddoc/images/jconsole.png similarity index 100% rename from jonas_doc/olddoc/images/jconsole.png rename to olddoc/images/jconsole.png diff --git a/jonas_doc/olddoc/images/jonas48repscenarios.jpg b/olddoc/images/jonas48repscenarios.jpg similarity index 100% rename from jonas_doc/olddoc/images/jonas48repscenarios.jpg rename to olddoc/images/jonas48repscenarios.jpg diff --git a/jonas_doc/olddoc/images/jonasTree.png b/olddoc/images/jonasTree.png similarity index 100% rename from jonas_doc/olddoc/images/jonasTree.png rename to olddoc/images/jonasTree.png diff --git a/jonas_doc/olddoc/images/jonasarch.gif b/olddoc/images/jonasarch.gif similarity index 100% rename from jonas_doc/olddoc/images/jonasarch.gif rename to olddoc/images/jonasarch.gif diff --git a/jonas_doc/olddoc/images/logo_jonas.jpg b/olddoc/images/logo_jonas.jpg similarity index 100% rename from jonas_doc/olddoc/images/logo_jonas.jpg rename to olddoc/images/logo_jonas.jpg diff --git a/jonas_doc/olddoc/images/pix.gif b/olddoc/images/pix.gif similarity index 100% rename from jonas_doc/olddoc/images/pix.gif rename to olddoc/images/pix.gif diff --git a/jonas_doc/olddoc/images/roles1.gif b/olddoc/images/roles1.gif similarity index 100% rename from jonas_doc/olddoc/images/roles1.gif rename to olddoc/images/roles1.gif diff --git a/jonas_doc/olddoc/images/sfsb-rep.jpg b/olddoc/images/sfsb-rep.jpg similarity index 100% rename from jonas_doc/olddoc/images/sfsb-rep.jpg rename to olddoc/images/sfsb-rep.jpg diff --git a/jonas_doc/olddoc/images/ws_client.jpg b/olddoc/images/ws_client.jpg similarity index 100% rename from jonas_doc/olddoc/images/ws_client.jpg rename to olddoc/images/ws_client.jpg diff --git a/jonas_doc/olddoc/images/ws_endpoint.jpg b/olddoc/images/ws_endpoint.jpg similarity index 100% rename from jonas_doc/olddoc/images/ws_endpoint.jpg rename to olddoc/images/ws_endpoint.jpg diff --git a/jonas_doc/olddoc/index.html b/olddoc/index.html similarity index 100% rename from jonas_doc/olddoc/index.html rename to olddoc/index.html diff --git a/jonas_doc/pom.xml b/pom.xml similarity index 100% rename from jonas_doc/pom.xml rename to pom.xml diff --git a/jonas_doc/src/docbook/doc-en/Glossary.xml b/src/docbook/doc-en/Glossary.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/Glossary.xml rename to src/docbook/doc-en/Glossary.xml diff --git a/jonas_doc/src/docbook/doc-en/admin/JSR160_support.xml b/src/docbook/doc-en/admin/JSR160_support.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/admin/JSR160_support.xml rename to src/docbook/doc-en/admin/JSR160_support.xml diff --git a/jonas_doc/src/docbook/doc-en/admin/admindefs.xml b/src/docbook/doc-en/admin/admindefs.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/admin/admindefs.xml rename to src/docbook/doc-en/admin/admindefs.xml diff --git a/jonas_doc/src/docbook/doc-en/admin/adminfunctions.xml b/src/docbook/doc-en/admin/adminfunctions.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/admin/adminfunctions.xml rename to src/docbook/doc-en/admin/adminfunctions.xml diff --git a/jonas_doc/src/docbook/doc-en/admin/adminmbeans.xml b/src/docbook/doc-en/admin/adminmbeans.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/admin/adminmbeans.xml rename to src/docbook/doc-en/admin/adminmbeans.xml diff --git a/jonas_doc/src/docbook/doc-en/admin/admintools.xml b/src/docbook/doc-en/admin/admintools.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/admin/admintools.xml rename to src/docbook/doc-en/admin/admintools.xml diff --git a/jonas_doc/src/docbook/doc-en/admin/adminuse.xml b/src/docbook/doc-en/admin/adminuse.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/admin/adminuse.xml rename to src/docbook/doc-en/admin/adminuse.xml diff --git a/jonas_doc/src/docbook/doc-en/admin/install.xml b/src/docbook/doc-en/admin/install.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/admin/install.xml rename to src/docbook/doc-en/admin/install.xml diff --git a/jonas_doc/src/docbook/doc-en/admin/mejb.xml b/src/docbook/doc-en/admin/mejb.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/admin/mejb.xml rename to src/docbook/doc-en/admin/mejb.xml diff --git a/jonas_doc/src/docbook/doc-en/admin/mejbaccess.xml b/src/docbook/doc-en/admin/mejbaccess.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/admin/mejbaccess.xml rename to src/docbook/doc-en/admin/mejbaccess.xml diff --git a/jonas_doc/src/docbook/doc-en/admin/threadStackDump.xml b/src/docbook/doc-en/admin/threadStackDump.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/admin/threadStackDump.xml rename to src/docbook/doc-en/admin/threadStackDump.xml diff --git a/jonas_doc/src/docbook/doc-en/administration_guide.xml b/src/docbook/doc-en/administration_guide.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/administration_guide.xml rename to src/docbook/doc-en/administration_guide.xml diff --git a/jonas_doc/src/docbook/doc-en/ant_tasks.xml b/src/docbook/doc-en/ant_tasks.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/ant_tasks.xml rename to src/docbook/doc-en/ant_tasks.xml diff --git a/jonas_doc/src/docbook/doc-en/anttasks/ant_ejbjar.xml b/src/docbook/doc-en/anttasks/ant_ejbjar.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/anttasks/ant_ejbjar.xml rename to src/docbook/doc-en/anttasks/ant_ejbjar.xml diff --git a/jonas_doc/src/docbook/doc-en/anttasks/ant_genic.xml b/src/docbook/doc-en/anttasks/ant_genic.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/anttasks/ant_genic.xml rename to src/docbook/doc-en/anttasks/ant_genic.xml diff --git a/jonas_doc/src/docbook/doc-en/anttasks/ant_jonas.xml b/src/docbook/doc-en/anttasks/ant_jonas.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/anttasks/ant_jonas.xml rename to src/docbook/doc-en/anttasks/ant_jonas.xml diff --git a/jonas_doc/src/docbook/doc-en/anttasks/ant_jonasbase.xml b/src/docbook/doc-en/anttasks/ant_jonasbase.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/anttasks/ant_jonasbase.xml rename to src/docbook/doc-en/anttasks/ant_jonasbase.xml diff --git a/jonas_doc/src/docbook/doc-en/anttasks/ant_newjc.xml b/src/docbook/doc-en/anttasks/ant_newjc.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/anttasks/ant_newjc.xml rename to src/docbook/doc-en/anttasks/ant_newjc.xml diff --git a/jonas_doc/src/docbook/doc-en/anttasks/ant_property.xml b/src/docbook/doc-en/anttasks/ant_property.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/anttasks/ant_property.xml rename to src/docbook/doc-en/anttasks/ant_property.xml diff --git a/jonas_doc/src/docbook/doc-en/anttasks/ant_serverdeploy.xml b/src/docbook/doc-en/anttasks/ant_serverdeploy.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/anttasks/ant_serverdeploy.xml rename to src/docbook/doc-en/anttasks/ant_serverdeploy.xml diff --git a/jonas_doc/src/docbook/doc-en/anttasks/ant_wsgen.xml b/src/docbook/doc-en/anttasks/ant_wsgen.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/anttasks/ant_wsgen.xml rename to src/docbook/doc-en/anttasks/ant_wsgen.xml diff --git a/jonas_doc/src/docbook/doc-en/clustering/clustering-variables.xml b/src/docbook/doc-en/clustering/clustering-variables.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/clustering/clustering-variables.xml rename to src/docbook/doc-en/clustering/clustering-variables.xml diff --git a/jonas_doc/src/docbook/doc-en/clustering/configuration/ejb.xml b/src/docbook/doc-en/clustering/configuration/ejb.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/clustering/configuration/ejb.xml rename to src/docbook/doc-en/clustering/configuration/ejb.xml diff --git a/jonas_doc/src/docbook/doc-en/clustering/configuration/jms.xml b/src/docbook/doc-en/clustering/configuration/jms.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/clustering/configuration/jms.xml rename to src/docbook/doc-en/clustering/configuration/jms.xml diff --git a/jonas_doc/src/docbook/doc-en/clustering/configuration/web.xml b/src/docbook/doc-en/clustering/configuration/web.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/clustering/configuration/web.xml rename to src/docbook/doc-en/clustering/configuration/web.xml diff --git a/jonas_doc/src/docbook/doc-en/clustering/examples/sampleCluster2.xml b/src/docbook/doc-en/clustering/examples/sampleCluster2.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/clustering/examples/sampleCluster2.xml rename to src/docbook/doc-en/clustering/examples/sampleCluster2.xml diff --git a/jonas_doc/src/docbook/doc-en/clustering/examples/sampleCluster3.xml b/src/docbook/doc-en/clustering/examples/sampleCluster3.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/clustering/examples/sampleCluster3.xml rename to src/docbook/doc-en/clustering/examples/sampleCluster3.xml diff --git a/jonas_doc/src/docbook/doc-en/clustering/faq/faq.xml b/src/docbook/doc-en/clustering/faq/faq.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/clustering/faq/faq.xml rename to src/docbook/doc-en/clustering/faq/faq.xml diff --git a/jonas_doc/src/docbook/doc-en/clustering/management/cluster.xml b/src/docbook/doc-en/clustering/management/cluster.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/clustering/management/cluster.xml rename to src/docbook/doc-en/clustering/management/cluster.xml diff --git a/jonas_doc/src/docbook/doc-en/clustering/management/clusterd.xml b/src/docbook/doc-en/clustering/management/clusterd.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/clustering/management/clusterd.xml rename to src/docbook/doc-en/clustering/management/clusterd.xml diff --git a/jonas_doc/src/docbook/doc-en/clustering/management/cmi.xml b/src/docbook/doc-en/clustering/management/cmi.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/clustering/management/cmi.xml rename to src/docbook/doc-en/clustering/management/cmi.xml diff --git a/jonas_doc/src/docbook/doc-en/clustering/management/domain.xml b/src/docbook/doc-en/clustering/management/domain.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/clustering/management/domain.xml rename to src/docbook/doc-en/clustering/management/domain.xml diff --git a/jonas_doc/src/docbook/doc-en/clustering/management/ha.xml b/src/docbook/doc-en/clustering/management/ha.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/clustering/management/ha.xml rename to src/docbook/doc-en/clustering/management/ha.xml diff --git a/jonas_doc/src/docbook/doc-en/clustering/principles/clustering.xml b/src/docbook/doc-en/clustering/principles/clustering.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/clustering/principles/clustering.xml rename to src/docbook/doc-en/clustering/principles/clustering.xml diff --git a/jonas_doc/src/docbook/doc-en/clustering/principles/management.xml b/src/docbook/doc-en/clustering/principles/management.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/clustering/principles/management.xml rename to src/docbook/doc-en/clustering/principles/management.xml diff --git a/jonas_doc/src/docbook/doc-en/clustering/principles/terminology.xml b/src/docbook/doc-en/clustering/principles/terminology.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/clustering/principles/terminology.xml rename to src/docbook/doc-en/clustering/principles/terminology.xml diff --git a/jonas_doc/src/docbook/doc-en/clustering/tooling/jasmine.xml b/src/docbook/doc-en/clustering/tooling/jasmine.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/clustering/tooling/jasmine.xml rename to src/docbook/doc-en/clustering/tooling/jasmine.xml diff --git a/jonas_doc/src/docbook/doc-en/clustering/tooling/jkmanager.xml b/src/docbook/doc-en/clustering/tooling/jkmanager.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/clustering/tooling/jkmanager.xml rename to src/docbook/doc-en/clustering/tooling/jkmanager.xml diff --git a/jonas_doc/src/docbook/doc-en/clustering_guide.xml b/src/docbook/doc-en/clustering_guide.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/clustering_guide.xml rename to src/docbook/doc-en/clustering_guide.xml diff --git a/jonas_doc/src/docbook/doc-en/command_guide.xml b/src/docbook/doc-en/command_guide.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/command_guide.xml rename to src/docbook/doc-en/command_guide.xml diff --git a/jonas_doc/src/docbook/doc-en/commands/configuration_newjb.xml b/src/docbook/doc-en/commands/configuration_newjb.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/commands/configuration_newjb.xml rename to src/docbook/doc-en/commands/configuration_newjb.xml diff --git a/jonas_doc/src/docbook/doc-en/commands/configuration_newjc.xml b/src/docbook/doc-en/commands/configuration_newjc.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/commands/configuration_newjc.xml rename to src/docbook/doc-en/commands/configuration_newjc.xml diff --git a/jonas_doc/src/docbook/doc-en/commands/configuration_raconfig.xml b/src/docbook/doc-en/commands/configuration_raconfig.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/commands/configuration_raconfig.xml rename to src/docbook/doc-en/commands/configuration_raconfig.xml diff --git a/jonas_doc/src/docbook/doc-en/commands/genic.xml b/src/docbook/doc-en/commands/genic.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/commands/genic.xml rename to src/docbook/doc-en/commands/genic.xml diff --git a/jonas_doc/src/docbook/doc-en/commands/jclient.xml b/src/docbook/doc-en/commands/jclient.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/commands/jclient.xml rename to src/docbook/doc-en/commands/jclient.xml diff --git a/jonas_doc/src/docbook/doc-en/commands/jms.xml b/src/docbook/doc-en/commands/jms.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/commands/jms.xml rename to src/docbook/doc-en/commands/jms.xml diff --git a/jonas_doc/src/docbook/doc-en/commands/jonas.xml b/src/docbook/doc-en/commands/jonas.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/commands/jonas.xml rename to src/docbook/doc-en/commands/jonas.xml diff --git a/jonas_doc/src/docbook/doc-en/config/jonas_properties.xml b/src/docbook/doc-en/config/jonas_properties.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/config/jonas_properties.xml rename to src/docbook/doc-en/config/jonas_properties.xml diff --git a/jonas_doc/src/docbook/doc-en/config/jonasbase_conf.xml b/src/docbook/doc-en/config/jonasbase_conf.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/config/jonasbase_conf.xml rename to src/docbook/doc-en/config/jonasbase_conf.xml diff --git a/jonas_doc/src/docbook/doc-en/config/jonasbase_creation.xml b/src/docbook/doc-en/config/jonasbase_creation.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/config/jonasbase_creation.xml rename to src/docbook/doc-en/config/jonasbase_creation.xml diff --git a/jonas_doc/src/docbook/doc-en/config/jonasbase_structure.xml b/src/docbook/doc-en/config/jonasbase_structure.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/config/jonasbase_structure.xml rename to src/docbook/doc-en/config/jonasbase_structure.xml diff --git a/jonas_doc/src/docbook/doc-en/config/jonasroot_structure.xml b/src/docbook/doc-en/config/jonasroot_structure.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/config/jonasroot_structure.xml rename to src/docbook/doc-en/config/jonasroot_structure.xml diff --git a/jonas_doc/src/docbook/doc-en/configuration_guide.xml b/src/docbook/doc-en/configuration_guide.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/configuration_guide.xml rename to src/docbook/doc-en/configuration_guide.xml diff --git a/jonas_doc/src/docbook/doc-en/connector_pg.xml b/src/docbook/doc-en/connector_pg.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/connector_pg.xml rename to src/docbook/doc-en/connector_pg.xml diff --git a/jonas_doc/src/docbook/doc-en/continuous_integration_guide.xml b/src/docbook/doc-en/continuous_integration_guide.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/continuous_integration_guide.xml rename to src/docbook/doc-en/continuous_integration_guide.xml diff --git a/jonas_doc/src/docbook/doc-en/deploy/ear.xml b/src/docbook/doc-en/deploy/ear.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/deploy/ear.xml rename to src/docbook/doc-en/deploy/ear.xml diff --git a/jonas_doc/src/docbook/doc-en/deploy/ejb2.xml b/src/docbook/doc-en/deploy/ejb2.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/deploy/ejb2.xml rename to src/docbook/doc-en/deploy/ejb2.xml diff --git a/jonas_doc/src/docbook/doc-en/deploy/principes.xml b/src/docbook/doc-en/deploy/principes.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/deploy/principes.xml rename to src/docbook/doc-en/deploy/principes.xml diff --git a/jonas_doc/src/docbook/doc-en/deploy/war.xml b/src/docbook/doc-en/deploy/war.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/deploy/war.xml rename to src/docbook/doc-en/deploy/war.xml diff --git a/jonas_doc/src/docbook/doc-en/deploy/webapps.xml b/src/docbook/doc-en/deploy/webapps.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/deploy/webapps.xml rename to src/docbook/doc-en/deploy/webapps.xml diff --git a/jonas_doc/src/docbook/doc-en/deployer_guide.xml b/src/docbook/doc-en/deployer_guide.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/deployer_guide.xml rename to src/docbook/doc-en/deployer_guide.xml diff --git a/jonas_doc/src/docbook/doc-en/deployment-plans/deployment-plan-common.xml b/src/docbook/doc-en/deployment-plans/deployment-plan-common.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/deployment-plans/deployment-plan-common.xml rename to src/docbook/doc-en/deployment-plans/deployment-plan-common.xml diff --git a/jonas_doc/src/docbook/doc-en/deployment-plans/deployment-plan-element-attribute.xml b/src/docbook/doc-en/deployment-plans/deployment-plan-element-attribute.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/deployment-plans/deployment-plan-element-attribute.xml rename to src/docbook/doc-en/deployment-plans/deployment-plan-element-attribute.xml diff --git a/jonas_doc/src/docbook/doc-en/deployment-plans/deployment-plan-mixed.xml b/src/docbook/doc-en/deployment-plans/deployment-plan-mixed.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/deployment-plans/deployment-plan-mixed.xml rename to src/docbook/doc-en/deployment-plans/deployment-plan-mixed.xml diff --git a/jonas_doc/src/docbook/doc-en/deployment-plans/deployment-plan-sample-example.xml b/src/docbook/doc-en/deployment-plans/deployment-plan-sample-example.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/deployment-plans/deployment-plan-sample-example.xml rename to src/docbook/doc-en/deployment-plans/deployment-plan-sample-example.xml diff --git a/jonas_doc/src/docbook/doc-en/deployment-plans/deployment-plan-type.xml b/src/docbook/doc-en/deployment-plans/deployment-plan-type.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/deployment-plans/deployment-plan-type.xml rename to src/docbook/doc-en/deployment-plans/deployment-plan-type.xml diff --git a/jonas_doc/src/docbook/doc-en/deployment-plans/deployment-plan.xml b/src/docbook/doc-en/deployment-plans/deployment-plan.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/deployment-plans/deployment-plan.xml rename to src/docbook/doc-en/deployment-plans/deployment-plan.xml diff --git a/jonas_doc/src/docbook/doc-en/deployment-plans/introduction.xml b/src/docbook/doc-en/deployment-plans/introduction.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/deployment-plans/introduction.xml rename to src/docbook/doc-en/deployment-plans/introduction.xml diff --git a/jonas_doc/src/docbook/doc-en/deployment-plans/jonas/jonas-deployment-plan.xml b/src/docbook/doc-en/deployment-plans/jonas/jonas-deployment-plan.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/deployment-plans/jonas/jonas-deployment-plan.xml rename to src/docbook/doc-en/deployment-plans/jonas/jonas-deployment-plan.xml diff --git a/jonas_doc/src/docbook/doc-en/deployment-plans/repositories.xml b/src/docbook/doc-en/deployment-plans/repositories.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/deployment-plans/repositories.xml rename to src/docbook/doc-en/deployment-plans/repositories.xml diff --git a/jonas_doc/src/docbook/doc-en/deployment-plans/typespecific/deployment-type-specific-data.xml b/src/docbook/doc-en/deployment-plans/typespecific/deployment-type-specific-data.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/deployment-plans/typespecific/deployment-type-specific-data.xml rename to src/docbook/doc-en/deployment-plans/typespecific/deployment-type-specific-data.xml diff --git a/jonas_doc/src/docbook/doc-en/deployment-plans/typespecific/maven2-deployment-data.xml b/src/docbook/doc-en/deployment-plans/typespecific/maven2-deployment-data.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/deployment-plans/typespecific/maven2-deployment-data.xml rename to src/docbook/doc-en/deployment-plans/typespecific/maven2-deployment-data.xml diff --git a/jonas_doc/src/docbook/doc-en/deployment-plans/typespecific/obr-deployment-data.xml b/src/docbook/doc-en/deployment-plans/typespecific/obr-deployment-data.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/deployment-plans/typespecific/obr-deployment-data.xml rename to src/docbook/doc-en/deployment-plans/typespecific/obr-deployment-data.xml diff --git a/jonas_doc/src/docbook/doc-en/deployment-plans/typespecific/url-deployment-data.xml b/src/docbook/doc-en/deployment-plans/typespecific/url-deployment-data.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/deployment-plans/typespecific/url-deployment-data.xml rename to src/docbook/doc-en/deployment-plans/typespecific/url-deployment-data.xml diff --git a/jonas_doc/src/docbook/doc-en/deployment-plans_guide.xml b/src/docbook/doc-en/deployment-plans_guide.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/deployment-plans_guide.xml rename to src/docbook/doc-en/deployment-plans_guide.xml diff --git a/jonas_doc/src/docbook/doc-en/developerguide.xml b/src/docbook/doc-en/developerguide.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/developerguide.xml rename to src/docbook/doc-en/developerguide.xml diff --git a/jonas_doc/src/docbook/doc-en/developerguide/building.xml b/src/docbook/doc-en/developerguide/building.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/developerguide/building.xml rename to src/docbook/doc-en/developerguide/building.xml diff --git a/jonas_doc/src/docbook/doc-en/developerguide/code_convention.xml b/src/docbook/doc-en/developerguide/code_convention.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/developerguide/code_convention.xml rename to src/docbook/doc-en/developerguide/code_convention.xml diff --git a/jonas_doc/src/docbook/doc-en/developerguide/contributing.xml b/src/docbook/doc-en/developerguide/contributing.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/developerguide/contributing.xml rename to src/docbook/doc-en/developerguide/contributing.xml diff --git a/jonas_doc/src/docbook/doc-en/developerguide/getting_from_svn.xml b/src/docbook/doc-en/developerguide/getting_from_svn.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/developerguide/getting_from_svn.xml rename to src/docbook/doc-en/developerguide/getting_from_svn.xml diff --git a/jonas_doc/src/docbook/doc-en/developerguide/running.xml b/src/docbook/doc-en/developerguide/running.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/developerguide/running.xml rename to src/docbook/doc-en/developerguide/running.xml diff --git a/jonas_doc/src/docbook/doc-en/developerguide/usingexamples.xml b/src/docbook/doc-en/developerguide/usingexamples.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/developerguide/usingexamples.xml rename to src/docbook/doc-en/developerguide/usingexamples.xml diff --git a/jonas_doc/src/docbook/doc-en/eardeploy.xml b/src/docbook/doc-en/eardeploy.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/eardeploy.xml rename to src/docbook/doc-en/eardeploy.xml diff --git a/jonas_doc/src/docbook/doc-en/ejb2_programmer_guide.xml b/src/docbook/doc-en/ejb2_programmer_guide.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/ejb2_programmer_guide.xml rename to src/docbook/doc-en/ejb2_programmer_guide.xml diff --git a/jonas_doc/src/docbook/doc-en/ejb3_programmer_guide.xml b/src/docbook/doc-en/ejb3_programmer_guide.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/ejb3_programmer_guide.xml rename to src/docbook/doc-en/ejb3_programmer_guide.xml diff --git a/jonas_doc/src/docbook/doc-en/essai.xml b/src/docbook/doc-en/essai.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/essai.xml rename to src/docbook/doc-en/essai.xml diff --git a/jonas_doc/src/docbook/doc-en/essai2.xml b/src/docbook/doc-en/essai2.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/essai2.xml rename to src/docbook/doc-en/essai2.xml diff --git a/jonas_doc/src/docbook/doc-en/essaibook.xml b/src/docbook/doc-en/essaibook.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/essaibook.xml rename to src/docbook/doc-en/essaibook.xml diff --git a/jonas_doc/src/docbook/doc-en/getting_started_guide.xml b/src/docbook/doc-en/getting_started_guide.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/getting_started_guide.xml rename to src/docbook/doc-en/getting_started_guide.xml diff --git a/jonas_doc/src/docbook/doc-en/howto.xml b/src/docbook/doc-en/howto.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/howto.xml rename to src/docbook/doc-en/howto.xml diff --git a/jonas_doc/src/docbook/doc-en/howto_distributed_joram.xml b/src/docbook/doc-en/howto_distributed_joram.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/howto_distributed_joram.xml rename to src/docbook/doc-en/howto_distributed_joram.xml diff --git a/jonas_doc/src/docbook/doc-en/howto_firewall.xml b/src/docbook/doc-en/howto_firewall.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/howto_firewall.xml rename to src/docbook/doc-en/howto_firewall.xml diff --git a/jonas_doc/src/docbook/doc-en/howto_install_jdbc_driver.xml b/src/docbook/doc-en/howto_install_jdbc_driver.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/howto_install_jdbc_driver.xml rename to src/docbook/doc-en/howto_install_jdbc_driver.xml diff --git a/jonas_doc/src/docbook/doc-en/howto_mbeans.xml b/src/docbook/doc-en/howto_mbeans.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/howto_mbeans.xml rename to src/docbook/doc-en/howto_mbeans.xml diff --git a/jonas_doc/src/docbook/doc-en/howto_services.xml b/src/docbook/doc-en/howto_services.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/howto_services.xml rename to src/docbook/doc-en/howto_services.xml diff --git a/jonas_doc/src/docbook/doc-en/howto_services_on_demand.xml b/src/docbook/doc-en/howto_services_on_demand.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/howto_services_on_demand.xml rename to src/docbook/doc-en/howto_services_on_demand.xml diff --git a/jonas_doc/src/docbook/doc-en/howto_track_jdbc_connectionleaks.xml b/src/docbook/doc-en/howto_track_jdbc_connectionleaks.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/howto_track_jdbc_connectionleaks.xml rename to src/docbook/doc-en/howto_track_jdbc_connectionleaks.xml diff --git a/jonas_doc/src/docbook/doc-en/howto_use_cdi.xml b/src/docbook/doc-en/howto_use_cdi.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/howto_use_cdi.xml rename to src/docbook/doc-en/howto_use_cdi.xml diff --git a/jonas_doc/src/docbook/doc-en/howto_use_jaxrs.xml b/src/docbook/doc-en/howto_use_jaxrs.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/howto_use_jaxrs.xml rename to src/docbook/doc-en/howto_use_jaxrs.xml diff --git a/jonas_doc/src/docbook/doc-en/howto_webspheremq.xml b/src/docbook/doc-en/howto_webspheremq.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/howto_webspheremq.xml rename to src/docbook/doc-en/howto_webspheremq.xml diff --git a/jonas_doc/src/docbook/doc-en/howto_win32_service.xml b/src/docbook/doc-en/howto_win32_service.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/howto_win32_service.xml rename to src/docbook/doc-en/howto_win32_service.xml diff --git a/jonas_doc/src/docbook/doc-en/index.html b/src/docbook/doc-en/index.html similarity index 100% rename from jonas_doc/src/docbook/doc-en/index.html rename to src/docbook/doc-en/index.html diff --git a/jonas_doc/src/docbook/doc-en/install/install_j2ee.xml b/src/docbook/doc-en/install/install_j2ee.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/install/install_j2ee.xml rename to src/docbook/doc-en/install/install_j2ee.xml diff --git a/jonas_doc/src/docbook/doc-en/install/install_jonas.xml b/src/docbook/doc-en/install/install_jonas.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/install/install_jonas.xml rename to src/docbook/doc-en/install/install_jonas.xml diff --git a/jonas_doc/src/docbook/doc-en/j2ee/classloader.xml b/src/docbook/doc-en/j2ee/classloader.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/j2ee/classloader.xml rename to src/docbook/doc-en/j2ee/classloader.xml diff --git a/jonas_doc/src/docbook/doc-en/j2ee/j2ee-app.xml b/src/docbook/doc-en/j2ee/j2ee-app.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/j2ee/j2ee-app.xml rename to src/docbook/doc-en/j2ee/j2ee-app.xml diff --git a/jonas_doc/src/docbook/doc-en/j2ee/j2ee-ejb.xml b/src/docbook/doc-en/j2ee/j2ee-ejb.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/j2ee/j2ee-ejb.xml rename to src/docbook/doc-en/j2ee/j2ee-ejb.xml diff --git a/jonas_doc/src/docbook/doc-en/j2ee/j2ee-web.xml b/src/docbook/doc-en/j2ee/j2ee-web.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/j2ee/j2ee-web.xml rename to src/docbook/doc-en/j2ee/j2ee-web.xml diff --git a/jonas_doc/src/docbook/doc-en/j2eeclient_pg.xml b/src/docbook/doc-en/j2eeclient_pg.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/j2eeclient_pg.xml rename to src/docbook/doc-en/j2eeclient_pg.xml diff --git a/jonas_doc/src/docbook/doc-en/j2eeprogrammerguide.xml b/src/docbook/doc-en/j2eeprogrammerguide.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/j2eeprogrammerguide.xml rename to src/docbook/doc-en/j2eeprogrammerguide.xml diff --git a/jonas_doc/src/docbook/doc-en/jaxws_developer_guide.xml b/src/docbook/doc-en/jaxws_developer_guide.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/jaxws_developer_guide.xml rename to src/docbook/doc-en/jaxws_developer_guide.xml diff --git a/jonas_doc/src/docbook/doc-en/jonas-transactions.xml b/src/docbook/doc-en/jonas-transactions.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/jonas-transactions.xml rename to src/docbook/doc-en/jonas-transactions.xml diff --git a/jonas_doc/src/docbook/doc-en/loaders/basics-of-classloading.xml b/src/docbook/doc-en/loaders/basics-of-classloading.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/loaders/basics-of-classloading.xml rename to src/docbook/doc-en/loaders/basics-of-classloading.xml diff --git a/jonas_doc/src/docbook/doc-en/loaders/classloading-in-jonas.xml b/src/docbook/doc-en/loaders/classloading-in-jonas.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/loaders/classloading-in-jonas.xml rename to src/docbook/doc-en/loaders/classloading-in-jonas.xml diff --git a/jonas_doc/src/docbook/doc-en/loaders/configuration.xml b/src/docbook/doc-en/loaders/configuration.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/loaders/configuration.xml rename to src/docbook/doc-en/loaders/configuration.xml diff --git a/jonas_doc/src/docbook/doc-en/loaders/glossary.xml b/src/docbook/doc-en/loaders/glossary.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/loaders/glossary.xml rename to src/docbook/doc-en/loaders/glossary.xml diff --git a/jonas_doc/src/docbook/doc-en/loaders/tips.xml b/src/docbook/doc-en/loaders/tips.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/loaders/tips.xml rename to src/docbook/doc-en/loaders/tips.xml diff --git a/jonas_doc/src/docbook/doc-en/loaders/tooling.xml b/src/docbook/doc-en/loaders/tooling.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/loaders/tooling.xml rename to src/docbook/doc-en/loaders/tooling.xml diff --git a/jonas_doc/src/docbook/doc-en/log/config.xml b/src/docbook/doc-en/log/config.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/log/config.xml rename to src/docbook/doc-en/log/config.xml diff --git a/jonas_doc/src/docbook/doc-en/mastering-jonas-classloaders.xml b/src/docbook/doc-en/mastering-jonas-classloaders.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/mastering-jonas-classloaders.xml rename to src/docbook/doc-en/mastering-jonas-classloaders.xml diff --git a/jonas_doc/src/docbook/doc-en/migration/jonas_4_7.xml b/src/docbook/doc-en/migration/jonas_4_7.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/migration/jonas_4_7.xml rename to src/docbook/doc-en/migration/jonas_4_7.xml diff --git a/jonas_doc/src/docbook/doc-en/migration/jonas_4_8.xml b/src/docbook/doc-en/migration/jonas_4_8.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/migration/jonas_4_8.xml rename to src/docbook/doc-en/migration/jonas_4_8.xml diff --git a/jonas_doc/src/docbook/doc-en/migration/jonas_4_9.xml b/src/docbook/doc-en/migration/jonas_4_9.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/migration/jonas_4_9.xml rename to src/docbook/doc-en/migration/jonas_4_9.xml diff --git a/jonas_doc/src/docbook/doc-en/migration/jonas_5_0.xml b/src/docbook/doc-en/migration/jonas_5_0.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/migration/jonas_5_0.xml rename to src/docbook/doc-en/migration/jonas_5_0.xml diff --git a/jonas_doc/src/docbook/doc-en/migration/versionAPI.xml b/src/docbook/doc-en/migration/versionAPI.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/migration/versionAPI.xml rename to src/docbook/doc-en/migration/versionAPI.xml diff --git a/jonas_doc/src/docbook/doc-en/migration/versionModules.xml b/src/docbook/doc-en/migration/versionModules.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/migration/versionModules.xml rename to src/docbook/doc-en/migration/versionModules.xml diff --git a/jonas_doc/src/docbook/doc-en/migration_guide.xml b/src/docbook/doc-en/migration_guide.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/migration_guide.xml rename to src/docbook/doc-en/migration_guide.xml diff --git a/jonas_doc/src/docbook/doc-en/protocols/config.xml b/src/docbook/doc-en/protocols/config.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/protocols/config.xml rename to src/docbook/doc-en/protocols/config.xml diff --git a/jonas_doc/src/docbook/doc-en/ra/JDBCRA.xml b/src/docbook/doc-en/ra/JDBCRA.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/ra/JDBCRA.xml rename to src/docbook/doc-en/ra/JDBCRA.xml diff --git a/jonas_doc/src/docbook/doc-en/ra/JDBCXML.xml b/src/docbook/doc-en/ra/JDBCXML.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/ra/JDBCXML.xml rename to src/docbook/doc-en/ra/JDBCXML.xml diff --git a/jonas_doc/src/docbook/doc-en/ra/JMSRA.xml b/src/docbook/doc-en/ra/JMSRA.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/ra/JMSRA.xml rename to src/docbook/doc-en/ra/JMSRA.xml diff --git a/jonas_doc/src/docbook/doc-en/security/configsecurity.xml b/src/docbook/doc-en/security/configsecurity.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/security/configsecurity.xml rename to src/docbook/doc-en/security/configsecurity.xml diff --git a/jonas_doc/src/docbook/doc-en/services/cmi/config.xml b/src/docbook/doc-en/services/cmi/config.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/cmi/config.xml rename to src/docbook/doc-en/services/cmi/config.xml diff --git a/jonas_doc/src/docbook/doc-en/services/db/config.xml b/src/docbook/doc-en/services/db/config.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/db/config.xml rename to src/docbook/doc-en/services/db/config.xml diff --git a/jonas_doc/src/docbook/doc-en/services/dbm/config.xml b/src/docbook/doc-en/services/dbm/config.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/dbm/config.xml rename to src/docbook/doc-en/services/dbm/config.xml diff --git a/jonas_doc/src/docbook/doc-en/services/dbm/jdbcdatasource.xml b/src/docbook/doc-en/services/dbm/jdbcdatasource.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/dbm/jdbcdatasource.xml rename to src/docbook/doc-en/services/dbm/jdbcdatasource.xml diff --git a/jonas_doc/src/docbook/doc-en/services/depmonitor/config.xml b/src/docbook/doc-en/services/depmonitor/config.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/depmonitor/config.xml rename to src/docbook/doc-en/services/depmonitor/config.xml diff --git a/jonas_doc/src/docbook/doc-en/services/discovery/config.xml b/src/docbook/doc-en/services/discovery/config.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/discovery/config.xml rename to src/docbook/doc-en/services/discovery/config.xml diff --git a/jonas_doc/src/docbook/doc-en/services/ear/config.xml b/src/docbook/doc-en/services/ear/config.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/ear/config.xml rename to src/docbook/doc-en/services/ear/config.xml diff --git a/jonas_doc/src/docbook/doc-en/services/ejb2/cmp2_usage.xml b/src/docbook/doc-en/services/ejb2/cmp2_usage.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/ejb2/cmp2_usage.xml rename to src/docbook/doc-en/services/ejb2/cmp2_usage.xml diff --git a/jonas_doc/src/docbook/doc-en/services/ejb2/config.xml b/src/docbook/doc-en/services/ejb2/config.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/ejb2/config.xml rename to src/docbook/doc-en/services/ejb2/config.xml diff --git a/jonas_doc/src/docbook/doc-en/services/ejb2/db_access_bmp.xml b/src/docbook/doc-en/services/ejb2/db_access_bmp.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/ejb2/db_access_bmp.xml rename to src/docbook/doc-en/services/ejb2/db_access_bmp.xml diff --git a/jonas_doc/src/docbook/doc-en/services/ejb2/db_access_cmp.xml b/src/docbook/doc-en/services/ejb2/db_access_cmp.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/ejb2/db_access_cmp.xml rename to src/docbook/doc-en/services/ejb2/db_access_cmp.xml diff --git a/jonas_doc/src/docbook/doc-en/services/ejb2/deploy.xml b/src/docbook/doc-en/services/ejb2/deploy.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/ejb2/deploy.xml rename to src/docbook/doc-en/services/ejb2/deploy.xml diff --git a/jonas_doc/src/docbook/doc-en/services/ejb2/entity.xml b/src/docbook/doc-en/services/ejb2/entity.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/ejb2/entity.xml rename to src/docbook/doc-en/services/ejb2/entity.xml diff --git a/jonas_doc/src/docbook/doc-en/services/ejb2/entity_tuning.xml b/src/docbook/doc-en/services/ejb2/entity_tuning.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/ejb2/entity_tuning.xml rename to src/docbook/doc-en/services/ejb2/entity_tuning.xml diff --git a/jonas_doc/src/docbook/doc-en/services/ejb2/environment.xml b/src/docbook/doc-en/services/ejb2/environment.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/ejb2/environment.xml rename to src/docbook/doc-en/services/ejb2/environment.xml diff --git a/jonas_doc/src/docbook/doc-en/services/ejb2/mdb.xml b/src/docbook/doc-en/services/ejb2/mdb.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/ejb2/mdb.xml rename to src/docbook/doc-en/services/ejb2/mdb.xml diff --git a/jonas_doc/src/docbook/doc-en/services/ejb2/mdb_tuning.xml b/src/docbook/doc-en/services/ejb2/mdb_tuning.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/ejb2/mdb_tuning.xml rename to src/docbook/doc-en/services/ejb2/mdb_tuning.xml diff --git a/jonas_doc/src/docbook/doc-en/services/ejb2/packaging.xml b/src/docbook/doc-en/services/ejb2/packaging.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/ejb2/packaging.xml rename to src/docbook/doc-en/services/ejb2/packaging.xml diff --git a/jonas_doc/src/docbook/doc-en/services/ejb2/security.xml b/src/docbook/doc-en/services/ejb2/security.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/ejb2/security.xml rename to src/docbook/doc-en/services/ejb2/security.xml diff --git a/jonas_doc/src/docbook/doc-en/services/ejb2/session.xml b/src/docbook/doc-en/services/ejb2/session.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/ejb2/session.xml rename to src/docbook/doc-en/services/ejb2/session.xml diff --git a/jonas_doc/src/docbook/doc-en/services/ejb2/session_tuning.xml b/src/docbook/doc-en/services/ejb2/session_tuning.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/ejb2/session_tuning.xml rename to src/docbook/doc-en/services/ejb2/session_tuning.xml diff --git a/jonas_doc/src/docbook/doc-en/services/ejb2/transaction.xml b/src/docbook/doc-en/services/ejb2/transaction.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/ejb2/transaction.xml rename to src/docbook/doc-en/services/ejb2/transaction.xml diff --git a/jonas_doc/src/docbook/doc-en/services/ejb3/config.xml b/src/docbook/doc-en/services/ejb3/config.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/ejb3/config.xml rename to src/docbook/doc-en/services/ejb3/config.xml diff --git a/jonas_doc/src/docbook/doc-en/services/ha/config.xml b/src/docbook/doc-en/services/ha/config.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/ha/config.xml rename to src/docbook/doc-en/services/ha/config.xml diff --git a/jonas_doc/src/docbook/doc-en/services/jaxrpc/config.xml b/src/docbook/doc-en/services/jaxrpc/config.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/jaxrpc/config.xml rename to src/docbook/doc-en/services/jaxrpc/config.xml diff --git a/jonas_doc/src/docbook/doc-en/services/jaxws/config.xml b/src/docbook/doc-en/services/jaxws/config.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/jaxws/config.xml rename to src/docbook/doc-en/services/jaxws/config.xml diff --git a/jonas_doc/src/docbook/doc-en/services/jmx/config.xml b/src/docbook/doc-en/services/jmx/config.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/jmx/config.xml rename to src/docbook/doc-en/services/jmx/config.xml diff --git a/jonas_doc/src/docbook/doc-en/services/jtm/config.xml b/src/docbook/doc-en/services/jtm/config.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/jtm/config.xml rename to src/docbook/doc-en/services/jtm/config.xml diff --git a/jonas_doc/src/docbook/doc-en/services/mail/config.xml b/src/docbook/doc-en/services/mail/config.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/mail/config.xml rename to src/docbook/doc-en/services/mail/config.xml diff --git a/jonas_doc/src/docbook/doc-en/services/registry/config.xml b/src/docbook/doc-en/services/registry/config.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/registry/config.xml rename to src/docbook/doc-en/services/registry/config.xml diff --git a/jonas_doc/src/docbook/doc-en/services/resource/config.xml b/src/docbook/doc-en/services/resource/config.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/resource/config.xml rename to src/docbook/doc-en/services/resource/config.xml diff --git a/jonas_doc/src/docbook/doc-en/services/resource/connector_packaging.xml b/src/docbook/doc-en/services/resource/connector_packaging.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/resource/connector_packaging.xml rename to src/docbook/doc-en/services/resource/connector_packaging.xml diff --git a/jonas_doc/src/docbook/doc-en/services/resource/connector_principles.xml b/src/docbook/doc-en/services/resource/connector_principles.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/resource/connector_principles.xml rename to src/docbook/doc-en/services/resource/connector_principles.xml diff --git a/jonas_doc/src/docbook/doc-en/services/resource/connector_using.xml b/src/docbook/doc-en/services/resource/connector_using.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/resource/connector_using.xml rename to src/docbook/doc-en/services/resource/connector_using.xml diff --git a/jonas_doc/src/docbook/doc-en/services/resource/jonas-ra.xml b/src/docbook/doc-en/services/resource/jonas-ra.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/resource/jonas-ra.xml rename to src/docbook/doc-en/services/resource/jonas-ra.xml diff --git a/jonas_doc/src/docbook/doc-en/services/security/config.xml b/src/docbook/doc-en/services/security/config.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/security/config.xml rename to src/docbook/doc-en/services/security/config.xml diff --git a/jonas_doc/src/docbook/doc-en/services/smartclient/config.xml b/src/docbook/doc-en/services/smartclient/config.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/smartclient/config.xml rename to src/docbook/doc-en/services/smartclient/config.xml diff --git a/jonas_doc/src/docbook/doc-en/services/versioning/about.xml b/src/docbook/doc-en/services/versioning/about.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/versioning/about.xml rename to src/docbook/doc-en/services/versioning/about.xml diff --git a/jonas_doc/src/docbook/doc-en/services/versioning/config.xml b/src/docbook/doc-en/services/versioning/config.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/versioning/config.xml rename to src/docbook/doc-en/services/versioning/config.xml diff --git a/jonas_doc/src/docbook/doc-en/services/versioning/versioning-ejb.xml b/src/docbook/doc-en/services/versioning/versioning-ejb.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/versioning/versioning-ejb.xml rename to src/docbook/doc-en/services/versioning/versioning-ejb.xml diff --git a/jonas_doc/src/docbook/doc-en/services/versioning/versioning-web.xml b/src/docbook/doc-en/services/versioning/versioning-web.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/versioning/versioning-web.xml rename to src/docbook/doc-en/services/versioning/versioning-web.xml diff --git a/jonas_doc/src/docbook/doc-en/services/wc/config.xml b/src/docbook/doc-en/services/wc/config.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/wc/config.xml rename to src/docbook/doc-en/services/wc/config.xml diff --git a/jonas_doc/src/docbook/doc-en/services/web/config.xml b/src/docbook/doc-en/services/web/config.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/web/config.xml rename to src/docbook/doc-en/services/web/config.xml diff --git a/jonas_doc/src/docbook/doc-en/services/web/webcomponent.xml b/src/docbook/doc-en/services/web/webcomponent.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/web/webcomponent.xml rename to src/docbook/doc-en/services/web/webcomponent.xml diff --git a/jonas_doc/src/docbook/doc-en/services/web/webdeploy.xml b/src/docbook/doc-en/services/web/webdeploy.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/web/webdeploy.xml rename to src/docbook/doc-en/services/web/webdeploy.xml diff --git a/jonas_doc/src/docbook/doc-en/services/web/webpackaging.xml b/src/docbook/doc-en/services/web/webpackaging.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/web/webpackaging.xml rename to src/docbook/doc-en/services/web/webpackaging.xml diff --git a/jonas_doc/src/docbook/doc-en/services/wm/config.xml b/src/docbook/doc-en/services/wm/config.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/wm/config.xml rename to src/docbook/doc-en/services/wm/config.xml diff --git a/jonas_doc/src/docbook/doc-en/services/wsdl-publisher/config.xml b/src/docbook/doc-en/services/wsdl-publisher/config.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/services/wsdl-publisher/config.xml rename to src/docbook/doc-en/services/wsdl-publisher/config.xml diff --git a/jonas_doc/src/docbook/doc-en/terminology.xml b/src/docbook/doc-en/terminology.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/terminology.xml rename to src/docbook/doc-en/terminology.xml diff --git a/jonas_doc/src/docbook/doc-en/transactions/introduction.xml b/src/docbook/doc-en/transactions/introduction.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/transactions/introduction.xml rename to src/docbook/doc-en/transactions/introduction.xml diff --git a/jonas_doc/src/docbook/doc-en/transactions/jdbc-resources-in-jonas.xml b/src/docbook/doc-en/transactions/jdbc-resources-in-jonas.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/transactions/jdbc-resources-in-jonas.xml rename to src/docbook/doc-en/transactions/jdbc-resources-in-jonas.xml diff --git a/jonas_doc/src/docbook/doc-en/transactions/transactional-resources.xml b/src/docbook/doc-en/transactions/transactional-resources.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/transactions/transactional-resources.xml rename to src/docbook/doc-en/transactions/transactional-resources.xml diff --git a/jonas_doc/src/docbook/doc-en/transactions/transactions-and-exceptions.xml b/src/docbook/doc-en/transactions/transactions-and-exceptions.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/transactions/transactions-and-exceptions.xml rename to src/docbook/doc-en/transactions/transactions-and-exceptions.xml diff --git a/jonas_doc/src/docbook/doc-en/transactions/transactions-in-jonas.xml b/src/docbook/doc-en/transactions/transactions-in-jonas.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/transactions/transactions-in-jonas.xml rename to src/docbook/doc-en/transactions/transactions-in-jonas.xml diff --git a/jonas_doc/src/docbook/doc-en/variables.xml b/src/docbook/doc-en/variables.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/variables.xml rename to src/docbook/doc-en/variables.xml diff --git a/jonas_doc/src/docbook/doc-en/web_pg.xml b/src/docbook/doc-en/web_pg.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/web_pg.xml rename to src/docbook/doc-en/web_pg.xml diff --git a/jonas_doc/src/docbook/doc-en/xmltips.xml b/src/docbook/doc-en/xmltips.xml similarity index 100% rename from jonas_doc/src/docbook/doc-en/xmltips.xml rename to src/docbook/doc-en/xmltips.xml diff --git a/jonas_doc/src/docbook/doc-fr/howtoJOnASDocBook.xml b/src/docbook/doc-fr/howtoJOnASDocBook.xml similarity index 100% rename from jonas_doc/src/docbook/doc-fr/howtoJOnASDocBook.xml rename to src/docbook/doc-fr/howtoJOnASDocBook.xml diff --git a/jonas_doc/src/pom/jonas-doc-en.pom b/src/pom/jonas-doc-en.pom similarity index 100% rename from jonas_doc/src/pom/jonas-doc-en.pom rename to src/pom/jonas-doc-en.pom diff --git a/jonas_doc/src/resources/WEB-INF/jonas-web.xml b/src/resources/WEB-INF/jonas-web.xml similarity index 100% rename from jonas_doc/src/resources/WEB-INF/jonas-web.xml rename to src/resources/WEB-INF/jonas-web.xml diff --git a/jonas_doc/src/resources/WEB-INF/web.xml b/src/resources/WEB-INF/web.xml similarity index 100% rename from jonas_doc/src/resources/WEB-INF/web.xml rename to src/resources/WEB-INF/web.xml diff --git a/jonas_doc/src/resources/chunk.xsl b/src/resources/chunk.xsl similarity index 100% rename from jonas_doc/src/resources/chunk.xsl rename to src/resources/chunk.xsl diff --git a/jonas_doc/src/resources/common.css b/src/resources/common.css similarity index 100% rename from jonas_doc/src/resources/common.css rename to src/resources/common.css diff --git a/jonas_doc/src/resources/fo.xsl b/src/resources/fo.xsl similarity index 100% rename from jonas_doc/src/resources/fo.xsl rename to src/resources/fo.xsl diff --git a/jonas_doc/src/resources/footer.xml b/src/resources/footer.xml similarity index 100% rename from jonas_doc/src/resources/footer.xml rename to src/resources/footer.xml diff --git a/jonas_doc/src/resources/html.xsl b/src/resources/html.xsl similarity index 100% rename from jonas_doc/src/resources/html.xsl rename to src/resources/html.xsl diff --git a/jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/JonasSmall.png b/src/resources/images/JonasSmall.png similarity index 100% rename from jonas/modules/ee-components/jonas-admin/src/main/webapp/images/logo/JonasSmall.png rename to src/resources/images/JonasSmall.png diff --git a/jonas_doc/src/resources/images/WP_distr.gif b/src/resources/images/WP_distr.gif similarity index 100% rename from jonas_doc/src/resources/images/WP_distr.gif rename to src/resources/images/WP_distr.gif diff --git a/jonas_doc/src/resources/images/admin-webmodule-virtual.png b/src/resources/images/admin-webmodule-virtual.png similarity index 100% rename from jonas_doc/src/resources/images/admin-webmodule-virtual.png rename to src/resources/images/admin-webmodule-virtual.png diff --git a/jonas_doc/src/resources/images/admintree.gif b/src/resources/images/admintree.gif similarity index 100% rename from jonas_doc/src/resources/images/admintree.gif rename to src/resources/images/admintree.gif diff --git a/jonas_doc/src/resources/images/bamboo/Bamboo_WorkDirectory.gif b/src/resources/images/bamboo/Bamboo_WorkDirectory.gif similarity index 100% rename from jonas_doc/src/resources/images/bamboo/Bamboo_WorkDirectory.gif rename to src/resources/images/bamboo/Bamboo_WorkDirectory.gif diff --git a/jonas_doc/src/resources/images/bamboo/BuildPlan_AntBuildDependency.gif b/src/resources/images/bamboo/BuildPlan_AntBuildDependency.gif similarity index 100% rename from jonas_doc/src/resources/images/bamboo/BuildPlan_AntBuildDependency.gif rename to src/resources/images/bamboo/BuildPlan_AntBuildDependency.gif diff --git a/jonas_doc/src/resources/images/bamboo/Builders.gif b/src/resources/images/bamboo/Builders.gif similarity index 100% rename from jonas_doc/src/resources/images/bamboo/Builders.gif rename to src/resources/images/bamboo/Builders.gif diff --git a/jonas_doc/src/resources/images/bamboo/Dashboard_CurrentActivty.gif b/src/resources/images/bamboo/Dashboard_CurrentActivty.gif similarity index 100% rename from jonas_doc/src/resources/images/bamboo/Dashboard_CurrentActivty.gif rename to src/resources/images/bamboo/Dashboard_CurrentActivty.gif diff --git a/jonas_doc/src/resources/images/bamboo/JDK_tailor.gif b/src/resources/images/bamboo/JDK_tailor.gif similarity index 100% rename from jonas_doc/src/resources/images/bamboo/JDK_tailor.gif rename to src/resources/images/bamboo/JDK_tailor.gif diff --git a/jonas_doc/src/resources/images/bamboo/TestBuildPlan_ActivityLog.gif b/src/resources/images/bamboo/TestBuildPlan_ActivityLog.gif similarity index 100% rename from jonas_doc/src/resources/images/bamboo/TestBuildPlan_ActivityLog.gif rename to src/resources/images/bamboo/TestBuildPlan_ActivityLog.gif diff --git a/jonas_doc/src/resources/images/bamboo/TestBuildPlan_Dashboard_Run.gif b/src/resources/images/bamboo/TestBuildPlan_Dashboard_Run.gif similarity index 100% rename from jonas_doc/src/resources/images/bamboo/TestBuildPlan_Dashboard_Run.gif rename to src/resources/images/bamboo/TestBuildPlan_Dashboard_Run.gif diff --git a/jonas_doc/src/resources/images/bamboo/TestsBuild_Artifacts.gif b/src/resources/images/bamboo/TestsBuild_Artifacts.gif similarity index 100% rename from jonas_doc/src/resources/images/bamboo/TestsBuild_Artifacts.gif rename to src/resources/images/bamboo/TestsBuild_Artifacts.gif diff --git a/jonas_doc/src/resources/images/bamboo/TestsBuild_BuilderConfig.gif b/src/resources/images/bamboo/TestsBuild_BuilderConfig.gif similarity index 100% rename from jonas_doc/src/resources/images/bamboo/TestsBuild_BuilderConfig.gif rename to src/resources/images/bamboo/TestsBuild_BuilderConfig.gif diff --git a/jonas_doc/src/resources/images/bamboo/TestsBuild_PlanDetail.gif b/src/resources/images/bamboo/TestsBuild_PlanDetail.gif similarity index 100% rename from jonas_doc/src/resources/images/bamboo/TestsBuild_PlanDetail.gif rename to src/resources/images/bamboo/TestsBuild_PlanDetail.gif diff --git a/jonas_doc/src/resources/images/bamboo/TestsBuild_sourcerepos.gif b/src/resources/images/bamboo/TestsBuild_sourcerepos.gif similarity index 100% rename from jonas_doc/src/resources/images/bamboo/TestsBuild_sourcerepos.gif rename to src/resources/images/bamboo/TestsBuild_sourcerepos.gif diff --git a/jonas_doc/src/resources/images/bamboo/ant_BuilderConfig.gif b/src/resources/images/bamboo/ant_BuilderConfig.gif similarity index 100% rename from jonas_doc/src/resources/images/bamboo/ant_BuilderConfig.gif rename to src/resources/images/bamboo/ant_BuilderConfig.gif diff --git a/jonas_doc/src/resources/images/bamboo/ant_createplan.gif b/src/resources/images/bamboo/ant_createplan.gif similarity index 100% rename from jonas_doc/src/resources/images/bamboo/ant_createplan.gif rename to src/resources/images/bamboo/ant_createplan.gif diff --git a/jonas_doc/src/resources/images/bamboo/jb.config.gif b/src/resources/images/bamboo/jb.config.gif similarity index 100% rename from jonas_doc/src/resources/images/bamboo/jb.config.gif rename to src/resources/images/bamboo/jb.config.gif diff --git a/jonas_doc/src/resources/images/bamboo/main_tailor.gif b/src/resources/images/bamboo/main_tailor.gif similarity index 100% rename from jonas_doc/src/resources/images/bamboo/main_tailor.gif rename to src/resources/images/bamboo/main_tailor.gif diff --git a/jonas_doc/src/resources/images/bamboo/maven_BuildArtifacts.gif b/src/resources/images/bamboo/maven_BuildArtifacts.gif similarity index 100% rename from jonas_doc/src/resources/images/bamboo/maven_BuildArtifacts.gif rename to src/resources/images/bamboo/maven_BuildArtifacts.gif diff --git a/jonas_doc/src/resources/images/bamboo/maven_BuildNotification.gif b/src/resources/images/bamboo/maven_BuildNotification.gif similarity index 100% rename from jonas_doc/src/resources/images/bamboo/maven_BuildNotification.gif rename to src/resources/images/bamboo/maven_BuildNotification.gif diff --git a/jonas_doc/src/resources/images/bamboo/maven_BuilderConfig.gif b/src/resources/images/bamboo/maven_BuilderConfig.gif similarity index 100% rename from jonas_doc/src/resources/images/bamboo/maven_BuilderConfig.gif rename to src/resources/images/bamboo/maven_BuilderConfig.gif diff --git a/jonas_doc/src/resources/images/bamboo/maven_CheckoutAndBuilding.gif b/src/resources/images/bamboo/maven_CheckoutAndBuilding.gif similarity index 100% rename from jonas_doc/src/resources/images/bamboo/maven_CheckoutAndBuilding.gif rename to src/resources/images/bamboo/maven_CheckoutAndBuilding.gif diff --git a/jonas_doc/src/resources/images/bamboo/maven_PlanDetail.gif b/src/resources/images/bamboo/maven_PlanDetail.gif similarity index 100% rename from jonas_doc/src/resources/images/bamboo/maven_PlanDetail.gif rename to src/resources/images/bamboo/maven_PlanDetail.gif diff --git a/jonas_doc/src/resources/images/bamboo/maven_PostAction.gif b/src/resources/images/bamboo/maven_PostAction.gif similarity index 100% rename from jonas_doc/src/resources/images/bamboo/maven_PostAction.gif rename to src/resources/images/bamboo/maven_PostAction.gif diff --git a/jonas_doc/src/resources/images/bamboo/maven_sourcerepos_step2.gif b/src/resources/images/bamboo/maven_sourcerepos_step2.gif similarity index 100% rename from jonas_doc/src/resources/images/bamboo/maven_sourcerepos_step2.gif rename to src/resources/images/bamboo/maven_sourcerepos_step2.gif diff --git a/jonas_doc/src/resources/images/bamboo/variables.gif b/src/resources/images/bamboo/variables.gif similarity index 100% rename from jonas_doc/src/resources/images/bamboo/variables.gif rename to src/resources/images/bamboo/variables.gif diff --git a/jonas_doc/src/resources/images/callouts/1.png b/src/resources/images/callouts/1.png similarity index 100% rename from jonas_doc/src/resources/images/callouts/1.png rename to src/resources/images/callouts/1.png diff --git a/jonas_doc/src/resources/images/callouts/10.png b/src/resources/images/callouts/10.png similarity index 100% rename from jonas_doc/src/resources/images/callouts/10.png rename to src/resources/images/callouts/10.png diff --git a/jonas_doc/src/resources/images/callouts/11.png b/src/resources/images/callouts/11.png similarity index 100% rename from jonas_doc/src/resources/images/callouts/11.png rename to src/resources/images/callouts/11.png diff --git a/jonas_doc/src/resources/images/callouts/12.png b/src/resources/images/callouts/12.png similarity index 100% rename from jonas_doc/src/resources/images/callouts/12.png rename to src/resources/images/callouts/12.png diff --git a/jonas_doc/src/resources/images/callouts/13.png b/src/resources/images/callouts/13.png similarity index 100% rename from jonas_doc/src/resources/images/callouts/13.png rename to src/resources/images/callouts/13.png diff --git a/jonas_doc/src/resources/images/callouts/14.png b/src/resources/images/callouts/14.png similarity index 100% rename from jonas_doc/src/resources/images/callouts/14.png rename to src/resources/images/callouts/14.png diff --git a/jonas_doc/src/resources/images/callouts/15.png b/src/resources/images/callouts/15.png similarity index 100% rename from jonas_doc/src/resources/images/callouts/15.png rename to src/resources/images/callouts/15.png diff --git a/jonas_doc/src/resources/images/callouts/2.png b/src/resources/images/callouts/2.png similarity index 100% rename from jonas_doc/src/resources/images/callouts/2.png rename to src/resources/images/callouts/2.png diff --git a/jonas_doc/src/resources/images/callouts/3.png b/src/resources/images/callouts/3.png similarity index 100% rename from jonas_doc/src/resources/images/callouts/3.png rename to src/resources/images/callouts/3.png diff --git a/jonas_doc/src/resources/images/callouts/4.png b/src/resources/images/callouts/4.png similarity index 100% rename from jonas_doc/src/resources/images/callouts/4.png rename to src/resources/images/callouts/4.png diff --git a/jonas_doc/src/resources/images/callouts/5.png b/src/resources/images/callouts/5.png similarity index 100% rename from jonas_doc/src/resources/images/callouts/5.png rename to src/resources/images/callouts/5.png diff --git a/jonas_doc/src/resources/images/callouts/6.png b/src/resources/images/callouts/6.png similarity index 100% rename from jonas_doc/src/resources/images/callouts/6.png rename to src/resources/images/callouts/6.png diff --git a/jonas_doc/src/resources/images/callouts/7.png b/src/resources/images/callouts/7.png similarity index 100% rename from jonas_doc/src/resources/images/callouts/7.png rename to src/resources/images/callouts/7.png diff --git a/jonas_doc/src/resources/images/callouts/8.png b/src/resources/images/callouts/8.png similarity index 100% rename from jonas_doc/src/resources/images/callouts/8.png rename to src/resources/images/callouts/8.png diff --git a/jonas_doc/src/resources/images/callouts/9.png b/src/resources/images/callouts/9.png similarity index 100% rename from jonas_doc/src/resources/images/callouts/9.png rename to src/resources/images/callouts/9.png diff --git a/jonas_doc/src/resources/images/caution.png b/src/resources/images/caution.png similarity index 100% rename from jonas_doc/src/resources/images/caution.png rename to src/resources/images/caution.png diff --git a/jonas_doc/src/resources/images/clusterfiles/Apache.jpg b/src/resources/images/clusterfiles/Apache.jpg similarity index 100% rename from jonas_doc/src/resources/images/clusterfiles/Apache.jpg rename to src/resources/images/clusterfiles/Apache.jpg diff --git a/jonas_doc/src/resources/images/clusterfiles/Archi1.jpg b/src/resources/images/clusterfiles/Archi1.jpg similarity index 100% rename from jonas_doc/src/resources/images/clusterfiles/Archi1.jpg rename to src/resources/images/clusterfiles/Archi1.jpg diff --git a/jonas_doc/src/resources/images/clusterfiles/Archi2.jpg b/src/resources/images/clusterfiles/Archi2.jpg similarity index 100% rename from jonas_doc/src/resources/images/clusterfiles/Archi2.jpg rename to src/resources/images/clusterfiles/Archi2.jpg diff --git a/jonas_doc/src/resources/images/clusterfiles/Archi3.jpg b/src/resources/images/clusterfiles/Archi3.jpg similarity index 100% rename from jonas_doc/src/resources/images/clusterfiles/Archi3.jpg rename to src/resources/images/clusterfiles/Archi3.jpg diff --git a/jonas_doc/src/resources/images/clusterfiles/Archi4.jpg b/src/resources/images/clusterfiles/Archi4.jpg similarity index 100% rename from jonas_doc/src/resources/images/clusterfiles/Archi4.jpg rename to src/resources/images/clusterfiles/Archi4.jpg diff --git a/jonas_doc/src/resources/images/clusterfiles/Archi5.jpg b/src/resources/images/clusterfiles/Archi5.jpg similarity index 100% rename from jonas_doc/src/resources/images/clusterfiles/Archi5.jpg rename to src/resources/images/clusterfiles/Archi5.jpg diff --git a/jonas_doc/src/resources/images/clusterfiles/Architecture.jpg b/src/resources/images/clusterfiles/Architecture.jpg similarity index 100% rename from jonas_doc/src/resources/images/clusterfiles/Architecture.jpg rename to src/resources/images/clusterfiles/Architecture.jpg diff --git a/jonas_doc/src/resources/images/clusterfiles/EJBCont.jpg b/src/resources/images/clusterfiles/EJBCont.jpg similarity index 100% rename from jonas_doc/src/resources/images/clusterfiles/EJBCont.jpg rename to src/resources/images/clusterfiles/EJBCont.jpg diff --git a/jonas_doc/src/resources/images/clusterfiles/FullJOnAS.jpg b/src/resources/images/clusterfiles/FullJOnAS.jpg similarity index 100% rename from jonas_doc/src/resources/images/clusterfiles/FullJOnAS.jpg rename to src/resources/images/clusterfiles/FullJOnAS.jpg diff --git a/jonas_doc/src/resources/images/clusterfiles/JOnASEJB.jpg b/src/resources/images/clusterfiles/JOnASEJB.jpg similarity index 100% rename from jonas_doc/src/resources/images/clusterfiles/JOnASEJB.jpg rename to src/resources/images/clusterfiles/JOnASEJB.jpg diff --git a/jonas_doc/src/resources/images/clusterfiles/JOnASWeb.jpg b/src/resources/images/clusterfiles/JOnASWeb.jpg similarity index 100% rename from jonas_doc/src/resources/images/clusterfiles/JOnASWeb.jpg rename to src/resources/images/clusterfiles/JOnASWeb.jpg diff --git a/jonas_doc/src/resources/images/clusterfiles/Node.jpg b/src/resources/images/clusterfiles/Node.jpg similarity index 100% rename from jonas_doc/src/resources/images/clusterfiles/Node.jpg rename to src/resources/images/clusterfiles/Node.jpg diff --git a/jonas_doc/src/resources/images/clusterfiles/WebCont.jpg b/src/resources/images/clusterfiles/WebCont.jpg similarity index 100% rename from jonas_doc/src/resources/images/clusterfiles/WebCont.jpg rename to src/resources/images/clusterfiles/WebCont.jpg diff --git a/jonas_doc/src/resources/images/clusterfiles/sampleCluster2Screen.GIF b/src/resources/images/clusterfiles/sampleCluster2Screen.GIF similarity index 100% rename from jonas_doc/src/resources/images/clusterfiles/sampleCluster2Screen.GIF rename to src/resources/images/clusterfiles/sampleCluster2Screen.GIF diff --git a/jonas_doc/src/resources/images/clustering/clusterd.png b/src/resources/images/clustering/clusterd.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/clusterd.png rename to src/resources/images/clustering/clusterd.png diff --git a/jonas_doc/src/resources/images/clustering/clusterd.svg b/src/resources/images/clustering/clusterd.svg similarity index 100% rename from jonas_doc/src/resources/images/clustering/clusterd.svg rename to src/resources/images/clustering/clusterd.svg diff --git a/jonas_doc/src/resources/images/clustering/clustersolution.png b/src/resources/images/clustering/clustersolution.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/clustersolution.png rename to src/resources/images/clustering/clustersolution.png diff --git a/jonas_doc/src/resources/images/clustering/clustersolution.svg b/src/resources/images/clustering/clustersolution.svg similarity index 100% rename from jonas_doc/src/resources/images/clustering/clustersolution.svg rename to src/resources/images/clustering/clustersolution.svg diff --git a/jonas_doc/src/resources/images/clustering/cmi_cluster.png b/src/resources/images/clustering/cmi_cluster.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/cmi_cluster.png rename to src/resources/images/clustering/cmi_cluster.png diff --git a/jonas_doc/src/resources/images/clustering/cmi_cluster.svg b/src/resources/images/clustering/cmi_cluster.svg similarity index 100% rename from jonas_doc/src/resources/images/clustering/cmi_cluster.svg rename to src/resources/images/clustering/cmi_cluster.svg diff --git a/jonas_doc/src/resources/images/clustering/cmi_cluster_config.svg b/src/resources/images/clustering/cmi_cluster_config.svg similarity index 100% rename from jonas_doc/src/resources/images/clustering/cmi_cluster_config.svg rename to src/resources/images/clustering/cmi_cluster_config.svg diff --git a/jonas_doc/src/resources/images/clustering/cmi_cluster_config_2tiers_client.png b/src/resources/images/clustering/cmi_cluster_config_2tiers_client.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/cmi_cluster_config_2tiers_client.png rename to src/resources/images/clustering/cmi_cluster_config_2tiers_client.png diff --git a/jonas_doc/src/resources/images/clustering/cmi_cluster_config_2tiers_server.png b/src/resources/images/clustering/cmi_cluster_config_2tiers_server.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/cmi_cluster_config_2tiers_server.png rename to src/resources/images/clustering/cmi_cluster_config_2tiers_server.png diff --git a/jonas_doc/src/resources/images/clustering/cmi_cluster_config_javaclient.png b/src/resources/images/clustering/cmi_cluster_config_javaclient.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/cmi_cluster_config_javaclient.png rename to src/resources/images/clustering/cmi_cluster_config_javaclient.png diff --git a/jonas_doc/src/resources/images/clustering/cmiv2.png b/src/resources/images/clustering/cmiv2.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/cmiv2.png rename to src/resources/images/clustering/cmiv2.png diff --git a/jonas_doc/src/resources/images/clustering/domain.cmi.cluster.png b/src/resources/images/clustering/domain.cmi.cluster.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/domain.cmi.cluster.png rename to src/resources/images/clustering/domain.cmi.cluster.png diff --git a/jonas_doc/src/resources/images/clustering/domain.jk.cluster.member.png b/src/resources/images/clustering/domain.jk.cluster.member.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/domain.jk.cluster.member.png rename to src/resources/images/clustering/domain.jk.cluster.member.png diff --git a/jonas_doc/src/resources/images/clustering/domain.jk.cluster.png b/src/resources/images/clustering/domain.jk.cluster.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/domain.jk.cluster.png rename to src/resources/images/clustering/domain.jk.cluster.png diff --git a/jonas_doc/src/resources/images/clustering/domainmngt.png b/src/resources/images/clustering/domainmngt.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/domainmngt.png rename to src/resources/images/clustering/domainmngt.png diff --git a/jonas_doc/src/resources/images/clustering/domainmngt.svg b/src/resources/images/clustering/domainmngt.svg similarity index 100% rename from jonas_doc/src/resources/images/clustering/domainmngt.svg rename to src/resources/images/clustering/domainmngt.svg diff --git a/jonas_doc/src/resources/images/clustering/easybeans-logo.png b/src/resources/images/clustering/easybeans-logo.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/easybeans-logo.png rename to src/resources/images/clustering/easybeans-logo.png diff --git a/jonas_doc/src/resources/images/clustering/ejbcluster.png b/src/resources/images/clustering/ejbcluster.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/ejbcluster.png rename to src/resources/images/clustering/ejbcluster.png diff --git a/jonas_doc/src/resources/images/clustering/ejbcluster.svg b/src/resources/images/clustering/ejbcluster.svg similarity index 100% rename from jonas_doc/src/resources/images/clustering/ejbcluster.svg rename to src/resources/images/clustering/ejbcluster.svg diff --git a/jonas_doc/src/resources/images/clustering/ejbfarm.png b/src/resources/images/clustering/ejbfarm.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/ejbfarm.png rename to src/resources/images/clustering/ejbfarm.png diff --git a/jonas_doc/src/resources/images/clustering/ejbfarm.svg b/src/resources/images/clustering/ejbfarm.svg similarity index 100% rename from jonas_doc/src/resources/images/clustering/ejbfarm.svg rename to src/resources/images/clustering/ejbfarm.svg diff --git a/jonas_doc/src/resources/images/clustering/httpcluster.png b/src/resources/images/clustering/httpcluster.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/httpcluster.png rename to src/resources/images/clustering/httpcluster.png diff --git a/jonas_doc/src/resources/images/clustering/httpcluster.svg b/src/resources/images/clustering/httpcluster.svg similarity index 100% rename from jonas_doc/src/resources/images/clustering/httpcluster.svg rename to src/resources/images/clustering/httpcluster.svg diff --git a/jonas_doc/src/resources/images/clustering/httpfarm.png b/src/resources/images/clustering/httpfarm.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/httpfarm.png rename to src/resources/images/clustering/httpfarm.png diff --git a/jonas_doc/src/resources/images/clustering/httpfarm.svg b/src/resources/images/clustering/httpfarm.svg similarity index 100% rename from jonas_doc/src/resources/images/clustering/httpfarm.svg rename to src/resources/images/clustering/httpfarm.svg diff --git a/jonas_doc/src/resources/images/clustering/jmscluster_a.png b/src/resources/images/clustering/jmscluster_a.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/jmscluster_a.png rename to src/resources/images/clustering/jmscluster_a.png diff --git a/jonas_doc/src/resources/images/clustering/jmscluster_a.svg b/src/resources/images/clustering/jmscluster_a.svg similarity index 100% rename from jonas_doc/src/resources/images/clustering/jmscluster_a.svg rename to src/resources/images/clustering/jmscluster_a.svg diff --git a/jonas_doc/src/resources/images/clustering/jmscluster_b.png b/src/resources/images/clustering/jmscluster_b.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/jmscluster_b.png rename to src/resources/images/clustering/jmscluster_b.png diff --git a/jonas_doc/src/resources/images/clustering/jmscluster_b.svg b/src/resources/images/clustering/jmscluster_b.svg similarity index 100% rename from jonas_doc/src/resources/images/clustering/jmscluster_b.svg rename to src/resources/images/clustering/jmscluster_b.svg diff --git a/jonas_doc/src/resources/images/clustering/jmsfarm_a.png b/src/resources/images/clustering/jmsfarm_a.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/jmsfarm_a.png rename to src/resources/images/clustering/jmsfarm_a.png diff --git a/jonas_doc/src/resources/images/clustering/jmsfarm_a.svg b/src/resources/images/clustering/jmsfarm_a.svg similarity index 100% rename from jonas_doc/src/resources/images/clustering/jmsfarm_a.svg rename to src/resources/images/clustering/jmsfarm_a.svg diff --git a/jonas_doc/src/resources/images/clustering/jmsfarm_b.png b/src/resources/images/clustering/jmsfarm_b.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/jmsfarm_b.png rename to src/resources/images/clustering/jmsfarm_b.png diff --git a/jonas_doc/src/resources/images/clustering/jmsfarm_b.svg b/src/resources/images/clustering/jmsfarm_b.svg similarity index 100% rename from jonas_doc/src/resources/images/clustering/jmsfarm_b.svg rename to src/resources/images/clustering/jmsfarm_b.svg diff --git a/jonas_doc/src/resources/images/clustering/jonas48repscenarios.jpg b/src/resources/images/clustering/jonas48repscenarios.jpg similarity index 100% rename from jonas_doc/src/resources/images/clustering/jonas48repscenarios.jpg rename to src/resources/images/clustering/jonas48repscenarios.jpg diff --git a/jonas_doc/src/resources/images/clustering/logo_jonas2.png b/src/resources/images/clustering/logo_jonas2.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/logo_jonas2.png rename to src/resources/images/clustering/logo_jonas2.png diff --git a/jonas_doc/src/resources/images/clustering/myTomcatCluster.gif b/src/resources/images/clustering/myTomcatCluster.gif similarity index 100% rename from jonas_doc/src/resources/images/clustering/myTomcatCluster.gif rename to src/resources/images/clustering/myTomcatCluster.gif diff --git a/jonas_doc/src/resources/images/clustering/registry_replication.png b/src/resources/images/clustering/registry_replication.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/registry_replication.png rename to src/resources/images/clustering/registry_replication.png diff --git a/jonas_doc/src/resources/images/clustering/registry_replication.svg b/src/resources/images/clustering/registry_replication.svg similarity index 100% rename from jonas_doc/src/resources/images/clustering/registry_replication.svg rename to src/resources/images/clustering/registry_replication.svg diff --git a/jonas_doc/src/resources/images/clustering/sampleCluster2.png b/src/resources/images/clustering/sampleCluster2.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/sampleCluster2.png rename to src/resources/images/clustering/sampleCluster2.png diff --git a/jonas_doc/src/resources/images/clustering/sampleCluster2.svg b/src/resources/images/clustering/sampleCluster2.svg similarity index 100% rename from jonas_doc/src/resources/images/clustering/sampleCluster2.svg rename to src/resources/images/clustering/sampleCluster2.svg diff --git a/jonas_doc/src/resources/images/clustering/sampleCluster3.png b/src/resources/images/clustering/sampleCluster3.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/sampleCluster3.png rename to src/resources/images/clustering/sampleCluster3.png diff --git a/jonas_doc/src/resources/images/clustering/sampleCluster3.svg b/src/resources/images/clustering/sampleCluster3.svg similarity index 100% rename from jonas_doc/src/resources/images/clustering/sampleCluster3.svg rename to src/resources/images/clustering/sampleCluster3.svg diff --git a/jonas_doc/src/resources/images/clustering/sc/jasmine_design.png b/src/resources/images/clustering/sc/jasmine_design.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/sc/jasmine_design.png rename to src/resources/images/clustering/sc/jasmine_design.png diff --git a/jonas_doc/src/resources/images/clustering/sc/jasmine_eos.png b/src/resources/images/clustering/sc/jasmine_eos.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/sc/jasmine_eos.png rename to src/resources/images/clustering/sc/jasmine_eos.png diff --git a/jonas_doc/src/resources/images/clustering/sc/jkmanager.png b/src/resources/images/clustering/sc/jkmanager.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/sc/jkmanager.png rename to src/resources/images/clustering/sc/jkmanager.png diff --git a/jonas_doc/src/resources/images/clustering/sc/jonasadmin_cmi_cluster_tab.png b/src/resources/images/clustering/sc/jonasadmin_cmi_cluster_tab.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/sc/jonasadmin_cmi_cluster_tab.png rename to src/resources/images/clustering/sc/jonasadmin_cmi_cluster_tab.png diff --git a/jonas_doc/src/resources/images/clustering/sc/jonasadmin_cmi_mbeans_attr.png b/src/resources/images/clustering/sc/jonasadmin_cmi_mbeans_attr.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/sc/jonasadmin_cmi_mbeans_attr.png rename to src/resources/images/clustering/sc/jonasadmin_cmi_mbeans_attr.png diff --git a/jonas_doc/src/resources/images/clustering/sc/jonasadmin_cmi_object_info.png b/src/resources/images/clustering/sc/jonasadmin_cmi_object_info.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/sc/jonasadmin_cmi_object_info.png rename to src/resources/images/clustering/sc/jonasadmin_cmi_object_info.png diff --git a/jonas_doc/src/resources/images/clustering/sc/jonasadmin_cmi_policies.png b/src/resources/images/clustering/sc/jonasadmin_cmi_policies.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/sc/jonasadmin_cmi_policies.png rename to src/resources/images/clustering/sc/jonasadmin_cmi_policies.png diff --git a/jonas_doc/src/resources/images/clustering/sc/jonasadmin_cmi_server_info.png b/src/resources/images/clustering/sc/jonasadmin_cmi_server_info.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/sc/jonasadmin_cmi_server_info.png rename to src/resources/images/clustering/sc/jonasadmin_cmi_server_info.png diff --git a/jonas_doc/src/resources/images/clustering/sc/jonasadmin_cmi_servers.png b/src/resources/images/clustering/sc/jonasadmin_cmi_servers.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/sc/jonasadmin_cmi_servers.png rename to src/resources/images/clustering/sc/jonasadmin_cmi_servers.png diff --git a/jonas_doc/src/resources/images/clustering/sc/jonasadmin_cmi_strategies.png b/src/resources/images/clustering/sc/jonasadmin_cmi_strategies.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/sc/jonasadmin_cmi_strategies.png rename to src/resources/images/clustering/sc/jonasadmin_cmi_strategies.png diff --git a/jonas_doc/src/resources/images/clustering/sc/jonasadmin_cmi_tab.png b/src/resources/images/clustering/sc/jonasadmin_cmi_tab.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/sc/jonasadmin_cmi_tab.png rename to src/resources/images/clustering/sc/jonasadmin_cmi_tab.png diff --git a/jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_cluster_tab.png b/src/resources/images/clustering/screenshot_jonasadmin_cmi_cluster_tab.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_cluster_tab.png rename to src/resources/images/clustering/screenshot_jonasadmin_cmi_cluster_tab.png diff --git a/jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_cluster_tab.svg b/src/resources/images/clustering/screenshot_jonasadmin_cmi_cluster_tab.svg similarity index 100% rename from jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_cluster_tab.svg rename to src/resources/images/clustering/screenshot_jonasadmin_cmi_cluster_tab.svg diff --git a/jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_mbeans_attr.png b/src/resources/images/clustering/screenshot_jonasadmin_cmi_mbeans_attr.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_mbeans_attr.png rename to src/resources/images/clustering/screenshot_jonasadmin_cmi_mbeans_attr.png diff --git a/jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_mbeans_attr.svg b/src/resources/images/clustering/screenshot_jonasadmin_cmi_mbeans_attr.svg similarity index 100% rename from jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_mbeans_attr.svg rename to src/resources/images/clustering/screenshot_jonasadmin_cmi_mbeans_attr.svg diff --git a/jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_object_info.png b/src/resources/images/clustering/screenshot_jonasadmin_cmi_object_info.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_object_info.png rename to src/resources/images/clustering/screenshot_jonasadmin_cmi_object_info.png diff --git a/jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_object_info.svg b/src/resources/images/clustering/screenshot_jonasadmin_cmi_object_info.svg similarity index 100% rename from jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_object_info.svg rename to src/resources/images/clustering/screenshot_jonasadmin_cmi_object_info.svg diff --git a/jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_policies.png b/src/resources/images/clustering/screenshot_jonasadmin_cmi_policies.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_policies.png rename to src/resources/images/clustering/screenshot_jonasadmin_cmi_policies.png diff --git a/jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_policies.svg b/src/resources/images/clustering/screenshot_jonasadmin_cmi_policies.svg similarity index 100% rename from jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_policies.svg rename to src/resources/images/clustering/screenshot_jonasadmin_cmi_policies.svg diff --git a/jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_server_info.png b/src/resources/images/clustering/screenshot_jonasadmin_cmi_server_info.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_server_info.png rename to src/resources/images/clustering/screenshot_jonasadmin_cmi_server_info.png diff --git a/jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_server_info.svg b/src/resources/images/clustering/screenshot_jonasadmin_cmi_server_info.svg similarity index 100% rename from jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_server_info.svg rename to src/resources/images/clustering/screenshot_jonasadmin_cmi_server_info.svg diff --git a/jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_servers.png b/src/resources/images/clustering/screenshot_jonasadmin_cmi_servers.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_servers.png rename to src/resources/images/clustering/screenshot_jonasadmin_cmi_servers.png diff --git a/jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_servers.svg b/src/resources/images/clustering/screenshot_jonasadmin_cmi_servers.svg similarity index 100% rename from jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_servers.svg rename to src/resources/images/clustering/screenshot_jonasadmin_cmi_servers.svg diff --git a/jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_strategies.png b/src/resources/images/clustering/screenshot_jonasadmin_cmi_strategies.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_strategies.png rename to src/resources/images/clustering/screenshot_jonasadmin_cmi_strategies.png diff --git a/jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_strategies.svg b/src/resources/images/clustering/screenshot_jonasadmin_cmi_strategies.svg similarity index 100% rename from jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_strategies.svg rename to src/resources/images/clustering/screenshot_jonasadmin_cmi_strategies.svg diff --git a/jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_tab.png b/src/resources/images/clustering/screenshot_jonasadmin_cmi_tab.png similarity index 100% rename from jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_tab.png rename to src/resources/images/clustering/screenshot_jonasadmin_cmi_tab.png diff --git a/jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_tab.svg b/src/resources/images/clustering/screenshot_jonasadmin_cmi_tab.svg similarity index 100% rename from jonas_doc/src/resources/images/clustering/screenshot_jonasadmin_cmi_tab.svg rename to src/resources/images/clustering/screenshot_jonasadmin_cmi_tab.svg diff --git a/jonas_doc/src/resources/images/cmi.gif b/src/resources/images/cmi.gif similarity index 100% rename from jonas_doc/src/resources/images/cmi.gif rename to src/resources/images/cmi.gif diff --git a/jonas_doc/src/resources/images/connect.gif b/src/resources/images/connect.gif similarity index 100% rename from jonas_doc/src/resources/images/connect.gif rename to src/resources/images/connect.gif diff --git a/jonas_doc/src/resources/images/defilement.gif b/src/resources/images/defilement.gif similarity index 100% rename from jonas_doc/src/resources/images/defilement.gif rename to src/resources/images/defilement.gif diff --git a/jonas_doc/src/resources/images/deployment.gif b/src/resources/images/deployment.gif similarity index 100% rename from jonas_doc/src/resources/images/deployment.gif rename to src/resources/images/deployment.gif diff --git a/jonas_doc/src/resources/images/draft.png b/src/resources/images/draft.png similarity index 100% rename from jonas_doc/src/resources/images/draft.png rename to src/resources/images/draft.png diff --git a/jonas_doc/src/resources/images/earsample-add-author.png b/src/resources/images/earsample-add-author.png similarity index 100% rename from jonas_doc/src/resources/images/earsample-add-author.png rename to src/resources/images/earsample-add-author.png diff --git a/jonas_doc/src/resources/images/earsample-architecture.png b/src/resources/images/earsample-architecture.png similarity index 100% rename from jonas_doc/src/resources/images/earsample-architecture.png rename to src/resources/images/earsample-architecture.png diff --git a/jonas_doc/src/resources/images/earsample-authentication.png b/src/resources/images/earsample-authentication.png similarity index 100% rename from jonas_doc/src/resources/images/earsample-authentication.png rename to src/resources/images/earsample-authentication.png diff --git a/jonas_doc/src/resources/images/earsample-jpa-model.png b/src/resources/images/earsample-jpa-model.png similarity index 100% rename from jonas_doc/src/resources/images/earsample-jpa-model.png rename to src/resources/images/earsample-jpa-model.png diff --git a/jonas_doc/src/resources/images/earsample-list-content.png b/src/resources/images/earsample-list-content.png similarity index 100% rename from jonas_doc/src/resources/images/earsample-list-content.png rename to src/resources/images/earsample-list-content.png diff --git a/jonas_doc/src/resources/images/eb_img_31.gif b/src/resources/images/eb_img_31.gif similarity index 100% rename from jonas_doc/src/resources/images/eb_img_31.gif rename to src/resources/images/eb_img_31.gif diff --git a/jonas_doc/src/resources/images/editbuttons.gif b/src/resources/images/editbuttons.gif similarity index 100% rename from jonas_doc/src/resources/images/editbuttons.gif rename to src/resources/images/editbuttons.gif diff --git a/jonas_doc/src/resources/images/filtering-loader.png b/src/resources/images/filtering-loader.png similarity index 100% rename from jonas_doc/src/resources/images/filtering-loader.png rename to src/resources/images/filtering-loader.png diff --git a/jonas_doc/src/resources/images/firstpage.gif b/src/resources/images/firstpage.gif similarity index 100% rename from jonas_doc/src/resources/images/firstpage.gif rename to src/resources/images/firstpage.gif diff --git a/jonas_doc/src/resources/images/forgeadmin.gif b/src/resources/images/forgeadmin.gif similarity index 100% rename from jonas_doc/src/resources/images/forgeadmin.gif rename to src/resources/images/forgeadmin.gif diff --git a/jonas_doc/src/resources/images/jcaarch.gif b/src/resources/images/jcaarch.gif similarity index 100% rename from jonas_doc/src/resources/images/jcaarch.gif rename to src/resources/images/jcaarch.gif diff --git a/jonas_doc/src/resources/images/jconsoleStackDumpList.png b/src/resources/images/jconsoleStackDumpList.png similarity index 100% rename from jonas_doc/src/resources/images/jconsoleStackDumpList.png rename to src/resources/images/jconsoleStackDumpList.png diff --git a/jonas_doc/src/resources/images/jconsoleStackDumpOperations.png b/src/resources/images/jconsoleStackDumpOperations.png similarity index 100% rename from jonas_doc/src/resources/images/jconsoleStackDumpOperations.png rename to src/resources/images/jconsoleStackDumpOperations.png diff --git a/jonas_doc/src/resources/images/jmsclustering/Cluster JMS-JORAM-JOnAS.ppt b/src/resources/images/jmsclustering/Cluster JMS-JORAM-JOnAS.ppt similarity index 100% rename from jonas_doc/src/resources/images/jmsclustering/Cluster JMS-JORAM-JOnAS.ppt rename to src/resources/images/jmsclustering/Cluster JMS-JORAM-JOnAS.ppt diff --git a/jonas_doc/src/resources/images/jmsclustering/JmsClustering-queues.jpg b/src/resources/images/jmsclustering/JmsClustering-queues.jpg similarity index 100% rename from jonas_doc/src/resources/images/jmsclustering/JmsClustering-queues.jpg rename to src/resources/images/jmsclustering/JmsClustering-queues.jpg diff --git a/jonas_doc/src/resources/images/jmsclustering/JmsClustering-queues.ppt b/src/resources/images/jmsclustering/JmsClustering-queues.ppt similarity index 100% rename from jonas_doc/src/resources/images/jmsclustering/JmsClustering-queues.ppt rename to src/resources/images/jmsclustering/JmsClustering-queues.ppt diff --git a/jonas_doc/src/resources/images/jmsclustering/JmsClustering-topics.jpg b/src/resources/images/jmsclustering/JmsClustering-topics.jpg similarity index 100% rename from jonas_doc/src/resources/images/jmsclustering/JmsClustering-topics.jpg rename to src/resources/images/jmsclustering/JmsClustering-topics.jpg diff --git a/jonas_doc/src/resources/images/jmsclustering/JmsClustering-topics.ppt b/src/resources/images/jmsclustering/JmsClustering-topics.ppt similarity index 100% rename from jonas_doc/src/resources/images/jmsclustering/JmsClustering-topics.ppt rename to src/resources/images/jmsclustering/JmsClustering-topics.ppt diff --git a/jonas_doc/src/resources/images/jmsclustering/joram.jpg b/src/resources/images/jmsclustering/joram.jpg similarity index 100% rename from jonas_doc/src/resources/images/jmsclustering/joram.jpg rename to src/resources/images/jmsclustering/joram.jpg diff --git a/jonas_doc/src/resources/images/jmsclustering/joram_ha.jpg b/src/resources/images/jmsclustering/joram_ha.jpg similarity index 100% rename from jonas_doc/src/resources/images/jmsclustering/joram_ha.jpg rename to src/resources/images/jmsclustering/joram_ha.jpg diff --git a/jonas_doc/src/resources/images/jmsclustering/mdbHa.ppt b/src/resources/images/jmsclustering/mdbHa.ppt similarity index 100% rename from jonas_doc/src/resources/images/jmsclustering/mdbHa.ppt rename to src/resources/images/jmsclustering/mdbHa.ppt diff --git a/jonas_doc/src/resources/images/jmsclustering/mdbclustering.png b/src/resources/images/jmsclustering/mdbclustering.png similarity index 100% rename from jonas_doc/src/resources/images/jmsclustering/mdbclustering.png rename to src/resources/images/jmsclustering/mdbclustering.png diff --git a/jonas_doc/src/resources/images/jmsclustering/mdbclustering.svg b/src/resources/images/jmsclustering/mdbclustering.svg similarity index 100% rename from jonas_doc/src/resources/images/jmsclustering/mdbclustering.svg rename to src/resources/images/jmsclustering/mdbclustering.svg diff --git a/jonas_doc/src/resources/images/jmsclustering/queuelb.png b/src/resources/images/jmsclustering/queuelb.png similarity index 100% rename from jonas_doc/src/resources/images/jmsclustering/queuelb.png rename to src/resources/images/jmsclustering/queuelb.png diff --git a/jonas_doc/src/resources/images/jmsclustering/queuelb.svg b/src/resources/images/jmsclustering/queuelb.svg similarity index 100% rename from jonas_doc/src/resources/images/jmsclustering/queuelb.svg rename to src/resources/images/jmsclustering/queuelb.svg diff --git a/jonas_doc/src/resources/images/jmsclustering/topic.jpg b/src/resources/images/jmsclustering/topic.jpg similarity index 100% rename from jonas_doc/src/resources/images/jmsclustering/topic.jpg rename to src/resources/images/jmsclustering/topic.jpg diff --git a/jonas_doc/src/resources/images/jonas-classloaders.png b/src/resources/images/jonas-classloaders.png similarity index 100% rename from jonas_doc/src/resources/images/jonas-classloaders.png rename to src/resources/images/jonas-classloaders.png diff --git a/jonas_doc/src/resources/images/jonasAdminDomain.gif b/src/resources/images/jonasAdminDomain.gif similarity index 100% rename from jonas_doc/src/resources/images/jonasAdminDomain.gif rename to src/resources/images/jonasAdminDomain.gif diff --git a/jonas_doc/src/resources/images/jonasAdminStackDump.png b/src/resources/images/jonasAdminStackDump.png similarity index 100% rename from jonas_doc/src/resources/images/jonasAdminStackDump.png rename to src/resources/images/jonasAdminStackDump.png diff --git a/jonas_doc/src/resources/images/jonas_doc.gif b/src/resources/images/jonas_doc.gif similarity index 100% rename from jonas_doc/src/resources/images/jonas_doc.gif rename to src/resources/images/jonas_doc.gif diff --git a/jonas_doc/src/resources/images/loaders/bundle-class-space.png b/src/resources/images/loaders/bundle-class-space.png similarity index 100% rename from jonas_doc/src/resources/images/loaders/bundle-class-space.png rename to src/resources/images/loaders/bundle-class-space.png diff --git a/jonas_doc/src/resources/images/loaders/console-osgi.png b/src/resources/images/loaders/console-osgi.png similarity index 100% rename from jonas_doc/src/resources/images/loaders/console-osgi.png rename to src/resources/images/loaders/console-osgi.png diff --git a/jonas_doc/src/resources/images/loaders/filtering-classloaders.png b/src/resources/images/loaders/filtering-classloaders.png similarity index 100% rename from jonas_doc/src/resources/images/loaders/filtering-classloaders.png rename to src/resources/images/loaders/filtering-classloaders.png diff --git a/jonas_doc/src/resources/images/loaders/jonas-osgi-modules-libext.png b/src/resources/images/loaders/jonas-osgi-modules-libext.png similarity index 100% rename from jonas_doc/src/resources/images/loaders/jonas-osgi-modules-libext.png rename to src/resources/images/loaders/jonas-osgi-modules-libext.png diff --git a/jonas_doc/src/resources/images/loaders/jonas-osgi-modules-ultra-zoom.png b/src/resources/images/loaders/jonas-osgi-modules-ultra-zoom.png similarity index 100% rename from jonas_doc/src/resources/images/loaders/jonas-osgi-modules-ultra-zoom.png rename to src/resources/images/loaders/jonas-osgi-modules-ultra-zoom.png diff --git a/jonas_doc/src/resources/images/loaders/jonas-osgi-modules.png b/src/resources/images/loaders/jonas-osgi-modules.png similarity index 100% rename from jonas_doc/src/resources/images/loaders/jonas-osgi-modules.png rename to src/resources/images/loaders/jonas-osgi-modules.png diff --git a/jonas_doc/src/resources/images/loaders/jonas-round.png b/src/resources/images/loaders/jonas-round.png similarity index 100% rename from jonas_doc/src/resources/images/loaders/jonas-round.png rename to src/resources/images/loaders/jonas-round.png diff --git a/jonas_doc/src/resources/images/loaders/osgi-classloading.gif b/src/resources/images/loaders/osgi-classloading.gif similarity index 100% rename from jonas_doc/src/resources/images/loaders/osgi-classloading.gif rename to src/resources/images/loaders/osgi-classloading.gif diff --git a/jonas_doc/src/resources/images/loaders/system-loaders.png b/src/resources/images/loaders/system-loaders.png similarity index 100% rename from jonas_doc/src/resources/images/loaders/system-loaders.png rename to src/resources/images/loaders/system-loaders.png diff --git a/jonas_doc/src/resources/images/logoow.gif b/src/resources/images/logoow.gif similarity index 100% rename from jonas_doc/src/resources/images/logoow.gif rename to src/resources/images/logoow.gif diff --git a/jonas_doc/src/resources/images/note.png b/src/resources/images/note.png similarity index 100% rename from jonas_doc/src/resources/images/note.png rename to src/resources/images/note.png diff --git a/jonas_doc/src/resources/images/output.gif b/src/resources/images/output.gif similarity index 100% rename from jonas_doc/src/resources/images/output.gif rename to src/resources/images/output.gif diff --git a/jonas_doc/src/resources/images/publish.gif b/src/resources/images/publish.gif similarity index 100% rename from jonas_doc/src/resources/images/publish.gif rename to src/resources/images/publish.gif diff --git a/jonas_doc/src/resources/images/service-dependencies.png b/src/resources/images/service-dependencies.png similarity index 100% rename from jonas_doc/src/resources/images/service-dependencies.png rename to src/resources/images/service-dependencies.png diff --git a/jonas_doc/src/resources/images/versioning-ejb-schema.png b/src/resources/images/versioning-ejb-schema.png similarity index 100% rename from jonas_doc/src/resources/images/versioning-ejb-schema.png rename to src/resources/images/versioning-ejb-schema.png diff --git a/jonas_doc/src/resources/images/versioning-general-schema.png b/src/resources/images/versioning-general-schema.png similarity index 100% rename from jonas_doc/src/resources/images/versioning-general-schema.png rename to src/resources/images/versioning-general-schema.png diff --git a/jonas_doc/src/resources/index.html b/src/resources/index.html similarity index 100% rename from jonas_doc/src/resources/index.html rename to src/resources/index.html diff --git a/jonas_doc/tools/docbook-5.0/ChangeLog b/tools/docbook-5.0/ChangeLog similarity index 100% rename from jonas_doc/tools/docbook-5.0/ChangeLog rename to tools/docbook-5.0/ChangeLog diff --git a/jonas_doc/tools/docbook-5.0/README b/tools/docbook-5.0/README similarity index 100% rename from jonas_doc/tools/docbook-5.0/README rename to tools/docbook-5.0/README diff --git a/jonas_doc/tools/docbook-5.0/VERSION b/tools/docbook-5.0/VERSION similarity index 100% rename from jonas_doc/tools/docbook-5.0/VERSION rename to tools/docbook-5.0/VERSION diff --git a/jonas_doc/tools/docbook-5.0/catalog.xml b/tools/docbook-5.0/catalog.xml similarity index 100% rename from jonas_doc/tools/docbook-5.0/catalog.xml rename to tools/docbook-5.0/catalog.xml diff --git a/jonas_doc/tools/docbook-5.0/docbook.nvdl b/tools/docbook-5.0/docbook.nvdl similarity index 100% rename from jonas_doc/tools/docbook-5.0/docbook.nvdl rename to tools/docbook-5.0/docbook.nvdl diff --git a/jonas_doc/tools/docbook-5.0/dtd/docbook.dtd b/tools/docbook-5.0/dtd/docbook.dtd similarity index 100% rename from jonas_doc/tools/docbook-5.0/dtd/docbook.dtd rename to tools/docbook-5.0/dtd/docbook.dtd diff --git a/jonas_doc/tools/docbook-5.0/rng/docbook.rnc b/tools/docbook-5.0/rng/docbook.rnc similarity index 100% rename from jonas_doc/tools/docbook-5.0/rng/docbook.rnc rename to tools/docbook-5.0/rng/docbook.rnc diff --git a/jonas_doc/tools/docbook-5.0/rng/docbook.rng b/tools/docbook-5.0/rng/docbook.rng similarity index 100% rename from jonas_doc/tools/docbook-5.0/rng/docbook.rng rename to tools/docbook-5.0/rng/docbook.rng diff --git a/jonas_doc/tools/docbook-5.0/rng/docbookxi.rnc b/tools/docbook-5.0/rng/docbookxi.rnc similarity index 100% rename from jonas_doc/tools/docbook-5.0/rng/docbookxi.rnc rename to tools/docbook-5.0/rng/docbookxi.rnc diff --git a/jonas_doc/tools/docbook-5.0/rng/docbookxi.rng b/tools/docbook-5.0/rng/docbookxi.rng similarity index 100% rename from jonas_doc/tools/docbook-5.0/rng/docbookxi.rng rename to tools/docbook-5.0/rng/docbookxi.rng diff --git a/jonas_doc/tools/docbook-5.0/sch/docbook.sch b/tools/docbook-5.0/sch/docbook.sch similarity index 100% rename from jonas_doc/tools/docbook-5.0/sch/docbook.sch rename to tools/docbook-5.0/sch/docbook.sch diff --git a/jonas_doc/tools/docbook-5.0/tools/db4-entities.pl b/tools/docbook-5.0/tools/db4-entities.pl similarity index 100% rename from jonas_doc/tools/docbook-5.0/tools/db4-entities.pl rename to tools/docbook-5.0/tools/db4-entities.pl diff --git a/jonas_doc/tools/docbook-5.0/tools/db4-upgrade.xsl b/tools/docbook-5.0/tools/db4-upgrade.xsl similarity index 100% rename from jonas_doc/tools/docbook-5.0/tools/db4-upgrade.xsl rename to tools/docbook-5.0/tools/db4-upgrade.xsl diff --git a/jonas_doc/tools/docbook-5.0/xsd/docbook.xsd b/tools/docbook-5.0/xsd/docbook.xsd similarity index 100% rename from jonas_doc/tools/docbook-5.0/xsd/docbook.xsd rename to tools/docbook-5.0/xsd/docbook.xsd diff --git a/jonas_doc/tools/docbook-5.0/xsd/xlink.xsd b/tools/docbook-5.0/xsd/xlink.xsd similarity index 100% rename from jonas_doc/tools/docbook-5.0/xsd/xlink.xsd rename to tools/docbook-5.0/xsd/xlink.xsd diff --git a/jonas_doc/tools/docbook-5.0/xsd/xml.xsd b/tools/docbook-5.0/xsd/xml.xsd similarity index 100% rename from jonas_doc/tools/docbook-5.0/xsd/xml.xsd rename to tools/docbook-5.0/xsd/xml.xsd diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/.CatalogManager.properties.example b/tools/docbook-xsl-1.73.2/.CatalogManager.properties.example similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/.CatalogManager.properties.example rename to tools/docbook-xsl-1.73.2/.CatalogManager.properties.example diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/.urilist b/tools/docbook-xsl-1.73.2/.urilist similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/.urilist rename to tools/docbook-xsl-1.73.2/.urilist diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/AUTHORS b/tools/docbook-xsl-1.73.2/AUTHORS similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/AUTHORS rename to tools/docbook-xsl-1.73.2/AUTHORS diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/BUGS b/tools/docbook-xsl-1.73.2/BUGS similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/BUGS rename to tools/docbook-xsl-1.73.2/BUGS diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/COPYING b/tools/docbook-xsl-1.73.2/COPYING similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/COPYING rename to tools/docbook-xsl-1.73.2/COPYING diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/INSTALL b/tools/docbook-xsl-1.73.2/INSTALL similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/INSTALL rename to tools/docbook-xsl-1.73.2/INSTALL diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/NEWS b/tools/docbook-xsl-1.73.2/NEWS similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/NEWS rename to tools/docbook-xsl-1.73.2/NEWS diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/NEWS.html b/tools/docbook-xsl-1.73.2/NEWS.html similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/NEWS.html rename to tools/docbook-xsl-1.73.2/NEWS.html diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/NEWS.xml b/tools/docbook-xsl-1.73.2/NEWS.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/NEWS.xml rename to tools/docbook-xsl-1.73.2/NEWS.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/README b/tools/docbook-xsl-1.73.2/README similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/README rename to tools/docbook-xsl-1.73.2/README diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/RELEASE-NOTES.html b/tools/docbook-xsl-1.73.2/RELEASE-NOTES.html similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/RELEASE-NOTES.html rename to tools/docbook-xsl-1.73.2/RELEASE-NOTES.html diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/RELEASE-NOTES.pdf b/tools/docbook-xsl-1.73.2/RELEASE-NOTES.pdf similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/RELEASE-NOTES.pdf rename to tools/docbook-xsl-1.73.2/RELEASE-NOTES.pdf diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/RELEASE-NOTES.txt b/tools/docbook-xsl-1.73.2/RELEASE-NOTES.txt similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/RELEASE-NOTES.txt rename to tools/docbook-xsl-1.73.2/RELEASE-NOTES.txt diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/RELEASE-NOTES.xml b/tools/docbook-xsl-1.73.2/RELEASE-NOTES.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/RELEASE-NOTES.xml rename to tools/docbook-xsl-1.73.2/RELEASE-NOTES.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/TODO b/tools/docbook-xsl-1.73.2/TODO similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/TODO rename to tools/docbook-xsl-1.73.2/TODO diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/VERSION b/tools/docbook-xsl-1.73.2/VERSION similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/VERSION rename to tools/docbook-xsl-1.73.2/VERSION diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/catalog.xml b/tools/docbook-xsl-1.73.2/catalog.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/catalog.xml rename to tools/docbook-xsl-1.73.2/catalog.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/af.xml b/tools/docbook-xsl-1.73.2/common/af.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/af.xml rename to tools/docbook-xsl-1.73.2/common/af.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/am.xml b/tools/docbook-xsl-1.73.2/common/am.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/am.xml rename to tools/docbook-xsl-1.73.2/common/am.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/ar.xml b/tools/docbook-xsl-1.73.2/common/ar.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/ar.xml rename to tools/docbook-xsl-1.73.2/common/ar.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/autoidx-kimber.xsl b/tools/docbook-xsl-1.73.2/common/autoidx-kimber.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/autoidx-kimber.xsl rename to tools/docbook-xsl-1.73.2/common/autoidx-kimber.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/autoidx-kosek.xsl b/tools/docbook-xsl-1.73.2/common/autoidx-kosek.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/autoidx-kosek.xsl rename to tools/docbook-xsl-1.73.2/common/autoidx-kosek.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/az.xml b/tools/docbook-xsl-1.73.2/common/az.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/az.xml rename to tools/docbook-xsl-1.73.2/common/az.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/bg.xml b/tools/docbook-xsl-1.73.2/common/bg.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/bg.xml rename to tools/docbook-xsl-1.73.2/common/bg.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/bn.xml b/tools/docbook-xsl-1.73.2/common/bn.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/bn.xml rename to tools/docbook-xsl-1.73.2/common/bn.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/bs.xml b/tools/docbook-xsl-1.73.2/common/bs.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/bs.xml rename to tools/docbook-xsl-1.73.2/common/bs.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/ca.xml b/tools/docbook-xsl-1.73.2/common/ca.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/ca.xml rename to tools/docbook-xsl-1.73.2/common/ca.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/charmap.xml b/tools/docbook-xsl-1.73.2/common/charmap.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/charmap.xml rename to tools/docbook-xsl-1.73.2/common/charmap.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/charmap.xsl b/tools/docbook-xsl-1.73.2/common/charmap.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/charmap.xsl rename to tools/docbook-xsl-1.73.2/common/charmap.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/common.xml b/tools/docbook-xsl-1.73.2/common/common.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/common.xml rename to tools/docbook-xsl-1.73.2/common/common.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/common.xsl b/tools/docbook-xsl-1.73.2/common/common.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/common.xsl rename to tools/docbook-xsl-1.73.2/common/common.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/cs.xml b/tools/docbook-xsl-1.73.2/common/cs.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/cs.xml rename to tools/docbook-xsl-1.73.2/common/cs.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/cy.xml b/tools/docbook-xsl-1.73.2/common/cy.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/cy.xml rename to tools/docbook-xsl-1.73.2/common/cy.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/da.xml b/tools/docbook-xsl-1.73.2/common/da.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/da.xml rename to tools/docbook-xsl-1.73.2/common/da.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/de.xml b/tools/docbook-xsl-1.73.2/common/de.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/de.xml rename to tools/docbook-xsl-1.73.2/common/de.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/el.xml b/tools/docbook-xsl-1.73.2/common/el.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/el.xml rename to tools/docbook-xsl-1.73.2/common/el.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/en.xml b/tools/docbook-xsl-1.73.2/common/en.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/en.xml rename to tools/docbook-xsl-1.73.2/common/en.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/entities.ent b/tools/docbook-xsl-1.73.2/common/entities.ent similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/entities.ent rename to tools/docbook-xsl-1.73.2/common/entities.ent diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/eo.xml b/tools/docbook-xsl-1.73.2/common/eo.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/eo.xml rename to tools/docbook-xsl-1.73.2/common/eo.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/es.xml b/tools/docbook-xsl-1.73.2/common/es.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/es.xml rename to tools/docbook-xsl-1.73.2/common/es.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/et.xml b/tools/docbook-xsl-1.73.2/common/et.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/et.xml rename to tools/docbook-xsl-1.73.2/common/et.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/eu.xml b/tools/docbook-xsl-1.73.2/common/eu.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/eu.xml rename to tools/docbook-xsl-1.73.2/common/eu.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/fa.xml b/tools/docbook-xsl-1.73.2/common/fa.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/fa.xml rename to tools/docbook-xsl-1.73.2/common/fa.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/fi.xml b/tools/docbook-xsl-1.73.2/common/fi.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/fi.xml rename to tools/docbook-xsl-1.73.2/common/fi.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/fr.xml b/tools/docbook-xsl-1.73.2/common/fr.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/fr.xml rename to tools/docbook-xsl-1.73.2/common/fr.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/ga.xml b/tools/docbook-xsl-1.73.2/common/ga.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/ga.xml rename to tools/docbook-xsl-1.73.2/common/ga.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/gentext.xsl b/tools/docbook-xsl-1.73.2/common/gentext.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/gentext.xsl rename to tools/docbook-xsl-1.73.2/common/gentext.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/gu.xml b/tools/docbook-xsl-1.73.2/common/gu.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/gu.xml rename to tools/docbook-xsl-1.73.2/common/gu.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/he.xml b/tools/docbook-xsl-1.73.2/common/he.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/he.xml rename to tools/docbook-xsl-1.73.2/common/he.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/hi.xml b/tools/docbook-xsl-1.73.2/common/hi.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/hi.xml rename to tools/docbook-xsl-1.73.2/common/hi.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/hr.xml b/tools/docbook-xsl-1.73.2/common/hr.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/hr.xml rename to tools/docbook-xsl-1.73.2/common/hr.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/hu.xml b/tools/docbook-xsl-1.73.2/common/hu.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/hu.xml rename to tools/docbook-xsl-1.73.2/common/hu.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/id.xml b/tools/docbook-xsl-1.73.2/common/id.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/id.xml rename to tools/docbook-xsl-1.73.2/common/id.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/insertfile.xsl b/tools/docbook-xsl-1.73.2/common/insertfile.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/insertfile.xsl rename to tools/docbook-xsl-1.73.2/common/insertfile.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/it.xml b/tools/docbook-xsl-1.73.2/common/it.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/it.xml rename to tools/docbook-xsl-1.73.2/common/it.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/ja.xml b/tools/docbook-xsl-1.73.2/common/ja.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/ja.xml rename to tools/docbook-xsl-1.73.2/common/ja.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/kn.xml b/tools/docbook-xsl-1.73.2/common/kn.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/kn.xml rename to tools/docbook-xsl-1.73.2/common/kn.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/ko.xml b/tools/docbook-xsl-1.73.2/common/ko.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/ko.xml rename to tools/docbook-xsl-1.73.2/common/ko.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/l10n.dtd b/tools/docbook-xsl-1.73.2/common/l10n.dtd similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/l10n.dtd rename to tools/docbook-xsl-1.73.2/common/l10n.dtd diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/l10n.xml b/tools/docbook-xsl-1.73.2/common/l10n.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/l10n.xml rename to tools/docbook-xsl-1.73.2/common/l10n.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/l10n.xsl b/tools/docbook-xsl-1.73.2/common/l10n.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/l10n.xsl rename to tools/docbook-xsl-1.73.2/common/l10n.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/la.xml b/tools/docbook-xsl-1.73.2/common/la.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/la.xml rename to tools/docbook-xsl-1.73.2/common/la.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/labels.xsl b/tools/docbook-xsl-1.73.2/common/labels.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/labels.xsl rename to tools/docbook-xsl-1.73.2/common/labels.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/lt.xml b/tools/docbook-xsl-1.73.2/common/lt.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/lt.xml rename to tools/docbook-xsl-1.73.2/common/lt.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/lv.xml b/tools/docbook-xsl-1.73.2/common/lv.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/lv.xml rename to tools/docbook-xsl-1.73.2/common/lv.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/mn.xml b/tools/docbook-xsl-1.73.2/common/mn.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/mn.xml rename to tools/docbook-xsl-1.73.2/common/mn.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/nl.xml b/tools/docbook-xsl-1.73.2/common/nl.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/nl.xml rename to tools/docbook-xsl-1.73.2/common/nl.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/nn.xml b/tools/docbook-xsl-1.73.2/common/nn.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/nn.xml rename to tools/docbook-xsl-1.73.2/common/nn.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/no.xml b/tools/docbook-xsl-1.73.2/common/no.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/no.xml rename to tools/docbook-xsl-1.73.2/common/no.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/olink.xsl b/tools/docbook-xsl-1.73.2/common/olink.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/olink.xsl rename to tools/docbook-xsl-1.73.2/common/olink.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/or.xml b/tools/docbook-xsl-1.73.2/common/or.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/or.xml rename to tools/docbook-xsl-1.73.2/common/or.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/pa.xml b/tools/docbook-xsl-1.73.2/common/pa.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/pa.xml rename to tools/docbook-xsl-1.73.2/common/pa.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/pi.xml b/tools/docbook-xsl-1.73.2/common/pi.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/pi.xml rename to tools/docbook-xsl-1.73.2/common/pi.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/pi.xsl b/tools/docbook-xsl-1.73.2/common/pi.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/pi.xsl rename to tools/docbook-xsl-1.73.2/common/pi.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/pl.xml b/tools/docbook-xsl-1.73.2/common/pl.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/pl.xml rename to tools/docbook-xsl-1.73.2/common/pl.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/pt.xml b/tools/docbook-xsl-1.73.2/common/pt.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/pt.xml rename to tools/docbook-xsl-1.73.2/common/pt.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/pt_br.xml b/tools/docbook-xsl-1.73.2/common/pt_br.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/pt_br.xml rename to tools/docbook-xsl-1.73.2/common/pt_br.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/refentry.xml b/tools/docbook-xsl-1.73.2/common/refentry.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/refentry.xml rename to tools/docbook-xsl-1.73.2/common/refentry.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/refentry.xsl b/tools/docbook-xsl-1.73.2/common/refentry.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/refentry.xsl rename to tools/docbook-xsl-1.73.2/common/refentry.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/ro.xml b/tools/docbook-xsl-1.73.2/common/ro.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/ro.xml rename to tools/docbook-xsl-1.73.2/common/ro.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/ru.xml b/tools/docbook-xsl-1.73.2/common/ru.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/ru.xml rename to tools/docbook-xsl-1.73.2/common/ru.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/sk.xml b/tools/docbook-xsl-1.73.2/common/sk.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/sk.xml rename to tools/docbook-xsl-1.73.2/common/sk.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/sl.xml b/tools/docbook-xsl-1.73.2/common/sl.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/sl.xml rename to tools/docbook-xsl-1.73.2/common/sl.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/sq.xml b/tools/docbook-xsl-1.73.2/common/sq.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/sq.xml rename to tools/docbook-xsl-1.73.2/common/sq.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/sr.xml b/tools/docbook-xsl-1.73.2/common/sr.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/sr.xml rename to tools/docbook-xsl-1.73.2/common/sr.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/sr_Latn.xml b/tools/docbook-xsl-1.73.2/common/sr_Latn.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/sr_Latn.xml rename to tools/docbook-xsl-1.73.2/common/sr_Latn.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/stripns.xsl b/tools/docbook-xsl-1.73.2/common/stripns.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/stripns.xsl rename to tools/docbook-xsl-1.73.2/common/stripns.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/subtitles.xsl b/tools/docbook-xsl-1.73.2/common/subtitles.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/subtitles.xsl rename to tools/docbook-xsl-1.73.2/common/subtitles.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/sv.xml b/tools/docbook-xsl-1.73.2/common/sv.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/sv.xml rename to tools/docbook-xsl-1.73.2/common/sv.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/ta.xml b/tools/docbook-xsl-1.73.2/common/ta.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/ta.xml rename to tools/docbook-xsl-1.73.2/common/ta.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/table.xsl b/tools/docbook-xsl-1.73.2/common/table.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/table.xsl rename to tools/docbook-xsl-1.73.2/common/table.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/targetdatabase.dtd b/tools/docbook-xsl-1.73.2/common/targetdatabase.dtd similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/targetdatabase.dtd rename to tools/docbook-xsl-1.73.2/common/targetdatabase.dtd diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/targets.xsl b/tools/docbook-xsl-1.73.2/common/targets.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/targets.xsl rename to tools/docbook-xsl-1.73.2/common/targets.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/th.xml b/tools/docbook-xsl-1.73.2/common/th.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/th.xml rename to tools/docbook-xsl-1.73.2/common/th.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/titles.xsl b/tools/docbook-xsl-1.73.2/common/titles.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/titles.xsl rename to tools/docbook-xsl-1.73.2/common/titles.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/tl.xml b/tools/docbook-xsl-1.73.2/common/tl.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/tl.xml rename to tools/docbook-xsl-1.73.2/common/tl.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/tr.xml b/tools/docbook-xsl-1.73.2/common/tr.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/tr.xml rename to tools/docbook-xsl-1.73.2/common/tr.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/uk.xml b/tools/docbook-xsl-1.73.2/common/uk.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/uk.xml rename to tools/docbook-xsl-1.73.2/common/uk.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/utility.xml b/tools/docbook-xsl-1.73.2/common/utility.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/utility.xml rename to tools/docbook-xsl-1.73.2/common/utility.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/utility.xsl b/tools/docbook-xsl-1.73.2/common/utility.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/utility.xsl rename to tools/docbook-xsl-1.73.2/common/utility.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/vi.xml b/tools/docbook-xsl-1.73.2/common/vi.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/vi.xml rename to tools/docbook-xsl-1.73.2/common/vi.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/xh.xml b/tools/docbook-xsl-1.73.2/common/xh.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/xh.xml rename to tools/docbook-xsl-1.73.2/common/xh.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/zh_cn.xml b/tools/docbook-xsl-1.73.2/common/zh_cn.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/zh_cn.xml rename to tools/docbook-xsl-1.73.2/common/zh_cn.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/common/zh_tw.xml b/tools/docbook-xsl-1.73.2/common/zh_tw.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/common/zh_tw.xml rename to tools/docbook-xsl-1.73.2/common/zh_tw.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/docsrc/authors.xml b/tools/docbook-xsl-1.73.2/docsrc/authors.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/docsrc/authors.xml rename to tools/docbook-xsl-1.73.2/docsrc/authors.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/docsrc/copyright.xml b/tools/docbook-xsl-1.73.2/docsrc/copyright.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/docsrc/copyright.xml rename to tools/docbook-xsl-1.73.2/docsrc/copyright.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/docsrc/license.xml b/tools/docbook-xsl-1.73.2/docsrc/license.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/docsrc/license.xml rename to tools/docbook-xsl-1.73.2/docsrc/license.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/docsrc/page.png b/tools/docbook-xsl-1.73.2/docsrc/page.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/docsrc/page.png rename to tools/docbook-xsl-1.73.2/docsrc/page.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/docsrc/reference.css b/tools/docbook-xsl-1.73.2/docsrc/reference.css similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/docsrc/reference.css rename to tools/docbook-xsl-1.73.2/docsrc/reference.css diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/docsrc/reference.xml b/tools/docbook-xsl-1.73.2/docsrc/reference.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/docsrc/reference.xml rename to tools/docbook-xsl-1.73.2/docsrc/reference.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/docsrc/reference.xml.included b/tools/docbook-xsl-1.73.2/docsrc/reference.xml.included similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/docsrc/reference.xml.included rename to tools/docbook-xsl-1.73.2/docsrc/reference.xml.included diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/docsrc/warranty.xml b/tools/docbook-xsl-1.73.2/docsrc/warranty.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/docsrc/warranty.xml rename to tools/docbook-xsl-1.73.2/docsrc/warranty.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/eclipse/eclipse.xsl b/tools/docbook-xsl-1.73.2/eclipse/eclipse.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/eclipse/eclipse.xsl rename to tools/docbook-xsl-1.73.2/eclipse/eclipse.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/eclipse/profile-eclipse.xsl b/tools/docbook-xsl-1.73.2/eclipse/profile-eclipse.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/eclipse/profile-eclipse.xsl rename to tools/docbook-xsl-1.73.2/eclipse/profile-eclipse.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/extensions/saxon65.jar b/tools/docbook-xsl-1.73.2/extensions/saxon65.jar similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/extensions/saxon65.jar rename to tools/docbook-xsl-1.73.2/extensions/saxon65.jar diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/extensions/xalan27.jar b/tools/docbook-xsl-1.73.2/extensions/xalan27.jar similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/extensions/xalan27.jar rename to tools/docbook-xsl-1.73.2/extensions/xalan27.jar diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/admon.xsl b/tools/docbook-xsl-1.73.2/fo/admon.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/admon.xsl rename to tools/docbook-xsl-1.73.2/fo/admon.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/annotations.xsl b/tools/docbook-xsl-1.73.2/fo/annotations.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/annotations.xsl rename to tools/docbook-xsl-1.73.2/fo/annotations.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/autoidx-kimber.xsl b/tools/docbook-xsl-1.73.2/fo/autoidx-kimber.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/autoidx-kimber.xsl rename to tools/docbook-xsl-1.73.2/fo/autoidx-kimber.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/autoidx-kosek.xsl b/tools/docbook-xsl-1.73.2/fo/autoidx-kosek.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/autoidx-kosek.xsl rename to tools/docbook-xsl-1.73.2/fo/autoidx-kosek.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/autoidx-ng.xsl b/tools/docbook-xsl-1.73.2/fo/autoidx-ng.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/autoidx-ng.xsl rename to tools/docbook-xsl-1.73.2/fo/autoidx-ng.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/autoidx.xsl b/tools/docbook-xsl-1.73.2/fo/autoidx.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/autoidx.xsl rename to tools/docbook-xsl-1.73.2/fo/autoidx.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/autotoc.xsl b/tools/docbook-xsl-1.73.2/fo/autotoc.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/autotoc.xsl rename to tools/docbook-xsl-1.73.2/fo/autotoc.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/axf.xsl b/tools/docbook-xsl-1.73.2/fo/axf.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/axf.xsl rename to tools/docbook-xsl-1.73.2/fo/axf.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/biblio-iso690.xsl b/tools/docbook-xsl-1.73.2/fo/biblio-iso690.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/biblio-iso690.xsl rename to tools/docbook-xsl-1.73.2/fo/biblio-iso690.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/biblio.xsl b/tools/docbook-xsl-1.73.2/fo/biblio.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/biblio.xsl rename to tools/docbook-xsl-1.73.2/fo/biblio.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/block.xsl b/tools/docbook-xsl-1.73.2/fo/block.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/block.xsl rename to tools/docbook-xsl-1.73.2/fo/block.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/callout.xsl b/tools/docbook-xsl-1.73.2/fo/callout.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/callout.xsl rename to tools/docbook-xsl-1.73.2/fo/callout.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/component.xsl b/tools/docbook-xsl-1.73.2/fo/component.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/component.xsl rename to tools/docbook-xsl-1.73.2/fo/component.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/division.xsl b/tools/docbook-xsl-1.73.2/fo/division.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/division.xsl rename to tools/docbook-xsl-1.73.2/fo/division.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/docbook.xsl b/tools/docbook-xsl-1.73.2/fo/docbook.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/docbook.xsl rename to tools/docbook-xsl-1.73.2/fo/docbook.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/ebnf.xsl b/tools/docbook-xsl-1.73.2/fo/ebnf.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/ebnf.xsl rename to tools/docbook-xsl-1.73.2/fo/ebnf.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/fo-rtf.xsl b/tools/docbook-xsl-1.73.2/fo/fo-rtf.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/fo-rtf.xsl rename to tools/docbook-xsl-1.73.2/fo/fo-rtf.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/fo.xsl b/tools/docbook-xsl-1.73.2/fo/fo.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/fo.xsl rename to tools/docbook-xsl-1.73.2/fo/fo.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/footnote.xsl b/tools/docbook-xsl-1.73.2/fo/footnote.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/footnote.xsl rename to tools/docbook-xsl-1.73.2/fo/footnote.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/fop.xsl b/tools/docbook-xsl-1.73.2/fo/fop.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/fop.xsl rename to tools/docbook-xsl-1.73.2/fo/fop.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/fop1.xsl b/tools/docbook-xsl-1.73.2/fo/fop1.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/fop1.xsl rename to tools/docbook-xsl-1.73.2/fo/fop1.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/formal.xsl b/tools/docbook-xsl-1.73.2/fo/formal.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/formal.xsl rename to tools/docbook-xsl-1.73.2/fo/formal.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/glossary.xsl b/tools/docbook-xsl-1.73.2/fo/glossary.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/glossary.xsl rename to tools/docbook-xsl-1.73.2/fo/glossary.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/graphics.xsl b/tools/docbook-xsl-1.73.2/fo/graphics.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/graphics.xsl rename to tools/docbook-xsl-1.73.2/fo/graphics.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/highlight.xsl b/tools/docbook-xsl-1.73.2/fo/highlight.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/highlight.xsl rename to tools/docbook-xsl-1.73.2/fo/highlight.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/htmltbl.xsl b/tools/docbook-xsl-1.73.2/fo/htmltbl.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/htmltbl.xsl rename to tools/docbook-xsl-1.73.2/fo/htmltbl.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/index.xsl b/tools/docbook-xsl-1.73.2/fo/index.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/index.xsl rename to tools/docbook-xsl-1.73.2/fo/index.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/info.xsl b/tools/docbook-xsl-1.73.2/fo/info.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/info.xsl rename to tools/docbook-xsl-1.73.2/fo/info.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/inline.xsl b/tools/docbook-xsl-1.73.2/fo/inline.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/inline.xsl rename to tools/docbook-xsl-1.73.2/fo/inline.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/keywords.xsl b/tools/docbook-xsl-1.73.2/fo/keywords.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/keywords.xsl rename to tools/docbook-xsl-1.73.2/fo/keywords.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/lists.xsl b/tools/docbook-xsl-1.73.2/fo/lists.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/lists.xsl rename to tools/docbook-xsl-1.73.2/fo/lists.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/math.xsl b/tools/docbook-xsl-1.73.2/fo/math.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/math.xsl rename to tools/docbook-xsl-1.73.2/fo/math.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/pagesetup.xsl b/tools/docbook-xsl-1.73.2/fo/pagesetup.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/pagesetup.xsl rename to tools/docbook-xsl-1.73.2/fo/pagesetup.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/param.xml b/tools/docbook-xsl-1.73.2/fo/param.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/param.xml rename to tools/docbook-xsl-1.73.2/fo/param.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/param.xsl b/tools/docbook-xsl-1.73.2/fo/param.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/param.xsl rename to tools/docbook-xsl-1.73.2/fo/param.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/passivetex.xsl b/tools/docbook-xsl-1.73.2/fo/passivetex.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/passivetex.xsl rename to tools/docbook-xsl-1.73.2/fo/passivetex.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/pdf2index b/tools/docbook-xsl-1.73.2/fo/pdf2index similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/pdf2index rename to tools/docbook-xsl-1.73.2/fo/pdf2index diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/pi.xml b/tools/docbook-xsl-1.73.2/fo/pi.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/pi.xml rename to tools/docbook-xsl-1.73.2/fo/pi.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/pi.xsl b/tools/docbook-xsl-1.73.2/fo/pi.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/pi.xsl rename to tools/docbook-xsl-1.73.2/fo/pi.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/profile-docbook.xsl b/tools/docbook-xsl-1.73.2/fo/profile-docbook.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/profile-docbook.xsl rename to tools/docbook-xsl-1.73.2/fo/profile-docbook.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/ptc.xsl b/tools/docbook-xsl-1.73.2/fo/ptc.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/ptc.xsl rename to tools/docbook-xsl-1.73.2/fo/ptc.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/qandaset.xsl b/tools/docbook-xsl-1.73.2/fo/qandaset.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/qandaset.xsl rename to tools/docbook-xsl-1.73.2/fo/qandaset.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/refentry.xsl b/tools/docbook-xsl-1.73.2/fo/refentry.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/refentry.xsl rename to tools/docbook-xsl-1.73.2/fo/refentry.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/sections.xsl b/tools/docbook-xsl-1.73.2/fo/sections.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/sections.xsl rename to tools/docbook-xsl-1.73.2/fo/sections.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/spaces.xsl b/tools/docbook-xsl-1.73.2/fo/spaces.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/spaces.xsl rename to tools/docbook-xsl-1.73.2/fo/spaces.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/synop.xsl b/tools/docbook-xsl-1.73.2/fo/synop.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/synop.xsl rename to tools/docbook-xsl-1.73.2/fo/synop.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/table.xml b/tools/docbook-xsl-1.73.2/fo/table.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/table.xml rename to tools/docbook-xsl-1.73.2/fo/table.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/table.xsl b/tools/docbook-xsl-1.73.2/fo/table.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/table.xsl rename to tools/docbook-xsl-1.73.2/fo/table.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/task.xsl b/tools/docbook-xsl-1.73.2/fo/task.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/task.xsl rename to tools/docbook-xsl-1.73.2/fo/task.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/titlepage.templates.xml b/tools/docbook-xsl-1.73.2/fo/titlepage.templates.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/titlepage.templates.xml rename to tools/docbook-xsl-1.73.2/fo/titlepage.templates.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/titlepage.templates.xsl b/tools/docbook-xsl-1.73.2/fo/titlepage.templates.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/titlepage.templates.xsl rename to tools/docbook-xsl-1.73.2/fo/titlepage.templates.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/titlepage.xsl b/tools/docbook-xsl-1.73.2/fo/titlepage.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/titlepage.xsl rename to tools/docbook-xsl-1.73.2/fo/titlepage.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/toc.xsl b/tools/docbook-xsl-1.73.2/fo/toc.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/toc.xsl rename to tools/docbook-xsl-1.73.2/fo/toc.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/verbatim.xsl b/tools/docbook-xsl-1.73.2/fo/verbatim.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/verbatim.xsl rename to tools/docbook-xsl-1.73.2/fo/verbatim.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/xep.xsl b/tools/docbook-xsl-1.73.2/fo/xep.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/xep.xsl rename to tools/docbook-xsl-1.73.2/fo/xep.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/fo/xref.xsl b/tools/docbook-xsl-1.73.2/fo/xref.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/fo/xref.xsl rename to tools/docbook-xsl-1.73.2/fo/xref.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/highlighting/c-hl.xml b/tools/docbook-xsl-1.73.2/highlighting/c-hl.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/highlighting/c-hl.xml rename to tools/docbook-xsl-1.73.2/highlighting/c-hl.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/highlighting/common.xsl b/tools/docbook-xsl-1.73.2/highlighting/common.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/highlighting/common.xsl rename to tools/docbook-xsl-1.73.2/highlighting/common.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/highlighting/delphi-hl.xml b/tools/docbook-xsl-1.73.2/highlighting/delphi-hl.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/highlighting/delphi-hl.xml rename to tools/docbook-xsl-1.73.2/highlighting/delphi-hl.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/highlighting/ini-hl.xml b/tools/docbook-xsl-1.73.2/highlighting/ini-hl.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/highlighting/ini-hl.xml rename to tools/docbook-xsl-1.73.2/highlighting/ini-hl.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/highlighting/java-hl.xml b/tools/docbook-xsl-1.73.2/highlighting/java-hl.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/highlighting/java-hl.xml rename to tools/docbook-xsl-1.73.2/highlighting/java-hl.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/highlighting/m2-hl.xml b/tools/docbook-xsl-1.73.2/highlighting/m2-hl.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/highlighting/m2-hl.xml rename to tools/docbook-xsl-1.73.2/highlighting/m2-hl.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/highlighting/myxml-hl.xml b/tools/docbook-xsl-1.73.2/highlighting/myxml-hl.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/highlighting/myxml-hl.xml rename to tools/docbook-xsl-1.73.2/highlighting/myxml-hl.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/highlighting/php-hl.xml b/tools/docbook-xsl-1.73.2/highlighting/php-hl.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/highlighting/php-hl.xml rename to tools/docbook-xsl-1.73.2/highlighting/php-hl.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/highlighting/xslthl-config.xml b/tools/docbook-xsl-1.73.2/highlighting/xslthl-config.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/highlighting/xslthl-config.xml rename to tools/docbook-xsl-1.73.2/highlighting/xslthl-config.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/admon.xsl b/tools/docbook-xsl-1.73.2/html/admon.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/admon.xsl rename to tools/docbook-xsl-1.73.2/html/admon.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/annotations.xsl b/tools/docbook-xsl-1.73.2/html/annotations.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/annotations.xsl rename to tools/docbook-xsl-1.73.2/html/annotations.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/autoidx-kimber.xsl b/tools/docbook-xsl-1.73.2/html/autoidx-kimber.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/autoidx-kimber.xsl rename to tools/docbook-xsl-1.73.2/html/autoidx-kimber.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/autoidx-kosek.xsl b/tools/docbook-xsl-1.73.2/html/autoidx-kosek.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/autoidx-kosek.xsl rename to tools/docbook-xsl-1.73.2/html/autoidx-kosek.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/autoidx-ng.xsl b/tools/docbook-xsl-1.73.2/html/autoidx-ng.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/autoidx-ng.xsl rename to tools/docbook-xsl-1.73.2/html/autoidx-ng.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/autoidx.xsl b/tools/docbook-xsl-1.73.2/html/autoidx.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/autoidx.xsl rename to tools/docbook-xsl-1.73.2/html/autoidx.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/autotoc.xsl b/tools/docbook-xsl-1.73.2/html/autotoc.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/autotoc.xsl rename to tools/docbook-xsl-1.73.2/html/autotoc.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/biblio-iso690.xsl b/tools/docbook-xsl-1.73.2/html/biblio-iso690.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/biblio-iso690.xsl rename to tools/docbook-xsl-1.73.2/html/biblio-iso690.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/biblio.xsl b/tools/docbook-xsl-1.73.2/html/biblio.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/biblio.xsl rename to tools/docbook-xsl-1.73.2/html/biblio.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/block.xsl b/tools/docbook-xsl-1.73.2/html/block.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/block.xsl rename to tools/docbook-xsl-1.73.2/html/block.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/callout.xsl b/tools/docbook-xsl-1.73.2/html/callout.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/callout.xsl rename to tools/docbook-xsl-1.73.2/html/callout.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/changebars.xsl b/tools/docbook-xsl-1.73.2/html/changebars.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/changebars.xsl rename to tools/docbook-xsl-1.73.2/html/changebars.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/chunk-code.xsl b/tools/docbook-xsl-1.73.2/html/chunk-code.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/chunk-code.xsl rename to tools/docbook-xsl-1.73.2/html/chunk-code.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/chunk-common.xsl b/tools/docbook-xsl-1.73.2/html/chunk-common.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/chunk-common.xsl rename to tools/docbook-xsl-1.73.2/html/chunk-common.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/chunk.xsl b/tools/docbook-xsl-1.73.2/html/chunk.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/chunk.xsl rename to tools/docbook-xsl-1.73.2/html/chunk.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/chunker.xsl b/tools/docbook-xsl-1.73.2/html/chunker.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/chunker.xsl rename to tools/docbook-xsl-1.73.2/html/chunker.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/chunkfast.xsl b/tools/docbook-xsl-1.73.2/html/chunkfast.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/chunkfast.xsl rename to tools/docbook-xsl-1.73.2/html/chunkfast.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/chunktoc.xsl b/tools/docbook-xsl-1.73.2/html/chunktoc.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/chunktoc.xsl rename to tools/docbook-xsl-1.73.2/html/chunktoc.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/component.xsl b/tools/docbook-xsl-1.73.2/html/component.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/component.xsl rename to tools/docbook-xsl-1.73.2/html/component.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/division.xsl b/tools/docbook-xsl-1.73.2/html/division.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/division.xsl rename to tools/docbook-xsl-1.73.2/html/division.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/docbook.xsl b/tools/docbook-xsl-1.73.2/html/docbook.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/docbook.xsl rename to tools/docbook-xsl-1.73.2/html/docbook.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/ebnf.xsl b/tools/docbook-xsl-1.73.2/html/ebnf.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/ebnf.xsl rename to tools/docbook-xsl-1.73.2/html/ebnf.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/footnote.xsl b/tools/docbook-xsl-1.73.2/html/footnote.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/footnote.xsl rename to tools/docbook-xsl-1.73.2/html/footnote.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/formal.xsl b/tools/docbook-xsl-1.73.2/html/formal.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/formal.xsl rename to tools/docbook-xsl-1.73.2/html/formal.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/glossary.xsl b/tools/docbook-xsl-1.73.2/html/glossary.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/glossary.xsl rename to tools/docbook-xsl-1.73.2/html/glossary.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/graphics.xsl b/tools/docbook-xsl-1.73.2/html/graphics.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/graphics.xsl rename to tools/docbook-xsl-1.73.2/html/graphics.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/highlight.xsl b/tools/docbook-xsl-1.73.2/html/highlight.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/highlight.xsl rename to tools/docbook-xsl-1.73.2/html/highlight.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/html-rtf.xsl b/tools/docbook-xsl-1.73.2/html/html-rtf.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/html-rtf.xsl rename to tools/docbook-xsl-1.73.2/html/html-rtf.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/html.xsl b/tools/docbook-xsl-1.73.2/html/html.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/html.xsl rename to tools/docbook-xsl-1.73.2/html/html.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/htmltbl.xsl b/tools/docbook-xsl-1.73.2/html/htmltbl.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/htmltbl.xsl rename to tools/docbook-xsl-1.73.2/html/htmltbl.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/index.xsl b/tools/docbook-xsl-1.73.2/html/index.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/index.xsl rename to tools/docbook-xsl-1.73.2/html/index.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/info.xsl b/tools/docbook-xsl-1.73.2/html/info.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/info.xsl rename to tools/docbook-xsl-1.73.2/html/info.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/inline.xsl b/tools/docbook-xsl-1.73.2/html/inline.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/inline.xsl rename to tools/docbook-xsl-1.73.2/html/inline.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/keywords.xsl b/tools/docbook-xsl-1.73.2/html/keywords.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/keywords.xsl rename to tools/docbook-xsl-1.73.2/html/keywords.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/lists.xsl b/tools/docbook-xsl-1.73.2/html/lists.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/lists.xsl rename to tools/docbook-xsl-1.73.2/html/lists.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/maketoc.xsl b/tools/docbook-xsl-1.73.2/html/maketoc.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/maketoc.xsl rename to tools/docbook-xsl-1.73.2/html/maketoc.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/manifest.xsl b/tools/docbook-xsl-1.73.2/html/manifest.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/manifest.xsl rename to tools/docbook-xsl-1.73.2/html/manifest.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/math.xsl b/tools/docbook-xsl-1.73.2/html/math.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/math.xsl rename to tools/docbook-xsl-1.73.2/html/math.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/oldchunker.xsl b/tools/docbook-xsl-1.73.2/html/oldchunker.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/oldchunker.xsl rename to tools/docbook-xsl-1.73.2/html/oldchunker.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/onechunk.xsl b/tools/docbook-xsl-1.73.2/html/onechunk.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/onechunk.xsl rename to tools/docbook-xsl-1.73.2/html/onechunk.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/param.xml b/tools/docbook-xsl-1.73.2/html/param.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/param.xml rename to tools/docbook-xsl-1.73.2/html/param.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/param.xsl b/tools/docbook-xsl-1.73.2/html/param.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/param.xsl rename to tools/docbook-xsl-1.73.2/html/param.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/pi.xml b/tools/docbook-xsl-1.73.2/html/pi.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/pi.xml rename to tools/docbook-xsl-1.73.2/html/pi.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/pi.xsl b/tools/docbook-xsl-1.73.2/html/pi.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/pi.xsl rename to tools/docbook-xsl-1.73.2/html/pi.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/profile-chunk-code.xsl b/tools/docbook-xsl-1.73.2/html/profile-chunk-code.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/profile-chunk-code.xsl rename to tools/docbook-xsl-1.73.2/html/profile-chunk-code.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/profile-chunk.xsl b/tools/docbook-xsl-1.73.2/html/profile-chunk.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/profile-chunk.xsl rename to tools/docbook-xsl-1.73.2/html/profile-chunk.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/profile-docbook.xsl b/tools/docbook-xsl-1.73.2/html/profile-docbook.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/profile-docbook.xsl rename to tools/docbook-xsl-1.73.2/html/profile-docbook.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/profile-onechunk.xsl b/tools/docbook-xsl-1.73.2/html/profile-onechunk.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/profile-onechunk.xsl rename to tools/docbook-xsl-1.73.2/html/profile-onechunk.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/qandaset.xsl b/tools/docbook-xsl-1.73.2/html/qandaset.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/qandaset.xsl rename to tools/docbook-xsl-1.73.2/html/qandaset.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/refentry.xsl b/tools/docbook-xsl-1.73.2/html/refentry.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/refentry.xsl rename to tools/docbook-xsl-1.73.2/html/refentry.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/sections.xsl b/tools/docbook-xsl-1.73.2/html/sections.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/sections.xsl rename to tools/docbook-xsl-1.73.2/html/sections.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/synop.xsl b/tools/docbook-xsl-1.73.2/html/synop.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/synop.xsl rename to tools/docbook-xsl-1.73.2/html/synop.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/table.xsl b/tools/docbook-xsl-1.73.2/html/table.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/table.xsl rename to tools/docbook-xsl-1.73.2/html/table.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/task.xsl b/tools/docbook-xsl-1.73.2/html/task.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/task.xsl rename to tools/docbook-xsl-1.73.2/html/task.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/titlepage.templates.xml b/tools/docbook-xsl-1.73.2/html/titlepage.templates.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/titlepage.templates.xml rename to tools/docbook-xsl-1.73.2/html/titlepage.templates.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/titlepage.templates.xsl b/tools/docbook-xsl-1.73.2/html/titlepage.templates.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/titlepage.templates.xsl rename to tools/docbook-xsl-1.73.2/html/titlepage.templates.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/titlepage.xsl b/tools/docbook-xsl-1.73.2/html/titlepage.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/titlepage.xsl rename to tools/docbook-xsl-1.73.2/html/titlepage.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/toc.xsl b/tools/docbook-xsl-1.73.2/html/toc.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/toc.xsl rename to tools/docbook-xsl-1.73.2/html/toc.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/verbatim.xsl b/tools/docbook-xsl-1.73.2/html/verbatim.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/verbatim.xsl rename to tools/docbook-xsl-1.73.2/html/verbatim.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/html/xref.xsl b/tools/docbook-xsl-1.73.2/html/xref.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/html/xref.xsl rename to tools/docbook-xsl-1.73.2/html/xref.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/htmlhelp/htmlhelp-common.xsl b/tools/docbook-xsl-1.73.2/htmlhelp/htmlhelp-common.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/htmlhelp/htmlhelp-common.xsl rename to tools/docbook-xsl-1.73.2/htmlhelp/htmlhelp-common.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/htmlhelp/htmlhelp.xsl b/tools/docbook-xsl-1.73.2/htmlhelp/htmlhelp.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/htmlhelp/htmlhelp.xsl rename to tools/docbook-xsl-1.73.2/htmlhelp/htmlhelp.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/htmlhelp/profile-htmlhelp-common.xsl b/tools/docbook-xsl-1.73.2/htmlhelp/profile-htmlhelp-common.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/htmlhelp/profile-htmlhelp-common.xsl rename to tools/docbook-xsl-1.73.2/htmlhelp/profile-htmlhelp-common.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/htmlhelp/profile-htmlhelp.xsl b/tools/docbook-xsl-1.73.2/htmlhelp/profile-htmlhelp.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/htmlhelp/profile-htmlhelp.xsl rename to tools/docbook-xsl-1.73.2/htmlhelp/profile-htmlhelp.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/annot-close.png b/tools/docbook-xsl-1.73.2/images/annot-close.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/annot-close.png rename to tools/docbook-xsl-1.73.2/images/annot-close.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/annot-open.png b/tools/docbook-xsl-1.73.2/images/annot-open.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/annot-open.png rename to tools/docbook-xsl-1.73.2/images/annot-open.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/blank.png b/tools/docbook-xsl-1.73.2/images/blank.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/blank.png rename to tools/docbook-xsl-1.73.2/images/blank.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/1.gif b/tools/docbook-xsl-1.73.2/images/callouts/1.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/1.gif rename to tools/docbook-xsl-1.73.2/images/callouts/1.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/1.png b/tools/docbook-xsl-1.73.2/images/callouts/1.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/1.png rename to tools/docbook-xsl-1.73.2/images/callouts/1.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/1.svg b/tools/docbook-xsl-1.73.2/images/callouts/1.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/1.svg rename to tools/docbook-xsl-1.73.2/images/callouts/1.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/10.gif b/tools/docbook-xsl-1.73.2/images/callouts/10.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/10.gif rename to tools/docbook-xsl-1.73.2/images/callouts/10.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/10.png b/tools/docbook-xsl-1.73.2/images/callouts/10.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/10.png rename to tools/docbook-xsl-1.73.2/images/callouts/10.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/10.svg b/tools/docbook-xsl-1.73.2/images/callouts/10.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/10.svg rename to tools/docbook-xsl-1.73.2/images/callouts/10.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/11.gif b/tools/docbook-xsl-1.73.2/images/callouts/11.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/11.gif rename to tools/docbook-xsl-1.73.2/images/callouts/11.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/11.png b/tools/docbook-xsl-1.73.2/images/callouts/11.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/11.png rename to tools/docbook-xsl-1.73.2/images/callouts/11.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/11.svg b/tools/docbook-xsl-1.73.2/images/callouts/11.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/11.svg rename to tools/docbook-xsl-1.73.2/images/callouts/11.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/12.gif b/tools/docbook-xsl-1.73.2/images/callouts/12.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/12.gif rename to tools/docbook-xsl-1.73.2/images/callouts/12.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/12.png b/tools/docbook-xsl-1.73.2/images/callouts/12.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/12.png rename to tools/docbook-xsl-1.73.2/images/callouts/12.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/12.svg b/tools/docbook-xsl-1.73.2/images/callouts/12.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/12.svg rename to tools/docbook-xsl-1.73.2/images/callouts/12.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/13.gif b/tools/docbook-xsl-1.73.2/images/callouts/13.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/13.gif rename to tools/docbook-xsl-1.73.2/images/callouts/13.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/13.png b/tools/docbook-xsl-1.73.2/images/callouts/13.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/13.png rename to tools/docbook-xsl-1.73.2/images/callouts/13.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/13.svg b/tools/docbook-xsl-1.73.2/images/callouts/13.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/13.svg rename to tools/docbook-xsl-1.73.2/images/callouts/13.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/14.gif b/tools/docbook-xsl-1.73.2/images/callouts/14.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/14.gif rename to tools/docbook-xsl-1.73.2/images/callouts/14.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/14.png b/tools/docbook-xsl-1.73.2/images/callouts/14.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/14.png rename to tools/docbook-xsl-1.73.2/images/callouts/14.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/14.svg b/tools/docbook-xsl-1.73.2/images/callouts/14.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/14.svg rename to tools/docbook-xsl-1.73.2/images/callouts/14.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/15.gif b/tools/docbook-xsl-1.73.2/images/callouts/15.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/15.gif rename to tools/docbook-xsl-1.73.2/images/callouts/15.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/15.png b/tools/docbook-xsl-1.73.2/images/callouts/15.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/15.png rename to tools/docbook-xsl-1.73.2/images/callouts/15.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/15.svg b/tools/docbook-xsl-1.73.2/images/callouts/15.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/15.svg rename to tools/docbook-xsl-1.73.2/images/callouts/15.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/16.svg b/tools/docbook-xsl-1.73.2/images/callouts/16.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/16.svg rename to tools/docbook-xsl-1.73.2/images/callouts/16.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/17.svg b/tools/docbook-xsl-1.73.2/images/callouts/17.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/17.svg rename to tools/docbook-xsl-1.73.2/images/callouts/17.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/18.svg b/tools/docbook-xsl-1.73.2/images/callouts/18.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/18.svg rename to tools/docbook-xsl-1.73.2/images/callouts/18.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/19.svg b/tools/docbook-xsl-1.73.2/images/callouts/19.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/19.svg rename to tools/docbook-xsl-1.73.2/images/callouts/19.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/2.gif b/tools/docbook-xsl-1.73.2/images/callouts/2.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/2.gif rename to tools/docbook-xsl-1.73.2/images/callouts/2.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/2.png b/tools/docbook-xsl-1.73.2/images/callouts/2.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/2.png rename to tools/docbook-xsl-1.73.2/images/callouts/2.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/2.svg b/tools/docbook-xsl-1.73.2/images/callouts/2.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/2.svg rename to tools/docbook-xsl-1.73.2/images/callouts/2.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/20.svg b/tools/docbook-xsl-1.73.2/images/callouts/20.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/20.svg rename to tools/docbook-xsl-1.73.2/images/callouts/20.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/21.svg b/tools/docbook-xsl-1.73.2/images/callouts/21.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/21.svg rename to tools/docbook-xsl-1.73.2/images/callouts/21.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/22.svg b/tools/docbook-xsl-1.73.2/images/callouts/22.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/22.svg rename to tools/docbook-xsl-1.73.2/images/callouts/22.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/23.svg b/tools/docbook-xsl-1.73.2/images/callouts/23.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/23.svg rename to tools/docbook-xsl-1.73.2/images/callouts/23.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/24.svg b/tools/docbook-xsl-1.73.2/images/callouts/24.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/24.svg rename to tools/docbook-xsl-1.73.2/images/callouts/24.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/25.svg b/tools/docbook-xsl-1.73.2/images/callouts/25.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/25.svg rename to tools/docbook-xsl-1.73.2/images/callouts/25.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/26.svg b/tools/docbook-xsl-1.73.2/images/callouts/26.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/26.svg rename to tools/docbook-xsl-1.73.2/images/callouts/26.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/27.svg b/tools/docbook-xsl-1.73.2/images/callouts/27.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/27.svg rename to tools/docbook-xsl-1.73.2/images/callouts/27.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/28.svg b/tools/docbook-xsl-1.73.2/images/callouts/28.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/28.svg rename to tools/docbook-xsl-1.73.2/images/callouts/28.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/29.svg b/tools/docbook-xsl-1.73.2/images/callouts/29.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/29.svg rename to tools/docbook-xsl-1.73.2/images/callouts/29.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/3.gif b/tools/docbook-xsl-1.73.2/images/callouts/3.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/3.gif rename to tools/docbook-xsl-1.73.2/images/callouts/3.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/3.png b/tools/docbook-xsl-1.73.2/images/callouts/3.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/3.png rename to tools/docbook-xsl-1.73.2/images/callouts/3.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/3.svg b/tools/docbook-xsl-1.73.2/images/callouts/3.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/3.svg rename to tools/docbook-xsl-1.73.2/images/callouts/3.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/30.svg b/tools/docbook-xsl-1.73.2/images/callouts/30.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/30.svg rename to tools/docbook-xsl-1.73.2/images/callouts/30.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/4.gif b/tools/docbook-xsl-1.73.2/images/callouts/4.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/4.gif rename to tools/docbook-xsl-1.73.2/images/callouts/4.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/4.png b/tools/docbook-xsl-1.73.2/images/callouts/4.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/4.png rename to tools/docbook-xsl-1.73.2/images/callouts/4.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/4.svg b/tools/docbook-xsl-1.73.2/images/callouts/4.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/4.svg rename to tools/docbook-xsl-1.73.2/images/callouts/4.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/5.gif b/tools/docbook-xsl-1.73.2/images/callouts/5.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/5.gif rename to tools/docbook-xsl-1.73.2/images/callouts/5.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/5.png b/tools/docbook-xsl-1.73.2/images/callouts/5.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/5.png rename to tools/docbook-xsl-1.73.2/images/callouts/5.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/5.svg b/tools/docbook-xsl-1.73.2/images/callouts/5.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/5.svg rename to tools/docbook-xsl-1.73.2/images/callouts/5.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/6.gif b/tools/docbook-xsl-1.73.2/images/callouts/6.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/6.gif rename to tools/docbook-xsl-1.73.2/images/callouts/6.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/6.png b/tools/docbook-xsl-1.73.2/images/callouts/6.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/6.png rename to tools/docbook-xsl-1.73.2/images/callouts/6.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/6.svg b/tools/docbook-xsl-1.73.2/images/callouts/6.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/6.svg rename to tools/docbook-xsl-1.73.2/images/callouts/6.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/7.gif b/tools/docbook-xsl-1.73.2/images/callouts/7.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/7.gif rename to tools/docbook-xsl-1.73.2/images/callouts/7.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/7.png b/tools/docbook-xsl-1.73.2/images/callouts/7.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/7.png rename to tools/docbook-xsl-1.73.2/images/callouts/7.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/7.svg b/tools/docbook-xsl-1.73.2/images/callouts/7.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/7.svg rename to tools/docbook-xsl-1.73.2/images/callouts/7.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/8.gif b/tools/docbook-xsl-1.73.2/images/callouts/8.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/8.gif rename to tools/docbook-xsl-1.73.2/images/callouts/8.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/8.png b/tools/docbook-xsl-1.73.2/images/callouts/8.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/8.png rename to tools/docbook-xsl-1.73.2/images/callouts/8.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/8.svg b/tools/docbook-xsl-1.73.2/images/callouts/8.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/8.svg rename to tools/docbook-xsl-1.73.2/images/callouts/8.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/9.gif b/tools/docbook-xsl-1.73.2/images/callouts/9.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/9.gif rename to tools/docbook-xsl-1.73.2/images/callouts/9.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/9.png b/tools/docbook-xsl-1.73.2/images/callouts/9.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/9.png rename to tools/docbook-xsl-1.73.2/images/callouts/9.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/9.svg b/tools/docbook-xsl-1.73.2/images/callouts/9.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/callouts/9.svg rename to tools/docbook-xsl-1.73.2/images/callouts/9.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/caution.gif b/tools/docbook-xsl-1.73.2/images/caution.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/caution.gif rename to tools/docbook-xsl-1.73.2/images/caution.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/caution.png b/tools/docbook-xsl-1.73.2/images/caution.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/caution.png rename to tools/docbook-xsl-1.73.2/images/caution.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/caution.svg b/tools/docbook-xsl-1.73.2/images/caution.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/caution.svg rename to tools/docbook-xsl-1.73.2/images/caution.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/caution.tif b/tools/docbook-xsl-1.73.2/images/caution.tif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/caution.tif rename to tools/docbook-xsl-1.73.2/images/caution.tif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/draft.png b/tools/docbook-xsl-1.73.2/images/draft.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/draft.png rename to tools/docbook-xsl-1.73.2/images/draft.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/home.gif b/tools/docbook-xsl-1.73.2/images/home.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/home.gif rename to tools/docbook-xsl-1.73.2/images/home.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/home.png b/tools/docbook-xsl-1.73.2/images/home.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/home.png rename to tools/docbook-xsl-1.73.2/images/home.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/home.svg b/tools/docbook-xsl-1.73.2/images/home.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/home.svg rename to tools/docbook-xsl-1.73.2/images/home.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/important.gif b/tools/docbook-xsl-1.73.2/images/important.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/important.gif rename to tools/docbook-xsl-1.73.2/images/important.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/important.png b/tools/docbook-xsl-1.73.2/images/important.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/important.png rename to tools/docbook-xsl-1.73.2/images/important.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/important.svg b/tools/docbook-xsl-1.73.2/images/important.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/important.svg rename to tools/docbook-xsl-1.73.2/images/important.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/important.tif b/tools/docbook-xsl-1.73.2/images/important.tif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/important.tif rename to tools/docbook-xsl-1.73.2/images/important.tif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/next.gif b/tools/docbook-xsl-1.73.2/images/next.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/next.gif rename to tools/docbook-xsl-1.73.2/images/next.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/next.png b/tools/docbook-xsl-1.73.2/images/next.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/next.png rename to tools/docbook-xsl-1.73.2/images/next.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/next.svg b/tools/docbook-xsl-1.73.2/images/next.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/next.svg rename to tools/docbook-xsl-1.73.2/images/next.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/note.gif b/tools/docbook-xsl-1.73.2/images/note.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/note.gif rename to tools/docbook-xsl-1.73.2/images/note.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/note.png b/tools/docbook-xsl-1.73.2/images/note.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/note.png rename to tools/docbook-xsl-1.73.2/images/note.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/note.svg b/tools/docbook-xsl-1.73.2/images/note.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/note.svg rename to tools/docbook-xsl-1.73.2/images/note.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/note.tif b/tools/docbook-xsl-1.73.2/images/note.tif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/note.tif rename to tools/docbook-xsl-1.73.2/images/note.tif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/prev.gif b/tools/docbook-xsl-1.73.2/images/prev.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/prev.gif rename to tools/docbook-xsl-1.73.2/images/prev.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/prev.png b/tools/docbook-xsl-1.73.2/images/prev.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/prev.png rename to tools/docbook-xsl-1.73.2/images/prev.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/prev.svg b/tools/docbook-xsl-1.73.2/images/prev.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/prev.svg rename to tools/docbook-xsl-1.73.2/images/prev.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/tip.gif b/tools/docbook-xsl-1.73.2/images/tip.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/tip.gif rename to tools/docbook-xsl-1.73.2/images/tip.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/tip.png b/tools/docbook-xsl-1.73.2/images/tip.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/tip.png rename to tools/docbook-xsl-1.73.2/images/tip.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/tip.svg b/tools/docbook-xsl-1.73.2/images/tip.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/tip.svg rename to tools/docbook-xsl-1.73.2/images/tip.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/tip.tif b/tools/docbook-xsl-1.73.2/images/tip.tif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/tip.tif rename to tools/docbook-xsl-1.73.2/images/tip.tif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/toc-blank.png b/tools/docbook-xsl-1.73.2/images/toc-blank.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/toc-blank.png rename to tools/docbook-xsl-1.73.2/images/toc-blank.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/toc-minus.png b/tools/docbook-xsl-1.73.2/images/toc-minus.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/toc-minus.png rename to tools/docbook-xsl-1.73.2/images/toc-minus.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/toc-plus.png b/tools/docbook-xsl-1.73.2/images/toc-plus.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/toc-plus.png rename to tools/docbook-xsl-1.73.2/images/toc-plus.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/up.gif b/tools/docbook-xsl-1.73.2/images/up.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/up.gif rename to tools/docbook-xsl-1.73.2/images/up.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/up.png b/tools/docbook-xsl-1.73.2/images/up.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/up.png rename to tools/docbook-xsl-1.73.2/images/up.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/up.svg b/tools/docbook-xsl-1.73.2/images/up.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/up.svg rename to tools/docbook-xsl-1.73.2/images/up.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/warning.gif b/tools/docbook-xsl-1.73.2/images/warning.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/warning.gif rename to tools/docbook-xsl-1.73.2/images/warning.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/warning.png b/tools/docbook-xsl-1.73.2/images/warning.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/warning.png rename to tools/docbook-xsl-1.73.2/images/warning.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/warning.svg b/tools/docbook-xsl-1.73.2/images/warning.svg similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/warning.svg rename to tools/docbook-xsl-1.73.2/images/warning.svg diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/images/warning.tif b/tools/docbook-xsl-1.73.2/images/warning.tif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/images/warning.tif rename to tools/docbook-xsl-1.73.2/images/warning.tif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/install.sh b/tools/docbook-xsl-1.73.2/install.sh similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/install.sh rename to tools/docbook-xsl-1.73.2/install.sh diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/javahelp/javahelp.xsl b/tools/docbook-xsl-1.73.2/javahelp/javahelp.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/javahelp/javahelp.xsl rename to tools/docbook-xsl-1.73.2/javahelp/javahelp.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/javahelp/profile-javahelp.xsl b/tools/docbook-xsl-1.73.2/javahelp/profile-javahelp.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/javahelp/profile-javahelp.xsl rename to tools/docbook-xsl-1.73.2/javahelp/profile-javahelp.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/lib/lib.xsl b/tools/docbook-xsl-1.73.2/lib/lib.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/lib/lib.xsl rename to tools/docbook-xsl-1.73.2/lib/lib.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/manpages/ChangeLog.20020917 b/tools/docbook-xsl-1.73.2/manpages/ChangeLog.20020917 similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/manpages/ChangeLog.20020917 rename to tools/docbook-xsl-1.73.2/manpages/ChangeLog.20020917 diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/manpages/block.xsl b/tools/docbook-xsl-1.73.2/manpages/block.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/manpages/block.xsl rename to tools/docbook-xsl-1.73.2/manpages/block.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/manpages/charmap.groff.xsl b/tools/docbook-xsl-1.73.2/manpages/charmap.groff.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/manpages/charmap.groff.xsl rename to tools/docbook-xsl-1.73.2/manpages/charmap.groff.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/manpages/docbook.xsl b/tools/docbook-xsl-1.73.2/manpages/docbook.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/manpages/docbook.xsl rename to tools/docbook-xsl-1.73.2/manpages/docbook.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/manpages/endnotes.xsl b/tools/docbook-xsl-1.73.2/manpages/endnotes.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/manpages/endnotes.xsl rename to tools/docbook-xsl-1.73.2/manpages/endnotes.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/manpages/html-synop.xsl b/tools/docbook-xsl-1.73.2/manpages/html-synop.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/manpages/html-synop.xsl rename to tools/docbook-xsl-1.73.2/manpages/html-synop.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/manpages/info.xsl b/tools/docbook-xsl-1.73.2/manpages/info.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/manpages/info.xsl rename to tools/docbook-xsl-1.73.2/manpages/info.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/manpages/inline.xsl b/tools/docbook-xsl-1.73.2/manpages/inline.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/manpages/inline.xsl rename to tools/docbook-xsl-1.73.2/manpages/inline.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/manpages/lists.xsl b/tools/docbook-xsl-1.73.2/manpages/lists.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/manpages/lists.xsl rename to tools/docbook-xsl-1.73.2/manpages/lists.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/manpages/other.xsl b/tools/docbook-xsl-1.73.2/manpages/other.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/manpages/other.xsl rename to tools/docbook-xsl-1.73.2/manpages/other.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/manpages/param.xml b/tools/docbook-xsl-1.73.2/manpages/param.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/manpages/param.xml rename to tools/docbook-xsl-1.73.2/manpages/param.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/manpages/param.xsl b/tools/docbook-xsl-1.73.2/manpages/param.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/manpages/param.xsl rename to tools/docbook-xsl-1.73.2/manpages/param.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/manpages/profile-docbook.xsl b/tools/docbook-xsl-1.73.2/manpages/profile-docbook.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/manpages/profile-docbook.xsl rename to tools/docbook-xsl-1.73.2/manpages/profile-docbook.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/manpages/refentry.xsl b/tools/docbook-xsl-1.73.2/manpages/refentry.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/manpages/refentry.xsl rename to tools/docbook-xsl-1.73.2/manpages/refentry.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/manpages/synop.xsl b/tools/docbook-xsl-1.73.2/manpages/synop.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/manpages/synop.xsl rename to tools/docbook-xsl-1.73.2/manpages/synop.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/manpages/table.xsl b/tools/docbook-xsl-1.73.2/manpages/table.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/manpages/table.xsl rename to tools/docbook-xsl-1.73.2/manpages/table.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/manpages/utility.xsl b/tools/docbook-xsl-1.73.2/manpages/utility.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/manpages/utility.xsl rename to tools/docbook-xsl-1.73.2/manpages/utility.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/abstract.notitle.enabled.xml b/tools/docbook-xsl-1.73.2/params/abstract.notitle.enabled.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/abstract.notitle.enabled.xml rename to tools/docbook-xsl-1.73.2/params/abstract.notitle.enabled.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/abstract.properties.xml b/tools/docbook-xsl-1.73.2/params/abstract.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/abstract.properties.xml rename to tools/docbook-xsl-1.73.2/params/abstract.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/abstract.title.properties.xml b/tools/docbook-xsl-1.73.2/params/abstract.title.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/abstract.title.properties.xml rename to tools/docbook-xsl-1.73.2/params/abstract.title.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/active.toc.xml b/tools/docbook-xsl-1.73.2/params/active.toc.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/active.toc.xml rename to tools/docbook-xsl-1.73.2/params/active.toc.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/admon.graphics.extension.xml b/tools/docbook-xsl-1.73.2/params/admon.graphics.extension.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/admon.graphics.extension.xml rename to tools/docbook-xsl-1.73.2/params/admon.graphics.extension.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/admon.graphics.path.xml b/tools/docbook-xsl-1.73.2/params/admon.graphics.path.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/admon.graphics.path.xml rename to tools/docbook-xsl-1.73.2/params/admon.graphics.path.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/admon.graphics.xml b/tools/docbook-xsl-1.73.2/params/admon.graphics.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/admon.graphics.xml rename to tools/docbook-xsl-1.73.2/params/admon.graphics.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/admon.style.xml b/tools/docbook-xsl-1.73.2/params/admon.style.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/admon.style.xml rename to tools/docbook-xsl-1.73.2/params/admon.style.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/admon.textlabel.xml b/tools/docbook-xsl-1.73.2/params/admon.textlabel.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/admon.textlabel.xml rename to tools/docbook-xsl-1.73.2/params/admon.textlabel.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/admonition.properties.xml b/tools/docbook-xsl-1.73.2/params/admonition.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/admonition.properties.xml rename to tools/docbook-xsl-1.73.2/params/admonition.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/admonition.title.properties.xml b/tools/docbook-xsl-1.73.2/params/admonition.title.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/admonition.title.properties.xml rename to tools/docbook-xsl-1.73.2/params/admonition.title.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/alignment.xml b/tools/docbook-xsl-1.73.2/params/alignment.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/alignment.xml rename to tools/docbook-xsl-1.73.2/params/alignment.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/annotate.toc.xml b/tools/docbook-xsl-1.73.2/params/annotate.toc.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/annotate.toc.xml rename to tools/docbook-xsl-1.73.2/params/annotate.toc.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/annotation.css.xml b/tools/docbook-xsl-1.73.2/params/annotation.css.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/annotation.css.xml rename to tools/docbook-xsl-1.73.2/params/annotation.css.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/annotation.graphic.close.xml b/tools/docbook-xsl-1.73.2/params/annotation.graphic.close.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/annotation.graphic.close.xml rename to tools/docbook-xsl-1.73.2/params/annotation.graphic.close.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/annotation.graphic.open.xml b/tools/docbook-xsl-1.73.2/params/annotation.graphic.open.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/annotation.graphic.open.xml rename to tools/docbook-xsl-1.73.2/params/annotation.graphic.open.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/annotation.js.xml b/tools/docbook-xsl-1.73.2/params/annotation.js.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/annotation.js.xml rename to tools/docbook-xsl-1.73.2/params/annotation.js.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/annotation.support.xml b/tools/docbook-xsl-1.73.2/params/annotation.support.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/annotation.support.xml rename to tools/docbook-xsl-1.73.2/params/annotation.support.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/appendix.autolabel.xml b/tools/docbook-xsl-1.73.2/params/appendix.autolabel.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/appendix.autolabel.xml rename to tools/docbook-xsl-1.73.2/params/appendix.autolabel.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/arbortext.extensions.xml b/tools/docbook-xsl-1.73.2/params/arbortext.extensions.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/arbortext.extensions.xml rename to tools/docbook-xsl-1.73.2/params/arbortext.extensions.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/article.appendix.title.properties.xml b/tools/docbook-xsl-1.73.2/params/article.appendix.title.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/article.appendix.title.properties.xml rename to tools/docbook-xsl-1.73.2/params/article.appendix.title.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/author.othername.in.middle.xml b/tools/docbook-xsl-1.73.2/params/author.othername.in.middle.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/author.othername.in.middle.xml rename to tools/docbook-xsl-1.73.2/params/author.othername.in.middle.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/autolayout-file.xml b/tools/docbook-xsl-1.73.2/params/autolayout-file.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/autolayout-file.xml rename to tools/docbook-xsl-1.73.2/params/autolayout-file.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/autotoc.label.in.hyperlink.xml b/tools/docbook-xsl-1.73.2/params/autotoc.label.in.hyperlink.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/autotoc.label.in.hyperlink.xml rename to tools/docbook-xsl-1.73.2/params/autotoc.label.in.hyperlink.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/autotoc.label.separator.xml b/tools/docbook-xsl-1.73.2/params/autotoc.label.separator.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/autotoc.label.separator.xml rename to tools/docbook-xsl-1.73.2/params/autotoc.label.separator.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/axf.extensions.xml b/tools/docbook-xsl-1.73.2/params/axf.extensions.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/axf.extensions.xml rename to tools/docbook-xsl-1.73.2/params/axf.extensions.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/banner.before.navigation.xml b/tools/docbook-xsl-1.73.2/params/banner.before.navigation.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/banner.before.navigation.xml rename to tools/docbook-xsl-1.73.2/params/banner.before.navigation.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/base.dir.xml b/tools/docbook-xsl-1.73.2/params/base.dir.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/base.dir.xml rename to tools/docbook-xsl-1.73.2/params/base.dir.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/biblioentry.item.separator.xml b/tools/docbook-xsl-1.73.2/params/biblioentry.item.separator.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/biblioentry.item.separator.xml rename to tools/docbook-xsl-1.73.2/params/biblioentry.item.separator.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/biblioentry.properties.xml b/tools/docbook-xsl-1.73.2/params/biblioentry.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/biblioentry.properties.xml rename to tools/docbook-xsl-1.73.2/params/biblioentry.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/bibliography.collection.xml b/tools/docbook-xsl-1.73.2/params/bibliography.collection.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/bibliography.collection.xml rename to tools/docbook-xsl-1.73.2/params/bibliography.collection.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/bibliography.numbered.xml b/tools/docbook-xsl-1.73.2/params/bibliography.numbered.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/bibliography.numbered.xml rename to tools/docbook-xsl-1.73.2/params/bibliography.numbered.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/bibliography.style.xml b/tools/docbook-xsl-1.73.2/params/bibliography.style.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/bibliography.style.xml rename to tools/docbook-xsl-1.73.2/params/bibliography.style.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/blockquote.properties.xml b/tools/docbook-xsl-1.73.2/params/blockquote.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/blockquote.properties.xml rename to tools/docbook-xsl-1.73.2/params/blockquote.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/blurb.on.titlepage.enabled.xml b/tools/docbook-xsl-1.73.2/params/blurb.on.titlepage.enabled.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/blurb.on.titlepage.enabled.xml rename to tools/docbook-xsl-1.73.2/params/blurb.on.titlepage.enabled.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/body.attributes.xml b/tools/docbook-xsl-1.73.2/params/body.attributes.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/body.attributes.xml rename to tools/docbook-xsl-1.73.2/params/body.attributes.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/body.bg.color.xml b/tools/docbook-xsl-1.73.2/params/body.bg.color.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/body.bg.color.xml rename to tools/docbook-xsl-1.73.2/params/body.bg.color.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/body.end.indent.xml b/tools/docbook-xsl-1.73.2/params/body.end.indent.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/body.end.indent.xml rename to tools/docbook-xsl-1.73.2/params/body.end.indent.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/body.font.family.xml b/tools/docbook-xsl-1.73.2/params/body.font.family.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/body.font.family.xml rename to tools/docbook-xsl-1.73.2/params/body.font.family.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/body.font.master.xml b/tools/docbook-xsl-1.73.2/params/body.font.master.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/body.font.master.xml rename to tools/docbook-xsl-1.73.2/params/body.font.master.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/body.font.size.xml b/tools/docbook-xsl-1.73.2/params/body.font.size.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/body.font.size.xml rename to tools/docbook-xsl-1.73.2/params/body.font.size.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/body.margin.bottom.xml b/tools/docbook-xsl-1.73.2/params/body.margin.bottom.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/body.margin.bottom.xml rename to tools/docbook-xsl-1.73.2/params/body.margin.bottom.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/body.margin.top.xml b/tools/docbook-xsl-1.73.2/params/body.margin.top.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/body.margin.top.xml rename to tools/docbook-xsl-1.73.2/params/body.margin.top.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/body.start.indent.xml b/tools/docbook-xsl-1.73.2/params/body.start.indent.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/body.start.indent.xml rename to tools/docbook-xsl-1.73.2/params/body.start.indent.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/bridgehead.in.toc.xml b/tools/docbook-xsl-1.73.2/params/bridgehead.in.toc.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/bridgehead.in.toc.xml rename to tools/docbook-xsl-1.73.2/params/bridgehead.in.toc.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/bullet.image.xml b/tools/docbook-xsl-1.73.2/params/bullet.image.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/bullet.image.xml rename to tools/docbook-xsl-1.73.2/params/bullet.image.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/callout.defaultcolumn.xml b/tools/docbook-xsl-1.73.2/params/callout.defaultcolumn.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/callout.defaultcolumn.xml rename to tools/docbook-xsl-1.73.2/params/callout.defaultcolumn.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/callout.graphics.extension.xml b/tools/docbook-xsl-1.73.2/params/callout.graphics.extension.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/callout.graphics.extension.xml rename to tools/docbook-xsl-1.73.2/params/callout.graphics.extension.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/callout.graphics.number.limit.xml b/tools/docbook-xsl-1.73.2/params/callout.graphics.number.limit.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/callout.graphics.number.limit.xml rename to tools/docbook-xsl-1.73.2/params/callout.graphics.number.limit.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/callout.graphics.path.xml b/tools/docbook-xsl-1.73.2/params/callout.graphics.path.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/callout.graphics.path.xml rename to tools/docbook-xsl-1.73.2/params/callout.graphics.path.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/callout.graphics.xml b/tools/docbook-xsl-1.73.2/params/callout.graphics.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/callout.graphics.xml rename to tools/docbook-xsl-1.73.2/params/callout.graphics.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/callout.icon.size.xml b/tools/docbook-xsl-1.73.2/params/callout.icon.size.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/callout.icon.size.xml rename to tools/docbook-xsl-1.73.2/params/callout.icon.size.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/callout.list.table.xml b/tools/docbook-xsl-1.73.2/params/callout.list.table.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/callout.list.table.xml rename to tools/docbook-xsl-1.73.2/params/callout.list.table.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/callout.unicode.font.xml b/tools/docbook-xsl-1.73.2/params/callout.unicode.font.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/callout.unicode.font.xml rename to tools/docbook-xsl-1.73.2/params/callout.unicode.font.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/callout.unicode.number.limit.xml b/tools/docbook-xsl-1.73.2/params/callout.unicode.number.limit.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/callout.unicode.number.limit.xml rename to tools/docbook-xsl-1.73.2/params/callout.unicode.number.limit.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/callout.unicode.start.character.xml b/tools/docbook-xsl-1.73.2/params/callout.unicode.start.character.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/callout.unicode.start.character.xml rename to tools/docbook-xsl-1.73.2/params/callout.unicode.start.character.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/callout.unicode.xml b/tools/docbook-xsl-1.73.2/params/callout.unicode.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/callout.unicode.xml rename to tools/docbook-xsl-1.73.2/params/callout.unicode.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/callouts.extension.xml b/tools/docbook-xsl-1.73.2/params/callouts.extension.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/callouts.extension.xml rename to tools/docbook-xsl-1.73.2/params/callouts.extension.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/chapter.autolabel.xml b/tools/docbook-xsl-1.73.2/params/chapter.autolabel.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/chapter.autolabel.xml rename to tools/docbook-xsl-1.73.2/params/chapter.autolabel.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/chunk.append.xml b/tools/docbook-xsl-1.73.2/params/chunk.append.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/chunk.append.xml rename to tools/docbook-xsl-1.73.2/params/chunk.append.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/chunk.first.sections.xml b/tools/docbook-xsl-1.73.2/params/chunk.first.sections.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/chunk.first.sections.xml rename to tools/docbook-xsl-1.73.2/params/chunk.first.sections.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/chunk.quietly.xml b/tools/docbook-xsl-1.73.2/params/chunk.quietly.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/chunk.quietly.xml rename to tools/docbook-xsl-1.73.2/params/chunk.quietly.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/chunk.section.depth.xml b/tools/docbook-xsl-1.73.2/params/chunk.section.depth.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/chunk.section.depth.xml rename to tools/docbook-xsl-1.73.2/params/chunk.section.depth.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/chunk.sections.xml b/tools/docbook-xsl-1.73.2/params/chunk.sections.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/chunk.sections.xml rename to tools/docbook-xsl-1.73.2/params/chunk.sections.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/chunk.separate.lots.xml b/tools/docbook-xsl-1.73.2/params/chunk.separate.lots.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/chunk.separate.lots.xml rename to tools/docbook-xsl-1.73.2/params/chunk.separate.lots.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/chunk.toc.xml b/tools/docbook-xsl-1.73.2/params/chunk.toc.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/chunk.toc.xml rename to tools/docbook-xsl-1.73.2/params/chunk.toc.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/chunk.tocs.and.lots.has.title.xml b/tools/docbook-xsl-1.73.2/params/chunk.tocs.and.lots.has.title.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/chunk.tocs.and.lots.has.title.xml rename to tools/docbook-xsl-1.73.2/params/chunk.tocs.and.lots.has.title.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/chunk.tocs.and.lots.xml b/tools/docbook-xsl-1.73.2/params/chunk.tocs.and.lots.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/chunk.tocs.and.lots.xml rename to tools/docbook-xsl-1.73.2/params/chunk.tocs.and.lots.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/chunker.output.cdata-section-elements.xml b/tools/docbook-xsl-1.73.2/params/chunker.output.cdata-section-elements.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/chunker.output.cdata-section-elements.xml rename to tools/docbook-xsl-1.73.2/params/chunker.output.cdata-section-elements.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/chunker.output.doctype-public.xml b/tools/docbook-xsl-1.73.2/params/chunker.output.doctype-public.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/chunker.output.doctype-public.xml rename to tools/docbook-xsl-1.73.2/params/chunker.output.doctype-public.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/chunker.output.doctype-system.xml b/tools/docbook-xsl-1.73.2/params/chunker.output.doctype-system.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/chunker.output.doctype-system.xml rename to tools/docbook-xsl-1.73.2/params/chunker.output.doctype-system.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/chunker.output.encoding.xml b/tools/docbook-xsl-1.73.2/params/chunker.output.encoding.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/chunker.output.encoding.xml rename to tools/docbook-xsl-1.73.2/params/chunker.output.encoding.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/chunker.output.indent.xml b/tools/docbook-xsl-1.73.2/params/chunker.output.indent.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/chunker.output.indent.xml rename to tools/docbook-xsl-1.73.2/params/chunker.output.indent.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/chunker.output.media-type.xml b/tools/docbook-xsl-1.73.2/params/chunker.output.media-type.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/chunker.output.media-type.xml rename to tools/docbook-xsl-1.73.2/params/chunker.output.media-type.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/chunker.output.method.xml b/tools/docbook-xsl-1.73.2/params/chunker.output.method.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/chunker.output.method.xml rename to tools/docbook-xsl-1.73.2/params/chunker.output.method.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/chunker.output.omit-xml-declaration.xml b/tools/docbook-xsl-1.73.2/params/chunker.output.omit-xml-declaration.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/chunker.output.omit-xml-declaration.xml rename to tools/docbook-xsl-1.73.2/params/chunker.output.omit-xml-declaration.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/chunker.output.standalone.xml b/tools/docbook-xsl-1.73.2/params/chunker.output.standalone.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/chunker.output.standalone.xml rename to tools/docbook-xsl-1.73.2/params/chunker.output.standalone.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/citerefentry.link.xml b/tools/docbook-xsl-1.73.2/params/citerefentry.link.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/citerefentry.link.xml rename to tools/docbook-xsl-1.73.2/params/citerefentry.link.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/collect.xref.targets.xml b/tools/docbook-xsl-1.73.2/params/collect.xref.targets.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/collect.xref.targets.xml rename to tools/docbook-xsl-1.73.2/params/collect.xref.targets.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/column.count.back.xml b/tools/docbook-xsl-1.73.2/params/column.count.back.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/column.count.back.xml rename to tools/docbook-xsl-1.73.2/params/column.count.back.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/column.count.body.xml b/tools/docbook-xsl-1.73.2/params/column.count.body.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/column.count.body.xml rename to tools/docbook-xsl-1.73.2/params/column.count.body.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/column.count.front.xml b/tools/docbook-xsl-1.73.2/params/column.count.front.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/column.count.front.xml rename to tools/docbook-xsl-1.73.2/params/column.count.front.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/column.count.index.xml b/tools/docbook-xsl-1.73.2/params/column.count.index.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/column.count.index.xml rename to tools/docbook-xsl-1.73.2/params/column.count.index.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/column.count.lot.xml b/tools/docbook-xsl-1.73.2/params/column.count.lot.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/column.count.lot.xml rename to tools/docbook-xsl-1.73.2/params/column.count.lot.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/column.count.titlepage.xml b/tools/docbook-xsl-1.73.2/params/column.count.titlepage.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/column.count.titlepage.xml rename to tools/docbook-xsl-1.73.2/params/column.count.titlepage.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/column.gap.back.xml b/tools/docbook-xsl-1.73.2/params/column.gap.back.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/column.gap.back.xml rename to tools/docbook-xsl-1.73.2/params/column.gap.back.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/column.gap.body.xml b/tools/docbook-xsl-1.73.2/params/column.gap.body.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/column.gap.body.xml rename to tools/docbook-xsl-1.73.2/params/column.gap.body.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/column.gap.front.xml b/tools/docbook-xsl-1.73.2/params/column.gap.front.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/column.gap.front.xml rename to tools/docbook-xsl-1.73.2/params/column.gap.front.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/column.gap.index.xml b/tools/docbook-xsl-1.73.2/params/column.gap.index.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/column.gap.index.xml rename to tools/docbook-xsl-1.73.2/params/column.gap.index.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/column.gap.lot.xml b/tools/docbook-xsl-1.73.2/params/column.gap.lot.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/column.gap.lot.xml rename to tools/docbook-xsl-1.73.2/params/column.gap.lot.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/column.gap.titlepage.xml b/tools/docbook-xsl-1.73.2/params/column.gap.titlepage.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/column.gap.titlepage.xml rename to tools/docbook-xsl-1.73.2/params/column.gap.titlepage.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/compact.list.item.spacing.xml b/tools/docbook-xsl-1.73.2/params/compact.list.item.spacing.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/compact.list.item.spacing.xml rename to tools/docbook-xsl-1.73.2/params/compact.list.item.spacing.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/component.label.includes.part.label.xml b/tools/docbook-xsl-1.73.2/params/component.label.includes.part.label.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/component.label.includes.part.label.xml rename to tools/docbook-xsl-1.73.2/params/component.label.includes.part.label.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/component.title.properties.xml b/tools/docbook-xsl-1.73.2/params/component.title.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/component.title.properties.xml rename to tools/docbook-xsl-1.73.2/params/component.title.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/component.titlepage.properties.xml b/tools/docbook-xsl-1.73.2/params/component.titlepage.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/component.titlepage.properties.xml rename to tools/docbook-xsl-1.73.2/params/component.titlepage.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/contrib.inline.enabled.xml b/tools/docbook-xsl-1.73.2/params/contrib.inline.enabled.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/contrib.inline.enabled.xml rename to tools/docbook-xsl-1.73.2/params/contrib.inline.enabled.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/crop.mark.bleed.xml b/tools/docbook-xsl-1.73.2/params/crop.mark.bleed.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/crop.mark.bleed.xml rename to tools/docbook-xsl-1.73.2/params/crop.mark.bleed.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/crop.mark.offset.xml b/tools/docbook-xsl-1.73.2/params/crop.mark.offset.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/crop.mark.offset.xml rename to tools/docbook-xsl-1.73.2/params/crop.mark.offset.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/crop.mark.width.xml b/tools/docbook-xsl-1.73.2/params/crop.mark.width.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/crop.mark.width.xml rename to tools/docbook-xsl-1.73.2/params/crop.mark.width.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/crop.marks.xml b/tools/docbook-xsl-1.73.2/params/crop.marks.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/crop.marks.xml rename to tools/docbook-xsl-1.73.2/params/crop.marks.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/css.decoration.xml b/tools/docbook-xsl-1.73.2/params/css.decoration.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/css.decoration.xml rename to tools/docbook-xsl-1.73.2/params/css.decoration.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/css.stylesheet.dir.xml b/tools/docbook-xsl-1.73.2/params/css.stylesheet.dir.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/css.stylesheet.dir.xml rename to tools/docbook-xsl-1.73.2/params/css.stylesheet.dir.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/css.stylesheet.xml b/tools/docbook-xsl-1.73.2/params/css.stylesheet.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/css.stylesheet.xml rename to tools/docbook-xsl-1.73.2/params/css.stylesheet.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/current.docid.xml b/tools/docbook-xsl-1.73.2/params/current.docid.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/current.docid.xml rename to tools/docbook-xsl-1.73.2/params/current.docid.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/currentpage.marker.xml b/tools/docbook-xsl-1.73.2/params/currentpage.marker.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/currentpage.marker.xml rename to tools/docbook-xsl-1.73.2/params/currentpage.marker.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/default.float.class.xml b/tools/docbook-xsl-1.73.2/params/default.float.class.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/default.float.class.xml rename to tools/docbook-xsl-1.73.2/params/default.float.class.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/default.image.width.xml b/tools/docbook-xsl-1.73.2/params/default.image.width.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/default.image.width.xml rename to tools/docbook-xsl-1.73.2/params/default.image.width.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/default.table.frame.xml b/tools/docbook-xsl-1.73.2/params/default.table.frame.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/default.table.frame.xml rename to tools/docbook-xsl-1.73.2/params/default.table.frame.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/default.table.width.xml b/tools/docbook-xsl-1.73.2/params/default.table.width.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/default.table.width.xml rename to tools/docbook-xsl-1.73.2/params/default.table.width.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/default.units.xml b/tools/docbook-xsl-1.73.2/params/default.units.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/default.units.xml rename to tools/docbook-xsl-1.73.2/params/default.units.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/dingbat.font.family.xml b/tools/docbook-xsl-1.73.2/params/dingbat.font.family.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/dingbat.font.family.xml rename to tools/docbook-xsl-1.73.2/params/dingbat.font.family.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/double.sided.xml b/tools/docbook-xsl-1.73.2/params/double.sided.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/double.sided.xml rename to tools/docbook-xsl-1.73.2/params/double.sided.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/draft.mode.xml b/tools/docbook-xsl-1.73.2/params/draft.mode.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/draft.mode.xml rename to tools/docbook-xsl-1.73.2/params/draft.mode.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/draft.watermark.image.xml b/tools/docbook-xsl-1.73.2/params/draft.watermark.image.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/draft.watermark.image.xml rename to tools/docbook-xsl-1.73.2/params/draft.watermark.image.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/dry-run.xml b/tools/docbook-xsl-1.73.2/params/dry-run.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/dry-run.xml rename to tools/docbook-xsl-1.73.2/params/dry-run.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/dynamic.toc.xml b/tools/docbook-xsl-1.73.2/params/dynamic.toc.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/dynamic.toc.xml rename to tools/docbook-xsl-1.73.2/params/dynamic.toc.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/ebnf.assignment.xml b/tools/docbook-xsl-1.73.2/params/ebnf.assignment.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/ebnf.assignment.xml rename to tools/docbook-xsl-1.73.2/params/ebnf.assignment.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/ebnf.statement.terminator.xml b/tools/docbook-xsl-1.73.2/params/ebnf.statement.terminator.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/ebnf.statement.terminator.xml rename to tools/docbook-xsl-1.73.2/params/ebnf.statement.terminator.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/ebnf.table.bgcolor.xml b/tools/docbook-xsl-1.73.2/params/ebnf.table.bgcolor.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/ebnf.table.bgcolor.xml rename to tools/docbook-xsl-1.73.2/params/ebnf.table.bgcolor.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/ebnf.table.border.xml b/tools/docbook-xsl-1.73.2/params/ebnf.table.border.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/ebnf.table.border.xml rename to tools/docbook-xsl-1.73.2/params/ebnf.table.border.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/eclipse.autolabel.xml b/tools/docbook-xsl-1.73.2/params/eclipse.autolabel.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/eclipse.autolabel.xml rename to tools/docbook-xsl-1.73.2/params/eclipse.autolabel.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/eclipse.plugin.id.xml b/tools/docbook-xsl-1.73.2/params/eclipse.plugin.id.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/eclipse.plugin.id.xml rename to tools/docbook-xsl-1.73.2/params/eclipse.plugin.id.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/eclipse.plugin.name.xml b/tools/docbook-xsl-1.73.2/params/eclipse.plugin.name.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/eclipse.plugin.name.xml rename to tools/docbook-xsl-1.73.2/params/eclipse.plugin.name.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/eclipse.plugin.provider.xml b/tools/docbook-xsl-1.73.2/params/eclipse.plugin.provider.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/eclipse.plugin.provider.xml rename to tools/docbook-xsl-1.73.2/params/eclipse.plugin.provider.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/editedby.enabled.xml b/tools/docbook-xsl-1.73.2/params/editedby.enabled.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/editedby.enabled.xml rename to tools/docbook-xsl-1.73.2/params/editedby.enabled.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/email.delimiters.enabled.xml b/tools/docbook-xsl-1.73.2/params/email.delimiters.enabled.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/email.delimiters.enabled.xml rename to tools/docbook-xsl-1.73.2/params/email.delimiters.enabled.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/emphasis.propagates.style.xml b/tools/docbook-xsl-1.73.2/params/emphasis.propagates.style.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/emphasis.propagates.style.xml rename to tools/docbook-xsl-1.73.2/params/emphasis.propagates.style.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/entry.propagates.style.xml b/tools/docbook-xsl-1.73.2/params/entry.propagates.style.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/entry.propagates.style.xml rename to tools/docbook-xsl-1.73.2/params/entry.propagates.style.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/equation.properties.xml b/tools/docbook-xsl-1.73.2/params/equation.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/equation.properties.xml rename to tools/docbook-xsl-1.73.2/params/equation.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/example.properties.xml b/tools/docbook-xsl-1.73.2/params/example.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/example.properties.xml rename to tools/docbook-xsl-1.73.2/params/example.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/feedback.href.xml b/tools/docbook-xsl-1.73.2/params/feedback.href.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/feedback.href.xml rename to tools/docbook-xsl-1.73.2/params/feedback.href.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/feedback.link.text.xml b/tools/docbook-xsl-1.73.2/params/feedback.link.text.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/feedback.link.text.xml rename to tools/docbook-xsl-1.73.2/params/feedback.link.text.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/feedback.with.ids.xml b/tools/docbook-xsl-1.73.2/params/feedback.with.ids.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/feedback.with.ids.xml rename to tools/docbook-xsl-1.73.2/params/feedback.with.ids.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/figure.properties.xml b/tools/docbook-xsl-1.73.2/params/figure.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/figure.properties.xml rename to tools/docbook-xsl-1.73.2/params/figure.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/filename-prefix.xml b/tools/docbook-xsl-1.73.2/params/filename-prefix.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/filename-prefix.xml rename to tools/docbook-xsl-1.73.2/params/filename-prefix.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/firstterm.only.link.xml b/tools/docbook-xsl-1.73.2/params/firstterm.only.link.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/firstterm.only.link.xml rename to tools/docbook-xsl-1.73.2/params/firstterm.only.link.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/foil.properties.xml b/tools/docbook-xsl-1.73.2/params/foil.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/foil.properties.xml rename to tools/docbook-xsl-1.73.2/params/foil.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/foil.subtitle.properties.xml b/tools/docbook-xsl-1.73.2/params/foil.subtitle.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/foil.subtitle.properties.xml rename to tools/docbook-xsl-1.73.2/params/foil.subtitle.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/foil.title.master.xml b/tools/docbook-xsl-1.73.2/params/foil.title.master.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/foil.title.master.xml rename to tools/docbook-xsl-1.73.2/params/foil.title.master.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/foil.title.size.xml b/tools/docbook-xsl-1.73.2/params/foil.title.size.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/foil.title.size.xml rename to tools/docbook-xsl-1.73.2/params/foil.title.size.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/foilgroup.properties.xml b/tools/docbook-xsl-1.73.2/params/foilgroup.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/foilgroup.properties.xml rename to tools/docbook-xsl-1.73.2/params/foilgroup.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/foilgroup.toc.xml b/tools/docbook-xsl-1.73.2/params/foilgroup.toc.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/foilgroup.toc.xml rename to tools/docbook-xsl-1.73.2/params/foilgroup.toc.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/footer.column.widths.xml b/tools/docbook-xsl-1.73.2/params/footer.column.widths.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/footer.column.widths.xml rename to tools/docbook-xsl-1.73.2/params/footer.column.widths.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/footer.content.properties.xml b/tools/docbook-xsl-1.73.2/params/footer.content.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/footer.content.properties.xml rename to tools/docbook-xsl-1.73.2/params/footer.content.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/footer.hr.xml b/tools/docbook-xsl-1.73.2/params/footer.hr.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/footer.hr.xml rename to tools/docbook-xsl-1.73.2/params/footer.hr.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/footer.rule.xml b/tools/docbook-xsl-1.73.2/params/footer.rule.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/footer.rule.xml rename to tools/docbook-xsl-1.73.2/params/footer.rule.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/footer.table.height.xml b/tools/docbook-xsl-1.73.2/params/footer.table.height.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/footer.table.height.xml rename to tools/docbook-xsl-1.73.2/params/footer.table.height.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/footer.table.properties.xml b/tools/docbook-xsl-1.73.2/params/footer.table.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/footer.table.properties.xml rename to tools/docbook-xsl-1.73.2/params/footer.table.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/footers.on.blank.pages.xml b/tools/docbook-xsl-1.73.2/params/footers.on.blank.pages.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/footers.on.blank.pages.xml rename to tools/docbook-xsl-1.73.2/params/footers.on.blank.pages.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/footnote.font.size.xml b/tools/docbook-xsl-1.73.2/params/footnote.font.size.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/footnote.font.size.xml rename to tools/docbook-xsl-1.73.2/params/footnote.font.size.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/footnote.mark.properties.xml b/tools/docbook-xsl-1.73.2/params/footnote.mark.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/footnote.mark.properties.xml rename to tools/docbook-xsl-1.73.2/params/footnote.mark.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/footnote.number.format.xml b/tools/docbook-xsl-1.73.2/params/footnote.number.format.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/footnote.number.format.xml rename to tools/docbook-xsl-1.73.2/params/footnote.number.format.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/footnote.number.symbols.xml b/tools/docbook-xsl-1.73.2/params/footnote.number.symbols.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/footnote.number.symbols.xml rename to tools/docbook-xsl-1.73.2/params/footnote.number.symbols.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/footnote.properties.xml b/tools/docbook-xsl-1.73.2/params/footnote.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/footnote.properties.xml rename to tools/docbook-xsl-1.73.2/params/footnote.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/footnote.sep.leader.properties.xml b/tools/docbook-xsl-1.73.2/params/footnote.sep.leader.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/footnote.sep.leader.properties.xml rename to tools/docbook-xsl-1.73.2/params/footnote.sep.leader.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/fop.extensions.xml b/tools/docbook-xsl-1.73.2/params/fop.extensions.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/fop.extensions.xml rename to tools/docbook-xsl-1.73.2/params/fop.extensions.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/fop1.extensions.xml b/tools/docbook-xsl-1.73.2/params/fop1.extensions.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/fop1.extensions.xml rename to tools/docbook-xsl-1.73.2/params/fop1.extensions.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/formal.object.properties.xml b/tools/docbook-xsl-1.73.2/params/formal.object.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/formal.object.properties.xml rename to tools/docbook-xsl-1.73.2/params/formal.object.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/formal.procedures.xml b/tools/docbook-xsl-1.73.2/params/formal.procedures.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/formal.procedures.xml rename to tools/docbook-xsl-1.73.2/params/formal.procedures.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/formal.title.placement.xml b/tools/docbook-xsl-1.73.2/params/formal.title.placement.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/formal.title.placement.xml rename to tools/docbook-xsl-1.73.2/params/formal.title.placement.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/formal.title.properties.xml b/tools/docbook-xsl-1.73.2/params/formal.title.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/formal.title.properties.xml rename to tools/docbook-xsl-1.73.2/params/formal.title.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/funcsynopsis.decoration.xml b/tools/docbook-xsl-1.73.2/params/funcsynopsis.decoration.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/funcsynopsis.decoration.xml rename to tools/docbook-xsl-1.73.2/params/funcsynopsis.decoration.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/funcsynopsis.style.xml b/tools/docbook-xsl-1.73.2/params/funcsynopsis.style.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/funcsynopsis.style.xml rename to tools/docbook-xsl-1.73.2/params/funcsynopsis.style.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/funcsynopsis.tabular.threshold.xml b/tools/docbook-xsl-1.73.2/params/funcsynopsis.tabular.threshold.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/funcsynopsis.tabular.threshold.xml rename to tools/docbook-xsl-1.73.2/params/funcsynopsis.tabular.threshold.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/function.parens.xml b/tools/docbook-xsl-1.73.2/params/function.parens.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/function.parens.xml rename to tools/docbook-xsl-1.73.2/params/function.parens.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/generate.id.attributes.xml b/tools/docbook-xsl-1.73.2/params/generate.id.attributes.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/generate.id.attributes.xml rename to tools/docbook-xsl-1.73.2/params/generate.id.attributes.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/generate.index.xml b/tools/docbook-xsl-1.73.2/params/generate.index.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/generate.index.xml rename to tools/docbook-xsl-1.73.2/params/generate.index.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/generate.legalnotice.link.xml b/tools/docbook-xsl-1.73.2/params/generate.legalnotice.link.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/generate.legalnotice.link.xml rename to tools/docbook-xsl-1.73.2/params/generate.legalnotice.link.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/generate.manifest.xml b/tools/docbook-xsl-1.73.2/params/generate.manifest.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/generate.manifest.xml rename to tools/docbook-xsl-1.73.2/params/generate.manifest.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/generate.meta.abstract.xml b/tools/docbook-xsl-1.73.2/params/generate.meta.abstract.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/generate.meta.abstract.xml rename to tools/docbook-xsl-1.73.2/params/generate.meta.abstract.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/generate.revhistory.link.xml b/tools/docbook-xsl-1.73.2/params/generate.revhistory.link.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/generate.revhistory.link.xml rename to tools/docbook-xsl-1.73.2/params/generate.revhistory.link.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/generate.section.toc.level.xml b/tools/docbook-xsl-1.73.2/params/generate.section.toc.level.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/generate.section.toc.level.xml rename to tools/docbook-xsl-1.73.2/params/generate.section.toc.level.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/generate.toc.xml b/tools/docbook-xsl-1.73.2/params/generate.toc.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/generate.toc.xml rename to tools/docbook-xsl-1.73.2/params/generate.toc.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/glossary.as.blocks.xml b/tools/docbook-xsl-1.73.2/params/glossary.as.blocks.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/glossary.as.blocks.xml rename to tools/docbook-xsl-1.73.2/params/glossary.as.blocks.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/glossary.collection.xml b/tools/docbook-xsl-1.73.2/params/glossary.collection.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/glossary.collection.xml rename to tools/docbook-xsl-1.73.2/params/glossary.collection.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/glossary.sort.xml b/tools/docbook-xsl-1.73.2/params/glossary.sort.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/glossary.sort.xml rename to tools/docbook-xsl-1.73.2/params/glossary.sort.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/glossentry.show.acronym.xml b/tools/docbook-xsl-1.73.2/params/glossentry.show.acronym.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/glossentry.show.acronym.xml rename to tools/docbook-xsl-1.73.2/params/glossentry.show.acronym.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/glosslist.as.blocks.xml b/tools/docbook-xsl-1.73.2/params/glosslist.as.blocks.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/glosslist.as.blocks.xml rename to tools/docbook-xsl-1.73.2/params/glosslist.as.blocks.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/glossterm.auto.link.xml b/tools/docbook-xsl-1.73.2/params/glossterm.auto.link.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/glossterm.auto.link.xml rename to tools/docbook-xsl-1.73.2/params/glossterm.auto.link.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/glossterm.separation.xml b/tools/docbook-xsl-1.73.2/params/glossterm.separation.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/glossterm.separation.xml rename to tools/docbook-xsl-1.73.2/params/glossterm.separation.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/glossterm.width.xml b/tools/docbook-xsl-1.73.2/params/glossterm.width.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/glossterm.width.xml rename to tools/docbook-xsl-1.73.2/params/glossterm.width.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/graphic.default.extension.xml b/tools/docbook-xsl-1.73.2/params/graphic.default.extension.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/graphic.default.extension.xml rename to tools/docbook-xsl-1.73.2/params/graphic.default.extension.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/graphical.admonition.properties.xml b/tools/docbook-xsl-1.73.2/params/graphical.admonition.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/graphical.admonition.properties.xml rename to tools/docbook-xsl-1.73.2/params/graphical.admonition.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/graphics.dir.xml b/tools/docbook-xsl-1.73.2/params/graphics.dir.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/graphics.dir.xml rename to tools/docbook-xsl-1.73.2/params/graphics.dir.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/graphicsize.extension.xml b/tools/docbook-xsl-1.73.2/params/graphicsize.extension.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/graphicsize.extension.xml rename to tools/docbook-xsl-1.73.2/params/graphicsize.extension.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/graphicsize.use.img.src.path.xml b/tools/docbook-xsl-1.73.2/params/graphicsize.use.img.src.path.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/graphicsize.use.img.src.path.xml rename to tools/docbook-xsl-1.73.2/params/graphicsize.use.img.src.path.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/header.column.widths.xml b/tools/docbook-xsl-1.73.2/params/header.column.widths.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/header.column.widths.xml rename to tools/docbook-xsl-1.73.2/params/header.column.widths.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/header.content.properties.xml b/tools/docbook-xsl-1.73.2/params/header.content.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/header.content.properties.xml rename to tools/docbook-xsl-1.73.2/params/header.content.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/header.hr.xml b/tools/docbook-xsl-1.73.2/params/header.hr.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/header.hr.xml rename to tools/docbook-xsl-1.73.2/params/header.hr.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/header.rule.xml b/tools/docbook-xsl-1.73.2/params/header.rule.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/header.rule.xml rename to tools/docbook-xsl-1.73.2/params/header.rule.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/header.table.height.xml b/tools/docbook-xsl-1.73.2/params/header.table.height.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/header.table.height.xml rename to tools/docbook-xsl-1.73.2/params/header.table.height.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/header.table.properties.xml b/tools/docbook-xsl-1.73.2/params/header.table.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/header.table.properties.xml rename to tools/docbook-xsl-1.73.2/params/header.table.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/headers.on.blank.pages.xml b/tools/docbook-xsl-1.73.2/params/headers.on.blank.pages.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/headers.on.blank.pages.xml rename to tools/docbook-xsl-1.73.2/params/headers.on.blank.pages.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/hidetoc.image.xml b/tools/docbook-xsl-1.73.2/params/hidetoc.image.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/hidetoc.image.xml rename to tools/docbook-xsl-1.73.2/params/hidetoc.image.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/highlight.default.language.xml b/tools/docbook-xsl-1.73.2/params/highlight.default.language.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/highlight.default.language.xml rename to tools/docbook-xsl-1.73.2/params/highlight.default.language.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/highlight.source.xml b/tools/docbook-xsl-1.73.2/params/highlight.source.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/highlight.source.xml rename to tools/docbook-xsl-1.73.2/params/highlight.source.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/home.image.xml b/tools/docbook-xsl-1.73.2/params/home.image.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/home.image.xml rename to tools/docbook-xsl-1.73.2/params/home.image.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/html.append.xml b/tools/docbook-xsl-1.73.2/params/html.append.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/html.append.xml rename to tools/docbook-xsl-1.73.2/params/html.append.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/html.base.xml b/tools/docbook-xsl-1.73.2/params/html.base.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/html.base.xml rename to tools/docbook-xsl-1.73.2/params/html.base.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/html.cellpadding.xml b/tools/docbook-xsl-1.73.2/params/html.cellpadding.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/html.cellpadding.xml rename to tools/docbook-xsl-1.73.2/params/html.cellpadding.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/html.cellspacing.xml b/tools/docbook-xsl-1.73.2/params/html.cellspacing.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/html.cellspacing.xml rename to tools/docbook-xsl-1.73.2/params/html.cellspacing.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/html.cleanup.xml b/tools/docbook-xsl-1.73.2/params/html.cleanup.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/html.cleanup.xml rename to tools/docbook-xsl-1.73.2/params/html.cleanup.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/html.ext.xml b/tools/docbook-xsl-1.73.2/params/html.ext.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/html.ext.xml rename to tools/docbook-xsl-1.73.2/params/html.ext.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/html.extra.head.links.xml b/tools/docbook-xsl-1.73.2/params/html.extra.head.links.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/html.extra.head.links.xml rename to tools/docbook-xsl-1.73.2/params/html.extra.head.links.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/html.head.legalnotice.link.multiple.xml b/tools/docbook-xsl-1.73.2/params/html.head.legalnotice.link.multiple.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/html.head.legalnotice.link.multiple.xml rename to tools/docbook-xsl-1.73.2/params/html.head.legalnotice.link.multiple.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/html.head.legalnotice.link.types.xml b/tools/docbook-xsl-1.73.2/params/html.head.legalnotice.link.types.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/html.head.legalnotice.link.types.xml rename to tools/docbook-xsl-1.73.2/params/html.head.legalnotice.link.types.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/html.longdesc.link.xml b/tools/docbook-xsl-1.73.2/params/html.longdesc.link.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/html.longdesc.link.xml rename to tools/docbook-xsl-1.73.2/params/html.longdesc.link.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/html.longdesc.xml b/tools/docbook-xsl-1.73.2/params/html.longdesc.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/html.longdesc.xml rename to tools/docbook-xsl-1.73.2/params/html.longdesc.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/html.stylesheet.type.xml b/tools/docbook-xsl-1.73.2/params/html.stylesheet.type.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/html.stylesheet.type.xml rename to tools/docbook-xsl-1.73.2/params/html.stylesheet.type.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/html.stylesheet.xml b/tools/docbook-xsl-1.73.2/params/html.stylesheet.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/html.stylesheet.xml rename to tools/docbook-xsl-1.73.2/params/html.stylesheet.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.alias.file.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.alias.file.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.alias.file.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.alias.file.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.autolabel.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.autolabel.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.autolabel.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.autolabel.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.back.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.button.back.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.back.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.button.back.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.forward.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.button.forward.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.forward.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.button.forward.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.hideshow.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.button.hideshow.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.hideshow.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.button.hideshow.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.home.url.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.button.home.url.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.home.url.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.button.home.url.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.home.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.button.home.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.home.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.button.home.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.jump1.title.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.button.jump1.title.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.jump1.title.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.button.jump1.title.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.jump1.url.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.button.jump1.url.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.jump1.url.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.button.jump1.url.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.jump1.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.button.jump1.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.jump1.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.button.jump1.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.jump2.title.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.button.jump2.title.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.jump2.title.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.button.jump2.title.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.jump2.url.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.button.jump2.url.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.jump2.url.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.button.jump2.url.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.jump2.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.button.jump2.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.jump2.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.button.jump2.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.locate.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.button.locate.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.locate.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.button.locate.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.next.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.button.next.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.next.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.button.next.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.options.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.button.options.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.options.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.button.options.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.prev.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.button.prev.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.prev.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.button.prev.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.print.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.button.print.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.print.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.button.print.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.refresh.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.button.refresh.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.refresh.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.button.refresh.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.stop.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.button.stop.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.stop.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.button.stop.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.zoom.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.button.zoom.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.button.zoom.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.button.zoom.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.chm.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.chm.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.chm.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.chm.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.default.topic.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.default.topic.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.default.topic.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.default.topic.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.display.progress.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.display.progress.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.display.progress.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.display.progress.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.encoding.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.encoding.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.encoding.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.encoding.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.enhanced.decompilation.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.enhanced.decompilation.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.enhanced.decompilation.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.enhanced.decompilation.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.enumerate.images.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.enumerate.images.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.enumerate.images.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.enumerate.images.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.force.map.and.alias.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.force.map.and.alias.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.force.map.and.alias.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.force.map.and.alias.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.hhc.binary.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.hhc.binary.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.hhc.binary.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.hhc.binary.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.hhc.folders.instead.books.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.hhc.folders.instead.books.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.hhc.folders.instead.books.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.hhc.folders.instead.books.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.hhc.section.depth.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.hhc.section.depth.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.hhc.section.depth.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.hhc.section.depth.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.hhc.show.root.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.hhc.show.root.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.hhc.show.root.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.hhc.show.root.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.hhc.width.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.hhc.width.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.hhc.width.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.hhc.width.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.hhc.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.hhc.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.hhc.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.hhc.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.hhk.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.hhk.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.hhk.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.hhk.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.hhp.tail.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.hhp.tail.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.hhp.tail.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.hhp.tail.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.hhp.window.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.hhp.window.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.hhp.window.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.hhp.window.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.hhp.windows.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.hhp.windows.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.hhp.windows.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.hhp.windows.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.hhp.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.hhp.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.hhp.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.hhp.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.map.file.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.map.file.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.map.file.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.map.file.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.only.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.only.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.only.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.only.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.remember.window.position.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.remember.window.position.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.remember.window.position.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.remember.window.position.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.show.advanced.search.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.show.advanced.search.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.show.advanced.search.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.show.advanced.search.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.show.favorities.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.show.favorities.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.show.favorities.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.show.favorities.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.show.menu.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.show.menu.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.show.menu.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.show.menu.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.show.toolbar.text.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.show.toolbar.text.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.show.toolbar.text.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.show.toolbar.text.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.title.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.title.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.title.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.title.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.use.hhk.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.use.hhk.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.use.hhk.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.use.hhk.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.window.geometry.xml b/tools/docbook-xsl-1.73.2/params/htmlhelp.window.geometry.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/htmlhelp.window.geometry.xml rename to tools/docbook-xsl-1.73.2/params/htmlhelp.window.geometry.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/hyphenate.verbatim.characters.xml b/tools/docbook-xsl-1.73.2/params/hyphenate.verbatim.characters.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/hyphenate.verbatim.characters.xml rename to tools/docbook-xsl-1.73.2/params/hyphenate.verbatim.characters.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/hyphenate.verbatim.xml b/tools/docbook-xsl-1.73.2/params/hyphenate.verbatim.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/hyphenate.verbatim.xml rename to tools/docbook-xsl-1.73.2/params/hyphenate.verbatim.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/hyphenate.xml b/tools/docbook-xsl-1.73.2/params/hyphenate.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/hyphenate.xml rename to tools/docbook-xsl-1.73.2/params/hyphenate.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/id.warnings.xml b/tools/docbook-xsl-1.73.2/params/id.warnings.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/id.warnings.xml rename to tools/docbook-xsl-1.73.2/params/id.warnings.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/ignore.image.scaling.xml b/tools/docbook-xsl-1.73.2/params/ignore.image.scaling.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/ignore.image.scaling.xml rename to tools/docbook-xsl-1.73.2/params/ignore.image.scaling.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/img.src.path.xml b/tools/docbook-xsl-1.73.2/params/img.src.path.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/img.src.path.xml rename to tools/docbook-xsl-1.73.2/params/img.src.path.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/index.div.title.properties.xml b/tools/docbook-xsl-1.73.2/params/index.div.title.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/index.div.title.properties.xml rename to tools/docbook-xsl-1.73.2/params/index.div.title.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/index.entry.properties.xml b/tools/docbook-xsl-1.73.2/params/index.entry.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/index.entry.properties.xml rename to tools/docbook-xsl-1.73.2/params/index.entry.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/index.method.xml b/tools/docbook-xsl-1.73.2/params/index.method.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/index.method.xml rename to tools/docbook-xsl-1.73.2/params/index.method.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/index.number.separator.xml b/tools/docbook-xsl-1.73.2/params/index.number.separator.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/index.number.separator.xml rename to tools/docbook-xsl-1.73.2/params/index.number.separator.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/index.on.role.xml b/tools/docbook-xsl-1.73.2/params/index.on.role.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/index.on.role.xml rename to tools/docbook-xsl-1.73.2/params/index.on.role.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/index.on.type.xml b/tools/docbook-xsl-1.73.2/params/index.on.type.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/index.on.type.xml rename to tools/docbook-xsl-1.73.2/params/index.on.type.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/index.page.number.properties.xml b/tools/docbook-xsl-1.73.2/params/index.page.number.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/index.page.number.properties.xml rename to tools/docbook-xsl-1.73.2/params/index.page.number.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/index.prefer.titleabbrev.xml b/tools/docbook-xsl-1.73.2/params/index.prefer.titleabbrev.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/index.prefer.titleabbrev.xml rename to tools/docbook-xsl-1.73.2/params/index.prefer.titleabbrev.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/index.preferred.page.properties.xml b/tools/docbook-xsl-1.73.2/params/index.preferred.page.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/index.preferred.page.properties.xml rename to tools/docbook-xsl-1.73.2/params/index.preferred.page.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/index.range.separator.xml b/tools/docbook-xsl-1.73.2/params/index.range.separator.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/index.range.separator.xml rename to tools/docbook-xsl-1.73.2/params/index.range.separator.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/index.term.separator.xml b/tools/docbook-xsl-1.73.2/params/index.term.separator.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/index.term.separator.xml rename to tools/docbook-xsl-1.73.2/params/index.term.separator.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/informal.object.properties.xml b/tools/docbook-xsl-1.73.2/params/informal.object.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/informal.object.properties.xml rename to tools/docbook-xsl-1.73.2/params/informal.object.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/informalequation.properties.xml b/tools/docbook-xsl-1.73.2/params/informalequation.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/informalequation.properties.xml rename to tools/docbook-xsl-1.73.2/params/informalequation.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/informalexample.properties.xml b/tools/docbook-xsl-1.73.2/params/informalexample.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/informalexample.properties.xml rename to tools/docbook-xsl-1.73.2/params/informalexample.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/informalfigure.properties.xml b/tools/docbook-xsl-1.73.2/params/informalfigure.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/informalfigure.properties.xml rename to tools/docbook-xsl-1.73.2/params/informalfigure.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/informaltable.properties.xml b/tools/docbook-xsl-1.73.2/params/informaltable.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/informaltable.properties.xml rename to tools/docbook-xsl-1.73.2/params/informaltable.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/inherit.keywords.xml b/tools/docbook-xsl-1.73.2/params/inherit.keywords.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/inherit.keywords.xml rename to tools/docbook-xsl-1.73.2/params/inherit.keywords.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/insert.link.page.number.xml b/tools/docbook-xsl-1.73.2/params/insert.link.page.number.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/insert.link.page.number.xml rename to tools/docbook-xsl-1.73.2/params/insert.link.page.number.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/insert.olink.page.number.xml b/tools/docbook-xsl-1.73.2/params/insert.olink.page.number.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/insert.olink.page.number.xml rename to tools/docbook-xsl-1.73.2/params/insert.olink.page.number.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/insert.olink.pdf.frag.xml b/tools/docbook-xsl-1.73.2/params/insert.olink.pdf.frag.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/insert.olink.pdf.frag.xml rename to tools/docbook-xsl-1.73.2/params/insert.olink.pdf.frag.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/insert.xref.page.number.xml b/tools/docbook-xsl-1.73.2/params/insert.xref.page.number.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/insert.xref.page.number.xml rename to tools/docbook-xsl-1.73.2/params/insert.xref.page.number.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/itemizedlist.label.properties.xml b/tools/docbook-xsl-1.73.2/params/itemizedlist.label.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/itemizedlist.label.properties.xml rename to tools/docbook-xsl-1.73.2/params/itemizedlist.label.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/itemizedlist.label.width.xml b/tools/docbook-xsl-1.73.2/params/itemizedlist.label.width.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/itemizedlist.label.width.xml rename to tools/docbook-xsl-1.73.2/params/itemizedlist.label.width.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/itemizedlist.properties.xml b/tools/docbook-xsl-1.73.2/params/itemizedlist.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/itemizedlist.properties.xml rename to tools/docbook-xsl-1.73.2/params/itemizedlist.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/javahelp.encoding.xml b/tools/docbook-xsl-1.73.2/params/javahelp.encoding.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/javahelp.encoding.xml rename to tools/docbook-xsl-1.73.2/params/javahelp.encoding.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/keep.relative.image.uris.xml b/tools/docbook-xsl-1.73.2/params/keep.relative.image.uris.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/keep.relative.image.uris.xml rename to tools/docbook-xsl-1.73.2/params/keep.relative.image.uris.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/keyboard.nav.xml b/tools/docbook-xsl-1.73.2/params/keyboard.nav.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/keyboard.nav.xml rename to tools/docbook-xsl-1.73.2/params/keyboard.nav.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/l10n.gentext.default.language.xml b/tools/docbook-xsl-1.73.2/params/l10n.gentext.default.language.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/l10n.gentext.default.language.xml rename to tools/docbook-xsl-1.73.2/params/l10n.gentext.default.language.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/l10n.gentext.language.xml b/tools/docbook-xsl-1.73.2/params/l10n.gentext.language.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/l10n.gentext.language.xml rename to tools/docbook-xsl-1.73.2/params/l10n.gentext.language.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/l10n.gentext.use.xref.language.xml b/tools/docbook-xsl-1.73.2/params/l10n.gentext.use.xref.language.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/l10n.gentext.use.xref.language.xml rename to tools/docbook-xsl-1.73.2/params/l10n.gentext.use.xref.language.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/l10n.lang.value.rfc.compliant.xml b/tools/docbook-xsl-1.73.2/params/l10n.lang.value.rfc.compliant.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/l10n.lang.value.rfc.compliant.xml rename to tools/docbook-xsl-1.73.2/params/l10n.lang.value.rfc.compliant.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/label.from.part.xml b/tools/docbook-xsl-1.73.2/params/label.from.part.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/label.from.part.xml rename to tools/docbook-xsl-1.73.2/params/label.from.part.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/line-height.xml b/tools/docbook-xsl-1.73.2/params/line-height.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/line-height.xml rename to tools/docbook-xsl-1.73.2/params/line-height.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/linenumbering.everyNth.xml b/tools/docbook-xsl-1.73.2/params/linenumbering.everyNth.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/linenumbering.everyNth.xml rename to tools/docbook-xsl-1.73.2/params/linenumbering.everyNth.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/linenumbering.extension.xml b/tools/docbook-xsl-1.73.2/params/linenumbering.extension.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/linenumbering.extension.xml rename to tools/docbook-xsl-1.73.2/params/linenumbering.extension.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/linenumbering.separator.xml b/tools/docbook-xsl-1.73.2/params/linenumbering.separator.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/linenumbering.separator.xml rename to tools/docbook-xsl-1.73.2/params/linenumbering.separator.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/linenumbering.width.xml b/tools/docbook-xsl-1.73.2/params/linenumbering.width.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/linenumbering.width.xml rename to tools/docbook-xsl-1.73.2/params/linenumbering.width.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/link.mailto.url.xml b/tools/docbook-xsl-1.73.2/params/link.mailto.url.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/link.mailto.url.xml rename to tools/docbook-xsl-1.73.2/params/link.mailto.url.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/list.block.properties.xml b/tools/docbook-xsl-1.73.2/params/list.block.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/list.block.properties.xml rename to tools/docbook-xsl-1.73.2/params/list.block.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/list.block.spacing.xml b/tools/docbook-xsl-1.73.2/params/list.block.spacing.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/list.block.spacing.xml rename to tools/docbook-xsl-1.73.2/params/list.block.spacing.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/list.item.spacing.xml b/tools/docbook-xsl-1.73.2/params/list.item.spacing.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/list.item.spacing.xml rename to tools/docbook-xsl-1.73.2/params/list.item.spacing.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/make.graphic.viewport.xml b/tools/docbook-xsl-1.73.2/params/make.graphic.viewport.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/make.graphic.viewport.xml rename to tools/docbook-xsl-1.73.2/params/make.graphic.viewport.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/make.index.markup.xml b/tools/docbook-xsl-1.73.2/params/make.index.markup.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/make.index.markup.xml rename to tools/docbook-xsl-1.73.2/params/make.index.markup.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/make.single.year.ranges.xml b/tools/docbook-xsl-1.73.2/params/make.single.year.ranges.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/make.single.year.ranges.xml rename to tools/docbook-xsl-1.73.2/params/make.single.year.ranges.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/make.valid.html.xml b/tools/docbook-xsl-1.73.2/params/make.valid.html.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/make.valid.html.xml rename to tools/docbook-xsl-1.73.2/params/make.valid.html.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/make.year.ranges.xml b/tools/docbook-xsl-1.73.2/params/make.year.ranges.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/make.year.ranges.xml rename to tools/docbook-xsl-1.73.2/params/make.year.ranges.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.authors.section.enabled.xml b/tools/docbook-xsl-1.73.2/params/man.authors.section.enabled.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.authors.section.enabled.xml rename to tools/docbook-xsl-1.73.2/params/man.authors.section.enabled.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.break.after.slash.xml b/tools/docbook-xsl-1.73.2/params/man.break.after.slash.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.break.after.slash.xml rename to tools/docbook-xsl-1.73.2/params/man.break.after.slash.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.charmap.enabled.xml b/tools/docbook-xsl-1.73.2/params/man.charmap.enabled.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.charmap.enabled.xml rename to tools/docbook-xsl-1.73.2/params/man.charmap.enabled.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.charmap.subset.profile.xml b/tools/docbook-xsl-1.73.2/params/man.charmap.subset.profile.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.charmap.subset.profile.xml rename to tools/docbook-xsl-1.73.2/params/man.charmap.subset.profile.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.charmap.uri.xml b/tools/docbook-xsl-1.73.2/params/man.charmap.uri.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.charmap.uri.xml rename to tools/docbook-xsl-1.73.2/params/man.charmap.uri.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.charmap.use.subset.xml b/tools/docbook-xsl-1.73.2/params/man.charmap.use.subset.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.charmap.use.subset.xml rename to tools/docbook-xsl-1.73.2/params/man.charmap.use.subset.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.copyright.section.enabled.xml b/tools/docbook-xsl-1.73.2/params/man.copyright.section.enabled.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.copyright.section.enabled.xml rename to tools/docbook-xsl-1.73.2/params/man.copyright.section.enabled.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.endnotes.are.numbered.xml b/tools/docbook-xsl-1.73.2/params/man.endnotes.are.numbered.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.endnotes.are.numbered.xml rename to tools/docbook-xsl-1.73.2/params/man.endnotes.are.numbered.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.endnotes.list.enabled.xml b/tools/docbook-xsl-1.73.2/params/man.endnotes.list.enabled.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.endnotes.list.enabled.xml rename to tools/docbook-xsl-1.73.2/params/man.endnotes.list.enabled.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.endnotes.list.heading.xml b/tools/docbook-xsl-1.73.2/params/man.endnotes.list.heading.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.endnotes.list.heading.xml rename to tools/docbook-xsl-1.73.2/params/man.endnotes.list.heading.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.font.funcprototype.xml b/tools/docbook-xsl-1.73.2/params/man.font.funcprototype.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.font.funcprototype.xml rename to tools/docbook-xsl-1.73.2/params/man.font.funcprototype.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.font.funcsynopsisinfo.xml b/tools/docbook-xsl-1.73.2/params/man.font.funcsynopsisinfo.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.font.funcsynopsisinfo.xml rename to tools/docbook-xsl-1.73.2/params/man.font.funcsynopsisinfo.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.font.table.headings.xml b/tools/docbook-xsl-1.73.2/params/man.font.table.headings.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.font.table.headings.xml rename to tools/docbook-xsl-1.73.2/params/man.font.table.headings.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.font.table.title.xml b/tools/docbook-xsl-1.73.2/params/man.font.table.title.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.font.table.title.xml rename to tools/docbook-xsl-1.73.2/params/man.font.table.title.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.hyphenate.computer.inlines.xml b/tools/docbook-xsl-1.73.2/params/man.hyphenate.computer.inlines.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.hyphenate.computer.inlines.xml rename to tools/docbook-xsl-1.73.2/params/man.hyphenate.computer.inlines.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.hyphenate.filenames.xml b/tools/docbook-xsl-1.73.2/params/man.hyphenate.filenames.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.hyphenate.filenames.xml rename to tools/docbook-xsl-1.73.2/params/man.hyphenate.filenames.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.hyphenate.urls.xml b/tools/docbook-xsl-1.73.2/params/man.hyphenate.urls.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.hyphenate.urls.xml rename to tools/docbook-xsl-1.73.2/params/man.hyphenate.urls.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.hyphenate.xml b/tools/docbook-xsl-1.73.2/params/man.hyphenate.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.hyphenate.xml rename to tools/docbook-xsl-1.73.2/params/man.hyphenate.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.indent.blurbs.xml b/tools/docbook-xsl-1.73.2/params/man.indent.blurbs.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.indent.blurbs.xml rename to tools/docbook-xsl-1.73.2/params/man.indent.blurbs.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.indent.lists.xml b/tools/docbook-xsl-1.73.2/params/man.indent.lists.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.indent.lists.xml rename to tools/docbook-xsl-1.73.2/params/man.indent.lists.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.indent.refsect.xml b/tools/docbook-xsl-1.73.2/params/man.indent.refsect.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.indent.refsect.xml rename to tools/docbook-xsl-1.73.2/params/man.indent.refsect.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.indent.verbatims.xml b/tools/docbook-xsl-1.73.2/params/man.indent.verbatims.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.indent.verbatims.xml rename to tools/docbook-xsl-1.73.2/params/man.indent.verbatims.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.indent.width.xml b/tools/docbook-xsl-1.73.2/params/man.indent.width.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.indent.width.xml rename to tools/docbook-xsl-1.73.2/params/man.indent.width.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.justify.xml b/tools/docbook-xsl-1.73.2/params/man.justify.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.justify.xml rename to tools/docbook-xsl-1.73.2/params/man.justify.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.links.are.underlined.xml b/tools/docbook-xsl-1.73.2/params/man.links.are.underlined.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.links.are.underlined.xml rename to tools/docbook-xsl-1.73.2/params/man.links.are.underlined.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.output.base.dir.xml b/tools/docbook-xsl-1.73.2/params/man.output.base.dir.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.output.base.dir.xml rename to tools/docbook-xsl-1.73.2/params/man.output.base.dir.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.output.encoding.xml b/tools/docbook-xsl-1.73.2/params/man.output.encoding.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.output.encoding.xml rename to tools/docbook-xsl-1.73.2/params/man.output.encoding.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.output.in.separate.dir.xml b/tools/docbook-xsl-1.73.2/params/man.output.in.separate.dir.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.output.in.separate.dir.xml rename to tools/docbook-xsl-1.73.2/params/man.output.in.separate.dir.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.output.lang.in.name.enabled.xml b/tools/docbook-xsl-1.73.2/params/man.output.lang.in.name.enabled.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.output.lang.in.name.enabled.xml rename to tools/docbook-xsl-1.73.2/params/man.output.lang.in.name.enabled.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.output.manifest.enabled.xml b/tools/docbook-xsl-1.73.2/params/man.output.manifest.enabled.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.output.manifest.enabled.xml rename to tools/docbook-xsl-1.73.2/params/man.output.manifest.enabled.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.output.manifest.filename.xml b/tools/docbook-xsl-1.73.2/params/man.output.manifest.filename.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.output.manifest.filename.xml rename to tools/docbook-xsl-1.73.2/params/man.output.manifest.filename.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.output.quietly.xml b/tools/docbook-xsl-1.73.2/params/man.output.quietly.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.output.quietly.xml rename to tools/docbook-xsl-1.73.2/params/man.output.quietly.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.output.subdirs.enabled.xml b/tools/docbook-xsl-1.73.2/params/man.output.subdirs.enabled.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.output.subdirs.enabled.xml rename to tools/docbook-xsl-1.73.2/params/man.output.subdirs.enabled.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.segtitle.suppress.xml b/tools/docbook-xsl-1.73.2/params/man.segtitle.suppress.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.segtitle.suppress.xml rename to tools/docbook-xsl-1.73.2/params/man.segtitle.suppress.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.string.subst.map.local.post.xml b/tools/docbook-xsl-1.73.2/params/man.string.subst.map.local.post.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.string.subst.map.local.post.xml rename to tools/docbook-xsl-1.73.2/params/man.string.subst.map.local.post.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.string.subst.map.local.pre.xml b/tools/docbook-xsl-1.73.2/params/man.string.subst.map.local.pre.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.string.subst.map.local.pre.xml rename to tools/docbook-xsl-1.73.2/params/man.string.subst.map.local.pre.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.string.subst.map.xml b/tools/docbook-xsl-1.73.2/params/man.string.subst.map.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.string.subst.map.xml rename to tools/docbook-xsl-1.73.2/params/man.string.subst.map.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.subheading.divider.enabled.xml b/tools/docbook-xsl-1.73.2/params/man.subheading.divider.enabled.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.subheading.divider.enabled.xml rename to tools/docbook-xsl-1.73.2/params/man.subheading.divider.enabled.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.subheading.divider.xml b/tools/docbook-xsl-1.73.2/params/man.subheading.divider.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.subheading.divider.xml rename to tools/docbook-xsl-1.73.2/params/man.subheading.divider.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.table.footnotes.divider.xml b/tools/docbook-xsl-1.73.2/params/man.table.footnotes.divider.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.table.footnotes.divider.xml rename to tools/docbook-xsl-1.73.2/params/man.table.footnotes.divider.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.th.extra1.suppress.xml b/tools/docbook-xsl-1.73.2/params/man.th.extra1.suppress.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.th.extra1.suppress.xml rename to tools/docbook-xsl-1.73.2/params/man.th.extra1.suppress.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.th.extra2.max.length.xml b/tools/docbook-xsl-1.73.2/params/man.th.extra2.max.length.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.th.extra2.max.length.xml rename to tools/docbook-xsl-1.73.2/params/man.th.extra2.max.length.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.th.extra2.suppress.xml b/tools/docbook-xsl-1.73.2/params/man.th.extra2.suppress.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.th.extra2.suppress.xml rename to tools/docbook-xsl-1.73.2/params/man.th.extra2.suppress.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.th.extra3.max.length.xml b/tools/docbook-xsl-1.73.2/params/man.th.extra3.max.length.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.th.extra3.max.length.xml rename to tools/docbook-xsl-1.73.2/params/man.th.extra3.max.length.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.th.extra3.suppress.xml b/tools/docbook-xsl-1.73.2/params/man.th.extra3.suppress.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.th.extra3.suppress.xml rename to tools/docbook-xsl-1.73.2/params/man.th.extra3.suppress.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/man.th.title.max.length.xml b/tools/docbook-xsl-1.73.2/params/man.th.title.max.length.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/man.th.title.max.length.xml rename to tools/docbook-xsl-1.73.2/params/man.th.title.max.length.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/manifest.in.base.dir.xml b/tools/docbook-xsl-1.73.2/params/manifest.in.base.dir.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/manifest.in.base.dir.xml rename to tools/docbook-xsl-1.73.2/params/manifest.in.base.dir.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/manifest.xml b/tools/docbook-xsl-1.73.2/params/manifest.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/manifest.xml rename to tools/docbook-xsl-1.73.2/params/manifest.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/manual.toc.xml b/tools/docbook-xsl-1.73.2/params/manual.toc.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/manual.toc.xml rename to tools/docbook-xsl-1.73.2/params/manual.toc.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/margin.note.float.type.xml b/tools/docbook-xsl-1.73.2/params/margin.note.float.type.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/margin.note.float.type.xml rename to tools/docbook-xsl-1.73.2/params/margin.note.float.type.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/margin.note.properties.xml b/tools/docbook-xsl-1.73.2/params/margin.note.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/margin.note.properties.xml rename to tools/docbook-xsl-1.73.2/params/margin.note.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/margin.note.title.properties.xml b/tools/docbook-xsl-1.73.2/params/margin.note.title.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/margin.note.title.properties.xml rename to tools/docbook-xsl-1.73.2/params/margin.note.title.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/margin.note.width.xml b/tools/docbook-xsl-1.73.2/params/margin.note.width.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/margin.note.width.xml rename to tools/docbook-xsl-1.73.2/params/margin.note.width.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/marker.section.level.xml b/tools/docbook-xsl-1.73.2/params/marker.section.level.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/marker.section.level.xml rename to tools/docbook-xsl-1.73.2/params/marker.section.level.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/menuchoice.menu.separator.xml b/tools/docbook-xsl-1.73.2/params/menuchoice.menu.separator.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/menuchoice.menu.separator.xml rename to tools/docbook-xsl-1.73.2/params/menuchoice.menu.separator.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/menuchoice.separator.xml b/tools/docbook-xsl-1.73.2/params/menuchoice.separator.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/menuchoice.separator.xml rename to tools/docbook-xsl-1.73.2/params/menuchoice.separator.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/minus.image.xml b/tools/docbook-xsl-1.73.2/params/minus.image.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/minus.image.xml rename to tools/docbook-xsl-1.73.2/params/minus.image.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/monospace.font.family.xml b/tools/docbook-xsl-1.73.2/params/monospace.font.family.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/monospace.font.family.xml rename to tools/docbook-xsl-1.73.2/params/monospace.font.family.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/monospace.properties.xml b/tools/docbook-xsl-1.73.2/params/monospace.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/monospace.properties.xml rename to tools/docbook-xsl-1.73.2/params/monospace.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/monospace.verbatim.properties.xml b/tools/docbook-xsl-1.73.2/params/monospace.verbatim.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/monospace.verbatim.properties.xml rename to tools/docbook-xsl-1.73.2/params/monospace.verbatim.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/multiframe.bottom.bgcolor.xml b/tools/docbook-xsl-1.73.2/params/multiframe.bottom.bgcolor.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/multiframe.bottom.bgcolor.xml rename to tools/docbook-xsl-1.73.2/params/multiframe.bottom.bgcolor.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/multiframe.navigation.height.xml b/tools/docbook-xsl-1.73.2/params/multiframe.navigation.height.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/multiframe.navigation.height.xml rename to tools/docbook-xsl-1.73.2/params/multiframe.navigation.height.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/multiframe.top.bgcolor.xml b/tools/docbook-xsl-1.73.2/params/multiframe.top.bgcolor.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/multiframe.top.bgcolor.xml rename to tools/docbook-xsl-1.73.2/params/multiframe.top.bgcolor.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/multiframe.xml b/tools/docbook-xsl-1.73.2/params/multiframe.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/multiframe.xml rename to tools/docbook-xsl-1.73.2/params/multiframe.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/nav.separator.xml b/tools/docbook-xsl-1.73.2/params/nav.separator.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/nav.separator.xml rename to tools/docbook-xsl-1.73.2/params/nav.separator.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/nav.table.summary.xml b/tools/docbook-xsl-1.73.2/params/nav.table.summary.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/nav.table.summary.xml rename to tools/docbook-xsl-1.73.2/params/nav.table.summary.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/navbgcolor.xml b/tools/docbook-xsl-1.73.2/params/navbgcolor.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/navbgcolor.xml rename to tools/docbook-xsl-1.73.2/params/navbgcolor.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/navbodywidth.xml b/tools/docbook-xsl-1.73.2/params/navbodywidth.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/navbodywidth.xml rename to tools/docbook-xsl-1.73.2/params/navbodywidth.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/navig.graphics.extension.xml b/tools/docbook-xsl-1.73.2/params/navig.graphics.extension.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/navig.graphics.extension.xml rename to tools/docbook-xsl-1.73.2/params/navig.graphics.extension.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/navig.graphics.path.xml b/tools/docbook-xsl-1.73.2/params/navig.graphics.path.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/navig.graphics.path.xml rename to tools/docbook-xsl-1.73.2/params/navig.graphics.path.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/navig.graphics.xml b/tools/docbook-xsl-1.73.2/params/navig.graphics.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/navig.graphics.xml rename to tools/docbook-xsl-1.73.2/params/navig.graphics.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/navig.showtitles.xml b/tools/docbook-xsl-1.73.2/params/navig.showtitles.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/navig.showtitles.xml rename to tools/docbook-xsl-1.73.2/params/navig.showtitles.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/navtocwidth.xml b/tools/docbook-xsl-1.73.2/params/navtocwidth.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/navtocwidth.xml rename to tools/docbook-xsl-1.73.2/params/navtocwidth.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/next.image.xml b/tools/docbook-xsl-1.73.2/params/next.image.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/next.image.xml rename to tools/docbook-xsl-1.73.2/params/next.image.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/no.home.image.xml b/tools/docbook-xsl-1.73.2/params/no.home.image.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/no.home.image.xml rename to tools/docbook-xsl-1.73.2/params/no.home.image.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/no.next.image.xml b/tools/docbook-xsl-1.73.2/params/no.next.image.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/no.next.image.xml rename to tools/docbook-xsl-1.73.2/params/no.next.image.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/no.prev.image.xml b/tools/docbook-xsl-1.73.2/params/no.prev.image.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/no.prev.image.xml rename to tools/docbook-xsl-1.73.2/params/no.prev.image.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/no.toc.image.xml b/tools/docbook-xsl-1.73.2/params/no.toc.image.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/no.toc.image.xml rename to tools/docbook-xsl-1.73.2/params/no.toc.image.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/no.up.image.xml b/tools/docbook-xsl-1.73.2/params/no.up.image.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/no.up.image.xml rename to tools/docbook-xsl-1.73.2/params/no.up.image.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/nominal.image.depth.xml b/tools/docbook-xsl-1.73.2/params/nominal.image.depth.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/nominal.image.depth.xml rename to tools/docbook-xsl-1.73.2/params/nominal.image.depth.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/nominal.image.width.xml b/tools/docbook-xsl-1.73.2/params/nominal.image.width.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/nominal.image.width.xml rename to tools/docbook-xsl-1.73.2/params/nominal.image.width.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/nominal.table.width.xml b/tools/docbook-xsl-1.73.2/params/nominal.table.width.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/nominal.table.width.xml rename to tools/docbook-xsl-1.73.2/params/nominal.table.width.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/nongraphical.admonition.properties.xml b/tools/docbook-xsl-1.73.2/params/nongraphical.admonition.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/nongraphical.admonition.properties.xml rename to tools/docbook-xsl-1.73.2/params/nongraphical.admonition.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/normal.para.spacing.xml b/tools/docbook-xsl-1.73.2/params/normal.para.spacing.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/normal.para.spacing.xml rename to tools/docbook-xsl-1.73.2/params/normal.para.spacing.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/olink.base.uri.xml b/tools/docbook-xsl-1.73.2/params/olink.base.uri.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/olink.base.uri.xml rename to tools/docbook-xsl-1.73.2/params/olink.base.uri.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/olink.debug.xml b/tools/docbook-xsl-1.73.2/params/olink.debug.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/olink.debug.xml rename to tools/docbook-xsl-1.73.2/params/olink.debug.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/olink.doctitle.xml b/tools/docbook-xsl-1.73.2/params/olink.doctitle.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/olink.doctitle.xml rename to tools/docbook-xsl-1.73.2/params/olink.doctitle.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/olink.fragid.xml b/tools/docbook-xsl-1.73.2/params/olink.fragid.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/olink.fragid.xml rename to tools/docbook-xsl-1.73.2/params/olink.fragid.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/olink.lang.fallback.sequence.xml b/tools/docbook-xsl-1.73.2/params/olink.lang.fallback.sequence.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/olink.lang.fallback.sequence.xml rename to tools/docbook-xsl-1.73.2/params/olink.lang.fallback.sequence.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/olink.outline.ext.xml b/tools/docbook-xsl-1.73.2/params/olink.outline.ext.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/olink.outline.ext.xml rename to tools/docbook-xsl-1.73.2/params/olink.outline.ext.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/olink.properties.xml b/tools/docbook-xsl-1.73.2/params/olink.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/olink.properties.xml rename to tools/docbook-xsl-1.73.2/params/olink.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/olink.pubid.xml b/tools/docbook-xsl-1.73.2/params/olink.pubid.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/olink.pubid.xml rename to tools/docbook-xsl-1.73.2/params/olink.pubid.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/olink.resolver.xml b/tools/docbook-xsl-1.73.2/params/olink.resolver.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/olink.resolver.xml rename to tools/docbook-xsl-1.73.2/params/olink.resolver.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/olink.sysid.xml b/tools/docbook-xsl-1.73.2/params/olink.sysid.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/olink.sysid.xml rename to tools/docbook-xsl-1.73.2/params/olink.sysid.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/orderedlist.label.properties.xml b/tools/docbook-xsl-1.73.2/params/orderedlist.label.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/orderedlist.label.properties.xml rename to tools/docbook-xsl-1.73.2/params/orderedlist.label.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/orderedlist.label.width.xml b/tools/docbook-xsl-1.73.2/params/orderedlist.label.width.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/orderedlist.label.width.xml rename to tools/docbook-xsl-1.73.2/params/orderedlist.label.width.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/orderedlist.properties.xml b/tools/docbook-xsl-1.73.2/params/orderedlist.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/orderedlist.properties.xml rename to tools/docbook-xsl-1.73.2/params/orderedlist.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/othercredit.like.author.enabled.xml b/tools/docbook-xsl-1.73.2/params/othercredit.like.author.enabled.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/othercredit.like.author.enabled.xml rename to tools/docbook-xsl-1.73.2/params/othercredit.like.author.enabled.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/output-root.xml b/tools/docbook-xsl-1.73.2/params/output-root.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/output-root.xml rename to tools/docbook-xsl-1.73.2/params/output-root.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/output.indent.xml b/tools/docbook-xsl-1.73.2/params/output.indent.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/output.indent.xml rename to tools/docbook-xsl-1.73.2/params/output.indent.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/overlay.js.xml b/tools/docbook-xsl-1.73.2/params/overlay.js.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/overlay.js.xml rename to tools/docbook-xsl-1.73.2/params/overlay.js.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/overlay.logo.xml b/tools/docbook-xsl-1.73.2/params/overlay.logo.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/overlay.logo.xml rename to tools/docbook-xsl-1.73.2/params/overlay.logo.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/overlay.xml b/tools/docbook-xsl-1.73.2/params/overlay.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/overlay.xml rename to tools/docbook-xsl-1.73.2/params/overlay.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/page.height.portrait.xml b/tools/docbook-xsl-1.73.2/params/page.height.portrait.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/page.height.portrait.xml rename to tools/docbook-xsl-1.73.2/params/page.height.portrait.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/page.height.xml b/tools/docbook-xsl-1.73.2/params/page.height.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/page.height.xml rename to tools/docbook-xsl-1.73.2/params/page.height.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/page.margin.bottom.xml b/tools/docbook-xsl-1.73.2/params/page.margin.bottom.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/page.margin.bottom.xml rename to tools/docbook-xsl-1.73.2/params/page.margin.bottom.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/page.margin.inner.xml b/tools/docbook-xsl-1.73.2/params/page.margin.inner.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/page.margin.inner.xml rename to tools/docbook-xsl-1.73.2/params/page.margin.inner.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/page.margin.outer.xml b/tools/docbook-xsl-1.73.2/params/page.margin.outer.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/page.margin.outer.xml rename to tools/docbook-xsl-1.73.2/params/page.margin.outer.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/page.margin.top.xml b/tools/docbook-xsl-1.73.2/params/page.margin.top.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/page.margin.top.xml rename to tools/docbook-xsl-1.73.2/params/page.margin.top.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/page.orientation.xml b/tools/docbook-xsl-1.73.2/params/page.orientation.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/page.orientation.xml rename to tools/docbook-xsl-1.73.2/params/page.orientation.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/page.width.portrait.xml b/tools/docbook-xsl-1.73.2/params/page.width.portrait.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/page.width.portrait.xml rename to tools/docbook-xsl-1.73.2/params/page.width.portrait.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/page.width.xml b/tools/docbook-xsl-1.73.2/params/page.width.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/page.width.xml rename to tools/docbook-xsl-1.73.2/params/page.width.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/pages.template.xml b/tools/docbook-xsl-1.73.2/params/pages.template.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/pages.template.xml rename to tools/docbook-xsl-1.73.2/params/pages.template.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/paper.type.xml b/tools/docbook-xsl-1.73.2/params/paper.type.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/paper.type.xml rename to tools/docbook-xsl-1.73.2/params/paper.type.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/para.propagates.style.xml b/tools/docbook-xsl-1.73.2/params/para.propagates.style.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/para.propagates.style.xml rename to tools/docbook-xsl-1.73.2/params/para.propagates.style.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/part.autolabel.xml b/tools/docbook-xsl-1.73.2/params/part.autolabel.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/part.autolabel.xml rename to tools/docbook-xsl-1.73.2/params/part.autolabel.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/passivetex.extensions.xml b/tools/docbook-xsl-1.73.2/params/passivetex.extensions.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/passivetex.extensions.xml rename to tools/docbook-xsl-1.73.2/params/passivetex.extensions.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/pgwide.properties.xml b/tools/docbook-xsl-1.73.2/params/pgwide.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/pgwide.properties.xml rename to tools/docbook-xsl-1.73.2/params/pgwide.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/phrase.propagates.style.xml b/tools/docbook-xsl-1.73.2/params/phrase.propagates.style.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/phrase.propagates.style.xml rename to tools/docbook-xsl-1.73.2/params/phrase.propagates.style.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/pixels.per.inch.xml b/tools/docbook-xsl-1.73.2/params/pixels.per.inch.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/pixels.per.inch.xml rename to tools/docbook-xsl-1.73.2/params/pixels.per.inch.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/plus.image.xml b/tools/docbook-xsl-1.73.2/params/plus.image.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/plus.image.xml rename to tools/docbook-xsl-1.73.2/params/plus.image.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/points.per.em.xml b/tools/docbook-xsl-1.73.2/params/points.per.em.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/points.per.em.xml rename to tools/docbook-xsl-1.73.2/params/points.per.em.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/preface.autolabel.xml b/tools/docbook-xsl-1.73.2/params/preface.autolabel.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/preface.autolabel.xml rename to tools/docbook-xsl-1.73.2/params/preface.autolabel.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/prefer.internal.olink.xml b/tools/docbook-xsl-1.73.2/params/prefer.internal.olink.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/prefer.internal.olink.xml rename to tools/docbook-xsl-1.73.2/params/prefer.internal.olink.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/preferred.mediaobject.role.xml b/tools/docbook-xsl-1.73.2/params/preferred.mediaobject.role.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/preferred.mediaobject.role.xml rename to tools/docbook-xsl-1.73.2/params/preferred.mediaobject.role.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/prev.image.xml b/tools/docbook-xsl-1.73.2/params/prev.image.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/prev.image.xml rename to tools/docbook-xsl-1.73.2/params/prev.image.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/procedure.properties.xml b/tools/docbook-xsl-1.73.2/params/procedure.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/procedure.properties.xml rename to tools/docbook-xsl-1.73.2/params/procedure.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/process.empty.source.toc.xml b/tools/docbook-xsl-1.73.2/params/process.empty.source.toc.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/process.empty.source.toc.xml rename to tools/docbook-xsl-1.73.2/params/process.empty.source.toc.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/process.source.toc.xml b/tools/docbook-xsl-1.73.2/params/process.source.toc.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/process.source.toc.xml rename to tools/docbook-xsl-1.73.2/params/process.source.toc.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/profile.arch.xml b/tools/docbook-xsl-1.73.2/params/profile.arch.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/profile.arch.xml rename to tools/docbook-xsl-1.73.2/params/profile.arch.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/profile.attribute.xml b/tools/docbook-xsl-1.73.2/params/profile.attribute.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/profile.attribute.xml rename to tools/docbook-xsl-1.73.2/params/profile.attribute.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/profile.audience.xml b/tools/docbook-xsl-1.73.2/params/profile.audience.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/profile.audience.xml rename to tools/docbook-xsl-1.73.2/params/profile.audience.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/profile.condition.xml b/tools/docbook-xsl-1.73.2/params/profile.condition.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/profile.condition.xml rename to tools/docbook-xsl-1.73.2/params/profile.condition.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/profile.conformance.xml b/tools/docbook-xsl-1.73.2/params/profile.conformance.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/profile.conformance.xml rename to tools/docbook-xsl-1.73.2/params/profile.conformance.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/profile.lang.xml b/tools/docbook-xsl-1.73.2/params/profile.lang.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/profile.lang.xml rename to tools/docbook-xsl-1.73.2/params/profile.lang.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/profile.os.xml b/tools/docbook-xsl-1.73.2/params/profile.os.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/profile.os.xml rename to tools/docbook-xsl-1.73.2/params/profile.os.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/profile.revision.xml b/tools/docbook-xsl-1.73.2/params/profile.revision.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/profile.revision.xml rename to tools/docbook-xsl-1.73.2/params/profile.revision.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/profile.revisionflag.xml b/tools/docbook-xsl-1.73.2/params/profile.revisionflag.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/profile.revisionflag.xml rename to tools/docbook-xsl-1.73.2/params/profile.revisionflag.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/profile.role.xml b/tools/docbook-xsl-1.73.2/params/profile.role.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/profile.role.xml rename to tools/docbook-xsl-1.73.2/params/profile.role.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/profile.security.xml b/tools/docbook-xsl-1.73.2/params/profile.security.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/profile.security.xml rename to tools/docbook-xsl-1.73.2/params/profile.security.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/profile.separator.xml b/tools/docbook-xsl-1.73.2/params/profile.separator.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/profile.separator.xml rename to tools/docbook-xsl-1.73.2/params/profile.separator.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/profile.status.xml b/tools/docbook-xsl-1.73.2/params/profile.status.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/profile.status.xml rename to tools/docbook-xsl-1.73.2/params/profile.status.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/profile.userlevel.xml b/tools/docbook-xsl-1.73.2/params/profile.userlevel.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/profile.userlevel.xml rename to tools/docbook-xsl-1.73.2/params/profile.userlevel.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/profile.value.xml b/tools/docbook-xsl-1.73.2/params/profile.value.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/profile.value.xml rename to tools/docbook-xsl-1.73.2/params/profile.value.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/profile.vendor.xml b/tools/docbook-xsl-1.73.2/params/profile.vendor.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/profile.vendor.xml rename to tools/docbook-xsl-1.73.2/params/profile.vendor.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/profile.wordsize.xml b/tools/docbook-xsl-1.73.2/params/profile.wordsize.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/profile.wordsize.xml rename to tools/docbook-xsl-1.73.2/params/profile.wordsize.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/punct.honorific.xml b/tools/docbook-xsl-1.73.2/params/punct.honorific.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/punct.honorific.xml rename to tools/docbook-xsl-1.73.2/params/punct.honorific.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/qanda.defaultlabel.xml b/tools/docbook-xsl-1.73.2/params/qanda.defaultlabel.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/qanda.defaultlabel.xml rename to tools/docbook-xsl-1.73.2/params/qanda.defaultlabel.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/qanda.in.toc.xml b/tools/docbook-xsl-1.73.2/params/qanda.in.toc.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/qanda.in.toc.xml rename to tools/docbook-xsl-1.73.2/params/qanda.in.toc.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/qanda.inherit.numeration.xml b/tools/docbook-xsl-1.73.2/params/qanda.inherit.numeration.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/qanda.inherit.numeration.xml rename to tools/docbook-xsl-1.73.2/params/qanda.inherit.numeration.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/qanda.nested.in.toc.xml b/tools/docbook-xsl-1.73.2/params/qanda.nested.in.toc.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/qanda.nested.in.toc.xml rename to tools/docbook-xsl-1.73.2/params/qanda.nested.in.toc.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/qanda.title.level1.properties.xml b/tools/docbook-xsl-1.73.2/params/qanda.title.level1.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/qanda.title.level1.properties.xml rename to tools/docbook-xsl-1.73.2/params/qanda.title.level1.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/qanda.title.level2.properties.xml b/tools/docbook-xsl-1.73.2/params/qanda.title.level2.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/qanda.title.level2.properties.xml rename to tools/docbook-xsl-1.73.2/params/qanda.title.level2.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/qanda.title.level3.properties.xml b/tools/docbook-xsl-1.73.2/params/qanda.title.level3.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/qanda.title.level3.properties.xml rename to tools/docbook-xsl-1.73.2/params/qanda.title.level3.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/qanda.title.level4.properties.xml b/tools/docbook-xsl-1.73.2/params/qanda.title.level4.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/qanda.title.level4.properties.xml rename to tools/docbook-xsl-1.73.2/params/qanda.title.level4.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/qanda.title.level5.properties.xml b/tools/docbook-xsl-1.73.2/params/qanda.title.level5.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/qanda.title.level5.properties.xml rename to tools/docbook-xsl-1.73.2/params/qanda.title.level5.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/qanda.title.level6.properties.xml b/tools/docbook-xsl-1.73.2/params/qanda.title.level6.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/qanda.title.level6.properties.xml rename to tools/docbook-xsl-1.73.2/params/qanda.title.level6.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/qanda.title.properties.xml b/tools/docbook-xsl-1.73.2/params/qanda.title.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/qanda.title.properties.xml rename to tools/docbook-xsl-1.73.2/params/qanda.title.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/qandadiv.autolabel.xml b/tools/docbook-xsl-1.73.2/params/qandadiv.autolabel.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/qandadiv.autolabel.xml rename to tools/docbook-xsl-1.73.2/params/qandadiv.autolabel.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/rebuild-all.xml b/tools/docbook-xsl-1.73.2/params/rebuild-all.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/rebuild-all.xml rename to tools/docbook-xsl-1.73.2/params/rebuild-all.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/refclass.suppress.xml b/tools/docbook-xsl-1.73.2/params/refclass.suppress.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/refclass.suppress.xml rename to tools/docbook-xsl-1.73.2/params/refclass.suppress.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.date.profile.enabled.xml b/tools/docbook-xsl-1.73.2/params/refentry.date.profile.enabled.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.date.profile.enabled.xml rename to tools/docbook-xsl-1.73.2/params/refentry.date.profile.enabled.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.date.profile.xml b/tools/docbook-xsl-1.73.2/params/refentry.date.profile.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.date.profile.xml rename to tools/docbook-xsl-1.73.2/params/refentry.date.profile.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.generate.name.xml b/tools/docbook-xsl-1.73.2/params/refentry.generate.name.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.generate.name.xml rename to tools/docbook-xsl-1.73.2/params/refentry.generate.name.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.generate.title.xml b/tools/docbook-xsl-1.73.2/params/refentry.generate.title.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.generate.title.xml rename to tools/docbook-xsl-1.73.2/params/refentry.generate.title.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.manual.fallback.profile.xml b/tools/docbook-xsl-1.73.2/params/refentry.manual.fallback.profile.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.manual.fallback.profile.xml rename to tools/docbook-xsl-1.73.2/params/refentry.manual.fallback.profile.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.manual.profile.enabled.xml b/tools/docbook-xsl-1.73.2/params/refentry.manual.profile.enabled.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.manual.profile.enabled.xml rename to tools/docbook-xsl-1.73.2/params/refentry.manual.profile.enabled.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.manual.profile.xml b/tools/docbook-xsl-1.73.2/params/refentry.manual.profile.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.manual.profile.xml rename to tools/docbook-xsl-1.73.2/params/refentry.manual.profile.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.meta.get.quietly.xml b/tools/docbook-xsl-1.73.2/params/refentry.meta.get.quietly.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.meta.get.quietly.xml rename to tools/docbook-xsl-1.73.2/params/refentry.meta.get.quietly.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.pagebreak.xml b/tools/docbook-xsl-1.73.2/params/refentry.pagebreak.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.pagebreak.xml rename to tools/docbook-xsl-1.73.2/params/refentry.pagebreak.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.separator.xml b/tools/docbook-xsl-1.73.2/params/refentry.separator.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.separator.xml rename to tools/docbook-xsl-1.73.2/params/refentry.separator.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.source.fallback.profile.xml b/tools/docbook-xsl-1.73.2/params/refentry.source.fallback.profile.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.source.fallback.profile.xml rename to tools/docbook-xsl-1.73.2/params/refentry.source.fallback.profile.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.source.name.profile.enabled.xml b/tools/docbook-xsl-1.73.2/params/refentry.source.name.profile.enabled.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.source.name.profile.enabled.xml rename to tools/docbook-xsl-1.73.2/params/refentry.source.name.profile.enabled.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.source.name.profile.xml b/tools/docbook-xsl-1.73.2/params/refentry.source.name.profile.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.source.name.profile.xml rename to tools/docbook-xsl-1.73.2/params/refentry.source.name.profile.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.source.name.suppress.xml b/tools/docbook-xsl-1.73.2/params/refentry.source.name.suppress.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.source.name.suppress.xml rename to tools/docbook-xsl-1.73.2/params/refentry.source.name.suppress.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.title.properties.xml b/tools/docbook-xsl-1.73.2/params/refentry.title.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.title.properties.xml rename to tools/docbook-xsl-1.73.2/params/refentry.title.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.version.profile.enabled.xml b/tools/docbook-xsl-1.73.2/params/refentry.version.profile.enabled.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.version.profile.enabled.xml rename to tools/docbook-xsl-1.73.2/params/refentry.version.profile.enabled.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.version.profile.xml b/tools/docbook-xsl-1.73.2/params/refentry.version.profile.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.version.profile.xml rename to tools/docbook-xsl-1.73.2/params/refentry.version.profile.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.version.suppress.xml b/tools/docbook-xsl-1.73.2/params/refentry.version.suppress.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.version.suppress.xml rename to tools/docbook-xsl-1.73.2/params/refentry.version.suppress.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.xref.manvolnum.xml b/tools/docbook-xsl-1.73.2/params/refentry.xref.manvolnum.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/refentry.xref.manvolnum.xml rename to tools/docbook-xsl-1.73.2/params/refentry.xref.manvolnum.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/reference.autolabel.xml b/tools/docbook-xsl-1.73.2/params/reference.autolabel.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/reference.autolabel.xml rename to tools/docbook-xsl-1.73.2/params/reference.autolabel.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/region.after.extent.xml b/tools/docbook-xsl-1.73.2/params/region.after.extent.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/region.after.extent.xml rename to tools/docbook-xsl-1.73.2/params/region.after.extent.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/region.before.extent.xml b/tools/docbook-xsl-1.73.2/params/region.before.extent.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/region.before.extent.xml rename to tools/docbook-xsl-1.73.2/params/region.before.extent.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/revhistory.table.cell.properties.xml b/tools/docbook-xsl-1.73.2/params/revhistory.table.cell.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/revhistory.table.cell.properties.xml rename to tools/docbook-xsl-1.73.2/params/revhistory.table.cell.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/revhistory.table.properties.xml b/tools/docbook-xsl-1.73.2/params/revhistory.table.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/revhistory.table.properties.xml rename to tools/docbook-xsl-1.73.2/params/revhistory.table.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/revhistory.title.properties.xml b/tools/docbook-xsl-1.73.2/params/revhistory.title.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/revhistory.title.properties.xml rename to tools/docbook-xsl-1.73.2/params/revhistory.title.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/root.filename.xml b/tools/docbook-xsl-1.73.2/params/root.filename.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/root.filename.xml rename to tools/docbook-xsl-1.73.2/params/root.filename.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/root.properties.xml b/tools/docbook-xsl-1.73.2/params/root.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/root.properties.xml rename to tools/docbook-xsl-1.73.2/params/root.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/rootid.xml b/tools/docbook-xsl-1.73.2/params/rootid.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/rootid.xml rename to tools/docbook-xsl-1.73.2/params/rootid.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/runinhead.default.title.end.punct.xml b/tools/docbook-xsl-1.73.2/params/runinhead.default.title.end.punct.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/runinhead.default.title.end.punct.xml rename to tools/docbook-xsl-1.73.2/params/runinhead.default.title.end.punct.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/runinhead.title.end.punct.xml b/tools/docbook-xsl-1.73.2/params/runinhead.title.end.punct.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/runinhead.title.end.punct.xml rename to tools/docbook-xsl-1.73.2/params/runinhead.title.end.punct.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/running.foot.properties.xml b/tools/docbook-xsl-1.73.2/params/running.foot.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/running.foot.properties.xml rename to tools/docbook-xsl-1.73.2/params/running.foot.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/sans.font.family.xml b/tools/docbook-xsl-1.73.2/params/sans.font.family.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/sans.font.family.xml rename to tools/docbook-xsl-1.73.2/params/sans.font.family.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/saxon.callouts.xml b/tools/docbook-xsl-1.73.2/params/saxon.callouts.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/saxon.callouts.xml rename to tools/docbook-xsl-1.73.2/params/saxon.callouts.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/saxon.character.representation.xml b/tools/docbook-xsl-1.73.2/params/saxon.character.representation.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/saxon.character.representation.xml rename to tools/docbook-xsl-1.73.2/params/saxon.character.representation.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/saxon.linenumbering.xml b/tools/docbook-xsl-1.73.2/params/saxon.linenumbering.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/saxon.linenumbering.xml rename to tools/docbook-xsl-1.73.2/params/saxon.linenumbering.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/saxon.tablecolumns.xml b/tools/docbook-xsl-1.73.2/params/saxon.tablecolumns.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/saxon.tablecolumns.xml rename to tools/docbook-xsl-1.73.2/params/saxon.tablecolumns.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/script.dir.xml b/tools/docbook-xsl-1.73.2/params/script.dir.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/script.dir.xml rename to tools/docbook-xsl-1.73.2/params/script.dir.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/section.autolabel.max.depth.xml b/tools/docbook-xsl-1.73.2/params/section.autolabel.max.depth.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/section.autolabel.max.depth.xml rename to tools/docbook-xsl-1.73.2/params/section.autolabel.max.depth.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/section.autolabel.xml b/tools/docbook-xsl-1.73.2/params/section.autolabel.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/section.autolabel.xml rename to tools/docbook-xsl-1.73.2/params/section.autolabel.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/section.container.element.xml b/tools/docbook-xsl-1.73.2/params/section.container.element.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/section.container.element.xml rename to tools/docbook-xsl-1.73.2/params/section.container.element.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/section.label.includes.component.label.xml b/tools/docbook-xsl-1.73.2/params/section.label.includes.component.label.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/section.label.includes.component.label.xml rename to tools/docbook-xsl-1.73.2/params/section.label.includes.component.label.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/section.level1.properties.xml b/tools/docbook-xsl-1.73.2/params/section.level1.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/section.level1.properties.xml rename to tools/docbook-xsl-1.73.2/params/section.level1.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/section.level2.properties.xml b/tools/docbook-xsl-1.73.2/params/section.level2.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/section.level2.properties.xml rename to tools/docbook-xsl-1.73.2/params/section.level2.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/section.level3.properties.xml b/tools/docbook-xsl-1.73.2/params/section.level3.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/section.level3.properties.xml rename to tools/docbook-xsl-1.73.2/params/section.level3.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/section.level4.properties.xml b/tools/docbook-xsl-1.73.2/params/section.level4.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/section.level4.properties.xml rename to tools/docbook-xsl-1.73.2/params/section.level4.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/section.level5.properties.xml b/tools/docbook-xsl-1.73.2/params/section.level5.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/section.level5.properties.xml rename to tools/docbook-xsl-1.73.2/params/section.level5.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/section.level6.properties.xml b/tools/docbook-xsl-1.73.2/params/section.level6.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/section.level6.properties.xml rename to tools/docbook-xsl-1.73.2/params/section.level6.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/section.properties.xml b/tools/docbook-xsl-1.73.2/params/section.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/section.properties.xml rename to tools/docbook-xsl-1.73.2/params/section.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/section.title.level1.properties.xml b/tools/docbook-xsl-1.73.2/params/section.title.level1.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/section.title.level1.properties.xml rename to tools/docbook-xsl-1.73.2/params/section.title.level1.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/section.title.level2.properties.xml b/tools/docbook-xsl-1.73.2/params/section.title.level2.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/section.title.level2.properties.xml rename to tools/docbook-xsl-1.73.2/params/section.title.level2.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/section.title.level3.properties.xml b/tools/docbook-xsl-1.73.2/params/section.title.level3.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/section.title.level3.properties.xml rename to tools/docbook-xsl-1.73.2/params/section.title.level3.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/section.title.level4.properties.xml b/tools/docbook-xsl-1.73.2/params/section.title.level4.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/section.title.level4.properties.xml rename to tools/docbook-xsl-1.73.2/params/section.title.level4.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/section.title.level5.properties.xml b/tools/docbook-xsl-1.73.2/params/section.title.level5.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/section.title.level5.properties.xml rename to tools/docbook-xsl-1.73.2/params/section.title.level5.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/section.title.level6.properties.xml b/tools/docbook-xsl-1.73.2/params/section.title.level6.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/section.title.level6.properties.xml rename to tools/docbook-xsl-1.73.2/params/section.title.level6.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/section.title.properties.xml b/tools/docbook-xsl-1.73.2/params/section.title.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/section.title.properties.xml rename to tools/docbook-xsl-1.73.2/params/section.title.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/segmentedlist.as.table.xml b/tools/docbook-xsl-1.73.2/params/segmentedlist.as.table.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/segmentedlist.as.table.xml rename to tools/docbook-xsl-1.73.2/params/segmentedlist.as.table.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/sequential.links.xml b/tools/docbook-xsl-1.73.2/params/sequential.links.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/sequential.links.xml rename to tools/docbook-xsl-1.73.2/params/sequential.links.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/shade.verbatim.style.xml b/tools/docbook-xsl-1.73.2/params/shade.verbatim.style.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/shade.verbatim.style.xml rename to tools/docbook-xsl-1.73.2/params/shade.verbatim.style.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/shade.verbatim.xml b/tools/docbook-xsl-1.73.2/params/shade.verbatim.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/shade.verbatim.xml rename to tools/docbook-xsl-1.73.2/params/shade.verbatim.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/show.comments.xml b/tools/docbook-xsl-1.73.2/params/show.comments.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/show.comments.xml rename to tools/docbook-xsl-1.73.2/params/show.comments.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/show.foil.number.xml b/tools/docbook-xsl-1.73.2/params/show.foil.number.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/show.foil.number.xml rename to tools/docbook-xsl-1.73.2/params/show.foil.number.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/show.revisionflag.xml b/tools/docbook-xsl-1.73.2/params/show.revisionflag.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/show.revisionflag.xml rename to tools/docbook-xsl-1.73.2/params/show.revisionflag.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/showtoc.image.xml b/tools/docbook-xsl-1.73.2/params/showtoc.image.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/showtoc.image.xml rename to tools/docbook-xsl-1.73.2/params/showtoc.image.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/side.float.properties.xml b/tools/docbook-xsl-1.73.2/params/side.float.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/side.float.properties.xml rename to tools/docbook-xsl-1.73.2/params/side.float.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/sidebar.float.type.xml b/tools/docbook-xsl-1.73.2/params/sidebar.float.type.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/sidebar.float.type.xml rename to tools/docbook-xsl-1.73.2/params/sidebar.float.type.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/sidebar.float.width.xml b/tools/docbook-xsl-1.73.2/params/sidebar.float.width.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/sidebar.float.width.xml rename to tools/docbook-xsl-1.73.2/params/sidebar.float.width.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/sidebar.properties.xml b/tools/docbook-xsl-1.73.2/params/sidebar.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/sidebar.properties.xml rename to tools/docbook-xsl-1.73.2/params/sidebar.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/sidebar.title.properties.xml b/tools/docbook-xsl-1.73.2/params/sidebar.title.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/sidebar.title.properties.xml rename to tools/docbook-xsl-1.73.2/params/sidebar.title.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/simplesect.in.toc.xml b/tools/docbook-xsl-1.73.2/params/simplesect.in.toc.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/simplesect.in.toc.xml rename to tools/docbook-xsl-1.73.2/params/simplesect.in.toc.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/slide.font.family.xml b/tools/docbook-xsl-1.73.2/params/slide.font.family.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/slide.font.family.xml rename to tools/docbook-xsl-1.73.2/params/slide.font.family.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/slide.title.font.family.xml b/tools/docbook-xsl-1.73.2/params/slide.title.font.family.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/slide.title.font.family.xml rename to tools/docbook-xsl-1.73.2/params/slide.title.font.family.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/slides.js.xml b/tools/docbook-xsl-1.73.2/params/slides.js.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/slides.js.xml rename to tools/docbook-xsl-1.73.2/params/slides.js.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/slides.properties.xml b/tools/docbook-xsl-1.73.2/params/slides.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/slides.properties.xml rename to tools/docbook-xsl-1.73.2/params/slides.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/spacing.paras.xml b/tools/docbook-xsl-1.73.2/params/spacing.paras.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/spacing.paras.xml rename to tools/docbook-xsl-1.73.2/params/spacing.paras.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/speakernote.properties.xml b/tools/docbook-xsl-1.73.2/params/speakernote.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/speakernote.properties.xml rename to tools/docbook-xsl-1.73.2/params/speakernote.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/subscript.properties.xml b/tools/docbook-xsl-1.73.2/params/subscript.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/subscript.properties.xml rename to tools/docbook-xsl-1.73.2/params/subscript.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/superscript.properties.xml b/tools/docbook-xsl-1.73.2/params/superscript.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/superscript.properties.xml rename to tools/docbook-xsl-1.73.2/params/superscript.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/suppress.footer.navigation.xml b/tools/docbook-xsl-1.73.2/params/suppress.footer.navigation.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/suppress.footer.navigation.xml rename to tools/docbook-xsl-1.73.2/params/suppress.footer.navigation.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/suppress.header.navigation.xml b/tools/docbook-xsl-1.73.2/params/suppress.header.navigation.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/suppress.header.navigation.xml rename to tools/docbook-xsl-1.73.2/params/suppress.header.navigation.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/suppress.homepage.title.xml b/tools/docbook-xsl-1.73.2/params/suppress.homepage.title.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/suppress.homepage.title.xml rename to tools/docbook-xsl-1.73.2/params/suppress.homepage.title.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/suppress.navigation.xml b/tools/docbook-xsl-1.73.2/params/suppress.navigation.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/suppress.navigation.xml rename to tools/docbook-xsl-1.73.2/params/suppress.navigation.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/symbol.font.family.xml b/tools/docbook-xsl-1.73.2/params/symbol.font.family.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/symbol.font.family.xml rename to tools/docbook-xsl-1.73.2/params/symbol.font.family.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/table.borders.with.css.xml b/tools/docbook-xsl-1.73.2/params/table.borders.with.css.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/table.borders.with.css.xml rename to tools/docbook-xsl-1.73.2/params/table.borders.with.css.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/table.cell.border.color.xml b/tools/docbook-xsl-1.73.2/params/table.cell.border.color.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/table.cell.border.color.xml rename to tools/docbook-xsl-1.73.2/params/table.cell.border.color.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/table.cell.border.style.xml b/tools/docbook-xsl-1.73.2/params/table.cell.border.style.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/table.cell.border.style.xml rename to tools/docbook-xsl-1.73.2/params/table.cell.border.style.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/table.cell.border.thickness.xml b/tools/docbook-xsl-1.73.2/params/table.cell.border.thickness.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/table.cell.border.thickness.xml rename to tools/docbook-xsl-1.73.2/params/table.cell.border.thickness.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/table.cell.padding.xml b/tools/docbook-xsl-1.73.2/params/table.cell.padding.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/table.cell.padding.xml rename to tools/docbook-xsl-1.73.2/params/table.cell.padding.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/table.entry.padding.xml b/tools/docbook-xsl-1.73.2/params/table.entry.padding.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/table.entry.padding.xml rename to tools/docbook-xsl-1.73.2/params/table.entry.padding.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/table.footnote.number.format.xml b/tools/docbook-xsl-1.73.2/params/table.footnote.number.format.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/table.footnote.number.format.xml rename to tools/docbook-xsl-1.73.2/params/table.footnote.number.format.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/table.footnote.number.symbols.xml b/tools/docbook-xsl-1.73.2/params/table.footnote.number.symbols.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/table.footnote.number.symbols.xml rename to tools/docbook-xsl-1.73.2/params/table.footnote.number.symbols.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/table.footnote.properties.xml b/tools/docbook-xsl-1.73.2/params/table.footnote.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/table.footnote.properties.xml rename to tools/docbook-xsl-1.73.2/params/table.footnote.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/table.frame.border.color.xml b/tools/docbook-xsl-1.73.2/params/table.frame.border.color.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/table.frame.border.color.xml rename to tools/docbook-xsl-1.73.2/params/table.frame.border.color.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/table.frame.border.style.xml b/tools/docbook-xsl-1.73.2/params/table.frame.border.style.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/table.frame.border.style.xml rename to tools/docbook-xsl-1.73.2/params/table.frame.border.style.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/table.frame.border.thickness.xml b/tools/docbook-xsl-1.73.2/params/table.frame.border.thickness.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/table.frame.border.thickness.xml rename to tools/docbook-xsl-1.73.2/params/table.frame.border.thickness.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/table.properties.xml b/tools/docbook-xsl-1.73.2/params/table.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/table.properties.xml rename to tools/docbook-xsl-1.73.2/params/table.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/table.spacer.image.xml b/tools/docbook-xsl-1.73.2/params/table.spacer.image.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/table.spacer.image.xml rename to tools/docbook-xsl-1.73.2/params/table.spacer.image.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/table.table.properties.xml b/tools/docbook-xsl-1.73.2/params/table.table.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/table.table.properties.xml rename to tools/docbook-xsl-1.73.2/params/table.table.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/tablecolumns.extension.xml b/tools/docbook-xsl-1.73.2/params/tablecolumns.extension.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/tablecolumns.extension.xml rename to tools/docbook-xsl-1.73.2/params/tablecolumns.extension.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/target.database.document.xml b/tools/docbook-xsl-1.73.2/params/target.database.document.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/target.database.document.xml rename to tools/docbook-xsl-1.73.2/params/target.database.document.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/targets.filename.xml b/tools/docbook-xsl-1.73.2/params/targets.filename.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/targets.filename.xml rename to tools/docbook-xsl-1.73.2/params/targets.filename.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/template.xml b/tools/docbook-xsl-1.73.2/params/template.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/template.xml rename to tools/docbook-xsl-1.73.2/params/template.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/tex.math.delims.xml b/tools/docbook-xsl-1.73.2/params/tex.math.delims.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/tex.math.delims.xml rename to tools/docbook-xsl-1.73.2/params/tex.math.delims.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/tex.math.file.xml b/tools/docbook-xsl-1.73.2/params/tex.math.file.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/tex.math.file.xml rename to tools/docbook-xsl-1.73.2/params/tex.math.file.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/tex.math.in.alt.xml b/tools/docbook-xsl-1.73.2/params/tex.math.in.alt.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/tex.math.in.alt.xml rename to tools/docbook-xsl-1.73.2/params/tex.math.in.alt.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/text.home.xml b/tools/docbook-xsl-1.73.2/params/text.home.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/text.home.xml rename to tools/docbook-xsl-1.73.2/params/text.home.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/text.next.xml b/tools/docbook-xsl-1.73.2/params/text.next.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/text.next.xml rename to tools/docbook-xsl-1.73.2/params/text.next.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/text.prev.xml b/tools/docbook-xsl-1.73.2/params/text.prev.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/text.prev.xml rename to tools/docbook-xsl-1.73.2/params/text.prev.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/text.toc.xml b/tools/docbook-xsl-1.73.2/params/text.toc.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/text.toc.xml rename to tools/docbook-xsl-1.73.2/params/text.toc.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/text.up.xml b/tools/docbook-xsl-1.73.2/params/text.up.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/text.up.xml rename to tools/docbook-xsl-1.73.2/params/text.up.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/textbgcolor.xml b/tools/docbook-xsl-1.73.2/params/textbgcolor.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/textbgcolor.xml rename to tools/docbook-xsl-1.73.2/params/textbgcolor.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/textdata.default.encoding.xml b/tools/docbook-xsl-1.73.2/params/textdata.default.encoding.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/textdata.default.encoding.xml rename to tools/docbook-xsl-1.73.2/params/textdata.default.encoding.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/textinsert.extension.xml b/tools/docbook-xsl-1.73.2/params/textinsert.extension.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/textinsert.extension.xml rename to tools/docbook-xsl-1.73.2/params/textinsert.extension.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/title.font.family.xml b/tools/docbook-xsl-1.73.2/params/title.font.family.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/title.font.family.xml rename to tools/docbook-xsl-1.73.2/params/title.font.family.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/title.margin.left.xml b/tools/docbook-xsl-1.73.2/params/title.margin.left.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/title.margin.left.xml rename to tools/docbook-xsl-1.73.2/params/title.margin.left.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/titlefoil.html.xml b/tools/docbook-xsl-1.73.2/params/titlefoil.html.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/titlefoil.html.xml rename to tools/docbook-xsl-1.73.2/params/titlefoil.html.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/toc.bg.color.xml b/tools/docbook-xsl-1.73.2/params/toc.bg.color.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/toc.bg.color.xml rename to tools/docbook-xsl-1.73.2/params/toc.bg.color.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/toc.blank.graphic.xml b/tools/docbook-xsl-1.73.2/params/toc.blank.graphic.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/toc.blank.graphic.xml rename to tools/docbook-xsl-1.73.2/params/toc.blank.graphic.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/toc.blank.image.xml b/tools/docbook-xsl-1.73.2/params/toc.blank.image.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/toc.blank.image.xml rename to tools/docbook-xsl-1.73.2/params/toc.blank.image.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/toc.blank.text.xml b/tools/docbook-xsl-1.73.2/params/toc.blank.text.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/toc.blank.text.xml rename to tools/docbook-xsl-1.73.2/params/toc.blank.text.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/toc.hide.show.xml b/tools/docbook-xsl-1.73.2/params/toc.hide.show.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/toc.hide.show.xml rename to tools/docbook-xsl-1.73.2/params/toc.hide.show.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/toc.html.xml b/tools/docbook-xsl-1.73.2/params/toc.html.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/toc.html.xml rename to tools/docbook-xsl-1.73.2/params/toc.html.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/toc.image.xml b/tools/docbook-xsl-1.73.2/params/toc.image.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/toc.image.xml rename to tools/docbook-xsl-1.73.2/params/toc.image.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/toc.indent.width.xml b/tools/docbook-xsl-1.73.2/params/toc.indent.width.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/toc.indent.width.xml rename to tools/docbook-xsl-1.73.2/params/toc.indent.width.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/toc.line.properties.xml b/tools/docbook-xsl-1.73.2/params/toc.line.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/toc.line.properties.xml rename to tools/docbook-xsl-1.73.2/params/toc.line.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/toc.list.type.xml b/tools/docbook-xsl-1.73.2/params/toc.list.type.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/toc.list.type.xml rename to tools/docbook-xsl-1.73.2/params/toc.list.type.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/toc.margin.properties.xml b/tools/docbook-xsl-1.73.2/params/toc.margin.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/toc.margin.properties.xml rename to tools/docbook-xsl-1.73.2/params/toc.margin.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/toc.max.depth.xml b/tools/docbook-xsl-1.73.2/params/toc.max.depth.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/toc.max.depth.xml rename to tools/docbook-xsl-1.73.2/params/toc.max.depth.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/toc.pointer.graphic.xml b/tools/docbook-xsl-1.73.2/params/toc.pointer.graphic.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/toc.pointer.graphic.xml rename to tools/docbook-xsl-1.73.2/params/toc.pointer.graphic.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/toc.pointer.image.xml b/tools/docbook-xsl-1.73.2/params/toc.pointer.image.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/toc.pointer.image.xml rename to tools/docbook-xsl-1.73.2/params/toc.pointer.image.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/toc.pointer.text.xml b/tools/docbook-xsl-1.73.2/params/toc.pointer.text.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/toc.pointer.text.xml rename to tools/docbook-xsl-1.73.2/params/toc.pointer.text.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/toc.row.height.xml b/tools/docbook-xsl-1.73.2/params/toc.row.height.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/toc.row.height.xml rename to tools/docbook-xsl-1.73.2/params/toc.row.height.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/toc.section.depth.xml b/tools/docbook-xsl-1.73.2/params/toc.section.depth.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/toc.section.depth.xml rename to tools/docbook-xsl-1.73.2/params/toc.section.depth.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/toc.spacer.graphic.xml b/tools/docbook-xsl-1.73.2/params/toc.spacer.graphic.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/toc.spacer.graphic.xml rename to tools/docbook-xsl-1.73.2/params/toc.spacer.graphic.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/toc.spacer.image.xml b/tools/docbook-xsl-1.73.2/params/toc.spacer.image.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/toc.spacer.image.xml rename to tools/docbook-xsl-1.73.2/params/toc.spacer.image.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/toc.spacer.text.xml b/tools/docbook-xsl-1.73.2/params/toc.spacer.text.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/toc.spacer.text.xml rename to tools/docbook-xsl-1.73.2/params/toc.spacer.text.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/toc.width.xml b/tools/docbook-xsl-1.73.2/params/toc.width.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/toc.width.xml rename to tools/docbook-xsl-1.73.2/params/toc.width.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/ua.js.xml b/tools/docbook-xsl-1.73.2/params/ua.js.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/ua.js.xml rename to tools/docbook-xsl-1.73.2/params/ua.js.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/ulink.footnotes.xml b/tools/docbook-xsl-1.73.2/params/ulink.footnotes.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/ulink.footnotes.xml rename to tools/docbook-xsl-1.73.2/params/ulink.footnotes.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/ulink.hyphenate.chars.xml b/tools/docbook-xsl-1.73.2/params/ulink.hyphenate.chars.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/ulink.hyphenate.chars.xml rename to tools/docbook-xsl-1.73.2/params/ulink.hyphenate.chars.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/ulink.hyphenate.xml b/tools/docbook-xsl-1.73.2/params/ulink.hyphenate.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/ulink.hyphenate.xml rename to tools/docbook-xsl-1.73.2/params/ulink.hyphenate.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/ulink.show.xml b/tools/docbook-xsl-1.73.2/params/ulink.show.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/ulink.show.xml rename to tools/docbook-xsl-1.73.2/params/ulink.show.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/ulink.target.xml b/tools/docbook-xsl-1.73.2/params/ulink.target.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/ulink.target.xml rename to tools/docbook-xsl-1.73.2/params/ulink.target.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/up.image.xml b/tools/docbook-xsl-1.73.2/params/up.image.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/up.image.xml rename to tools/docbook-xsl-1.73.2/params/up.image.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/use.embed.for.svg.xml b/tools/docbook-xsl-1.73.2/params/use.embed.for.svg.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/use.embed.for.svg.xml rename to tools/docbook-xsl-1.73.2/params/use.embed.for.svg.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/use.extensions.xml b/tools/docbook-xsl-1.73.2/params/use.extensions.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/use.extensions.xml rename to tools/docbook-xsl-1.73.2/params/use.extensions.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/use.id.as.filename.xml b/tools/docbook-xsl-1.73.2/params/use.id.as.filename.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/use.id.as.filename.xml rename to tools/docbook-xsl-1.73.2/params/use.id.as.filename.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/use.id.function.xml b/tools/docbook-xsl-1.73.2/params/use.id.function.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/use.id.function.xml rename to tools/docbook-xsl-1.73.2/params/use.id.function.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/use.local.olink.style.xml b/tools/docbook-xsl-1.73.2/params/use.local.olink.style.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/use.local.olink.style.xml rename to tools/docbook-xsl-1.73.2/params/use.local.olink.style.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/use.role.as.xrefstyle.xml b/tools/docbook-xsl-1.73.2/params/use.role.as.xrefstyle.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/use.role.as.xrefstyle.xml rename to tools/docbook-xsl-1.73.2/params/use.role.as.xrefstyle.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/use.role.for.mediaobject.xml b/tools/docbook-xsl-1.73.2/params/use.role.for.mediaobject.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/use.role.for.mediaobject.xml rename to tools/docbook-xsl-1.73.2/params/use.role.for.mediaobject.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/use.svg.xml b/tools/docbook-xsl-1.73.2/params/use.svg.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/use.svg.xml rename to tools/docbook-xsl-1.73.2/params/use.svg.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/variablelist.as.blocks.xml b/tools/docbook-xsl-1.73.2/params/variablelist.as.blocks.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/variablelist.as.blocks.xml rename to tools/docbook-xsl-1.73.2/params/variablelist.as.blocks.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/variablelist.as.table.xml b/tools/docbook-xsl-1.73.2/params/variablelist.as.table.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/variablelist.as.table.xml rename to tools/docbook-xsl-1.73.2/params/variablelist.as.table.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/variablelist.max.termlength.xml b/tools/docbook-xsl-1.73.2/params/variablelist.max.termlength.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/variablelist.max.termlength.xml rename to tools/docbook-xsl-1.73.2/params/variablelist.max.termlength.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/variablelist.term.break.after.xml b/tools/docbook-xsl-1.73.2/params/variablelist.term.break.after.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/variablelist.term.break.after.xml rename to tools/docbook-xsl-1.73.2/params/variablelist.term.break.after.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/variablelist.term.separator.xml b/tools/docbook-xsl-1.73.2/params/variablelist.term.separator.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/variablelist.term.separator.xml rename to tools/docbook-xsl-1.73.2/params/variablelist.term.separator.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/verbatim.properties.xml b/tools/docbook-xsl-1.73.2/params/verbatim.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/verbatim.properties.xml rename to tools/docbook-xsl-1.73.2/params/verbatim.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/wordml.template.xml b/tools/docbook-xsl-1.73.2/params/wordml.template.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/wordml.template.xml rename to tools/docbook-xsl-1.73.2/params/wordml.template.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/xbCollapsibleLists.js.xml b/tools/docbook-xsl-1.73.2/params/xbCollapsibleLists.js.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/xbCollapsibleLists.js.xml rename to tools/docbook-xsl-1.73.2/params/xbCollapsibleLists.js.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/xbDOM.js.xml b/tools/docbook-xsl-1.73.2/params/xbDOM.js.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/xbDOM.js.xml rename to tools/docbook-xsl-1.73.2/params/xbDOM.js.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/xbLibrary.js.xml b/tools/docbook-xsl-1.73.2/params/xbLibrary.js.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/xbLibrary.js.xml rename to tools/docbook-xsl-1.73.2/params/xbLibrary.js.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/xbStyle.js.xml b/tools/docbook-xsl-1.73.2/params/xbStyle.js.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/xbStyle.js.xml rename to tools/docbook-xsl-1.73.2/params/xbStyle.js.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/xep.extensions.xml b/tools/docbook-xsl-1.73.2/params/xep.extensions.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/xep.extensions.xml rename to tools/docbook-xsl-1.73.2/params/xep.extensions.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/xep.index.item.properties.xml b/tools/docbook-xsl-1.73.2/params/xep.index.item.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/xep.index.item.properties.xml rename to tools/docbook-xsl-1.73.2/params/xep.index.item.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/xref.label-page.separator.xml b/tools/docbook-xsl-1.73.2/params/xref.label-page.separator.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/xref.label-page.separator.xml rename to tools/docbook-xsl-1.73.2/params/xref.label-page.separator.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/xref.label-title.separator.xml b/tools/docbook-xsl-1.73.2/params/xref.label-title.separator.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/xref.label-title.separator.xml rename to tools/docbook-xsl-1.73.2/params/xref.label-title.separator.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/xref.properties.xml b/tools/docbook-xsl-1.73.2/params/xref.properties.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/xref.properties.xml rename to tools/docbook-xsl-1.73.2/params/xref.properties.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/xref.title-page.separator.xml b/tools/docbook-xsl-1.73.2/params/xref.title-page.separator.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/xref.title-page.separator.xml rename to tools/docbook-xsl-1.73.2/params/xref.title-page.separator.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/params/xref.with.number.and.title.xml b/tools/docbook-xsl-1.73.2/params/xref.with.number.and.title.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/params/xref.with.number.and.title.xml rename to tools/docbook-xsl-1.73.2/params/xref.with.number.and.title.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/profiling/profile-mode.xsl b/tools/docbook-xsl-1.73.2/profiling/profile-mode.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/profiling/profile-mode.xsl rename to tools/docbook-xsl-1.73.2/profiling/profile-mode.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/profiling/profile.xsl b/tools/docbook-xsl-1.73.2/profiling/profile.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/profiling/profile.xsl rename to tools/docbook-xsl-1.73.2/profiling/profile.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/profiling/strip-attributes.xsl b/tools/docbook-xsl-1.73.2/profiling/strip-attributes.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/profiling/strip-attributes.xsl rename to tools/docbook-xsl-1.73.2/profiling/strip-attributes.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/profiling/xsl2profile.xsl b/tools/docbook-xsl-1.73.2/profiling/xsl2profile.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/profiling/xsl2profile.xsl rename to tools/docbook-xsl-1.73.2/profiling/xsl2profile.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/blocks-spec.xml b/tools/docbook-xsl-1.73.2/roundtrip/blocks-spec.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/blocks-spec.xml rename to tools/docbook-xsl-1.73.2/roundtrip/blocks-spec.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/blocks2dbk.dtd b/tools/docbook-xsl-1.73.2/roundtrip/blocks2dbk.dtd similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/blocks2dbk.dtd rename to tools/docbook-xsl-1.73.2/roundtrip/blocks2dbk.dtd diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/blocks2dbk.xsl b/tools/docbook-xsl-1.73.2/roundtrip/blocks2dbk.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/blocks2dbk.xsl rename to tools/docbook-xsl-1.73.2/roundtrip/blocks2dbk.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/dbk2ooo.xsl b/tools/docbook-xsl-1.73.2/roundtrip/dbk2ooo.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/dbk2ooo.xsl rename to tools/docbook-xsl-1.73.2/roundtrip/dbk2ooo.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/dbk2pages.xsl b/tools/docbook-xsl-1.73.2/roundtrip/dbk2pages.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/dbk2pages.xsl rename to tools/docbook-xsl-1.73.2/roundtrip/dbk2pages.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/dbk2wordml.xsl b/tools/docbook-xsl-1.73.2/roundtrip/dbk2wordml.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/dbk2wordml.xsl rename to tools/docbook-xsl-1.73.2/roundtrip/dbk2wordml.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/dbk2wp.xsl b/tools/docbook-xsl-1.73.2/roundtrip/dbk2wp.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/dbk2wp.xsl rename to tools/docbook-xsl-1.73.2/roundtrip/dbk2wp.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/docbook-pages.xsl b/tools/docbook-xsl-1.73.2/roundtrip/docbook-pages.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/docbook-pages.xsl rename to tools/docbook-xsl-1.73.2/roundtrip/docbook-pages.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/docbook.xsl b/tools/docbook-xsl-1.73.2/roundtrip/docbook.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/docbook.xsl rename to tools/docbook-xsl-1.73.2/roundtrip/docbook.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/normalise2sections.xsl b/tools/docbook-xsl-1.73.2/roundtrip/normalise2sections.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/normalise2sections.xsl rename to tools/docbook-xsl-1.73.2/roundtrip/normalise2sections.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/pages-normalise.xsl b/tools/docbook-xsl-1.73.2/roundtrip/pages-normalise.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/pages-normalise.xsl rename to tools/docbook-xsl-1.73.2/roundtrip/pages-normalise.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/pages2normalise.xsl b/tools/docbook-xsl-1.73.2/roundtrip/pages2normalise.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/pages2normalise.xsl rename to tools/docbook-xsl-1.73.2/roundtrip/pages2normalise.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/param.xml b/tools/docbook-xsl-1.73.2/roundtrip/param.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/param.xml rename to tools/docbook-xsl-1.73.2/roundtrip/param.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/param.xsl b/tools/docbook-xsl-1.73.2/roundtrip/param.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/param.xsl rename to tools/docbook-xsl-1.73.2/roundtrip/param.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/sections-spec.xml b/tools/docbook-xsl-1.73.2/roundtrip/sections-spec.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/sections-spec.xml rename to tools/docbook-xsl-1.73.2/roundtrip/sections-spec.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/sections2blocks.xsl b/tools/docbook-xsl-1.73.2/roundtrip/sections2blocks.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/sections2blocks.xsl rename to tools/docbook-xsl-1.73.2/roundtrip/sections2blocks.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/specifications.xml b/tools/docbook-xsl-1.73.2/roundtrip/specifications.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/specifications.xml rename to tools/docbook-xsl-1.73.2/roundtrip/specifications.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/supported.xml b/tools/docbook-xsl-1.73.2/roundtrip/supported.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/supported.xml rename to tools/docbook-xsl-1.73.2/roundtrip/supported.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/template-pages.xml b/tools/docbook-xsl-1.73.2/roundtrip/template-pages.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/template-pages.xml rename to tools/docbook-xsl-1.73.2/roundtrip/template-pages.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/template.dot b/tools/docbook-xsl-1.73.2/roundtrip/template.dot similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/template.dot rename to tools/docbook-xsl-1.73.2/roundtrip/template.dot diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/template.xml b/tools/docbook-xsl-1.73.2/roundtrip/template.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/template.xml rename to tools/docbook-xsl-1.73.2/roundtrip/template.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/wordml-blocks.xsl b/tools/docbook-xsl-1.73.2/roundtrip/wordml-blocks.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/wordml-blocks.xsl rename to tools/docbook-xsl-1.73.2/roundtrip/wordml-blocks.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/wordml-final.xsl b/tools/docbook-xsl-1.73.2/roundtrip/wordml-final.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/wordml-final.xsl rename to tools/docbook-xsl-1.73.2/roundtrip/wordml-final.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/wordml-normalise.xsl b/tools/docbook-xsl-1.73.2/roundtrip/wordml-normalise.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/wordml-normalise.xsl rename to tools/docbook-xsl-1.73.2/roundtrip/wordml-normalise.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/wordml-sections.xsl b/tools/docbook-xsl-1.73.2/roundtrip/wordml-sections.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/wordml-sections.xsl rename to tools/docbook-xsl-1.73.2/roundtrip/wordml-sections.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/wordml.xsl b/tools/docbook-xsl-1.73.2/roundtrip/wordml.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/wordml.xsl rename to tools/docbook-xsl-1.73.2/roundtrip/wordml.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/wordml2normalise.xsl b/tools/docbook-xsl-1.73.2/roundtrip/wordml2normalise.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/roundtrip/wordml2normalise.xsl rename to tools/docbook-xsl-1.73.2/roundtrip/wordml2normalise.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/CTOCWidget.js b/tools/docbook-xsl-1.73.2/slides/browser/CTOCWidget.js similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/CTOCWidget.js rename to tools/docbook-xsl-1.73.2/slides/browser/CTOCWidget.js diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/overlay.js b/tools/docbook-xsl-1.73.2/slides/browser/overlay.js similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/overlay.js rename to tools/docbook-xsl-1.73.2/slides/browser/overlay.js diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/slides-default.css b/tools/docbook-xsl-1.73.2/slides/browser/slides-default.css similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/slides-default.css rename to tools/docbook-xsl-1.73.2/slides/browser/slides-default.css diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/slides-frames.css b/tools/docbook-xsl-1.73.2/slides/browser/slides-frames.css similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/slides-frames.css rename to tools/docbook-xsl-1.73.2/slides/browser/slides-frames.css diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/slides-plain.css b/tools/docbook-xsl-1.73.2/slides/browser/slides-plain.css similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/slides-plain.css rename to tools/docbook-xsl-1.73.2/slides/browser/slides-plain.css diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/slides-table.css b/tools/docbook-xsl-1.73.2/slides/browser/slides-table.css similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/slides-table.css rename to tools/docbook-xsl-1.73.2/slides/browser/slides-table.css diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/slides-w3c.css b/tools/docbook-xsl-1.73.2/slides/browser/slides-w3c.css similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/slides-w3c.css rename to tools/docbook-xsl-1.73.2/slides/browser/slides-w3c.css diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/slides.css b/tools/docbook-xsl-1.73.2/slides/browser/slides.css similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/slides.css rename to tools/docbook-xsl-1.73.2/slides/browser/slides.css diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/slides.js b/tools/docbook-xsl-1.73.2/slides/browser/slides.js similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/slides.js rename to tools/docbook-xsl-1.73.2/slides/browser/slides.js diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/ua.js b/tools/docbook-xsl-1.73.2/slides/browser/ua.js similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/ua.js rename to tools/docbook-xsl-1.73.2/slides/browser/ua.js diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/xbCollapsibleLists.js b/tools/docbook-xsl-1.73.2/slides/browser/xbCollapsibleLists.js similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/xbCollapsibleLists.js rename to tools/docbook-xsl-1.73.2/slides/browser/xbCollapsibleLists.js diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/xbDOM.js b/tools/docbook-xsl-1.73.2/slides/browser/xbDOM.js similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/xbDOM.js rename to tools/docbook-xsl-1.73.2/slides/browser/xbDOM.js diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/xbDebug.js b/tools/docbook-xsl-1.73.2/slides/browser/xbDebug.js similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/xbDebug.js rename to tools/docbook-xsl-1.73.2/slides/browser/xbDebug.js diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/xbLibrary.js b/tools/docbook-xsl-1.73.2/slides/browser/xbLibrary.js similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/xbLibrary.js rename to tools/docbook-xsl-1.73.2/slides/browser/xbLibrary.js diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/xbStyle-css.js b/tools/docbook-xsl-1.73.2/slides/browser/xbStyle-css.js similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/xbStyle-css.js rename to tools/docbook-xsl-1.73.2/slides/browser/xbStyle-css.js diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/xbStyle-nn4.js b/tools/docbook-xsl-1.73.2/slides/browser/xbStyle-nn4.js similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/xbStyle-nn4.js rename to tools/docbook-xsl-1.73.2/slides/browser/xbStyle-nn4.js diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/xbStyle-not-supported.js b/tools/docbook-xsl-1.73.2/slides/browser/xbStyle-not-supported.js similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/xbStyle-not-supported.js rename to tools/docbook-xsl-1.73.2/slides/browser/xbStyle-not-supported.js diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/xbStyle.js b/tools/docbook-xsl-1.73.2/slides/browser/xbStyle.js similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/browser/xbStyle.js rename to tools/docbook-xsl-1.73.2/slides/browser/xbStyle.js diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/fo/param.xml b/tools/docbook-xsl-1.73.2/slides/fo/param.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/fo/param.xml rename to tools/docbook-xsl-1.73.2/slides/fo/param.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/fo/param.xsl b/tools/docbook-xsl-1.73.2/slides/fo/param.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/fo/param.xsl rename to tools/docbook-xsl-1.73.2/slides/fo/param.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/fo/plain-titlepage.xml b/tools/docbook-xsl-1.73.2/slides/fo/plain-titlepage.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/fo/plain-titlepage.xml rename to tools/docbook-xsl-1.73.2/slides/fo/plain-titlepage.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/fo/plain-titlepage.xsl b/tools/docbook-xsl-1.73.2/slides/fo/plain-titlepage.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/fo/plain-titlepage.xsl rename to tools/docbook-xsl-1.73.2/slides/fo/plain-titlepage.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/fo/plain.xsl b/tools/docbook-xsl-1.73.2/slides/fo/plain.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/fo/plain.xsl rename to tools/docbook-xsl-1.73.2/slides/fo/plain.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/arr-next.png b/tools/docbook-xsl-1.73.2/slides/graphics/active/arr-next.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/arr-next.png rename to tools/docbook-xsl-1.73.2/slides/graphics/active/arr-next.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/arr-prev.png b/tools/docbook-xsl-1.73.2/slides/graphics/active/arr-prev.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/arr-prev.png rename to tools/docbook-xsl-1.73.2/slides/graphics/active/arr-prev.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/but-fforward.png b/tools/docbook-xsl-1.73.2/slides/graphics/active/but-fforward.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/but-fforward.png rename to tools/docbook-xsl-1.73.2/slides/graphics/active/but-fforward.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/but-info.png b/tools/docbook-xsl-1.73.2/slides/graphics/active/but-info.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/but-info.png rename to tools/docbook-xsl-1.73.2/slides/graphics/active/but-info.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/but-next.png b/tools/docbook-xsl-1.73.2/slides/graphics/active/but-next.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/but-next.png rename to tools/docbook-xsl-1.73.2/slides/graphics/active/but-next.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/but-prev.png b/tools/docbook-xsl-1.73.2/slides/graphics/active/but-prev.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/but-prev.png rename to tools/docbook-xsl-1.73.2/slides/graphics/active/but-prev.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/but-rewind.png b/tools/docbook-xsl-1.73.2/slides/graphics/active/but-rewind.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/but-rewind.png rename to tools/docbook-xsl-1.73.2/slides/graphics/active/but-rewind.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/nav-home.png b/tools/docbook-xsl-1.73.2/slides/graphics/active/nav-home.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/nav-home.png rename to tools/docbook-xsl-1.73.2/slides/graphics/active/nav-home.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/nav-next.png b/tools/docbook-xsl-1.73.2/slides/graphics/active/nav-next.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/nav-next.png rename to tools/docbook-xsl-1.73.2/slides/graphics/active/nav-next.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/nav-prev.png b/tools/docbook-xsl-1.73.2/slides/graphics/active/nav-prev.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/nav-prev.png rename to tools/docbook-xsl-1.73.2/slides/graphics/active/nav-prev.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/nav-toc.png b/tools/docbook-xsl-1.73.2/slides/graphics/active/nav-toc.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/nav-toc.png rename to tools/docbook-xsl-1.73.2/slides/graphics/active/nav-toc.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/nav-up.png b/tools/docbook-xsl-1.73.2/slides/graphics/active/nav-up.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/nav-up.png rename to tools/docbook-xsl-1.73.2/slides/graphics/active/nav-up.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/w3c-next.png b/tools/docbook-xsl-1.73.2/slides/graphics/active/w3c-next.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/w3c-next.png rename to tools/docbook-xsl-1.73.2/slides/graphics/active/w3c-next.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/w3c-prev.png b/tools/docbook-xsl-1.73.2/slides/graphics/active/w3c-prev.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/w3c-prev.png rename to tools/docbook-xsl-1.73.2/slides/graphics/active/w3c-prev.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/w3c-toc.png b/tools/docbook-xsl-1.73.2/slides/graphics/active/w3c-toc.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/active/w3c-toc.png rename to tools/docbook-xsl-1.73.2/slides/graphics/active/w3c-toc.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/arrow.gif b/tools/docbook-xsl-1.73.2/slides/graphics/arrow.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/arrow.gif rename to tools/docbook-xsl-1.73.2/slides/graphics/arrow.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/blank.gif b/tools/docbook-xsl-1.73.2/slides/graphics/blank.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/blank.gif rename to tools/docbook-xsl-1.73.2/slides/graphics/blank.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/blank.png b/tools/docbook-xsl-1.73.2/slides/graphics/blank.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/blank.png rename to tools/docbook-xsl-1.73.2/slides/graphics/blank.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/hidetoc.gif b/tools/docbook-xsl-1.73.2/slides/graphics/hidetoc.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/hidetoc.gif rename to tools/docbook-xsl-1.73.2/slides/graphics/hidetoc.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/inactive/but-fforward.png b/tools/docbook-xsl-1.73.2/slides/graphics/inactive/but-fforward.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/inactive/but-fforward.png rename to tools/docbook-xsl-1.73.2/slides/graphics/inactive/but-fforward.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/inactive/but-info.png b/tools/docbook-xsl-1.73.2/slides/graphics/inactive/but-info.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/inactive/but-info.png rename to tools/docbook-xsl-1.73.2/slides/graphics/inactive/but-info.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/inactive/but-next.png b/tools/docbook-xsl-1.73.2/slides/graphics/inactive/but-next.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/inactive/but-next.png rename to tools/docbook-xsl-1.73.2/slides/graphics/inactive/but-next.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/inactive/but-prev.png b/tools/docbook-xsl-1.73.2/slides/graphics/inactive/but-prev.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/inactive/but-prev.png rename to tools/docbook-xsl-1.73.2/slides/graphics/inactive/but-prev.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/inactive/but-rewind.png b/tools/docbook-xsl-1.73.2/slides/graphics/inactive/but-rewind.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/inactive/but-rewind.png rename to tools/docbook-xsl-1.73.2/slides/graphics/inactive/but-rewind.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/inactive/nav-home.png b/tools/docbook-xsl-1.73.2/slides/graphics/inactive/nav-home.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/inactive/nav-home.png rename to tools/docbook-xsl-1.73.2/slides/graphics/inactive/nav-home.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/inactive/nav-next.png b/tools/docbook-xsl-1.73.2/slides/graphics/inactive/nav-next.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/inactive/nav-next.png rename to tools/docbook-xsl-1.73.2/slides/graphics/inactive/nav-next.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/inactive/nav-prev.png b/tools/docbook-xsl-1.73.2/slides/graphics/inactive/nav-prev.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/inactive/nav-prev.png rename to tools/docbook-xsl-1.73.2/slides/graphics/inactive/nav-prev.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/inactive/nav-toc.png b/tools/docbook-xsl-1.73.2/slides/graphics/inactive/nav-toc.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/inactive/nav-toc.png rename to tools/docbook-xsl-1.73.2/slides/graphics/inactive/nav-toc.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/inactive/nav-up.png b/tools/docbook-xsl-1.73.2/slides/graphics/inactive/nav-up.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/inactive/nav-up.png rename to tools/docbook-xsl-1.73.2/slides/graphics/inactive/nav-up.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/inactive/w3c-next.png b/tools/docbook-xsl-1.73.2/slides/graphics/inactive/w3c-next.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/inactive/w3c-next.png rename to tools/docbook-xsl-1.73.2/slides/graphics/inactive/w3c-next.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/inactive/w3c-prev.png b/tools/docbook-xsl-1.73.2/slides/graphics/inactive/w3c-prev.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/inactive/w3c-prev.png rename to tools/docbook-xsl-1.73.2/slides/graphics/inactive/w3c-prev.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/inactive/w3c-toc.png b/tools/docbook-xsl-1.73.2/slides/graphics/inactive/w3c-toc.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/inactive/w3c-toc.png rename to tools/docbook-xsl-1.73.2/slides/graphics/inactive/w3c-toc.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/plus.gif b/tools/docbook-xsl-1.73.2/slides/graphics/plus.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/plus.gif rename to tools/docbook-xsl-1.73.2/slides/graphics/plus.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/pointer.png b/tools/docbook-xsl-1.73.2/slides/graphics/pointer.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/pointer.png rename to tools/docbook-xsl-1.73.2/slides/graphics/pointer.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/showtoc.gif b/tools/docbook-xsl-1.73.2/slides/graphics/showtoc.gif similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/showtoc.gif rename to tools/docbook-xsl-1.73.2/slides/graphics/showtoc.gif diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/toc/bullet.png b/tools/docbook-xsl-1.73.2/slides/graphics/toc/bullet.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/toc/bullet.png rename to tools/docbook-xsl-1.73.2/slides/graphics/toc/bullet.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/toc/closed.png b/tools/docbook-xsl-1.73.2/slides/graphics/toc/closed.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/toc/closed.png rename to tools/docbook-xsl-1.73.2/slides/graphics/toc/closed.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/toc/open.png b/tools/docbook-xsl-1.73.2/slides/graphics/toc/open.png similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/graphics/toc/open.png rename to tools/docbook-xsl-1.73.2/slides/graphics/toc/open.png diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/html/css.xsl b/tools/docbook-xsl-1.73.2/slides/html/css.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/html/css.xsl rename to tools/docbook-xsl-1.73.2/slides/html/css.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/html/default.xsl b/tools/docbook-xsl-1.73.2/slides/html/default.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/html/default.xsl rename to tools/docbook-xsl-1.73.2/slides/html/default.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/html/flat.xsl b/tools/docbook-xsl-1.73.2/slides/html/flat.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/html/flat.xsl rename to tools/docbook-xsl-1.73.2/slides/html/flat.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/html/frames.xsl b/tools/docbook-xsl-1.73.2/slides/html/frames.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/html/frames.xsl rename to tools/docbook-xsl-1.73.2/slides/html/frames.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/html/graphics.xsl b/tools/docbook-xsl-1.73.2/slides/html/graphics.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/html/graphics.xsl rename to tools/docbook-xsl-1.73.2/slides/html/graphics.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/html/jscript.xsl b/tools/docbook-xsl-1.73.2/slides/html/jscript.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/html/jscript.xsl rename to tools/docbook-xsl-1.73.2/slides/html/jscript.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/html/param.xml b/tools/docbook-xsl-1.73.2/slides/html/param.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/html/param.xml rename to tools/docbook-xsl-1.73.2/slides/html/param.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/html/param.xsl b/tools/docbook-xsl-1.73.2/slides/html/param.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/html/param.xsl rename to tools/docbook-xsl-1.73.2/slides/html/param.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/html/plain.xsl b/tools/docbook-xsl-1.73.2/slides/html/plain.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/html/plain.xsl rename to tools/docbook-xsl-1.73.2/slides/html/plain.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/html/slides-common.xsl b/tools/docbook-xsl-1.73.2/slides/html/slides-common.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/html/slides-common.xsl rename to tools/docbook-xsl-1.73.2/slides/html/slides-common.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/html/tables.xsl b/tools/docbook-xsl-1.73.2/slides/html/tables.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/html/tables.xsl rename to tools/docbook-xsl-1.73.2/slides/html/tables.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/html/vslides.xsl b/tools/docbook-xsl-1.73.2/slides/html/vslides.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/html/vslides.xsl rename to tools/docbook-xsl-1.73.2/slides/html/vslides.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/html/w3c.xsl b/tools/docbook-xsl-1.73.2/slides/html/w3c.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/html/w3c.xsl rename to tools/docbook-xsl-1.73.2/slides/html/w3c.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/htmlhelp/htmlhelp.xsl b/tools/docbook-xsl-1.73.2/slides/htmlhelp/htmlhelp.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/htmlhelp/htmlhelp.xsl rename to tools/docbook-xsl-1.73.2/slides/htmlhelp/htmlhelp.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/keynote/default.xsl b/tools/docbook-xsl-1.73.2/slides/keynote/default.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/keynote/default.xsl rename to tools/docbook-xsl-1.73.2/slides/keynote/default.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/cmp.xsl b/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/cmp.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/cmp.xsl rename to tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/cmp.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/date-time.xsl b/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/date-time.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/date-time.xsl rename to tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/date-time.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/example.xsl b/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/example.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/example.xsl rename to tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/example.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/markup.xsl b/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/markup.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/markup.xsl rename to tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/markup.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/math.xsl b/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/math.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/math.xsl rename to tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/math.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/node.xsl b/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/node.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/node.xsl rename to tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/node.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/stdlib.xsl b/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/stdlib.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/stdlib.xsl rename to tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/stdlib.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/string.xsl b/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/string.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/string.xsl rename to tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/string.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/svg.xsl b/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/svg.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/svg.xsl rename to tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/svg.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/uri.xsl b/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/uri.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/uri.xsl rename to tools/docbook-xsl-1.73.2/slides/keynote/xsltsl/uri.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/svg/default.xsl b/tools/docbook-xsl-1.73.2/slides/svg/default.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/svg/default.xsl rename to tools/docbook-xsl-1.73.2/slides/svg/default.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/xhtml/css.xsl b/tools/docbook-xsl-1.73.2/slides/xhtml/css.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/xhtml/css.xsl rename to tools/docbook-xsl-1.73.2/slides/xhtml/css.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/xhtml/default.xsl b/tools/docbook-xsl-1.73.2/slides/xhtml/default.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/xhtml/default.xsl rename to tools/docbook-xsl-1.73.2/slides/xhtml/default.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/xhtml/flat.xsl b/tools/docbook-xsl-1.73.2/slides/xhtml/flat.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/xhtml/flat.xsl rename to tools/docbook-xsl-1.73.2/slides/xhtml/flat.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/xhtml/frames.xsl b/tools/docbook-xsl-1.73.2/slides/xhtml/frames.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/xhtml/frames.xsl rename to tools/docbook-xsl-1.73.2/slides/xhtml/frames.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/xhtml/graphics.xsl b/tools/docbook-xsl-1.73.2/slides/xhtml/graphics.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/xhtml/graphics.xsl rename to tools/docbook-xsl-1.73.2/slides/xhtml/graphics.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/xhtml/jscript.xsl b/tools/docbook-xsl-1.73.2/slides/xhtml/jscript.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/xhtml/jscript.xsl rename to tools/docbook-xsl-1.73.2/slides/xhtml/jscript.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/xhtml/param.xsl b/tools/docbook-xsl-1.73.2/slides/xhtml/param.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/xhtml/param.xsl rename to tools/docbook-xsl-1.73.2/slides/xhtml/param.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/xhtml/plain.xsl b/tools/docbook-xsl-1.73.2/slides/xhtml/plain.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/xhtml/plain.xsl rename to tools/docbook-xsl-1.73.2/slides/xhtml/plain.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/xhtml/slides-common.xsl b/tools/docbook-xsl-1.73.2/slides/xhtml/slides-common.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/xhtml/slides-common.xsl rename to tools/docbook-xsl-1.73.2/slides/xhtml/slides-common.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/xhtml/tables.xsl b/tools/docbook-xsl-1.73.2/slides/xhtml/tables.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/xhtml/tables.xsl rename to tools/docbook-xsl-1.73.2/slides/xhtml/tables.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/xhtml/vslides.xsl b/tools/docbook-xsl-1.73.2/slides/xhtml/vslides.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/xhtml/vslides.xsl rename to tools/docbook-xsl-1.73.2/slides/xhtml/vslides.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/slides/xhtml/w3c.xsl b/tools/docbook-xsl-1.73.2/slides/xhtml/w3c.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/slides/xhtml/w3c.xsl rename to tools/docbook-xsl-1.73.2/slides/xhtml/w3c.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/template/titlepage.xml b/tools/docbook-xsl-1.73.2/template/titlepage.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/template/titlepage.xml rename to tools/docbook-xsl-1.73.2/template/titlepage.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/template/titlepage.xsl b/tools/docbook-xsl-1.73.2/template/titlepage.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/template/titlepage.xsl rename to tools/docbook-xsl-1.73.2/template/titlepage.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/tools/bin/docbook-xsl-update b/tools/docbook-xsl-1.73.2/tools/bin/docbook-xsl-update similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/tools/bin/docbook-xsl-update rename to tools/docbook-xsl-1.73.2/tools/bin/docbook-xsl-update diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/tools/make/Makefile.DocBook b/tools/docbook-xsl-1.73.2/tools/make/Makefile.DocBook similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/tools/make/Makefile.DocBook rename to tools/docbook-xsl-1.73.2/tools/make/Makefile.DocBook diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/tools/make/Makefile.combine b/tools/docbook-xsl-1.73.2/tools/make/Makefile.combine similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/tools/make/Makefile.combine rename to tools/docbook-xsl-1.73.2/tools/make/Makefile.combine diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/tools/make/Makefile.docParam b/tools/docbook-xsl-1.73.2/tools/make/Makefile.docParam similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/tools/make/Makefile.docParam rename to tools/docbook-xsl-1.73.2/tools/make/Makefile.docParam diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/website/autolayout.xsl b/tools/docbook-xsl-1.73.2/website/autolayout.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/website/autolayout.xsl rename to tools/docbook-xsl-1.73.2/website/autolayout.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/website/chunk-common.xsl b/tools/docbook-xsl-1.73.2/website/chunk-common.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/website/chunk-common.xsl rename to tools/docbook-xsl-1.73.2/website/chunk-common.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/website/chunk-tabular.xsl b/tools/docbook-xsl-1.73.2/website/chunk-tabular.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/website/chunk-tabular.xsl rename to tools/docbook-xsl-1.73.2/website/chunk-tabular.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/website/chunk-website.xsl b/tools/docbook-xsl-1.73.2/website/chunk-website.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/website/chunk-website.xsl rename to tools/docbook-xsl-1.73.2/website/chunk-website.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/website/head.xsl b/tools/docbook-xsl-1.73.2/website/head.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/website/head.xsl rename to tools/docbook-xsl-1.73.2/website/head.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/website/makefile-dep.xsl b/tools/docbook-xsl-1.73.2/website/makefile-dep.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/website/makefile-dep.xsl rename to tools/docbook-xsl-1.73.2/website/makefile-dep.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/website/olink.xsl b/tools/docbook-xsl-1.73.2/website/olink.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/website/olink.xsl rename to tools/docbook-xsl-1.73.2/website/olink.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/website/param.xml b/tools/docbook-xsl-1.73.2/website/param.xml similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/website/param.xml rename to tools/docbook-xsl-1.73.2/website/param.xml diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/website/param.xsl b/tools/docbook-xsl-1.73.2/website/param.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/website/param.xsl rename to tools/docbook-xsl-1.73.2/website/param.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/website/rss.xsl b/tools/docbook-xsl-1.73.2/website/rss.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/website/rss.xsl rename to tools/docbook-xsl-1.73.2/website/rss.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/website/tabular.xsl b/tools/docbook-xsl-1.73.2/website/tabular.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/website/tabular.xsl rename to tools/docbook-xsl-1.73.2/website/tabular.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/website/toc-tabular.xsl b/tools/docbook-xsl-1.73.2/website/toc-tabular.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/website/toc-tabular.xsl rename to tools/docbook-xsl-1.73.2/website/toc-tabular.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/website/toc.xsl b/tools/docbook-xsl-1.73.2/website/toc.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/website/toc.xsl rename to tools/docbook-xsl-1.73.2/website/toc.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/website/website-common.xsl b/tools/docbook-xsl-1.73.2/website/website-common.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/website/website-common.xsl rename to tools/docbook-xsl-1.73.2/website/website-common.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/website/website-targets.xsl b/tools/docbook-xsl-1.73.2/website/website-targets.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/website/website-targets.xsl rename to tools/docbook-xsl-1.73.2/website/website-targets.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/website/website.xsl b/tools/docbook-xsl-1.73.2/website/website.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/website/website.xsl rename to tools/docbook-xsl-1.73.2/website/website.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/website/xbel.xsl b/tools/docbook-xsl-1.73.2/website/xbel.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/website/xbel.xsl rename to tools/docbook-xsl-1.73.2/website/xbel.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/admon.xsl b/tools/docbook-xsl-1.73.2/xhtml/admon.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/admon.xsl rename to tools/docbook-xsl-1.73.2/xhtml/admon.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/annotations.xsl b/tools/docbook-xsl-1.73.2/xhtml/annotations.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/annotations.xsl rename to tools/docbook-xsl-1.73.2/xhtml/annotations.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/autoidx-kimber.xsl b/tools/docbook-xsl-1.73.2/xhtml/autoidx-kimber.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/autoidx-kimber.xsl rename to tools/docbook-xsl-1.73.2/xhtml/autoidx-kimber.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/autoidx-kosek.xsl b/tools/docbook-xsl-1.73.2/xhtml/autoidx-kosek.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/autoidx-kosek.xsl rename to tools/docbook-xsl-1.73.2/xhtml/autoidx-kosek.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/autoidx-ng.xsl b/tools/docbook-xsl-1.73.2/xhtml/autoidx-ng.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/autoidx-ng.xsl rename to tools/docbook-xsl-1.73.2/xhtml/autoidx-ng.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/autoidx.xsl b/tools/docbook-xsl-1.73.2/xhtml/autoidx.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/autoidx.xsl rename to tools/docbook-xsl-1.73.2/xhtml/autoidx.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/autotoc.xsl b/tools/docbook-xsl-1.73.2/xhtml/autotoc.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/autotoc.xsl rename to tools/docbook-xsl-1.73.2/xhtml/autotoc.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/biblio-iso690.xsl b/tools/docbook-xsl-1.73.2/xhtml/biblio-iso690.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/biblio-iso690.xsl rename to tools/docbook-xsl-1.73.2/xhtml/biblio-iso690.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/biblio.xsl b/tools/docbook-xsl-1.73.2/xhtml/biblio.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/biblio.xsl rename to tools/docbook-xsl-1.73.2/xhtml/biblio.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/block.xsl b/tools/docbook-xsl-1.73.2/xhtml/block.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/block.xsl rename to tools/docbook-xsl-1.73.2/xhtml/block.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/callout.xsl b/tools/docbook-xsl-1.73.2/xhtml/callout.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/callout.xsl rename to tools/docbook-xsl-1.73.2/xhtml/callout.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/changebars.xsl b/tools/docbook-xsl-1.73.2/xhtml/changebars.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/changebars.xsl rename to tools/docbook-xsl-1.73.2/xhtml/changebars.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/chunk-code.xsl b/tools/docbook-xsl-1.73.2/xhtml/chunk-code.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/chunk-code.xsl rename to tools/docbook-xsl-1.73.2/xhtml/chunk-code.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/chunk-common.xsl b/tools/docbook-xsl-1.73.2/xhtml/chunk-common.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/chunk-common.xsl rename to tools/docbook-xsl-1.73.2/xhtml/chunk-common.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/chunk.xsl b/tools/docbook-xsl-1.73.2/xhtml/chunk.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/chunk.xsl rename to tools/docbook-xsl-1.73.2/xhtml/chunk.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/chunker.xsl b/tools/docbook-xsl-1.73.2/xhtml/chunker.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/chunker.xsl rename to tools/docbook-xsl-1.73.2/xhtml/chunker.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/chunkfast.xsl b/tools/docbook-xsl-1.73.2/xhtml/chunkfast.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/chunkfast.xsl rename to tools/docbook-xsl-1.73.2/xhtml/chunkfast.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/chunktoc.xsl b/tools/docbook-xsl-1.73.2/xhtml/chunktoc.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/chunktoc.xsl rename to tools/docbook-xsl-1.73.2/xhtml/chunktoc.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/component.xsl b/tools/docbook-xsl-1.73.2/xhtml/component.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/component.xsl rename to tools/docbook-xsl-1.73.2/xhtml/component.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/division.xsl b/tools/docbook-xsl-1.73.2/xhtml/division.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/division.xsl rename to tools/docbook-xsl-1.73.2/xhtml/division.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/docbook.xsl b/tools/docbook-xsl-1.73.2/xhtml/docbook.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/docbook.xsl rename to tools/docbook-xsl-1.73.2/xhtml/docbook.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/ebnf.xsl b/tools/docbook-xsl-1.73.2/xhtml/ebnf.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/ebnf.xsl rename to tools/docbook-xsl-1.73.2/xhtml/ebnf.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/footnote.xsl b/tools/docbook-xsl-1.73.2/xhtml/footnote.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/footnote.xsl rename to tools/docbook-xsl-1.73.2/xhtml/footnote.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/formal.xsl b/tools/docbook-xsl-1.73.2/xhtml/formal.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/formal.xsl rename to tools/docbook-xsl-1.73.2/xhtml/formal.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/glossary.xsl b/tools/docbook-xsl-1.73.2/xhtml/glossary.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/glossary.xsl rename to tools/docbook-xsl-1.73.2/xhtml/glossary.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/graphics.xsl b/tools/docbook-xsl-1.73.2/xhtml/graphics.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/graphics.xsl rename to tools/docbook-xsl-1.73.2/xhtml/graphics.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/highlight.xsl b/tools/docbook-xsl-1.73.2/xhtml/highlight.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/highlight.xsl rename to tools/docbook-xsl-1.73.2/xhtml/highlight.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/html-rtf.xsl b/tools/docbook-xsl-1.73.2/xhtml/html-rtf.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/html-rtf.xsl rename to tools/docbook-xsl-1.73.2/xhtml/html-rtf.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/html.xsl b/tools/docbook-xsl-1.73.2/xhtml/html.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/html.xsl rename to tools/docbook-xsl-1.73.2/xhtml/html.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/htmltbl.xsl b/tools/docbook-xsl-1.73.2/xhtml/htmltbl.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/htmltbl.xsl rename to tools/docbook-xsl-1.73.2/xhtml/htmltbl.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/index.xsl b/tools/docbook-xsl-1.73.2/xhtml/index.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/index.xsl rename to tools/docbook-xsl-1.73.2/xhtml/index.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/info.xsl b/tools/docbook-xsl-1.73.2/xhtml/info.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/info.xsl rename to tools/docbook-xsl-1.73.2/xhtml/info.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/inline.xsl b/tools/docbook-xsl-1.73.2/xhtml/inline.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/inline.xsl rename to tools/docbook-xsl-1.73.2/xhtml/inline.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/keywords.xsl b/tools/docbook-xsl-1.73.2/xhtml/keywords.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/keywords.xsl rename to tools/docbook-xsl-1.73.2/xhtml/keywords.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/lists.xsl b/tools/docbook-xsl-1.73.2/xhtml/lists.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/lists.xsl rename to tools/docbook-xsl-1.73.2/xhtml/lists.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/maketoc.xsl b/tools/docbook-xsl-1.73.2/xhtml/maketoc.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/maketoc.xsl rename to tools/docbook-xsl-1.73.2/xhtml/maketoc.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/manifest.xsl b/tools/docbook-xsl-1.73.2/xhtml/manifest.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/manifest.xsl rename to tools/docbook-xsl-1.73.2/xhtml/manifest.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/math.xsl b/tools/docbook-xsl-1.73.2/xhtml/math.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/math.xsl rename to tools/docbook-xsl-1.73.2/xhtml/math.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/oldchunker.xsl b/tools/docbook-xsl-1.73.2/xhtml/oldchunker.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/oldchunker.xsl rename to tools/docbook-xsl-1.73.2/xhtml/oldchunker.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/onechunk.xsl b/tools/docbook-xsl-1.73.2/xhtml/onechunk.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/onechunk.xsl rename to tools/docbook-xsl-1.73.2/xhtml/onechunk.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/param.xsl b/tools/docbook-xsl-1.73.2/xhtml/param.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/param.xsl rename to tools/docbook-xsl-1.73.2/xhtml/param.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/pi.xsl b/tools/docbook-xsl-1.73.2/xhtml/pi.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/pi.xsl rename to tools/docbook-xsl-1.73.2/xhtml/pi.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/profile-chunk-code.xsl b/tools/docbook-xsl-1.73.2/xhtml/profile-chunk-code.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/profile-chunk-code.xsl rename to tools/docbook-xsl-1.73.2/xhtml/profile-chunk-code.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/profile-chunk.xsl b/tools/docbook-xsl-1.73.2/xhtml/profile-chunk.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/profile-chunk.xsl rename to tools/docbook-xsl-1.73.2/xhtml/profile-chunk.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/profile-docbook.xsl b/tools/docbook-xsl-1.73.2/xhtml/profile-docbook.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/profile-docbook.xsl rename to tools/docbook-xsl-1.73.2/xhtml/profile-docbook.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/profile-onechunk.xsl b/tools/docbook-xsl-1.73.2/xhtml/profile-onechunk.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/profile-onechunk.xsl rename to tools/docbook-xsl-1.73.2/xhtml/profile-onechunk.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/qandaset.xsl b/tools/docbook-xsl-1.73.2/xhtml/qandaset.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/qandaset.xsl rename to tools/docbook-xsl-1.73.2/xhtml/qandaset.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/refentry.xsl b/tools/docbook-xsl-1.73.2/xhtml/refentry.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/refentry.xsl rename to tools/docbook-xsl-1.73.2/xhtml/refentry.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/sections.xsl b/tools/docbook-xsl-1.73.2/xhtml/sections.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/sections.xsl rename to tools/docbook-xsl-1.73.2/xhtml/sections.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/synop.xsl b/tools/docbook-xsl-1.73.2/xhtml/synop.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/synop.xsl rename to tools/docbook-xsl-1.73.2/xhtml/synop.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/table.xsl b/tools/docbook-xsl-1.73.2/xhtml/table.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/table.xsl rename to tools/docbook-xsl-1.73.2/xhtml/table.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/task.xsl b/tools/docbook-xsl-1.73.2/xhtml/task.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/task.xsl rename to tools/docbook-xsl-1.73.2/xhtml/task.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/titlepage.templates.xsl b/tools/docbook-xsl-1.73.2/xhtml/titlepage.templates.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/titlepage.templates.xsl rename to tools/docbook-xsl-1.73.2/xhtml/titlepage.templates.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/titlepage.xsl b/tools/docbook-xsl-1.73.2/xhtml/titlepage.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/titlepage.xsl rename to tools/docbook-xsl-1.73.2/xhtml/titlepage.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/toc.xsl b/tools/docbook-xsl-1.73.2/xhtml/toc.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/toc.xsl rename to tools/docbook-xsl-1.73.2/xhtml/toc.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/verbatim.xsl b/tools/docbook-xsl-1.73.2/xhtml/verbatim.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/verbatim.xsl rename to tools/docbook-xsl-1.73.2/xhtml/verbatim.xsl diff --git a/jonas_doc/tools/docbook-xsl-1.73.2/xhtml/xref.xsl b/tools/docbook-xsl-1.73.2/xhtml/xref.xsl similarity index 100% rename from jonas_doc/tools/docbook-xsl-1.73.2/xhtml/xref.xsl rename to tools/docbook-xsl-1.73.2/xhtml/xref.xsl diff --git a/jonas_doc/tools/fop-0.95/KEYS b/tools/fop-0.95/KEYS similarity index 100% rename from jonas_doc/tools/fop-0.95/KEYS rename to tools/fop-0.95/KEYS diff --git a/jonas_doc/tools/fop-0.95/LICENSE b/tools/fop-0.95/LICENSE similarity index 100% rename from jonas_doc/tools/fop-0.95/LICENSE rename to tools/fop-0.95/LICENSE diff --git a/jonas_doc/tools/fop-0.95/NOTICE b/tools/fop-0.95/NOTICE similarity index 100% rename from jonas_doc/tools/fop-0.95/NOTICE rename to tools/fop-0.95/NOTICE diff --git a/jonas_doc/tools/fop-0.95/README b/tools/fop-0.95/README similarity index 100% rename from jonas_doc/tools/fop-0.95/README rename to tools/fop-0.95/README diff --git a/jonas_doc/tools/fop-0.95/build/fop.jar b/tools/fop-0.95/build/fop.jar similarity index 100% rename from jonas_doc/tools/fop-0.95/build/fop.jar rename to tools/fop-0.95/build/fop.jar diff --git a/jonas_doc/tools/fop-0.95/conf/fop.xconf b/tools/fop-0.95/conf/fop.xconf similarity index 100% rename from jonas_doc/tools/fop-0.95/conf/fop.xconf rename to tools/fop-0.95/conf/fop.xconf diff --git a/jonas_doc/tools/fop-0.95/fop b/tools/fop-0.95/fop similarity index 100% rename from jonas_doc/tools/fop-0.95/fop rename to tools/fop-0.95/fop diff --git a/jonas_doc/tools/fop-0.95/fop.bat b/tools/fop-0.95/fop.bat similarity index 100% rename from jonas_doc/tools/fop-0.95/fop.bat rename to tools/fop-0.95/fop.bat diff --git a/jonas_doc/tools/fop-0.95/lib/README.txt b/tools/fop-0.95/lib/README.txt similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/README.txt rename to tools/fop-0.95/lib/README.txt diff --git a/jonas_doc/tools/fop-0.95/lib/avalon-framework-4.2.0.jar b/tools/fop-0.95/lib/avalon-framework-4.2.0.jar similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/avalon-framework-4.2.0.jar rename to tools/fop-0.95/lib/avalon-framework-4.2.0.jar diff --git a/jonas_doc/tools/fop-0.95/lib/avalon-framework.LICENSE.txt b/tools/fop-0.95/lib/avalon-framework.LICENSE.txt similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/avalon-framework.LICENSE.txt rename to tools/fop-0.95/lib/avalon-framework.LICENSE.txt diff --git a/jonas_doc/tools/fop-0.95/lib/avalon-framework.NOTICE.TXT b/tools/fop-0.95/lib/avalon-framework.NOTICE.TXT similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/avalon-framework.NOTICE.TXT rename to tools/fop-0.95/lib/avalon-framework.NOTICE.TXT diff --git a/jonas_doc/tools/fop-0.95/lib/batik-all-1.7.jar b/tools/fop-0.95/lib/batik-all-1.7.jar similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/batik-all-1.7.jar rename to tools/fop-0.95/lib/batik-all-1.7.jar diff --git a/jonas_doc/tools/fop-0.95/lib/batik.LICENSE.txt b/tools/fop-0.95/lib/batik.LICENSE.txt similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/batik.LICENSE.txt rename to tools/fop-0.95/lib/batik.LICENSE.txt diff --git a/jonas_doc/tools/fop-0.95/lib/batik.NOTICE.txt b/tools/fop-0.95/lib/batik.NOTICE.txt similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/batik.NOTICE.txt rename to tools/fop-0.95/lib/batik.NOTICE.txt diff --git a/jonas_doc/tools/fop-0.95/lib/commons-io-1.3.1.jar b/tools/fop-0.95/lib/commons-io-1.3.1.jar similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/commons-io-1.3.1.jar rename to tools/fop-0.95/lib/commons-io-1.3.1.jar diff --git a/jonas_doc/tools/fop-0.95/lib/commons-io.LICENSE.txt b/tools/fop-0.95/lib/commons-io.LICENSE.txt similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/commons-io.LICENSE.txt rename to tools/fop-0.95/lib/commons-io.LICENSE.txt diff --git a/jonas_doc/tools/fop-0.95/lib/commons-io.NOTICE.txt b/tools/fop-0.95/lib/commons-io.NOTICE.txt similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/commons-io.NOTICE.txt rename to tools/fop-0.95/lib/commons-io.NOTICE.txt diff --git a/jonas_doc/tools/fop-0.95/lib/commons-logging-1.0.4.jar b/tools/fop-0.95/lib/commons-logging-1.0.4.jar similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/commons-logging-1.0.4.jar rename to tools/fop-0.95/lib/commons-logging-1.0.4.jar diff --git a/jonas_doc/tools/fop-0.95/lib/commons-logging.LICENSE.txt b/tools/fop-0.95/lib/commons-logging.LICENSE.txt similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/commons-logging.LICENSE.txt rename to tools/fop-0.95/lib/commons-logging.LICENSE.txt diff --git a/jonas_doc/tools/fop-0.95/lib/commons-logging.NOTICE.txt b/tools/fop-0.95/lib/commons-logging.NOTICE.txt similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/commons-logging.NOTICE.txt rename to tools/fop-0.95/lib/commons-logging.NOTICE.txt diff --git a/jonas_doc/tools/fop-0.95/lib/serializer-2.7.0.jar b/tools/fop-0.95/lib/serializer-2.7.0.jar similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/serializer-2.7.0.jar rename to tools/fop-0.95/lib/serializer-2.7.0.jar diff --git a/jonas_doc/tools/fop-0.95/lib/serializer.LICENSE.txt b/tools/fop-0.95/lib/serializer.LICENSE.txt similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/serializer.LICENSE.txt rename to tools/fop-0.95/lib/serializer.LICENSE.txt diff --git a/jonas_doc/tools/fop-0.95/lib/serializer.NOTICE.txt b/tools/fop-0.95/lib/serializer.NOTICE.txt similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/serializer.NOTICE.txt rename to tools/fop-0.95/lib/serializer.NOTICE.txt diff --git a/jonas_doc/tools/fop-0.95/lib/xalan-2.7.0.jar b/tools/fop-0.95/lib/xalan-2.7.0.jar similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/xalan-2.7.0.jar rename to tools/fop-0.95/lib/xalan-2.7.0.jar diff --git a/jonas_doc/tools/fop-0.95/lib/xalan.BCEL.LICENSE.txt b/tools/fop-0.95/lib/xalan.BCEL.LICENSE.txt similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/xalan.BCEL.LICENSE.txt rename to tools/fop-0.95/lib/xalan.BCEL.LICENSE.txt diff --git a/jonas_doc/tools/fop-0.95/lib/xalan.LICENSE.txt b/tools/fop-0.95/lib/xalan.LICENSE.txt similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/xalan.LICENSE.txt rename to tools/fop-0.95/lib/xalan.LICENSE.txt diff --git a/jonas_doc/tools/fop-0.95/lib/xalan.NOTICE.txt b/tools/fop-0.95/lib/xalan.NOTICE.txt similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/xalan.NOTICE.txt rename to tools/fop-0.95/lib/xalan.NOTICE.txt diff --git a/jonas_doc/tools/fop-0.95/lib/xalan.regexp.LICENSE.txt b/tools/fop-0.95/lib/xalan.regexp.LICENSE.txt similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/xalan.regexp.LICENSE.txt rename to tools/fop-0.95/lib/xalan.regexp.LICENSE.txt diff --git a/jonas_doc/tools/fop-0.95/lib/xalan.runtime.LICENSE.txt b/tools/fop-0.95/lib/xalan.runtime.LICENSE.txt similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/xalan.runtime.LICENSE.txt rename to tools/fop-0.95/lib/xalan.runtime.LICENSE.txt diff --git a/jonas_doc/tools/fop-0.95/lib/xerces.LICENSE.txt b/tools/fop-0.95/lib/xerces.LICENSE.txt similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/xerces.LICENSE.txt rename to tools/fop-0.95/lib/xerces.LICENSE.txt diff --git a/jonas_doc/tools/fop-0.95/lib/xercesImpl-2.7.1.jar b/tools/fop-0.95/lib/xercesImpl-2.7.1.jar similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/xercesImpl-2.7.1.jar rename to tools/fop-0.95/lib/xercesImpl-2.7.1.jar diff --git a/jonas_doc/tools/fop-0.95/lib/xercesImpl.LICENSE.txt b/tools/fop-0.95/lib/xercesImpl.LICENSE.txt similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/xercesImpl.LICENSE.txt rename to tools/fop-0.95/lib/xercesImpl.LICENSE.txt diff --git a/jonas_doc/tools/fop-0.95/lib/xercesImpl.NOTICE.txt b/tools/fop-0.95/lib/xercesImpl.NOTICE.txt similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/xercesImpl.NOTICE.txt rename to tools/fop-0.95/lib/xercesImpl.NOTICE.txt diff --git a/jonas_doc/tools/fop-0.95/lib/xml-apis-1.3.04.jar b/tools/fop-0.95/lib/xml-apis-1.3.04.jar similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/xml-apis-1.3.04.jar rename to tools/fop-0.95/lib/xml-apis-1.3.04.jar diff --git a/jonas_doc/tools/fop-0.95/lib/xml-apis-ext-1.3.04.jar b/tools/fop-0.95/lib/xml-apis-ext-1.3.04.jar similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/xml-apis-ext-1.3.04.jar rename to tools/fop-0.95/lib/xml-apis-ext-1.3.04.jar diff --git a/jonas_doc/tools/fop-0.95/lib/xml-apis-ext.LICENSE.dom-documentation.txt b/tools/fop-0.95/lib/xml-apis-ext.LICENSE.dom-documentation.txt similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/xml-apis-ext.LICENSE.dom-documentation.txt rename to tools/fop-0.95/lib/xml-apis-ext.LICENSE.dom-documentation.txt diff --git a/jonas_doc/tools/fop-0.95/lib/xml-apis-ext.LICENSE.dom-software.txt b/tools/fop-0.95/lib/xml-apis-ext.LICENSE.dom-software.txt similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/xml-apis-ext.LICENSE.dom-software.txt rename to tools/fop-0.95/lib/xml-apis-ext.LICENSE.dom-software.txt diff --git a/jonas_doc/tools/fop-0.95/lib/xml-apis-ext.LICENSE.sac.html b/tools/fop-0.95/lib/xml-apis-ext.LICENSE.sac.html similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/xml-apis-ext.LICENSE.sac.html rename to tools/fop-0.95/lib/xml-apis-ext.LICENSE.sac.html diff --git a/jonas_doc/tools/fop-0.95/lib/xml-apis-ext.LICENSE.txt b/tools/fop-0.95/lib/xml-apis-ext.LICENSE.txt similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/xml-apis-ext.LICENSE.txt rename to tools/fop-0.95/lib/xml-apis-ext.LICENSE.txt diff --git a/jonas_doc/tools/fop-0.95/lib/xml-apis-ext.NOTICE.txt b/tools/fop-0.95/lib/xml-apis-ext.NOTICE.txt similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/xml-apis-ext.NOTICE.txt rename to tools/fop-0.95/lib/xml-apis-ext.NOTICE.txt diff --git a/jonas_doc/tools/fop-0.95/lib/xml-apis-ext.README.dom.txt b/tools/fop-0.95/lib/xml-apis-ext.README.dom.txt similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/xml-apis-ext.README.dom.txt rename to tools/fop-0.95/lib/xml-apis-ext.README.dom.txt diff --git a/jonas_doc/tools/fop-0.95/lib/xml-apis.LICENSE-SAX.html b/tools/fop-0.95/lib/xml-apis.LICENSE-SAX.html similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/xml-apis.LICENSE-SAX.html rename to tools/fop-0.95/lib/xml-apis.LICENSE-SAX.html diff --git a/jonas_doc/tools/fop-0.95/lib/xml-apis.LICENSE.DOM-documentation.html b/tools/fop-0.95/lib/xml-apis.LICENSE.DOM-documentation.html similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/xml-apis.LICENSE.DOM-documentation.html rename to tools/fop-0.95/lib/xml-apis.LICENSE.DOM-documentation.html diff --git a/jonas_doc/tools/fop-0.95/lib/xml-apis.LICENSE.DOM-software.html b/tools/fop-0.95/lib/xml-apis.LICENSE.DOM-software.html similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/xml-apis.LICENSE.DOM-software.html rename to tools/fop-0.95/lib/xml-apis.LICENSE.DOM-software.html diff --git a/jonas_doc/tools/fop-0.95/lib/xml-apis.LICENSE.txt b/tools/fop-0.95/lib/xml-apis.LICENSE.txt similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/xml-apis.LICENSE.txt rename to tools/fop-0.95/lib/xml-apis.LICENSE.txt diff --git a/jonas_doc/tools/fop-0.95/lib/xml-apis.NOTICE.txt b/tools/fop-0.95/lib/xml-apis.NOTICE.txt similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/xml-apis.NOTICE.txt rename to tools/fop-0.95/lib/xml-apis.NOTICE.txt diff --git a/jonas_doc/tools/fop-0.95/lib/xmlgraphics-commons-1.3.1.jar b/tools/fop-0.95/lib/xmlgraphics-commons-1.3.1.jar similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/xmlgraphics-commons-1.3.1.jar rename to tools/fop-0.95/lib/xmlgraphics-commons-1.3.1.jar diff --git a/jonas_doc/tools/fop-0.95/lib/xmlgraphics-commons.LICENSE.txt b/tools/fop-0.95/lib/xmlgraphics-commons.LICENSE.txt similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/xmlgraphics-commons.LICENSE.txt rename to tools/fop-0.95/lib/xmlgraphics-commons.LICENSE.txt diff --git a/jonas_doc/tools/fop-0.95/lib/xmlgraphics-commons.NOTICE.txt b/tools/fop-0.95/lib/xmlgraphics-commons.NOTICE.txt similarity index 100% rename from jonas_doc/tools/fop-0.95/lib/xmlgraphics-commons.NOTICE.txt rename to tools/fop-0.95/lib/xmlgraphics-commons.NOTICE.txt diff --git a/jonas_doc/tools/fop-0.95/status.xml b/tools/fop-0.95/status.xml similarity index 100% rename from jonas_doc/tools/fop-0.95/status.xml rename to tools/fop-0.95/status.xml diff --git a/jonas_doc/tools/maven-ant-tasks-2.1.3.jar b/tools/maven-ant-tasks-2.1.3.jar similarity index 100% rename from jonas_doc/tools/maven-ant-tasks-2.1.3.jar rename to tools/maven-ant-tasks-2.1.3.jar diff --git a/jonas_doc/tools/win32/iconv.dll b/tools/win32/iconv.dll similarity index 100% rename from jonas_doc/tools/win32/iconv.dll rename to tools/win32/iconv.dll diff --git a/jonas_doc/tools/win32/libexslt.dll b/tools/win32/libexslt.dll similarity index 100% rename from jonas_doc/tools/win32/libexslt.dll rename to tools/win32/libexslt.dll diff --git a/jonas_doc/tools/win32/libxml2.dll b/tools/win32/libxml2.dll similarity index 100% rename from jonas_doc/tools/win32/libxml2.dll rename to tools/win32/libxml2.dll diff --git a/jonas_doc/tools/win32/libxslt.dll b/tools/win32/libxslt.dll similarity index 100% rename from jonas_doc/tools/win32/libxslt.dll rename to tools/win32/libxslt.dll diff --git a/jonas_doc/tools/win32/xsltproc.exe b/tools/win32/xsltproc.exe similarity index 100% rename from jonas_doc/tools/win32/xsltproc.exe rename to tools/win32/xsltproc.exe diff --git a/jonas_doc/tools/win32/zlib1.dll b/tools/win32/zlib1.dll similarity index 100% rename from jonas_doc/tools/win32/zlib1.dll rename to tools/win32/zlib1.dll